PageSourceSearch

https://pagergpt.ai/assets/app.integration.utils-D7bbnxpM.js

js pagergpt.ai collected 2026-10-05 01:58:55 UTC 165,055 bytes, 37 lines download raw bytes

1import{r as V,j as Si}from"./jsx-runtime-XlqKrwLw.js";var H;(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"})(H||(H={}));function Tn(e){return e.nodeType===e.ELEMENT_NODE}function et(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function tt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Rn(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Nn(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Et(e){try{const t=e.rules||e.cssRules;return t?Rn(Array.from(t,wi).join("")):null}catch{return null}}function wi(e){let t;if(Dn(e))try{t=Et(e.styleSheet)||Nn(e)}catch{}else if(Ln(e)&&e.selectorText.includes(":"))return An(e.cssText);return t||e.cssText}function An(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Dn(e){return"styleSheet"in e}function Ln(e){return"selectorText"in e}class Ii{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var r;if(!t)return-1;const i=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return i??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(r,n)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Pn(){return new Ii}function vr({element:e,maskInputOptions:t,tagName:r,type:i,value:n,maskInputFn:o}){let a=n||"";const u=i&&Le(i);return(t[r.toLowerCase()]||u&&t[u])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Le(e){return e.toLowerCase()}const zr="__rrweb_original__";function Un(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let i=0;i<e.width;i+=r)for(let n=0;n<e.height;n+=r){const o=t.getImageData,a=zr in o?o[zr]:o;
vendor: 5,359 bytes, line 1
1if(new Uint32Array(a.call(t,i,n,Math.min(r,e.width-i),Math.min(r,e.height-n)).data.buffer).some(c=>c!==0))return!1}return!0}function br(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Le(t):null}function ki(e,t){var r;let i;try{i=new URL(e,t??window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,o=i.pathname.match(n);return(r=o==null?void 0:o[1])!==null&&r!==void 0?r:null}let Fn=1;const qn=new RegExp("[^a-z0-9-_:]"),st=-2;function Ei(){return Fn++}function $n(e){if(e instanceof HTMLFormElement)return"form";const t=Le(e.tagName);return qn.test(t)?"div":t}function Bn(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Fe,jr;const Wn=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zn=/^(?:[a-z+]+:)?\/\//i,jn=/^www\..*/i,Gn=/^(data:)([^,]*),(.*)/i;function Ct(e,t){return(e||"").replace(Wn,(r,i,n,o,a,u)=>{const c=n||a||u,f=i||o||"";if(!c)return r;if(zn.test(c)||jn.test(c))return`url(${f}${c}${f})`;if(Gn.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${Bn(t)+c}${f})`;const l=t.split("/"),p=c.split("/");l.pop();for(const d of p)d!=="."&&(d===".."?l.pop():l.push(d));return`url(${f}${l.join("/")}${f})`})}const Hn=/^[^ \t\n\r\u000c]+/,Vn=/^[, \t\n\r\u000c]+/;function Kn(e,t){if(t.trim()==="")return t;let r=0;function i(o){let a;const u=o.exec(t.substring(r));return u?(a=u[0],r+=a.length,a):""}const n=[];for(;i(Vn),!(r>=t.length);){let o=i(Hn);if(o.slice(-1)===",")o=Be(e,o.substring(0,o.length-1)),n.push(o);else{let a="";o=Be(e,o);let u=!1;for(;;){const c=t.charAt(r);if(c===""){n.push((o+a).trim());break}else if(u)c===")"&&(u=!1);else if(c===","){r+=1,n.push((o+a).trim());break}else c==="("&&(u=!0);a+=c,r+=1}}}return n.join(", ")}function Be(e,t){if(!t||t.trim()==="")return t;const r=e.createElement("a");return r.href=t,r.href}function Yn(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Sr(){const e=document.createElement("a");return e.href="",e.href}function Ci(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Be(e,i):r==="srcset"?Kn(e,i):r==="style"?Ct(i,Sr()):t==="object"&&r==="data"?Be(e,i):i)}function Mi(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Xn(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}if(r)return e.matches(r)}catch{}return!1}function Mt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Mt(e.parentNode,t,r):!1;for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}return r?Mt(e.parentNode,t,r):!1}function Oi(e,t,r,i){try{const n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(n===null)return!1;if(typeof t=="string"){if(i){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(Mt(n,t,i))return!0;if(r){if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}}catch{}return!1}function Jn(e,t,r){const i=e.contentWindow;if(!i)return;let n=!1,o;try{o=i.document.readyState}catch{return}if(o!=="complete"){const u=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),n=!0,t()});return}const a="about:blank";if(i.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Qn(e,t,r){let i=!1,n;try{n=e.sheet}catch{return}if(n)return;const o=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),i=!0,t()})}function Zn(e,t){const{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:l,dataURLOptions:p={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:g,newlyAddedElement:_=!1}=t,m=eo(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:e.compatMode}:{type:H.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:m};case e.ELEMENT_NODE:return ro(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:l,dataURLOptions:p,inlineImages:d,recordCanvas:h,keepIframeSrcFn:g,newlyAddedElement:_,rootId:m});case e.TEXT_NODE:return to(e,{needsMask:a,maskTextFn:f,rootId:m});case e.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:m};case e.COMMENT_NODE:return{type:H.Comment,textContent:e.textContent||"",rootId:m};default:return!1}}function eo(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function to(e,t){var r;const{needsMask:i,maskTextFn:n,rootId:o}=t,a=e.parentNode&&e.parentNode.tagName;let u=e.textContent;const c=a==="STYLE"?!0:void 0,f=a==="SCRIPT"?!0:void 0;if(c&&u){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(u=Et(e.parentNode.sheet))}catch(l){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${l}`,e)}u=Ct(u,Sr())}return f&&(u="SCRIPT_PLACEHOLDER"),!c&&!f&&u&&i&&(u=n?n(u,e.parentElement):u.replace(/[\S]/g,"*")),{type:H.Text,textContent:u||"",isStyle:c,rootId:o}}function ro(e,t){const{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={}
1,inlineImages:f,recordCanvas:l,keepIframeSrcFn:p,newlyAddedElement:d=!1,rootId:h}=t,g=Xn(e,i,n),_=$n(e);let m={};const S=e.attributes.length;for(let v=0;v<S;v++){const b=e.attributes[v];Mi(_,b.name,b.value)||(m[b.name]=Ci(r,_,Le(b.name),b.value))}if(_==="link"&&o){const v=Array.from(r.styleSheets).find(k=>k.href===e.href);let b=null;v&&(b=Et(v)),b&&(delete m.rel,delete m.href,m._cssText=Ct(b,v.href))}if(_==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const v=Et(e.sheet);v&&(m._cssText=Ct(v,Sr()))}if(_==="input"||_==="textarea"||_==="select"){const v=e.value,b=e.checked;m.type!=="radio"&&m.type!=="checkbox"&&m.type!=="submit"&&m.type!=="button"&&v?m.value=vr({element:e,type:br(e),tagName:_,value:v,maskInputOptions:a,maskInputFn:u}):b&&(m.checked=b)}if(_==="option"&&(e.selected&&!a.select?m.selected=!0:delete m.selected),_==="canvas"&&l){if(e.__context==="2d")Un(e)||(m.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const v=e.toDataURL(c.type,c.quality),b=document.createElement("canvas");b.width=e.width,b.height=e.height;const k=b.toDataURL(c.type,c.quality);v!==k&&(m.rr_dataURL=v)}}if(_==="img"&&f){Fe||(Fe=r.createElement("canvas"),jr=Fe.getContext("2d"));const v=e,b=v.crossOrigin;v.crossOrigin="anonymous";const k=()=>{v.removeEventListener("load",k);try{Fe.width=v.naturalWidth,Fe.height=v.naturalHeight,jr.drawImage(v,0,0),m.rr_dataURL=Fe.toDataURL(c.type,c.quality)}catch($){console.warn(`Cannot inline img src=${v.currentSrc}! Error: ${$}`)}b?m.crossOrigin=b:v.removeAttribute("crossorigin")};v.complete&&v.naturalWidth!==0?k():v.addEventListener("load",k)}if(_==="audio"||_==="video"){const v=m;v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime,v.rr_mediaPlaybackRate=e.playbackRate,v.rr_mediaMuted=e.muted,v.rr_mediaLoop=e.loop,v.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(m.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(m.rr_scrollTop=e.scrollTop)),g){const{width:v,height:b}=e.getBoundingClientRect();m={class:m.class,rr_width:`${v}px`,rr_height:`${b}px`}}_==="iframe"&&!p(m.src)&&(e.contentDocument||(m.rr_src=m.src),delete m.src);let w;try{customElements.get(_)&&(w=!0)}catch{}return{type:H.Element,tagName:_,attributes:m,childNodes:[],isSVG:Yn(e)||void 0,needBlock:g,rootId:h,isCustom:w}}function D(e){return e==null?"":e.toLowerCase()}function io(e,t){if(t.comment&&e.type===H.Comment)return!0;if(e.type===H.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ki(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(D(e.attributes.name).match(/^msapplication-tile(image|color)$/)||D(e.attributes.name)==="application-name"||D(e.attributes.rel)==="icon"||D(e.attributes.rel)==="apple-touch-icon"||D(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&D(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(D(e.attributes.property).match(/^(og|twitter|fb):/)||D(e.attributes.name).match(/^(og|twitter):/)||D(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(D(e.attributes.name)==="robots"||D(e.attributes.name)==="googlebot"||D(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(D(e.attributes.name)==="author"||D(e.attributes.name)==="generator"||D(e.attributes.name)==="framework"||D(e.attributes.name)==="publisher"||D(e.attributes.name)==="progid"||D(e.attributes.property).match(/^article:/)||D(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(D(e.attributes.name)==="google-site-verification"||D(e.attributes.name)==="yandex-verification"||D(e.attributes.name)==="csrf-token"||D(e.attributes.name)==="p:domain_verify"||D(e.attributes.name)==="verify-v1"||D(e.attributes.name)==="verification"||D(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function We(e,t){const{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:l={},maskTextFn:p,maskInputFn:d,slimDOMOptions:h,dataURLOptions:g={},inlineImages:_=!1,recordCanvas:m=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:$=()=>!1,newlyAddedElement:z=!1}=t;let{needsMask:L}=t,{preserveWhiteSpace:P=!0}=t;!L&&e.childNodes&&(L=Oi(e,a,u,L===void 0));const ie=Zn(e,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:L,inlineStylesheet:f,maskInputOptions:l,maskTextFn:p,maskInputFn:d,dataURLOptions:g,inlineImages:_,recordCanvas:m,keepIframeSrcFn:$,newlyAddedElement:z});if(!ie)return console.warn(e,"not serialized"),null;let ne;
vendor: 20,600 bytes, lines 1-3
1i.hasNode(e)?ne=i.getId(e):io(ie,h)||!P&&ie.type===H.Text&&!ie.isStyle&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?ne=st:ne=Ei();const N=Object.assign(ie,{id:ne});if(i.add(e,N),ne===st)return null;S&&S(e);let Te=!c;if(N.type===H.Element){Te=Te&&!N.needBlock,delete N.needBlock;const X=e.shadowRoot;X&&tt(X)&&(N.isShadowHost=!0)}if((N.type===H.Document||N.type===H.Element)&&Te){h.headWhitespace&&N.type===H.Element&&N.tagName==="head"&&(P=!1);const X={doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:l,maskTextFn:p,maskInputFn:d,slimDOMOptions:h,dataURLOptions:g,inlineImages:_,recordCanvas:m,preserveWhiteSpace:P,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:k,keepIframeSrcFn:$};if(!(N.type===H.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0))for(const Se of Array.from(e.childNodes)){const de=We(Se,X);de&&N.childNodes.push(de)}if(Tn(e)&&e.shadowRoot)for(const Se of Array.from(e.shadowRoot.childNodes)){const de=We(Se,X);de&&(tt(e.shadowRoot)&&(de.isShadow=!0),N.childNodes.push(de))}}return e.parentNode&&et(e.parentNode)&&tt(e.parentNode)&&(N.isShadow=!0),N.type===H.Element&&N.tagName==="iframe"&&Jn(e,()=>{const X=e.contentDocument;if(X&&w){const Se=We(X,{doc:X,mirror:i,blockClass:n,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:l,maskTextFn:p,maskInputFn:d,slimDOMOptions:h,dataURLOptions:g,inlineImages:_,recordCanvas:m,preserveWhiteSpace:P,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:k,keepIframeSrcFn:$});Se&&w(e,Se)}},v),N.type===H.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&ki(N.attributes.href)==="css")&&Qn(e,()=>{if(b){const X=We(e,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:l,maskTextFn:p,maskInputFn:d,slimDOMOptions:h,dataURLOptions:g,inlineImages:_,recordCanvas:m,preserveWhiteSpace:P,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:k,keepIframeSrcFn:$});X&&b(e,X)}},k),N}function no(e,t){const{mirror:r=new Ii,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:l=!1,maskTextFn:p,maskInputFn:d,slimDOM:h=!1,dataURLOptions:g,preserveWhiteSpace:_,onSerialize:m,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:k=()=>!1}=t;return We(e,{doc:e,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l===!0?{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}:l===!1?{password:!0}:l,maskTextFn:p,maskInputFn:d,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:g,inlineImages:c,recordCanvas:f,preserveWhiteSpace:_,onSerialize:m,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:k,newlyAddedElement:!1})}function Q(e,t,r=document){const i={capture:!0,passive:!0};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}const $e=`Please stop import mirror directly. Instead of that,\r
2now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3or you can use record.mirror to access the mirror instance during recording.`;let Gr={map:{},getId(){return console.error($e),-1},getNode(){return console.error($e),null},removeNodeFromMap(){console.error($e)},has(){return console.error($e),!1},reset(){console.error($e)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Gr=new Proxy(Gr,{get(e,t,r){return t==="map"&&console.error($e),Reflect.get(e,t,r)}}));function at(e,t,r={}){let i=null,n=0;return function(...o){const a=Date.now();!n&&r.leading===!1&&(n=a);const u=t-(a-n),c=this;u<=0||u>t?(i&&(clearTimeout(i),i=null),n=a,e.apply(c,o)):!i&&r.trailing!==!1&&(i=setTimeout(()=>{n=r.leading===!1?0:Date.now(),i=null,e.apply(c,o)},u))}}function Bt(e,t,r,i,n=window){const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>Bt(e,t,o||{},!0)}function Xe(e,t,r){try{if(!(t in e))return()=>{};const i=e[t],n=r(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch{return()=>{}}}let Ot=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ot=()=>new Date().getTime());function xi(e){var t,r,i,n,o,a;const u=e.document;return{left:u.scrollingElement?u.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(u==null?void 0:u.documentElement.scrollLeft)||((r=(t=u==null?void 0:u.body)===null||t===void 0?void 0:t.parentElement)===null||r===void 0?void 0:r.scrollLeft)||((i=u==null?void 0:u.body)===null||i===void 0?void 0:i.scrollLeft)||0,top:u.scrollingElement?u.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(u==null?void 0:u.documentElement.scrollTop)||((o=(n=u==null?void 0:u.body)===null||n===void 0?void 0:n.parentElement)===null||o===void 0?void 0:o.scrollTop)||((a=u==null?void 0:u.body)===null||a===void 0?void 0:a.scrollTop)||0}}function Ti(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ri(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ni(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Z(e,t,r,i){if(!e)return!1;const n=Ni(e);if(!n)return!1;try{if(typeof t=="string"){if(n.classList.contains(t)||i&&n.closest("."+t)!==null)return!0}else if(Mt(n,t,i))return!0}catch{}return!!(r&&(n.matches(r)||i&&n.closest(r)!==null))}function oo(e,t){return t.getId(e)!==-1}function Xt(e,t){return t.getId(e)===st}function Ai(e,t){if(et(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ai(e.parentNode,t):!0:!0}function nr(e){return!!e.changedTouches}function so(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function Di(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Li(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function or(e){return!!(e!=null&&e.shadowRoot)}class ao{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var r;return(r=this.styleIDMap.get(t))!==null&&r!==void 0?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let i;return r===void 0?i=this.id++:i=r,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Pi(e){var t,r;let i=null;return((r=(t=e.getRootNode)===null||t===void 0?void 0:t.call(e))===null||r===void 0?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(i=e.getRootNode().host),i}function co(e){let t=e,r;for(;r=Pi(t);)t=r;return t}function uo(e){const t=e.ownerDocument;if(!t)return!1;const r=co(e);return t.contains(r)}function Ui(e){const t=e.ownerDocument;return t?t.contains(e)||uo(e):!1}var T=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(T||{}),O=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(O||{}),ee=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ee||{}),me=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(me||{}),Ve=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ve||{});function Hr(e){return"__ln"in e}class lo{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let i=0;i<t;i++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Hr(t.previousSibling)){const i=t.previousSibling.__ln.next;r.next=i,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,i&&(i.previous=r)}else if(t.nextSibling&&Hr(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;r.previous=i,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,i&&(i.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Vr=(e,t)=>`${e}@${t}`;class fo{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,i=new lo,n=c=>{let f=c,l=st;for(;l===st;)f=f&&f.nextSibling,l=f&&this.mirror.getId(f);return l},o=c=>{if(!c.parentNode||!Ui(c)||c.parentNode.tagName==="TEXTAREA")return;const f=et(c.parentNode)?this.mirror.getId(Pi(c)):this.mirror.getId(c.parentNode),l=n(c);if(f===-1||l===-1)return i.addNode(c);const p=We(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{Di(d,this.mirror)&&this.iframeManager.addIframe(d),Li(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),or(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(d,h)=>{this.iframeManager.attachIframe(d,h),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,h)=>{this.stylesheetManager.attachLinkElement(d,h)}});p&&(t.push({parentId:f,nextId:l,node:p}),r.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Kr(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(const c of this.addedSet)!Yr(this.droppedSet,c)&&!Kr(this.removes,c,this.mirror)||Yr(this.movedSet,c)?o(c):this.droppedSet.add(c);let a=null;for(;i.length;){let c=null;if(a){const f=this.mirror.getId(a.value.parentNode),l=n(a.value);f!==-1&&l!==-1&&(c=a)}if(!c){let f=i.tail;for(;f;){const l=f;if(f=f.previous,l){const p=this.mirror.getId(l.value.parentNode);if(n(l.value)===-1)continue;if(p!==-1){c=l;break}else{const h=l.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=h.parentNode.host;if(this.mirror.getId(g)!==-1){c=l;break}}}}}}if(!c){for(;i.head;)i.removeNode(i.head.value);break}a=c.previous,i.removeNode(c.value),o(c.value)}const u={texts:this.texts.map(c=>{const f=c.node;return f.parentNode&&f.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f.parentNode),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const l=JSON.stringify(c.styleDiff),p=JSON.stringify(c._unchangedStyles);l.length<f.style.length&&(l+p).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(u))},this.genTextAreaValueMutation=t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(t.childNodes,i=>i.textContent||"").join("")},this.processMutation=t=>{if(!Xt(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!Z(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Oi(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Ni(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let i=t.attributeName,n=t.target.getAttribute(i);if(i==="value"){const a=br(r);n=vr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:n,maskInputFn:this.maskInputFn})}if(Z(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;let o=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)i="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),i==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Mi(r.tagName,i)&&(o.attributes[i]=Ci(this.doc,Le(r.tagName),Le(i),n),i==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const c=r.style.getPropertyValue(u),f=r.style.getPropertyPriority(u);c!==a.style.getPropertyValue(u)||f!==a.style.getPropertyPriority(u)?f===""?o.styleDiff[u]=c:o.styleDiff[u]=[c,f]:o._unchangedStyles[u]=[c,f]}for(const u of Array.from(a.style))r.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}break}case"childList":{if(Z(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const i=this.mirror.getId(r),n=et(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Z(t.target,this.blockClass,this.blockSelector,!1)||Xt(r,this.mirror)||!oo(r,this.mirror)||(this.addedSet.has(r)?(sr(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&i===-1||Ai(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Vr(i,n)]?sr(this.movedSet,r):this.removes.push({parentId:n,id:i,isShadow:et(t.target)&&tt(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Xt(t,this.mirror))return;this.movedSet.add(t);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[Vr(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Z(t,this.blockClass,this.blockSelector,!1)||(t.childNodes.forEach(i=>this.genAdds(i)),or(t)&&t.shadowRoot.childNodes.forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function sr(e,t){e.delete(t),t.childNodes.forEach(r=>sr(e,r))}function Kr(e,t,r){return e.length===0?!1:Fi(e,t,r)}function Fi(e,t,r){const{parentNode:i}=t;if(!i)return!1;const n=r.getId(i);return e.some(o=>o.id===n)?!0:Fi(e,i,r)}function Yr(e,t){return e.size===0?!1:qi(e,t)}function qi(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:qi(e,r):!1}let rt;function po(e){rt=e}function ho(){rt=void 0}const x=e=>rt?(...r)=>{try{return e(...r)}catch(i){if(rt&&rt(i)===!0)return;throw i}}:e,De=[];function ft(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function $i(e,t){var r,i;const n=new fo;De.push(n),n.init(e);let o=window.MutationObserver||window.__rrMutationObserver;const a=(i=(r=window==null?void 0:window.Zone)===null||r===void 0?void 0:r.__symbol__)===null||i===void 0?void 0:i.call(r,"MutationObserver");a&&window[a]&&(o=window[a]);const u=new o(x(n.processMutations.bind(n)));return u.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),u}function _o({mousemoveCb:e,sampling:t,doc:r,mirror:i}){if(t.mousemove===!1)return()=>{};const n=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],u;const c=at(x(p=>{const d=Date.now()-u;e(a.map(h=>(h.timeOffset-=d,h)),p),a=[],u=null}),o),f=x(at(x(p=>{const d=ft(p),{clientX:h,clientY:g}=nr(p)?p.changedTouches[0]:p;u||(u=Ot()),a.push({x:h,y:g,id:i.getId(d),timeOffset:Ot()-u}),c(typeof DragEvent<"u"&&p instanceof DragEvent?O.Drag:p instanceof MouseEvent?O.MouseMove:O.TouchMove)}),n,{trailing:!1})),l=[Q("mousemove",f,r),Q("touchmove",f,r),Q("drag",f,r)];return x(()=>{l.forEach(p=>p())})}function go({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let c=null;const f=l=>p=>{const d=ft(p);if(Z(d,i,n,!0))return;let h=null,g=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=me.Mouse;break;case"touch":h=me.Touch;break;case"pen":h=me.Pen;break}h===me.Touch?ee[l]===ee.MouseDown?g="TouchStart":ee[l]===ee.MouseUp&&(g="TouchEnd"):me.Pen}else nr(p)&&(h=me.Touch);h!==null?(c=h,(g.startsWith("Touch")&&h===me.Touch||g.startsWith("Mouse")&&h===me.Mouse)&&(h=null)):ee[l]===ee.Click&&(h=c,c=null);const _=nr(p)?p.changedTouches[0]:p;if(!_)return;const m=r.getId(d),{clientX:S,clientY:w}=_;x(e)(Object.assign({type:ee[g],id:m,x:S,y:w},h!==null&&{pointerType:h}))};return Object.keys(ee).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEac
vendor: 4,406 bytes, line 3
3h(l=>{let p=Le(l);const d=f(l);if(window.PointerEvent)switch(ee[l]){case ee.MouseDown:case ee.MouseUp:p=p.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}u.push(Q(p,d,t))}),x(()=>{u.forEach(l=>l())})}function Bi({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:o}){const a=x(at(x(u=>{const c=ft(u);if(!c||Z(c,i,n,!0))return;const f=r.getId(c);if(c===t&&t.defaultView){const l=xi(t.defaultView);e({id:f,x:l.left,y:l.top})}else e({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Q("scroll",a,t)}function mo({viewportResizeCb:e},{win:t}){let r=-1,i=-1;const n=x(at(x(()=>{const o=Ti(),a=Ri();(r!==o||i!==a)&&(e({width:Number(a),height:Number(o)}),r=o,i=a)}),200));return Q("resize",n,t)}const yo=["INPUT","TEXTAREA","SELECT"],Xr=new WeakMap;function vo({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:l}){function p(w){let v=ft(w);const b=w.isTrusted,k=v&&v.tagName;if(v&&k==="OPTION"&&(v=v.parentElement),!v||!k||yo.indexOf(k)<0||Z(v,i,n,!0)||v.classList.contains(o)||a&&v.matches(a))return;let $=v.value,z=!1;const L=br(v)||"";L==="radio"||L==="checkbox"?z=v.checked:(u[k.toLowerCase()]||u[L])&&($=vr({element:v,maskInputOptions:u,tagName:k,type:L,value:$,maskInputFn:c})),d(v,l?{text:$,isChecked:z,userTriggered:b}:{text:$,isChecked:z});const P=v.name;L==="radio"&&P&&z&&t.querySelectorAll(`input[type="radio"][name="${P}"]`).forEach(ie=>{if(ie!==v){const ne=ie.value;d(ie,l?{text:ne,isChecked:!z,userTriggered:!1}:{text:ne,isChecked:!z})}})}function d(w,v){const b=Xr.get(w);if(!b||b.text!==v.text||b.isChecked!==v.isChecked){Xr.set(w,v);const k=r.getId(w);x(e)(Object.assign(Object.assign({},v),{id:k}))}}const g=(f.input==="last"?["change"]:["input","change"]).map(w=>Q(w,x(p),t)),_=t.defaultView;if(!_)return()=>{g.forEach(w=>w())};const m=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),S=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&g.push(...S.map(w=>Bt(w[0],w[1],{set(){x(p)({target:this,isTrusted:!1})}},!1,_))),x(()=>{g.forEach(w=>w())})}function xt(e){const t=[];function r(i,n){if(yt("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||yt("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||yt("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||yt("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const a=Array.from(i.parentRule.cssRules).indexOf(i);n.unshift(a)}else if(i.parentStyleSheet){const a=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(a)}return n}return r(e,t)}function we(e,t,r){let i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:i}):{}}function bo({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:x((l,p,d)=>{const[h,g]=d,{id:_,styleId:m}=we(p,t,r.styleMirror);return(_&&_!==-1||m&&m!==-1)&&e({id:_,styleId:m,adds:[{rule:h,index:g}]}),l.apply(p,d)})});const o=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:x((l,p,d)=>{const[h]=d,{id:g,styleId:_}=we(p,t,r.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,removes:[{index:h}]}),l.apply(p,d)})});let a;i.CSSStyleSheet.prototype.replace&&(a=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:x((l,p,d)=>{const[h]=d,{id:g,styleId:_}=we(p,t,r.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,replace:h}),l.apply(p,d)})}));let u;i.CSSStyleSheet.prototype.replaceSync&&(u=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:x((l,p,d)=>{const[h]=d,{id:g,styleId:_}=we(p,t,r.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,replaceSync:h}),l.apply(p,d)})}));const c={};vt("CSSGroupingRule")?c.CSSGroupingRule=i.CSSGroupingRule:(vt("CSSMediaRule")&&(c.CSSMediaRule=i.CSSMediaRule),vt("CSSConditionRule")&&(c.CSSConditionRule=i.CSSConditionRule),vt("CSSSupportsRule")&&(c.CSSSupportsRule=i.CSSSupportsRule));const f={};
vendor: 9,730 bytes, line 3
3return Object.entries(c).forEach(([l,p])=>{f[l]={insertRule:p.prototype.insertRule,deleteRule:p.prototype.deleteRule},p.prototype.insertRule=new Proxy(f[l].insertRule,{apply:x((d,h,g)=>{const[_,m]=g,{id:S,styleId:w}=we(h.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||w&&w!==-1)&&e({id:S,styleId:w,adds:[{rule:_,index:[...xt(h),m||0]}]}),d.apply(h,g)})}),p.prototype.deleteRule=new Proxy(f[l].deleteRule,{apply:x((d,h,g)=>{const[_]=g,{id:m,styleId:S}=we(h.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||S&&S!==-1)&&e({id:m,styleId:S,removes:[{index:[...xt(h),_]}]}),d.apply(h,g)})})}),x(()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=o,a&&(i.CSSStyleSheet.prototype.replace=a),u&&(i.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(([l,p])=>{p.prototype.insertRule=f[l].insertRule,p.prototype.deleteRule=f[l].deleteRule})})}function Wi({mirror:e,stylesheetManager:t},r){var i,n,o;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(r.host);const u=r.nodeName==="#document"?(i=r.defaultView)===null||i===void 0?void 0:i.Document:(o=(n=r.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||o===void 0?void 0:o.ShadowRoot,c=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var f;return(f=c.get)===null||f===void 0?void 0:f.call(this)},set(f){var l;const p=(l=c.set)===null||l===void 0?void 0:l.call(this,f);if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return p}}),x(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function So({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:n}){const o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:x((u,c,f)=>{var l;const[p,d,h]=f;if(r.has(p))return o.apply(c,[p,d,h]);const{id:g,styleId:_}=we((l=c.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,i.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,set:{property:p,value:d,priority:h},index:xt(c.parentRule)}),u.apply(c,f)})});const a=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:x((u,c,f)=>{var l;const[p]=f;if(r.has(p))return a.apply(c,[p]);const{id:d,styleId:h}=we((l=c.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,i.styleMirror);return(d&&d!==-1||h&&h!==-1)&&e({id:d,styleId:h,remove:{property:p},index:xt(c.parentRule)}),u.apply(c,f)})}),x(()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=a})}function wo({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:n,doc:o}){const a=x(c=>at(x(f=>{const l=ft(f);if(!l||Z(l,t,r,!0))return;const{currentTime:p,volume:d,muted:h,playbackRate:g,loop:_}=l;e({type:c,id:i.getId(l),currentTime:p,volume:d,muted:h,playbackRate:g,loop:_})}),n.media||500)),u=[Q("play",a(0),o),Q("pause",a(1),o),Q("seeked",a(2),o),Q("volumechange",a(3),o),Q("ratechange",a(4),o)];return x(()=>{u.forEach(c=>c())})}function Io({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const i=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(c,f,l){const p=new o(c,f,l);return n.set(p,{family:c,buffer:typeof f!="string",descriptors:l,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),p};const a=Xe(t.fonts,"add",function(u){return function(c){return setTimeout(x(()=>{const f=n.get(c);f&&(e(f),n.delete(c))}),0),u.apply(this,[c])}});return i.push(()=>{r.FontFace=o}),i.push(a),x(()=>{i.forEach(u=>u())})}function ko(e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,selectionCb:o}=e;let a=!0;const u=x(()=>{const c=t.getSelection();if(!c||a&&(c!=null&&c.isCollapsed))return;a=c.isCollapsed||!1;const f=[],l=c.rangeCount||0;for(let p=0;p<l;p++){const d=c.getRangeAt(p),{startContainer:h,startOffset:g,endContainer:_,endOffset:m}=d;Z(h,i,n,!0)||Z(_,i,n,!0)||f.push({start:r.getId(h),startOffset:g,end:r.getId(_),endOffset:m})}o({ranges:f})});return u(),Q("selectionchange",u)}function Eo({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Xe(r.customElements,"define",function(n){return function(o,a,u){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return n.apply(this,[o,a,u])}})}function Co(e,t){const{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:l,canvasMutationCb:p,fontCb:d,selectionCb:h,customElementCb:g}=e;e.mutationCb=(..._)=>{t.mutation&&t.mutation(..._),r(..._)},e.mousemoveCb=(..._)=>{t.mousemove&&t.mousemove(..._),i(..._)},e.mouseInteractionCb=(..._)=>{t.mouseInteraction&&t.mouseInteraction(..._),n(..._)},e.scrollCb=(..._)=>{t.scroll&&t.scroll(..._),o(..._)},e.viewportResizeCb=(..._)=>{t.viewportResize&&t.viewportResize(..._),a(..._)},e.inputCb=(..._)=>{t.input&&t.input(..._),u(..._)},e.mediaInteractionCb=(..._)=>{t.mediaInteaction&&t.mediaInteaction(..._),c(..._)},e.styleSheetRuleCb=(..._)=>{t.styleSheetRule&&t.styleSheetRule(..._),f(..._)},e.styleDeclarationCb=(..._)=>{t.styleDeclaration&&t.styleDeclaration(..._),l(..._)},e.canvasMutationCb=(..._)=>{t.canvasMutation&&t.canvasMutation(..._),p(..._)},e.fontCb=(..._)=>{t.font&&t.font(..._),d(..._)},e.selectionCb=(..._)=>{t.selection&&t.selection(..._),h(..._)},e.customElementCb=(..._)=>{t.customElement&&t.customElement(..._),g(..._)}}function Mo(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Co(e,t);let i;e.recordDOM&&(i=$i(e,e.doc));const n=_o(e),o=go(e),a=Bi(e),u=mo(e,{win:r}),c=vo(e),f=wo(e);let l=()=>{},p=()=>{},d=()=>{},h=()=>{};e.recordDOM&&(l=bo(e,{win:r}),p=Wi(e,e.doc),d=So(e,{win:r}),e.collectFonts&&(h=Io(e)));const g=ko(e),_=Eo(e),m=[];for(const S of e.plugins)m.push(S.observer(S.callback,r,S.options));return x(()=>{De.forEach(S=>S.reset()),i==null||i.disconnect(),n(),o(),a(),u(),c(),f(),l(),p(),d(),h(),g(),_(),m.forEach(S=>S())})}function yt(e){return typeof window[e]<"u"}function vt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Jr{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,i,n){const o=i||this.getIdToRemoteIdMap(t),a=n||this.getRemoteIdToIdMap(t);let u=o.get(r);return u||(u=this.generateIdFn(),o.set(r,u),a.set(u,r)),u}getIds(t,r){const i=this.getIdToRemoteIdMap(t),n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,i,n))}getRemoteId(t,r,i){const n=i||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const o=n.get(r);return o||-1}getRemoteIds(t,r){const i=this.getRemoteIdToIdMap(t);return r.map(n=>this.getRemoteId(t,n,i))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Oo{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Jr(Ei),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Jr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(i=this.loadListener)===null||i===void 0||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const o=this.transformCrossOriginEvent(n,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var i;switch(r.type){case T.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:T.IncrementalSnapshot,data:{source:O.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case T.Meta:case T.Load:case T.DomContentLoaded:return!1;case T.Plugin:return r;case T.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case T.IncrementalSnapshot:switch(r.data.source){case O.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(n.node,o)}
3),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case O.Drag:case O.TouchMove:case O.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case O.ViewportResize:return!1;case O.MediaInteraction:case O.MouseInteraction:case O.Scroll:case O.CanvasMutation:case O.Input:return this.replaceIds(r.data,t,["id"]),r;case O.StyleSheetRule:case O.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case O.Font:return r;case O.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),r;case O.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(i=r.data.styles)===null||i===void 0||i.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),r}}return!1}replace(t,r,i,n){for(const o of n)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(i,r[o]):r[o]=t.getId(i,r[o]));return r}replaceIds(t,r,i){return this.replace(this.crossOriginIframeMirror,t,r,i)}replaceStyleIds(t,r,i){return this.replace(this.crossOriginIframeStyleMirror,t,r,i)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,r)})}patchRootIdOnNode(t,r){t.type!==H.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,r)})}}class xo{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!tt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const i=$i(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(Bi(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Wi({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const i=this;this.restoreHandlers.push(Xe(t.prototype,"attachShadow",function(n){return function(o){const a=n.call(this,o);return this.shadowRoot&&Ui(this)&&i.addShadowRoot(this.shadowRoot,r),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}/*! *****************************************************************************
4Copyright (c) Microsoft Corporation.
5
6Permission to use, copy, modify, and/or distribute this software for any
7purpose with or without fee is hereby granted.
8
9THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15PERFORMANCE OF THIS SOFTWARE.
16***************************************************************************** */function To(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}function Ro(e,t,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{f(i.next(l))}catch(p){a(p)}}function c(l){try{f(i.throw(l))}catch(p){a(p)}}function f(l){l.done?o(l.value):n(l.value).then(u,c)}f((i=i.apply(e,[])).next())})}var ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
16+/",No=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var bt=0;bt<ze.length;bt++)No[ze.charCodeAt(bt)]=bt;var Ao=function(e){var t=new Uint8Array(e),r,i=t.length,n="";for(r=0;r<i;r+=3)n+=ze[t[r]>>2],n+=ze[(t[r]&3)<<4|t[r+1]>>4],n+=ze[(t[r+1]&15)<<2|t[r+2]>>6],n+=ze[t[r+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};const Qr=new Map;function Do(e,t){let r=Qr.get(e);return r||(r=new Map,Qr.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const zi=(e,t,r)=>{if(!e||!(Gi(e,t)||typeof e=="object"))return;const i=e.constructor.name,n=Do(r,i);let o=n.indexOf(e);return o===-1&&(o=n.length,n.push(e)),o};function It(e,t,r){if(e instanceof Array)return e.map(i=>It(i,t,r));if(e===null)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){const i=e.constructor.name,n=Ao(e);return{rr_type:i,base64:n}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[It(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:n}=e;return{rr_type:i,src:n}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",n=e.toDataURL();return{rr_type:i,src:n}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[It(e.data,t,r),e.width,e.height]};if(Gi(e,t)||typeof e=="object"){const i=e.constructor.name,n=zi(e,t,r);return{rr_type:i,index:n}}}}return e}const ji=(e,t,r)=>e.map(i=>It(i,t,r)),Gi=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function").find(n=>e instanceof t[n]);function Lo(e,t,r,i){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const u=Xe(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Z(this.canvas,r,i,!0)||setTimeout(()=>{const l=ji(f,t,this);e(this.canvas,{type:Ve["2D"],property:a,args:l})},0),c.apply(this,f)}});n.push(u)}catch{const c=Bt(t.CanvasRenderingContext2D.prototype,a,{set(f){e(this.canvas,{type:Ve["2D"],property:a,args:[f],setter:!0})}});n.push(c)}return()=>{n.forEach(a=>a())}}function Po(e){return e==="experimental-webgl"?"webgl":e}
16function Zr(e,t,r,i){const n=[];try{const o=Xe(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Z(this,t,r,!0)){const f=Po(u);if("__context"in this||(this.__context=f),i&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const l=c[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...c])}});n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(o=>o())}}function ei(e,t,r,i,n,o,a){const u=[],c=Object.getOwnPropertyNames(e);for(const f of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const l=Xe(e,f,function(p){return function(...d){const h=p.apply(this,d);if(zi(h,a,this),"tagName"in this.canvas&&!Z(this.canvas,i,n,!0)){const g=ji(d,a,this),_={type:t,property:f,args:g};r(this.canvas,_)}return h}});u.push(l)}catch{const p=Bt(e,f,{set(d){r(this.canvas,{type:t,property:f,args:[d],setter:!0})}});u.push(p)}return u}function Uo(e,t,r,i,n){const o=[];return o.push(...ei(t.WebGLRenderingContext.prototype,Ve.WebGL,e,r,i,n,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...ei(t.WebGL2RenderingContext.prototype,Ve.WebGL2,e,r,i,n,t)),()=>{o.forEach(a=>a())}}function Fo(e,t){var r=e.toString(),i=r.split(`
17`);i.pop(),i.shift();for(var n=i[0].search(/\S/),o=/(['"])__worker_loader_strict__(['"])/g,a=0,u=i.length;a<u;++a)i[a]=i[a].substring(n).replace(o,"$1use strict$2")+`
18`;return i}function qo(e,t){var r=Fo(e),i=new Blob(r,{type:"application/javascript"});return URL.createObjectURL(i)}function $o(e,t){var r;return function(n){return r=r||qo(e),new Worker(r,n)}}var Bo=$o(function(){(function(){"__worker_loader_strict__";/*! *****************************************************************************
19    Copyright (c) Microsoft Corporation.
20
21    Permission to use, copy, modify, and/or distribute this software for any
22    purpose with or without fee is hereby granted.
23
24    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
25    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
26    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
27    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
28    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
29    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
30    PERFORMANCE OF THIS SOFTWARE.
31    ***************************************************************************** */function e(f,l,p,d){function h(g){return g instanceof p?g:new p(function(_){_(g)})}return new(p||(p=Promise))(function(g,_){function m(v){try{w(d.next(v))}catch(b){_(b)}}function S(v){try{w(d.throw(v))}catch(b){_(b)}}function w(v){v.done?g(v.value):h(v.value).then(m,S)}w((d=d.apply(f,[])).next())})}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),i=0;i<t.length;i++)r[t.charCodeAt(i)]=i;var n=function(f){var l=new Uint8Array(f),p,d=l.length,h="";for(p=0;p<d;p+=3)h+=t[l[p]>>2],h+=t[(l[p]&3)<<4|l[p+1]>>4],h+=t[(l[p+1]&15)<<2|l[p+2]>>6],h+=t[l[p+2]&63];return d%3===2?h=h.substring(0,h.length-1)+"=":d%3===1&&(h=h.substring(0,h.length-2)+"=="),h};const o=new Map,a=new Map;function u(f,l,p){return e(this,void 0,void 0,function*(){const d=`${f}-${l}`;if("OffscreenCanvas"in globalThis){if(a.has(d))return a.get(d);const h=new OffscreenCanvas(f,l);h.getContext("2d");const _=yield(yield h.convertToBlob(p)).arrayBuffer(),m=n(_);return a.set(d,m),m}else return""})}const c=self;c.onmessage=function(f){return e(this,void 0,void 0,function*(){if("OffscreenCanvas"in globalThis){const{id:l,bitmap:p,width:d,height:h,dataURLOptions:g}=f.data,_=u(d,h,g),m=new OffscreenCanvas(d,h);m.getContext("2d").drawImage(p,0,0),p.close();const w=yield m.convertToBlob(g),v=w.type,b=yield w.arrayBuffer(),k=n(b);if(!o.has(l)&&(yield _)===k)return o.set(l,k),c.postMessage({id:l});if(o.get(l)===k)return c.postMessage({id:l});c.postMessage({id:l,type:v,base64:k,width:d,height:h}),o.set(l,k)}else return c.postMessage({id:f.data.id})})}})()});class Wo{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)};const{sampling:r="all",win:i,blockClass:n,blockSelector:o,recordCanvas:a,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&r==="all"&&this.initCanvasMutationObserver(i,n,o),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,i,n,o,{dataURLOptions:u})}initCanvasFPSObserver(t,r,i,n,o){const a=Zr(r,i,n,!0),u=new Map,c=new Bo;c.onmessage=g=>{const{id:_}=g.data;if(u.set(_,!1),!("base64"in g.data))return;const{base64:m,type:S,width:w,height:v}=g.data;this.mutationCb({id:_,type:Ve["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:S}]},0,0]}]})};const f=1e3/t;let l=0,p;const d=()=>{const g=[];return r.document.querySelectorAll("canvas").forEach(_=>{Z(_,i,n,!0)||g.push(_)}),g},h=g=>{if(l&&g-l<f){p=requestAnimationFrame(h);return}
vendor: 4,391 bytes, line 31
31l=g,d().forEach(_=>Ro(this,void 0,void 0,function*(){var m;const S=this.mirror.getId(_);if(u.get(S)||_.width===0||_.height===0)return;if(u.set(S,!0),["webgl","webgl2"].includes(_.__context)){const v=_.getContext(_.__context);((m=v==null?void 0:v.getContextAttributes())===null||m===void 0?void 0:m.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const w=yield createImageBitmap(_);c.postMessage({id:S,bitmap:w,width:_.width,height:_.height,dataURLOptions:o.dataURLOptions},[w])})),p=requestAnimationFrame(h)};p=requestAnimationFrame(h),this.resetObservers=()=>{a(),cancelAnimationFrame(p)}}initCanvasMutationObserver(t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=Zr(t,r,i,!1),o=Lo(this.processMutation.bind(this),t,r,i),a=Uo(this.processMutation.bind(this),t,r,i,this.mirror);this.resetObservers=()=>{n(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||r===-1)return;const n=i.map(a=>To(a,["type"])),{type:o}=i[0];this.mutationCb({id:r,type:o,commands:n}),this.pendingCanvasMutations.delete(t)}}class zo{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new ao,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const i={id:r,styleIds:[]},n=[];for(const o of t){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),n.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,c)=>({rule:wi(u),index:c}))})),i.styleIds.push(a)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class jo{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,r){const i=this.nodeMap.get(t);return i&&Array.from(i).some(n=>n!==r)}add(t,r){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function G(e){return Object.assign(Object.assign({},e),{timestamp:Ot()})}let B,kt,Jt,Tt=!1;const ce=Pn();function dt(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:l=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:h,maskInputFn:g,maskTextFn:_,hooks:m,packFn:S,sampling:w={},dataURLOptions:v={},mousemoveWait:b,recordDOM:k=!0,recordCanvas:$=!1,recordCrossOriginIframes:z=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:ie=!1,inlineImages:ne=!1,plugins:N,keepIframeSrcFn:Te=()=>!1,ignoreCSSAttributes:X=new Set([]),errorHandler:Se}=e;po(Se);const de=z?window.parent===window:!0;let _t=!1;if(!de)try{window.parent.document&&(_t=!1)}catch{_t=!0}if(de&&!t)throw new Error("emit function is required");b!==void 0&&w.mousemove===void 0&&(w.mousemove=b),ce.reset();const Gt=p===!0?{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}:d!==void 0?d:{password:!0},Ht=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};so();let qr,Vt=0;const $r=C=>{for(const ae of N||[])ae.eventProcessor&&(C=ae.eventProcessor(C));return S&&!_t&&(C=S(C)),C};B=(C,ae)=>{var q;
31if(!((q=De[0])===null||q===void 0)&&q.isFrozen()&&C.type!==T.FullSnapshot&&!(C.type===T.IncrementalSnapshot&&C.data.source===O.Mutation)&&De.forEach(J=>J.unfreeze()),de)t==null||t($r(C),ae);else if(_t){const J={type:"rrweb",event:$r(C),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(J,"*")}if(C.type===T.FullSnapshot)qr=C,Vt=0;else if(C.type===T.IncrementalSnapshot){if(C.data.source===O.Mutation&&C.data.isAttachIframe)return;Vt++;const J=i&&Vt>=i,Ae=r&&C.timestamp-qr.timestamp>r;(J||Ae)&&kt(!0)}};const gt=C=>{B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.Mutation},C)}))},Br=C=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.Scroll},C)})),Wr=C=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.CanvasMutation},C)})),xn=C=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.AdoptedStyleSheet},C)})),Re=new zo({mutationCb:gt,adoptedStyleSheetCb:xn}),Ne=new Oo({mirror:ce,mutationCb:gt,stylesheetManager:Re,recordCrossOriginIframes:z,wrappedEmit:B});for(const C of N||[])C.getMirror&&C.getMirror({nodeMirror:ce,crossOriginIframeMirror:Ne.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ne.crossOriginIframeStyleMirror});const Kt=new jo;Jt=new Wo({recordCanvas:$,mutationCb:Wr,win:window,blockClass:n,blockSelector:o,mirror:ce,sampling:w.canvas,dataURLOptions:v});const mt=new xo({mutationCb:gt,scrollCb:Br,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:l,maskInputOptions:Gt,dataURLOptions:v,maskTextFn:_,maskInputFn:g,recordCanvas:$,inlineImages:ne,sampling:w,slimDOMOptions:Ht,iframeManager:Ne,stylesheetManager:Re,canvasManager:Jt,keepIframeSrcFn:Te,processedNodeManager:Kt},mirror:ce});kt=(C=!1)=>{if(!k)return;B(G({type:T.Meta,data:{href:window.location.href,width:Ri(),height:Ti()}}),C),Re.reset(),mt.init(),De.forEach(q=>q.lock());const ae=no(document,{mirror:ce,blockClass:n,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:l,maskAllInputs:Gt,maskTextFn:_,slimDOM:Ht,dataURLOptions:v,recordCanvas:$,inlineImages:ne,onSerialize:q=>{Di(q,ce)&&Ne.addIframe(q),Li(q,ce)&&Re.trackLinkElement(q),or(q)&&mt.addShadowRoot(q.shadowRoot,document)},onIframeLoad:(q,J)=>{Ne.attachIframe(q,J),mt.observeAttachShadow(q)},onStylesheetLoad:(q,J)=>{Re.attachLinkElement(q,J)},keepIframeSrcFn:Te});if(!ae)return console.warn("Failed to snapshot the document");B(G({type:T.FullSnapshot,data:{node:ae,initialOffset:xi(window)}}),C),De.forEach(q=>q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Re.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const C=[],ae=J=>{var Ae;return x(Mo)({mutationCb:gt,mousemoveCb:(U,Yt)=>B(G({type:T.IncrementalSnapshot,data:{source:Yt,positions:U}})),mouseInteractionCb:U=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.MouseInteraction},U)})),scrollCb:Br,viewportResizeCb:U=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.ViewportResize},U)})),inputCb:U=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.Input},U)})),mediaInteractionCb:U=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.MediaInteraction},U)})),styleSheetRuleCb:U=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.StyleSheetRule},U)})),styleDeclarationCb:U=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.StyleDeclaration},U)})),canvasMutationCb:Wr,fontCb:U=>B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.Font},U)})),selectionCb:U=>{B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.Selection},U)}))},customElementCb:U=>{B(G({type:T.IncrementalSnapshot,data:Object.assign({source:O.CustomElement},U)}))},blockClass:n,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:Gt,inlineStylesheet:l,sampling:w,recordDOM:k,recordCanvas:$,inlineImages:ne,userTriggeredOnInput:P,collectFonts:ie,doc:J,maskInputFn:g,maskTextFn:_,keepIframeSrcFn:Te,blockSelector:o,slimDOMOptions:Ht,dataURLOptions:v,mirror:ce,iframeManager:Ne,stylesheetManager:Re,shadowDomManager:mt,processedNodeManager:Kt,canvasManager:Jt,ignoreCSSAttributes:X,plugins:((Ae=N==null?void 0:N.filter(U=>U.observer))===null||Ae===void 0?void 0:Ae.map(U=>({observer:U.observer,options:U.options,callback:Yt=>B(G({type:T.Plugin,data:{plugin:U.name,payload:Yt}}))})))||[]},m)};Ne.addLoadListener(J=>{try{C.push(ae(J.contentDocument))}catch(Ae){console.warn(Ae)}});const q=()=>{kt(),C.push(ae(document)),Tt=!0};return document.readyState==="interactive"||document.readyState==="complete"?q():(C.push(Q("DOMContentLoaded",()=>{B(G({type:T.DomContentLoaded,data:{}})),L==="DOMContentLoaded"&&q()})),C.push(Q("load",()=>{B(G({type:T.Load,data:{}})),L==="load"&&q()}
31,window))),()=>{C.forEach(J=>J()),Kt.destroy(),Tt=!1,ho()}}catch(C){console.warn(C)}}dt.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");B(G({type:T.Custom,data:{tag:e,payload:t}}))};dt.freezePage=()=>{De.forEach(e=>e.freeze())};dt.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");kt(e)};dt.mirror=ce;var Hi=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Hi||{}),pe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(pe||{}),le={DEBUG:!1,LIB_VERSION:"2.60.0"},I;if(typeof window>"u"){var ti={hostname:""};I={navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:ti,referrer:""},screen:{width:0,height:0},location:ti,addEventListener:function(){},removeEventListener:function(){}}}else I=window;var ri=I.setImmediate,Ee,ar,cr,Vi=Object.prototype.toString,Go=typeof ri<"u"?function(t){return ri(t)}:setTimeout;try{Object.defineProperty({},"x",{}),Ee=function(t,r,i,n){return Object.defineProperty(t,r,{value:i,writable:!0,configurable:n!==!1})}}catch{Ee=function(r,i,n){return r[i]=n,r}}cr=function(){var t,r,i;function n(o,a){this.fn=o,this.self=a,this.next=void 0}return{add:function(a,u){i=new n(a,u),r?r.next=i:t=i,r=i,i=void 0},drain:function(){var a=t;for(t=r=ar=void 0;a;)a.fn.call(a.self),a=a.next}}}();function Rt(e,t){cr.add(e,t),ar||(ar=Go(cr.drain))}function Ki(e){var t,r=typeof e;return e!==null&&(r==="object"||r==="function")&&(t=e.then),typeof t=="function"?t:!1}function wr(){for(var e=0;e<this.chain.length;e++)Ho(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function Ho(e,t,r){var i,n;try{t===!1?r.reject(e.msg):(t===!0?i=e.msg:i=t.call(void 0,e.msg),i===r.promise?r.reject(TypeError("Promise-chain cycle")):(n=Ki(i))?n.call(i,r.resolve,r.reject):r.resolve(i))}catch(o){r.reject(o)}}function Yi(e){var t,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(t=Ki(e))?Rt(function(){var i=new ii(r);try{t.call(e,function(){Yi.apply(i,arguments)},function(){it.apply(i,arguments)})}catch(n){it.call(i,n)}}):(r.msg=e,r.state=1,r.chain.length>0&&Rt(wr,r))}catch(i){it.call(new ii(r),i)}}}function it(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&Rt(wr,t))}function Xi(e,t,r,i){for(var n=0;n<t.length;n++)(function(a){e.resolve(t[a]).then(function(c){r(a,c)},i)})(n)}function ii(e){this.def=e,this.triggered=!1}function Vo(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function Me(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var t=new Vo(this);this.then=function(i,n){var o={success:typeof i=="function"?i:!0,failure:typeof n=="function"?n:!1};return o.promise=new this.constructor(function(u,c){if(typeof u!="function"||typeof c!="function")throw TypeError("Not a function");o.resolve=u,o.reject=c}),t.chain.push(o),t.state!==0&&Rt(wr,t),o.promise},this.catch=function(i){return this.then(void 0,i)};try{e.call(void 0,function(i){Yi.call(t,i)},function(i){it.call(t,i)})}catch(r){it.call(t,r)}}var Ji=Ee({},"constructor",Me,!1);Me.prototype=Ji;Ee(Ji,"__NPO__",0,!1);Ee(Me,"resolve",function(t){var r=this;return t&&typeof t=="object"&&t.__NPO__===1?t:new r(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");n(t)})});Ee(Me,"reject",function(t){return new this(function(i,n){if(typeof i!="function"||typeof n!="function")throw TypeError("Not a function");n(t)})});Ee(Me,"all",function(t){var r=this;return Vi.call(t)!=="[object Array]"?r.reject(TypeError("Not an array")):t.length===0?r.resolve([]):new r(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");var a=t.length,u=Array(a),c=0;Xi(r,t,function(l,p){u[l]=p,++c===a&&n(u)},o)})});Ee(Me,"race",function(t){var r=this;return Vi.call(t)!=="[object Array]"?r.reject(TypeError("Not an array")):new r(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");Xi(r,t,function(u,c){n(c)},o)})});var W;typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1?W=Promise:W=Me;var nt=24*60*60*1e3,Qt=8*1e3,Wt=Array.prototype,Ko=Function.prototype,Qi=Object.prototype,Ie
vendor: 6,041 bytes, lines 31-35
31=Wt.slice,pt=Qi.toString,zt=Qi.hasOwnProperty,j=I.console,ke=I.navigator,A=I.document,St=I.opera,Nt=I.screen,he=ke.userAgent,Zt=Ko.bind,ni=Wt.forEach,oi=Wt.indexOf,si=Wt.map,Yo=Array.isArray,ur={},s={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},R={log:function(){if(le.DEBUG&&!s.isUndefined(j)&&j)try{j.log.apply(j,arguments)}catch{s.each(arguments,function(t){j.log(t)})}},warn:function(){if(le.DEBUG&&!s.isUndefined(j)&&j){var e=["Mixpanel warning:"].concat(s.toArray(arguments));try{j.warn.apply(j,e)}catch{s.each(e,function(r){j.warn(r)})}}},error:function(){if(le.DEBUG&&!s.isUndefined(j)&&j){var e=["Mixpanel error:"].concat(s.toArray(arguments));try{j.error.apply(j,e)}catch{s.each(e,function(r){j.error(r)})}}},critical:function(){if(!s.isUndefined(j)&&j){var e=["Mixpanel error:"].concat(s.toArray(arguments));try{j.error.apply(j,e)}catch{s.each(e,function(r){j.error(r)})}}}},er=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(R,arguments)}},Je=function(e){return{log:er(R.log,e),error:er(R.error,e),critical:er(R.critical,e)}},Ir=function(e){return function(){try{return e.apply(this,arguments)}catch(t){R.critical("Implementation error. Please turn on debug and contact [email protected]."),le.DEBUG&&R.critical(t)}}},Xo=function(e){var t=e.prototype;for(var r in t)typeof t[r]=="function"&&(t[r]=Ir(t[r]))};s.bind=function(e,t){var r,i;if(Zt&&e.bind===Zt)return Zt.apply(e,Ie.call(arguments,1));if(!s.isFunction(e))throw new TypeError;return r=Ie.call(arguments,2),i=function(){if(!(this instanceof i))return e.apply(t,r.concat(Ie.call(arguments)));var n={};n.prototype=e.prototype;var o=new n;n.prototype=null;var a=e.apply(o,r.concat(Ie.call(arguments)));return Object(a)===a?a:o},i};s.each=function(e,t,r){if(e!=null){if(ni&&e.forEach===ni)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,n=e.length;i<n;i++)if(i in e&&t.call(r,e[i],i,e)===ur)return}else for(var o in e)if(zt.call(e,o)&&t.call(r,e[o],o,e)===ur)return}};s.extend=function(e){return s.each(Ie.call(arguments,1),function(t){for(var r in t)t[r]!==void 0&&(e[r]=t[r])}),e};s.isArray=Yo||function(e){return pt.call(e)==="[object Array]"};s.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}};s.isArguments=function(e){return!!(e&&zt.call(e,"callee"))};s.toArray=function(e){return e?e.toArray?e.toArray():s.isArray(e)||s.isArguments(e)?Ie.call(e):s.values(e):[]};s.map=function(e,t,r){if(si&&e.map===si)return e.map(t,r);var i=[];return s.each(e,function(n){i.push(t.call(r,n))}),i};s.keys=function(e){var t=[];return e===null||s.each(e,function(r,i){t[t.length]=i}),t};s.values=function(e){var t=[];return e===null||s.each(e,function(r){t[t.length]=r}),t};s.include=function(e,t){var r=!1;return e===null?r:oi&&e.indexOf===oi?e.indexOf(t)!=-1:(s.each(e,function(i){if(r||(r=i===t))return ur}),r)};s.includes=function(e,t){return e.indexOf(t)!==-1};s.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e};s.isObject=function(e){return e===Object(e)&&!s.isArray(e)};s.isEmptyObject=function(e){if(s.isObject(e)){for(var t in e)if(zt.call(e,t))return!1;return!0}return!1};s.isUndefined=function(e){return e===void 0};s.isString=function(e){return pt.call(e)=="[object String]"};s.isDate=function(e){return pt.call(e)=="[object Date]"};s.isNumber=function(e){return pt.call(e)=="[object Number]"};s.isElement=function(e){return!!(e&&e.nodeType===1)};s.encodeDates=function(e){return s.each(e,function(t,r){s.isDate(t)?e[r]=s.formatDate(t):s.isObject(t)&&(e[r]=s.encodeDates(t))}),e};s.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};s.formatDate=function(e){function t(r){return r<10?"0"+r:r}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())};s.strip_empty_properties=function(e){var t={};return s.each(e,function(r,i){s.isString(r)&&r.length>0&&(t[i]=r)}),t};s.truncate=function(e,t){var r;return typeof e=="string"?r=e.slice(0,t):s.isArray(e)?(r=[],s.each(e,function(i){r.push(s.truncate(i,t))})):s.isObject(e)?(r={},s.each(e,function(i,n){r[n]=s.truncate(i,t)})):r=e,r};s.JSONEncode=function(){return function(e){var t=e,r=function(n){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(u){var c=a[u];return typeof c=="string"?c:"\\u"+("0000"+u.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'},i=function(n,o){var a="",u="    ",c=0,f="",l="",p=0,d=a,h=[],g=o[n];switch(g&&typeof g=="object"&&typeof g.toJSON=="function"&&(g=g.toJSON(n)),typeof g){case"string":return r(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g)return"null";if(a+=u,h=[],pt.apply(g)==="[object Array]"){for(p=g.length,c=0;c<p;c+=1)h[c]=i(c,g)||"null";return l=h.length===0?"[]":a?`[
32`+a+h.join(`,
33`+a)+`
34`+d+"]":"["+h.join(",")+"]",a=d,l}for(f in g)zt.call(g,f)&&(l=i(f,g),l&&h.push(r(f)+(a?": ":":")+l));return l=h.length===0?"{}":a?"{"+h.join(",")+d+"}":"{"+h.join(",")+"}",a=d,l}};return i("",{"":t})}}();s.JSONDecode=function(){var e,t,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
35`,r:"\r",t:"	"},i,n=function(h){var g=new SyntaxError(h);throw g.at=e,g.text=i,g},o=function(h){return h&&h!==t&&n("Expected '"+h+"' instead of '"+t+"'"),t=i.charAt(e),e+=1,t},a=function(){var h,g="";for(t==="-"&&(g="-",o("-"));t>="0"&&t<="9";)g+=t,o();if(t===".")for(g+=".";o()&&t>="0"&&t<="9";)g+=t;if(t==="e"||t==="E")for(g+=t,o(),(t==="-"||t==="+")&&(g+=t,o());t>="0"&&t<="9";)g+=t,o();if(h=+g,!isFinite(h))n("Bad number");else return h},u=function(){var h,g,_="",m;if(t==='"')for(;o();){if(t==='"')return o(),_;if(t==="\\")if(o(),t==="u"){for(m=0,g=0;g<4&&(h=parseInt(o(),16),!!isFinite(h));g+=1)m=m*16+h;_+=String.fromCharCode(m)}
35else if(typeof r[t]=="string")_+=r[t];else break;else _+=t}n("Bad string")},c=function(){for(;t&&t<=" ";)o()},f=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}n('Unexpected "'+t+'"')},l,p=function(){var h=[];if(t==="["){if(o("["),c(),t==="]")return o("]"),h;for(;t;){if(h.push(l()),c(),t==="]")return o("]"),h;o(","),c()}}n("Bad array")},d=function(){var h,g={};if(t==="{"){if(o("{"),c(),t==="}")return o("}"),g;for(;t;){if(h=u(),c(),o(":"),Object.hasOwnProperty.call(g,h)&&n('Duplicate key "'+h+'"'),g[h]=l(),c(),t==="}")return o("}"),g;o(","),c()}}n("Bad object")};return l=function(){switch(c(),t){case"{":return d();case"[":return p();case'"':return u();case"-":return a();default:return t>="0"&&t<="9"?a():f()}},function(h){var g;return i=h,e=0,t=" ",g=l(),c(),t&&n("Syntax error"),g}}();s.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,i,n,o,a,u,c,f,l=0,p=0,d="",h=[];if(!e)return e;e=s.utf8Encode(e);do r=e.charCodeAt(l++),i=e.charCodeAt(l++),n=e.charCodeAt(l++),f=r<<16|i<<8|n,o=f>>18&63,a=f>>12&63,u=f>>6&63,c=f&63,h[p++]=t.charAt(o)+t.charAt(a)+t.charAt(u)+t.charAt(c);while(l<e.length);switch(d=h.join(""),e.length%3){case 1:d=d.slice(0,-2)+"==";break;case 2:d=d.slice(0,-1)+"=";break}return d};s.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,`
36`).replace(/\r/g,`
37`);var t="",r,i,n=0,o;for(r=i=0,n=e.length,o=0;o<n;o++){var a=e.charCodeAt(o),u=null;a<128?i++:a>127&&a<2048?u=String.fromCharCode(a>>6|192,a&63|128):u=String.fromCharCode(a>>12|224,a>>6&63|128,a&63|128),u!==null&&(i>r&&(t+=e.substring(r,i)),t+=u,r=i=o+1)}return i>r&&(t+=e.substring(r,e.length)),t};s.UUID=function(){var e=function(){var i=1*new Date,n;if(I.performance&&I.performance.now)n=I.performance.now();else for(n=0;i==1*new Date;)n++;return i.toString(16)+Math.floor(n).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},r=function(){var i=he,n,o,a=[],u=0;function c(f,l){var p,d=0;for(p=0;p<l.length;p++)d|=a[p]<<p*8;return f^d}for(n=0;n<i.length;n++)o=i.charCodeAt(n),a.unshift(o&255),a.length>=4&&(u=c(u,a),a=[]);return a.length>0&&(u=c(u,a)),u.toString(16)};return function(){var i=(Nt.height*Nt.width).toString(16);return e()+"-"+t()+"-"+r()+"-"+i+"-"+e()}}();var ai=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];s.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<ai.length;t++)if(e.indexOf(ai[t])!==-1)return!0;return!1};s.HTTPBuildQuery=function(e,t){var r,i,n=[];return s.isUndefined(t)&&(t="&"),s.each(e,function(o,a){r=encodeURIComponent(o.toString()),i=encodeURIComponent(a),n[n.length]=i+"="+r}),n.join(t)};s.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var r="[\\?&]"+t+"=([^&#]*)",i=new RegExp(r),n=i.exec(e);if(n===null||n&&typeof n[1]!="string"&&n[1].length)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{R.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};s.cookie={get:function(e){for(var t=e+"=",r=A.cookie.split(";"),i=0;i<r.length;i++){for(var n=r[i];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(t)===0)return decodeURIComponent(n.substring(t.length,n.length))}return null},parse:function(e){var t;try{t=s.JSONDecode(s.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,r,i,n,o,a){var u="",c="",f="";if(a)u="; domain="+a;else if(i){var l=ci(A.location.hostname);u=l?"; domain=."+l:""}if(r){var p=new Date;p.setTime(p.getTime()+r*1e3),c="; expires="+p.toGMTString()}o&&(n=!0,f="; SameSite=None"),n&&(f+="; secure"),A.cookie=e+"="+encodeURIComponent(t)+c+"; path=/"+u+f},set:function(e,t,r,i,n,o,a){var u="",c="",f="";if(a)u="; domain="+a;else if(i){var l=ci(A.location.hostname);u=l?"; domain=."+l:""}if(r){var p=new Date;p.setTime(p.getTime()+r*24*60*60*1e3),c="; expires="+p.toGMTString()}o&&(n=!0,f="; SameSite=None"),n&&(f+="; secure");var d=e+"="+encodeURIComponent(t)+c+"; path=/"+u+f;return A.cookie=d,d},remove:function(e,t,r){s.cookie.set(e,"",-1,t,!1,!1,r)}};var tr=null,At=function(e,t){if(tr!==null&&!t)return tr;var r=!0;try{e=e||I.localStorage;var i="__mplss_"+kr(8),n="xyz";e.setItem(i,n),e.getItem(i)!==n&&(r=!1),e.removeItem(i)}catch{r=!1}return tr=r,r};s.localStorage={is_supported:function(e){var t=At(null,e);return t||R.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){R.error("localStorage error: "+e)},get:function(e){try{return I.localStorage.getItem(e)}catch(t){s.localStorage.error(t)}return null},parse:function(e){try{return s.JSONDecode(s.localStorage.get(e))||{}}catch{}return null},set:function(e,t){try{I.localStorage.setItem(e,t)}catch(r){s.localStorage.error(r)}},remove:function(e){try{I.localStorage.removeItem(e)}catch(t){s.localStorage.error(t)}}};s.register_event=function(){var e=function(i,n,o,a,u){if(!i){R.error("No valid element provided to register_event");return}if(i.addEventListener&&!a)i.addEventListener(n,o,!!u);else{var c="on"+n,f=i[c];i[c]=t(i,o,f)}};function t(i,n,o){var a=function(u){if(u=u||r(I.event),!!u){var c=!0,f,l;return s.isFunction(o)&&(f=o(u)),l=n.call(i,u),(f===!1||l===!1)&&(c=!1),c}};return a}function r(i){return i&&(i.preventDefault=r.preventDefault,i.stopPropagation=r.stopPropagation),i}return r.preventDefault=function(){this.returnValue=!1},r.stopPropagation=function(){this.cancelBubble=!0},e}();var Jo=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');s.dom_query=function(){function e(n){return n.all?n.all:n.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(n,o){var a=" "+o+" ";return(" "+n.className+" ").replace(t," ").indexOf(a)>=0}function i(n){if(!A.getElementsByTagName)return[];var o=n.split(" "),a,u,c,f,l,p,d,h,g,_,m=[A];for(p=0;p<o.length;p++){if(a=o[p].replace(/^\s+/,"").replace(/\s+$/,""),a.indexOf("#")>-1){u=a.split("#"),c=u[0];var S=u[1],w=A.getElementById(S);if(!w||c&&w.nodeName.toLowerCase()!=c)return[];m=[w];continue}if(a.indexOf(".")>-1){u=a.split("."),c=u[0];var v=u[1];for(c||(c="*"),f=[],l=0,d=0;d<m.length;d++)for(c=="*"?g=e(m[d]):g=m[d].getElementsByTagName(c),h=0;h<g.length;
vendor: 4,601 bytes, line 37
37h++)f[l++]=g[h];for(m=[],_=0,d=0;d<f.length;d++)f[d].className&&s.isString(f[d].className)&&r(f[d],v)&&(m[_++]=f[d]);continue}var b=a.match(Jo);if(b){c=b[1];var k=b[2],$=b[3],z=b[4];for(c||(c="*"),f=[],l=0,d=0;d<m.length;d++)for(c=="*"?g=e(m[d]):g=m[d].getElementsByTagName(c),h=0;h<g.length;h++)f[l++]=g[h];m=[],_=0;var L;switch($){case"=":L=function(P){return P.getAttribute(k)==z};break;case"~":L=function(P){return P.getAttribute(k).match(new RegExp("\\b"+z+"\\b"))};break;case"|":L=function(P){return P.getAttribute(k).match(new RegExp("^"+z+"-?"))};break;case"^":L=function(P){return P.getAttribute(k).indexOf(z)===0};break;case"$":L=function(P){return P.getAttribute(k).lastIndexOf(z)==P.getAttribute(k).length-z.length};break;case"*":L=function(P){return P.getAttribute(k).indexOf(z)>-1};break;default:L=function(P){return P.getAttribute(k)}}for(m=[],_=0,d=0;d<f.length;d++)L(f[d])&&(m[_++]=f[d]);continue}for(c=a,f=[],l=0,d=0;d<m.length;d++)for(g=m[d].getElementsByTagName(c),h=0;h<g.length;h++)f[l++]=g[h];m=f}return m}return function(n){return s.isElement(n)?[n]:s.isObject(n)&&!s.isUndefined(n.length)?n:i.call(this,n)}}();var Qo=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],Zo=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];s.info={campaignParams:function(e){var t="",r={};return s.each(Qo,function(i){t=s.getQueryParam(A.URL,i),t.length?r[i]=t:e!==void 0&&(r[i]=e)}),r},clickParams:function(){var e="",t={};return s.each(Zo,function(r){e=s.getQueryParam(A.URL,r),e.length&&(t[r]=e)}),t},marketingParams:function(){return s.extend(s.info.campaignParams(),s.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var t=s.info.searchEngine(e),r=t!="yahoo"?"q":"p",i={};if(t!==null){i.$search_engine=t;var n=s.getQueryParam(e,r);n.length&&(i.mp_keyword=n)}return i},browser:function(e,t,r){return t=t||"",r||s.includes(e," OPR/")?s.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":s.includes(e,"IEMobile")||s.includes(e,"WPDesktop")?"Internet Explorer Mobile":s.includes(e,"SamsungBrowser/")?"Samsung Internet":s.includes(e,"Edge")||s.includes(e,"Edg/")?"Microsoft Edge":s.includes(e,"FBIOS")?"Facebook Mobile":s.includes(e,"Chrome")?"Chrome":s.includes(e,"CriOS")?"Chrome iOS":s.includes(e,"UCWEB")||s.includes(e,"UCBrowser")?"UC Browser":s.includes(e,"FxiOS")?"Firefox iOS":s.includes(t,"Apple")?s.includes(e,"Mobile")?"Mobile Safari":"Safari":s.includes(e,"Android")?"Android Mobile":s.includes(e,"Konqueror")?"Konqueror":s.includes(e,"Firefox")?"Firefox":s.includes(e,"MSIE")||s.includes(e,"Trident/")?"Internet Explorer":s.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var i=s.info.browser(e,t,r),n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=n[i];if(o===void 0)return null;var a=e.match(o);return a?parseFloat(a[a.length-2]):null},os:function(){var e=he;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return I.location.href},properties:function(e){return typeof e!="object"&&(e={}),s.extend(s.strip_empty_properties({$os:s.info.os(),$browser:s.info.browser(he,ke.vend
vendor: 14,880 bytes, line 37
37or,St),$referrer:A.referrer,$referring_domain:s.info.referringDomain(A.referrer),$device:s.info.device(he)}),{$current_url:s.info.currentUrl(),$browser_version:s.info.browserVersion(he,ke.vendor,St),$screen_height:Nt.height,$screen_width:Nt.width,mp_lib:"web",$lib_version:le.LIB_VERSION,$insert_id:kr(),time:s.timestamp()/1e3},s.strip_empty_properties(e))},people_properties:function(){return s.extend(s.strip_empty_properties({$os:s.info.os(),$browser:s.info.browser(he,ke.vendor,St)}),{$browser_version:s.info.browserVersion(he,ke.vendor,St)})},mpPageViewProperties:function(){return s.strip_empty_properties({current_page_title:A.title,current_domain:I.location.hostname,current_url_path:I.location.pathname,current_url_protocol:I.location.protocol,current_url_search:I.location.search})}};var kr=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},es=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,ts=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,ci=function(e){var t=ts,r=e.split("."),i=r[r.length-1];(i.length>4||i==="com"||i==="org")&&(t=es);var n=e.match(t);return n?n[0]:""},rs=function(){var e=I.navigator.onLine;return s.isUndefined(e)||e},Dt=null,Lt=null;typeof JSON<"u"&&(Dt=JSON.stringify,Lt=JSON.parse);Dt=Dt||s.JSONEncode;Lt=Lt||s.JSONDecode;s.toArray=s.toArray;s.isObject=s.isObject;s.JSONEncode=s.JSONEncode;s.JSONDecode=s.JSONDecode;s.isBlockedUA=s.isBlockedUA;s.isEmptyObject=s.isEmptyObject;s.info=s.info;s.info.device=s.info.device;s.info.browser=s.info.browser;s.info.browserVersion=s.info.browserVersion;s.info.properties=s.info.properties;s.NPO=Me;var is="__mp_opt_in_out_";function ns(e,t){tn(!0,e,t)}function os(e,t){tn(!1,e,t)}function ss(e,t){return en(e,t)==="1"}function Zi(e,t){if(cs(t))return R.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r=en(e,t)==="0";return r&&R.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function Oe(e){return Mr(e,function(t){return this.get_config(t)})}function xe(e){return Mr(e,function(t){return this._get_config(t)})}function Qe(e){return Mr(e,function(t){return this._get_config(t)})}function as(e,t){t=t||{},Er(t).remove(Cr(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function Er(e){return e=e||{},e.persistenceType==="localStorage"?s.localStorage:s.cookie}function Cr(e,t){return t=t||{},(t.persistencePrefix||is)+e}function en(e,t){return Er(t).get(Cr(e,t))}function cs(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||I,r=t.navigator||{},i=!1;return s.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(n){s.includes([!0,1,"1","yes"],n)&&(i=!0)}),i}function tn(e,t,r){if(!s.isString(t)||!t.length){R.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}r=r||{},Er(r).set(Cr(t,r),e?1:0,s.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})}function Mr(e,t){return function(){var r=!1;try{var i=t.call(this,"token"),n=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),a=t.call(this,"opt_out_tracking_cookie_prefix"),u=t.call(this,"window");i&&(r=Zi(i,{ignoreDnt:n,persistenceType:o,persistencePrefix:a,window:u}))}catch(f){R.error("Unexpected error when checking tracking opt-out status: "+f)}if(!r)return e.apply(this,arguments);var c=arguments[arguments.length-1];typeof c=="function"&&c(0)}}var us=Je("lock"),rn=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||W};rn.prototype.withLock=function(e,t){var r=this.promiseImpl;return new r(s.bind(function(i,n){var o=t||new Date().getTime()+"|"+Math.random(),a=new Date().getTime(),u=this.storageKey,c=this.pollIntervalMS,f=this.timeoutMS,l=this.storage,p=u+":X",d=u+":Y",h=u+":Z",g=function(v){if(new Date().getTime()-a>f){us.error("Timeout waiting for mutex on "+u+"; clearing lock. ["+o+"]"),l.removeItem(h),l.removeItem(d),S();return}setTimeout(function(){try{v()}catch(b){n(b)}},c*(Math.random()+.1))},_=function(v,b){v()?b():g(function(){_(v,b)})},m=function(){var v=l.getItem(d);return v&&v!==o?!1:(l.setItem(d,o),l.getItem(d)===o?!0:(At(l,!0)||n(new Error("localStorage support dropped while acquiring lock")),!1))},S=function(){l.setItem(p,o),_(m,function(){if(l.getItem(p)===o){w();return}g(function(){if(l.getItem(d)!==o){S();return}_(function(){return!l.getItem(h)},w)})})},w=function(){l.setItem(h,"1");var v=function(){l.removeItem(h),l.getItem(d)===o&&l.removeItem(d),l.getItem(p)===o&&l.removeItem(p)};e().then(function(b){v(),i(b)}).catch(function(b){v(),n(b)})};try{if(At(l,!0))S();else throw new Error("localStorage support check failed")}catch(v){n(v)}},this))};var ht=function(e){this.storage=e||localStorage};ht.prototype.init=function(){return W.resolve()};ht.prototype.setItem=function(e,t){return new W(s.bind(function(r,i){try{this.storage.setItem(e,t)}catch(n){i(n)}r()},this))};ht.prototype.getItem=function(e){return new W(s.bind(function(t,r){var i;try{i=this.storage.getItem(e)}catch(n){r(n)}t(i)},this))};ht.prototype.removeItem=function(e){return new W(s.bind(function(t,r){try{this.storage.removeItem(e)}catch(i){r(i)}t()},this))};var ui=Je("batch"),ve=function(e,t){t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new ht,this.lock=new rn(e,{storage:t.sharedLockStorage||window.localStorage}),this.queueStorage.init()),this.reportError=t.errorReporter||s.bind(ui.error,ui),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1};ve.prototype.ensureInit=function(){return this.initialized?W.resolve():this.queueStorage.init().then(s.bind(function(){this.initialized=!0},this)).catch(s.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))};ve.prototype.enqueue=function(e,t){var r={id:kr(),flushAfter:new Date().getTime()+t*2,payload:e};if(this.usePersistence){var i=s.bind(function(){return this.ensureInit().then(s.bind(function(){return this.readFromStorage()},this)).then(s.bind(function(n){return n.push(r),this.saveToStorage(n)},this)).then(s.bind(function(n){return n&&this.memQueue.push(r),n},this)).catch(s.bind(function(n){return this.reportError("Error enqueueing item",n,e),!1},this))},this);return this.lock.withLock(i,this.pid).catch(s.bind(function(n){return this.reportError("Error acquiring storage lock",n),!1},this))}else return this.memQueue.push(r),W.resolve(!0)};ve.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then(s.bind(function(){return this.readFromStorage()},this)).then(s.bind(function(r){if(r.length){var i={};s.each(t,function(a){i[a.id]=!0});for(var n=0;n<r.length;n++){var o=r[n];if(new Date().getTime()>o.flushAfter&&!i[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}return t},this)):W.resolve(t)};var li=function(e,t){var r=[];return s.each(e,function(i){i.id&&!t[i.id]&&r.push(i)}),r};ve.prototype.removeItemsByID=function(e){var t={};if(s.each(e,function(i){t[i]=!0}),this.memQueue=li(this.memQueue,t),this.usePersistence){var r=s.bind(function(){return this.ensureInit().then(s.bind(function(){return this.readFromStorage()},this)).then(s.bind(function(i){return i=li(i,t),this.saveToStorage(i)},this)).then(s.bind(function(){return this.readFromStorage()},this)).then(s.bind(function(i){for(var n=0;n<i.length;n++){var o=i[n];if(o.id&&t[o.id])throw new Error("Item not removed from storage")}return!0},this)).catch(s.bind(function(i){return this.reportError("Error removing items",i,e),!1},this))},this);return this.lock.withLock(r,this.pid).catch(s.bind(function(i){return this.reportError("Error acquiring storage lock",i),At(this.queueStorage.storage,!0)?!1:r().then(s.bind(function(n){return n||this.queueStorage.removeItem(this.storageKey).then(function(){return n})},this)).catch(s.bind(function(n){return this.reportError("Error clearing queue",n),!1},this))},this))}else return W.resolve(!0)};var fi=function(e,t){var r=[];return s.each(e,function(i){var n=i.id;if(n in t){var o=t[n];o!==null&&(i.payload=o,r.push(i))}else r.push(i)}),r};ve.prototype.updatePayloads=function(e){return this.memQueue=fi(this.memQueue,e),this.usePersistence?this.lock.withLock(s.bind(function(){return this.ensureInit().then(s.bind(function(){return this.readFromStorage()},this)).then(s.bind(function(r){return r=fi(r,e),this.saveToStorage(r)},this)).catch(s.bind(function(r){return this.reportError("Error updating items",e,r),!1},this))},this),this.pid).catch(s.bind(function(t){return this.reportError("Error acquiring storage lock",t),!1},this)):W.resolve(!0)};ve.prototype.readFromStorage=function(){return this.ensureInit().then(s.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(s.bind(function(e){return e&&(e=Lt(e),s.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(s.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))};ve.prototype.saveToStorage=function(e){try{var t=Dt(e)}catch(r){return this.reportError("Error serializing queue",r),W.resolve(!1)}return this.ensureInit().then(s.bind(function(){return this.queueStorage.setItem(this.storageKey,t)},this)).then(function(){return!0}).catch(s.bind(function(r){return this.reportError("Error saving queue",r),!1},this))};ve.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(s.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):W.resolve()};var ls=10*60*1e3,ot=Je("batch"),se=function(e,t){this.errorReporter=t.errorReporter,this.queue=new ve(e,{errorReporter:s.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,usePersistence:t.usePersistence}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1};se.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)};se.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};se.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};se.prototype.clear=function(){return this.queue.clear()};se.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};se.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};se.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(s.bind(function(){this.stopped||this.flush()},this),this.flushInterval))};se.prototype.sendRequestPromise=function(e,t){return new W(s.bind(function(r){this.sendRequest(e,t,r)},this))};se.prototype.flush=function(e){if(this.requestInProgress)return ot.log("Flush: Request already in progress"),W.resolve();this.requestInProgress=!0,e=e||{};var t=this.libConfig.batch_request_timeout_ms,r=new Date().getTime(),i=this.batchSize;return this.queue.fillBatch(i).then(s.bind(function(n){var o=n.length===i,a=[],u={};if(s.each(n,function(p){var d=p.payload;if(this.beforeSendHook&&!p.orphaned&&(d=this.beforeSendHook(d)),d){d.event&&d.properties&&(d.properties=s.extend({},d.properties,{mp_sent_by_lib_version:le.LIB_VERSION}));var h=!0,g=p.id;g?(this.itemIdsSentSuccessfully[g]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:p,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[g]}),h=!1):this.reportError("[dupe] found item with no ID",{item:p}),h&&a.push(d)}u[p.id]=d},this),a.length<1)return this.requestInProgress=!1,this.resetFlush(),W.resolve();var c=s.bind(function(){return this.queue.removeItemsByID(s.map(n,function(p){return p.id})).then(s.bind(function(p){return s.each(n,s.bind(function(d){var h=d.id;h?(this.itemIdsSentSuccessfully[h]=this.itemIdsSentSuccessfully[h]||0,this.itemIdsSentSuccessfully[h]++,this.itemIdsSentSuccessfully[h]>5&&this.reportError("[dupe] item ID sent too many times",{item:d,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[h]})):this.reportError("[dupe] found item with no ID while removing",{item:d})},this)),p?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),W.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),W.resolve())},this))},this),f=s.bind(function(p){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(u);if(s.isObject(p)&&p.error==="timeout"&&new Date().getTime()-r>=t)return this.reportError("Network timeout; retrying"),this.flush();if(s.isObject(p)&&(p.httpStatusCode>=500||p.httpStatusCode===429||p.httpStatusCode<=0&&!rs()||p.error==="timeout")){var d=this.flushInterval*2;return p.retryAfter&&(d=parseInt(p.retryAfter,10)*1e3||d),d=Math.min(ls,d),this.reportError("Error; retry in "+d+" ms"),this.scheduleFlush(d),W.resolve()}else if(s.isObject(p)&&p.httpStatusCode===413)if(n.length>1){var h=Math.max(1,Math.floor(i/2));return this.batchSize=Math.min(this.batchSize,h,n.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),W.resolve()}else return this.reportError("Single-event request too large; dropping",n),this.resetBatchSize(),c();else return c()}catch(g){this.reportError("Error handling API response",g),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(l.transport="sendBeacon"),ot.log("MIXPANEL REQUEST:",a),this.sendRequestPromise(a,l).then(f)},this)).catch(s.bind(function(n){this.reportError("Error flushing request queue",n),this.resetFlush()},this))};se.prototype.reportError=function(e,t){if(ot.error.apply(ot.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(r){ot.error(r)}};var Ge=Je("recorder"),di=I.CompressionStream,fs={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},ds=new Set([pe.MouseMove,pe.MouseInteraction,pe.Scroll,pe.ViewportResize,pe.Input,pe.TouchMove,pe.MediaInteraction,pe.Drag,pe.Selection]);
37function ps(e){return e.type===Hi.IncrementalSnapshot&&ds.has(e.data.source)}var fe=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout,this._onMaxLengthReached=e.onMaxLengthReached,this._rrwebRecord=e.rrwebRecord,this.replayId=e.replayId,this._stopRecording=null,this.seqNo=0,this.replayStartTime=null,this.replayStartUrl=null,this.batchStartUrl=null,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=nt,this.recordMinMs=0;var t="__mprec_"+this.getConfig("token")+"_"+this.replayId;this.batcher=new se(t,{errorReporter:s.bind(this.reportError,this),flushOnlyOnInterval:!0,libConfig:fs,sendRequestFunc:s.bind(this.flushEventsWithOptOut,this),usePersistence:!1})};fe.prototype.getConfig=function(e){return this._mixpanel.get_config(e)};fe.prototype.get_config=function(e){return this.getConfig(e)};fe.prototype.startRecording=function(e){if(this._stopRecording!==null){Ge.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>nt&&(this.recordMaxMs=nt,Ge.critical("record_max_ms cannot be greater than "+nt+"ms. Capping value.")),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>Qt&&(this.recordMinMs=Qt,Ge.critical("record_min_ms cannot be greater than "+Qt+"ms. Capping value.")),this.replayStartTime=new Date().getTime(),this.batchStartUrl=s.info.currentUrl(),this.replayStartUrl=s.info.currentUrl(),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=s.bind(function(){clearTimeout(this.idleTimeoutId),this.idleTimeoutId=setTimeout(this._onIdleTimeout,this.getConfig("record_idle_timeout_ms"))},this),r=this.getConfig("record_block_selector");if((r===""||r===null)&&(r=void 0),this._stopRecording=this._rrwebRecord({emit:s.bind(function(i){this.batcher.enqueue(i),ps(i)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),t())},this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15}}),typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}t(),this.maxTimeoutId=setTimeout(s.bind(this._onMaxLengthReached,this),this.recordMaxMs)};fe.prototype.stopRecording=function(){if(!this.isRrwebStopped()){try{this._stopRecording()}catch(e){this.reportError("Error with rrweb stopRecording",e)}this._stopRecording=null}this.batcher.stopped?this.batcher.clear():(this.batcher.flush(),this.batcher.stop()),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId)};fe.prototype.isRrwebStopped=function(){return this._stopRecording===null};fe.prototype.flushEventsWithOptOut=function(e,t,r){this._flushEvents(e,t,r,s.bind(this._onOptOut,this))};fe.prototype._onOptOut=function(e){e===0&&this.stopRecording()};fe.prototype._sendRequest=function(e,t,r,i){var n=s.bind(function(o,a){o.status===200&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=s.info.currentUrl()),i({status:0,httpStatusCode:o.status,responseBody:a,retryAfter:o.headers.get("Retry-After")})},this);I.fetch(this.getConfig("api_host")+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:r}).then(function(o){o.json().then(function(a){n(o,a)}).catch(function(a){i({error:a})})}).catch(function(o){i({error:o,httpStatusCode:0})})};fe.prototype._flushEvents=Oe(function(e,t,r){const i=e.length;if(i>0){var n=this.replayId,o=e[0].timestamp;(this.seqNo===0||!this.replayStartTime)&&(this.seqNo!==0&&this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var a=e[i-1].timestamp-this.replayStartTime,u={$current_url:this.batchStartUrl,$lib_version:le.LIB_VERSION,batch_start_time:o/1e3,distinct_id:String(this._mixpanel.get_distinct_id()),mp_lib:"web",replay_id:n,replay_length_ms:a,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},c=s.JSONEncode(e),f=this._mixpanel.get_property("$device_id");f&&(u.$device_id=f);var l=this._mixpanel.get_property("$user_id");
37if(l&&(u.$user_id=l),di){var p=new Blob([c],{type:"application/json"}).stream(),d=p.pipeThrough(new di("gzip"));new Response(d).blob().then(s.bind(function(h){u.format="gzip",this._sendRequest(n,u,h,r)},this))}else u.format="body",this._sendRequest(n,u,c,r)}});fe.prototype.reportError=function(e,t){Ge.error.apply(Ge.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(r){Ge.error(r)}};var rr=Je("recorder"),Ze=function(e){this._mixpanel=e,this.activeRecording=null};Ze.prototype.startRecording=function(e){if(this.activeRecording&&!this.activeRecording.isRrwebStopped()){rr.log("Recording already in progress, skipping startRecording.");return}var t=s.bind(function(){rr.log("Idle timeout reached, restarting recording."),this.resetRecording()},this),r=s.bind(function(){rr.log("Max recording length reached, stopping recording."),this.resetRecording()},this);this.activeRecording=new fe({mixpanelInstance:this._mixpanel,onIdleTimeout:t,onMaxLengthReached:r,replayId:s.UUID(),rrwebRecord:dt}),this.activeRecording.startRecording(e)};Ze.prototype.stopRecording=function(){this.activeRecording&&(this.activeRecording.stopRecording(),this.activeRecording=null)};Ze.prototype.resetRecording=function(){this.stopRecording(),this.startRecording(!0)};Ze.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null};Object.defineProperty(Ze.prototype,"replayId",{get:function(){return this.getActiveReplayId()}});I.__mp_recorder=Ze;var Pt="change",ct="click",pi="hashchange",qe="mp_locationchange",hi="popstate",_i="scrollend",lr="submit",hs=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],gi=["mp-include"],fr=["mp-no-track"],mi=fr.concat(["mp-sensitive"]),_s=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],te=Je("autocapture");function dr(e){for(var t={},r=nn(e).split(" "),i=0;i<r.length;i++){var n=r[i];n&&(t[n]=!0)}return t}function nn(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function gs(e){if(e.previousElementSibling)return e.previousElementSibling;do e=e.previousSibling;while(e&&!on(e));return e}function yi(e,t,r,i,n,o){var a={$classes:nn(e).split(" "),$tag_name:e.tagName.toLowerCase()},u=e.id;u&&(a.$id=u),Or(e,t,n,o)&&s.each(_s.concat(i),function(p){if(e.hasAttribute(p)&&!r[p]){var d=e.getAttribute(p);Ut(d)&&(a["$attr-"+p]=d)}});for(var c=1,f=1,l=e;l=gs(l);)c++,l.tagName===e.tagName&&f++;return a.$nth_child=c,a.$nth_of_type=f,a}function ms(e,t){var r=t.allowElementCallback,i=t.allowSelectors||[],n=t.blockAttrs||[],o=t.blockElementCallback,a=t.blockSelectors||[],u=t.captureTextContent||!1,c=t.captureExtraAttrs||[],f={};s.each(n,function(b){f[b]=!0});var l=null,p=typeof e.target>"u"?e.srcElement:e.target;if(sn(p)&&(p=p.parentNode),bs(p,e)&&pr(p,e,r,i)&&!ir(p,e,o,a)){for(var d=[p],h=p;h.parentNode&&!_e(h,"body");)d.push(h.parentNode),h=h.parentNode;var g=[],_,m=!1;if(s.each(d,function(b){var k=Or(b,e,r,i);!f.href&&b.tagName.toLowerCase()==="a"&&(_=b.getAttribute("href"),_=k&&Ut(_)&&_),ir(b,e,o,a)&&(m=!0),g.push(yi(b,e,f,c,r,i))},this),!m){var S=A.documentElement;if(l={$event_type:e.type,$host:I.location.host,$pathname:I.location.pathname,$elements:g,$el_attr__href:_,$viewportHeight:Math.max(S.clientHeight,I.innerHeight||0),$viewportWidth:Math.max(S.clientWidth,I.innerWidth||0)},s.each(c,function(b){if(!f[b]&&p.hasAttribute(b)){var k=p.getAttribute(b);Ut(k)&&(l["$el_attr__"+b]=k)}}),u&&(w=vi(p,e,r,i),w&&w.length&&(l.$el_text=w)),e.type===ct&&(s.each(hs,function(b){b in e&&(l["$"+b]=e[b])}),p=ys(e)),u){var w=vi(p,e,r,i);w&&w.length&&(l.$el_text=w)}if(p){if(!pr(p,e,r,i)||ir(p,e,o,a))return null;var v=yi(p,e,f,c,r,i);l.$target=v,l.$el_classes=v.$classes,s.extend(l,s.strip_empty_properties({$el_id:v.$id,$el_tag_name:v.$tag_name}))}}}return l}function vi(e,t,r,i){var n="";return Or(e,t,r,i)&&e.childNodes&&e.childNodes.length&&s.each(e.childNodes,function(o){sn(o)&&o.textContent&&(n+=s.trim(o.textContent).split(/(\s+)/).filter(Ut).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),s.trim(n)}function ys(e){for(var t=e.target,r=e.composedPath(),i=0;i<r.length;i++){var n=r[i];if(_e(n,"a")||_e(n,"button")||_e(n,"input")||_e(n,"select")||n.getAttribute&&n.getAttribute("role")==="button"){t=n;break}if(n===t)break}return t}
37function pr(e,t,r,i){if(r)try{if(!r(e,t))return!1}catch(a){return te.critical("Error while checking element in allowElementCallback",a),!1}if(!i.length)return!0;for(var n=0;n<i.length;n++){var o=i[n];try{if(e.matches(o))return!0}catch(a){te.critical("Error while checking selector: "+o,a)}}return!1}function ir(e,t,r,i){var n;if(r)try{if(r(e,t))return!0}catch(u){return te.critical("Error while checking element in blockElementCallback",u),!0}if(i&&i.length)for(n=0;n<i.length;n++){var o=i[n];try{if(e.matches(o))return!0}catch(u){te.critical("Error while checking selector: "+o,u)}}var a=dr(e);for(n=0;n<fr.length;n++)if(a[fr[n]])return!0;return!1}function on(e){return e&&e.nodeType===1}function _e(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function sn(e){return e&&e.nodeType===3}function vs(){try{var e=A.createElement("div");return!!e.matches}catch{return!1}}function bs(e,t){if(!e||_e(e,"html")||!on(e))return!1;var r=e.tagName.toLowerCase();switch(r){case"form":return t.type===lr;case"input":return["button","submit"].indexOf(e.getAttribute("type"))===-1?t.type===Pt:t.type===ct;case"select":case"textarea":return t.type===Pt;default:return t.type===ct}}function Or(e,t,r,i){var n;if(!pr(e,t,r,i))return!1;for(var o=e;o.parentNode&&!_e(o,"body");o=o.parentNode){var a=dr(o);for(n=0;n<mi.length;n++)if(a[mi[n]])return!1}var u=dr(e);for(n=0;n<gi.length;n++)if(u[gi[n]])return!0;if(_e(e,"input")||_e(e,"select")||_e(e,"textarea")||e.getAttribute("contenteditable")==="true")return!1;var c=e.type||"";if(typeof c=="string")switch(c.toLowerCase()){case"hidden":return!1;case"password":return!1}var f=e.name||e.id||"";if(typeof f=="string"){var l=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(l.test(f.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function Ut(e){if(e===null||s.isUndefined(e))return!1;if(typeof e=="string"){e=s.trim(e);var t=/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/;if(t.test((e||"").replace(/[- ]/g,"")))return!1;var r=/(^\d{3}-?\d{2}-?\d{4}$)/;if(r.test(e))return!1}return!0}var an="autocapture",Ss="track_pageview",cn="full-url",ws="url-with-path-and-query-string",Is="url-with-path",ks="allow_element_callback",un="allow_selectors",ln="allow_url_regexes",fn="block_attrs",dn="block_element_callback",pn="block_selectors",hn="block_url_regexes",_n="capture_extra_attrs",gn="capture_text_content",mn="scroll_capture_all",yn="scroll_depth_percent_checkpoints",hr="click",_r="input",vn="pageview",gr="scroll",mr="submit",K={};K[un]=[];K[ln]=[];K[fn]=[];K[dn]=null;K[pn]=[];K[hn]=[];K[_n]=[];K[gn]=!1;K[mn]=!1;K[yn]=[25,50,75,100];K[hr]=!0;K[_r]=!0;K[vn]=cn;K[gr]=!0;K[mr]=!0;var Ft={$mp_autocapture:!0},Es="$mp_click",Cs="$mp_input_change",Ms="$mp_scroll",Os="$mp_submit",re=function(e){this.mp=e};re.prototype.init=function(){if(!vs()){te.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageviewTracking(),this.initClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking()};re.prototype.getFullConfig=function(){var e=this.mp.get_config(an);return e?s.isObject(e)?s.extend({},K,e):K:{}};re.prototype.getConfig=function(e){return this.getFullConfig()[e]};re.prototype.currentUrlBlocked=function(){var e,t=s.info.currentUrl(),r=this.getConfig(ln)||[];if(r.length){var i=!1;for(e=0;e<r.length;e++){var n=r[e];try{if(t.match(n)){i=!0;break}}catch(a){return te.critical("Error while checking block URL regex: "+n,a),!0}}if(!i)return!0}var o=this.getConfig(hn)||[];if(!o||!o.length)return!1;for(e=0;e<o.length;e++)try{if(t.match(o[e]))return!0}catch(a){return te.critical("Error while checking block URL regex: "+o[e],a),!0}return!1};re.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(an)?this.getConfig(vn):this.mp.get_config(Ss)};re.prototype.trackDomEvent=function(e,t){if(!this.currentUrlBlocked()){var r=ms(e,{allowElementCallback:this.getConfig(ks),allowSelectors:this.getConfig(un),blockAttrs:this.getConfig(fn),blockElementCallback:this.getConfig(dn),blockSelectors:this.getConfig(pn),captureExtraAttrs:this.getConfig(_n),captureTextContent:this.getConfig(gn)});r&&(s.extend(r,Ft),this.mp.track(t,r))}};re.prototype.initClickTracking=function(){I.removeEventListener(ct,this.listenerClick),this.getConfig(hr)&&(te.log("Initializing click tracking"),this.listenerClick=I.addEventListener(ct,(function(e){this.getConfig(hr)&&this.trackDomEvent(e,Es)}).bind(this)))};re.prototype.initInputTracking=function(){I.removeEventListener(Pt,this.listenerChange),this.getConfig(_r)&&(te.log("Initializing input tracking"),this.listenerChange=I.addEventListener(Pt,(function(e){this.getConfig(_r)&&this.trackDomEvent(e,Cs)}).bind(this)))};re.prototype.initPageviewTracking=function(){if(I.removeEventListener(hi,this.listenerPopstate),I.removeEventListener(pi,this.listenerHashchange),I.removeEventListener(qe,this.listenerLocationchange),!!this.pageviewTrackingConfig()){te.log("Initializing pageview tracking");var e="",t=!1;this.currentUrlBlocked()||(t=this.mp.track_pageview(Ft)),t&&(e=s.info.currentUrl()),this.listenerPopstate=I.addEventListener(hi,function(){I.dispatchEvent(new Event(qe))}),this.listenerHashchange=I.addEventListener(pi,function(){I.dispatchEvent(new Event(qe))});var r=I.history.pushState;typeof r=="function"&&(I.history.pushState=function(n,o,a){r.call(I.history,n,o,a),I.dispatchEvent(new Event(qe))});var i=I.history.replaceState;typeof i=="function"&&(I.history.replaceState=function(n,o,a){i.call(I.history,n,o,a),I.dispatchEvent(new Event(qe))}),this.listenerLocationchange=I.addEventListener(qe,Ir((function(){if(!this.currentUrlBlocked()){var n=s.info.currentUrl(),o=!1,a=n.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],u=this.pageviewTrackingConfig();if(u===cn?o=n!==e:u===ws?o=n.split("#")[0]!==e.split("#")[0]:u===Is&&(o=a),o){var c=this.mp.track_pageview(Ft);c&&(e=n),a&&(this.lastScrollCheckpoint=0,te.log("Path change: re-initializing scroll depth checkpoints"))}}}).bind(this)))}};re.prototype.initScrollTracking=function(){I.removeEventListener(_i,this.listenerScroll),this.getConfig(gr)&&(te.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0,this.listenerScroll=I.addEventListener(_i,Ir((function(){if(this.getConfig(gr)&&!this.currentUrlBlocked()){var e=this.getConfig(mn),t=(this.getConfig(yn)||[]).slice().sort(function(c,f){return c-f}
vendor: 10,404 bytes, line 37
37),r=I.scrollY,i=s.extend({$scroll_top:r},Ft);try{var n=A.body.scrollHeight,o=Math.round(r/(n-I.innerHeight)*100);if(i.$scroll_height=n,i.$scroll_percentage=o,o>this.lastScrollCheckpoint)for(var a=0;a<t.length;a++){var u=t[a];o>=u&&this.lastScrollCheckpoint<u&&(i.$scroll_checkpoint=u,this.lastScrollCheckpoint=u,e=!0)}}catch(c){te.critical("Error while calculating scroll percentage",c)}e&&this.mp.track(Ms,i)}}).bind(this))))};re.prototype.initSubmitTracking=function(){I.removeEventListener(lr,this.listenerSubmit),this.getConfig(mr)&&(te.log("Initializing submit tracking"),this.listenerSubmit=I.addEventListener(lr,(function(e){this.getConfig(mr)&&this.trackDomEvent(e,Os)}).bind(this)))};Xo(re);var be=function(){};be.prototype.create_properties=function(){};be.prototype.event_handler=function(){};be.prototype.after_track_handler=function(){};be.prototype.init=function(e){return this.mp=e,this};be.prototype.track=function(e,t,r,i){var n=this,o=s.dom_query(e);if(o.length===0){R.error("The DOM query ("+e+") returned 0 elements");return}return s.each(o,function(a){s.register_event(a,this.override_event,function(u){var c={},f=n.create_properties(r,this),l=n.mp.get_config("track_links_timeout");n.event_handler(u,this,c),window.setTimeout(n.track_callback(i,f,c,!0),l),n.mp.track(t,f,n.track_callback(i,f,c))})},this),!0};be.prototype.track_callback=function(e,t,r,i){i=i||!1;var n=this;return function(){r.callback_fired||(r.callback_fired=!0,!(e&&e(i,t)===!1)&&n.after_track_handler(t,r,i))}};be.prototype.create_properties=function(e,t){var r;return typeof e=="function"?r=e(t):r=s.extend({},e),r};var Ke=function(){this.override_event="click"};s.inherit(Ke,be);Ke.prototype.create_properties=function(e,t){var r=Ke.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r};Ke.prototype.event_handler=function(e,t,r){r.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",r.href=t.href,r.new_tab||e.preventDefault()};Ke.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var jt=function(){this.override_event="submit"};s.inherit(jt,be);jt.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()};jt.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var Ce="$set",Ye="$set_once",ue="$unset",Pe="$add",ge="$append",Ue="$union",ye="$remove",xs="$delete",bn={set_action:function(e,t){var r={},i={};return s.isObject(e)?s.each(e,function(n,o){this._is_reserved_property(o)||(i[o]=n)},this):i[e]=t,r[Ce]=i,r},unset_action:function(e){var t={},r=[];return s.isArray(e)||(e=[e]),s.each(e,function(i){this._is_reserved_property(i)||r.push(i)},this),t[ue]=r,t},set_once_action:function(e,t){var r={},i={};return s.isObject(e)?s.each(e,function(n,o){this._is_reserved_property(o)||(i[o]=n)},this):i[e]=t,r[Ye]=i,r},union_action:function(e,t){var r={},i={};return s.isObject(e)?s.each(e,function(n,o){this._is_reserved_property(o)||(i[o]=s.isArray(n)?n:[n])},this):i[e]=s.isArray(t)?t:[t],r[Ue]=i,r},append_action:function(e,t){var r={},i={};return s.isObject(e)?s.each(e,function(n,o){this._is_reserved_property(o)||(i[o]=n)},this):i[e]=t,r[ge]=i,r},remove_action:function(e,t){var r={},i={};return s.isObject(e)?s.each(e,function(n,o){this._is_reserved_property(o)||(i[o]=n)},this):i[e]=t,r[ye]=i,r},delete_action:function(){var e={};return e[xs]="",e}},F=function(){};s.extend(F.prototype,bn);F.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r};F.prototype.set=Qe(function(e,t,r){var i=this.set_action(e,t);return s.isObject(e)&&(r=t),this._send_request(i,r)});F.prototype.set_once=Qe(function(e,t,r){var i=this.set_once_action(e,t);return s.isObject(e)&&(r=t),this._send_request(i,r)});F.prototype.unset=Qe(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});F.prototype.union=Qe(function(e,t,r){s.isObject(e)&&(r=t);var i=this.union_action(e,t);return this._send_request(i,r)});F.prototype.delete=Qe(function(e){var t=this.delete_action();return this._send_request(t,e)});F.prototype.remove=Qe(function(e,t,r){var i=this.remove_action(e,t);return this._send_request(i,r)});F.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=s.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)};F.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};F.prototype._get_config=function(e){return this._mixpanel.get_config(e)};F.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};F.prototype.remove=F.prototype.remove;F.prototype.set=F.prototype.set;F.prototype.set_once=F.prototype.set_once;F.prototype.union=F.prototype.union;F.prototype.unset=F.prototype.unset;F.prototype.toString=F.prototype.toString;var E=function(){};s.extend(E.prototype,bn);E.prototype._init=function(e){this._mixpanel=e};E.prototype.set=xe(function(e,t,r){var i=this.set_action(e,t);return s.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),i[Ce]=s.extend({},s.info.people_properties(),i[Ce]),this._send_request(i,r)});E.prototype.set_once=xe(function(e,t,r){var i=this.set_once_action(e,t);return s.isObject(e)&&(r=t),this._send_request(i,r)});E.prototype.unset=xe(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});E.prototype.increment=xe(function(e,t,r){var i={},n={};return s.isObject(e)?(s.each(e,function(o,a){if(!this._is_reserved_property(a))if(isNaN(parseFloat(o))){R.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else n[a]=o},this),r=t):(s.isUndefined(t)&&(t=1),n[e]=t),i[Pe]=n,this._send_request(i,r)});E.prototype.append=xe(function(e,t,r){s.isObject(e)&&(r=t);var i=this.append_action(e,t);return this._send_request(i,r)});E.prototype.remove=xe(function(e,t,r){s.isObject(e)&&(r=t);var i=this.remove_action(e,t);return this._send_request(i,r)});E.prototype.union=xe(function(e,t,r){s.isObject(e)&&(r=t);var i=this.union_action(e,t);return this._send_request(i,r)});E.prototype.track_charge=xe(function(e,t,r){if(!s.isNumber(e)&&(e=parseFloat(e),isNaN(e))){R.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",s.extend({$amount:e},t),r)});E.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};E.prototype.delete_user=function(){if(!this._identify_called()){R.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};E.prototype.toString=function(){return this._mixpanel.toString()+".people"};E.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),i=this._mixpanel.get_property("$user_id"),n=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),i&&(e.$user_id=i),n&&(e.$had_persisted_distinct_id=n);var o=s.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),s.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),s.truncate(o,255))};E.prototype._get_config=function(e){return this._mixpanel.get_config(e)};E.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};E.prototype._enqueue=function(e){Ce in e?this._mixpanel.persistence._add_to_people_queue(Ce,e):Ye in e?this._mixpanel.persistence._add_to_people_queue(Ye,e):ue in e?this._mixpanel.persistence._add_to_people_queue(ue,e):Pe in e?this._mixpanel.persistence._add_to_people_queue(Pe,e):ge in e?this._mixpanel.persistence._add_to_people_queue(ge,e):ye in e?this._mixpanel.persistence._add_to_people_queue(ye,e):Ue in e?this._mixpanel.persistence._add_to_people_queue(Ue,e):R.error("Invalid call to _enqueue():",e)};E.prototype._flush_one_queue=function(e,t,r,i){var n=this,o=s.extend({},this._mixpanel.persistence.load_queue(e)),a=o;!s.isUndefined(o)&&s.isObject(o)&&!s.isEmptyObject(o)&&(n._mixpanel.persistence._pop_from_people_queue(e,o),n._mixpanel.persistence.save(),i&&(a=i(o)),t.call(n,a,function(u,c){u===0&&n._mixpanel.persistence._add_to_people_queue(e,o),s.isUndefined(r)||r(u,c)}))};E.prototype._flush=function(e,t,r,i,n,o,a){var u=this;this._flush_one_queue(Ce,this.set,e),this._flush_one_queue(Ye,this.set_once,i),this._flush_one_queue(ue,this.unset,o,function(m){return s.keys(m)}),this._flush_one_queue(Pe,this.increment,t),this._flush_one_queue(Ue,this.union,n);var c=this._mixpanel.persistence.load_queue(ge);if(!s.isUndefined(c)&&s.isArray(c)&&c.length)for(var f,l=function(m,S){m===0&&u._mixpanel.persistence._add_to_people_queue(ge,f),s.isUndefined(r)||r(m,S)},p=c.length-1;p>=0;p--)c=this._mixpanel.persistence.load_queue(ge),f=c.pop(),u._mixpanel.persistence.save(),s.isEmptyObject(f)||u.append(f,l);var d=this._mixpanel.persistence.load_queue(ye);if(!s.isUndefined(d)&&s.isArray(d)&&d.length)for(var h,g=function(m,S){m===0&&u._mixpanel.persistence._add_to_people_queue(ye,h),s.isUndefined(a)||a(m,S)},_=d.length-1;_>=0;_--)d=this._mixpanel.persistence.load_queue(ye),h=d.pop(),u._mixpanel.persistence.save(),s.isEmptyObject(h)||u.remove(h,g)};E.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};E.prototype.set=E.prototype.set;E.prototype.set_once=E.prototype.set_once;E.prototype.unset=E.prototype.unset;E.prototype.increment=E.prototype.increment;E.prototype.append=E.prototype.append;E.prototype.remove=E.prototype.remove;E.prototype.union=E.prototype.union;E.prototype.track_charge=E.prototype.track_charge;E.prototype.clear_charges=E.prototype.clear_charges;E.prototype.delete_user=E.prototype.delete_user;E.prototype.toString=E.prototype.toString;var xr="__mps",Tr="__mpso",Rr="__mpus",Nr="__mpa",Ar="__mpap",Dr="__mpr",Lr="__mpu",Sn="$people_distinct_id",qt="__al
37ias",ut="__timers",Ts=[xr,Tr,Rr,Nr,Ar,Dr,Lr,Sn,qt,ut],M=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(R.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&s.localStorage.is_supported()?this.storage=s.localStorage:this.storage=s.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};M.prototype.properties=function(){var e={};return this.load(),s.each(this.props,function(t,r){s.include(Ts,r)||(e[r]=t)}),e};M.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=s.extend({},e))}};M.prototype.upgrade=function(){var e,t;this.storage===s.localStorage?(e=s.cookie.parse(this.name),s.cookie.remove(this.name),s.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===s.cookie&&(t=s.localStorage.parse(this.name),s.localStorage.remove(this.name),t&&this.register_once(t))};M.prototype.save=function(){this.disabled||this.storage.set(this.name,s.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};M.prototype.load_prop=function(e){return this.load(),this.props[e]};M.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};M.prototype.clear=function(){this.remove(),this.props={}};M.prototype.register_once=function(e,t,r){return s.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof r>"u"?this.default_expiry:r,this.load(),s.each(e,function(i,n){(!this.props.hasOwnProperty(n)||this.props[n]===t)&&(this.props[n]=i)},this),this.save(),!0):!1};M.prototype.register=function(e,t){return s.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),s.extend(this.props,e),this.save(),!0):!1};M.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())};M.prototype.update_search_keyword=function(e){this.register(s.info.searchInfo(e))};M.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:s.info.referringDomain(e)||"$direct"},"")};M.prototype.get_referrer_info=function(){return s.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};M.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};M.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};M.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};M.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};M.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};M.prototype.get_cross_subdomain=function(){return this.cross_subdomain};M.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};M.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),i=t[e],n=this._get_or_create_queue(Ce),o=this._get_or_create_queue(Ye),a=this._get_or_create_queue(ue),u=this._get_or_create_queue(Pe),c=this._get_or_create_queue(Ue),f=this._get_or_create_queue(ye,[]),l=this._get_or_create_queue(ge,[]);r===xr?(s.extend(n,i),this._pop_from_people_queue(Pe,i),this._pop_from_people_queue(Ue,i),this._pop_from_people_queue(ue,i)):r===Tr?(s.each(i,function(p,d){d in o||(o[d]=p)}),this._pop_from_people_queue(ue,i)):r===Rr?s.each(i,function(p){s.each([n,o,u,c],function(d){p in d&&delete d[p]}),s.each(l,function(d){p in d&&delete d[p]}),a[p]=!0}):r===Nr?(s.each(i,function(p,d){d in n?n[d]+=p:(d in u||(u[d]=0),u[d]+=p)},this),this._pop_from_people_queue(ue,i)):r===Lr?(s.each(i,function(p,d){s.isArray(p)&&(d in c||(c[d]=[]),s.each(p,function(h){s.include(c[d],h)||c[d].push(h)}))}),this._pop_from_people_queue(ue,i)):r===Dr?(f.push(i),this._pop_from_people_queue(ge,i)):r===Ar&&(l.push(i),this._pop_from_people_queue(ue,i)),R.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),R.log(t),this.save()};M.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];s.isUndefined(r)||s.each(t,function(i,n){e===ge||e===ye?s.each(r,function(o){o[n]===i&&delete o[n]}):delete r[n]},this)};M.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))};M.prototype._get_queue_key=function(e){if(e===Ce)return xr;if(e===Ye)return Tr;if(e===ue)return Rr;if(e===Pe)return Nr;if(e===ge)return Ar;if(e===ye)return Dr;if(e===Ue)return Lr;R.error("Invalid queue:",e)};M.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=s.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)};M.prototype.set_event_timer=function(e,t){var r=this.load_prop(ut)||{};r[e]=t,this.props[ut]=r,this.save()};M.prototype.remove_event_timer=function(e){var t=this.load_prop(ut)||{},r=t[e];return s.isUndefined(r)||(delete this.props[ut][e],this.save()),r};var Pr,wn=function(e,t){throw new Error(e+" not available in this build.")},Y,In=0,Rs=1,Ns=function(e){return e},lt=function(){},oe="mixpanel",kn="base64",As="json",Ur="$device:",He=I.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,En=!He&&he.indexOf("MSIE")===-1&&he.indexOf("Mozilla")===-1,$t=null;ke.sendBeacon&&($t=function(){return ke.sendBeacon.apply(ke,arguments)});var Cn={track:"track/",engage:"engage/",groups:"groups/",record:"record/"},bi={api_host:"https://api-js.mixpanel.com",api_routes:Cn,api_method:"POST",api_transport:"XHR",api_payload_format:kn,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:lt,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:lt,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose
37:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video",record_canvas:!1,record_collect_fonts:!1,record_idle_timeout_ms:30*60*1e3,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:nt,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Mn=!1,y=function(){},yr=function(e,t,r){var i,n=r===oe?Y:Y[r];if(n&&Pr===In)i=n;else{if(n&&!s.isArray(n)){R.error("You have already initialized "+r);return}i=new y}if(i._cached_groups={},i._init(e,t,r),i.people=new E,i.people._init(i),!i.get_config("skip_first_touch_marketing")){var o=s.info.campaignParams(null),a={},u=!1;s.each(o,function(c,f){a["initial_"+f]=c,c&&(u=!0)}),u&&i.people.set_once(a)}return le.DEBUG=le.DEBUG||i.get_config("debug"),!s.isUndefined(n)&&s.isArray(n)&&(i._execute_array.call(i.people,n.people),i._execute_array(n)),i};y.prototype.init=function(e,t,r){if(s.isUndefined(r)){this.report_error("You must name your new library: init(token, config, name)");return}if(r===oe){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var i=yr(e,t,r);return Y[r]=i,i._loaded(),i};y.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var i={};if(!("api_payload_format"in t)){var n=t.api_host||bi.api_host;n.match(/\.mixpanel\.com/)&&(i.api_payload_format=As)}if(this.set_config(s.extend({},bi,i,t,{name:r,token:e,callback_fn:(r===oe?r:oe+"."+r)+"._jsc"})),this._jsc=lt,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!s.localStorage.is_supported(!0)||!He)this._batch_requests=!1,R.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),s.each(this.get_batcher_configs(),function(u){R.log("Clearing batch queue "+u.queue_key),s.localStorage.remove(u.queue_key)});else if(this.init_batchers(),$t&&I.addEventListener){var o=s.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);I.addEventListener("pagehide",function(u){u.persisted&&o()}),I.addEventListener("visibilitychange",function(){A.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new M(this.config),this.unpersisted_superprops={},this._gdpr_init();var a=s.UUID();this.get_distinct_id()||this.register_once({distinct_id:Ur+a,$device_id:a},""),this.autocapture=new re(this),this.autocapture.init(),this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent")&&this.start_session_recording()};y.prototype.start_session_recording=Oe(function(){if(!I.MutationObserver){R.critical("Browser does not support MutationObserver; skipping session recording");return}var e=s.bind(function(){this._recorder=this._recorder||new I.__mp_recorder(this),this._recorder.startRecording()},this);s.isUndefined(I.__mp_recorder)?wn(this.get_config("recorder_src"),e):e()});y.prototype.stop_session_recording=function(){this._recorder?this._recorder.stopRecording():R.critical("Session recorder module not loaded")};y.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e};y.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();if(t){var r=s.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")});e="https://mixpanel.com/projects/replay-redirect?"+r}return e};y.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null};y.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=s.info.campaignParams(null);s.each(e,(function(t,r){this.unregister(r)}).bind(this))}};y.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(A.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(s.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(A.referrer)};y.prototype._dom_loaded=function(){s.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||s.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};y.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Mn)return this.__dom_loaded_queue.push([e,t]),!1;var r=new e().init(this);return r.track.apply(r,t)};y.prototype._prepare_callback=function(e,t){if(s.isUndefined(e))return null;if(He){var r=function(a){e(a,t)};return r}else{var i=this._jsc,n=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+n+"]";return i[n]=function(a){delete i[n],e(a,t)},o}};y.prototype._send_request=function(e,t,r,i){var n=!0;if(En)return this.__request_queue.push(arguments),n;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose
vendor: 10,246 bytes, line 37
37:this.get_config("verbose")},a=null;!i&&(s.isFunction(r)||typeof r=="string")&&(i=r,r=null),r=s.extend(o,r||{}),He||(r.method="GET");var u=r.method==="POST",c=$t&&u&&r.transport.toLowerCase()==="sendbeacon",f=r.verbose;t.verbose&&(f=!0),this.get_config("test")&&(t.test=1),f&&(t.verbose=1),this.get_config("img")&&(t.img=1),He||(i?t.callback=i:(f||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),u&&(a="data="+encodeURIComponent(t.data),delete t.data),e+="?"+s.HTTPBuildQuery(t);var l=this;if("img"in t){var p=A.createElement("img");p.src=e,A.body.appendChild(p)}else if(c){try{n=$t(e,a)}catch(S){l.report_error(S),n=!1}try{i&&i(n?1:0)}catch(S){l.report_error(S)}}else if(He)try{var d=new XMLHttpRequest;d.open(r.method,e,!0);var h=this.get_config("xhr_headers");if(u&&(h["Content-Type"]="application/x-www-form-urlencoded"),s.each(h,function(S,w){d.setRequestHeader(w,S)}),r.timeout_ms&&typeof d.timeout<"u"){d.timeout=r.timeout_ms;var g=new Date().getTime()}d.withCredentials=!0,d.onreadystatechange=function(){if(d.readyState===4)if(d.status===200){if(i)if(f){var S;try{S=s.JSONDecode(d.responseText)}catch(b){if(l.report_error(b),r.ignore_json_errors)S=d.responseText;else return}i(S)}else i(Number(d.responseText))}else{var w;if(d.timeout&&!d.status&&new Date().getTime()-g>=d.timeout?w="timeout":w="Bad HTTP status: "+d.status+" "+d.statusText,l.report_error(w),i)if(f){var v=d.responseHeaders||{};i({status:0,httpStatusCode:d.status,error:w,retryAfter:v["Retry-After"]})}else i(0)}},d.send(a)}catch(S){l.report_error(S),n=!1}else{var _=A.createElement("script");_.type="text/javascript",_.async=!0,_.defer=!0,_.src=e;var m=A.getElementsByTagName("script")[0];m.parentNode.insertBefore(_,m)}return n};y.prototype._execute_array=function(e){var t,r=[],i=[],n=[];s.each(e,function(a){a&&(t=a[0],s.isArray(t)?n.push(a):typeof a=="function"?a.call(this):s.isArray(a)&&t==="alias"?r.push(a):s.isArray(a)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?n.push(a):i.push(a))},this);var o=function(a,u){s.each(a,function(c){if(s.isArray(c[0])){var f=u;s.each(c,function(l){f=f[l[0]].apply(f,l.slice(1))})}else this[c[0]].apply(this,c.slice(1))},u)};o(r,this),o(i,this),o(n,this)};y.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};y.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs};y.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=s.bind(function(r){return new se(r.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:s.bind(function(i,n,o){this._send_request(this.get_config("api_host")+r.endpoint,this._encode_data_for_request(i),n,this._prepare_callback(o,i))},this),beforeSendHook:s.bind(function(i){return this._run_hook("before_send_"+r.type,i)},this),stopAllBatchingFunc:s.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};y.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,s.each(this.request_batchers,function(e){e.start()}))};y.prototype.stop_batch_senders=function(){this._batch_requests=!1,s.each(this.request_batchers,function(e){e.stop(),e.clear()})};y.prototype.push=function(e){this._execute_array([e])};y.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};y.prototype._encode_data_for_request=function(e){var t=s.JSONEncode(e);return this.get_config("api_payload_format")===kn&&(t=s.base64Encode(t)),{data:t}};y.prototype._track_or_batch=function(e,t){var r=s.truncate(e.data,255),i=e.endpoint,n=e.batcher,o=e.should_send_immediately,a=e.send_request_options||{};t=t||lt;var u=!0,c=s.bind(function(){return a.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r?(R.log("MIXPANEL REQUEST:"),R.log(r),this._send_request(i,this._encode_data_for_request(r),a,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!o?n.enqueue(r).then(function(f){f?t(1,r):c()}):u=c(),u&&r};y.prototype.track=Oe(function(e,t,r,i){!i&&typeof r=="function"&&(i=r,r=null),r=r||{};var n=r.transport;n&&(r.transport=n);var o=r.send_immediately;if(typeof i!="function"&&(i=lt),s.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){i(0);return}t=s.extend({},t),t.token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!s.isUndefined(a)){var u=new Date().getTime()-a;t.$duration=parseFloat((u/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?s.info.marketingParams():{};t=s.extend({},s.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var f=this.get_config("property_blacklist");s.isArray(f)?s.each(f,function(d){delete t[d]}):this.report_error("Invalid value for property_blacklist config: "+f);var l={event:e,properties:t},p=this._track_or_batch({type:"events",data:l,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},i);return p});y.prototype.set_group=Oe(function(e,t,r){s.isArray(t)||(t=[t]);var i={};return i[e]=t,this.register(i),this.people.set(e,t,r)});y.prototype.add_group=Oe(function(e,t,r){var i=this.get_property(e),n={};return i===void 0?(n[e]=[t],this.register(n)):i.indexOf(t)===-1&&(i.push(t),n[e]=i,this.register(n)),this.people.union(e,t,r)});y.prototype.remove_group=Oe(function(e,t,r){var i=this.get_property(e);if(i!==void 0){var n=i.indexOf(t);n>-1&&(i.splice(n,1),this.register({group_key:i})),i.length===0&&this.unregister(e)}return this.people.remove(e,t,r)});y.prototype.track_with_groups=Oe(function(e,t,r,i){var n=s.extend({},t||{});return s.each(r,function(o,a){o!=null&&(n[a]=o)}),this.track(e,n,i)});y.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};y.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};y.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),i=this._cached_groups[r];return(i===void 0||i._group_key!==e||i._group_id!==t)&&(i=new F,i._init(this,e,t),this._cached_groups[r]=i),i};y.prototype.track_pageview=Oe(function(e,t){typeof e!="object"&&(e={}),t=t||{};var r=t.event_name||"$mp_web_page_view",i=s.extend(s.info.mpPageViewProperties(),s.info.campaignParams(),s.info.clickParams()),n=s.extend({},i,e);return this.track(r,n)});y.prototype.track_links=function(){return this._track_dom.call(this,Ke,arguments)};y.prototype.track_forms=function(){return this._track_dom.call(this,jt,arguments)};y.prototype.time_event=function(e){if(s.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var Ds={persistent:!0},Fr=function(e){var t;return s.isObject(e)?t=e:s.isUndefined(e)?t={}:t={days:e},s.extend({},Ds,t)};y.prototype.register=function(e,t){var r=Fr(t);r.persistent?this.persistence.register(e,r.days):s.extend(this.unpersisted_superprops,e)};y.prototype.register_once=function(e,t,r){var i=Fr(r);i.persistent?this.persistence.register_once(e,t,i.days):(typeof t>"u"&&(t="None"),s.each(e,function(n,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===t)&&(this.unpersisted_superprops[o]=n)},this))};y.prototype.unregister=function(e,t){t=Fr(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};y.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)};y.prototype.identify=function(e,t,r,i,n,o,a,u){var c=this.get_distinct_id();if(e&&c!==e){if(typeof e=="string"&&e.indexOf(Ur)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var f=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:f},"")}e!==c&&e!==this.get_property(qt)&&(this.unregister(qt),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,i,n,o,a,u),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0})};y.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=s.UUID();this.register_once({distinct_id:Ur+e,$device_id:e},"")};y.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};y.prototype.alias=function(e,t){if(e===this.get_property(Sn))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return s.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(qt,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};y.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};y.prototype.set_config=function(e){if(s.isObject(e)){s.extend(this.config,e);var t=e.batch_size;t&&s.each(this.request_batchers,function(r){r.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),le.DEBUG=le.DEBUG||this.get_config("debug"),"autocapture"in e&&this.autocapture&&this.autocapture.init()}};y.prototype.get_config=function(e){return this.config[e]};y.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Ns).apply(this,Ie.call(arguments,1
37));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t};y.prototype.get_property=function(e){return this.persistence.load_prop([e])};y.prototype.toString=function(){var e=this.get_config("name");return e!==oe&&(e=oe+"."+e),e};y.prototype._event_is_disabled=function(e){return s.isBlockedUA(he)||this._flags.disable_all_events||s.include(this.__disabled_events,e)};y.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&s.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||s.cookie.get("mp_optout"))&&(s.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};y.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()};y.prototype._gdpr_call_func=function(e,t){return t=s.extend({track:s.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),s.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};y.prototype.opt_in_tracking=function(e){e=s.extend({enable_persistence:!0},e),this._gdpr_call_func(ns,e),this._gdpr_update_persistence(e)};y.prototype.opt_out_tracking=function(e){e=s.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(os,e),this._gdpr_update_persistence(e)};y.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(ss,e)};y.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(Zi,e)};y.prototype.clear_opt_in_out_tracking=function(e){e=s.extend({enable_persistence:!0},e),this._gdpr_call_func(as,e),this._gdpr_update_persistence(e)};y.prototype.report_error=function(e,t){R.error.apply(R.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(r){R.error(r)}};y.prototype.init=y.prototype.init;y.prototype.reset=y.prototype.reset;y.prototype.disable=y.prototype.disable;y.prototype.time_event=y.prototype.time_event;y.prototype.track=y.prototype.track;y.prototype.track_links=y.prototype.track_links;y.prototype.track_forms=y.prototype.track_forms;y.prototype.track_pageview=y.prototype.track_pageview;y.prototype.register=y.prototype.register;y.prototype.register_once=y.prototype.register_once;y.prototype.unregister=y.prototype.unregister;y.prototype.identify=y.prototype.identify;y.prototype.alias=y.prototype.alias;y.prototype.name_tag=y.prototype.name_tag;y.prototype.set_config=y.prototype.set_config;y.prototype.get_config=y.prototype.get_config;y.prototype.get_property=y.prototype.get_property;y.prototype.get_distinct_id=y.prototype.get_distinct_id;y.prototype.toString=y.prototype.toString;y.prototype.opt_out_tracking=y.prototype.opt_out_tracking;y.prototype.opt_in_tracking=y.prototype.opt_in_tracking;y.prototype.has_opted_out_tracking=y.prototype.has_opted_out_tracking;y.prototype.has_opted_in_tracking=y.prototype.has_opted_in_tracking;y.prototype.clear_opt_in_out_tracking=y.prototype.clear_opt_in_out_tracking;y.prototype.get_group=y.prototype.get_group;y.prototype.set_group=y.prototype.set_group;y.prototype.add_group=y.prototype.add_group;y.prototype.remove_group=y.prototype.remove_group;y.prototype.track_with_groups=y.prototype.track_with_groups;y.prototype.start_batch_senders=y.prototype.start_batch_senders;y.prototype.stop_batch_senders=y.prototype.stop_batch_senders;y.prototype.start_session_recording=y.prototype.start_session_recording;y.prototype.stop_session_recording=y.prototype.stop_session_recording;y.prototype.get_session_recording_properties=y.prototype.get_session_recording_properties;y.prototype.get_session_replay_url=y.prototype.get_session_replay_url;y.prototype.DEFAULT_API_ROUTES=Cn;M.prototype.properties=M.prototype.properties;M.prototype.update_search_keyword=M.prototype.update_search_keyword;M.prototype.update_referrer_info=M.prototype.update_referrer_info;M.prototype.get_cross_subdomain=M.prototype.get_cross_subdomain;M.prototype.clear=M.prototype.clear;var je={},Ls=function(){s.each(je,function(e,t){t!==oe&&(Y[t]=e)}),Y._=s},Ps=function(){Y.init=function(e,t,r){if(r)return Y[r]||(Y[r]=je[r]=yr(e,t,r),Y[r]._loaded()),Y[r];var i=Y;je[oe]?i=je[oe]:e&&(i=yr(e,t,oe),i._loaded(),je[oe]=i),Y=i,Pr===Rs&&(I[oe]=Y),Ls()}},Us=function(){function e(){e.done||(e.done=!0,Mn=!0,En=!1,s.each(je,function(i){i._dom_loaded()}))}function t(){try{A.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(A.addEventListener)A.readyState==="complete"?e():A.addEventListener("DOMContentLoaded",e,!1);else if(A.attachEvent){A.attachEvent("onreadystatechange",e);var r=!1;try{r=I.frameElement===null}catch{}A.documentElement.doScroll&&r&&t()}s.register_event(I,"load",e,!0)};function Fs(e){return wn=e,Pr=In,Y=new y,Ps(),Y.init(),Us(),Y}function qs(e,t){t()}var $s=Fs(qs);const On=V.createContext(void 0);function Ys({children:e,config:t,name:r,token:i}){const n=V.useMemo(()=>r??"pager-website-mixpanel-browser",[r]),o=V.useMemo(()=>({track_pageview:!1,...t}),[t]),a=V.useMemo(()=>i?$s.init(i,o,n):void 0,[o,n,i]);return Si.jsx(On.Provider,{value:a,children:e})}const Bs=()=>{const e=V.useContext(On);if(e===null)throw new Error("useMixpanel must be used within a MixpanelContext.Provider");return e},Ws=()=>{const e=Bs();return{track:(t,r)=>{e||console.log("DEBUG :: MIXPANEL NOT INITIALIZED"),e==null||e.track(t,r)},identify:t=>{e||console.log("DEBUG :: MIXPANEL NOT INITIALIZED"),e==null||e.identify(t)},getDistinctId:()=>(e||console.log("DEBUG :: MIXPANEL NOT INITIALIZED"),e==null?void 0:e.get_distinct_id()),registerEmail:t=>{e||console.log("DEBUG :: MIXPANEL NOT INITIALIZED"),e==null||e.register({registered_email_from_contact_us:t}),e==null||e.track("Registered Email",{registered_email_from_contact_us:t})}}},wt="pagergpt_utm_data";function zs(e,t){return{...e,...t}}function js(){if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search),t={};return e.forEach((r,i)=>{i.startsWith("utm_")&&(t[i]=r)}),Object.keys(t).length>0?t:null}function Gs(){const[e,t]=V.useState({}),[r,i]=V.useState(""),[n,o]=V.useState(""),[a,u]=V.useState(""),[c,f]=V.useState(!1);V.useEffect(()=>{f(!0)},[]);function l(){return typeof document>"u"?"direct":document.referrer||"unknown"}V.useEffect(()=>{if(c)try{const m=h();let S={};const w=js()||{};let v={},b="",k="";m&&m.type==="pagergpt_utm_data"&&(S=m.utm||{},b=m.landing_page_url||"",k=m.landing_page_referrer||"",t(v),i(m.last_updated_date));const $=zs(S,w);v=$,t($),b?(p(v,b,k),o(b),u(k)):(b=window.location.href.split(/[?#]/)[0],k=l(),o(b),u(k),p(v,b,k)),console.log("UTM FINAL",{utmInternal:v,landingUrl:b,landingReferrer:k})}catch(m){console.error("UTM init error",m)}},[c]);const p=V.useCallback((m,S,w)=>{if(c)try{const v={type:"pagergpt_utm_data",utm:m,last_updated_date:new Date().toISOString(),landing_page_url:S,landing_page_referrer:w};return localStorage.setItem(wt,JSON.stringify(v)),m}catch(v){console.error("Error updating UTM data in localStorage:",v)}},[c]),d=V.useCallback((m,S,w)=>{if(c)try{const v={type:"pagergpt_utm_data",utm:m,last_updated_date:new Date().toISOString(),landing_page_url:S,landing_page_referrer:w};localStorage.setItem(wt,JSON.stringify(v))}catch(v){console.error("Error updating UTM data with landing page:",v)}},[c]),h=V.useCallback(()=>
37{if(!c)return null;const m=localStorage.getItem(wt);if(m){const S=JSON.parse(m);return S.type==="pagergpt_utm_data"?S:{type:"old_data_format",...S}}return null},[c]);V.useEffect(()=>{c&&n&&d(e,n,a||void 0)},[n,a,c,d]);const g=V.useCallback(()=>{if(c)try{localStorage.removeItem(wt),t({}),i(""),o(""),u("")}catch(m){console.error("Error clearing UTM data from localStorage:",m)}},[c]);return{storedUtm:e,lastUpdatedDate:r,landingPageUrl:n,landingPageReferrer:a,asURLParams:()=>{const m={...e};return n&&!m.utm_content&&(m.utm_content=n),a&&!m.utm_source&&(m.utm_source=a),Hs(m)},updateStoredUtm:p,clearStoredUtm:g,isClient:c}}function Hs(e){return new URLSearchParams(e).toString()}const Vs=V.createContext(void 0);function Xs({children:e,domain:t}){const r=V.useMemo(()=>({appDomain:t}),[t]);return Si.jsx(Vs.Provider,{value:r,children:e})}const Js=()=>{const{getDistinctId:e}=Ws(),{asURLParams:t,isClient:r}=Gs(),i=e(),n=i?encodeURIComponent(i):null;return[`https://calendly.com/imran-pagergpt/pagergpt-live-demo?${t()}${n?`&distinct_id=${n}`:""}`]};export{Xs as A,Ys as M,Js as a,Gs as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.