obi-sdk 0.19.13 → 0.19.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/obi-sdk.standalone.iife.js +1 -1
- package/package.json +1 -1
|
@@ -76,7 +76,7 @@ or you can use record.mirror to access the mirror instance during recording.`,Nv
|
|
|
76
76
|
`+h+"]":"["+p.join(",")+"]",s=h,l}for(u in m)Ba.call(m,u)&&(l=i(u,m),l&&p.push(t(u)+(s?": ":":")+l));return l=p.length===0?"{}":s?"{"+p.join(",")+h+"}":"{"+p.join(",")+"}",s=h,l}};return i("",{"":e})}}(),v.JSONDecode=function(){var n,e,t={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
77
77
|
`,r:"\r",t:" "},i,r=function(p){var m=new SyntaxError(p);throw m.at=n,m.text=i,m},o=function(p){return p&&p!==e&&r("Expected '"+p+"' instead of '"+e+"'"),e=i.charAt(n),n+=1,e},s=function(){var p,m="";for(e==="-"&&(m="-",o("-"));e>="0"&&e<="9";)m+=e,o();if(e===".")for(m+=".";o()&&e>="0"&&e<="9";)m+=e;if(e==="e"||e==="E")for(m+=e,o(),(e==="-"||e==="+")&&(m+=e,o());e>="0"&&e<="9";)m+=e,o();if(p=+m,!isFinite(p))r("Bad number");else return p},a=function(){var p,m,f="",g;if(e==='"')for(;o();){if(e==='"')return o(),f;if(e==="\\")if(o(),e==="u"){for(g=0,m=0;m<4&&(p=parseInt(o(),16),!!isFinite(p));m+=1)g=g*16+p;f+=String.fromCharCode(g)}else if(typeof t[e]=="string")f+=t[e];else break;else f+=e}r("Bad string")},c=function(){for(;e&&e<=" ";)o()},u=function(){switch(e){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}r('Unexpected "'+e+'"')},l,d=function(){var p=[];if(e==="["){if(o("["),c(),e==="]")return o("]"),p;for(;e;){if(p.push(l()),c(),e==="]")return o("]"),p;o(","),c()}}r("Bad array")},h=function(){var p,m={};if(e==="{"){if(o("{"),c(),e==="}")return o("}"),m;for(;e;){if(p=a(),c(),o(":"),Object.hasOwnProperty.call(m,p)&&r('Duplicate key "'+p+'"'),m[p]=l(),c(),e==="}")return o("}"),m;o(","),c()}}r("Bad object")};return l=function(){switch(c(),e){case"{":return h();case"[":return d();case'"':return a();case"-":return s();default:return e>="0"&&e<="9"?s():u()}},function(p){var m;return i=p,n=0,e=" ",m=l(),c(),e&&r("Syntax error"),m}}(),v.base64Encode=function(n){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t,i,r,o,s,a,c,u,l=0,d=0,h="",p=[];if(!n)return n;n=v.utf8Encode(n);do t=n.charCodeAt(l++),i=n.charCodeAt(l++),r=n.charCodeAt(l++),u=t<<16|i<<8|r,o=u>>18&63,s=u>>12&63,a=u>>6&63,c=u&63,p[d++]=e.charAt(o)+e.charAt(s)+e.charAt(a)+e.charAt(c);while(l<n.length);switch(h=p.join(""),n.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"=";break}return h},v.utf8Encode=function(n){n=(n+"").replace(/\r\n/g,`
|
|
78
78
|
`).replace(/\r/g,`
|
|
79
|
-
`);var e="",t,i,r=0,o;for(t=i=0,r=n.length,o=0;o<r;o++){var s=n.charCodeAt(o),a=null;s<128?i++:s>127&&s<2048?a=String.fromCharCode(s>>6|192,s&63|128):a=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),a!==null&&(i>t&&(e+=n.substring(t,i)),e+=a,t=i=o+1)}return i>t&&(e+=n.substring(t,n.length)),e},v.UUID=function(){try{return q.crypto.randomUUID()}catch{for(var n=new Array(36),e=0;e<36;e++)n[e]=Math.floor(Math.random()*16);return n[14]=4,n[19]=n[19]&=-5,n[19]=n[19]|=8,n[8]=n[13]=n[18]=n[23]="-",v.map(n,function(t){return t.toString(16)}).join("")}};var w0=["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"];v.isBlockedUA=function(n){var e;for(n=n.toLowerCase(),e=0;e<w0.length;e++)if(n.indexOf(w0[e])!==-1)return!0;return!1},v.HTTPBuildQuery=function(n,e){var t,i,r=[];return v.isUndefined(e)&&(e="&"),v.each(n,function(o,s){t=encodeURIComponent(o.toString()),i=encodeURIComponent(s),r[r.length]=i+"="+t}),r.join(e)},v.getQueryParam=function(n,e){e=e.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var t="[\\?&]"+e+"=([^&#]*)",i=new RegExp(t),r=i.exec(n);if(r===null||r&&typeof r[1]!="string"&&r[1].length)return"";var o=r[1];try{o=decodeURIComponent(o)}catch{_e.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},v.cookie={get:function(n){for(var e=n+"=",t=be.cookie.split(";"),i=0;i<t.length;i++){for(var r=t[i];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}return null},parse:function(n){var e;try{e=v.JSONDecode(v.cookie.get(n))||{}}catch{}return e},set_seconds:function(n,e,t,i,r,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(i){var l=x0(be.location.hostname);a=l?"; domain=."+l:""}if(t){var d=new Date;d.setTime(d.getTime()+t*1e3),c="; expires="+d.toGMTString()}o&&(r=!0,u="; SameSite=None"),r&&(u+="; secure"),be.cookie=n+"="+encodeURIComponent(e)+c+"; path=/"+a+u},set:function(n,e,t,i,r,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(i){var l=x0(be.location.hostname);a=l?"; domain=."+l:""}if(t){var d=new Date;d.setTime(d.getTime()+t*24*60*60*1e3),c="; expires="+d.toGMTString()}o&&(r=!0,u="; SameSite=None"),r&&(u+="; secure");var h=n+"="+encodeURIComponent(e)+c+"; path=/"+a+u;return be.cookie=h,h},remove:function(n,e,t){v.cookie.set(n,"",-1,e,!1,!1,t)}};var C0=function(n){var e=!0;try{var t="__mplss_"+Rd(8),i="xyz";n.setItem(t,i),n.getItem(t)!==i&&(e=!1),n.removeItem(t)}catch{e=!1}return e},Ed=null,Go=function(n,e){return Ed!==null&&!e?Ed:Ed=C0(n||q.localStorage)},Id=null,DR=function(n,e){return Id!==null&&!e?Id:Id=C0(n||q.sessionStorage)};function T0(n,e,t){var i=function(r){_e.error(e+" error: "+r)};return{is_supported:function(r){var o=t(n,r);return o||_e.error(e+" unsupported"),o},error:i,get:function(r){try{return n.getItem(r)}catch(o){i(o)}return null},parse:function(r){try{return v.JSONDecode(n.getItem(r))||{}}catch{}return null},set:function(r,o){try{n.setItem(r,o)}catch(s){i(s)}},remove:function(r){try{n.removeItem(r)}catch(o){i(o)}}}}v.localStorage=T0(q.localStorage,"localStorage",Go),v.sessionStorage=T0(q.sessionStorage,"sessionStorage",DR),v.register_event=function(){var n=function(i,r,o,s,a){if(!i){_e.error("No valid element provided to register_event");return}if(i.addEventListener&&!s)i.addEventListener(r,o,!!a);else{var c="on"+r,u=i[c];i[c]=e(i,o,u)}};function e(i,r,o){var s=function(a){if(a=a||t(q.event),!!a){var c=!0,u,l;return v.isFunction(o)&&(u=o(a)),l=r.call(i,a),(u===!1||l===!1)&&(c=!1),c}};return s}function t(i){return i&&(i.preventDefault=t.preventDefault,i.stopPropagation=t.stopPropagation),i}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},n}();var LR=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');v.dom_query=function(){function n(r){return r.all?r.all:r.getElementsByTagName("*")}var e=/[\t\r\n]/g;function t(r,o){var s=" "+o+" ";return(" "+r.className+" ").replace(e," ").indexOf(s)>=0}function i(r){if(!be.getElementsByTagName)return[];var o=r.split(" "),s,a,c,u,l,d,h,p,m,f,g=[be];for(d=0;d<o.length;d++){if(s=o[d].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){a=s.split("#"),c=a[0];var y=a[1],b=be.getElementById(y);if(!b||c&&b.nodeName.toLowerCase()!=c)return[];g=[b];continue}if(s.indexOf(".")>-1){a=s.split("."),c=a[0];var S=a[1];for(c||(c="*"),u=[],l=0,h=0;h<g.length;h++)for(c=="*"?m=n(g[h]):m=g[h].getElementsByTagName(c),p=0;p<m.length;p++)u[l++]=m[p];for(g=[],f=0,h=0;h<u.length;h++)u[h].className&&v.isString(u[h].className)&&t(u[h],S)&&(g[f++]=u[h]);continue}var w=s.match(LR);if(w){c=w[1];var k=w[2],C=w[3],x=w[4];for(c||(c="*"),u=[],l=0,h=0;h<g.length;h++)for(c=="*"?m=n(g[h]):m=g[h].getElementsByTagName(c),p=0;p<m.length;p++)u[l++]=m[p];g=[],f=0;var I;switch(C){case"=":I=function(P){return P.getAttribute(k)==x};break;case"~":I=function(P){return P.getAttribute(k).match(new RegExp("\\b"+x+"\\b"))};break;case"|":I=function(P){return P.getAttribute(k).match(new RegExp("^"+x+"-?"))};break;case"^":I=function(P){return P.getAttribute(k).indexOf(x)===0};break;case"$":I=function(P){return P.getAttribute(k).lastIndexOf(x)==P.getAttribute(k).length-x.length};break;case"*":I=function(P){return P.getAttribute(k).indexOf(x)>-1};break;default:I=function(P){return P.getAttribute(k)}}for(g=[],f=0,h=0;h<u.length;h++)I(u[h])&&(g[f++]=u[h]);continue}for(c=s,u=[],l=0,h=0;h<g.length;h++)for(m=g[h].getElementsByTagName(c),p=0;p<m.length;p++)u[l++]=m[p];g=u}return g}return function(r){return v.isElement(r)?[r]:v.isObject(r)&&!v.isUndefined(r.length)?r:i.call(this,r)}}();var UR=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],FR=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];v.info={campaignParams:function(n){var e="",t={};return v.each(UR,function(i){e=v.getQueryParam(be.URL,i),e.length?t[i]=e:n!==void 0&&(t[i]=n)}),t},clickParams:function(){var n="",e={};return v.each(FR,function(t){n=v.getQueryParam(be.URL,t),n.length&&(e[t]=n)}),e},marketingParams:function(){return v.extend(v.info.campaignParams(),v.info.clickParams())},searchEngine:function(n){return n.search("https?://(.*)google.([^/?]*)")===0?"google":n.search("https?://(.*)bing.com")===0?"bing":n.search("https?://(.*)yahoo.com")===0?"yahoo":n.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(n){var e=v.info.searchEngine(n),t=e!="yahoo"?"q":"p",i={};if(e!==null){i.$search_engine=e;var r=v.getQueryParam(n,t);r.length&&(i.mp_keyword=r)}return i},browser:function(n,e,t){return e=e||"",t||v.includes(n," OPR/")?v.includes(n,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":v.includes(n,"IEMobile")||v.includes(n,"WPDesktop")?"Internet Explorer Mobile":v.includes(n,"SamsungBrowser/")?"Samsung Internet":v.includes(n,"Edge")||v.includes(n,"Edg/")?"Microsoft Edge":v.includes(n,"FBIOS")?"Facebook Mobile":v.includes(n,"Whale/")?"Whale Browser":v.includes(n,"Chrome")?"Chrome":v.includes(n,"CriOS")?"Chrome iOS":v.includes(n,"UCWEB")||v.includes(n,"UCBrowser")?"UC Browser":v.includes(n,"FxiOS")?"Firefox iOS":v.includes(e,"Apple")?v.includes(n,"Mobile")?"Mobile Safari":"Safari":v.includes(n,"Android")?"Android Mobile":v.includes(n,"Konqueror")?"Konqueror":v.includes(n,"Firefox")?"Firefox":v.includes(n,"MSIE")||v.includes(n,"Trident/")?"Internet Explorer":v.includes(n,"Gecko")?"Mozilla":""},browserVersion:function(n,e,t){var i=v.info.browser(n,e,t),r={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},o=r[i];if(o===void 0)return null;var s=n.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var n=Vn;return/Windows/i.test(n)?/Phone/.test(n)||/WPDesktop/.test(n)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(n)?"iOS":/Android/.test(n)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":/Mac/i.test(n)?"Mac OS X":/Linux/.test(n)?"Linux":/CrOS/.test(n)?"Chrome OS":""},device:function(n){return/Windows Phone/i.test(n)||/WPDesktop/.test(n)?"Windows Phone":/iPad/.test(n)?"iPad":/iPod/.test(n)?"iPod Touch":/iPhone/.test(n)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":/Android/.test(n)?"Android":""},referringDomain:function(n){var e=n.split("/");return e.length>=3?e[2]:""},currentUrl:function(){return q.location.href},properties:function(n){return typeof n!="object"&&(n={}),v.extend(v.strip_empty_properties({$os:v.info.os(),$browser:v.info.browser(Vn,ui.vendor,ja),$referrer:be.referrer,$referring_domain:v.info.referringDomain(be.referrer),$device:v.info.device(Vn)}),{$current_url:v.info.currentUrl(),$browser_version:v.info.browserVersion(Vn,ui.vendor,ja),$screen_height:y0.height,$screen_width:y0.width,mp_lib:"web",$lib_version:on.LIB_VERSION,$insert_id:Rd(),time:v.timestamp()/1e3},v.strip_empty_properties(n))},people_properties:function(){return v.extend(v.strip_empty_properties({$os:v.info.os(),$browser:v.info.browser(Vn,ui.vendor,ja)}),{$browser_version:v.info.browserVersion(Vn,ui.vendor,ja)})},mpPageViewProperties:function(){return v.strip_empty_properties({current_page_title:be.title,current_domain:q.location.hostname,current_url_path:q.location.pathname,current_url_protocol:q.location.protocol,current_url_search:q.location.search})}};var BR=function(n,e){var t=null,i=[];return function(r){var o=this;return i.push(r),t||(t=new ke(function(s){setTimeout(function(){var a=n.apply(o,[i]);t=null,i=[],s(a)},e)})),t}},Rd=function(n){var e=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return n?e.substring(0,n):e},jR=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,VR=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,x0=function(n){var e=VR,t=n.split("."),i=t[t.length-1];(i.length>4||i==="com"||i==="org")&&(e=jR);var r=n.match(e);return r?r[0]:""},zR=function(){var n=q.navigator.onLine;return v.isUndefined(n)||n},li=function(){},Mr=null,Va=null;typeof JSON<"u"&&(Mr=JSON.stringify,Va=JSON.parse),Mr=Mr||v.JSONEncode,Va=Va||v.JSONDecode,v.info=v.info,v.info.browser=v.info.browser,v.info.browserVersion=v.info.browserVersion,v.info.device=v.info.device,v.info.properties=v.info.properties,v.isBlockedUA=v.isBlockedUA,v.isEmptyObject=v.isEmptyObject,v.isObject=v.isObject,v.JSONDecode=v.JSONDecode,v.JSONEncode=v.JSONEncode,v.toArray=v.toArray,v.NPO=ci;var qR="mixpanelBrowserDb",E0="mixpanelRecordingEvents",Pd="mixpanelRecordingRegistry",WR=1,GR=[E0,Pd],Sn=function(n){this.dbPromise=null,this.storeName=n};Sn.prototype._openDb=function(){return new ke(function(n,e){var t=q.indexedDB.open(qR,WR);t.onerror=function(){e(t.error)},t.onsuccess=function(){n(t.result)},t.onupgradeneeded=function(i){var r=i.target.result;GR.forEach(function(o){r.createObjectStore(o)})}})},Sn.prototype.init=function(){return q.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(n){return n instanceof q.IDBDatabase?ke.resolve():ke.reject(n)})):ke.reject("indexedDB is not supported in this browser")},Sn.prototype.makeTransaction=function(n,e){var t=this.storeName,i=function(r){return new ke(function(o,s){var a=r.transaction(t,n);a.oncomplete=function(){o(a)},a.onabort=a.onerror=function(){s(a.error)},e(a.objectStore(t))})};return this.dbPromise.then(i).catch((function(r){return r&&r.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(i)):ke.reject(r)}).bind(this))},Sn.prototype.setItem=function(n,e){return this.makeTransaction("readwrite",function(t){t.put(e,n)})},Sn.prototype.getItem=function(n){var e;return this.makeTransaction("readonly",function(t){e=t.get(n)}).then(function(){return e.result})},Sn.prototype.removeItem=function(n){return this.makeTransaction("readwrite",function(e){e.delete(n)})},Sn.prototype.getAll=function(){var n;return this.makeTransaction("readonly",function(e){n=e.getAll()}).then(function(){return n.result})};var $R="__mp_opt_in_out_";function HR(n,e){P0(!0,n,e)}function KR(n,e){P0(!1,n,e)}function YR(n,e){return R0(n,e)==="1"}function I0(n,e){if(JR(e))return _e.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 t=R0(n,e)==="0";return t&&_e.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),t}function di(n){return Md(n,function(e){return this.get_config(e)})}function hi(n){return Md(n,function(e){return this._get_config(e)})}function Nr(n){return Md(n,function(e){return this._get_config(e)})}function XR(n,e){e=e||{},Od(e).remove(Ad(n,e),!!e.crossSubdomainCookie,e.cookieDomain)}function Od(n){return n=n||{},n.persistenceType==="localStorage"?v.localStorage:v.cookie}function Ad(n,e){return e=e||{},(e.persistencePrefix||$R)+n}function R0(n,e){return Od(e).get(Ad(n,e))}function JR(n){if(n&&n.ignoreDnt)return!1;var e=n&&n.window||q,t=e.navigator||{},i=!1;return v.each([t.doNotTrack,t.msDoNotTrack,e.doNotTrack],function(r){v.includes([!0,1,"1","yes"],r)&&(i=!0)}),i}function P0(n,e,t){if(!v.isString(e)||!e.length){_e.error("gdpr."+(n?"optIn":"optOut")+" called with an invalid token");return}t=t||{},Od(t).set(Ad(e,t),n?1:0,v.isNumber(t.cookieExpiration)?t.cookieExpiration:null,!!t.crossSubdomainCookie,!!t.secureCookie,!!t.crossSiteCookie,t.cookieDomain),t.track&&n&&t.track(t.trackEventName||"$opt_in",t.trackProperties,{send_immediately:!0})}function Md(n,e){return function(){var t=!1;try{var i=e.call(this,"token"),r=e.call(this,"ignore_dnt"),o=e.call(this,"opt_out_tracking_persistence_type"),s=e.call(this,"opt_out_tracking_cookie_prefix"),a=e.call(this,"window");i&&(t=I0(i,{ignoreDnt:r,persistenceType:o,persistencePrefix:s,window:a}))}catch(u){_e.error("Unexpected error when checking tracking opt-out status: "+u)}if(!t)return n.apply(this,arguments);var c=arguments[arguments.length-1];typeof c=="function"&&c(0)}}var ZR=Gi("lock"),O0=function(n,e){e=e||{},this.storageKey=n,this.storage=e.storage||q.localStorage,this.pollIntervalMS=e.pollIntervalMS||100,this.timeoutMS=e.timeoutMS||2e3,this.promiseImpl=e.promiseImpl||ke};O0.prototype.withLock=function(n,e){var t=this.promiseImpl;return new t(v.bind(function(i,r){var o=e||new Date().getTime()+"|"+Math.random(),s=new Date().getTime(),a=this.storageKey,c=this.pollIntervalMS,u=this.timeoutMS,l=this.storage,d=a+":X",h=a+":Y",p=a+":Z",m=function(S){if(new Date().getTime()-s>u){ZR.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+o+"]"),l.removeItem(p),l.removeItem(h),y();return}setTimeout(function(){try{S()}catch(w){r(w)}},c*(Math.random()+.1))},f=function(S,w){S()?w():m(function(){f(S,w)})},g=function(){var S=l.getItem(h);return S&&S!==o?!1:(l.setItem(h,o),l.getItem(h)===o?!0:(Go(l,!0)||r(new Error("localStorage support dropped while acquiring lock")),!1))},y=function(){l.setItem(d,o),f(g,function(){if(l.getItem(d)===o){b();return}m(function(){if(l.getItem(h)!==o){y();return}f(function(){return!l.getItem(p)},b)})})},b=function(){l.setItem(p,"1");var S=function(){l.removeItem(p),l.getItem(h)===o&&l.removeItem(h),l.getItem(d)===o&&l.removeItem(d)};n().then(function(w){S(),i(w)}).catch(function(w){S(),r(w)})};try{if(Go(l,!0))y();else throw new Error("localStorage support check failed")}catch(S){r(S)}},this))};var $o=function(n){this.storage=n||q.localStorage};$o.prototype.init=function(){return ke.resolve()},$o.prototype.setItem=function(n,e){return new ke(v.bind(function(t,i){try{this.storage.setItem(n,Mr(e))}catch(r){i(r)}t()},this))},$o.prototype.getItem=function(n){return new ke(v.bind(function(e,t){var i;try{i=Va(this.storage.getItem(n))}catch(r){t(r)}e(i)},this))},$o.prototype.removeItem=function(n){return new ke(v.bind(function(e,t){try{this.storage.removeItem(n)}catch(i){t(i)}e()},this))};var A0=Gi("batch"),wn=function(n,e){e=e||{},this.storageKey=n,this.usePersistence=e.usePersistence,this.usePersistence&&(this.queueStorage=e.queueStorage||new $o,this.lock=new O0(n,{storage:e.sharedLockStorage||q.localStorage,timeoutMS:e.sharedLockTimeoutMS})),this.reportError=e.errorReporter||v.bind(A0.error,A0),this.pid=e.pid||null,this.memQueue=[],this.initialized=!1,e.enqueueThrottleMs?this.enqueuePersisted=BR(v.bind(this._enqueuePersisted,this),e.enqueueThrottleMs):this.enqueuePersisted=v.bind(function(t){return this._enqueuePersisted([t])},this)};wn.prototype.ensureInit=function(){return this.initialized?ke.resolve():this.queueStorage.init().then(v.bind(function(){this.initialized=!0},this)).catch(v.bind(function(n){this.reportError("Error initializing queue persistence. Disabling persistence",n),this.initialized=!0,this.usePersistence=!1},this))},wn.prototype.enqueue=function(n,e){var t={id:Rd(),flushAfter:new Date().getTime()+e*2,payload:n};return this.usePersistence?this.enqueuePersisted(t):(this.memQueue.push(t),ke.resolve(!0))},wn.prototype._enqueuePersisted=function(n){var e=v.bind(function(){return this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(t){return this.saveToStorage(t.concat(n))},this)).then(v.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(n)),t},this)).catch(v.bind(function(t){return this.reportError("Error enqueueing items",t,n),!1},this))},this);return this.lock.withLock(e,this.pid).catch(v.bind(function(t){return this.reportError("Error acquiring storage lock",t),!1},this))},wn.prototype.fillBatch=function(n){var e=this.memQueue.slice(0,n);return this.usePersistence&&e.length<n?this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(t){if(t.length){var i={};v.each(e,function(s){i[s.id]=!0});for(var r=0;r<t.length;r++){var o=t[r];if(new Date().getTime()>o.flushAfter&&!i[o.id]&&(o.orphaned=!0,e.push(o),e.length>=n))break}}return e},this)):ke.resolve(e)};var M0=function(n,e){var t=[];return v.each(n,function(i){i.id&&!e[i.id]&&t.push(i)}),t};wn.prototype.removeItemsByID=function(n){var e={};if(v.each(n,function(i){e[i]=!0}),this.memQueue=M0(this.memQueue,e),this.usePersistence){var t=v.bind(function(){return this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(i){return i=M0(i,e),this.saveToStorage(i)},this)).then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(i){for(var r=0;r<i.length;r++){var o=i[r];if(o.id&&e[o.id])throw new Error("Item not removed from storage")}return!0},this)).catch(v.bind(function(i){return this.reportError("Error removing items",i,n),!1},this))},this);return this.lock.withLock(t,this.pid).catch(v.bind(function(i){return this.reportError("Error acquiring storage lock",i),Go(this.lock.storage,!0)?!1:t().then(v.bind(function(r){return r||this.queueStorage.removeItem(this.storageKey).then(function(){return r})},this)).catch(v.bind(function(r){return this.reportError("Error clearing queue",r),!1},this))},this))}else return ke.resolve(!0)};var N0=function(n,e){var t=[];return v.each(n,function(i){var r=i.id;if(r in e){var o=e[r];o!==null&&(i.payload=o,t.push(i))}else t.push(i)}),t};wn.prototype.updatePayloads=function(n){return this.memQueue=N0(this.memQueue,n),this.usePersistence?this.lock.withLock(v.bind(function(){return this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(e){return e=N0(e,n),this.saveToStorage(e)},this)).catch(v.bind(function(e){return this.reportError("Error updating items",n,e),!1},this))},this),this.pid).catch(v.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this)):ke.resolve(!0)},wn.prototype.readFromStorage=function(){return this.ensureInit().then(v.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(v.bind(function(n){return n&&(v.isArray(n)||(this.reportError("Invalid storage entry:",n),n=null)),n||[]},this)).catch(v.bind(function(n){return this.reportError("Error retrieving queue",n),[]},this))},wn.prototype.saveToStorage=function(n){return this.ensureInit().then(v.bind(function(){return this.queueStorage.setItem(this.storageKey,n)},this)).then(function(){return!0}).catch(v.bind(function(e){return this.reportError("Error saving queue",e),!1},this))},wn.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(v.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):ke.resolve()};var QR=10*60*1e3,Ho=Gi("batch"),Kt=function(n,e){this.errorReporter=e.errorReporter,this.queue=new wn(n,{errorReporter:v.bind(this.reportError,this),queueStorage:e.queueStorage,sharedLockStorage:e.sharedLockStorage,sharedLockTimeoutMS:e.sharedLockTimeoutMS,usePersistence:e.usePersistence,enqueueThrottleMs:e.enqueueThrottleMs}),this.libConfig=e.libConfig,this.sendRequest=e.sendRequestFunc,this.beforeSendHook=e.beforeSendHook,this.stopAllBatching=e.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=e.flushOnlyOnInterval||!1,this._flushPromise=null};Kt.prototype.enqueue=function(n){return this.queue.enqueue(n,this.flushInterval)},Kt.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},Kt.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},Kt.prototype.clear=function(){return this.queue.clear()},Kt.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},Kt.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},Kt.prototype.scheduleFlush=function(n){this.flushInterval=n,this.stopped||(this.timeoutID=setTimeout(v.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))},Kt.prototype.sendRequestPromise=function(n,e){return new ke(v.bind(function(t){this.sendRequest(n,e,t)},this))},Kt.prototype.flush=function(n){if(this.requestInProgress)return Ho.log("Flush: Request already in progress"),ke.resolve();this.requestInProgress=!0,n=n||{};var e=this.libConfig.batch_request_timeout_ms,t=new Date().getTime(),i=this.batchSize;return this.queue.fillBatch(i).then(v.bind(function(r){var o=r.length===i,s=[],a={};if(v.each(r,function(d){var h=d.payload;if(this.beforeSendHook&&!d.orphaned&&(h=this.beforeSendHook(h)),h){h.event&&h.properties&&(h.properties=v.extend({},h.properties,{mp_sent_by_lib_version:on.LIB_VERSION}));var p=!0,m=d.id;m?(this.itemIdsSentSuccessfully[m]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:d,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[m]}),p=!1):this.reportError("[dupe] found item with no ID",{item:d}),p&&s.push(h)}a[d.id]=h},this),s.length<1)return this.requestInProgress=!1,this.resetFlush(),ke.resolve();var c=v.bind(function(){return this.queue.removeItemsByID(v.map(r,function(d){return d.id})).then(v.bind(function(d){return v.each(r,v.bind(function(h){var p=h.id;p?(this.itemIdsSentSuccessfully[p]=this.itemIdsSentSuccessfully[p]||0,this.itemIdsSentSuccessfully[p]++,this.itemIdsSentSuccessfully[p]>5&&this.reportError("[dupe] item ID sent too many times",{item:h,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[p]})):this.reportError("[dupe] found item with no ID while removing",{item:h})},this)),d?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),ke.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),ke.resolve())},this))},this),u=v.bind(function(d){this.requestInProgress=!1;try{if(n.unloading)return this.queue.updatePayloads(a);if(v.isObject(d)&&d.error==="timeout"&&new Date().getTime()-t>=e)return this.reportError("Network timeout; retrying"),this.flush();if(v.isObject(d)&&(d.httpStatusCode>=500||d.httpStatusCode===429||d.httpStatusCode<=0&&!zR()||d.error==="timeout")){var h=this.flushInterval*2;return d.retryAfter&&(h=parseInt(d.retryAfter,10)*1e3||h),h=Math.min(QR,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h),ke.resolve()}else if(v.isObject(d)&&d.httpStatusCode===413)if(r.length>1){var p=Math.max(1,Math.floor(i/2));return this.batchSize=Math.min(this.batchSize,p,r.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),ke.resolve()}else return this.reportError("Single-event request too large; dropping",r),this.resetBatchSize(),c();else return c()}catch(m){this.reportError("Error handling API response",m),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:e};return n.unloading&&(l.transport="sendBeacon"),Ho.log("MIXPANEL REQUEST:",s),this.sendRequestPromise(s,l).then(u)},this)).catch(v.bind(function(r){this.reportError("Error flushing request queue",r),this.resetFlush()},this))},Kt.prototype.reportError=function(n,e){if(Ho.error.apply(Ho.error,arguments),this.errorReporter)try{e instanceof Error||(e=new Error(n)),this.errorReporter(n,e)}catch(t){Ho.error(t)}};var Nd=function(n){var e=Date.now();return!n||e>n.maxExpires||e>n.idleExpires},eP=250,Dr=Gi("recorder"),D0=q.CompressionStream,tP={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},nP=new Set([Q.MouseMove,Q.MouseInteraction,Q.Scroll,Q.ViewportResize,Q.Input,Q.TouchMove,Q.MediaInteraction,Q.Drag,Q.Selection]);function iP(n){return n.type===ce.IncrementalSnapshot&&nP.has(n.data.source)}var gt=function(n){this._mixpanel=n.mixpanelInstance,this._onIdleTimeout=n.onIdleTimeout||li,this._onMaxLengthReached=n.onMaxLengthReached||li,this._onBatchSent=n.onBatchSent||li,this._rrwebRecord=n.rrwebRecord||null,this._stopRecording=null,this.replayId=n.replayId,this.batchStartUrl=n.batchStartUrl||null,this.replayStartUrl=n.replayStartUrl||null,this.idleExpires=n.idleExpires||null,this.maxExpires=n.maxExpires||null,this.replayStartTime=n.replayStartTime||null,this.seqNo=n.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=qo,this.recordMinMs=0;var e=Go(n.sharedLockStorage,!0);this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new Sn(E0),this.batcher=new Kt(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:tP,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:n.sharedLockStorage,usePersistence:e,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:eP,sharedLockTimeoutMS:10*1e3})};gt.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var n={distinct_id:String(this._mixpanel.get_distinct_id())},e=this._mixpanel.get_property("$device_id");e&&(n.$device_id=e);var t=this._mixpanel.get_property("$user_id");return t&&(n.$user_id=t),n},gt.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.batcher.flush().then((function(){return this.queueStorage.removeItem(this.batcherKey)}).bind(this))},gt.prototype.getConfig=function(n){return this._mixpanel.get_config(n)},gt.prototype.get_config=function(n){return this.getConfig(n)},gt.prototype.startRecording=function(n){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){Dr.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>qo&&(this.recordMaxMs=qo,Dr.critical("record_max_ms cannot be greater than "+qo+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>Sd&&(this.recordMinMs=Sd,Dr.critical("record_min_ms cannot be greater than "+Sd+"ms. Capping value.")),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=v.info.currentUrl(),this.replayStartUrl=v.info.currentUrl()),n||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var e=(function(){clearTimeout(this.idleTimeoutId);var r=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,r),this.idleExpires=new Date().getTime()+r}).bind(this);e();var t=this.getConfig("record_block_selector");(t===""||t===null)&&(t=void 0);try{this._stopRecording=this._rrwebRecord({emit:(function(r){if(this.idleExpires&&this.idleExpires<r.timestamp){this._onIdleTimeout();return}iP(r)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),e()),this.__enqueuePromise=this.batcher.enqueue(r)}).bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:t,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}})}catch(r){this.reportError("Unexpected error when starting rrweb recording.",r)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var i=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),i)},gt.prototype.stopRecording=function(n){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(t){this.reportError("Error with rrweb stopRecording",t)}this._stopRecording=null}var e;return this.batcher.stopped?e=this.batcher.clear():n||(e=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),e},gt.prototype.isRrwebStopped=function(){return this._stopRecording===null},gt.prototype.flushEventsWithOptOut=function(n,e,t){var i=(function(r){r===0&&(this.stopRecording(),t({error:"Tracking has been opted out, stopping recording."}))}).bind(this);this._flushEvents(n,e,t,i)},gt.prototype.serialize=function(){var n;try{n=this._mixpanel.get_tab_id()}catch(e){this.reportError("Error getting tab ID for serialization ",e),n=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:n}},gt.deserialize=function(n,e){var t=new gt(v.extend({},e,{replayId:n.replayId,batchStartUrl:n.batchStartUrl,replayStartUrl:n.replayStartUrl,idleExpires:n.idleExpires,maxExpires:n.maxExpires,replayStartTime:n.replayStartTime,seqNo:n.seqNo,sharedLockStorage:e.sharedLockStorage}));return t},gt.prototype._sendRequest=function(n,e,t,i){var r=(function(s,a){s.status===200&&this.replayId===n&&(this.seqNo++,this.batchStartUrl=v.info.currentUrl()),this._onBatchSent(),i({status:0,httpStatusCode:s.status,responseBody:a,retryAfter:s.headers.get("Retry-After")})}).bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");q.fetch(o+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(e),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:t}).then(function(s){s.json().then(function(a){r(s,a)}).catch(function(a){i({error:a})})}).catch(function(s){i({error:s,httpStatusCode:0})})},gt.prototype._flushEvents=di(function(n,e,t){var i=n.length;if(i>0){for(var r=this.replayId,o=1/0,s=-1/0,a=!1,c=0;c<i;c++)o=Math.min(o,n[c].timestamp),s=Math.max(s,n[c].timestamp),n[c].type===ce.FullSnapshot&&(a=!0);if(this.seqNo===0){if(!a){t({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var u=s-this.replayStartTime,l={$current_url:this.batchStartUrl,$lib_version:on.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:r,replay_length_ms:u,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},d=JSON.stringify(n);if(Object.assign(l,this.getUserIdInfo()),D0){var h=new Blob([d],{type:"application/json"}).stream(),p=h.pipeThrough(new D0("gzip"));new Response(p).blob().then((function(m){l.format="gzip",this._sendRequest(r,l,m,t)}).bind(this))}else l.format="body",this._sendRequest(r,l,d,t)}}),gt.prototype.reportError=function(n,e){Dr.error.apply(Dr.error,arguments);try{!e&&!(n instanceof Error)&&(n=new Error(n)),this.getConfig("error_reporter")(n,e)}catch(t){Dr.error(t)}};var Lr=function(n){this.idb=new Sn(Pd),this.errorReporter=n.errorReporter,this.mixpanelInstance=n.mixpanelInstance,this.sharedLockStorage=n.sharedLockStorage};Lr.prototype.handleError=function(n){this.errorReporter("IndexedDB error: ",n)},Lr.prototype.setActiveRecording=function(n){var e=n.tabId;return e?this.idb.init().then((function(){return this.idb.setItem(e,n)}).bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),ke.resolve())},Lr.prototype.getActiveRecording=function(){return this.idb.init().then((function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}).bind(this)).then((function(n){return Nd(n)?null:n}).bind(this)).catch(this.handleError.bind(this))},Lr.prototype.clearActiveRecording=function(){return this.getActiveRecording().then((function(n){if(n)return n.maxExpires=0,this.setActiveRecording(n)}).bind(this)).catch(this.handleError.bind(this))},Lr.prototype.flushInactiveRecordings=function(){return this.idb.init().then((function(){return this.idb.getAll()}).bind(this)).then((function(n){var e=n.filter(function(t){return Nd(t)}).map((function(t){var i=gt.deserialize(t,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return i.unloadPersistedData().then((function(){return this.idb.removeItem(t.tabId)}).bind(this)).catch(this.handleError.bind(this))}).bind(this));return ke.all(e)}).bind(this)).catch(this.handleError.bind(this))};var Ko=Gi("recorder"),zn=function(n,e,t){this.mixpanelInstance=n,this.rrwebRecord=e||si,this.sharedLockStorage=t,this.recordingRegistry=new Lr({mixpanelInstance:this.mixpanelInstance,errorReporter:Ko.error,sharedLockStorage:t}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};zn.prototype.startRecording=function(n){if(n=n||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){Ko.log("Recording already in progress, skipping startRecording.");return}var e=(function(){Ko.log("Idle timeout reached, restarting recording."),this.resetRecording()}).bind(this),t=(function(){Ko.log("Max recording length reached, stopping recording."),this.resetRecording()}).bind(this),i=(function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}).bind(this),r={mixpanelInstance:this.mixpanelInstance,onBatchSent:i,onIdleTimeout:e,onMaxLengthReached:t,replayId:v.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return n.activeSerializedRecording?this.activeRecording=gt.deserialize(n.activeSerializedRecording,r):this.activeRecording=new gt(r),this.activeRecording.startRecording(n.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())},zn.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then((function(){return this.recordingRegistry.clearActiveRecording()}).bind(this)).then((function(){this.stopRecordingInProgress=!1}).bind(this))},zn.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},zn.prototype._stopCurrentRecording=function(n,e){if(this.activeRecording){var t=this.activeRecording.stopRecording(n);return e&&(this.activeRecording=null),t}return ke.resolve()},zn.prototype.resumeRecording=function(n){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),ke.resolve(null)):this.recordingRegistry.getActiveRecording().then((function(e){return e&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:e}):n?this.startRecording({shouldStopBatcher:!1}):(Ko.log("No resumable recording found."),null)}).bind(this))},zn.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},zn.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null},Object.defineProperty(zn.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),q.__mp_recorder=zn;var za="change",$i="click",L0="hashchange",Ur="mp_locationchange",U0="popstate",F0="scrollend",Dd="submit",rP=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],B0=["mp-include"],Ld=["mp-no-track"],j0=Ld.concat(["mp-sensitive"]),oP=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],Pt=Gi("autocapture");function Ud(n){for(var e={},t=V0(n).split(" "),i=0;i<t.length;i++){var r=t[i];r&&(e[r]=!0)}return e}function V0(n){switch(typeof n.className){case"string":return n.className;case"object":return n.className.baseVal||n.getAttribute("class")||"";default:return""}}function sP(n){if(n.previousElementSibling)return n.previousElementSibling;do n=n.previousSibling;while(n&&!W0(n));return n}function z0(n,e,t,i,r,o){var s={$classes:V0(n).split(" "),$tag_name:n.tagName.toLowerCase()},a=n.id;a&&(s.$id=a),jd(n,e,r,o)&&v.each(oP.concat(i),function(d){if(n.hasAttribute(d)&&!t[d]){var h=n.getAttribute(d);qa(h)&&(s["$attr-"+d]=h)}});for(var c=1,u=1,l=n;l=sP(l);)c++,l.tagName===n.tagName&&u++;return s.$nth_child=c,s.$nth_of_type=u,s}function aP(n,e){var t=e.allowElementCallback,i=e.allowSelectors||[],r=e.blockAttrs||[],o=e.blockElementCallback,s=e.blockSelectors||[],a=e.captureTextContent||!1,c=e.captureExtraAttrs||[],u=e.capturedForHeatMap||!1,l={};v.each(r,function(k){l[k]=!0});var d=null,h=typeof n.target>"u"?n.srcElement:n.target;if(G0(h)&&(h=h.parentNode),lP(h,n)&&Fd(h,n,t,i)&&!Bd(h,n,o,s)){for(var p=[h],m=h;m.parentNode&&!Cn(m,"body");)p.push(m.parentNode),m=m.parentNode;var f=[],g,y=!1;if(v.each(p,function(k){var C=jd(k,n,t,i);!l.href&&k.tagName.toLowerCase()==="a"&&(g=k.getAttribute("href"),g=C&&qa(g)&&g),Bd(k,n,o,s)&&(y=!0),f.push(z0(k,n,l,c,t,i))},this),!y){var b=be.documentElement;if(d={$event_type:n.type,$host:q.location.host,$pathname:q.location.pathname,$elements:f,$el_attr__href:g,$viewportHeight:Math.max(b.clientHeight,q.innerHeight||0),$viewportWidth:Math.max(b.clientWidth,q.innerWidth||0),$pageHeight:be.body.offsetHeight||0,$pageWidth:be.body.offsetWidth||0},v.each(c,function(k){if(!l[k]&&h.hasAttribute(k)){var C=h.getAttribute(k);qa(C)&&(d["$el_attr__"+k]=C)}}),a&&(S=q0(h,n,t,i),S&&S.length&&(d.$el_text=S)),n.type===$i&&(v.each(rP,function(k){k in n&&(d["$"+k]=n[k])}),u&&(d.$captured_for_heatmap=!0),h=cP(n)),a){var S=q0(h,n,t,i);S&&S.length&&(d.$el_text=S)}if(h){if(!Fd(h,n,t,i)||Bd(h,n,o,s))return null;var w=z0(h,n,l,c,t,i);d.$target=w,d.$el_classes=w.$classes,v.extend(d,v.strip_empty_properties({$el_id:w.$id,$el_tag_name:w.$tag_name}))}}}return d}function q0(n,e,t,i){var r="";return jd(n,e,t,i)&&n.childNodes&&n.childNodes.length&&v.each(n.childNodes,function(o){G0(o)&&o.textContent&&(r+=v.trim(o.textContent).split(/(\s+)/).filter(qa).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),v.trim(r)}function cP(n){for(var e=n.target,t=n.composedPath(),i=0;i<t.length;i++){var r=t[i];if(Cn(r,"a")||Cn(r,"button")||Cn(r,"input")||Cn(r,"select")||r.getAttribute&&r.getAttribute("role")==="button"){e=r;break}if(r===e)break}return e}function Fd(n,e,t,i){if(t)try{if(!t(n,e))return!1}catch(s){return Pt.critical("Error while checking element in allowElementCallback",s),!1}if(!i.length)return!0;for(var r=0;r<i.length;r++){var o=i[r];try{if(n.matches(o))return!0}catch(s){Pt.critical("Error while checking selector: "+o,s)}}return!1}function Bd(n,e,t,i){var r;if(t)try{if(t(n,e))return!0}catch(a){return Pt.critical("Error while checking element in blockElementCallback",a),!0}if(i&&i.length)for(r=0;r<i.length;r++){var o=i[r];try{if(n.matches(o))return!0}catch(a){Pt.critical("Error while checking selector: "+o,a)}}var s=Ud(n);for(r=0;r<Ld.length;r++)if(s[Ld[r]])return!0;return!1}function W0(n){return n&&n.nodeType===1}function Cn(n,e){return n&&n.tagName&&n.tagName.toLowerCase()===e.toLowerCase()}function G0(n){return n&&n.nodeType===3}function uP(){try{var n=be.createElement("div");return!!n.matches}catch{return!1}}function lP(n,e){if(!n||Cn(n,"html")||!W0(n))return!1;var t=n.tagName.toLowerCase();switch(t){case"form":return e.type===Dd;case"input":return["button","submit"].indexOf(n.getAttribute("type"))===-1?e.type===za:e.type===$i;case"select":case"textarea":return e.type===za;default:return e.type===$i}}function jd(n,e,t,i){var r;if(!Fd(n,e,t,i))return!1;for(var o=n;o.parentNode&&!Cn(o,"body");o=o.parentNode){var s=Ud(o);for(r=0;r<j0.length;r++)if(s[j0[r]])return!1}var a=Ud(n);for(r=0;r<B0.length;r++)if(a[B0[r]])return!0;if(Cn(n,"input")||Cn(n,"select")||Cn(n,"textarea")||n.getAttribute("contenteditable")==="true")return!1;var c=n.type||"";if(typeof c=="string")switch(c.toLowerCase()){case"hidden":return!1;case"password":return!1}var u=n.name||n.id||"";if(typeof u=="string"){var l=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(l.test(u.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function qa(n){if(n===null||v.isUndefined(n))return!1;if(typeof n=="string"){n=v.trim(n);var e=/^(?:(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(e.test((n||"").replace(/[- ]/g,"")))return!1;var t=/(^\d{3}-?\d{2}-?\d{4}$)/;if(t.test(n))return!1}return!0}var dP=30,hP=1e3,pP=4;function $0(){this.clicks=[]}$0.prototype.isRageClick=function(n,e,t){t=t||{};var i=t.threshold_px||dP,r=t.timeout_ms||hP,o=t.click_count||pP,s=Date.now(),a=this.clicks[this.clicks.length-1];if(a&&s-a.timestamp<r&&Math.sqrt(Math.pow(n-a.x,2)+Math.pow(e-a.y,2))<i){if(this.clicks.push({x:n,y:e,timestamp:s}),this.clicks.length>=o)return this.clicks=[],!0}else this.clicks=[{x:n,y:e,timestamp:s}];return!1};var H0="autocapture",fP="track_pageview",K0="full-url",mP="url-with-path-and-query-string",gP="url-with-path",vP="allow_element_callback",Y0="allow_selectors",X0="allow_url_regexes",J0="block_attrs",Z0="block_element_callback",Q0="block_selectors",ey="block_url_regexes",ty="capture_extra_attrs",ny="capture_text_content",iy="scroll_capture_all",ry="scroll_depth_percent_checkpoints",Wa="click",Vd="input",oy="pageview",sy="rage_click",zd="scroll",qd="submit",ht={};ht[Y0]=[],ht[X0]=[],ht[J0]=[],ht[Z0]=null,ht[Q0]=[],ht[ey]=[],ht[ty]=[],ht[ny]=!1,ht[iy]=!1,ht[ry]=[25,50,75,100],ht[Wa]=!0,ht[Vd]=!0,ht[oy]=K0,ht[sy]=!0,ht[zd]=!0,ht[qd]=!0;var Ga={$mp_autocapture:!0},ay="$mp_click",yP="$mp_input_change",cy="$mp_rage_click",bP="$mp_scroll",_P="$mp_submit",Ot=function(n){this.mp=n};Ot.prototype.init=function(){if(!uP()){Pt.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageviewTracking(),this.initClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking()},Ot.prototype.getFullConfig=function(){var n=this.mp.get_config(H0);return n?v.isObject(n)?v.extend({},ht,n):ht:{}},Ot.prototype.getConfig=function(n){return this.getFullConfig()[n]},Ot.prototype.currentUrlBlocked=function(){var n,e=v.info.currentUrl(),t=this.getConfig(X0)||[];if(t.length){var i=!1;for(n=0;n<t.length;n++){var r=t[n];try{if(e.match(r)){i=!0;break}}catch(s){return Pt.critical("Error while checking block URL regex: "+r,s),!0}}if(!i)return!0}var o=this.getConfig(ey)||[];if(!o||!o.length)return!1;for(n=0;n<o.length;n++)try{if(e.match(o[n]))return!0}catch(s){return Pt.critical("Error while checking block URL regex: "+o[n],s),!0}return!1},Ot.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(H0)?this.getConfig(oy):this.mp.get_config(fP)},Ot.prototype.trackDomEvent=function(n,e){if(!this.currentUrlBlocked()){var t=this.mp.is_recording_heatmap_data()&&(e===ay&&!this.getConfig(Wa)||e===cy&&!this._getRageClickConfig()),i=aP(n,{allowElementCallback:this.getConfig(vP),allowSelectors:this.getConfig(Y0),blockAttrs:this.getConfig(J0),blockElementCallback:this.getConfig(Z0),blockSelectors:this.getConfig(Q0),captureExtraAttrs:this.getConfig(ty),captureTextContent:this.getConfig(ny),capturedForHeatMap:t});i&&(v.extend(i,Ga),this.mp.track(e,i))}},Ot.prototype._getRageClickConfig=function(){var n=this.getConfig(sy);return n?n===!0?{}:typeof n=="object"?n:{}:null},Ot.prototype.initClickTracking=function(){q.removeEventListener($i,this.listenerClick),!(!this.getConfig(Wa)&&!this.mp.get_config("record_heatmap_data"))&&(Pt.log("Initializing click tracking"),this.listenerClick=q.addEventListener($i,(function(n){!this.getConfig(Wa)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(n,ay)}).bind(this)))},Ot.prototype.initInputTracking=function(){q.removeEventListener(za,this.listenerChange),this.getConfig(Vd)&&(Pt.log("Initializing input tracking"),this.listenerChange=q.addEventListener(za,(function(n){this.getConfig(Vd)&&this.trackDomEvent(n,yP)}).bind(this)))},Ot.prototype.initPageviewTracking=function(){if(q.removeEventListener(U0,this.listenerPopstate),q.removeEventListener(L0,this.listenerHashchange),q.removeEventListener(Ur,this.listenerLocationchange),!!this.pageviewTrackingConfig()){Pt.log("Initializing pageview tracking");var n="",e=!1;this.currentUrlBlocked()||(e=this.mp.track_pageview(Ga)),e&&(n=v.info.currentUrl()),this.listenerPopstate=q.addEventListener(U0,function(){q.dispatchEvent(new Event(Ur))}),this.listenerHashchange=q.addEventListener(L0,function(){q.dispatchEvent(new Event(Ur))});var t=q.history.pushState;typeof t=="function"&&(q.history.pushState=function(r,o,s){t.call(q.history,r,o,s),q.dispatchEvent(new Event(Ur))});var i=q.history.replaceState;typeof i=="function"&&(q.history.replaceState=function(r,o,s){i.call(q.history,r,o,s),q.dispatchEvent(new Event(Ur))}),this.listenerLocationchange=q.addEventListener(Ur,xd((function(){if(!this.currentUrlBlocked()){var r=v.info.currentUrl(),o=!1,s=r.split("#")[0].split("?")[0]!==n.split("#")[0].split("?")[0],a=this.pageviewTrackingConfig();if(a===K0?o=r!==n:a===mP?o=r.split("#")[0]!==n.split("#")[0]:a===gP&&(o=s),o){var c=this.mp.track_pageview(Ga);c&&(n=r),s&&(this.lastScrollCheckpoint=0,Pt.log("Path change: re-initializing scroll depth checkpoints"))}}}).bind(this)))}},Ot.prototype.initRageClickTracking=function(){q.removeEventListener($i,this.listenerRageClick);var n=this._getRageClickConfig();!n&&!this.mp.get_config("record_heatmap_data")||(Pt.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new $0),this.listenerRageClick=(function(e){var t=this._getRageClickConfig();!t&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e.pageX,e.pageY,t)&&this.trackDomEvent(e,cy)}).bind(this),q.addEventListener($i,this.listenerRageClick))},Ot.prototype.initScrollTracking=function(){q.removeEventListener(F0,this.listenerScroll),this.getConfig(zd)&&(Pt.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0,this.listenerScroll=q.addEventListener(F0,xd((function(){if(this.getConfig(zd)&&!this.currentUrlBlocked()){var n=this.getConfig(iy),e=(this.getConfig(ry)||[]).slice().sort(function(c,u){return c-u}),t=q.scrollY,i=v.extend({$scroll_top:t},Ga);try{var r=be.body.scrollHeight,o=Math.round(t/(r-q.innerHeight)*100);if(i.$scroll_height=r,i.$scroll_percentage=o,o>this.lastScrollCheckpoint)for(var s=0;s<e.length;s++){var a=e[s];o>=a&&this.lastScrollCheckpoint<a&&(i.$scroll_checkpoint=a,this.lastScrollCheckpoint=a,n=!0)}}catch(c){Pt.critical("Error while calculating scroll percentage",c)}n&&this.mp.track(bP,i)}}).bind(this))))},Ot.prototype.initSubmitTracking=function(){q.removeEventListener(Dd,this.listenerSubmit),this.getConfig(qd)&&(Pt.log("Initializing submit tracking"),this.listenerSubmit=q.addEventListener(Dd,(function(n){this.getConfig(qd)&&this.trackDomEvent(n,_P)}).bind(this)))},S0(Ot);var kP=q.fetch,At=Gi("flags"),$a="flags",Ha="context",Wd={};Wd[Ha]={};var ae=function(n){this.getFullApiRoute=n.getFullApiRoute,this.getMpConfig=n.getConfigFunc,this.setMpConfig=n.setConfigFunc,this.getMpProperty=n.getPropertyFunc,this.track=n.trackingFunc};ae.prototype.init=function(){if(!SP()){At.critical("Feature Flags unavailable: missing minimum required APIs");return}this.flags=null,this.fetchFlags(),this.trackedFeatures=new Set},ae.prototype.getFullConfig=function(){var n=this.getMpConfig($a);return n?v.isObject(n)?v.extend({},Wd,n):Wd:{}},ae.prototype.getConfig=function(n){return this.getFullConfig()[n]},ae.prototype.isSystemEnabled=function(){return!!this.getMpConfig($a)},ae.prototype.updateContext=function(n,e){if(!this.isSystemEnabled())return At.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var t=this.getMpConfig($a);v.isObject(t)||(t={});var i=e&&e.replace?{}:this.getConfig(Ha);return t[Ha]=v.extend({},i,n),this.setMpConfig($a,t),this.fetchFlags()},ae.prototype.areFlagsReady=function(){return this.isSystemEnabled()||At.error("Feature Flags not enabled"),!!this.flags},ae.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var n=this.getMpProperty("distinct_id"),e=this.getMpProperty("$device_id");At.log("Fetching flags for distinct ID: "+n);var t={context:v.extend({distinct_id:n,device_id:e},this.getConfig(Ha))};return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=q.fetch(this.getFullApiRoute(),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),"Content-Type":"application/octet-stream"},body:JSON.stringify(t)}).then((function(i){return this.markFetchComplete(),i.json().then((function(r){var o=r.flags;if(!o)throw new Error("No flags in API response");var s=new Map;v.each(o,function(a,c){s.set(c,{key:a.variant_key,value:a.variant_value})}),this.flags=s}).bind(this)).catch((function(r){this.markFetchComplete(),At.error(r)}).bind(this))}).bind(this)).catch((function(i){this.markFetchComplete(),At.error(i)}).bind(this)),this.fetchPromise},ae.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){At.error("Fetch in progress started time not set, cannot mark fetch complete");return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null},ae.prototype.getVariant=function(n,e){return this.fetchPromise?this.fetchPromise.then((function(){return this.getVariantSync(n,e)}).bind(this)).catch(function(t){return At.error(t),e}):new Promise(function(t){At.critical("Feature Flags not initialized"),t(e)})},ae.prototype.getVariantSync=function(n,e){if(!this.areFlagsReady())return At.log("Flags not loaded yet"),e;var t=this.flags.get(n);return t?(this.trackFeatureCheck(n,t),t):(At.log('No flag found: "'+n+'"'),e)},ae.prototype.getVariantValue=function(n,e){return this.getVariant(n,{value:e}).then(function(t){return t.value}).catch(function(t){return At.error(t),e})},ae.prototype.getFeatureData=function(n,e){return At.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(n,e)},ae.prototype.getVariantValueSync=function(n,e){return this.getVariantSync(n,{value:e}).value},ae.prototype.isEnabled=function(n,e){return this.getVariantValue(n).then((function(){return this.isEnabledSync(n,e)}).bind(this)).catch(function(t){return At.error(t),e})},ae.prototype.isEnabledSync=function(n,e){e=e||!1;var t=this.getVariantValueSync(n,e);return t!==!0&&t!==!1&&(At.error('Feature flag "'+n+'" value: '+t+" is not a boolean; returning fallback value: "+e),t=e),t},ae.prototype.trackFeatureCheck=function(n,e){this.trackedFeatures.has(n)||(this.trackedFeatures.add(n),this.track("$experiment_started",{"Experiment name":n,"Variant name":e.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency}))};function SP(){return!!kP&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"}S0(ae),ae.prototype.are_flags_ready=ae.prototype.areFlagsReady,ae.prototype.get_variant=ae.prototype.getVariant,ae.prototype.get_variant_sync=ae.prototype.getVariantSync,ae.prototype.get_variant_value=ae.prototype.getVariantValue,ae.prototype.get_variant_value_sync=ae.prototype.getVariantValueSync,ae.prototype.is_enabled=ae.prototype.isEnabled,ae.prototype.is_enabled_sync=ae.prototype.isEnabledSync,ae.prototype.update_context=ae.prototype.updateContext,ae.prototype.get_feature_data=ae.prototype.getFeatureData;var qn=function(){};qn.prototype.create_properties=function(){},qn.prototype.event_handler=function(){},qn.prototype.after_track_handler=function(){},qn.prototype.init=function(n){return this.mp=n,this},qn.prototype.track=function(n,e,t,i){var r=this,o=v.dom_query(n);if(o.length===0){_e.error("The DOM query ("+n+") returned 0 elements");return}return v.each(o,function(s){v.register_event(s,this.override_event,function(a){var c={},u=r.create_properties(t,this),l=r.mp.get_config("track_links_timeout");r.event_handler(a,this,c),window.setTimeout(r.track_callback(i,u,c,!0),l),r.mp.track(e,u,r.track_callback(i,u,c))})},this),!0},qn.prototype.track_callback=function(n,e,t,i){i=i||!1;var r=this;return function(){t.callback_fired||(t.callback_fired=!0,!(n&&n(i,e)===!1)&&r.after_track_handler(e,t,i))}},qn.prototype.create_properties=function(n,e){var t;return typeof n=="function"?t=n(e):t=v.extend({},n),t};var Fr=function(){this.override_event="click"};v.inherit(Fr,qn),Fr.prototype.create_properties=function(n,e){var t=Fr.superclass.create_properties.apply(this,arguments);return e.href&&(t.url=e.href),t},Fr.prototype.event_handler=function(n,e,t){t.new_tab=n.which===2||n.metaKey||n.ctrlKey||e.target==="_blank",t.href=e.href,t.new_tab||n.preventDefault()},Fr.prototype.after_track_handler=function(n,e){e.new_tab||setTimeout(function(){window.location=e.href},0)};var Ka=function(){this.override_event="submit"};v.inherit(Ka,qn),Ka.prototype.event_handler=function(n,e,t){t.element=e,n.preventDefault()},Ka.prototype.after_track_handler=function(n,e){setTimeout(function(){e.element.submit()},0)};var pi="$set",Br="$set_once",sn="$unset",Hi="$add",Tn="$append",Ki="$union",Wn="$remove",wP="$delete",uy={set_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[pi]=i,t},unset_action:function(n){var e={},t=[];return v.isArray(n)||(n=[n]),v.each(n,function(i){this._is_reserved_property(i)||t.push(i)},this),e[sn]=t,e},set_once_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[Br]=i,t},union_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=v.isArray(r)?r:[r])},this):i[n]=v.isArray(e)?e:[e],t[Ki]=i,t},append_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[Tn]=i,t},remove_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[Wn]=i,t},delete_action:function(){var n={};return n[wP]="",n}},Fe=function(){};v.extend(Fe.prototype,uy),Fe.prototype._init=function(n,e,t){this._mixpanel=n,this._group_key=e,this._group_id=t},Fe.prototype.set=Nr(function(n,e,t){var i=this.set_action(n,e);return v.isObject(n)&&(t=e),this._send_request(i,t)}),Fe.prototype.set_once=Nr(function(n,e,t){var i=this.set_once_action(n,e);return v.isObject(n)&&(t=e),this._send_request(i,t)}),Fe.prototype.unset=Nr(function(n,e){var t=this.unset_action(n);return this._send_request(t,e)}),Fe.prototype.union=Nr(function(n,e,t){v.isObject(n)&&(t=e);var i=this.union_action(n,e);return this._send_request(i,t)}),Fe.prototype.delete=Nr(function(n){var e=this.delete_action();return this._send_request(e,n)}),Fe.prototype.remove=Nr(function(n,e,t){var i=this.remove_action(n,e);return this._send_request(i,t)}),Fe.prototype._send_request=function(n,e){n.$group_key=this._group_key,n.$group_id=this._group_id,n.$token=this._get_config("token");var t=v.encodeDates(n);return this._mixpanel._track_or_batch({type:"groups",data:t,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},e)},Fe.prototype._is_reserved_property=function(n){return n==="$group_key"||n==="$group_id"},Fe.prototype._get_config=function(n){return this._mixpanel.get_config(n)},Fe.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Fe.prototype.remove=Fe.prototype.remove,Fe.prototype.set=Fe.prototype.set,Fe.prototype.set_once=Fe.prototype.set_once,Fe.prototype.union=Fe.prototype.union,Fe.prototype.unset=Fe.prototype.unset,Fe.prototype.toString=Fe.prototype.toString;var ee=function(){};v.extend(ee.prototype,uy),ee.prototype._init=function(n){this._mixpanel=n},ee.prototype.set=hi(function(n,e,t){var i=this.set_action(n,e);return v.isObject(n)&&(t=e),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),i[pi]=v.extend({},v.info.people_properties(),i[pi]),this._send_request(i,t)}),ee.prototype.set_once=hi(function(n,e,t){var i=this.set_once_action(n,e);return v.isObject(n)&&(t=e),this._send_request(i,t)}),ee.prototype.unset=hi(function(n,e){var t=this.unset_action(n);return this._send_request(t,e)}),ee.prototype.increment=hi(function(n,e,t){var i={},r={};return v.isObject(n)?(v.each(n,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){_e.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else r[s]=o},this),t=e):(v.isUndefined(e)&&(e=1),r[n]=e),i[Hi]=r,this._send_request(i,t)}),ee.prototype.append=hi(function(n,e,t){v.isObject(n)&&(t=e);var i=this.append_action(n,e);return this._send_request(i,t)}),ee.prototype.remove=hi(function(n,e,t){v.isObject(n)&&(t=e);var i=this.remove_action(n,e);return this._send_request(i,t)}),ee.prototype.union=hi(function(n,e,t){v.isObject(n)&&(t=e);var i=this.union_action(n,e);return this._send_request(i,t)}),ee.prototype.track_charge=hi(function(){_e.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")}),ee.prototype.clear_charges=function(n){return this.set("$transactions",[],n)},ee.prototype.delete_user=function(){if(!this._identify_called()){_e.error("mixpanel.people.delete_user() requires you to call identify() first");return}var n={$delete:this._mixpanel.get_distinct_id()};return this._send_request(n)},ee.prototype.toString=function(){return this._mixpanel.toString()+".people"},ee.prototype._send_request=function(n,e){n.$token=this._get_config("token"),n.$distinct_id=this._mixpanel.get_distinct_id();var t=this._mixpanel.get_property("$device_id"),i=this._mixpanel.get_property("$user_id"),r=this._mixpanel.get_property("$had_persisted_distinct_id");t&&(n.$device_id=t),i&&(n.$user_id=i),r&&(n.$had_persisted_distinct_id=r);var o=v.encodeDates(n);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},e):(this._enqueue(n),v.isUndefined(e)||(this._get_config("verbose")?e({status:-1,error:null}):e(-1)),v.truncate(o,255))},ee.prototype._get_config=function(n){return this._mixpanel.get_config(n)},ee.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0},ee.prototype._enqueue=function(n){pi in n?this._mixpanel.persistence._add_to_people_queue(pi,n):Br in n?this._mixpanel.persistence._add_to_people_queue(Br,n):sn in n?this._mixpanel.persistence._add_to_people_queue(sn,n):Hi in n?this._mixpanel.persistence._add_to_people_queue(Hi,n):Tn in n?this._mixpanel.persistence._add_to_people_queue(Tn,n):Wn in n?this._mixpanel.persistence._add_to_people_queue(Wn,n):Ki in n?this._mixpanel.persistence._add_to_people_queue(Ki,n):_e.error("Invalid call to _enqueue():",n)},ee.prototype._flush_one_queue=function(n,e,t,i){var r=this,o=v.extend({},this._mixpanel.persistence.load_queue(n)),s=o;!v.isUndefined(o)&&v.isObject(o)&&!v.isEmptyObject(o)&&(r._mixpanel.persistence._pop_from_people_queue(n,o),r._mixpanel.persistence.save(),i&&(s=i(o)),e.call(r,s,function(a,c){a===0&&r._mixpanel.persistence._add_to_people_queue(n,o),v.isUndefined(t)||t(a,c)}))},ee.prototype._flush=function(n,e,t,i,r,o,s){var a=this;this._flush_one_queue(pi,this.set,n),this._flush_one_queue(Br,this.set_once,i),this._flush_one_queue(sn,this.unset,o,function(g){return v.keys(g)}),this._flush_one_queue(Hi,this.increment,e),this._flush_one_queue(Ki,this.union,r);var c=this._mixpanel.persistence.load_queue(Tn);if(!v.isUndefined(c)&&v.isArray(c)&&c.length)for(var u,l=function(g,y){g===0&&a._mixpanel.persistence._add_to_people_queue(Tn,u),v.isUndefined(t)||t(g,y)},d=c.length-1;d>=0;d--)c=this._mixpanel.persistence.load_queue(Tn),u=c.pop(),a._mixpanel.persistence.save(),v.isEmptyObject(u)||a.append(u,l);var h=this._mixpanel.persistence.load_queue(Wn);if(!v.isUndefined(h)&&v.isArray(h)&&h.length)for(var p,m=function(g,y){g===0&&a._mixpanel.persistence._add_to_people_queue(Wn,p),v.isUndefined(s)||s(g,y)},f=h.length-1;f>=0;f--)h=this._mixpanel.persistence.load_queue(Wn),p=h.pop(),a._mixpanel.persistence.save(),v.isEmptyObject(p)||a.remove(p,m)},ee.prototype._is_reserved_property=function(n){return n==="$distinct_id"||n==="$token"||n==="$device_id"||n==="$user_id"||n==="$had_persisted_distinct_id"},ee.prototype.set=ee.prototype.set,ee.prototype.set_once=ee.prototype.set_once,ee.prototype.unset=ee.prototype.unset,ee.prototype.increment=ee.prototype.increment,ee.prototype.append=ee.prototype.append,ee.prototype.remove=ee.prototype.remove,ee.prototype.union=ee.prototype.union,ee.prototype.track_charge=ee.prototype.track_charge,ee.prototype.clear_charges=ee.prototype.clear_charges,ee.prototype.delete_user=ee.prototype.delete_user,ee.prototype.toString=ee.prototype.toString;var Gd="__mps",$d="__mpso",Hd="__mpus",Kd="__mpa",Yd="__mpap",Xd="__mpr",Jd="__mpu",ly="$people_distinct_id",Ya="__alias",Yo="__timers",CP=[Gd,$d,Hd,Kd,Yd,Xd,Jd,ly,Ya,Yo],re=function(n){this.props={},this.campaign_params_saved=!1,n.persistence_name?this.name="mp_"+n.persistence_name:this.name="mp_"+n.token+"_mixpanel";var e=n.persistence;e!=="cookie"&&e!=="localStorage"&&(_e.critical("Unknown persistence type "+e+"; falling back to cookie"),e=n.persistence="cookie"),e==="localStorage"&&v.localStorage.is_supported()?this.storage=v.localStorage:this.storage=v.cookie,this.load(),this.update_config(n),this.upgrade(),this.save()};re.prototype.properties=function(){var n={};return this.load(),v.each(this.props,function(e,t){v.include(CP,t)||(n[t]=e)}),n},re.prototype.load=function(){if(!this.disabled){var n=this.storage.parse(this.name);n&&(this.props=v.extend({},n))}},re.prototype.upgrade=function(){var n,e;this.storage===v.localStorage?(n=v.cookie.parse(this.name),v.cookie.remove(this.name),v.cookie.remove(this.name,!0),n&&this.register_once(n)):this.storage===v.cookie&&(e=v.localStorage.parse(this.name),v.localStorage.remove(this.name),e&&this.register_once(e))},re.prototype.save=function(){this.disabled||this.storage.set(this.name,Mr(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},re.prototype.load_prop=function(n){return this.load(),this.props[n]},re.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},re.prototype.clear=function(){this.remove(),this.props={}},re.prototype.register_once=function(n,e,t){return v.isObject(n)?(typeof e>"u"&&(e="None"),this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),v.each(n,function(i,r){(!this.props.hasOwnProperty(r)||this.props[r]===e)&&(this.props[r]=i)},this),this.save(),!0):!1},re.prototype.register=function(n,e){return v.isObject(n)?(this.expire_days=typeof e>"u"?this.default_expiry:e,this.load(),v.extend(this.props,n),this.save(),!0):!1},re.prototype.unregister=function(n){this.load(),n in this.props&&(delete this.props[n],this.save())},re.prototype.update_search_keyword=function(n){this.register(v.info.searchInfo(n))},re.prototype.update_referrer_info=function(n){this.register_once({$initial_referrer:n||"$direct",$initial_referring_domain:v.info.referringDomain(n)||"$direct"},"")},re.prototype.get_referrer_info=function(){return v.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},re.prototype.update_config=function(n){this.default_expiry=this.expire_days=n.cookie_expiration,this.set_disabled(n.disable_persistence),this.set_cookie_domain(n.cookie_domain),this.set_cross_site(n.cross_site_cookie),this.set_cross_subdomain(n.cross_subdomain_cookie),this.set_secure(n.secure_cookie)},re.prototype.set_disabled=function(n){this.disabled=n,this.disabled?this.remove():this.save()},re.prototype.set_cookie_domain=function(n){n!==this.cookie_domain&&(this.remove(),this.cookie_domain=n,this.save())},re.prototype.set_cross_site=function(n){n!==this.cross_site&&(this.cross_site=n,this.remove(),this.save())},re.prototype.set_cross_subdomain=function(n){n!==this.cross_subdomain&&(this.cross_subdomain=n,this.remove(),this.save())},re.prototype.get_cross_subdomain=function(){return this.cross_subdomain},re.prototype.set_secure=function(n){n!==this.secure&&(this.secure=!!n,this.remove(),this.save())},re.prototype._add_to_people_queue=function(n,e){var t=this._get_queue_key(n),i=e[n],r=this._get_or_create_queue(pi),o=this._get_or_create_queue(Br),s=this._get_or_create_queue(sn),a=this._get_or_create_queue(Hi),c=this._get_or_create_queue(Ki),u=this._get_or_create_queue(Wn,[]),l=this._get_or_create_queue(Tn,[]);t===Gd?(v.extend(r,i),this._pop_from_people_queue(Hi,i),this._pop_from_people_queue(Ki,i),this._pop_from_people_queue(sn,i)):t===$d?(v.each(i,function(d,h){h in o||(o[h]=d)}),this._pop_from_people_queue(sn,i)):t===Hd?v.each(i,function(d){v.each([r,o,a,c],function(h){d in h&&delete h[d]}),v.each(l,function(h){d in h&&delete h[d]}),s[d]=!0}):t===Kd?(v.each(i,function(d,h){h in r?r[h]+=d:(h in a||(a[h]=0),a[h]+=d)},this),this._pop_from_people_queue(sn,i)):t===Jd?(v.each(i,function(d,h){v.isArray(d)&&(h in c||(c[h]=[]),v.each(d,function(p){v.include(c[h],p)||c[h].push(p)}))}),this._pop_from_people_queue(sn,i)):t===Xd?(u.push(i),this._pop_from_people_queue(Tn,i)):t===Yd&&(l.push(i),this._pop_from_people_queue(sn,i)),_e.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),_e.log(e),this.save()},re.prototype._pop_from_people_queue=function(n,e){var t=this.props[this._get_queue_key(n)];v.isUndefined(t)||v.each(e,function(i,r){n===Tn||n===Wn?v.each(t,function(o){o[r]===i&&delete o[r]}):delete t[r]},this)},re.prototype.load_queue=function(n){return this.load_prop(this._get_queue_key(n))},re.prototype._get_queue_key=function(n){if(n===pi)return Gd;if(n===Br)return $d;if(n===sn)return Hd;if(n===Hi)return Kd;if(n===Tn)return Yd;if(n===Wn)return Xd;if(n===Ki)return Jd;_e.error("Invalid queue:",n)},re.prototype._get_or_create_queue=function(n,e){var t=this._get_queue_key(n);return e=v.isUndefined(e)?{}:e,this.props[t]||(this.props[t]=e)},re.prototype.set_event_timer=function(n,e){var t=this.load_prop(Yo)||{};t[n]=e,this.props[Yo]=t,this.save()},re.prototype.remove_event_timer=function(n){var e=this.load_prop(Yo)||{},t=e[n];return v.isUndefined(t)||(delete this.props[Yo][n],this.save()),t};var Zd,dy=function(n,e){throw new Error(n+" not available in this build.")},Tt,hy=0,TP=1,xP=function(n){return n},Yt="mixpanel",py="base64",EP="json",Qd="$device:",jr=q.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,fy=!jr&&Vn.indexOf("MSIE")===-1&&Vn.indexOf("Mozilla")===-1,Xa=null;ui.sendBeacon&&(Xa=function(){return ui.sendBeacon.apply(ui,arguments)});var my={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},gy={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:my,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:py,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:li,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:li,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:!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, audio",record_canvas:!1,record_collect_fonts:!1,record_heatmap_data:!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:qo,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},vy=!1,E=function(){},eh=function(n,e,t){var i,r=t===Yt?Tt:Tt[t];if(r&&Zd===hy)i=r;else{if(r&&!v.isArray(r)){_e.error("You have already initialized "+t);return}i=new E}if(i._cached_groups={},i._init(n,e,t),i.people=new ee,i.people._init(i),!i.get_config("skip_first_touch_marketing")){var o=v.info.campaignParams(null),s={},a=!1;v.each(o,function(c,u){s["initial_"+u]=c,c&&(a=!0)}),a&&i.people.set_once(s)}return on.DEBUG=on.DEBUG||i.get_config("debug"),!v.isUndefined(r)&&v.isArray(r)&&(i._execute_array.call(i.people,r.people),i._execute_array(r)),i};E.prototype.init=function(n,e,t){if(v.isUndefined(t)){this.report_error("You must name your new library: init(token, config, name)");return}if(t===Yt){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var i=eh(n,e,t);return Tt[t]=i,i._loaded(),i},E.prototype._init=function(n,e,t){e=e||{},this.__loaded=!0,this.config={};var i={};if(!("api_payload_format"in e)){var r=e.api_host||gy.api_host;r.match(/\.mixpanel\.com/)&&(i.api_payload_format=EP)}if(this.set_config(v.extend({},gy,i,e,{name:t,token:n,callback_fn:(t===Yt?t:Yt+"."+t)+"._jsc"})),this._jsc=li,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(!v.localStorage.is_supported(!0)||!jr)this._batch_requests=!1,_e.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),v.each(this.get_batcher_configs(),function(a){_e.log("Clearing batch queue "+a.queue_key),v.localStorage.remove(a.queue_key)});else if(this.init_batchers(),Xa&&q.addEventListener){var o=v.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);q.addEventListener("pagehide",function(a){a.persisted&&o()}),q.addEventListener("visibilitychange",function(){be.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new re(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=v.UUID();this.get_distinct_id()||this.register_once({distinct_id:Qd+s,$device_id:s},""),this.flags=new ae({getFullApiRoute:v.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:v.bind(this.get_config,this),setConfigFunc:v.bind(this.set_config,this),getPropertyFunc:v.bind(this.get_property,this),trackingFunc:v.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new Ot(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},E.prototype._init_tab_id=function(){if(v.sessionStorage.is_supported())try{var n=this.get_config("name")+"_"+this.get_config("token"),e="mp_tab_id_"+n,t="mp_gen_new_tab_id_"+n;(v.sessionStorage.get(t)||!v.sessionStorage.get(e))&&v.sessionStorage.set(e,"$tab-"+v.UUID()),v.sessionStorage.set(t,"1"),this.tab_id=v.sessionStorage.get(e),q.addEventListener("beforeunload",function(){v.sessionStorage.remove(t)})}catch(i){this.report_error("Error initializing tab id",i)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},E.prototype.get_tab_id=function(){return this.tab_id||null},E.prototype._should_load_recorder=function(){var n=new Sn(Pd),e=this.get_tab_id();return n.init().then(function(){return n.getAll()}).then(function(t){for(var i=0;i<t.length;i++)if(Nd(t[i])||t[i].tabId===e)return!0;return!1}).catch(v.bind(function(t){this.report_error("Error checking recording registry",t)},this))},E.prototype._check_and_start_session_recording=di(function(n){if(!q.MutationObserver){_e.critical("Browser does not support MutationObserver; skipping session recording");return}var e=v.bind(function(i){var r=v.bind(function(){this._recorder=this._recorder||new q.__mp_recorder(this),this._recorder.resumeRecording(i)},this);v.isUndefined(q.__mp_recorder)?dy(this.get_config("recorder_src"),r):r()},this),t=this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent");n||t?e(!0):this._should_load_recorder().then(function(i){i&&e(!1)})}),E.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},E.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()},E.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()},E.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()},E.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},E.prototype.get_session_recording_properties=function(){var n={},e=this._get_session_replay_id();return e&&(n.$mp_replay_id=e),n},E.prototype.get_session_replay_url=function(){var n=null,e=this._get_session_replay_id();if(e){var t=v.HTTPBuildQuery({replay_id:e,distinct_id:this.get_distinct_id(),token:this.get_config("token")});n="https://mixpanel.com/projects/replay-redirect?"+t}return n},E.prototype._get_session_replay_id=function(){var n=null;return this._recorder&&(n=this._recorder.replayId),n||null},E.prototype.__get_recorder=function(){return this._recorder},E.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 n=v.info.campaignParams(null);v.each(n,(function(e,t){this.unregister(t)}).bind(this))}},E.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(be.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(v.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(be.referrer)},E.prototype._dom_loaded=function(){v.each(this.__dom_loaded_queue,function(n){this._track_dom.apply(this,n)},this),this.has_opted_out_tracking()||v.each(this.__request_queue,function(n){this._send_request.apply(this,n)},this),delete this.__dom_loaded_queue,delete this.__request_queue},E.prototype._track_dom=function(n,e){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!vy)return this.__dom_loaded_queue.push([n,e]),!1;var t=new n().init(this);return t.track.apply(t,e)},E.prototype._prepare_callback=function(n,e){if(v.isUndefined(n))return null;if(jr){var t=function(s){n(s,e)};return t}else{var i=this._jsc,r=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+r+"]";return i[r]=function(s){delete i[r],n(s,e)},o}},E.prototype._send_request=function(n,e,t,i){var r=!0;if(fy)return this.__request_queue.push(arguments),r;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!i&&(v.isFunction(t)||typeof t=="string")&&(i=t,t=null),t=v.extend(o,t||{}),jr||(t.method="GET");var a=t.method==="POST",c=Xa&&a&&t.transport.toLowerCase()==="sendbeacon",u=t.verbose;e.verbose&&(u=!0),this.get_config("test")&&(e.test=1),u&&(e.verbose=1),this.get_config("img")&&(e.img=1),jr||(i?e.callback=i:(u||this.get_config("test"))&&(e.callback="(function(){})")),e.ip=this.get_config("ip")?1:0,e._=new Date().getTime().toString(),a&&(s="data="+encodeURIComponent(e.data),delete e.data),v.extend(e,this.get_config("api_extra_query_params")),n+="?"+v.HTTPBuildQuery(e);var l=this;if("img"in e){var d=be.createElement("img");d.src=n,be.body.appendChild(d)}else if(c){try{r=Xa(n,s)}catch(y){l.report_error(y),r=!1}try{i&&i(r?1:0)}catch(y){l.report_error(y)}}else if(jr)try{var h=new XMLHttpRequest;h.open(t.method,n,!0);var p=this.get_config("xhr_headers");if(a&&(p["Content-Type"]="application/x-www-form-urlencoded"),v.each(p,function(y,b){h.setRequestHeader(b,y)}),t.timeout_ms&&typeof h.timeout<"u"){h.timeout=t.timeout_ms;var m=new Date().getTime()}h.withCredentials=!0,h.onreadystatechange=function(){if(h.readyState===4)if(h.status===200){if(i)if(u){var y;try{y=v.JSONDecode(h.responseText)}catch(w){if(l.report_error(w),t.ignore_json_errors)y=h.responseText;else return}i(y)}else i(Number(h.responseText))}else{var b;if(h.timeout&&!h.status&&new Date().getTime()-m>=h.timeout?b="timeout":b="Bad HTTP status: "+h.status+" "+h.statusText,l.report_error(b),i)if(u){var S=h.responseHeaders||{};i({status:0,httpStatusCode:h.status,error:b,retryAfter:S["Retry-After"]})}else i(0)}},h.send(s)}catch(y){l.report_error(y),r=!1}else{var f=be.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=n;var g=be.getElementsByTagName("script")[0];g.parentNode.insertBefore(f,g)}return r},E.prototype._execute_array=function(n){var e,t=[],i=[],r=[];v.each(n,function(s){s&&(e=s[0],v.isArray(e)?r.push(s):typeof s=="function"?s.call(this):v.isArray(s)&&e==="alias"?t.push(s):v.isArray(s)&&e.indexOf("track")!==-1&&typeof this[e]=="function"?r.push(s):i.push(s))},this);var o=function(s,a){v.each(s,function(c){if(v.isArray(c[0])){var u=a;v.each(c,function(l){u=u[l[0]].apply(u,l.slice(1))})}else this[c[0]].apply(this,c.slice(1))},a)};o(t,this),o(i,this),o(r,this)},E.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},E.prototype.get_batcher_configs=function(){var n="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:n+"_ev"},people:{type:"people",api_name:"engage",queue_key:n+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:n+"_gr"}},this._batcher_configs},E.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var n=v.bind(function(t){return new Kt(t.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:v.bind(function(i,r,o){var s=this.get_config("api_routes");this._send_request(this.get_api_host(t.api_name)+"/"+s[t.api_name],this._encode_data_for_request(i),r,this._prepare_callback(o,i))},this),beforeSendHook:v.bind(function(i){return this._run_hook("before_send_"+t.type,i)},this),stopAllBatchingFunc:v.bind(this.stop_batch_senders,this),usePersistence:!0})},this),e=this.get_batcher_configs();this.request_batchers={events:n(e.events),people:n(e.people),groups:n(e.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},E.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,v.each(this.request_batchers,function(n){n.start()}))},E.prototype.stop_batch_senders=function(){this._batch_requests=!1,v.each(this.request_batchers,function(n){n.stop(),n.clear()})},E.prototype.push=function(n){this._execute_array([n])},E.prototype.disable=function(n){typeof n>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(n)},E.prototype._encode_data_for_request=function(n){var e=Mr(n);return this.get_config("api_payload_format")===py&&(e=v.base64Encode(e)),{data:e}},E.prototype._track_or_batch=function(n,e){var t=v.truncate(n.data,255),i=n.endpoint,r=n.batcher,o=n.should_send_immediately,s=n.send_request_options||{};e=e||li;var a=!0,c=v.bind(function(){return s.skip_hooks||(t=this._run_hook("before_send_"+n.type,t)),t?(_e.log("MIXPANEL REQUEST:"),_e.log(t),this._send_request(i,this._encode_data_for_request(t),s,this._prepare_callback(e,t))):null},this);return this._batch_requests&&!o?r.enqueue(t).then(function(u){u?e(1,t):c()}):a=c(),a&&t},E.prototype.track=di(function(n,e,t,i){!i&&typeof t=="function"&&(i=t,t=null),t=t||{};var r=t.transport;r&&(t.transport=r);var o=t.send_immediately;if(typeof i!="function"&&(i=li),v.isUndefined(n)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(n)){i(0);return}e=v.extend({},e),e.token=this.get_config("token");var s=this.persistence.remove_event_timer(n);if(!v.isUndefined(s)){var a=new Date().getTime()-s;e.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?v.info.marketingParams():{};e=v.extend({},v.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),e);var u=this.get_config("property_blacklist");v.isArray(u)?v.each(u,function(h){delete e[h]}):this.report_error("Invalid value for property_blacklist config: "+u);var l={event:n,properties:e},d=this._track_or_batch({type:"events",data:l,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:t},i);return d}),E.prototype.set_group=di(function(n,e,t){v.isArray(e)||(e=[e]);var i={};return i[n]=e,this.register(i),this.people.set(n,e,t)}),E.prototype.add_group=di(function(n,e,t){var i=this.get_property(n),r={};return i===void 0?(r[n]=[e],this.register(r)):i.indexOf(e)===-1&&(i.push(e),r[n]=i,this.register(r)),this.people.union(n,e,t)}),E.prototype.remove_group=di(function(n,e,t){var i=this.get_property(n);if(i!==void 0){var r=i.indexOf(e);r>-1&&(i.splice(r,1),this.register({group_key:i})),i.length===0&&this.unregister(n)}return this.people.remove(n,e,t)}),E.prototype.track_with_groups=di(function(n,e,t,i){var r=v.extend({},e||{});return v.each(t,function(o,s){o!=null&&(r[s]=o)}),this.track(n,r,i)}),E.prototype._create_map_key=function(n,e){return n+"_"+JSON.stringify(e)},E.prototype._remove_group_from_cache=function(n,e){delete this._cached_groups[this._create_map_key(n,e)]},E.prototype.get_group=function(n,e){var t=this._create_map_key(n,e),i=this._cached_groups[t];return(i===void 0||i._group_key!==n||i._group_id!==e)&&(i=new Fe,i._init(this,n,e),this._cached_groups[t]=i),i},E.prototype.track_pageview=di(function(n,e){typeof n!="object"&&(n={}),e=e||{};var t=e.event_name||"$mp_web_page_view",i=v.extend(v.info.mpPageViewProperties(),v.info.campaignParams(),v.info.clickParams()),r=v.extend({},i,n);return this.track(t,r)}),E.prototype.track_links=function(){return this._track_dom.call(this,Fr,arguments)},E.prototype.track_forms=function(){return this._track_dom.call(this,Ka,arguments)},E.prototype.time_event=function(n){if(v.isUndefined(n)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(n)||this.persistence.set_event_timer(n,new Date().getTime())};var IP={persistent:!0},th=function(n){var e;return v.isObject(n)?e=n:v.isUndefined(n)?e={}:e={days:n},v.extend({},IP,e)};E.prototype.register=function(n,e){var t=th(e);t.persistent?this.persistence.register(n,t.days):v.extend(this.unpersisted_superprops,n)},E.prototype.register_once=function(n,e,t){var i=th(t);i.persistent?this.persistence.register_once(n,e,i.days):(typeof e>"u"&&(e="None"),v.each(n,function(r,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===e)&&(this.unpersisted_superprops[o]=r)},this))},E.prototype.unregister=function(n,e){e=th(e),e.persistent?this.persistence.unregister(n):delete this.unpersisted_superprops[n]},E.prototype._register_single=function(n,e){var t={};t[n]=e,this.register(t)},E.prototype.identify=function(n,e,t,i,r,o,s,a){var c=this.get_distinct_id();if(n&&c!==n){if(typeof n=="string"&&n.indexOf(Qd)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:n})}if(!this.get_property("$device_id")){var u=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}n!==c&&n!==this.get_property(Ya)&&(this.unregister(Ya),this.register({distinct_id:n})),this._flags.identify_called=!0,this.people._flush(e,t,i,r,o,s,a),n!==c&&this.track("$identify",{distinct_id:n,$anon_distinct_id:c},{skip_hooks:!0}),n!==c&&this.flags.fetchFlags()},E.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var n=v.UUID();this.register_once({distinct_id:Qd+n,$device_id:n},""),this._check_and_start_session_recording()},E.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},E.prototype.alias=function(n,e){if(n===this.get_property(ly))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var t=this;return v.isUndefined(e)&&(e=this.get_distinct_id()),n!==e?(this._register_single(Ya,n),this.track("$create_alias",{alias:n,distinct_id:e},{skip_hooks:!0},function(){t.identify(n)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(n),-1)},E.prototype.name_tag=function(n){this._register_single("mp_name_tag",n)},E.prototype.set_config=function(n){if(v.isObject(n)){v.extend(this.config,n);var e=n.batch_size;e&&v.each(this.request_batchers,function(t){t.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),on.DEBUG=on.DEBUG||this.get_config("debug"),("autocapture"in n||"record_heatmap_data"in n)&&this.autocapture&&this.autocapture.init()}},E.prototype.get_config=function(n){return this.config[n]},E.prototype._run_hook=function(n){var e=(this.config.hooks[n]||xP).apply(this,Wi.call(arguments,1));return typeof e>"u"&&(this.report_error(n+" hook did not return a value"),e=null),e},E.prototype.get_property=function(n){return this.persistence.load_prop([n])},E.prototype.get_api_host=function(n){return this.get_config("api_hosts")[n]||this.get_config("api_host")},E.prototype.toString=function(){var n=this.get_config("name");return n!==Yt&&(n=Yt+"."+n),n},E.prototype._event_is_disabled=function(n){return v.isBlockedUA(Vn)||this._flags.disable_all_events||v.include(this.__disabled_events,n)},E.prototype._gdpr_init=function(){var n=this.get_config("opt_out_tracking_persistence_type")==="localStorage";n&&v.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")||v.cookie.get("mp_optout"))&&(v.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},E.prototype._gdpr_update_persistence=function(n){var e;if(n&&n.clear_persistence)e=!0;else if(n&&n.enable_persistence)e=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==e&&this.persistence.set_disabled(e),e?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},E.prototype._gdpr_call_func=function(n,e){return e=v.extend({track:v.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")},e),v.localStorage.is_supported()||(e.persistence_type="cookie"),n(this.get_config("token"),{track:e.track,trackEventName:e.track_event_name,trackProperties:e.track_properties,persistenceType:e.persistence_type,persistencePrefix:e.cookie_prefix,cookieDomain:e.cookie_domain,cookieExpiration:e.cookie_expiration,crossSiteCookie:e.cross_site_cookie,crossSubdomainCookie:e.cross_subdomain_cookie,secureCookie:e.secure_cookie,ignoreDnt:e.ignore_dnt})},E.prototype.opt_in_tracking=function(n){n=v.extend({enable_persistence:!0},n),this._gdpr_call_func(HR,n),this._gdpr_update_persistence(n)},E.prototype.opt_out_tracking=function(n){n=v.extend({clear_persistence:!0,delete_user:!0},n),n.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(KR,n),this._gdpr_update_persistence(n)},E.prototype.has_opted_in_tracking=function(n){return this._gdpr_call_func(YR,n)},E.prototype.has_opted_out_tracking=function(n){return this._gdpr_call_func(I0,n)},E.prototype.clear_opt_in_out_tracking=function(n){n=v.extend({enable_persistence:!0},n),this._gdpr_call_func(XR,n),this._gdpr_update_persistence(n)},E.prototype.report_error=function(n,e){_e.error.apply(_e.error,arguments);try{!e&&!(n instanceof Error)&&(n=new Error(n)),this.get_config("error_reporter")(n,e)}catch(t){_e.error(t)}},E.prototype.init=E.prototype.init,E.prototype.reset=E.prototype.reset,E.prototype.disable=E.prototype.disable,E.prototype.time_event=E.prototype.time_event,E.prototype.track=E.prototype.track,E.prototype.track_links=E.prototype.track_links,E.prototype.track_forms=E.prototype.track_forms,E.prototype.track_pageview=E.prototype.track_pageview,E.prototype.register=E.prototype.register,E.prototype.register_once=E.prototype.register_once,E.prototype.unregister=E.prototype.unregister,E.prototype.identify=E.prototype.identify,E.prototype.alias=E.prototype.alias,E.prototype.name_tag=E.prototype.name_tag,E.prototype.set_config=E.prototype.set_config,E.prototype.get_config=E.prototype.get_config,E.prototype.get_api_host=E.prototype.get_api_host,E.prototype.get_property=E.prototype.get_property,E.prototype.get_distinct_id=E.prototype.get_distinct_id,E.prototype.toString=E.prototype.toString,E.prototype.opt_out_tracking=E.prototype.opt_out_tracking,E.prototype.opt_in_tracking=E.prototype.opt_in_tracking,E.prototype.has_opted_out_tracking=E.prototype.has_opted_out_tracking,E.prototype.has_opted_in_tracking=E.prototype.has_opted_in_tracking,E.prototype.clear_opt_in_out_tracking=E.prototype.clear_opt_in_out_tracking,E.prototype.get_group=E.prototype.get_group,E.prototype.set_group=E.prototype.set_group,E.prototype.add_group=E.prototype.add_group,E.prototype.remove_group=E.prototype.remove_group,E.prototype.track_with_groups=E.prototype.track_with_groups,E.prototype.start_batch_senders=E.prototype.start_batch_senders,E.prototype.stop_batch_senders=E.prototype.stop_batch_senders,E.prototype.start_session_recording=E.prototype.start_session_recording,E.prototype.stop_session_recording=E.prototype.stop_session_recording,E.prototype.pause_session_recording=E.prototype.pause_session_recording,E.prototype.resume_session_recording=E.prototype.resume_session_recording,E.prototype.get_session_recording_properties=E.prototype.get_session_recording_properties,E.prototype.get_session_replay_url=E.prototype.get_session_replay_url,E.prototype.get_tab_id=E.prototype.get_tab_id,E.prototype.DEFAULT_API_ROUTES=my,E.prototype.__get_recorder=E.prototype.__get_recorder,re.prototype.properties=re.prototype.properties,re.prototype.update_search_keyword=re.prototype.update_search_keyword,re.prototype.update_referrer_info=re.prototype.update_referrer_info,re.prototype.get_cross_subdomain=re.prototype.get_cross_subdomain,re.prototype.clear=re.prototype.clear;var Vr={},RP=function(){v.each(Vr,function(n,e){e!==Yt&&(Tt[e]=n)}),Tt._=v},PP=function(){Tt.init=function(n,e,t){if(t)return Tt[t]||(Tt[t]=Vr[t]=eh(n,e,t),Tt[t]._loaded()),Tt[t];var i=Tt;Vr[Yt]?i=Vr[Yt]:n&&(i=eh(n,e,Yt),i._loaded(),Vr[Yt]=i),Tt=i,Zd===TP&&(q[Yt]=Tt),RP()}},OP=function(){function n(){n.done||(n.done=!0,vy=!0,fy=!1,v.each(Vr,function(i){i._dom_loaded()}))}function e(){try{be.documentElement.doScroll("left")}catch{setTimeout(e,1);return}n()}if(be.addEventListener)be.readyState==="complete"?n():be.addEventListener("DOMContentLoaded",n,!1);else if(be.attachEvent){be.attachEvent("onreadystatechange",n);var t=!1;try{t=q.frameElement===null}catch{}be.documentElement.doScroll&&t&&e()}v.register_event(q,"load",n,!0)};function AP(n){return dy=n,Zd=hy,Tt=new E,PP(),Tt.init(),OP(),Tt}function MP(n,e){e()}var Xo=AP(MP);function NP(n,e={}){const t=e.instanceName||`obi_${Math.random().toString(36).slice(2)}`;Xo.init(n,{debug:e.debug===!0,track_pageview:!1,persistence:"localStorage",...e.config||{}},t);const i=Xo.get_instance?Xo.get_instance(t):Xo[t],r={identify:(o,s)=>{var a;try{i.identify(o),s&&((a=i==null?void 0:i.people)!=null&&a.set)&&i.people.set(s)}catch{}},track:(o,s)=>{try{i.track(o,s||{})}catch{}},page:(o,s)=>{try{i.track("Page Viewed",{name:o,...s||{}})}catch{}},reset:()=>{try{i.reset()}catch{}}};return typeof window<"u"&&window.addEventListener("beforeunload",()=>{Xo.track("tab_closed",{page_url:window.location.href},{send_immediately:!0})}),r}function DP(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yy={exports:{}};(function(n){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function r(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,d,h){if(typeof l!="function")throw new TypeError("The listener must be a function");var p=new r(l,d||c,h),m=t?t+u:u;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],p]:c._events[m].push(p):(c._events[m]=p,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new i:delete c._events[u]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,d;if(this._eventsCount===0)return u;for(d in l=this._events)e.call(l,d)&&u.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=t?t+u:u,d=this._events[l];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,m=new Array(p);h<p;h++)m[h]=d[h].fn;return m},a.prototype.listenerCount=function(u){var l=t?t+u:u,d=this._events[l];return d?d.fn?1:d.length:0},a.prototype.emit=function(u,l,d,h,p,m){var f=t?t+u:u;if(!this._events[f])return!1;var g=this._events[f],y=arguments.length,b,S;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,l),!0;case 3:return g.fn.call(g.context,l,d),!0;case 4:return g.fn.call(g.context,l,d,h),!0;case 5:return g.fn.call(g.context,l,d,h,p),!0;case 6:return g.fn.call(g.context,l,d,h,p,m),!0}for(S=1,b=new Array(y-1);S<y;S++)b[S-1]=arguments[S];g.fn.apply(g.context,b)}else{var w=g.length,k;for(S=0;S<w;S++)switch(g[S].once&&this.removeListener(u,g[S].fn,void 0,!0),y){case 1:g[S].fn.call(g[S].context);break;case 2:g[S].fn.call(g[S].context,l);break;case 3:g[S].fn.call(g[S].context,l,d);break;case 4:g[S].fn.call(g[S].context,l,d,h);break;default:if(!b)for(k=1,b=new Array(y-1);k<y;k++)b[k-1]=arguments[k];g[S].fn.apply(g[S].context,b)}}return!0},a.prototype.on=function(u,l,d){return o(this,u,l,d,!1)},a.prototype.once=function(u,l,d){return o(this,u,l,d,!0)},a.prototype.removeListener=function(u,l,d,h){var p=t?t+u:u;if(!this._events[p])return this;if(!l)return s(this,p),this;var m=this._events[p];if(m.fn)m.fn===l&&(!h||m.once)&&(!d||m.context===d)&&s(this,p);else{for(var f=0,g=[],y=m.length;f<y;f++)(m[f].fn!==l||h&&!m[f].once||d&&m[f].context!==d)&&g.push(m[f]);g.length?this._events[p]=g.length===1?g[0]:g:s(this,p)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=t?t+u:u,this._events[l]&&s(this,l)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(yy);var LP=yy.exports;const nh=DP(LP);var ih=function(n,e){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},ih(n,e)};function an(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ih(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var rh=function(){return rh=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},rh.apply(this,arguments)};function Mt(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(l){try{u(i.next(l))}catch(d){s(d)}}function c(l){try{u(i.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):r(l.value).then(a,c)}u((i=i.apply(n,e||[])).next())})}function xt(n,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return c([u,l])}}function c(u){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(t=0)),t;)try{if(i=1,r&&(o=u[0]&2?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,r=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){t.label=u[1];break}if(u[0]===6&&t.label<o[1]){t.label=o[1],o=u;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(u);break}o[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(n,t)}catch(l){u=[6,l],r=0}finally{i=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Ja(n,e,t){if(t||arguments.length===2)for(var i=0,r=e.length,o;i<r;i++)(o||!(i in e))&&(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return n.concat(o||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;for(var Gn=function(){function n(e,t,i,r){this.left=e,this.top=t,this.width=i,this.height=r}return n.prototype.add=function(e,t,i,r){return new n(this.left+e,this.top+t,this.width+i,this.height+r)},n.fromClientRect=function(e,t){return new n(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},n.fromDOMRectList=function(e,t){var i=Array.from(t).find(function(r){return r.width!==0});return i?new n(i.left+e.windowBounds.left,i.top+e.windowBounds.top,i.width,i.height):n.EMPTY},n.EMPTY=new n(0,0,0,0),n}(),Za=function(n,e){return Gn.fromClientRect(n,e.getBoundingClientRect())},UP=function(n){var e=n.body,t=n.documentElement;if(!e||!t)throw new Error("Unable to get document size");var i=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),r=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new Gn(0,0,i,r)},Qa=function(n){for(var e=[],t=0,i=n.length;t<i;){var r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){var o=n.charCodeAt(t++);(o&64512)===56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},nt=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var t=n.length;if(!t)return"";for(var i=[],r=-1,o="";++r<t;){var s=n[r];s<=65535?i.push(s):(s-=65536,i.push((s>>10)+55296,s%1024+56320)),(r+1===t||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},by="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FP=typeof Uint8Array>"u"?[]:new Uint8Array(256),ec=0;ec<by.length;ec++)FP[by.charCodeAt(ec)]=ec;typeof SuppressedError=="function"&&SuppressedError;for(var _y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",BP=typeof Uint8Array>"u"?[]:new Uint8Array(256),tc=0;tc<_y.length;tc++)BP[_y.charCodeAt(tc)]=tc;for(var ky="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jP=typeof Uint8Array>"u"?[]:new Uint8Array(256),nc=0;nc<ky.length;nc++)jP[ky.charCodeAt(nc)]=nc;var VP=1,Sy=2,wy=3,zP=5,Cy=8,Ty=10,qP=25,WP=30,GP=37,$P=42,xy="!",fi="\xD7",HP="\xF7",Ey=[VP,Sy,wy,zP],KP=[Ty,Cy],YP=function(n,e){var t=[],i=[],r=[];return n.forEach(function(o,s){throw new Error("UnicodeTrie not initialized")}),[i,t,r]},XP=function(n,e){for(var t=n;t>=0;){var i=e[t];if(i===Ty)t--;else return i}return 0},JP=function(n,e,t,i,r){if(t[i]===0)return fi;var o=i-1;if(Array.isArray(r)&&r[o]===!0)return fi;var s=o-1,a=o+1,c=e[o];s>=0&&e[s];var u=e[a];if(c===Sy&&u===wy)return fi;if(Ey.indexOf(c)!==-1)return xy;if(Ey.indexOf(u)!==-1||KP.indexOf(u)!==-1)return fi;if(XP(o,e)===Cy)return HP;throw new Error("UnicodeTrie not initialized")},ZP=function(n,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=YP(n,e.lineBreak),i=t[0],r=t[1],o=t[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(r=r.map(function(a){return[qP,WP,$P].indexOf(a)!==-1?GP:a}));var s=e.wordBreak==="keep-all"?o.map(function(a,c){return a&&n[c]>=19968&&n[c]<=40959}):void 0;return[i,r,s]},QP=function(){function n(e,t,i,r){this.codePoints=e,this.required=t===xy,this.start=i,this.end=r}return n.prototype.slice=function(){return nt.apply(void 0,this.codePoints.slice(this.start,this.end))},n}(),e2=function(n,e){var t=Qa(n),i=ZP(t,e),r=i[0],o=i[1],s=i[2],a=t.length,c=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var l=fi;u<a&&(l=JP(t,o,r,++u,s))===fi;);if(l!==fi||u===a){var d=new QP(t,l,c,u);return c=u,{value:d,done:!1}}return{done:!0,value:null}}}},t2=1,n2=2,Jo=4,Iy=8,ic=10,Ry=47,Zo=92,i2=9,r2=32,rc=34,Qo=61,o2=35,s2=36,a2=37,oc=39,sc=40,es=41,c2=95,Ft=45,u2=33,l2=60,d2=62,h2=64,p2=91,f2=93,m2=61,g2=123,ac=63,v2=125,Py=124,y2=126,b2=128,Oy=65533,oh=42,Yi=43,_2=44,k2=58,S2=59,ts=46,w2=0,C2=8,T2=11,x2=14,E2=31,I2=127,xn=-1,Ay=48,My=97,Ny=101,R2=102,P2=117,O2=122,Dy=65,Ly=69,Uy=70,A2=85,M2=90,Et=function(n){return n>=Ay&&n<=57},N2=function(n){return n>=55296&&n<=57343},zr=function(n){return Et(n)||n>=Dy&&n<=Uy||n>=My&&n<=R2},D2=function(n){return n>=My&&n<=O2},L2=function(n){return n>=Dy&&n<=M2},U2=function(n){return D2(n)||L2(n)},F2=function(n){return n>=b2},cc=function(n){return n===ic||n===i2||n===r2},uc=function(n){return U2(n)||F2(n)||n===c2},Fy=function(n){return uc(n)||Et(n)||n===Ft},B2=function(n){return n>=w2&&n<=C2||n===T2||n>=x2&&n<=E2||n===I2},mi=function(n,e){return n!==Zo?!1:e!==ic},lc=function(n,e,t){return n===Ft?uc(e)||mi(e,t):uc(n)?!0:!!(n===Zo&&mi(n,e))},sh=function(n,e,t){return n===Yi||n===Ft?Et(e)?!0:e===ts&&Et(t):Et(n===ts?e:n)},j2=function(n){var e=0,t=1;(n[e]===Yi||n[e]===Ft)&&(n[e]===Ft&&(t=-1),e++);for(var i=[];Et(n[e]);)i.push(n[e++]);var r=i.length?parseInt(nt.apply(void 0,i),10):0;n[e]===ts&&e++;for(var o=[];Et(n[e]);)o.push(n[e++]);var s=o.length,a=s?parseInt(nt.apply(void 0,o),10):0;(n[e]===Ly||n[e]===Ny)&&e++;var c=1;(n[e]===Yi||n[e]===Ft)&&(n[e]===Ft&&(c=-1),e++);for(var u=[];Et(n[e]);)u.push(n[e++]);var l=u.length?parseInt(nt.apply(void 0,u),10):0;return t*(r+a*Math.pow(10,-s))*Math.pow(10,c*l)},V2={type:2},z2={type:3},q2={type:4},W2={type:13},G2={type:8},$2={type:21},H2={type:9},K2={type:10},Y2={type:11},X2={type:12},J2={type:14},dc={type:23},Z2={type:1},Q2={type:25},eO={type:24},tO={type:26},nO={type:27},iO={type:28},rO={type:29},oO={type:31},ah={type:32},By=function(){function n(){this._value=[]}return n.prototype.write=function(e){this._value=this._value.concat(Qa(e))},n.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==ah;)e.push(t),t=this.consumeToken();return e},n.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case rc:return this.consumeStringToken(rc);case o2:var t=this.peekCodePoint(0),i=this.peekCodePoint(1),r=this.peekCodePoint(2);if(Fy(t)||mi(i,r)){var o=lc(t,i,r)?n2:t2,s=this.consumeName();return{type:5,value:s,flags:o}}break;case s2:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),W2;break;case oc:return this.consumeStringToken(oc);case sc:return V2;case es:return z2;case oh:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),J2;break;case Yi:if(sh(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case _2:return q2;case Ft:var a=e,c=this.peekCodePoint(0),u=this.peekCodePoint(1);if(sh(a,c,u))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(lc(a,c,u))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(c===Ft&&u===d2)return this.consumeCodePoint(),this.consumeCodePoint(),eO;break;case ts:if(sh(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Ry:if(this.peekCodePoint(0)===oh)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===oh&&(l=this.consumeCodePoint(),l===Ry))return this.consumeToken();if(l===xn)return this.consumeToken()}break;case k2:return tO;case S2:return nO;case l2:if(this.peekCodePoint(0)===u2&&this.peekCodePoint(1)===Ft&&this.peekCodePoint(2)===Ft)return this.consumeCodePoint(),this.consumeCodePoint(),Q2;break;case h2:var d=this.peekCodePoint(0),h=this.peekCodePoint(1),p=this.peekCodePoint(2);if(lc(d,h,p)){var s=this.consumeName();return{type:7,value:s}}break;case p2:return iO;case Zo:if(mi(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case f2:return rO;case m2:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),G2;break;case g2:return Y2;case v2:return X2;case P2:case A2:var m=this.peekCodePoint(0),f=this.peekCodePoint(1);return m===Yi&&(zr(f)||f===ac)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case Py:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),H2;if(this.peekCodePoint(0)===Py)return this.consumeCodePoint(),$2;break;case y2:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),K2;break;case xn:return ah}return cc(e)?(this.consumeWhiteSpace(),oO):Et(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):uc(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:nt(e)}},n.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},n.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},n.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},n.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();zr(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var i=!1;t===ac&&e.length<6;)e.push(t),t=this.consumeCodePoint(),i=!0;if(i){var r=parseInt(nt.apply(void 0,e.map(function(c){return c===ac?Ay:c})),16),o=parseInt(nt.apply(void 0,e.map(function(c){return c===ac?Uy:c})),16);return{type:30,start:r,end:o}}var s=parseInt(nt.apply(void 0,e),16);if(this.peekCodePoint(0)===Ft&&zr(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var a=[];zr(t)&&a.length<6;)a.push(t),t=this.consumeCodePoint();var o=parseInt(nt.apply(void 0,a),16);return{type:30,start:s,end:o}}else return{type:30,start:s,end:s}},n.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===sc?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===sc?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},n.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===xn)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===oc||t===rc){var i=this.consumeStringToken(this.consumeCodePoint());return i.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===xn||this.peekCodePoint(0)===es)?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),dc)}for(;;){var r=this.consumeCodePoint();if(r===xn||r===es)return{type:22,value:nt.apply(void 0,e)};if(cc(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===xn||this.peekCodePoint(0)===es?(this.consumeCodePoint(),{type:22,value:nt.apply(void 0,e)}):(this.consumeBadUrlRemnants(),dc);if(r===rc||r===oc||r===sc||B2(r))return this.consumeBadUrlRemnants(),dc;if(r===Zo)if(mi(r,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),dc;else e.push(r)}},n.prototype.consumeWhiteSpace=function(){for(;cc(this.peekCodePoint(0));)this.consumeCodePoint()},n.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===es||e===xn)return;mi(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},n.prototype.consumeStringSlice=function(e){for(var t=5e4,i="";e>0;){var r=Math.min(t,e);i+=nt.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),i},n.prototype.consumeStringToken=function(e){var t="",i=0;do{var r=this._value[i];if(r===xn||r===void 0||r===e)return t+=this.consumeStringSlice(i),{type:0,value:t};if(r===ic)return this._value.splice(0,i),Z2;if(r===Zo){var o=this._value[i+1];o!==xn&&o!==void 0&&(o===ic?(t+=this.consumeStringSlice(i),i=-1,this._value.shift()):mi(r,o)&&(t+=this.consumeStringSlice(i),t+=nt(this.consumeEscapedCodePoint()),i=-1))}i++}while(!0)},n.prototype.consumeNumber=function(){var e=[],t=Jo,i=this.peekCodePoint(0);for((i===Yi||i===Ft)&&e.push(this.consumeCodePoint());Et(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(i===ts&&Et(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Iy;Et(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),r=this.peekCodePoint(1);var o=this.peekCodePoint(2);if((i===Ly||i===Ny)&&((r===Yi||r===Ft)&&Et(o)||Et(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Iy;Et(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[j2(e),t]},n.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],i=e[1],r=this.peekCodePoint(0),o=this.peekCodePoint(1),s=this.peekCodePoint(2);if(lc(r,o,s)){var a=this.consumeName();return{type:15,number:t,flags:i,unit:a}}return r===a2?(this.consumeCodePoint(),{type:16,number:t,flags:i}):{type:17,number:t,flags:i}},n.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(zr(e)){for(var t=nt(e);zr(this.peekCodePoint(0))&&t.length<6;)t+=nt(this.consumeCodePoint());cc(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(t,16);return i===0||N2(i)||i>1114111?Oy:i}return e===xn?Oy:e},n.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Fy(t))e+=nt(t);else if(mi(t,this.peekCodePoint(0)))e+=nt(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},n}(),jy=function(){function n(e){this._tokens=e}return n.create=function(e){var t=new By;return t.write(e),new n(t.read())},n.parseValue=function(e){return n.create(e).parseComponentValue()},n.parseValues=function(e){return n.create(e).parseComponentValues()},n.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},n.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},n.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},n.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},i=this.consumeToken();;){if(i.type===32||aO(i,e))return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue()),i=this.consumeToken()}},n.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var i=this.consumeToken();if(i.type===32||i.type===3)return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue())}},n.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?ah:e},n.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},n}(),gi=function(n){return n.type===15},st=function(n){return n.type===17},ue=function(n){return n.type===20},sO=function(n){return n.type===0},ch=function(n,e){return ue(n)&&n.value===e},Vy=function(n){return n.type!==31},vt=function(n){return n.type!==31&&n.type!==4},En=function(n){var e=[],t=[];return n.forEach(function(i){if(i.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(t),t=[];return}i.type!==31&&t.push(i)}),t.length&&e.push(t),e},aO=function(n,e){return e===11&&n.type===12||e===28&&n.type===29?!0:e===2&&n.type===3},vi=function(n){return n.type===17||n.type===15},Be=function(n){return n.type===16||vi(n)},zy=function(n){return n.length>1?[n[0],n[1]]:[n[0]]},yt={type:17,number:0,flags:Jo},uh={type:16,number:50,flags:Jo},yi={type:16,number:100,flags:Jo},ns=function(n,e,t){var i=n[0],r=n[1];return[Ee(i,e),Ee(typeof r<"u"?r:i,t)]},Ee=function(n,e){if(n.type===16)return n.number/100*e;if(gi(n))switch(n.unit){case"rem":case"em":return 16*n.number;case"px":default:return n.number}return n.number},qy="deg",Wy="grad",Gy="rad",$y="turn",hc={name:"angle",parse:function(n,e){if(e.type===15)switch(e.unit){case qy:return Math.PI*e.number/180;case Wy:return Math.PI/200*e.number;case Gy:return e.number;case $y:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},Hy=function(n){return n.type===15&&(n.unit===qy||n.unit===Wy||n.unit===Gy||n.unit===$y)},Ky=function(n){var e=n.filter(ue).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[yt,yt];case"to top":case"bottom":return Xt(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[yt,yi];case"to right":case"left":return Xt(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[yi,yi];case"to bottom":case"top":return Xt(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[yi,yt];case"to left":case"right":return Xt(270)}return 0},Xt=function(n){return Math.PI*n/180},bi=function(n){return(255&n)===0},pt=function(n){var e=255&n,t=255&n>>8,i=255&n>>16,r=255&n>>24;return e<255?"rgba(".concat(r,",").concat(i,",").concat(t,",").concat(e/255,")"):"rgb(".concat(r,",").concat(i,",").concat(t,")")},In=function(n,e,t,i){return(n<<24|e<<16|t<<8|Math.round(i*255)<<0)>>>0},pc=function(n,e){if(n.type===17)return n.number;if(n.type===16){var t=e===3?1:255;return e===3?n.number/100*t:Math.round(n.number/100*t)}return 0},Xi=function(n){return(n[0].type===20?n[0].value:"unknown")==="from"},Ke=function(n,e,t){return Math.min(Math.max(n,e),t)},Bt=function(n,e){return[n[0]*e[0]+n[1]*e[1]+n[2]*e[2],n[3]*e[0]+n[4]*e[1]+n[5]*e[2],n[6]*e[0]+n[7]*e[1]+n[8]*e[2]]},cO=function(n){return In(Ke(Math.round(n[0]*255),0,255),Ke(Math.round(n[1]*255),0,255),Ke(Math.round(n[2]*255),0,255),Ke(n[3],0,1))},lh=function(n){var e=n[0],t=n[1],i=n[2],r=n[3],o=Ji([e,t,i]);return In(Ke(Math.round(o[0]*255),0,255),Ke(Math.round(o[1]*255),0,255),Ke(Math.round(o[2]*255),0,255),r)},is=function(n){var e=_i([n[0],n[1],n[2]]);return lh([e[0],e[1],e[2],n[3]])},uO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for lab()");var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(vc([i,r,o])));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},lO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for oklab()");var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(gc([i,r,o])));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},dO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for oklch()");var t=Zy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(gc(mc([i,r,o]))));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},hO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for lch()");var t=Jy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(vc(mc([i,r,o]))));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},Yy=function(n,e){var t=e.filter(vt),i=t[0],r=t[1],o=t[2],s=t[3],a=(i.type===17?Xt(i.number):hc.parse(n,i))/(Math.PI*2),c=Be(r)?r.number/100:0,u=Be(o)?o.number/100:0,l=typeof s<"u"&&Be(s)?Ee(s,1):1;return[a,c,u,l]},Xy=function(n,e){if(Xi(e))throw new Error("Relative color not supported for hsl()");var t=Yy(n,e),i=t[0],r=t[1],o=t[2],s=t[3],a=eb([i,r,o]);return In(a[0]*255,a[1]*255,a[2]*255,r===0?1:s)},Jy=function(n){var e=n.filter(vt),t=Be(e[0])?e[0].number:0,i=Be(e[1])?e[1].number:0,r=st(e[2])||gi(e[2])?e[2].number:0,o=typeof e[4]<"u"&&Be(e[4])?Ee(e[4],1):1;return[t,i,r,o]},fc=function(n){var e=n.filter(vt),t=e[0].type===16?e[0].number/100:st(e[0])?e[0].number:0,i=e[1].type===16?e[1].number/100:st(e[1])?e[1].number:0,r=st(e[2])||gi(e[2])?e[2].number:0,o=typeof e[4]<"u"&&Be(e[4])?Ee(e[4],1):1;return[t,i,r,o]},Zy=function(n){var e=n.filter(vt),t=e[0].type===16?e[0].number/100:st(e[0])?e[0].number:0,i=e[1].type===16?e[1].number/100:st(e[1])?e[1].number:0,r=st(e[2])||gi(e[2])?e[2].number:0,o=typeof e[4]<"u"&&Be(e[4])?Ee(e[4],1):1;return[t,i,r,o]},Qy=function(n){return Bt([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],n)},dh=function(n){return Bt([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],n)},hh=function(n,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-n)*t*6+n:t<1/2?e:t<2/3?(e-n)*6*(2/3-t)+n:n},eb=function(n){var e=n[0],t=n[1],i=n[2];if(t===0)return[i*255,i*255,i*255];var r=i<=.5?i*(t+1):i+t-i*t,o=i*2-r,s=hh(o,r,e+1/3),a=hh(o,r,e),c=hh(o,r,e-1/3);return[s,a,c]},mc=function(n){var e=n[0],t=n[1],i=n[2];return t<0&&(t=0),isNaN(i)&&(i=0),[e,t*Math.cos(i*Math.PI/180),t*Math.sin(i*Math.PI/180)]},gc=function(n){var e=Bt([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],n),t=e.map(function(i){return Math.pow(i,3)});return Bt([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],t)},vc=function(n){var e=(n[0]+16)/116,t=n[1]/500+e,i=e-n[2]/200,r=24389/27,o=24/116,s=[(t>o?Math.pow(t,3):(116*t-16)/r)*.3457/.3585,n[0]>8?Math.pow(e,3):n[0]/r,(i>o?Math.pow(i,3):(116*i-16)/r)*(1-.3457-.3585)/.3585];return dh([s[0],s[1],s[2]])},pO=function(n,e){var t=e.filter(vt);if(t.length===3){var i=t.map(pc),r=i[0],o=i[1],s=i[2],a=fh([r/255,o/255,s/255]),c=ph([a[0],a[1],a[2]]),u=c[0],l=c[1],d=c[2];return[u,l,d,1]}if(t.length===4){var h=t.map(pc),r=h[0],o=h[1],s=h[2],p=h[3],a=fh([r/255,o/255,s/255]),m=ph([a[0],a[1],a[2]]),u=m[0],l=m[1],d=m[2];return[u,l,d,p]}return[0,0,0,1]},fO=function(n,e){var t=Yy(n,e),i=t[0],r=t[1],o=t[2],s=t[3],a=fh(eb([i,r,o])),c=ph([a[0],a[1],a[2]]),u=c[0],l=c[1],d=c[2];return[u,l,d,s]},mO=function(n,e){var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=vc([i,r,o]),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},gO=function(n,e){var t=Jy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=vc(mc([i,r,o])),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},vO=function(n,e){var t=Zy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=gc(mc([i,r,o])),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},yO=function(n,e){var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=gc([i,r,o]),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},bO=function(n){return dh([n[0],n[1],n[2]])},tb=function(n){return n},_O=function(n){var e=Qy([n[0],n[2],n[3]]),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},nb=function(n){return is([n[0],n[1],n[2],n[3]])},kO=function(n){var e=bO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},_i=function(n){return Bt([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],n)},ph=function(n){return Bt([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],n)},Ji=function(n){return n.map(function(e){var t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*Math.pow(i,1/2.4)-.055):12.92*e})},fh=function(n){return n.map(function(e){var t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*Math.pow((i+.055)/1.055,2.4)})},SO=function(n){var e=Ji(_i([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},wO=function(n){var e=_i([n[0],n[1],n[2]]),t=e[0],i=e[1],r=e[2];return[Ke(Math.round(t*255),0,255),Ke(Math.round(i*255),0,255),Ke(Math.round(r*255),0,255),n[3]]},CO=function(n){return Bt([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],n)},TO=function(n){return Bt([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],n)},xO=function(n){return n.map(function(e){var t=e<0?-1:1,i=e*t;return i<=.04045?e/12.92:t*Math.pow((e+.055)/1.055,2.4)||0})},EO=function(n){return Ji(n)},IO=function(n){var e=xO([n[0],n[1],n[2]]);return CO([e[0],e[1],e[2]])},RO=function(n){var e=EO(TO([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},PO=function(n){var e=IO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},OO=function(n){return Bt([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],n)},AO=function(n){return Bt([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],n)},MO=function(n){var e=n.map(function(t){var i=t<0?-1:1,r=Math.abs(t);return i*Math.pow(r,2.19921875)});return[e[0],e[1],e[2]]},NO=function(n){var e=n.map(function(t){var i=t<0?-1:1,r=Math.abs(t);return i*Math.pow(r,.4547069271758437)});return[e[0],e[1],e[2]]},DO=function(n){var e=NO(OO([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},LO=function(n){var e=_i(AO(MO([n[0],n[1],n[2]])));return lh([e[0],e[1],e[2],n[3]])},UO=function(n){return Bt([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],n)},FO=function(n){return Bt([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],n)},BO=function(n){return n.map(function(e){return e<16/512?e/16:Math.pow(e,1.8)})},jO=function(n){return n.map(function(e){return e>1/512?Math.pow(e,1/1.8):e*16})},VO=function(n){var e=BO([n[0],n[1],n[2]]);return dh(UO([e[0],e[1],e[2]]))},zO=function(n){var e=jO(FO(Qy([n[0],n[1],n[2]]))),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},qO=function(n){var e=VO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},yc=1.09929682680944,ib=.018053968510807,WO=function(n){return n.map(function(e){return e<ib*4.5?e/4.5:Math.pow((e+yc-1)/yc,1/.45)})},GO=function(n){return n.map(function(e){return e>=ib?yc*Math.pow(e,.45)-(yc-1):4.5*e})},$O=function(n){return Bt([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],n)},HO=function(n){return Bt([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],n)},KO=function(n){var e=WO([n[0],n[1],n[2]]);return $O([e[0],e[1],e[2]])},YO=function(n){var e=GO(HO([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},XO=function(n){var e=KO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},ki={name:"color",parse:function(n,e){if(e.type===18){var t=eA[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported color function "'.concat(e.name,'"'));return t(n,e.values)}if(e.type===5){var i=rb(e),r=i[0],o=i[1],s=i[2],a=i[3];return In(r,o,s,a)}if(e.type===20){var c=Rn[e.value.toUpperCase()];if(typeof c<"u")return c}return Rn.TRANSPARENT}},rb=function(n){if(n.value.length===3){var e=n.value.substring(0,1),t=n.value.substring(1,2),i=n.value.substring(2,3);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(i+i,16),1]}if(n.value.length===4){var e=n.value.substring(0,1),t=n.value.substring(1,2),i=n.value.substring(2,3),r=n.value.substring(3,4);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(i+i,16),parseInt(r+r,16)/255]}if(n.value.length===6){var e=n.value.substring(0,2),t=n.value.substring(2,4),i=n.value.substring(4,6);return[parseInt(e,16),parseInt(t,16),parseInt(i,16),1]}if(n.value.length===8){var e=n.value.substring(0,2),t=n.value.substring(2,4),i=n.value.substring(4,6),r=n.value.substring(6,8);return[parseInt(e,16),parseInt(t,16),parseInt(i,16),parseInt(r,16)/255]}return[0,0,0,1]},ob=function(n,e){var t=e.filter(vt);if(Xi(t))throw new Error("Relative color not supported for rgb()");if(t.length===3){var i=t.map(pc),r=i[0],o=i[1],s=i[2];return In(r,o,s,1)}if(t.length===4){var a=t.map(pc),r=a[0],o=a[1],s=a[2],c=a[3];return In(r,o,s,c)}return 0},JO=function(n,e){var t=e.filter(vt),i=t[0].type===20?t[0].value:"unknown",r=!Xi(t);if(r){var o=i,s=sb[o];if(typeof s>"u")throw new Error('Attempting to parse an unsupported color space "'.concat(o,'" for color() function'));var a=st(t[1])?t[1].number:0,c=st(t[2])?t[2].number:0,u=st(t[3])?t[3].number:0,l=t.length>4&&t[4].type===6&&t[4].value==="/"&&st(t[5])?t[5].number:1;return s([a,c,u,l])}else{var d=function(W,A){if(st(A))return A.number;var H=function(Ie){return Ie==="r"||Ie==="x"?0:Ie==="g"||Ie==="y"?1:2};if(ue(A)){var Y=H(A.value);return W[Y]}var J=function(Ie){for(var dt=Ie.filter(vt),Ne="(",Pe=0,ie=dt;Pe<ie.length;Pe++){var Ze=ie[Pe];Ne+=Ze.type===18&&Ze.name==="calc"?J(Ze.values):st(Ze)?Ze.number:Ze.type===6||ue(Ze)?Ze.value:""}return Ne+=")",Ne};if(A.type===18){var ve=A.values.filter(vt);if(A.name==="calc"){var Me=J(ve).replace(/r|x/,W[0].toString()).replace(/g|y/,W[1].toString()).replace(/b|z/,W[2].toString());return new Function("return "+Me)()}}return null},h=t[1].type===18?t[1].name:ue(t[1])||t[1].type===5?"rgb":"unknown",p=ue(t[2])?t[2].value:"unknown",m=t[1].type===18?t[1].values:ue(t[1])?[t[1]]:[];if(ue(t[1])){var f=Rn[t[1].value.toUpperCase()];if(typeof f>"u")throw new Error("Attempting to use unknown color in relative color 'from'");var g=qr(n,t[1].value),y=255&g,b=255&g>>8,S=255&g>>16,w=255&g>>24;m=[{type:17,number:w,flags:1},{type:17,number:S,flags:1},{type:17,number:b,flags:1},{type:17,number:y>1?y/255:y,flags:1}]}else if(t[1].type===5){var k=rb(t[1]),w=k[0],S=k[1],b=k[2],y=k[3];m=[{type:17,number:w,flags:1},{type:17,number:S,flags:1},{type:17,number:b,flags:1},{type:17,number:y>1?y/255:y,flags:1}]}if(m.length===0)throw new Error("Attempting to use unknown color in relative color 'from'");if(p==="unknown")throw new Error("Attempting to use unknown colorspace in relative color 'to'");var C=ZO[h],x=QO[p],I=sb[p];if(typeof C>"u")throw new Error('Attempting to parse an unsupported color space "'.concat(h,'" for color() function'));if(typeof x>"u")throw new Error('Attempting to parse an unsupported color space "'.concat(p,'" for color() function'));var P=C(n,m),D=x(P),a=d(D,t[3]),c=d(D,t[4]),u=d(D,t[5]),l=t.length>6&&t[6].type===6&&t[6].value==="/"&&st(t[7])?t[7].number:1;if(a===null||c===null||u===null)throw new Error("Invalid relative color in color() function");return I([a,c,u,l])}},sb={srgb:cO,"srgb-linear":lh,"display-p3":PO,"a98-rgb":LO,"prophoto-rgb":qO,xyz:nb,"xyz-d50":kO,"xyz-d65":nb,rec2020:XO},ZO={rgb:pO,hsl:fO,lab:mO,lch:gO,oklab:yO,oklch:vO},QO={srgb:SO,"srgb-linear":wO,"display-p3":RO,"a98-rgb":DO,"prophoto-rgb":zO,xyz:tb,"xyz-d50":_O,"xyz-d65":tb,rec2020:YO},eA={hsl:Xy,hsla:Xy,rgb:ob,rgba:ob,lch:hO,oklch:dO,oklab:lO,lab:uO,color:JO},qr=function(n,e){return ki.parse(n,jy.create(e).parseComponentValue())},Rn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},tA={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(n,e){return e.map(function(t){if(ue(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},nA={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},bc=function(n,e){var t=ki.parse(n,e[0]),i=e[1];return i&&Be(i)?{color:t,stop:i}:{color:t,stop:null}},ab=function(n,e){var t=n[0],i=n[n.length-1];t.stop===null&&(t.stop=yt),i.stop===null&&(i.stop=yi);for(var r=[],o=0,s=0;s<n.length;s++){var a=n[s].stop;if(a!==null){var c=Ee(a,e);c>o?r.push(c):r.push(o),o=c}else r.push(null)}for(var u=null,s=0;s<r.length;s++){var l=r[s];if(l===null)u===null&&(u=s);else if(u!==null){for(var d=s-u,h=r[u-1],p=(l-h)/(d+1),m=1;m<=d;m++)r[u+m-1]=p*m;u=null}}return n.map(function(f,g){var y=f.color;return{color:y,stop:Math.max(Math.min(1,r[g]/e),0)}})},iA=function(n,e,t){var i=e/2,r=t/2,o=Ee(n[0],e)-i,s=r-Ee(n[1],t);return(Math.atan2(s,o)+Math.PI*2)%(Math.PI*2)},rA=function(n,e,t){var i=typeof n=="number"?n:iA(n,e,t),r=Math.abs(e*Math.sin(i))+Math.abs(t*Math.cos(i)),o=e/2,s=t/2,a=r/2,c=Math.sin(i-Math.PI/2)*a,u=Math.cos(i-Math.PI/2)*a;return[r,o-u,o+u,s-c,s+c]},cn=function(n,e){return Math.sqrt(n*n+e*e)},cb=function(n,e,t,i,r){var o=[[0,0],[0,e],[n,0],[n,e]];return o.reduce(function(s,a){var c=a[0],u=a[1],l=cn(t-c,i-u);return(r?l<s.optimumDistance:l>s.optimumDistance)?{optimumCorner:a,optimumDistance:l}:s},{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},oA=function(n,e,t,i,r){var o=0,s=0;switch(n.size){case 0:n.shape===0?o=s=Math.min(Math.abs(e),Math.abs(e-i),Math.abs(t),Math.abs(t-r)):n.shape===1&&(o=Math.min(Math.abs(e),Math.abs(e-i)),s=Math.min(Math.abs(t),Math.abs(t-r)));break;case 2:if(n.shape===0)o=s=Math.min(cn(e,t),cn(e,t-r),cn(e-i,t),cn(e-i,t-r));else if(n.shape===1){var a=Math.min(Math.abs(t),Math.abs(t-r))/Math.min(Math.abs(e),Math.abs(e-i)),c=cb(i,r,e,t,!0),u=c[0],l=c[1];o=cn(u-e,(l-t)/a),s=a*o}break;case 1:n.shape===0?o=s=Math.max(Math.abs(e),Math.abs(e-i),Math.abs(t),Math.abs(t-r)):n.shape===1&&(o=Math.max(Math.abs(e),Math.abs(e-i)),s=Math.max(Math.abs(t),Math.abs(t-r)));break;case 3:if(n.shape===0)o=s=Math.max(cn(e,t),cn(e,t-r),cn(e-i,t),cn(e-i,t-r));else if(n.shape===1){var a=Math.max(Math.abs(t),Math.abs(t-r))/Math.max(Math.abs(e),Math.abs(e-i)),d=cb(i,r,e,t,!1),u=d[0],l=d[1];o=cn(u-e,(l-t)/a),s=a*o}break}return Array.isArray(n.size)&&(o=Ee(n.size[0],i),s=n.size.length===2?Ee(n.size[1],r):o),[o,s]},sA=function(n,e){var t=Xt(180),i=[];return En(e).forEach(function(r,o){if(o===0){var s=r[0];if(s.type===20&&s.value==="to"){t=Ky(r);return}else if(Hy(s)){t=hc.parse(n,s);return}}var a=bc(n,r);i.push(a)}),{angle:t,stops:i,type:1}},_c=function(n,e){var t=Xt(180),i=[];return En(e).forEach(function(r,o){if(o===0){var s=r[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){t=Ky(r);return}else if(Hy(s)){t=(hc.parse(n,s)+Xt(270))%Xt(360);return}}var a=bc(n,r);i.push(a)}),{angle:t,stops:i,type:1}},aA=function(n,e){var t=Xt(180),i=[],r=1,o=0,s=3,a=[];return En(e).forEach(function(c,u){var l=c[0];if(u===0){if(ue(l)&&l.value==="linear"){r=1;return}else if(ue(l)&&l.value==="radial"){r=2;return}}if(l.type===18){if(l.name==="from"){var d=ki.parse(n,l.values[0]);i.push({stop:yt,color:d})}else if(l.name==="to"){var d=ki.parse(n,l.values[0]);i.push({stop:yi,color:d})}else if(l.name==="color-stop"){var h=l.values.filter(vt);if(h.length===2){var d=ki.parse(n,h[1]),p=h[0];st(p)&&i.push({stop:{type:16,number:p.number*100,flags:p.flags},color:d})}}}}),r===1?{angle:(t+Xt(180))%Xt(360),stops:i,type:r}:{size:s,shape:o,stops:i,position:a,type:r}},ub="closest-side",lb="farthest-side",db="closest-corner",hb="farthest-corner",pb="circle",fb="ellipse",mb="cover",gb="contain",cA=function(n,e){var t=0,i=3,r=[],o=[];return En(e).forEach(function(s,a){var c=!0;if(a===0){var u=!1;c=s.reduce(function(d,h){if(u)if(ue(h))switch(h.value){case"center":return o.push(uh),d;case"top":case"left":return o.push(yt),d;case"right":case"bottom":return o.push(yi),d}else(Be(h)||vi(h))&&o.push(h);else if(ue(h))switch(h.value){case pb:return t=0,!1;case fb:return t=1,!1;case"at":return u=!0,!1;case ub:return i=0,!1;case mb:case lb:return i=1,!1;case gb:case db:return i=2,!1;case hb:return i=3,!1}else if(vi(h)||Be(h))return Array.isArray(i)||(i=[]),i.push(h),!1;return d},c)}if(c){var l=bc(n,s);r.push(l)}}),{size:i,shape:t,stops:r,position:o,type:2}},kc=function(n,e){var t=0,i=3,r=[],o=[];return En(e).forEach(function(s,a){var c=!0;if(a===0?c=s.reduce(function(l,d){if(ue(d))switch(d.value){case"center":return o.push(uh),!1;case"top":case"left":return o.push(yt),!1;case"right":case"bottom":return o.push(yi),!1}else if(Be(d)||vi(d))return o.push(d),!1;return l},c):a===1&&(c=s.reduce(function(l,d){if(ue(d))switch(d.value){case pb:return t=0,!1;case fb:return t=1,!1;case gb:case ub:return i=0,!1;case lb:return i=1,!1;case db:return i=2,!1;case mb:case hb:return i=3,!1}else if(vi(d)||Be(d))return Array.isArray(i)||(i=[]),i.push(d),!1;return l},c)),c){var u=bc(n,s);r.push(u)}}),{size:i,shape:t,stops:r,position:o,type:2}},uA=function(n){return n.type===1},lA=function(n){return n.type===2},mh={name:"image",parse:function(n,e){if(e.type===22){var t={url:e.value,type:0};return n.cache.addImage(e.value),t}if(e.type===18){var i=vb[e.name];if(typeof i>"u")throw new Error('Attempting to parse an unsupported image function "'.concat(e.name,'"'));return i(n,e.values)}throw new Error("Unsupported image type ".concat(e.type))}};function dA(n){return!(n.type===20&&n.value==="none")&&(n.type!==18||!!vb[n.name])}var vb={"linear-gradient":sA,"-moz-linear-gradient":_c,"-ms-linear-gradient":_c,"-o-linear-gradient":_c,"-webkit-linear-gradient":_c,"radial-gradient":cA,"-moz-radial-gradient":kc,"-ms-radial-gradient":kc,"-o-radial-gradient":kc,"-webkit-radial-gradient":kc,"-webkit-gradient":aA},hA={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(n,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e.filter(function(i){return vt(i)&&dA(i)}).map(function(i){return mh.parse(n,i)})}},pA={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(n,e){return e.map(function(t){if(ue(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},fA={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(n,e){return En(e).map(function(t){return t.filter(Be)}).map(zy)}},mA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(n,e){return En(e).map(function(t){return t.filter(ue).map(function(i){return i.value}).join(" ")}).map(gA)}},gA=function(n){switch(n){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Wr;(function(n){n.AUTO="auto",n.CONTAIN="contain",n.COVER="cover"})(Wr||(Wr={}));var vA={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(n,e){return En(e).map(function(t){return t.filter(yA)})}},yA=function(n){return ue(n)||Be(n)},Sc=function(n){return{name:"border-".concat(n,"-color"),initialValue:"transparent",prefix:!1,type:3,format:"color"}},bA=Sc("top"),_A=Sc("right"),kA=Sc("bottom"),SA=Sc("left"),wc=function(n){return{name:"border-radius-".concat(n),initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return zy(t.filter(Be))}}},wA=wc("top-left"),CA=wc("top-right"),TA=wc("bottom-right"),xA=wc("bottom-left"),Cc=function(n){return{name:"border-".concat(n,"-style"),initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},EA=Cc("top"),IA=Cc("right"),RA=Cc("bottom"),PA=Cc("left"),Tc=function(n){return{name:"border-".concat(n,"-width"),initialValue:"0",type:0,prefix:!1,parse:function(e,t){return gi(t)?t.number:0}}},OA=Tc("top"),AA=Tc("right"),MA=Tc("bottom"),NA=Tc("left"),DA={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},LA={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(n,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},UA={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).reduce(function(t,i){return t|FA(i.value)},0)}},FA=function(n){switch(n){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},BA={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},jA={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(n,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},xc;(function(n){n.NORMAL="normal",n.STRICT="strict"})(xc||(xc={}));var VA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"strict":return xc.STRICT;case"normal":default:return xc.NORMAL}}},zA={name:"line-height",initialValue:"normal",prefix:!1,type:4},yb=function(n,e){return ue(n)&&n.value==="normal"?1.2*e:n.type===17?e*n.number:Be(n)?Ee(n,e):e},qA={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(n,e){return e.type===20&&e.value==="none"?null:mh.parse(n,e)}},WA={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(n,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},gh={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 52;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Ec=function(n){return{name:"margin-".concat(n),initialValue:"0",prefix:!1,type:4}},GA=Ec("top"),$A=Ec("right"),HA=Ec("bottom"),KA=Ec("left"),YA={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},XA={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ic=function(n){return{name:"padding-".concat(n),initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},JA=Ic("top"),ZA=Ic("right"),QA=Ic("bottom"),eM=Ic("left"),tM={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(n,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},nM={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(n,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},iM={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,e){return e.length===1&&ch(e[0],"none")?[]:En(e).map(function(t){for(var i={color:Rn.TRANSPARENT,offsetX:yt,offsetY:yt,blur:yt},r=0,o=0;o<t.length;o++){var s=t[o];vi(s)?(r===0?i.offsetX=s:r===1?i.offsetY=s:i.blur=s,r++):i.color=ki.parse(n,s)}return i})}},rM={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},oM={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(n,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var t=cM[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'.concat(e.name,'"'));return t(e.values)}return null}},sM=function(n){var e=n.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},aM=function(n){var e=n.filter(function(c){return c.type===17}).map(function(c){return c.number}),t=e[0],i=e[1];e[2],e[3];var r=e[4],o=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var s=e[12],a=e[13];return e[14],e[15],e.length===16?[t,i,r,o,s,a]:null},cM={matrix:sM,matrix3d:aM},bb={type:16,number:50,flags:Jo},uM=[bb,bb],lM={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(n,e){var t=e.filter(Be);return t.length!==2?uM:[t[0],t[1]]}},dM={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},rs;(function(n){n.NORMAL="normal",n.BREAK_ALL="break-all",n.KEEP_ALL="keep-all"})(rs||(rs={}));var hM={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"break-all":return rs.BREAK_ALL;case"keep-all":return rs.KEEP_ALL;case"normal":default:return rs.NORMAL}}},pM={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(n,e){if(e.type===20)return{auto:!0,order:0};if(st(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},_b={name:"time",parse:function(n,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},fM={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(n,e){return st(e)?e.number:1}},mM={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gM={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},vM={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(n,e){var t=[],i=[];return e.forEach(function(r){switch(r.type){case 20:case 0:t.push(r.value);break;case 17:t.push(r.number.toString());break;case 4:i.push(t.join(" ")),t.length=0;break}}),t.length&&i.push(t.join(" ")),i.map(function(r){return r.indexOf(" ")===-1?r:"'".concat(r,"'")})}},yM={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},bM={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(n,e){if(st(e))return e.number;if(ue(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},_M={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(n,e){return e.filter(ue).map(function(t){return t.value})}},kM={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},ut=function(n,e){return(n&e)!==0},SM={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(n,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e}},wM={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(n,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;for(var i=[],r=e.filter(Vy),o=0;o<r.length;o++){var s=r[o],a=r[o+1];if(s.type===20){var c=a&&st(a)?a.number:1;i.push({counter:s.value,increment:c})}}return i}},CM={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(n,e){if(e.length===0)return[];for(var t=[],i=e.filter(Vy),r=0;r<i.length;r++){var o=i[r],s=i[r+1];if(ue(o)&&o.value!=="none"){var a=s&&st(s)?s.number:0;t.push({counter:o.value,reset:a})}}return t}},TM={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(n,e){return e.filter(gi).map(function(t){return _b.parse(n,t)})}},xM={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(n,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;var i=[],r=e.filter(sO);if(r.length%2!==0)return null;for(var o=0;o<r.length;o+=2){var s=r[o].value,a=r[o+1].value;i.push({open:s,close:a})}return i}},kb=function(n,e,t){if(!n)return"";var i=n[Math.min(e,n.length-1)];return i?t?i.open:i.close:""},EM={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,e){return e.length===1&&ch(e[0],"none")?[]:En(e).map(function(t){for(var i={color:255,offsetX:yt,offsetY:yt,blur:yt,spread:yt,inset:!1},r=0,o=0;o<t.length;o++){var s=t[o];ch(s,"inset")?i.inset=!0:vi(s)?(r===0?i.offsetX=s:r===1?i.offsetY=s:r===2?i.blur=s:i.spread=s,r++):i.color=ki.parse(n,s)}return i})}},IM={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(n,e){var t=[0,1,2],i=[];return e.filter(ue).forEach(function(r){switch(r.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2);break}}),t.forEach(function(r){i.indexOf(r)===-1&&i.push(r)}),i}},RM={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},PM={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(n,e){return gi(e)?e.number:0}},OM={name:"objectFit",initialValue:"fill",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).reduce(function(t,i){return t|AM(i.value)},0)}},AM=function(n){switch(n){case"contain":return 2;case"cover":return 4;case"none":return 8;case"scale-down":return 16}return 0},MM=function(){function n(e,t){var i,r;this.animationDuration=$(e,TM,t.animationDuration),this.backgroundClip=$(e,tA,t.backgroundClip),this.backgroundColor=$(e,nA,t.backgroundColor),this.backgroundImage=$(e,hA,t.backgroundImage),this.backgroundOrigin=$(e,pA,t.backgroundOrigin),this.backgroundPosition=$(e,fA,t.backgroundPosition),this.backgroundRepeat=$(e,mA,t.backgroundRepeat),this.backgroundSize=$(e,vA,t.backgroundSize),this.borderTopColor=$(e,bA,t.borderTopColor),this.borderRightColor=$(e,_A,t.borderRightColor),this.borderBottomColor=$(e,kA,t.borderBottomColor),this.borderLeftColor=$(e,SA,t.borderLeftColor),this.borderTopLeftRadius=$(e,wA,t.borderTopLeftRadius),this.borderTopRightRadius=$(e,CA,t.borderTopRightRadius),this.borderBottomRightRadius=$(e,TA,t.borderBottomRightRadius),this.borderBottomLeftRadius=$(e,xA,t.borderBottomLeftRadius),this.borderTopStyle=$(e,EA,t.borderTopStyle),this.borderRightStyle=$(e,IA,t.borderRightStyle),this.borderBottomStyle=$(e,RA,t.borderBottomStyle),this.borderLeftStyle=$(e,PA,t.borderLeftStyle),this.borderTopWidth=$(e,OA,t.borderTopWidth),this.borderRightWidth=$(e,AA,t.borderRightWidth),this.borderBottomWidth=$(e,MA,t.borderBottomWidth),this.borderLeftWidth=$(e,NA,t.borderLeftWidth),this.boxShadow=$(e,EM,t.boxShadow),this.color=$(e,DA,t.color),this.direction=$(e,LA,t.direction),this.display=$(e,UA,t.display),this.float=$(e,BA,t.cssFloat),this.fontFamily=$(e,vM,t.fontFamily),this.fontSize=$(e,yM,t.fontSize),this.fontStyle=$(e,kM,t.fontStyle),this.fontVariant=$(e,_M,t.fontVariant),this.fontWeight=$(e,bM,t.fontWeight),this.letterSpacing=$(e,jA,t.letterSpacing),this.lineBreak=$(e,VA,t.lineBreak),this.lineHeight=$(e,zA,t.lineHeight),this.listStyleImage=$(e,qA,t.listStyleImage),this.listStylePosition=$(e,WA,t.listStylePosition),this.listStyleType=$(e,gh,t.listStyleType),this.marginTop=$(e,GA,t.marginTop),this.marginRight=$(e,$A,t.marginRight),this.marginBottom=$(e,HA,t.marginBottom),this.marginLeft=$(e,KA,t.marginLeft),this.opacity=$(e,fM,t.opacity);var o=$(e,YA,t.overflow);this.overflowX=o[0],this.overflowY=o[o.length>1?1:0],this.overflowWrap=$(e,XA,t.overflowWrap),this.paddingTop=$(e,JA,t.paddingTop),this.paddingRight=$(e,ZA,t.paddingRight),this.paddingBottom=$(e,QA,t.paddingBottom),this.paddingLeft=$(e,eM,t.paddingLeft),this.paintOrder=$(e,IM,t.paintOrder),this.position=$(e,nM,t.position),this.textAlign=$(e,tM,t.textAlign),this.textDecorationColor=$(e,mM,(i=t.textDecorationColor)!==null&&i!==void 0?i:t.color),this.textDecorationLine=$(e,gM,(r=t.textDecorationLine)!==null&&r!==void 0?r:t.textDecoration),this.textShadow=$(e,iM,t.textShadow),this.textTransform=$(e,rM,t.textTransform),this.transform=$(e,oM,t.transform),this.transformOrigin=$(e,lM,t.transformOrigin),this.visibility=$(e,dM,t.visibility),this.webkitTextStrokeColor=$(e,RM,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=$(e,PM,t.webkitTextStrokeWidth),this.wordBreak=$(e,hM,t.wordBreak),this.zIndex=$(e,pM,t.zIndex),this.objectFit=$(e,OM,t.objectFit)}return n.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},n.prototype.isTransparent=function(){return bi(this.backgroundColor)},n.prototype.isTransformed=function(){return this.transform!==null},n.prototype.isPositioned=function(){return this.position!==0},n.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},n.prototype.isFloating=function(){return this.float!==0},n.prototype.isInlineLevel=function(){return ut(this.display,4)||ut(this.display,33554432)||ut(this.display,268435456)||ut(this.display,536870912)||ut(this.display,67108864)||ut(this.display,134217728)},n}(),NM=function(){function n(e,t){this.content=$(e,SM,t.content),this.quotes=$(e,xM,t.quotes)}return n}(),Sb=function(){function n(e,t){this.counterIncrement=$(e,wM,t.counterIncrement),this.counterReset=$(e,CM,t.counterReset)}return n}(),$=function(n,e,t){var i=new By,r=t!==null&&typeof t<"u"?t.toString():e.initialValue;i.write(r);var o=new jy(i.read());switch(e.type){case 2:var s=o.parseComponentValue();return e.parse(n,ue(s)?s.value:e.initialValue);case 0:return e.parse(n,o.parseComponentValue());case 1:return e.parse(n,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(e.format){case"angle":return hc.parse(n,o.parseComponentValue());case"color":return ki.parse(n,o.parseComponentValue());case"image":return mh.parse(n,o.parseComponentValue());case"length":var a=o.parseComponentValue();return vi(a)?a:yt;case"length-percentage":var c=o.parseComponentValue();return Be(c)?c:yt;case"time":return _b.parse(n,o.parseComponentValue())}break}},DM="data-html2canvas-debug",LM=function(n){var e=n.getAttribute(DM);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},vh=function(n,e){var t=LM(n);return t===1||e===t},Pn=function(){function n(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,vh(t,3),this.styles=new MM(e,window.getComputedStyle(t,null)),Ih(t)&&(this.styles.animationDuration.some(function(i){return i>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=Za(this.context,t),vh(t,4)&&(this.flags|=16)}return n}();typeof SuppressedError=="function"&&SuppressedError;for(var wb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",UM=typeof Uint8Array>"u"?[]:new Uint8Array(256),Rc=0;Rc<wb.length;Rc++)UM[wb.charCodeAt(Rc)]=Rc;for(var Cb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FM=typeof Uint8Array>"u"?[]:new Uint8Array(256),Pc=0;Pc<Cb.length;Pc++)FM[Cb.charCodeAt(Pc)]=Pc;var BM=1,yh=2,bh=3,Tb=4,xb=5,jM=7,Eb=8,_h=9,kh=10,Ib=11,Rb=12,Pb=13,Ob=14,Sh=15,VM=function(n){for(var e=[],t=0,i=n.length;t<i;){var r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){var o=n.charCodeAt(t++);(o&64512)===56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},zM=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var t=n.length;if(!t)return"";for(var i=[],r=-1,o="";++r<t;){var s=n[r];s<=65535?i.push(s):(s-=65536,i.push((s>>10)+55296,s%1024+56320)),(r+1===t||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},Jt="\xD7",wh="\xF7",qM=function(n){throw new Error("UnicodeTrie not initialized")},WM=function(n,e,t){var i=t-2,r=e[i],o=e[t-1],s=e[t];if(o===yh&&s===bh)return Jt;if(o===yh||o===bh||o===Tb||s===yh||s===bh||s===Tb)return wh;if(o===Eb&&[Eb,_h,Ib,Rb].indexOf(s)!==-1||(o===Ib||o===_h)&&(s===_h||s===kh)||(o===Rb||o===kh)&&s===kh||s===Pb||s===xb||s===jM||o===BM)return Jt;if(o===Pb&&s===Ob){for(;r===xb;)r=e[--i];if(r===Ob)return Jt}if(o===Sh&&s===Sh){for(var a=0;r===Sh;)a++,r=e[--i];if(a%2===0)return Jt}return wh},GM=function(n){var e=VM(n),t=e.length,i=0,r=0,o=e.map(qM);return{next:function(){if(i>=t)return{done:!0,value:null};for(var s=Jt;i<t&&(s=WM(e,o,++i))===Jt;);if(s!==Jt||i===t){var a=zM.apply(null,e.slice(r,i));return r=i,{value:a,done:!1}}return{done:!0,value:null}}}},$M=function(n){for(var e=GM(n),t=[],i;!(i=e.next()).done;)i.value&&t.push(i.value.slice());return t},HM=function(n){var e=123;if(n.createRange){var t=n.createRange();if(t.getBoundingClientRect){var i=n.createElement("boundtest");i.style.height="".concat(e,"px"),i.style.display="block",n.body.appendChild(i),t.selectNode(i);var r=t.getBoundingClientRect(),o=Math.round(r.height);if(n.body.removeChild(i),o===e)return!0}}return!1},KM=function(n){var e=n.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",n.body.appendChild(e);var t=n.createRange();e.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var i=e.firstChild,r=Qa(i.data).map(function(c){return nt(c)}),o=0,s={},a=r.every(function(c,u){t.setStart(i,o),t.setEnd(i,o+c.length);var l=t.getBoundingClientRect();o+=c.length;var d=l.x>s.x||l.y>s.y;return s=l,u===0?!0:d});return n.body.removeChild(e),a},YM=function(){return typeof new Image().crossOrigin<"u"},XM=function(){return typeof new XMLHttpRequest().responseType=="string"},JM=function(n){var e=new Image,t=n.createElement("canvas"),i=t.getContext("2d");if(!i)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},Ab=function(n){return n[0]===0&&n[1]===255&&n[2]===0&&n[3]===255},ZM=function(n){var e=n.createElement("canvas"),t=100;e.width=t,e.height=t;var i=e.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,t,t);var r=new Image,o=e.toDataURL();r.src=o;var s=Ch(t,t,0,0,r);return i.fillStyle="red",i.fillRect(0,0,t,t),Mb(s).then(function(a){i.drawImage(a,0,0);var c=i.getImageData(0,0,t,t).data;i.fillStyle="red",i.fillRect(0,0,t,t);var u=n.createElement("div");return u.style.backgroundImage="url(".concat(o,")"),u.style.height="".concat(t,"px"),Ab(c)?Mb(Ch(t,t,0,0,u)):Promise.reject(!1)}).then(function(a){return i.drawImage(a,0,0),Ab(i.getImageData(0,0,t,t).data)}).catch(function(){return!1})},Ch=function(n,e,t,i,r){var o="http://www.w3.org/2000/svg",s=document.createElementNS(o,"svg"),a=document.createElementNS(o,"foreignObject");return s.setAttributeNS(null,"width",n.toString()),s.setAttributeNS(null,"height",e.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",t.toString()),a.setAttributeNS(null,"y",i.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(a),a.appendChild(r),s},Mb=function(n){return new Promise(function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,i.src="data:image/svg+xml;charset=utf-8,".concat(encodeURIComponent(new XMLSerializer().serializeToString(n)))})},bt={get SUPPORT_RANGE_BOUNDS(){var n=HM(document);return Object.defineProperty(bt,"SUPPORT_RANGE_BOUNDS",{value:n}),n},get SUPPORT_WORD_BREAKING(){var n=bt.SUPPORT_RANGE_BOUNDS&&KM(document);return Object.defineProperty(bt,"SUPPORT_WORD_BREAKING",{value:n}),n},get SUPPORT_SVG_DRAWING(){var n=JM(document);return Object.defineProperty(bt,"SUPPORT_SVG_DRAWING",{value:n}),n},get SUPPORT_FOREIGNOBJECT_DRAWING(){var n=typeof Array.from=="function"&&typeof window.fetch=="function"?ZM(document):Promise.resolve(!1);return Object.defineProperty(bt,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:n}),n},get SUPPORT_CORS_IMAGES(){var n=YM();return Object.defineProperty(bt,"SUPPORT_CORS_IMAGES",{value:n}),n},get SUPPORT_RESPONSE_TYPE(){var n=XM();return Object.defineProperty(bt,"SUPPORT_RESPONSE_TYPE",{value:n}),n},get SUPPORT_CORS_XHR(){var n="withCredentials"in new XMLHttpRequest;return Object.defineProperty(bt,"SUPPORT_CORS_XHR",{value:n}),n},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var n=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(bt,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:n}),n}},os=function(){function n(e,t){this.text=e,this.bounds=t}return n}(),QM=function(n,e,t,i){var r=nN(e,t),o=[],s=0;return r.forEach(function(a){if(t.textDecorationLine.length||a.trim().length>0)if(bt.SUPPORT_RANGE_BOUNDS){var c=Nb(i,s,a.length).getClientRects();if(c.length>1){var u=Th(a),l=0;u.forEach(function(h){o.push(new os(h,Gn.fromDOMRectList(n,Nb(i,l+s,h.length).getClientRects()))),l+=h.length})}else o.push(new os(a,Gn.fromDOMRectList(n,c)))}else{var d=i.splitText(a.length);o.push(new os(a,eN(n,i))),i=d}else bt.SUPPORT_RANGE_BOUNDS||(i=i.splitText(a.length));s+=a.length}),o},eN=function(n,e){var t=e.ownerDocument;if(t){var i=t.createElement("html2canvaswrapper");i.appendChild(e.cloneNode(!0));var r=e.parentNode;if(r){r.replaceChild(i,e);var o=Za(n,i);return i.firstChild&&r.replaceChild(i.firstChild,i),o}}return Gn.EMPTY},Nb=function(n,e,t){var i=n.ownerDocument;if(!i)throw new Error("Node has no owner document");var r=i.createRange();return r.setStart(n,e),r.setEnd(n,e+t),r},Th=function(n){if(bt.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(n)).map(function(t){return t.segment})}return $M(n)},tN=function(n,e){if(bt.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(n)).map(function(i){return i.segment})}return rN(n,e)},nN=function(n,e){return e.letterSpacing!==0?Th(n):tN(n,e)},iN=[32,160,4961,65792,65793,4153,4241],rN=function(n,e){for(var t=e2(n,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),i=[],r,o=function(){if(r.value){var s=r.value.slice(),a=Qa(s),c="";a.forEach(function(u){iN.indexOf(u)===-1?c+=nt(u):(c.length&&i.push(c),i.push(nt(u)),c="")}),c.length&&i.push(c)}};!(r=t.next()).done;)o();return i},oN=function(){function n(e,t,i){this.text=sN(t.data,i.textTransform),this.textBounds=QM(e,this.text,i,t)}return n}(),sN=function(n,e){switch(e){case 1:return n.toLowerCase();case 3:return n.replace(aN,cN);case 2:return n.toUpperCase();default:return n}},aN=/(^|\s|:|-|\(|\))([a-z])/g,cN=function(n,e,t){return n.length>0?e+t.toUpperCase():n},Db=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.src=i.currentSrc||i.src,r.intrinsicWidth=i.naturalWidth,r.intrinsicHeight=i.naturalHeight,r.context.cache.addImage(r.src),r}return e}(Pn),Lb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.canvas=i,r.intrinsicWidth=i.width,r.intrinsicHeight=i.height,r}return e}(Pn),Ub=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this,o=new XMLSerializer,s=Za(t,i);return i.setAttribute("width","".concat(s.width,"px")),i.setAttribute("height","".concat(s.height,"px")),r.svg="data:image/svg+xml,".concat(encodeURIComponent(o.serializeToString(i))),r.intrinsicWidth=i.width.baseVal.value,r.intrinsicHeight=i.height.baseVal.value,r.context.cache.addImage(r.svg),r}return e}(Pn),Fb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.value=i.value,r}return e}(Pn),xh=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.start=i.start,r.reversed=typeof i.reversed=="boolean"&&i.reversed===!0,r}return e}(Pn),uN=[{type:15,flags:0,unit:"px",number:3}],lN=[{type:16,flags:0,number:50}],dN=function(n){return n.width>n.height?new Gn(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new Gn(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n},hN=function(n){var e=n.type===pN?new Array(n.value.length+1).join("\u2022"):n.value;return e.length===0?n.placeholder||"":e},Oc="checkbox",Ac="radio",pN="password",Bb=707406591,Eh=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;switch(r.type=i.type.toLowerCase(),r.checked=i.checked,r.value=hN(i),(r.type===Oc||r.type===Ac)&&(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=dN(r.bounds)),r.type){case Oc:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=uN;break;case Ac:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=lN;break}return r}return e}(Pn),jb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this,o=i.options[i.selectedIndex||0];return r.value=o&&o.text||"",r}return e}(Pn),Vb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.value=i.value,r}return e}(Pn),zb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;r.src=i.src,r.width=parseInt(i.width,10)||0,r.height=parseInt(i.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){r.tree=Wb(t,i.contentWindow.document.documentElement);var o=i.contentWindow.document.documentElement?qr(t,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):Rn.TRANSPARENT,s=i.contentWindow.document.body?qr(t,getComputedStyle(i.contentWindow.document.body).backgroundColor):Rn.TRANSPARENT;r.backgroundColor=bi(o)?bi(s)?r.styles.backgroundColor:s:o}}catch{}return r}return e}(Pn),fN=["OL","UL","MENU"],Mc=function(n,e,t,i){for(var r=e.firstChild,o=void 0;r;r=o)if(o=r.nextSibling,Gb(r)&&r.data.length>0)t.textNodes.push(new oN(n,r,t.styles));else if(Gr(r))if(Jb(r)&&r.assignedNodes)r.assignedNodes().forEach(function(a){return Mc(n,a,t,i)});else{var s=qb(n,r);s.styles.isVisible()&&(mN(r,s,i)?s.flags|=4:gN(s.styles)&&(s.flags|=2),fN.indexOf(r.tagName)!==-1&&(s.flags|=8),t.elements.push(s),r.slot,r.shadowRoot?Mc(n,r.shadowRoot,s,i):!Dc(r)&&!$b(r)&&!Lc(r)&&Mc(n,r,s,i))}},qb=function(n,e){return Ph(e)?new Db(n,e):Hb(e)?new Lb(n,e):$b(e)?new Ub(n,e):vN(e)?new Fb(n,e):yN(e)?new xh(n,e):bN(e)?new Eh(n,e):Lc(e)?new jb(n,e):Dc(e)?new Vb(n,e):Yb(e)?new zb(n,e):new Pn(n,e)},Wb=function(n,e){var t=qb(n,e);return t.flags|=4,Mc(n,e,t,t),t},mN=function(n,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Rh(n)&&t.styles.isTransparent()},gN=function(n){return n.isPositioned()||n.isFloating()},Gb=function(n){return n.nodeType===Node.TEXT_NODE},Gr=function(n){return n.nodeType===Node.ELEMENT_NODE},Ih=function(n){return Gr(n)&&typeof n.style<"u"&&!Nc(n)},Nc=function(n){return typeof n.className=="object"},vN=function(n){return n.tagName==="LI"},yN=function(n){return n.tagName==="OL"},bN=function(n){return n.tagName==="INPUT"},_N=function(n){return n.tagName==="HTML"},$b=function(n){return n.tagName==="svg"},Rh=function(n){return n.tagName==="BODY"},Hb=function(n){return n.tagName==="CANVAS"},Kb=function(n){return n.tagName==="VIDEO"},Ph=function(n){return n.tagName==="IMG"},Yb=function(n){return n.tagName==="IFRAME"},Xb=function(n){return n.tagName==="STYLE"},kN=function(n){return n.tagName==="SCRIPT"},Dc=function(n){return n.tagName==="TEXTAREA"},Lc=function(n){return n.tagName==="SELECT"},Jb=function(n){return n.tagName==="SLOT"},Zb=function(n){return n.tagName.indexOf("-")>0},SN=function(){function n(){this.counters={}}return n.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},n.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},n.prototype.pop=function(e){var t=this;e.forEach(function(i){return t.counters[i].pop()})},n.prototype.parse=function(e){var t=this,i=e.counterIncrement,r=e.counterReset,o=!0;i!==null&&i.forEach(function(a){var c=t.counters[a.counter];c&&a.increment!==0&&(o=!1,c.length||c.push(1),c[Math.max(0,c.length-1)]+=a.increment)});var s=[];return o&&r.forEach(function(a){var c=t.counters[a.counter];s.push(a.counter),c||(c=t.counters[a.counter]=[]),c.push(a.reset)}),s},n}(),Qb={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},e_={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},wN={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},CN={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},$r=function(n,e,t,i,r,o){return n<e||n>t?as(n,r,o.length>0):i.integers.reduce(function(s,a,c){for(;n>=a;)n-=a,s+=i.values[c];return s},"")+o},t_=function(n,e,t,i){var r="";do t||n--,r=i(n)+r,n/=e;while(n*e>=e);return r},it=function(n,e,t,i,r){var o=t-e+1;return(n<0?"-":"")+(t_(Math.abs(n),o,i,function(s){return nt(Math.floor(s%o)+e)})+r)},Zi=function(n,e,t){t===void 0&&(t=". ");var i=e.length;return t_(Math.abs(n),i,!1,function(r){return e[Math.floor(r%i)]})+t},Hr=1,Si=2,wi=4,ss=8,$n=function(n,e,t,i,r,o){if(n<-9999||n>9999)return as(n,4,r.length>0);var s=Math.abs(n),a=r;if(s===0)return e[0]+a;for(var c=0;s>0&&c<=4;c++){var u=s%10;u===0&&ut(o,Hr)&&a!==""?a=e[u]+a:u>1||u===1&&c===0||u===1&&c===1&&ut(o,Si)||u===1&&c===1&&ut(o,wi)&&n>100||u===1&&c>1&&ut(o,ss)?a=e[u]+(c>0?t[c-1]:"")+a:u===1&&c>0&&(a=t[c-1]+a),s=Math.floor(s/10)}return(n<0?i:"")+a},n_="\u5341\u767E\u5343\u842C",i_="\u62FE\u4F70\u4EDF\u842C",r_="\u30DE\u30A4\u30CA\u30B9",Oh="\uB9C8\uC774\uB108\uC2A4",as=function(n,e,t){var i=t?". ":"",r=t?"\u3001":"",o=t?", ":"",s=t?" ":"";switch(e){case 0:return"\u2022"+s;case 1:return"\u25E6"+s;case 2:return"\u25FE"+s;case 5:var a=it(n,48,57,!0,i);return a.length<4?"0".concat(a):a;case 4:return Zi(n,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",r);case 6:return $r(n,1,3999,Qb,3,i).toLowerCase();case 7:return $r(n,1,3999,Qb,3,i);case 8:return it(n,945,969,!1,i);case 9:return it(n,97,122,!1,i);case 10:return it(n,65,90,!1,i);case 11:return it(n,1632,1641,!0,i);case 12:case 49:return $r(n,1,9999,e_,3,i);case 35:return $r(n,1,9999,e_,3,i).toLowerCase();case 13:return it(n,2534,2543,!0,i);case 14:case 30:return it(n,6112,6121,!0,i);case 15:return Zi(n,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",r);case 16:return Zi(n,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",r);case 17:case 48:return $n(n,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",n_,"\u8CA0",r,Si|wi|ss);case 47:return $n(n,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",i_,"\u8CA0",r,Hr|Si|wi|ss);case 42:return $n(n,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",n_,"\u8D1F",r,Si|wi|ss);case 41:return $n(n,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",i_,"\u8D1F",r,Hr|Si|wi|ss);case 26:return $n(n,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",r_,r,0);case 25:return $n(n,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",r_,r,Hr|Si|wi);case 31:return $n(n,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Oh,o,Hr|Si|wi);case 33:return $n(n,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Oh,o,0);case 32:return $n(n,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Oh,o,Hr|Si|wi);case 18:return it(n,2406,2415,!0,i);case 20:return $r(n,1,19999,CN,3,i);case 21:return it(n,2790,2799,!0,i);case 22:return it(n,2662,2671,!0,i);case 52:return $r(n,1,10999,wN,3,i);case 23:return Zi(n,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Zi(n,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return it(n,3302,3311,!0,i);case 28:return Zi(n,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",r);case 29:return Zi(n,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",r);case 34:return it(n,3792,3801,!0,i);case 37:return it(n,6160,6169,!0,i);case 38:return it(n,4160,4169,!0,i);case 39:return it(n,2918,2927,!0,i);case 40:return it(n,1776,1785,!0,i);case 43:return it(n,3046,3055,!0,i);case 44:return it(n,3174,3183,!0,i);case 45:return it(n,3664,3673,!0,i);case 46:return it(n,3872,3881,!0,i);case 3:default:return it(n,48,57,!0,i)}},o_="data-html2canvas-ignore",s_=function(){function n(e,t,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=t,this.counters=new SN,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return n.prototype.toIFrame=function(e,t){var i=this,r=TN(e,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var o=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,a=r.contentWindow,c=a.document,u=IN(r).then(function(){return Mt(i,void 0,void 0,function(){var h,p;return xt(this,function(m){switch(m.label){case 0:return this.scrolledElements.forEach(AN),a&&(a.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==t.top||a.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-t.left,a.scrollY-t.top,0,0))),h=this.options.onclone,p=this.clonedReferenceElement,typeof p>"u"?[2,Promise.reject("Error finding the ".concat(this.referenceElement.nodeName," in the cloned document"))]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:m.sent(),m.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,EN(c)]:[3,4];case 3:m.sent(),m.label=4;case 4:return typeof h=="function"?[2,Promise.resolve().then(function(){return h(c,p)}).then(function(){return r})]:[2,r]}})})}),l=c.baseURI;c.open(),c.write("".concat(PN(document.doctype),"<html></html>")),ON(this.referenceElement.ownerDocument,o,s);var d=c.adoptNode(this.documentElement);return UN(d,l),c.replaceChild(d,c.documentElement),c.close(),u},n.prototype.createElementClone=function(e){if(vh(e,2),Hb(e))return this.createCanvasClone(e);if(Kb(e))return this.createVideoClone(e);if(Xb(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Ph(t)&&(Ph(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),Zb(t)?this.createCustomElementClone(t):t},n.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Ah(e.style,t),t},n.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var i=[].slice.call(t.cssRules,0).reduce(function(o,s){return s&&typeof s.cssText=="string"?o+s.cssText:o},""),r=e.cloneNode(!1);return r.textContent=i,r}}catch(o){if(this.context.logger.error("Unable to access cssRules property",o),o.name!=="SecurityError")throw o}return e.cloneNode(!1)},n.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var i=e.ownerDocument.createElement("img");try{return i.src=e.toDataURL(),i}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var o=e.getContext("2d"),s=r.getContext("2d",{willReadFrequently:!0});if(s)if(!this.options.allowTaint&&o)s.putImageData(o.getImageData(0,0,e.width,e.height),0,0);else{var a=(t=e.getContext("webgl2"))!==null&&t!==void 0?t:e.getContext("webgl");if(a){var c=a.getContextAttributes();(c==null?void 0:c.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}s.drawImage(e,0,0)}return r}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},n.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var i=t.getContext("2d");try{return i&&(i.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||i.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},n.prototype.appendChildNode=function(e,t,i){(!Gr(t)||!kN(t)&&!t.hasAttribute(o_)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!Gr(t)||!Xb(t))&&e.appendChild(this.cloneNode(t,i))},n.prototype.cloneChildNodes=function(e,t,i){for(var r=this,o=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;o;o=o.nextSibling)if(Gr(o)&&Jb(o)&&typeof o.assignedNodes=="function"){var s=o.assignedNodes();s.length&&s.forEach(function(a){return r.appendChildNode(t,a,i)})}else this.appendChildNode(t,o,i)},n.prototype.cloneNode=function(e,t){if(Gb(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var i=e.ownerDocument.defaultView;if(i&&Gr(e)&&(Ih(e)||Nc(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var o=i.getComputedStyle(e),s=i.getComputedStyle(e,":before"),a=i.getComputedStyle(e,":after");this.referenceElement===e&&Ih(r)&&(this.clonedReferenceElement=r),Rh(r)&&DN(r);var c=this.counters.parse(new Sb(this.context,o)),u=this.resolvePseudoContent(e,r,s,cs.BEFORE);Zb(e)&&(t=!0),Kb(e)||this.cloneChildNodes(e,r,t),u&&r.insertBefore(u,r.firstChild);var l=this.resolvePseudoContent(e,r,a,cs.AFTER);return l&&r.appendChild(l),this.counters.pop(c),(o&&(this.options.copyStyles||Nc(e))&&!Yb(e)||t)&&Ah(o,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Dc(e)||Lc(e))&&(Dc(r)||Lc(r))&&(r.value=e.value),r}return e.cloneNode(!1)},n.prototype.resolvePseudoContent=function(e,t,i,r){var o=this;if(i){var s=i.content,a=t.ownerDocument;if(!(!a||!s||s==="none"||s==="-moz-alt-content"||i.display==="none")){this.counters.parse(new Sb(this.context,i));var c=new NM(this.context,i),u=a.createElement("html2canvaspseudoelement");Ah(i,u),c.content.forEach(function(d){if(d.type===0)u.appendChild(a.createTextNode(d.value));else if(d.type===22){var h=a.createElement("img");h.src=d.value,h.style.opacity="1",u.appendChild(h)}else if(d.type===18){if(d.name==="attr"){var p=d.values.filter(ue);p.length&&u.appendChild(a.createTextNode(e.getAttribute(p[0].value)||""))}else if(d.name==="counter"){var m=d.values.filter(vt),f=m[0],g=m[1];if(f&&ue(f)){var y=o.counters.getCounterValue(f.value),b=g&&ue(g)?gh.parse(o.context,g.value):3;u.appendChild(a.createTextNode(as(y,b,!1)))}}else if(d.name==="counters"){var S=d.values.filter(vt),f=S[0],w=S[1],g=S[2];if(f&&ue(f)){var k=o.counters.getCounterValues(f.value),C=g&&ue(g)?gh.parse(o.context,g.value):3,x=w&&w.type===0?w.value:"",I=k.map(function(O){return as(O,C,!1)}).join(x);u.appendChild(a.createTextNode(I))}}}else if(d.type===20)switch(d.value){case"open-quote":u.appendChild(a.createTextNode(kb(c.quotes,o.quoteDepth++,!0)));break;case"close-quote":u.appendChild(a.createTextNode(kb(c.quotes,--o.quoteDepth,!1)));break;default:u.appendChild(a.createTextNode(d.value))}}),u.className="".concat(Mh," ").concat(Nh);var l=r===cs.BEFORE?" ".concat(Mh):" ".concat(Nh);return Nc(t)?t.className.baseValue+=l:t.className+=l,u}}},n.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},n}(),cs;(function(n){n[n.BEFORE=0]="BEFORE",n[n.AFTER=1]="AFTER"})(cs||(cs={}));var TN=function(n,e){var t=n.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(o_,"true"),n.body.appendChild(t),t},xN=function(n){return new Promise(function(e){if(n.complete){e();return}if(!n.src){e();return}n.onload=e,n.onerror=e})},EN=function(n){return Promise.all([].slice.call(n.images,0).map(xN))},IN=function(n){return new Promise(function(e,t){var i=n.contentWindow;if(!i)return t("No window assigned for iframe");var r=i.document;i.onload=n.onload=function(){i.onload=n.onload=null;var o=setInterval(function(){r.body.childNodes.length>0&&r.readyState==="complete"&&(clearInterval(o),e(n))},50)}})},RN=["all","d","content"],Ah=function(n,e){for(var t=n.length-1;t>=0;t--){var i=n.item(t);RN.indexOf(i)===-1&&e.style.setProperty(i,n.getPropertyValue(i))}return e},PN=function(n){var e="";return n&&(e+="<!DOCTYPE ",n.name&&(e+=n.name),n.internalSubset&&(e+=n.internalSubset),n.publicId&&(e+='"'.concat(n.publicId,'"')),n.systemId&&(e+='"'.concat(n.systemId,'"')),e+=">"),e},ON=function(n,e,t){n&&n.defaultView&&(e!==n.defaultView.pageXOffset||t!==n.defaultView.pageYOffset)&&n.defaultView.scrollTo(e,t)},AN=function(n){var e=n[0],t=n[1],i=n[2];e.scrollLeft=t,e.scrollTop=i},MN=":before",NN=":after",Mh="___html2canvas___pseudoelement_before",Nh="___html2canvas___pseudoelement_after",a_=`{
|
|
79
|
+
`);var e="",t,i,r=0,o;for(t=i=0,r=n.length,o=0;o<r;o++){var s=n.charCodeAt(o),a=null;s<128?i++:s>127&&s<2048?a=String.fromCharCode(s>>6|192,s&63|128):a=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),a!==null&&(i>t&&(e+=n.substring(t,i)),e+=a,t=i=o+1)}return i>t&&(e+=n.substring(t,n.length)),e},v.UUID=function(){try{return q.crypto.randomUUID()}catch{for(var n=new Array(36),e=0;e<36;e++)n[e]=Math.floor(Math.random()*16);return n[14]=4,n[19]=n[19]&=-5,n[19]=n[19]|=8,n[8]=n[13]=n[18]=n[23]="-",v.map(n,function(t){return t.toString(16)}).join("")}};var w0=["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"];v.isBlockedUA=function(n){var e;for(n=n.toLowerCase(),e=0;e<w0.length;e++)if(n.indexOf(w0[e])!==-1)return!0;return!1},v.HTTPBuildQuery=function(n,e){var t,i,r=[];return v.isUndefined(e)&&(e="&"),v.each(n,function(o,s){t=encodeURIComponent(o.toString()),i=encodeURIComponent(s),r[r.length]=i+"="+t}),r.join(e)},v.getQueryParam=function(n,e){e=e.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var t="[\\?&]"+e+"=([^&#]*)",i=new RegExp(t),r=i.exec(n);if(r===null||r&&typeof r[1]!="string"&&r[1].length)return"";var o=r[1];try{o=decodeURIComponent(o)}catch{_e.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},v.cookie={get:function(n){for(var e=n+"=",t=be.cookie.split(";"),i=0;i<t.length;i++){for(var r=t[i];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}return null},parse:function(n){var e;try{e=v.JSONDecode(v.cookie.get(n))||{}}catch{}return e},set_seconds:function(n,e,t,i,r,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(i){var l=x0(be.location.hostname);a=l?"; domain=."+l:""}if(t){var d=new Date;d.setTime(d.getTime()+t*1e3),c="; expires="+d.toGMTString()}o&&(r=!0,u="; SameSite=None"),r&&(u+="; secure"),be.cookie=n+"="+encodeURIComponent(e)+c+"; path=/"+a+u},set:function(n,e,t,i,r,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(i){var l=x0(be.location.hostname);a=l?"; domain=."+l:""}if(t){var d=new Date;d.setTime(d.getTime()+t*24*60*60*1e3),c="; expires="+d.toGMTString()}o&&(r=!0,u="; SameSite=None"),r&&(u+="; secure");var h=n+"="+encodeURIComponent(e)+c+"; path=/"+a+u;return be.cookie=h,h},remove:function(n,e,t){v.cookie.set(n,"",-1,e,!1,!1,t)}};var C0=function(n){var e=!0;try{var t="__mplss_"+Rd(8),i="xyz";n.setItem(t,i),n.getItem(t)!==i&&(e=!1),n.removeItem(t)}catch{e=!1}return e},Ed=null,Go=function(n,e){return Ed!==null&&!e?Ed:Ed=C0(n||q.localStorage)},Id=null,DR=function(n,e){return Id!==null&&!e?Id:Id=C0(n||q.sessionStorage)};function T0(n,e,t){var i=function(r){_e.error(e+" error: "+r)};return{is_supported:function(r){var o=t(n,r);return o||_e.error(e+" unsupported"),o},error:i,get:function(r){try{return n.getItem(r)}catch(o){i(o)}return null},parse:function(r){try{return v.JSONDecode(n.getItem(r))||{}}catch{}return null},set:function(r,o){try{n.setItem(r,o)}catch(s){i(s)}},remove:function(r){try{n.removeItem(r)}catch(o){i(o)}}}}v.localStorage=T0(q.localStorage,"localStorage",Go),v.sessionStorage=T0(q.sessionStorage,"sessionStorage",DR),v.register_event=function(){var n=function(i,r,o,s,a){if(!i){_e.error("No valid element provided to register_event");return}if(i.addEventListener&&!s)i.addEventListener(r,o,!!a);else{var c="on"+r,u=i[c];i[c]=e(i,o,u)}};function e(i,r,o){var s=function(a){if(a=a||t(q.event),!!a){var c=!0,u,l;return v.isFunction(o)&&(u=o(a)),l=r.call(i,a),(u===!1||l===!1)&&(c=!1),c}};return s}function t(i){return i&&(i.preventDefault=t.preventDefault,i.stopPropagation=t.stopPropagation),i}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},n}();var LR=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');v.dom_query=function(){function n(r){return r.all?r.all:r.getElementsByTagName("*")}var e=/[\t\r\n]/g;function t(r,o){var s=" "+o+" ";return(" "+r.className+" ").replace(e," ").indexOf(s)>=0}function i(r){if(!be.getElementsByTagName)return[];var o=r.split(" "),s,a,c,u,l,d,h,p,m,f,g=[be];for(d=0;d<o.length;d++){if(s=o[d].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){a=s.split("#"),c=a[0];var y=a[1],b=be.getElementById(y);if(!b||c&&b.nodeName.toLowerCase()!=c)return[];g=[b];continue}if(s.indexOf(".")>-1){a=s.split("."),c=a[0];var S=a[1];for(c||(c="*"),u=[],l=0,h=0;h<g.length;h++)for(c=="*"?m=n(g[h]):m=g[h].getElementsByTagName(c),p=0;p<m.length;p++)u[l++]=m[p];for(g=[],f=0,h=0;h<u.length;h++)u[h].className&&v.isString(u[h].className)&&t(u[h],S)&&(g[f++]=u[h]);continue}var w=s.match(LR);if(w){c=w[1];var k=w[2],C=w[3],x=w[4];for(c||(c="*"),u=[],l=0,h=0;h<g.length;h++)for(c=="*"?m=n(g[h]):m=g[h].getElementsByTagName(c),p=0;p<m.length;p++)u[l++]=m[p];g=[],f=0;var I;switch(C){case"=":I=function(P){return P.getAttribute(k)==x};break;case"~":I=function(P){return P.getAttribute(k).match(new RegExp("\\b"+x+"\\b"))};break;case"|":I=function(P){return P.getAttribute(k).match(new RegExp("^"+x+"-?"))};break;case"^":I=function(P){return P.getAttribute(k).indexOf(x)===0};break;case"$":I=function(P){return P.getAttribute(k).lastIndexOf(x)==P.getAttribute(k).length-x.length};break;case"*":I=function(P){return P.getAttribute(k).indexOf(x)>-1};break;default:I=function(P){return P.getAttribute(k)}}for(g=[],f=0,h=0;h<u.length;h++)I(u[h])&&(g[f++]=u[h]);continue}for(c=s,u=[],l=0,h=0;h<g.length;h++)for(m=g[h].getElementsByTagName(c),p=0;p<m.length;p++)u[l++]=m[p];g=u}return g}return function(r){return v.isElement(r)?[r]:v.isObject(r)&&!v.isUndefined(r.length)?r:i.call(this,r)}}();var UR=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],FR=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];v.info={campaignParams:function(n){var e="",t={};return v.each(UR,function(i){e=v.getQueryParam(be.URL,i),e.length?t[i]=e:n!==void 0&&(t[i]=n)}),t},clickParams:function(){var n="",e={};return v.each(FR,function(t){n=v.getQueryParam(be.URL,t),n.length&&(e[t]=n)}),e},marketingParams:function(){return v.extend(v.info.campaignParams(),v.info.clickParams())},searchEngine:function(n){return n.search("https?://(.*)google.([^/?]*)")===0?"google":n.search("https?://(.*)bing.com")===0?"bing":n.search("https?://(.*)yahoo.com")===0?"yahoo":n.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(n){var e=v.info.searchEngine(n),t=e!="yahoo"?"q":"p",i={};if(e!==null){i.$search_engine=e;var r=v.getQueryParam(n,t);r.length&&(i.mp_keyword=r)}return i},browser:function(n,e,t){return e=e||"",t||v.includes(n," OPR/")?v.includes(n,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":v.includes(n,"IEMobile")||v.includes(n,"WPDesktop")?"Internet Explorer Mobile":v.includes(n,"SamsungBrowser/")?"Samsung Internet":v.includes(n,"Edge")||v.includes(n,"Edg/")?"Microsoft Edge":v.includes(n,"FBIOS")?"Facebook Mobile":v.includes(n,"Whale/")?"Whale Browser":v.includes(n,"Chrome")?"Chrome":v.includes(n,"CriOS")?"Chrome iOS":v.includes(n,"UCWEB")||v.includes(n,"UCBrowser")?"UC Browser":v.includes(n,"FxiOS")?"Firefox iOS":v.includes(e,"Apple")?v.includes(n,"Mobile")?"Mobile Safari":"Safari":v.includes(n,"Android")?"Android Mobile":v.includes(n,"Konqueror")?"Konqueror":v.includes(n,"Firefox")?"Firefox":v.includes(n,"MSIE")||v.includes(n,"Trident/")?"Internet Explorer":v.includes(n,"Gecko")?"Mozilla":""},browserVersion:function(n,e,t){var i=v.info.browser(n,e,t),r={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},o=r[i];if(o===void 0)return null;var s=n.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var n=Vn;return/Windows/i.test(n)?/Phone/.test(n)||/WPDesktop/.test(n)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(n)?"iOS":/Android/.test(n)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":/Mac/i.test(n)?"Mac OS X":/Linux/.test(n)?"Linux":/CrOS/.test(n)?"Chrome OS":""},device:function(n){return/Windows Phone/i.test(n)||/WPDesktop/.test(n)?"Windows Phone":/iPad/.test(n)?"iPad":/iPod/.test(n)?"iPod Touch":/iPhone/.test(n)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":/Android/.test(n)?"Android":""},referringDomain:function(n){var e=n.split("/");return e.length>=3?e[2]:""},currentUrl:function(){return q.location.href},properties:function(n){return typeof n!="object"&&(n={}),v.extend(v.strip_empty_properties({$os:v.info.os(),$browser:v.info.browser(Vn,ui.vendor,ja),$referrer:be.referrer,$referring_domain:v.info.referringDomain(be.referrer),$device:v.info.device(Vn)}),{$current_url:v.info.currentUrl(),$browser_version:v.info.browserVersion(Vn,ui.vendor,ja),$screen_height:y0.height,$screen_width:y0.width,mp_lib:"web",$lib_version:on.LIB_VERSION,$insert_id:Rd(),time:v.timestamp()/1e3},v.strip_empty_properties(n))},people_properties:function(){return v.extend(v.strip_empty_properties({$os:v.info.os(),$browser:v.info.browser(Vn,ui.vendor,ja)}),{$browser_version:v.info.browserVersion(Vn,ui.vendor,ja)})},mpPageViewProperties:function(){return v.strip_empty_properties({current_page_title:be.title,current_domain:q.location.hostname,current_url_path:q.location.pathname,current_url_protocol:q.location.protocol,current_url_search:q.location.search})}};var BR=function(n,e){var t=null,i=[];return function(r){var o=this;return i.push(r),t||(t=new ke(function(s){setTimeout(function(){var a=n.apply(o,[i]);t=null,i=[],s(a)},e)})),t}},Rd=function(n){var e=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return n?e.substring(0,n):e},jR=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,VR=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,x0=function(n){var e=VR,t=n.split("."),i=t[t.length-1];(i.length>4||i==="com"||i==="org")&&(e=jR);var r=n.match(e);return r?r[0]:""},zR=function(){var n=q.navigator.onLine;return v.isUndefined(n)||n},li=function(){},Mr=null,Va=null;typeof JSON<"u"&&(Mr=JSON.stringify,Va=JSON.parse),Mr=Mr||v.JSONEncode,Va=Va||v.JSONDecode,v.info=v.info,v.info.browser=v.info.browser,v.info.browserVersion=v.info.browserVersion,v.info.device=v.info.device,v.info.properties=v.info.properties,v.isBlockedUA=v.isBlockedUA,v.isEmptyObject=v.isEmptyObject,v.isObject=v.isObject,v.JSONDecode=v.JSONDecode,v.JSONEncode=v.JSONEncode,v.toArray=v.toArray,v.NPO=ci;var qR="mixpanelBrowserDb",E0="mixpanelRecordingEvents",Pd="mixpanelRecordingRegistry",WR=1,GR=[E0,Pd],Sn=function(n){this.dbPromise=null,this.storeName=n};Sn.prototype._openDb=function(){return new ke(function(n,e){var t=q.indexedDB.open(qR,WR);t.onerror=function(){e(t.error)},t.onsuccess=function(){n(t.result)},t.onupgradeneeded=function(i){var r=i.target.result;GR.forEach(function(o){r.createObjectStore(o)})}})},Sn.prototype.init=function(){return q.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(n){return n instanceof q.IDBDatabase?ke.resolve():ke.reject(n)})):ke.reject("indexedDB is not supported in this browser")},Sn.prototype.makeTransaction=function(n,e){var t=this.storeName,i=function(r){return new ke(function(o,s){var a=r.transaction(t,n);a.oncomplete=function(){o(a)},a.onabort=a.onerror=function(){s(a.error)},e(a.objectStore(t))})};return this.dbPromise.then(i).catch((function(r){return r&&r.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(i)):ke.reject(r)}).bind(this))},Sn.prototype.setItem=function(n,e){return this.makeTransaction("readwrite",function(t){t.put(e,n)})},Sn.prototype.getItem=function(n){var e;return this.makeTransaction("readonly",function(t){e=t.get(n)}).then(function(){return e.result})},Sn.prototype.removeItem=function(n){return this.makeTransaction("readwrite",function(e){e.delete(n)})},Sn.prototype.getAll=function(){var n;return this.makeTransaction("readonly",function(e){n=e.getAll()}).then(function(){return n.result})};var $R="__mp_opt_in_out_";function HR(n,e){P0(!0,n,e)}function KR(n,e){P0(!1,n,e)}function YR(n,e){return R0(n,e)==="1"}function I0(n,e){if(JR(e))return _e.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 t=R0(n,e)==="0";return t&&_e.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),t}function di(n){return Md(n,function(e){return this.get_config(e)})}function hi(n){return Md(n,function(e){return this._get_config(e)})}function Nr(n){return Md(n,function(e){return this._get_config(e)})}function XR(n,e){e=e||{},Od(e).remove(Ad(n,e),!!e.crossSubdomainCookie,e.cookieDomain)}function Od(n){return n=n||{},n.persistenceType==="localStorage"?v.localStorage:v.cookie}function Ad(n,e){return e=e||{},(e.persistencePrefix||$R)+n}function R0(n,e){return Od(e).get(Ad(n,e))}function JR(n){if(n&&n.ignoreDnt)return!1;var e=n&&n.window||q,t=e.navigator||{},i=!1;return v.each([t.doNotTrack,t.msDoNotTrack,e.doNotTrack],function(r){v.includes([!0,1,"1","yes"],r)&&(i=!0)}),i}function P0(n,e,t){if(!v.isString(e)||!e.length){_e.error("gdpr."+(n?"optIn":"optOut")+" called with an invalid token");return}t=t||{},Od(t).set(Ad(e,t),n?1:0,v.isNumber(t.cookieExpiration)?t.cookieExpiration:null,!!t.crossSubdomainCookie,!!t.secureCookie,!!t.crossSiteCookie,t.cookieDomain),t.track&&n&&t.track(t.trackEventName||"$opt_in",t.trackProperties,{send_immediately:!0})}function Md(n,e){return function(){var t=!1;try{var i=e.call(this,"token"),r=e.call(this,"ignore_dnt"),o=e.call(this,"opt_out_tracking_persistence_type"),s=e.call(this,"opt_out_tracking_cookie_prefix"),a=e.call(this,"window");i&&(t=I0(i,{ignoreDnt:r,persistenceType:o,persistencePrefix:s,window:a}))}catch(u){_e.error("Unexpected error when checking tracking opt-out status: "+u)}if(!t)return n.apply(this,arguments);var c=arguments[arguments.length-1];typeof c=="function"&&c(0)}}var ZR=Gi("lock"),O0=function(n,e){e=e||{},this.storageKey=n,this.storage=e.storage||q.localStorage,this.pollIntervalMS=e.pollIntervalMS||100,this.timeoutMS=e.timeoutMS||2e3,this.promiseImpl=e.promiseImpl||ke};O0.prototype.withLock=function(n,e){var t=this.promiseImpl;return new t(v.bind(function(i,r){var o=e||new Date().getTime()+"|"+Math.random(),s=new Date().getTime(),a=this.storageKey,c=this.pollIntervalMS,u=this.timeoutMS,l=this.storage,d=a+":X",h=a+":Y",p=a+":Z",m=function(S){if(new Date().getTime()-s>u){ZR.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+o+"]"),l.removeItem(p),l.removeItem(h),y();return}setTimeout(function(){try{S()}catch(w){r(w)}},c*(Math.random()+.1))},f=function(S,w){S()?w():m(function(){f(S,w)})},g=function(){var S=l.getItem(h);return S&&S!==o?!1:(l.setItem(h,o),l.getItem(h)===o?!0:(Go(l,!0)||r(new Error("localStorage support dropped while acquiring lock")),!1))},y=function(){l.setItem(d,o),f(g,function(){if(l.getItem(d)===o){b();return}m(function(){if(l.getItem(h)!==o){y();return}f(function(){return!l.getItem(p)},b)})})},b=function(){l.setItem(p,"1");var S=function(){l.removeItem(p),l.getItem(h)===o&&l.removeItem(h),l.getItem(d)===o&&l.removeItem(d)};n().then(function(w){S(),i(w)}).catch(function(w){S(),r(w)})};try{if(Go(l,!0))y();else throw new Error("localStorage support check failed")}catch(S){r(S)}},this))};var $o=function(n){this.storage=n||q.localStorage};$o.prototype.init=function(){return ke.resolve()},$o.prototype.setItem=function(n,e){return new ke(v.bind(function(t,i){try{this.storage.setItem(n,Mr(e))}catch(r){i(r)}t()},this))},$o.prototype.getItem=function(n){return new ke(v.bind(function(e,t){var i;try{i=Va(this.storage.getItem(n))}catch(r){t(r)}e(i)},this))},$o.prototype.removeItem=function(n){return new ke(v.bind(function(e,t){try{this.storage.removeItem(n)}catch(i){t(i)}e()},this))};var A0=Gi("batch"),wn=function(n,e){e=e||{},this.storageKey=n,this.usePersistence=e.usePersistence,this.usePersistence&&(this.queueStorage=e.queueStorage||new $o,this.lock=new O0(n,{storage:e.sharedLockStorage||q.localStorage,timeoutMS:e.sharedLockTimeoutMS})),this.reportError=e.errorReporter||v.bind(A0.error,A0),this.pid=e.pid||null,this.memQueue=[],this.initialized=!1,e.enqueueThrottleMs?this.enqueuePersisted=BR(v.bind(this._enqueuePersisted,this),e.enqueueThrottleMs):this.enqueuePersisted=v.bind(function(t){return this._enqueuePersisted([t])},this)};wn.prototype.ensureInit=function(){return this.initialized?ke.resolve():this.queueStorage.init().then(v.bind(function(){this.initialized=!0},this)).catch(v.bind(function(n){this.reportError("Error initializing queue persistence. Disabling persistence",n),this.initialized=!0,this.usePersistence=!1},this))},wn.prototype.enqueue=function(n,e){var t={id:Rd(),flushAfter:new Date().getTime()+e*2,payload:n};return this.usePersistence?this.enqueuePersisted(t):(this.memQueue.push(t),ke.resolve(!0))},wn.prototype._enqueuePersisted=function(n){var e=v.bind(function(){return this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(t){return this.saveToStorage(t.concat(n))},this)).then(v.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(n)),t},this)).catch(v.bind(function(t){return this.reportError("Error enqueueing items",t,n),!1},this))},this);return this.lock.withLock(e,this.pid).catch(v.bind(function(t){return this.reportError("Error acquiring storage lock",t),!1},this))},wn.prototype.fillBatch=function(n){var e=this.memQueue.slice(0,n);return this.usePersistence&&e.length<n?this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(t){if(t.length){var i={};v.each(e,function(s){i[s.id]=!0});for(var r=0;r<t.length;r++){var o=t[r];if(new Date().getTime()>o.flushAfter&&!i[o.id]&&(o.orphaned=!0,e.push(o),e.length>=n))break}}return e},this)):ke.resolve(e)};var M0=function(n,e){var t=[];return v.each(n,function(i){i.id&&!e[i.id]&&t.push(i)}),t};wn.prototype.removeItemsByID=function(n){var e={};if(v.each(n,function(i){e[i]=!0}),this.memQueue=M0(this.memQueue,e),this.usePersistence){var t=v.bind(function(){return this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(i){return i=M0(i,e),this.saveToStorage(i)},this)).then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(i){for(var r=0;r<i.length;r++){var o=i[r];if(o.id&&e[o.id])throw new Error("Item not removed from storage")}return!0},this)).catch(v.bind(function(i){return this.reportError("Error removing items",i,n),!1},this))},this);return this.lock.withLock(t,this.pid).catch(v.bind(function(i){return this.reportError("Error acquiring storage lock",i),Go(this.lock.storage,!0)?!1:t().then(v.bind(function(r){return r||this.queueStorage.removeItem(this.storageKey).then(function(){return r})},this)).catch(v.bind(function(r){return this.reportError("Error clearing queue",r),!1},this))},this))}else return ke.resolve(!0)};var N0=function(n,e){var t=[];return v.each(n,function(i){var r=i.id;if(r in e){var o=e[r];o!==null&&(i.payload=o,t.push(i))}else t.push(i)}),t};wn.prototype.updatePayloads=function(n){return this.memQueue=N0(this.memQueue,n),this.usePersistence?this.lock.withLock(v.bind(function(){return this.ensureInit().then(v.bind(function(){return this.readFromStorage()},this)).then(v.bind(function(e){return e=N0(e,n),this.saveToStorage(e)},this)).catch(v.bind(function(e){return this.reportError("Error updating items",n,e),!1},this))},this),this.pid).catch(v.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this)):ke.resolve(!0)},wn.prototype.readFromStorage=function(){return this.ensureInit().then(v.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(v.bind(function(n){return n&&(v.isArray(n)||(this.reportError("Invalid storage entry:",n),n=null)),n||[]},this)).catch(v.bind(function(n){return this.reportError("Error retrieving queue",n),[]},this))},wn.prototype.saveToStorage=function(n){return this.ensureInit().then(v.bind(function(){return this.queueStorage.setItem(this.storageKey,n)},this)).then(function(){return!0}).catch(v.bind(function(e){return this.reportError("Error saving queue",e),!1},this))},wn.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(v.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):ke.resolve()};var QR=10*60*1e3,Ho=Gi("batch"),Kt=function(n,e){this.errorReporter=e.errorReporter,this.queue=new wn(n,{errorReporter:v.bind(this.reportError,this),queueStorage:e.queueStorage,sharedLockStorage:e.sharedLockStorage,sharedLockTimeoutMS:e.sharedLockTimeoutMS,usePersistence:e.usePersistence,enqueueThrottleMs:e.enqueueThrottleMs}),this.libConfig=e.libConfig,this.sendRequest=e.sendRequestFunc,this.beforeSendHook=e.beforeSendHook,this.stopAllBatching=e.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=e.flushOnlyOnInterval||!1,this._flushPromise=null};Kt.prototype.enqueue=function(n){return this.queue.enqueue(n,this.flushInterval)},Kt.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},Kt.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},Kt.prototype.clear=function(){return this.queue.clear()},Kt.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},Kt.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},Kt.prototype.scheduleFlush=function(n){this.flushInterval=n,this.stopped||(this.timeoutID=setTimeout(v.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))},Kt.prototype.sendRequestPromise=function(n,e){return new ke(v.bind(function(t){this.sendRequest(n,e,t)},this))},Kt.prototype.flush=function(n){if(this.requestInProgress)return Ho.log("Flush: Request already in progress"),ke.resolve();this.requestInProgress=!0,n=n||{};var e=this.libConfig.batch_request_timeout_ms,t=new Date().getTime(),i=this.batchSize;return this.queue.fillBatch(i).then(v.bind(function(r){var o=r.length===i,s=[],a={};if(v.each(r,function(d){var h=d.payload;if(this.beforeSendHook&&!d.orphaned&&(h=this.beforeSendHook(h)),h){h.event&&h.properties&&(h.properties=v.extend({},h.properties,{mp_sent_by_lib_version:on.LIB_VERSION}));var p=!0,m=d.id;m?(this.itemIdsSentSuccessfully[m]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:d,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[m]}),p=!1):this.reportError("[dupe] found item with no ID",{item:d}),p&&s.push(h)}a[d.id]=h},this),s.length<1)return this.requestInProgress=!1,this.resetFlush(),ke.resolve();var c=v.bind(function(){return this.queue.removeItemsByID(v.map(r,function(d){return d.id})).then(v.bind(function(d){return v.each(r,v.bind(function(h){var p=h.id;p?(this.itemIdsSentSuccessfully[p]=this.itemIdsSentSuccessfully[p]||0,this.itemIdsSentSuccessfully[p]++,this.itemIdsSentSuccessfully[p]>5&&this.reportError("[dupe] item ID sent too many times",{item:h,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[p]})):this.reportError("[dupe] found item with no ID while removing",{item:h})},this)),d?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),ke.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),ke.resolve())},this))},this),u=v.bind(function(d){this.requestInProgress=!1;try{if(n.unloading)return this.queue.updatePayloads(a);if(v.isObject(d)&&d.error==="timeout"&&new Date().getTime()-t>=e)return this.reportError("Network timeout; retrying"),this.flush();if(v.isObject(d)&&(d.httpStatusCode>=500||d.httpStatusCode===429||d.httpStatusCode<=0&&!zR()||d.error==="timeout")){var h=this.flushInterval*2;return d.retryAfter&&(h=parseInt(d.retryAfter,10)*1e3||h),h=Math.min(QR,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h),ke.resolve()}else if(v.isObject(d)&&d.httpStatusCode===413)if(r.length>1){var p=Math.max(1,Math.floor(i/2));return this.batchSize=Math.min(this.batchSize,p,r.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),ke.resolve()}else return this.reportError("Single-event request too large; dropping",r),this.resetBatchSize(),c();else return c()}catch(m){this.reportError("Error handling API response",m),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:e};return n.unloading&&(l.transport="sendBeacon"),Ho.log("MIXPANEL REQUEST:",s),this.sendRequestPromise(s,l).then(u)},this)).catch(v.bind(function(r){this.reportError("Error flushing request queue",r),this.resetFlush()},this))},Kt.prototype.reportError=function(n,e){if(Ho.error.apply(Ho.error,arguments),this.errorReporter)try{e instanceof Error||(e=new Error(n)),this.errorReporter(n,e)}catch(t){Ho.error(t)}};var Nd=function(n){var e=Date.now();return!n||e>n.maxExpires||e>n.idleExpires},eP=250,Dr=Gi("recorder"),D0=q.CompressionStream,tP={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},nP=new Set([Q.MouseMove,Q.MouseInteraction,Q.Scroll,Q.ViewportResize,Q.Input,Q.TouchMove,Q.MediaInteraction,Q.Drag,Q.Selection]);function iP(n){return n.type===ce.IncrementalSnapshot&&nP.has(n.data.source)}var gt=function(n){this._mixpanel=n.mixpanelInstance,this._onIdleTimeout=n.onIdleTimeout||li,this._onMaxLengthReached=n.onMaxLengthReached||li,this._onBatchSent=n.onBatchSent||li,this._rrwebRecord=n.rrwebRecord||null,this._stopRecording=null,this.replayId=n.replayId,this.batchStartUrl=n.batchStartUrl||null,this.replayStartUrl=n.replayStartUrl||null,this.idleExpires=n.idleExpires||null,this.maxExpires=n.maxExpires||null,this.replayStartTime=n.replayStartTime||null,this.seqNo=n.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=qo,this.recordMinMs=0;var e=Go(n.sharedLockStorage,!0);this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new Sn(E0),this.batcher=new Kt(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:tP,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:n.sharedLockStorage,usePersistence:e,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:eP,sharedLockTimeoutMS:10*1e3})};gt.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var n={distinct_id:String(this._mixpanel.get_distinct_id())},e=this._mixpanel.get_property("$device_id");e&&(n.$device_id=e);var t=this._mixpanel.get_property("$user_id");return t&&(n.$user_id=t),n},gt.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.batcher.flush().then((function(){return this.queueStorage.removeItem(this.batcherKey)}).bind(this))},gt.prototype.getConfig=function(n){return this._mixpanel.get_config(n)},gt.prototype.get_config=function(n){return this.getConfig(n)},gt.prototype.startRecording=function(n){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){Dr.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>qo&&(this.recordMaxMs=qo,Dr.critical("record_max_ms cannot be greater than "+qo+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>Sd&&(this.recordMinMs=Sd,Dr.critical("record_min_ms cannot be greater than "+Sd+"ms. Capping value.")),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=v.info.currentUrl(),this.replayStartUrl=v.info.currentUrl()),n||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var e=(function(){clearTimeout(this.idleTimeoutId);var r=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,r),this.idleExpires=new Date().getTime()+r}).bind(this);e();var t=this.getConfig("record_block_selector");(t===""||t===null)&&(t=void 0);try{this._stopRecording=this._rrwebRecord({emit:(function(r){if(this.idleExpires&&this.idleExpires<r.timestamp){this._onIdleTimeout();return}iP(r)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),e()),this.__enqueuePromise=this.batcher.enqueue(r)}).bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:t,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}})}catch(r){this.reportError("Unexpected error when starting rrweb recording.",r)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var i=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),i)},gt.prototype.stopRecording=function(n){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(t){this.reportError("Error with rrweb stopRecording",t)}this._stopRecording=null}var e;return this.batcher.stopped?e=this.batcher.clear():n||(e=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),e},gt.prototype.isRrwebStopped=function(){return this._stopRecording===null},gt.prototype.flushEventsWithOptOut=function(n,e,t){var i=(function(r){r===0&&(this.stopRecording(),t({error:"Tracking has been opted out, stopping recording."}))}).bind(this);this._flushEvents(n,e,t,i)},gt.prototype.serialize=function(){var n;try{n=this._mixpanel.get_tab_id()}catch(e){this.reportError("Error getting tab ID for serialization ",e),n=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:n}},gt.deserialize=function(n,e){var t=new gt(v.extend({},e,{replayId:n.replayId,batchStartUrl:n.batchStartUrl,replayStartUrl:n.replayStartUrl,idleExpires:n.idleExpires,maxExpires:n.maxExpires,replayStartTime:n.replayStartTime,seqNo:n.seqNo,sharedLockStorage:e.sharedLockStorage}));return t},gt.prototype._sendRequest=function(n,e,t,i){var r=(function(s,a){s.status===200&&this.replayId===n&&(this.seqNo++,this.batchStartUrl=v.info.currentUrl()),this._onBatchSent(),i({status:0,httpStatusCode:s.status,responseBody:a,retryAfter:s.headers.get("Retry-After")})}).bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");q.fetch(o+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(e),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:t}).then(function(s){s.json().then(function(a){r(s,a)}).catch(function(a){i({error:a})})}).catch(function(s){i({error:s,httpStatusCode:0})})},gt.prototype._flushEvents=di(function(n,e,t){var i=n.length;if(i>0){for(var r=this.replayId,o=1/0,s=-1/0,a=!1,c=0;c<i;c++)o=Math.min(o,n[c].timestamp),s=Math.max(s,n[c].timestamp),n[c].type===ce.FullSnapshot&&(a=!0);if(this.seqNo===0){if(!a){t({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var u=s-this.replayStartTime,l={$current_url:this.batchStartUrl,$lib_version:on.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:r,replay_length_ms:u,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},d=JSON.stringify(n);if(Object.assign(l,this.getUserIdInfo()),D0){var h=new Blob([d],{type:"application/json"}).stream(),p=h.pipeThrough(new D0("gzip"));new Response(p).blob().then((function(m){l.format="gzip",this._sendRequest(r,l,m,t)}).bind(this))}else l.format="body",this._sendRequest(r,l,d,t)}}),gt.prototype.reportError=function(n,e){Dr.error.apply(Dr.error,arguments);try{!e&&!(n instanceof Error)&&(n=new Error(n)),this.getConfig("error_reporter")(n,e)}catch(t){Dr.error(t)}};var Lr=function(n){this.idb=new Sn(Pd),this.errorReporter=n.errorReporter,this.mixpanelInstance=n.mixpanelInstance,this.sharedLockStorage=n.sharedLockStorage};Lr.prototype.handleError=function(n){this.errorReporter("IndexedDB error: ",n)},Lr.prototype.setActiveRecording=function(n){var e=n.tabId;return e?this.idb.init().then((function(){return this.idb.setItem(e,n)}).bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),ke.resolve())},Lr.prototype.getActiveRecording=function(){return this.idb.init().then((function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}).bind(this)).then((function(n){return Nd(n)?null:n}).bind(this)).catch(this.handleError.bind(this))},Lr.prototype.clearActiveRecording=function(){return this.getActiveRecording().then((function(n){if(n)return n.maxExpires=0,this.setActiveRecording(n)}).bind(this)).catch(this.handleError.bind(this))},Lr.prototype.flushInactiveRecordings=function(){return this.idb.init().then((function(){return this.idb.getAll()}).bind(this)).then((function(n){var e=n.filter(function(t){return Nd(t)}).map((function(t){var i=gt.deserialize(t,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return i.unloadPersistedData().then((function(){return this.idb.removeItem(t.tabId)}).bind(this)).catch(this.handleError.bind(this))}).bind(this));return ke.all(e)}).bind(this)).catch(this.handleError.bind(this))};var Ko=Gi("recorder"),zn=function(n,e,t){this.mixpanelInstance=n,this.rrwebRecord=e||si,this.sharedLockStorage=t,this.recordingRegistry=new Lr({mixpanelInstance:this.mixpanelInstance,errorReporter:Ko.error,sharedLockStorage:t}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};zn.prototype.startRecording=function(n){if(n=n||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){Ko.log("Recording already in progress, skipping startRecording.");return}var e=(function(){Ko.log("Idle timeout reached, restarting recording."),this.resetRecording()}).bind(this),t=(function(){Ko.log("Max recording length reached, stopping recording."),this.resetRecording()}).bind(this),i=(function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}).bind(this),r={mixpanelInstance:this.mixpanelInstance,onBatchSent:i,onIdleTimeout:e,onMaxLengthReached:t,replayId:v.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return n.activeSerializedRecording?this.activeRecording=gt.deserialize(n.activeSerializedRecording,r):this.activeRecording=new gt(r),this.activeRecording.startRecording(n.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())},zn.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then((function(){return this.recordingRegistry.clearActiveRecording()}).bind(this)).then((function(){this.stopRecordingInProgress=!1}).bind(this))},zn.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},zn.prototype._stopCurrentRecording=function(n,e){if(this.activeRecording){var t=this.activeRecording.stopRecording(n);return e&&(this.activeRecording=null),t}return ke.resolve()},zn.prototype.resumeRecording=function(n){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),ke.resolve(null)):this.recordingRegistry.getActiveRecording().then((function(e){return e&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:e}):n?this.startRecording({shouldStopBatcher:!1}):(Ko.log("No resumable recording found."),null)}).bind(this))},zn.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},zn.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null},Object.defineProperty(zn.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),q.__mp_recorder=zn;var za="change",$i="click",L0="hashchange",Ur="mp_locationchange",U0="popstate",F0="scrollend",Dd="submit",rP=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],B0=["mp-include"],Ld=["mp-no-track"],j0=Ld.concat(["mp-sensitive"]),oP=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],Pt=Gi("autocapture");function Ud(n){for(var e={},t=V0(n).split(" "),i=0;i<t.length;i++){var r=t[i];r&&(e[r]=!0)}return e}function V0(n){switch(typeof n.className){case"string":return n.className;case"object":return n.className.baseVal||n.getAttribute("class")||"";default:return""}}function sP(n){if(n.previousElementSibling)return n.previousElementSibling;do n=n.previousSibling;while(n&&!W0(n));return n}function z0(n,e,t,i,r,o){var s={$classes:V0(n).split(" "),$tag_name:n.tagName.toLowerCase()},a=n.id;a&&(s.$id=a),jd(n,e,r,o)&&v.each(oP.concat(i),function(d){if(n.hasAttribute(d)&&!t[d]){var h=n.getAttribute(d);qa(h)&&(s["$attr-"+d]=h)}});for(var c=1,u=1,l=n;l=sP(l);)c++,l.tagName===n.tagName&&u++;return s.$nth_child=c,s.$nth_of_type=u,s}function aP(n,e){var t=e.allowElementCallback,i=e.allowSelectors||[],r=e.blockAttrs||[],o=e.blockElementCallback,s=e.blockSelectors||[],a=e.captureTextContent||!1,c=e.captureExtraAttrs||[],u=e.capturedForHeatMap||!1,l={};v.each(r,function(k){l[k]=!0});var d=null,h=typeof n.target>"u"?n.srcElement:n.target;if(G0(h)&&(h=h.parentNode),lP(h,n)&&Fd(h,n,t,i)&&!Bd(h,n,o,s)){for(var p=[h],m=h;m.parentNode&&!Cn(m,"body");)p.push(m.parentNode),m=m.parentNode;var f=[],g,y=!1;if(v.each(p,function(k){var C=jd(k,n,t,i);!l.href&&k.tagName.toLowerCase()==="a"&&(g=k.getAttribute("href"),g=C&&qa(g)&&g),Bd(k,n,o,s)&&(y=!0),f.push(z0(k,n,l,c,t,i))},this),!y){var b=be.documentElement;if(d={$event_type:n.type,$host:q.location.host,$pathname:q.location.pathname,$elements:f,$el_attr__href:g,$viewportHeight:Math.max(b.clientHeight,q.innerHeight||0),$viewportWidth:Math.max(b.clientWidth,q.innerWidth||0),$pageHeight:be.body.offsetHeight||0,$pageWidth:be.body.offsetWidth||0},v.each(c,function(k){if(!l[k]&&h.hasAttribute(k)){var C=h.getAttribute(k);qa(C)&&(d["$el_attr__"+k]=C)}}),a&&(S=q0(h,n,t,i),S&&S.length&&(d.$el_text=S)),n.type===$i&&(v.each(rP,function(k){k in n&&(d["$"+k]=n[k])}),u&&(d.$captured_for_heatmap=!0),h=cP(n)),a){var S=q0(h,n,t,i);S&&S.length&&(d.$el_text=S)}if(h){if(!Fd(h,n,t,i)||Bd(h,n,o,s))return null;var w=z0(h,n,l,c,t,i);d.$target=w,d.$el_classes=w.$classes,v.extend(d,v.strip_empty_properties({$el_id:w.$id,$el_tag_name:w.$tag_name}))}}}return d}function q0(n,e,t,i){var r="";return jd(n,e,t,i)&&n.childNodes&&n.childNodes.length&&v.each(n.childNodes,function(o){G0(o)&&o.textContent&&(r+=v.trim(o.textContent).split(/(\s+)/).filter(qa).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),v.trim(r)}function cP(n){for(var e=n.target,t=n.composedPath(),i=0;i<t.length;i++){var r=t[i];if(Cn(r,"a")||Cn(r,"button")||Cn(r,"input")||Cn(r,"select")||r.getAttribute&&r.getAttribute("role")==="button"){e=r;break}if(r===e)break}return e}function Fd(n,e,t,i){if(t)try{if(!t(n,e))return!1}catch(s){return Pt.critical("Error while checking element in allowElementCallback",s),!1}if(!i.length)return!0;for(var r=0;r<i.length;r++){var o=i[r];try{if(n.matches(o))return!0}catch(s){Pt.critical("Error while checking selector: "+o,s)}}return!1}function Bd(n,e,t,i){var r;if(t)try{if(t(n,e))return!0}catch(a){return Pt.critical("Error while checking element in blockElementCallback",a),!0}if(i&&i.length)for(r=0;r<i.length;r++){var o=i[r];try{if(n.matches(o))return!0}catch(a){Pt.critical("Error while checking selector: "+o,a)}}var s=Ud(n);for(r=0;r<Ld.length;r++)if(s[Ld[r]])return!0;return!1}function W0(n){return n&&n.nodeType===1}function Cn(n,e){return n&&n.tagName&&n.tagName.toLowerCase()===e.toLowerCase()}function G0(n){return n&&n.nodeType===3}function uP(){try{var n=be.createElement("div");return!!n.matches}catch{return!1}}function lP(n,e){if(!n||Cn(n,"html")||!W0(n))return!1;var t=n.tagName.toLowerCase();switch(t){case"form":return e.type===Dd;case"input":return["button","submit"].indexOf(n.getAttribute("type"))===-1?e.type===za:e.type===$i;case"select":case"textarea":return e.type===za;default:return e.type===$i}}function jd(n,e,t,i){var r;if(!Fd(n,e,t,i))return!1;for(var o=n;o.parentNode&&!Cn(o,"body");o=o.parentNode){var s=Ud(o);for(r=0;r<j0.length;r++)if(s[j0[r]])return!1}var a=Ud(n);for(r=0;r<B0.length;r++)if(a[B0[r]])return!0;if(Cn(n,"input")||Cn(n,"select")||Cn(n,"textarea")||n.getAttribute("contenteditable")==="true")return!1;var c=n.type||"";if(typeof c=="string")switch(c.toLowerCase()){case"hidden":return!1;case"password":return!1}var u=n.name||n.id||"";if(typeof u=="string"){var l=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(l.test(u.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function qa(n){if(n===null||v.isUndefined(n))return!1;if(typeof n=="string"){n=v.trim(n);var e=/^(?:(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(e.test((n||"").replace(/[- ]/g,"")))return!1;var t=/(^\d{3}-?\d{2}-?\d{4}$)/;if(t.test(n))return!1}return!0}var dP=30,hP=1e3,pP=4;function $0(){this.clicks=[]}$0.prototype.isRageClick=function(n,e,t){t=t||{};var i=t.threshold_px||dP,r=t.timeout_ms||hP,o=t.click_count||pP,s=Date.now(),a=this.clicks[this.clicks.length-1];if(a&&s-a.timestamp<r&&Math.sqrt(Math.pow(n-a.x,2)+Math.pow(e-a.y,2))<i){if(this.clicks.push({x:n,y:e,timestamp:s}),this.clicks.length>=o)return this.clicks=[],!0}else this.clicks=[{x:n,y:e,timestamp:s}];return!1};var H0="autocapture",fP="track_pageview",K0="full-url",mP="url-with-path-and-query-string",gP="url-with-path",vP="allow_element_callback",Y0="allow_selectors",X0="allow_url_regexes",J0="block_attrs",Z0="block_element_callback",Q0="block_selectors",ey="block_url_regexes",ty="capture_extra_attrs",ny="capture_text_content",iy="scroll_capture_all",ry="scroll_depth_percent_checkpoints",Wa="click",Vd="input",oy="pageview",sy="rage_click",zd="scroll",qd="submit",ht={};ht[Y0]=[],ht[X0]=[],ht[J0]=[],ht[Z0]=null,ht[Q0]=[],ht[ey]=[],ht[ty]=[],ht[ny]=!1,ht[iy]=!1,ht[ry]=[25,50,75,100],ht[Wa]=!0,ht[Vd]=!0,ht[oy]=K0,ht[sy]=!0,ht[zd]=!0,ht[qd]=!0;var Ga={$mp_autocapture:!0},ay="$mp_click",yP="$mp_input_change",cy="$mp_rage_click",bP="$mp_scroll",_P="$mp_submit",Ot=function(n){this.mp=n};Ot.prototype.init=function(){if(!uP()){Pt.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageviewTracking(),this.initClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking()},Ot.prototype.getFullConfig=function(){var n=this.mp.get_config(H0);return n?v.isObject(n)?v.extend({},ht,n):ht:{}},Ot.prototype.getConfig=function(n){return this.getFullConfig()[n]},Ot.prototype.currentUrlBlocked=function(){var n,e=v.info.currentUrl(),t=this.getConfig(X0)||[];if(t.length){var i=!1;for(n=0;n<t.length;n++){var r=t[n];try{if(e.match(r)){i=!0;break}}catch(s){return Pt.critical("Error while checking block URL regex: "+r,s),!0}}if(!i)return!0}var o=this.getConfig(ey)||[];if(!o||!o.length)return!1;for(n=0;n<o.length;n++)try{if(e.match(o[n]))return!0}catch(s){return Pt.critical("Error while checking block URL regex: "+o[n],s),!0}return!1},Ot.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(H0)?this.getConfig(oy):this.mp.get_config(fP)},Ot.prototype.trackDomEvent=function(n,e){if(!this.currentUrlBlocked()){var t=this.mp.is_recording_heatmap_data()&&(e===ay&&!this.getConfig(Wa)||e===cy&&!this._getRageClickConfig()),i=aP(n,{allowElementCallback:this.getConfig(vP),allowSelectors:this.getConfig(Y0),blockAttrs:this.getConfig(J0),blockElementCallback:this.getConfig(Z0),blockSelectors:this.getConfig(Q0),captureExtraAttrs:this.getConfig(ty),captureTextContent:this.getConfig(ny),capturedForHeatMap:t});i&&(v.extend(i,Ga),this.mp.track(e,i))}},Ot.prototype._getRageClickConfig=function(){var n=this.getConfig(sy);return n?n===!0?{}:typeof n=="object"?n:{}:null},Ot.prototype.initClickTracking=function(){q.removeEventListener($i,this.listenerClick),!(!this.getConfig(Wa)&&!this.mp.get_config("record_heatmap_data"))&&(Pt.log("Initializing click tracking"),this.listenerClick=q.addEventListener($i,(function(n){!this.getConfig(Wa)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(n,ay)}).bind(this)))},Ot.prototype.initInputTracking=function(){q.removeEventListener(za,this.listenerChange),this.getConfig(Vd)&&(Pt.log("Initializing input tracking"),this.listenerChange=q.addEventListener(za,(function(n){this.getConfig(Vd)&&this.trackDomEvent(n,yP)}).bind(this)))},Ot.prototype.initPageviewTracking=function(){if(q.removeEventListener(U0,this.listenerPopstate),q.removeEventListener(L0,this.listenerHashchange),q.removeEventListener(Ur,this.listenerLocationchange),!!this.pageviewTrackingConfig()){Pt.log("Initializing pageview tracking");var n="",e=!1;this.currentUrlBlocked()||(e=this.mp.track_pageview(Ga)),e&&(n=v.info.currentUrl()),this.listenerPopstate=q.addEventListener(U0,function(){q.dispatchEvent(new Event(Ur))}),this.listenerHashchange=q.addEventListener(L0,function(){q.dispatchEvent(new Event(Ur))});var t=q.history.pushState;typeof t=="function"&&(q.history.pushState=function(r,o,s){t.call(q.history,r,o,s),q.dispatchEvent(new Event(Ur))});var i=q.history.replaceState;typeof i=="function"&&(q.history.replaceState=function(r,o,s){i.call(q.history,r,o,s),q.dispatchEvent(new Event(Ur))}),this.listenerLocationchange=q.addEventListener(Ur,xd((function(){if(!this.currentUrlBlocked()){var r=v.info.currentUrl(),o=!1,s=r.split("#")[0].split("?")[0]!==n.split("#")[0].split("?")[0],a=this.pageviewTrackingConfig();if(a===K0?o=r!==n:a===mP?o=r.split("#")[0]!==n.split("#")[0]:a===gP&&(o=s),o){var c=this.mp.track_pageview(Ga);c&&(n=r),s&&(this.lastScrollCheckpoint=0,Pt.log("Path change: re-initializing scroll depth checkpoints"))}}}).bind(this)))}},Ot.prototype.initRageClickTracking=function(){q.removeEventListener($i,this.listenerRageClick);var n=this._getRageClickConfig();!n&&!this.mp.get_config("record_heatmap_data")||(Pt.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new $0),this.listenerRageClick=(function(e){var t=this._getRageClickConfig();!t&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e.pageX,e.pageY,t)&&this.trackDomEvent(e,cy)}).bind(this),q.addEventListener($i,this.listenerRageClick))},Ot.prototype.initScrollTracking=function(){q.removeEventListener(F0,this.listenerScroll),this.getConfig(zd)&&(Pt.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0,this.listenerScroll=q.addEventListener(F0,xd((function(){if(this.getConfig(zd)&&!this.currentUrlBlocked()){var n=this.getConfig(iy),e=(this.getConfig(ry)||[]).slice().sort(function(c,u){return c-u}),t=q.scrollY,i=v.extend({$scroll_top:t},Ga);try{var r=be.body.scrollHeight,o=Math.round(t/(r-q.innerHeight)*100);if(i.$scroll_height=r,i.$scroll_percentage=o,o>this.lastScrollCheckpoint)for(var s=0;s<e.length;s++){var a=e[s];o>=a&&this.lastScrollCheckpoint<a&&(i.$scroll_checkpoint=a,this.lastScrollCheckpoint=a,n=!0)}}catch(c){Pt.critical("Error while calculating scroll percentage",c)}n&&this.mp.track(bP,i)}}).bind(this))))},Ot.prototype.initSubmitTracking=function(){q.removeEventListener(Dd,this.listenerSubmit),this.getConfig(qd)&&(Pt.log("Initializing submit tracking"),this.listenerSubmit=q.addEventListener(Dd,(function(n){this.getConfig(qd)&&this.trackDomEvent(n,_P)}).bind(this)))},S0(Ot);var kP=q.fetch,At=Gi("flags"),$a="flags",Ha="context",Wd={};Wd[Ha]={};var ae=function(n){this.getFullApiRoute=n.getFullApiRoute,this.getMpConfig=n.getConfigFunc,this.setMpConfig=n.setConfigFunc,this.getMpProperty=n.getPropertyFunc,this.track=n.trackingFunc};ae.prototype.init=function(){if(!SP()){At.critical("Feature Flags unavailable: missing minimum required APIs");return}this.flags=null,this.fetchFlags(),this.trackedFeatures=new Set},ae.prototype.getFullConfig=function(){var n=this.getMpConfig($a);return n?v.isObject(n)?v.extend({},Wd,n):Wd:{}},ae.prototype.getConfig=function(n){return this.getFullConfig()[n]},ae.prototype.isSystemEnabled=function(){return!!this.getMpConfig($a)},ae.prototype.updateContext=function(n,e){if(!this.isSystemEnabled())return At.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var t=this.getMpConfig($a);v.isObject(t)||(t={});var i=e&&e.replace?{}:this.getConfig(Ha);return t[Ha]=v.extend({},i,n),this.setMpConfig($a,t),this.fetchFlags()},ae.prototype.areFlagsReady=function(){return this.isSystemEnabled()||At.error("Feature Flags not enabled"),!!this.flags},ae.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var n=this.getMpProperty("distinct_id"),e=this.getMpProperty("$device_id");At.log("Fetching flags for distinct ID: "+n);var t={context:v.extend({distinct_id:n,device_id:e},this.getConfig(Ha))};return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=q.fetch(this.getFullApiRoute(),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),"Content-Type":"application/octet-stream"},body:JSON.stringify(t)}).then((function(i){return this.markFetchComplete(),i.json().then((function(r){var o=r.flags;if(!o)throw new Error("No flags in API response");var s=new Map;v.each(o,function(a,c){s.set(c,{key:a.variant_key,value:a.variant_value})}),this.flags=s}).bind(this)).catch((function(r){this.markFetchComplete(),At.error(r)}).bind(this))}).bind(this)).catch((function(i){this.markFetchComplete(),At.error(i)}).bind(this)),this.fetchPromise},ae.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){At.error("Fetch in progress started time not set, cannot mark fetch complete");return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null},ae.prototype.getVariant=function(n,e){return this.fetchPromise?this.fetchPromise.then((function(){return this.getVariantSync(n,e)}).bind(this)).catch(function(t){return At.error(t),e}):new Promise(function(t){At.critical("Feature Flags not initialized"),t(e)})},ae.prototype.getVariantSync=function(n,e){if(!this.areFlagsReady())return At.log("Flags not loaded yet"),e;var t=this.flags.get(n);return t?(this.trackFeatureCheck(n,t),t):(At.log('No flag found: "'+n+'"'),e)},ae.prototype.getVariantValue=function(n,e){return this.getVariant(n,{value:e}).then(function(t){return t.value}).catch(function(t){return At.error(t),e})},ae.prototype.getFeatureData=function(n,e){return At.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(n,e)},ae.prototype.getVariantValueSync=function(n,e){return this.getVariantSync(n,{value:e}).value},ae.prototype.isEnabled=function(n,e){return this.getVariantValue(n).then((function(){return this.isEnabledSync(n,e)}).bind(this)).catch(function(t){return At.error(t),e})},ae.prototype.isEnabledSync=function(n,e){e=e||!1;var t=this.getVariantValueSync(n,e);return t!==!0&&t!==!1&&(At.error('Feature flag "'+n+'" value: '+t+" is not a boolean; returning fallback value: "+e),t=e),t},ae.prototype.trackFeatureCheck=function(n,e){this.trackedFeatures.has(n)||(this.trackedFeatures.add(n),this.track("$experiment_started",{"Experiment name":n,"Variant name":e.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency}))};function SP(){return!!kP&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"}S0(ae),ae.prototype.are_flags_ready=ae.prototype.areFlagsReady,ae.prototype.get_variant=ae.prototype.getVariant,ae.prototype.get_variant_sync=ae.prototype.getVariantSync,ae.prototype.get_variant_value=ae.prototype.getVariantValue,ae.prototype.get_variant_value_sync=ae.prototype.getVariantValueSync,ae.prototype.is_enabled=ae.prototype.isEnabled,ae.prototype.is_enabled_sync=ae.prototype.isEnabledSync,ae.prototype.update_context=ae.prototype.updateContext,ae.prototype.get_feature_data=ae.prototype.getFeatureData;var qn=function(){};qn.prototype.create_properties=function(){},qn.prototype.event_handler=function(){},qn.prototype.after_track_handler=function(){},qn.prototype.init=function(n){return this.mp=n,this},qn.prototype.track=function(n,e,t,i){var r=this,o=v.dom_query(n);if(o.length===0){_e.error("The DOM query ("+n+") returned 0 elements");return}return v.each(o,function(s){v.register_event(s,this.override_event,function(a){var c={},u=r.create_properties(t,this),l=r.mp.get_config("track_links_timeout");r.event_handler(a,this,c),window.setTimeout(r.track_callback(i,u,c,!0),l),r.mp.track(e,u,r.track_callback(i,u,c))})},this),!0},qn.prototype.track_callback=function(n,e,t,i){i=i||!1;var r=this;return function(){t.callback_fired||(t.callback_fired=!0,!(n&&n(i,e)===!1)&&r.after_track_handler(e,t,i))}},qn.prototype.create_properties=function(n,e){var t;return typeof n=="function"?t=n(e):t=v.extend({},n),t};var Fr=function(){this.override_event="click"};v.inherit(Fr,qn),Fr.prototype.create_properties=function(n,e){var t=Fr.superclass.create_properties.apply(this,arguments);return e.href&&(t.url=e.href),t},Fr.prototype.event_handler=function(n,e,t){t.new_tab=n.which===2||n.metaKey||n.ctrlKey||e.target==="_blank",t.href=e.href,t.new_tab||n.preventDefault()},Fr.prototype.after_track_handler=function(n,e){e.new_tab||setTimeout(function(){window.location=e.href},0)};var Ka=function(){this.override_event="submit"};v.inherit(Ka,qn),Ka.prototype.event_handler=function(n,e,t){t.element=e,n.preventDefault()},Ka.prototype.after_track_handler=function(n,e){setTimeout(function(){e.element.submit()},0)};var pi="$set",Br="$set_once",sn="$unset",Hi="$add",Tn="$append",Ki="$union",Wn="$remove",wP="$delete",uy={set_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[pi]=i,t},unset_action:function(n){var e={},t=[];return v.isArray(n)||(n=[n]),v.each(n,function(i){this._is_reserved_property(i)||t.push(i)},this),e[sn]=t,e},set_once_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[Br]=i,t},union_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=v.isArray(r)?r:[r])},this):i[n]=v.isArray(e)?e:[e],t[Ki]=i,t},append_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[Tn]=i,t},remove_action:function(n,e){var t={},i={};return v.isObject(n)?v.each(n,function(r,o){this._is_reserved_property(o)||(i[o]=r)},this):i[n]=e,t[Wn]=i,t},delete_action:function(){var n={};return n[wP]="",n}},Fe=function(){};v.extend(Fe.prototype,uy),Fe.prototype._init=function(n,e,t){this._mixpanel=n,this._group_key=e,this._group_id=t},Fe.prototype.set=Nr(function(n,e,t){var i=this.set_action(n,e);return v.isObject(n)&&(t=e),this._send_request(i,t)}),Fe.prototype.set_once=Nr(function(n,e,t){var i=this.set_once_action(n,e);return v.isObject(n)&&(t=e),this._send_request(i,t)}),Fe.prototype.unset=Nr(function(n,e){var t=this.unset_action(n);return this._send_request(t,e)}),Fe.prototype.union=Nr(function(n,e,t){v.isObject(n)&&(t=e);var i=this.union_action(n,e);return this._send_request(i,t)}),Fe.prototype.delete=Nr(function(n){var e=this.delete_action();return this._send_request(e,n)}),Fe.prototype.remove=Nr(function(n,e,t){var i=this.remove_action(n,e);return this._send_request(i,t)}),Fe.prototype._send_request=function(n,e){n.$group_key=this._group_key,n.$group_id=this._group_id,n.$token=this._get_config("token");var t=v.encodeDates(n);return this._mixpanel._track_or_batch({type:"groups",data:t,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},e)},Fe.prototype._is_reserved_property=function(n){return n==="$group_key"||n==="$group_id"},Fe.prototype._get_config=function(n){return this._mixpanel.get_config(n)},Fe.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Fe.prototype.remove=Fe.prototype.remove,Fe.prototype.set=Fe.prototype.set,Fe.prototype.set_once=Fe.prototype.set_once,Fe.prototype.union=Fe.prototype.union,Fe.prototype.unset=Fe.prototype.unset,Fe.prototype.toString=Fe.prototype.toString;var ee=function(){};v.extend(ee.prototype,uy),ee.prototype._init=function(n){this._mixpanel=n},ee.prototype.set=hi(function(n,e,t){var i=this.set_action(n,e);return v.isObject(n)&&(t=e),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),i[pi]=v.extend({},v.info.people_properties(),i[pi]),this._send_request(i,t)}),ee.prototype.set_once=hi(function(n,e,t){var i=this.set_once_action(n,e);return v.isObject(n)&&(t=e),this._send_request(i,t)}),ee.prototype.unset=hi(function(n,e){var t=this.unset_action(n);return this._send_request(t,e)}),ee.prototype.increment=hi(function(n,e,t){var i={},r={};return v.isObject(n)?(v.each(n,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){_e.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else r[s]=o},this),t=e):(v.isUndefined(e)&&(e=1),r[n]=e),i[Hi]=r,this._send_request(i,t)}),ee.prototype.append=hi(function(n,e,t){v.isObject(n)&&(t=e);var i=this.append_action(n,e);return this._send_request(i,t)}),ee.prototype.remove=hi(function(n,e,t){v.isObject(n)&&(t=e);var i=this.remove_action(n,e);return this._send_request(i,t)}),ee.prototype.union=hi(function(n,e,t){v.isObject(n)&&(t=e);var i=this.union_action(n,e);return this._send_request(i,t)}),ee.prototype.track_charge=hi(function(){_e.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")}),ee.prototype.clear_charges=function(n){return this.set("$transactions",[],n)},ee.prototype.delete_user=function(){if(!this._identify_called()){_e.error("mixpanel.people.delete_user() requires you to call identify() first");return}var n={$delete:this._mixpanel.get_distinct_id()};return this._send_request(n)},ee.prototype.toString=function(){return this._mixpanel.toString()+".people"},ee.prototype._send_request=function(n,e){n.$token=this._get_config("token"),n.$distinct_id=this._mixpanel.get_distinct_id();var t=this._mixpanel.get_property("$device_id"),i=this._mixpanel.get_property("$user_id"),r=this._mixpanel.get_property("$had_persisted_distinct_id");t&&(n.$device_id=t),i&&(n.$user_id=i),r&&(n.$had_persisted_distinct_id=r);var o=v.encodeDates(n);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},e):(this._enqueue(n),v.isUndefined(e)||(this._get_config("verbose")?e({status:-1,error:null}):e(-1)),v.truncate(o,255))},ee.prototype._get_config=function(n){return this._mixpanel.get_config(n)},ee.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0},ee.prototype._enqueue=function(n){pi in n?this._mixpanel.persistence._add_to_people_queue(pi,n):Br in n?this._mixpanel.persistence._add_to_people_queue(Br,n):sn in n?this._mixpanel.persistence._add_to_people_queue(sn,n):Hi in n?this._mixpanel.persistence._add_to_people_queue(Hi,n):Tn in n?this._mixpanel.persistence._add_to_people_queue(Tn,n):Wn in n?this._mixpanel.persistence._add_to_people_queue(Wn,n):Ki in n?this._mixpanel.persistence._add_to_people_queue(Ki,n):_e.error("Invalid call to _enqueue():",n)},ee.prototype._flush_one_queue=function(n,e,t,i){var r=this,o=v.extend({},this._mixpanel.persistence.load_queue(n)),s=o;!v.isUndefined(o)&&v.isObject(o)&&!v.isEmptyObject(o)&&(r._mixpanel.persistence._pop_from_people_queue(n,o),r._mixpanel.persistence.save(),i&&(s=i(o)),e.call(r,s,function(a,c){a===0&&r._mixpanel.persistence._add_to_people_queue(n,o),v.isUndefined(t)||t(a,c)}))},ee.prototype._flush=function(n,e,t,i,r,o,s){var a=this;this._flush_one_queue(pi,this.set,n),this._flush_one_queue(Br,this.set_once,i),this._flush_one_queue(sn,this.unset,o,function(g){return v.keys(g)}),this._flush_one_queue(Hi,this.increment,e),this._flush_one_queue(Ki,this.union,r);var c=this._mixpanel.persistence.load_queue(Tn);if(!v.isUndefined(c)&&v.isArray(c)&&c.length)for(var u,l=function(g,y){g===0&&a._mixpanel.persistence._add_to_people_queue(Tn,u),v.isUndefined(t)||t(g,y)},d=c.length-1;d>=0;d--)c=this._mixpanel.persistence.load_queue(Tn),u=c.pop(),a._mixpanel.persistence.save(),v.isEmptyObject(u)||a.append(u,l);var h=this._mixpanel.persistence.load_queue(Wn);if(!v.isUndefined(h)&&v.isArray(h)&&h.length)for(var p,m=function(g,y){g===0&&a._mixpanel.persistence._add_to_people_queue(Wn,p),v.isUndefined(s)||s(g,y)},f=h.length-1;f>=0;f--)h=this._mixpanel.persistence.load_queue(Wn),p=h.pop(),a._mixpanel.persistence.save(),v.isEmptyObject(p)||a.remove(p,m)},ee.prototype._is_reserved_property=function(n){return n==="$distinct_id"||n==="$token"||n==="$device_id"||n==="$user_id"||n==="$had_persisted_distinct_id"},ee.prototype.set=ee.prototype.set,ee.prototype.set_once=ee.prototype.set_once,ee.prototype.unset=ee.prototype.unset,ee.prototype.increment=ee.prototype.increment,ee.prototype.append=ee.prototype.append,ee.prototype.remove=ee.prototype.remove,ee.prototype.union=ee.prototype.union,ee.prototype.track_charge=ee.prototype.track_charge,ee.prototype.clear_charges=ee.prototype.clear_charges,ee.prototype.delete_user=ee.prototype.delete_user,ee.prototype.toString=ee.prototype.toString;var Gd="__mps",$d="__mpso",Hd="__mpus",Kd="__mpa",Yd="__mpap",Xd="__mpr",Jd="__mpu",ly="$people_distinct_id",Ya="__alias",Yo="__timers",CP=[Gd,$d,Hd,Kd,Yd,Xd,Jd,ly,Ya,Yo],re=function(n){this.props={},this.campaign_params_saved=!1,n.persistence_name?this.name="mp_"+n.persistence_name:this.name="mp_"+n.token+"_mixpanel";var e=n.persistence;e!=="cookie"&&e!=="localStorage"&&(_e.critical("Unknown persistence type "+e+"; falling back to cookie"),e=n.persistence="cookie"),e==="localStorage"&&v.localStorage.is_supported()?this.storage=v.localStorage:this.storage=v.cookie,this.load(),this.update_config(n),this.upgrade(),this.save()};re.prototype.properties=function(){var n={};return this.load(),v.each(this.props,function(e,t){v.include(CP,t)||(n[t]=e)}),n},re.prototype.load=function(){if(!this.disabled){var n=this.storage.parse(this.name);n&&(this.props=v.extend({},n))}},re.prototype.upgrade=function(){var n,e;this.storage===v.localStorage?(n=v.cookie.parse(this.name),v.cookie.remove(this.name),v.cookie.remove(this.name,!0),n&&this.register_once(n)):this.storage===v.cookie&&(e=v.localStorage.parse(this.name),v.localStorage.remove(this.name),e&&this.register_once(e))},re.prototype.save=function(){this.disabled||this.storage.set(this.name,Mr(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},re.prototype.load_prop=function(n){return this.load(),this.props[n]},re.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},re.prototype.clear=function(){this.remove(),this.props={}},re.prototype.register_once=function(n,e,t){return v.isObject(n)?(typeof e>"u"&&(e="None"),this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),v.each(n,function(i,r){(!this.props.hasOwnProperty(r)||this.props[r]===e)&&(this.props[r]=i)},this),this.save(),!0):!1},re.prototype.register=function(n,e){return v.isObject(n)?(this.expire_days=typeof e>"u"?this.default_expiry:e,this.load(),v.extend(this.props,n),this.save(),!0):!1},re.prototype.unregister=function(n){this.load(),n in this.props&&(delete this.props[n],this.save())},re.prototype.update_search_keyword=function(n){this.register(v.info.searchInfo(n))},re.prototype.update_referrer_info=function(n){this.register_once({$initial_referrer:n||"$direct",$initial_referring_domain:v.info.referringDomain(n)||"$direct"},"")},re.prototype.get_referrer_info=function(){return v.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},re.prototype.update_config=function(n){this.default_expiry=this.expire_days=n.cookie_expiration,this.set_disabled(n.disable_persistence),this.set_cookie_domain(n.cookie_domain),this.set_cross_site(n.cross_site_cookie),this.set_cross_subdomain(n.cross_subdomain_cookie),this.set_secure(n.secure_cookie)},re.prototype.set_disabled=function(n){this.disabled=n,this.disabled?this.remove():this.save()},re.prototype.set_cookie_domain=function(n){n!==this.cookie_domain&&(this.remove(),this.cookie_domain=n,this.save())},re.prototype.set_cross_site=function(n){n!==this.cross_site&&(this.cross_site=n,this.remove(),this.save())},re.prototype.set_cross_subdomain=function(n){n!==this.cross_subdomain&&(this.cross_subdomain=n,this.remove(),this.save())},re.prototype.get_cross_subdomain=function(){return this.cross_subdomain},re.prototype.set_secure=function(n){n!==this.secure&&(this.secure=!!n,this.remove(),this.save())},re.prototype._add_to_people_queue=function(n,e){var t=this._get_queue_key(n),i=e[n],r=this._get_or_create_queue(pi),o=this._get_or_create_queue(Br),s=this._get_or_create_queue(sn),a=this._get_or_create_queue(Hi),c=this._get_or_create_queue(Ki),u=this._get_or_create_queue(Wn,[]),l=this._get_or_create_queue(Tn,[]);t===Gd?(v.extend(r,i),this._pop_from_people_queue(Hi,i),this._pop_from_people_queue(Ki,i),this._pop_from_people_queue(sn,i)):t===$d?(v.each(i,function(d,h){h in o||(o[h]=d)}),this._pop_from_people_queue(sn,i)):t===Hd?v.each(i,function(d){v.each([r,o,a,c],function(h){d in h&&delete h[d]}),v.each(l,function(h){d in h&&delete h[d]}),s[d]=!0}):t===Kd?(v.each(i,function(d,h){h in r?r[h]+=d:(h in a||(a[h]=0),a[h]+=d)},this),this._pop_from_people_queue(sn,i)):t===Jd?(v.each(i,function(d,h){v.isArray(d)&&(h in c||(c[h]=[]),v.each(d,function(p){v.include(c[h],p)||c[h].push(p)}))}),this._pop_from_people_queue(sn,i)):t===Xd?(u.push(i),this._pop_from_people_queue(Tn,i)):t===Yd&&(l.push(i),this._pop_from_people_queue(sn,i)),_e.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),_e.log(e),this.save()},re.prototype._pop_from_people_queue=function(n,e){var t=this.props[this._get_queue_key(n)];v.isUndefined(t)||v.each(e,function(i,r){n===Tn||n===Wn?v.each(t,function(o){o[r]===i&&delete o[r]}):delete t[r]},this)},re.prototype.load_queue=function(n){return this.load_prop(this._get_queue_key(n))},re.prototype._get_queue_key=function(n){if(n===pi)return Gd;if(n===Br)return $d;if(n===sn)return Hd;if(n===Hi)return Kd;if(n===Tn)return Yd;if(n===Wn)return Xd;if(n===Ki)return Jd;_e.error("Invalid queue:",n)},re.prototype._get_or_create_queue=function(n,e){var t=this._get_queue_key(n);return e=v.isUndefined(e)?{}:e,this.props[t]||(this.props[t]=e)},re.prototype.set_event_timer=function(n,e){var t=this.load_prop(Yo)||{};t[n]=e,this.props[Yo]=t,this.save()},re.prototype.remove_event_timer=function(n){var e=this.load_prop(Yo)||{},t=e[n];return v.isUndefined(t)||(delete this.props[Yo][n],this.save()),t};var Zd,dy=function(n,e){throw new Error(n+" not available in this build.")},Tt,hy=0,TP=1,xP=function(n){return n},Yt="mixpanel",py="base64",EP="json",Qd="$device:",jr=q.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,fy=!jr&&Vn.indexOf("MSIE")===-1&&Vn.indexOf("Mozilla")===-1,Xa=null;ui.sendBeacon&&(Xa=function(){return ui.sendBeacon.apply(ui,arguments)});var my={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},gy={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:my,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:py,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:li,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:li,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:!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, audio",record_canvas:!1,record_collect_fonts:!1,record_heatmap_data:!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:qo,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},vy=!1,E=function(){},eh=function(n,e,t){var i,r=t===Yt?Tt:Tt[t];if(r&&Zd===hy)i=r;else{if(r&&!v.isArray(r)){_e.error("You have already initialized "+t);return}i=new E}if(i._cached_groups={},i._init(n,e,t),i.people=new ee,i.people._init(i),!i.get_config("skip_first_touch_marketing")){var o=v.info.campaignParams(null),s={},a=!1;v.each(o,function(c,u){s["initial_"+u]=c,c&&(a=!0)}),a&&i.people.set_once(s)}return on.DEBUG=on.DEBUG||i.get_config("debug"),!v.isUndefined(r)&&v.isArray(r)&&(i._execute_array.call(i.people,r.people),i._execute_array(r)),i};E.prototype.init=function(n,e,t){if(v.isUndefined(t)){this.report_error("You must name your new library: init(token, config, name)");return}if(t===Yt){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var i=eh(n,e,t);return Tt[t]=i,i._loaded(),i},E.prototype._init=function(n,e,t){e=e||{},this.__loaded=!0,this.config={};var i={};if(!("api_payload_format"in e)){var r=e.api_host||gy.api_host;r.match(/\.mixpanel\.com/)&&(i.api_payload_format=EP)}if(this.set_config(v.extend({},gy,i,e,{name:t,token:n,callback_fn:(t===Yt?t:Yt+"."+t)+"._jsc"})),this._jsc=li,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(!v.localStorage.is_supported(!0)||!jr)this._batch_requests=!1,_e.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),v.each(this.get_batcher_configs(),function(a){_e.log("Clearing batch queue "+a.queue_key),v.localStorage.remove(a.queue_key)});else if(this.init_batchers(),Xa&&q.addEventListener){var o=v.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);q.addEventListener("pagehide",function(a){a.persisted&&o()}),q.addEventListener("visibilitychange",function(){be.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new re(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=v.UUID();this.get_distinct_id()||this.register_once({distinct_id:Qd+s,$device_id:s},""),this.flags=new ae({getFullApiRoute:v.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:v.bind(this.get_config,this),setConfigFunc:v.bind(this.set_config,this),getPropertyFunc:v.bind(this.get_property,this),trackingFunc:v.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new Ot(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},E.prototype._init_tab_id=function(){if(v.sessionStorage.is_supported())try{var n=this.get_config("name")+"_"+this.get_config("token"),e="mp_tab_id_"+n,t="mp_gen_new_tab_id_"+n;(v.sessionStorage.get(t)||!v.sessionStorage.get(e))&&v.sessionStorage.set(e,"$tab-"+v.UUID()),v.sessionStorage.set(t,"1"),this.tab_id=v.sessionStorage.get(e),q.addEventListener("beforeunload",function(){v.sessionStorage.remove(t)})}catch(i){this.report_error("Error initializing tab id",i)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},E.prototype.get_tab_id=function(){return this.tab_id||null},E.prototype._should_load_recorder=function(){var n=new Sn(Pd),e=this.get_tab_id();return n.init().then(function(){return n.getAll()}).then(function(t){for(var i=0;i<t.length;i++)if(Nd(t[i])||t[i].tabId===e)return!0;return!1}).catch(v.bind(function(t){this.report_error("Error checking recording registry",t)},this))},E.prototype._check_and_start_session_recording=di(function(n){if(!q.MutationObserver){_e.critical("Browser does not support MutationObserver; skipping session recording");return}var e=v.bind(function(i){var r=v.bind(function(){this._recorder=this._recorder||new q.__mp_recorder(this),this._recorder.resumeRecording(i)},this);v.isUndefined(q.__mp_recorder)?dy(this.get_config("recorder_src"),r):r()},this),t=this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent");n||t?e(!0):this._should_load_recorder().then(function(i){i&&e(!1)})}),E.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},E.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()},E.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()},E.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()},E.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},E.prototype.get_session_recording_properties=function(){var n={},e=this._get_session_replay_id();return e&&(n.$mp_replay_id=e),n},E.prototype.get_session_replay_url=function(){var n=null,e=this._get_session_replay_id();if(e){var t=v.HTTPBuildQuery({replay_id:e,distinct_id:this.get_distinct_id(),token:this.get_config("token")});n="https://mixpanel.com/projects/replay-redirect?"+t}return n},E.prototype._get_session_replay_id=function(){var n=null;return this._recorder&&(n=this._recorder.replayId),n||null},E.prototype.__get_recorder=function(){return this._recorder},E.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 n=v.info.campaignParams(null);v.each(n,(function(e,t){this.unregister(t)}).bind(this))}},E.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(be.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(v.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(be.referrer)},E.prototype._dom_loaded=function(){v.each(this.__dom_loaded_queue,function(n){this._track_dom.apply(this,n)},this),this.has_opted_out_tracking()||v.each(this.__request_queue,function(n){this._send_request.apply(this,n)},this),delete this.__dom_loaded_queue,delete this.__request_queue},E.prototype._track_dom=function(n,e){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!vy)return this.__dom_loaded_queue.push([n,e]),!1;var t=new n().init(this);return t.track.apply(t,e)},E.prototype._prepare_callback=function(n,e){if(v.isUndefined(n))return null;if(jr){var t=function(s){n(s,e)};return t}else{var i=this._jsc,r=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+r+"]";return i[r]=function(s){delete i[r],n(s,e)},o}},E.prototype._send_request=function(n,e,t,i){var r=!0;if(fy)return this.__request_queue.push(arguments),r;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!i&&(v.isFunction(t)||typeof t=="string")&&(i=t,t=null),t=v.extend(o,t||{}),jr||(t.method="GET");var a=t.method==="POST",c=Xa&&a&&t.transport.toLowerCase()==="sendbeacon",u=t.verbose;e.verbose&&(u=!0),this.get_config("test")&&(e.test=1),u&&(e.verbose=1),this.get_config("img")&&(e.img=1),jr||(i?e.callback=i:(u||this.get_config("test"))&&(e.callback="(function(){})")),e.ip=this.get_config("ip")?1:0,e._=new Date().getTime().toString(),a&&(s="data="+encodeURIComponent(e.data),delete e.data),v.extend(e,this.get_config("api_extra_query_params")),n+="?"+v.HTTPBuildQuery(e);var l=this;if("img"in e){var d=be.createElement("img");d.src=n,be.body.appendChild(d)}else if(c){try{r=Xa(n,s)}catch(y){l.report_error(y),r=!1}try{i&&i(r?1:0)}catch(y){l.report_error(y)}}else if(jr)try{var h=new XMLHttpRequest;h.open(t.method,n,!0);var p=this.get_config("xhr_headers");if(a&&(p["Content-Type"]="application/x-www-form-urlencoded"),v.each(p,function(y,b){h.setRequestHeader(b,y)}),t.timeout_ms&&typeof h.timeout<"u"){h.timeout=t.timeout_ms;var m=new Date().getTime()}h.withCredentials=!0,h.onreadystatechange=function(){if(h.readyState===4)if(h.status===200){if(i)if(u){var y;try{y=v.JSONDecode(h.responseText)}catch(w){if(l.report_error(w),t.ignore_json_errors)y=h.responseText;else return}i(y)}else i(Number(h.responseText))}else{var b;if(h.timeout&&!h.status&&new Date().getTime()-m>=h.timeout?b="timeout":b="Bad HTTP status: "+h.status+" "+h.statusText,l.report_error(b),i)if(u){var S=h.responseHeaders||{};i({status:0,httpStatusCode:h.status,error:b,retryAfter:S["Retry-After"]})}else i(0)}},h.send(s)}catch(y){l.report_error(y),r=!1}else{var f=be.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=n;var g=be.getElementsByTagName("script")[0];g.parentNode.insertBefore(f,g)}return r},E.prototype._execute_array=function(n){var e,t=[],i=[],r=[];v.each(n,function(s){s&&(e=s[0],v.isArray(e)?r.push(s):typeof s=="function"?s.call(this):v.isArray(s)&&e==="alias"?t.push(s):v.isArray(s)&&e.indexOf("track")!==-1&&typeof this[e]=="function"?r.push(s):i.push(s))},this);var o=function(s,a){v.each(s,function(c){if(v.isArray(c[0])){var u=a;v.each(c,function(l){u=u[l[0]].apply(u,l.slice(1))})}else this[c[0]].apply(this,c.slice(1))},a)};o(t,this),o(i,this),o(r,this)},E.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},E.prototype.get_batcher_configs=function(){var n="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:n+"_ev"},people:{type:"people",api_name:"engage",queue_key:n+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:n+"_gr"}},this._batcher_configs},E.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var n=v.bind(function(t){return new Kt(t.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:v.bind(function(i,r,o){var s=this.get_config("api_routes");this._send_request(this.get_api_host(t.api_name)+"/"+s[t.api_name],this._encode_data_for_request(i),r,this._prepare_callback(o,i))},this),beforeSendHook:v.bind(function(i){return this._run_hook("before_send_"+t.type,i)},this),stopAllBatchingFunc:v.bind(this.stop_batch_senders,this),usePersistence:!0})},this),e=this.get_batcher_configs();this.request_batchers={events:n(e.events),people:n(e.people),groups:n(e.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},E.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,v.each(this.request_batchers,function(n){n.start()}))},E.prototype.stop_batch_senders=function(){this._batch_requests=!1,v.each(this.request_batchers,function(n){n.stop(),n.clear()})},E.prototype.push=function(n){this._execute_array([n])},E.prototype.disable=function(n){typeof n>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(n)},E.prototype._encode_data_for_request=function(n){var e=Mr(n);return this.get_config("api_payload_format")===py&&(e=v.base64Encode(e)),{data:e}},E.prototype._track_or_batch=function(n,e){var t=v.truncate(n.data,255),i=n.endpoint,r=n.batcher,o=n.should_send_immediately,s=n.send_request_options||{};e=e||li;var a=!0,c=v.bind(function(){return s.skip_hooks||(t=this._run_hook("before_send_"+n.type,t)),t?(_e.log("MIXPANEL REQUEST:"),_e.log(t),this._send_request(i,this._encode_data_for_request(t),s,this._prepare_callback(e,t))):null},this);return this._batch_requests&&!o?r.enqueue(t).then(function(u){u?e(1,t):c()}):a=c(),a&&t},E.prototype.track=di(function(n,e,t,i){!i&&typeof t=="function"&&(i=t,t=null),t=t||{};var r=t.transport;r&&(t.transport=r);var o=t.send_immediately;if(typeof i!="function"&&(i=li),v.isUndefined(n)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(n)){i(0);return}e=v.extend({},e),e.token=this.get_config("token");var s=this.persistence.remove_event_timer(n);if(!v.isUndefined(s)){var a=new Date().getTime()-s;e.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?v.info.marketingParams():{};e=v.extend({},v.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),e);var u=this.get_config("property_blacklist");v.isArray(u)?v.each(u,function(h){delete e[h]}):this.report_error("Invalid value for property_blacklist config: "+u);var l={event:n,properties:e},d=this._track_or_batch({type:"events",data:l,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:t},i);return d}),E.prototype.set_group=di(function(n,e,t){v.isArray(e)||(e=[e]);var i={};return i[n]=e,this.register(i),this.people.set(n,e,t)}),E.prototype.add_group=di(function(n,e,t){var i=this.get_property(n),r={};return i===void 0?(r[n]=[e],this.register(r)):i.indexOf(e)===-1&&(i.push(e),r[n]=i,this.register(r)),this.people.union(n,e,t)}),E.prototype.remove_group=di(function(n,e,t){var i=this.get_property(n);if(i!==void 0){var r=i.indexOf(e);r>-1&&(i.splice(r,1),this.register({group_key:i})),i.length===0&&this.unregister(n)}return this.people.remove(n,e,t)}),E.prototype.track_with_groups=di(function(n,e,t,i){var r=v.extend({},e||{});return v.each(t,function(o,s){o!=null&&(r[s]=o)}),this.track(n,r,i)}),E.prototype._create_map_key=function(n,e){return n+"_"+JSON.stringify(e)},E.prototype._remove_group_from_cache=function(n,e){delete this._cached_groups[this._create_map_key(n,e)]},E.prototype.get_group=function(n,e){var t=this._create_map_key(n,e),i=this._cached_groups[t];return(i===void 0||i._group_key!==n||i._group_id!==e)&&(i=new Fe,i._init(this,n,e),this._cached_groups[t]=i),i},E.prototype.track_pageview=di(function(n,e){typeof n!="object"&&(n={}),e=e||{};var t=e.event_name||"$mp_web_page_view",i=v.extend(v.info.mpPageViewProperties(),v.info.campaignParams(),v.info.clickParams()),r=v.extend({},i,n);return this.track(t,r)}),E.prototype.track_links=function(){return this._track_dom.call(this,Fr,arguments)},E.prototype.track_forms=function(){return this._track_dom.call(this,Ka,arguments)},E.prototype.time_event=function(n){if(v.isUndefined(n)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(n)||this.persistence.set_event_timer(n,new Date().getTime())};var IP={persistent:!0},th=function(n){var e;return v.isObject(n)?e=n:v.isUndefined(n)?e={}:e={days:n},v.extend({},IP,e)};E.prototype.register=function(n,e){var t=th(e);t.persistent?this.persistence.register(n,t.days):v.extend(this.unpersisted_superprops,n)},E.prototype.register_once=function(n,e,t){var i=th(t);i.persistent?this.persistence.register_once(n,e,i.days):(typeof e>"u"&&(e="None"),v.each(n,function(r,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===e)&&(this.unpersisted_superprops[o]=r)},this))},E.prototype.unregister=function(n,e){e=th(e),e.persistent?this.persistence.unregister(n):delete this.unpersisted_superprops[n]},E.prototype._register_single=function(n,e){var t={};t[n]=e,this.register(t)},E.prototype.identify=function(n,e,t,i,r,o,s,a){var c=this.get_distinct_id();if(n&&c!==n){if(typeof n=="string"&&n.indexOf(Qd)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:n})}if(!this.get_property("$device_id")){var u=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}n!==c&&n!==this.get_property(Ya)&&(this.unregister(Ya),this.register({distinct_id:n})),this._flags.identify_called=!0,this.people._flush(e,t,i,r,o,s,a),n!==c&&this.track("$identify",{distinct_id:n,$anon_distinct_id:c},{skip_hooks:!0}),n!==c&&this.flags.fetchFlags()},E.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var n=v.UUID();this.register_once({distinct_id:Qd+n,$device_id:n},""),this._check_and_start_session_recording()},E.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},E.prototype.alias=function(n,e){if(n===this.get_property(ly))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var t=this;return v.isUndefined(e)&&(e=this.get_distinct_id()),n!==e?(this._register_single(Ya,n),this.track("$create_alias",{alias:n,distinct_id:e},{skip_hooks:!0},function(){t.identify(n)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(n),-1)},E.prototype.name_tag=function(n){this._register_single("mp_name_tag",n)},E.prototype.set_config=function(n){if(v.isObject(n)){v.extend(this.config,n);var e=n.batch_size;e&&v.each(this.request_batchers,function(t){t.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),on.DEBUG=on.DEBUG||this.get_config("debug"),("autocapture"in n||"record_heatmap_data"in n)&&this.autocapture&&this.autocapture.init()}},E.prototype.get_config=function(n){return this.config[n]},E.prototype._run_hook=function(n){var e=(this.config.hooks[n]||xP).apply(this,Wi.call(arguments,1));return typeof e>"u"&&(this.report_error(n+" hook did not return a value"),e=null),e},E.prototype.get_property=function(n){return this.persistence.load_prop([n])},E.prototype.get_api_host=function(n){return this.get_config("api_hosts")[n]||this.get_config("api_host")},E.prototype.toString=function(){var n=this.get_config("name");return n!==Yt&&(n=Yt+"."+n),n},E.prototype._event_is_disabled=function(n){return v.isBlockedUA(Vn)||this._flags.disable_all_events||v.include(this.__disabled_events,n)},E.prototype._gdpr_init=function(){var n=this.get_config("opt_out_tracking_persistence_type")==="localStorage";n&&v.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")||v.cookie.get("mp_optout"))&&(v.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},E.prototype._gdpr_update_persistence=function(n){var e;if(n&&n.clear_persistence)e=!0;else if(n&&n.enable_persistence)e=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==e&&this.persistence.set_disabled(e),e?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},E.prototype._gdpr_call_func=function(n,e){return e=v.extend({track:v.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")},e),v.localStorage.is_supported()||(e.persistence_type="cookie"),n(this.get_config("token"),{track:e.track,trackEventName:e.track_event_name,trackProperties:e.track_properties,persistenceType:e.persistence_type,persistencePrefix:e.cookie_prefix,cookieDomain:e.cookie_domain,cookieExpiration:e.cookie_expiration,crossSiteCookie:e.cross_site_cookie,crossSubdomainCookie:e.cross_subdomain_cookie,secureCookie:e.secure_cookie,ignoreDnt:e.ignore_dnt})},E.prototype.opt_in_tracking=function(n){n=v.extend({enable_persistence:!0},n),this._gdpr_call_func(HR,n),this._gdpr_update_persistence(n)},E.prototype.opt_out_tracking=function(n){n=v.extend({clear_persistence:!0,delete_user:!0},n),n.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(KR,n),this._gdpr_update_persistence(n)},E.prototype.has_opted_in_tracking=function(n){return this._gdpr_call_func(YR,n)},E.prototype.has_opted_out_tracking=function(n){return this._gdpr_call_func(I0,n)},E.prototype.clear_opt_in_out_tracking=function(n){n=v.extend({enable_persistence:!0},n),this._gdpr_call_func(XR,n),this._gdpr_update_persistence(n)},E.prototype.report_error=function(n,e){_e.error.apply(_e.error,arguments);try{!e&&!(n instanceof Error)&&(n=new Error(n)),this.get_config("error_reporter")(n,e)}catch(t){_e.error(t)}},E.prototype.init=E.prototype.init,E.prototype.reset=E.prototype.reset,E.prototype.disable=E.prototype.disable,E.prototype.time_event=E.prototype.time_event,E.prototype.track=E.prototype.track,E.prototype.track_links=E.prototype.track_links,E.prototype.track_forms=E.prototype.track_forms,E.prototype.track_pageview=E.prototype.track_pageview,E.prototype.register=E.prototype.register,E.prototype.register_once=E.prototype.register_once,E.prototype.unregister=E.prototype.unregister,E.prototype.identify=E.prototype.identify,E.prototype.alias=E.prototype.alias,E.prototype.name_tag=E.prototype.name_tag,E.prototype.set_config=E.prototype.set_config,E.prototype.get_config=E.prototype.get_config,E.prototype.get_api_host=E.prototype.get_api_host,E.prototype.get_property=E.prototype.get_property,E.prototype.get_distinct_id=E.prototype.get_distinct_id,E.prototype.toString=E.prototype.toString,E.prototype.opt_out_tracking=E.prototype.opt_out_tracking,E.prototype.opt_in_tracking=E.prototype.opt_in_tracking,E.prototype.has_opted_out_tracking=E.prototype.has_opted_out_tracking,E.prototype.has_opted_in_tracking=E.prototype.has_opted_in_tracking,E.prototype.clear_opt_in_out_tracking=E.prototype.clear_opt_in_out_tracking,E.prototype.get_group=E.prototype.get_group,E.prototype.set_group=E.prototype.set_group,E.prototype.add_group=E.prototype.add_group,E.prototype.remove_group=E.prototype.remove_group,E.prototype.track_with_groups=E.prototype.track_with_groups,E.prototype.start_batch_senders=E.prototype.start_batch_senders,E.prototype.stop_batch_senders=E.prototype.stop_batch_senders,E.prototype.start_session_recording=E.prototype.start_session_recording,E.prototype.stop_session_recording=E.prototype.stop_session_recording,E.prototype.pause_session_recording=E.prototype.pause_session_recording,E.prototype.resume_session_recording=E.prototype.resume_session_recording,E.prototype.get_session_recording_properties=E.prototype.get_session_recording_properties,E.prototype.get_session_replay_url=E.prototype.get_session_replay_url,E.prototype.get_tab_id=E.prototype.get_tab_id,E.prototype.DEFAULT_API_ROUTES=my,E.prototype.__get_recorder=E.prototype.__get_recorder,re.prototype.properties=re.prototype.properties,re.prototype.update_search_keyword=re.prototype.update_search_keyword,re.prototype.update_referrer_info=re.prototype.update_referrer_info,re.prototype.get_cross_subdomain=re.prototype.get_cross_subdomain,re.prototype.clear=re.prototype.clear;var Vr={},RP=function(){v.each(Vr,function(n,e){e!==Yt&&(Tt[e]=n)}),Tt._=v},PP=function(){Tt.init=function(n,e,t){if(t)return Tt[t]||(Tt[t]=Vr[t]=eh(n,e,t),Tt[t]._loaded()),Tt[t];var i=Tt;Vr[Yt]?i=Vr[Yt]:n&&(i=eh(n,e,Yt),i._loaded(),Vr[Yt]=i),Tt=i,Zd===TP&&(q[Yt]=Tt),RP()}},OP=function(){function n(){n.done||(n.done=!0,vy=!0,fy=!1,v.each(Vr,function(i){i._dom_loaded()}))}function e(){try{be.documentElement.doScroll("left")}catch{setTimeout(e,1);return}n()}if(be.addEventListener)be.readyState==="complete"?n():be.addEventListener("DOMContentLoaded",n,!1);else if(be.attachEvent){be.attachEvent("onreadystatechange",n);var t=!1;try{t=q.frameElement===null}catch{}be.documentElement.doScroll&&t&&e()}v.register_event(q,"load",n,!0)};function AP(n){return dy=n,Zd=hy,Tt=new E,PP(),Tt.init(),OP(),Tt}function MP(n,e){e()}var Xo=AP(MP);function NP(n,e={}){const t=e.instanceName||`obi_${Math.random().toString(36).slice(2)}`;Xo.init(n,{debug:e.debug===!0,track_pageview:!1,persistence:"localStorage",...e.config||{}},t);const i=Xo.get_instance?Xo.get_instance(t):Xo[t],r={identify:(o,s)=>{var a;try{i.identify(o),s&&((a=i==null?void 0:i.people)!=null&&a.set)&&i.people.set(s)}catch{}},track:(o,s)=>{try{i.track(o,s||{})}catch{}},page:(o,s)=>{try{i.track("Page Viewed",{name:o,...s||{}})}catch{}},reset:()=>{try{i.reset()}catch{}}};return typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Xo.track("tab-focus-changed",{page_url:window.location.href},{transport:"sendBeacon"})}),r}function DP(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yy={exports:{}};(function(n){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function r(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,d,h){if(typeof l!="function")throw new TypeError("The listener must be a function");var p=new r(l,d||c,h),m=t?t+u:u;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],p]:c._events[m].push(p):(c._events[m]=p,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new i:delete c._events[u]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,d;if(this._eventsCount===0)return u;for(d in l=this._events)e.call(l,d)&&u.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=t?t+u:u,d=this._events[l];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,m=new Array(p);h<p;h++)m[h]=d[h].fn;return m},a.prototype.listenerCount=function(u){var l=t?t+u:u,d=this._events[l];return d?d.fn?1:d.length:0},a.prototype.emit=function(u,l,d,h,p,m){var f=t?t+u:u;if(!this._events[f])return!1;var g=this._events[f],y=arguments.length,b,S;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,l),!0;case 3:return g.fn.call(g.context,l,d),!0;case 4:return g.fn.call(g.context,l,d,h),!0;case 5:return g.fn.call(g.context,l,d,h,p),!0;case 6:return g.fn.call(g.context,l,d,h,p,m),!0}for(S=1,b=new Array(y-1);S<y;S++)b[S-1]=arguments[S];g.fn.apply(g.context,b)}else{var w=g.length,k;for(S=0;S<w;S++)switch(g[S].once&&this.removeListener(u,g[S].fn,void 0,!0),y){case 1:g[S].fn.call(g[S].context);break;case 2:g[S].fn.call(g[S].context,l);break;case 3:g[S].fn.call(g[S].context,l,d);break;case 4:g[S].fn.call(g[S].context,l,d,h);break;default:if(!b)for(k=1,b=new Array(y-1);k<y;k++)b[k-1]=arguments[k];g[S].fn.apply(g[S].context,b)}}return!0},a.prototype.on=function(u,l,d){return o(this,u,l,d,!1)},a.prototype.once=function(u,l,d){return o(this,u,l,d,!0)},a.prototype.removeListener=function(u,l,d,h){var p=t?t+u:u;if(!this._events[p])return this;if(!l)return s(this,p),this;var m=this._events[p];if(m.fn)m.fn===l&&(!h||m.once)&&(!d||m.context===d)&&s(this,p);else{for(var f=0,g=[],y=m.length;f<y;f++)(m[f].fn!==l||h&&!m[f].once||d&&m[f].context!==d)&&g.push(m[f]);g.length?this._events[p]=g.length===1?g[0]:g:s(this,p)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=t?t+u:u,this._events[l]&&s(this,l)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(yy);var LP=yy.exports;const nh=DP(LP);var ih=function(n,e){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},ih(n,e)};function an(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ih(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var rh=function(){return rh=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},rh.apply(this,arguments)};function Mt(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(l){try{u(i.next(l))}catch(d){s(d)}}function c(l){try{u(i.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):r(l.value).then(a,c)}u((i=i.apply(n,e||[])).next())})}function xt(n,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return c([u,l])}}function c(u){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(t=0)),t;)try{if(i=1,r&&(o=u[0]&2?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,r=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){t.label=u[1];break}if(u[0]===6&&t.label<o[1]){t.label=o[1],o=u;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(u);break}o[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(n,t)}catch(l){u=[6,l],r=0}finally{i=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Ja(n,e,t){if(t||arguments.length===2)for(var i=0,r=e.length,o;i<r;i++)(o||!(i in e))&&(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return n.concat(o||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;for(var Gn=function(){function n(e,t,i,r){this.left=e,this.top=t,this.width=i,this.height=r}return n.prototype.add=function(e,t,i,r){return new n(this.left+e,this.top+t,this.width+i,this.height+r)},n.fromClientRect=function(e,t){return new n(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},n.fromDOMRectList=function(e,t){var i=Array.from(t).find(function(r){return r.width!==0});return i?new n(i.left+e.windowBounds.left,i.top+e.windowBounds.top,i.width,i.height):n.EMPTY},n.EMPTY=new n(0,0,0,0),n}(),Za=function(n,e){return Gn.fromClientRect(n,e.getBoundingClientRect())},UP=function(n){var e=n.body,t=n.documentElement;if(!e||!t)throw new Error("Unable to get document size");var i=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),r=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new Gn(0,0,i,r)},Qa=function(n){for(var e=[],t=0,i=n.length;t<i;){var r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){var o=n.charCodeAt(t++);(o&64512)===56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},nt=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var t=n.length;if(!t)return"";for(var i=[],r=-1,o="";++r<t;){var s=n[r];s<=65535?i.push(s):(s-=65536,i.push((s>>10)+55296,s%1024+56320)),(r+1===t||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},by="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FP=typeof Uint8Array>"u"?[]:new Uint8Array(256),ec=0;ec<by.length;ec++)FP[by.charCodeAt(ec)]=ec;typeof SuppressedError=="function"&&SuppressedError;for(var _y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",BP=typeof Uint8Array>"u"?[]:new Uint8Array(256),tc=0;tc<_y.length;tc++)BP[_y.charCodeAt(tc)]=tc;for(var ky="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jP=typeof Uint8Array>"u"?[]:new Uint8Array(256),nc=0;nc<ky.length;nc++)jP[ky.charCodeAt(nc)]=nc;var VP=1,Sy=2,wy=3,zP=5,Cy=8,Ty=10,qP=25,WP=30,GP=37,$P=42,xy="!",fi="\xD7",HP="\xF7",Ey=[VP,Sy,wy,zP],KP=[Ty,Cy],YP=function(n,e){var t=[],i=[],r=[];return n.forEach(function(o,s){throw new Error("UnicodeTrie not initialized")}),[i,t,r]},XP=function(n,e){for(var t=n;t>=0;){var i=e[t];if(i===Ty)t--;else return i}return 0},JP=function(n,e,t,i,r){if(t[i]===0)return fi;var o=i-1;if(Array.isArray(r)&&r[o]===!0)return fi;var s=o-1,a=o+1,c=e[o];s>=0&&e[s];var u=e[a];if(c===Sy&&u===wy)return fi;if(Ey.indexOf(c)!==-1)return xy;if(Ey.indexOf(u)!==-1||KP.indexOf(u)!==-1)return fi;if(XP(o,e)===Cy)return HP;throw new Error("UnicodeTrie not initialized")},ZP=function(n,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=YP(n,e.lineBreak),i=t[0],r=t[1],o=t[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(r=r.map(function(a){return[qP,WP,$P].indexOf(a)!==-1?GP:a}));var s=e.wordBreak==="keep-all"?o.map(function(a,c){return a&&n[c]>=19968&&n[c]<=40959}):void 0;return[i,r,s]},QP=function(){function n(e,t,i,r){this.codePoints=e,this.required=t===xy,this.start=i,this.end=r}return n.prototype.slice=function(){return nt.apply(void 0,this.codePoints.slice(this.start,this.end))},n}(),e2=function(n,e){var t=Qa(n),i=ZP(t,e),r=i[0],o=i[1],s=i[2],a=t.length,c=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var l=fi;u<a&&(l=JP(t,o,r,++u,s))===fi;);if(l!==fi||u===a){var d=new QP(t,l,c,u);return c=u,{value:d,done:!1}}return{done:!0,value:null}}}},t2=1,n2=2,Jo=4,Iy=8,ic=10,Ry=47,Zo=92,i2=9,r2=32,rc=34,Qo=61,o2=35,s2=36,a2=37,oc=39,sc=40,es=41,c2=95,Ft=45,u2=33,l2=60,d2=62,h2=64,p2=91,f2=93,m2=61,g2=123,ac=63,v2=125,Py=124,y2=126,b2=128,Oy=65533,oh=42,Yi=43,_2=44,k2=58,S2=59,ts=46,w2=0,C2=8,T2=11,x2=14,E2=31,I2=127,xn=-1,Ay=48,My=97,Ny=101,R2=102,P2=117,O2=122,Dy=65,Ly=69,Uy=70,A2=85,M2=90,Et=function(n){return n>=Ay&&n<=57},N2=function(n){return n>=55296&&n<=57343},zr=function(n){return Et(n)||n>=Dy&&n<=Uy||n>=My&&n<=R2},D2=function(n){return n>=My&&n<=O2},L2=function(n){return n>=Dy&&n<=M2},U2=function(n){return D2(n)||L2(n)},F2=function(n){return n>=b2},cc=function(n){return n===ic||n===i2||n===r2},uc=function(n){return U2(n)||F2(n)||n===c2},Fy=function(n){return uc(n)||Et(n)||n===Ft},B2=function(n){return n>=w2&&n<=C2||n===T2||n>=x2&&n<=E2||n===I2},mi=function(n,e){return n!==Zo?!1:e!==ic},lc=function(n,e,t){return n===Ft?uc(e)||mi(e,t):uc(n)?!0:!!(n===Zo&&mi(n,e))},sh=function(n,e,t){return n===Yi||n===Ft?Et(e)?!0:e===ts&&Et(t):Et(n===ts?e:n)},j2=function(n){var e=0,t=1;(n[e]===Yi||n[e]===Ft)&&(n[e]===Ft&&(t=-1),e++);for(var i=[];Et(n[e]);)i.push(n[e++]);var r=i.length?parseInt(nt.apply(void 0,i),10):0;n[e]===ts&&e++;for(var o=[];Et(n[e]);)o.push(n[e++]);var s=o.length,a=s?parseInt(nt.apply(void 0,o),10):0;(n[e]===Ly||n[e]===Ny)&&e++;var c=1;(n[e]===Yi||n[e]===Ft)&&(n[e]===Ft&&(c=-1),e++);for(var u=[];Et(n[e]);)u.push(n[e++]);var l=u.length?parseInt(nt.apply(void 0,u),10):0;return t*(r+a*Math.pow(10,-s))*Math.pow(10,c*l)},V2={type:2},z2={type:3},q2={type:4},W2={type:13},G2={type:8},$2={type:21},H2={type:9},K2={type:10},Y2={type:11},X2={type:12},J2={type:14},dc={type:23},Z2={type:1},Q2={type:25},eO={type:24},tO={type:26},nO={type:27},iO={type:28},rO={type:29},oO={type:31},ah={type:32},By=function(){function n(){this._value=[]}return n.prototype.write=function(e){this._value=this._value.concat(Qa(e))},n.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==ah;)e.push(t),t=this.consumeToken();return e},n.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case rc:return this.consumeStringToken(rc);case o2:var t=this.peekCodePoint(0),i=this.peekCodePoint(1),r=this.peekCodePoint(2);if(Fy(t)||mi(i,r)){var o=lc(t,i,r)?n2:t2,s=this.consumeName();return{type:5,value:s,flags:o}}break;case s2:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),W2;break;case oc:return this.consumeStringToken(oc);case sc:return V2;case es:return z2;case oh:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),J2;break;case Yi:if(sh(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case _2:return q2;case Ft:var a=e,c=this.peekCodePoint(0),u=this.peekCodePoint(1);if(sh(a,c,u))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(lc(a,c,u))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(c===Ft&&u===d2)return this.consumeCodePoint(),this.consumeCodePoint(),eO;break;case ts:if(sh(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Ry:if(this.peekCodePoint(0)===oh)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===oh&&(l=this.consumeCodePoint(),l===Ry))return this.consumeToken();if(l===xn)return this.consumeToken()}break;case k2:return tO;case S2:return nO;case l2:if(this.peekCodePoint(0)===u2&&this.peekCodePoint(1)===Ft&&this.peekCodePoint(2)===Ft)return this.consumeCodePoint(),this.consumeCodePoint(),Q2;break;case h2:var d=this.peekCodePoint(0),h=this.peekCodePoint(1),p=this.peekCodePoint(2);if(lc(d,h,p)){var s=this.consumeName();return{type:7,value:s}}break;case p2:return iO;case Zo:if(mi(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case f2:return rO;case m2:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),G2;break;case g2:return Y2;case v2:return X2;case P2:case A2:var m=this.peekCodePoint(0),f=this.peekCodePoint(1);return m===Yi&&(zr(f)||f===ac)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case Py:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),H2;if(this.peekCodePoint(0)===Py)return this.consumeCodePoint(),$2;break;case y2:if(this.peekCodePoint(0)===Qo)return this.consumeCodePoint(),K2;break;case xn:return ah}return cc(e)?(this.consumeWhiteSpace(),oO):Et(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):uc(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:nt(e)}},n.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},n.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},n.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},n.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();zr(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var i=!1;t===ac&&e.length<6;)e.push(t),t=this.consumeCodePoint(),i=!0;if(i){var r=parseInt(nt.apply(void 0,e.map(function(c){return c===ac?Ay:c})),16),o=parseInt(nt.apply(void 0,e.map(function(c){return c===ac?Uy:c})),16);return{type:30,start:r,end:o}}var s=parseInt(nt.apply(void 0,e),16);if(this.peekCodePoint(0)===Ft&&zr(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var a=[];zr(t)&&a.length<6;)a.push(t),t=this.consumeCodePoint();var o=parseInt(nt.apply(void 0,a),16);return{type:30,start:s,end:o}}else return{type:30,start:s,end:s}},n.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===sc?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===sc?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},n.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===xn)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===oc||t===rc){var i=this.consumeStringToken(this.consumeCodePoint());return i.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===xn||this.peekCodePoint(0)===es)?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),dc)}for(;;){var r=this.consumeCodePoint();if(r===xn||r===es)return{type:22,value:nt.apply(void 0,e)};if(cc(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===xn||this.peekCodePoint(0)===es?(this.consumeCodePoint(),{type:22,value:nt.apply(void 0,e)}):(this.consumeBadUrlRemnants(),dc);if(r===rc||r===oc||r===sc||B2(r))return this.consumeBadUrlRemnants(),dc;if(r===Zo)if(mi(r,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),dc;else e.push(r)}},n.prototype.consumeWhiteSpace=function(){for(;cc(this.peekCodePoint(0));)this.consumeCodePoint()},n.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===es||e===xn)return;mi(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},n.prototype.consumeStringSlice=function(e){for(var t=5e4,i="";e>0;){var r=Math.min(t,e);i+=nt.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),i},n.prototype.consumeStringToken=function(e){var t="",i=0;do{var r=this._value[i];if(r===xn||r===void 0||r===e)return t+=this.consumeStringSlice(i),{type:0,value:t};if(r===ic)return this._value.splice(0,i),Z2;if(r===Zo){var o=this._value[i+1];o!==xn&&o!==void 0&&(o===ic?(t+=this.consumeStringSlice(i),i=-1,this._value.shift()):mi(r,o)&&(t+=this.consumeStringSlice(i),t+=nt(this.consumeEscapedCodePoint()),i=-1))}i++}while(!0)},n.prototype.consumeNumber=function(){var e=[],t=Jo,i=this.peekCodePoint(0);for((i===Yi||i===Ft)&&e.push(this.consumeCodePoint());Et(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(i===ts&&Et(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Iy;Et(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),r=this.peekCodePoint(1);var o=this.peekCodePoint(2);if((i===Ly||i===Ny)&&((r===Yi||r===Ft)&&Et(o)||Et(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Iy;Et(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[j2(e),t]},n.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],i=e[1],r=this.peekCodePoint(0),o=this.peekCodePoint(1),s=this.peekCodePoint(2);if(lc(r,o,s)){var a=this.consumeName();return{type:15,number:t,flags:i,unit:a}}return r===a2?(this.consumeCodePoint(),{type:16,number:t,flags:i}):{type:17,number:t,flags:i}},n.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(zr(e)){for(var t=nt(e);zr(this.peekCodePoint(0))&&t.length<6;)t+=nt(this.consumeCodePoint());cc(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(t,16);return i===0||N2(i)||i>1114111?Oy:i}return e===xn?Oy:e},n.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Fy(t))e+=nt(t);else if(mi(t,this.peekCodePoint(0)))e+=nt(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},n}(),jy=function(){function n(e){this._tokens=e}return n.create=function(e){var t=new By;return t.write(e),new n(t.read())},n.parseValue=function(e){return n.create(e).parseComponentValue()},n.parseValues=function(e){return n.create(e).parseComponentValues()},n.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},n.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},n.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},n.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},i=this.consumeToken();;){if(i.type===32||aO(i,e))return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue()),i=this.consumeToken()}},n.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var i=this.consumeToken();if(i.type===32||i.type===3)return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue())}},n.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?ah:e},n.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},n}(),gi=function(n){return n.type===15},st=function(n){return n.type===17},ue=function(n){return n.type===20},sO=function(n){return n.type===0},ch=function(n,e){return ue(n)&&n.value===e},Vy=function(n){return n.type!==31},vt=function(n){return n.type!==31&&n.type!==4},En=function(n){var e=[],t=[];return n.forEach(function(i){if(i.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(t),t=[];return}i.type!==31&&t.push(i)}),t.length&&e.push(t),e},aO=function(n,e){return e===11&&n.type===12||e===28&&n.type===29?!0:e===2&&n.type===3},vi=function(n){return n.type===17||n.type===15},Be=function(n){return n.type===16||vi(n)},zy=function(n){return n.length>1?[n[0],n[1]]:[n[0]]},yt={type:17,number:0,flags:Jo},uh={type:16,number:50,flags:Jo},yi={type:16,number:100,flags:Jo},ns=function(n,e,t){var i=n[0],r=n[1];return[Ee(i,e),Ee(typeof r<"u"?r:i,t)]},Ee=function(n,e){if(n.type===16)return n.number/100*e;if(gi(n))switch(n.unit){case"rem":case"em":return 16*n.number;case"px":default:return n.number}return n.number},qy="deg",Wy="grad",Gy="rad",$y="turn",hc={name:"angle",parse:function(n,e){if(e.type===15)switch(e.unit){case qy:return Math.PI*e.number/180;case Wy:return Math.PI/200*e.number;case Gy:return e.number;case $y:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},Hy=function(n){return n.type===15&&(n.unit===qy||n.unit===Wy||n.unit===Gy||n.unit===$y)},Ky=function(n){var e=n.filter(ue).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[yt,yt];case"to top":case"bottom":return Xt(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[yt,yi];case"to right":case"left":return Xt(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[yi,yi];case"to bottom":case"top":return Xt(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[yi,yt];case"to left":case"right":return Xt(270)}return 0},Xt=function(n){return Math.PI*n/180},bi=function(n){return(255&n)===0},pt=function(n){var e=255&n,t=255&n>>8,i=255&n>>16,r=255&n>>24;return e<255?"rgba(".concat(r,",").concat(i,",").concat(t,",").concat(e/255,")"):"rgb(".concat(r,",").concat(i,",").concat(t,")")},In=function(n,e,t,i){return(n<<24|e<<16|t<<8|Math.round(i*255)<<0)>>>0},pc=function(n,e){if(n.type===17)return n.number;if(n.type===16){var t=e===3?1:255;return e===3?n.number/100*t:Math.round(n.number/100*t)}return 0},Xi=function(n){return(n[0].type===20?n[0].value:"unknown")==="from"},Ke=function(n,e,t){return Math.min(Math.max(n,e),t)},Bt=function(n,e){return[n[0]*e[0]+n[1]*e[1]+n[2]*e[2],n[3]*e[0]+n[4]*e[1]+n[5]*e[2],n[6]*e[0]+n[7]*e[1]+n[8]*e[2]]},cO=function(n){return In(Ke(Math.round(n[0]*255),0,255),Ke(Math.round(n[1]*255),0,255),Ke(Math.round(n[2]*255),0,255),Ke(n[3],0,1))},lh=function(n){var e=n[0],t=n[1],i=n[2],r=n[3],o=Ji([e,t,i]);return In(Ke(Math.round(o[0]*255),0,255),Ke(Math.round(o[1]*255),0,255),Ke(Math.round(o[2]*255),0,255),r)},is=function(n){var e=_i([n[0],n[1],n[2]]);return lh([e[0],e[1],e[2],n[3]])},uO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for lab()");var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(vc([i,r,o])));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},lO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for oklab()");var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(gc([i,r,o])));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},dO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for oklch()");var t=Zy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(gc(mc([i,r,o]))));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},hO=function(n,e){if(Xi(e.filter(vt)))throw new Error("Relative color not supported for lch()");var t=Jy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=Ji(_i(vc(mc([i,r,o]))));return In(Ke(Math.round(a[0]*255),0,255),Ke(Math.round(a[1]*255),0,255),Ke(Math.round(a[2]*255),0,255),s)},Yy=function(n,e){var t=e.filter(vt),i=t[0],r=t[1],o=t[2],s=t[3],a=(i.type===17?Xt(i.number):hc.parse(n,i))/(Math.PI*2),c=Be(r)?r.number/100:0,u=Be(o)?o.number/100:0,l=typeof s<"u"&&Be(s)?Ee(s,1):1;return[a,c,u,l]},Xy=function(n,e){if(Xi(e))throw new Error("Relative color not supported for hsl()");var t=Yy(n,e),i=t[0],r=t[1],o=t[2],s=t[3],a=eb([i,r,o]);return In(a[0]*255,a[1]*255,a[2]*255,r===0?1:s)},Jy=function(n){var e=n.filter(vt),t=Be(e[0])?e[0].number:0,i=Be(e[1])?e[1].number:0,r=st(e[2])||gi(e[2])?e[2].number:0,o=typeof e[4]<"u"&&Be(e[4])?Ee(e[4],1):1;return[t,i,r,o]},fc=function(n){var e=n.filter(vt),t=e[0].type===16?e[0].number/100:st(e[0])?e[0].number:0,i=e[1].type===16?e[1].number/100:st(e[1])?e[1].number:0,r=st(e[2])||gi(e[2])?e[2].number:0,o=typeof e[4]<"u"&&Be(e[4])?Ee(e[4],1):1;return[t,i,r,o]},Zy=function(n){var e=n.filter(vt),t=e[0].type===16?e[0].number/100:st(e[0])?e[0].number:0,i=e[1].type===16?e[1].number/100:st(e[1])?e[1].number:0,r=st(e[2])||gi(e[2])?e[2].number:0,o=typeof e[4]<"u"&&Be(e[4])?Ee(e[4],1):1;return[t,i,r,o]},Qy=function(n){return Bt([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],n)},dh=function(n){return Bt([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],n)},hh=function(n,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-n)*t*6+n:t<1/2?e:t<2/3?(e-n)*6*(2/3-t)+n:n},eb=function(n){var e=n[0],t=n[1],i=n[2];if(t===0)return[i*255,i*255,i*255];var r=i<=.5?i*(t+1):i+t-i*t,o=i*2-r,s=hh(o,r,e+1/3),a=hh(o,r,e),c=hh(o,r,e-1/3);return[s,a,c]},mc=function(n){var e=n[0],t=n[1],i=n[2];return t<0&&(t=0),isNaN(i)&&(i=0),[e,t*Math.cos(i*Math.PI/180),t*Math.sin(i*Math.PI/180)]},gc=function(n){var e=Bt([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],n),t=e.map(function(i){return Math.pow(i,3)});return Bt([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],t)},vc=function(n){var e=(n[0]+16)/116,t=n[1]/500+e,i=e-n[2]/200,r=24389/27,o=24/116,s=[(t>o?Math.pow(t,3):(116*t-16)/r)*.3457/.3585,n[0]>8?Math.pow(e,3):n[0]/r,(i>o?Math.pow(i,3):(116*i-16)/r)*(1-.3457-.3585)/.3585];return dh([s[0],s[1],s[2]])},pO=function(n,e){var t=e.filter(vt);if(t.length===3){var i=t.map(pc),r=i[0],o=i[1],s=i[2],a=fh([r/255,o/255,s/255]),c=ph([a[0],a[1],a[2]]),u=c[0],l=c[1],d=c[2];return[u,l,d,1]}if(t.length===4){var h=t.map(pc),r=h[0],o=h[1],s=h[2],p=h[3],a=fh([r/255,o/255,s/255]),m=ph([a[0],a[1],a[2]]),u=m[0],l=m[1],d=m[2];return[u,l,d,p]}return[0,0,0,1]},fO=function(n,e){var t=Yy(n,e),i=t[0],r=t[1],o=t[2],s=t[3],a=fh(eb([i,r,o])),c=ph([a[0],a[1],a[2]]),u=c[0],l=c[1],d=c[2];return[u,l,d,s]},mO=function(n,e){var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=vc([i,r,o]),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},gO=function(n,e){var t=Jy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=vc(mc([i,r,o])),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},vO=function(n,e){var t=Zy(e),i=t[0],r=t[1],o=t[2],s=t[3],a=gc(mc([i,r,o])),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},yO=function(n,e){var t=fc(e),i=t[0],r=t[1],o=t[2],s=t[3],a=gc([i,r,o]),c=a[0],u=a[1],l=a[2];return[c,u,l,s]},bO=function(n){return dh([n[0],n[1],n[2]])},tb=function(n){return n},_O=function(n){var e=Qy([n[0],n[2],n[3]]),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},nb=function(n){return is([n[0],n[1],n[2],n[3]])},kO=function(n){var e=bO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},_i=function(n){return Bt([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],n)},ph=function(n){return Bt([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],n)},Ji=function(n){return n.map(function(e){var t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*Math.pow(i,1/2.4)-.055):12.92*e})},fh=function(n){return n.map(function(e){var t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*Math.pow((i+.055)/1.055,2.4)})},SO=function(n){var e=Ji(_i([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},wO=function(n){var e=_i([n[0],n[1],n[2]]),t=e[0],i=e[1],r=e[2];return[Ke(Math.round(t*255),0,255),Ke(Math.round(i*255),0,255),Ke(Math.round(r*255),0,255),n[3]]},CO=function(n){return Bt([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],n)},TO=function(n){return Bt([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],n)},xO=function(n){return n.map(function(e){var t=e<0?-1:1,i=e*t;return i<=.04045?e/12.92:t*Math.pow((e+.055)/1.055,2.4)||0})},EO=function(n){return Ji(n)},IO=function(n){var e=xO([n[0],n[1],n[2]]);return CO([e[0],e[1],e[2]])},RO=function(n){var e=EO(TO([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},PO=function(n){var e=IO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},OO=function(n){return Bt([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],n)},AO=function(n){return Bt([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],n)},MO=function(n){var e=n.map(function(t){var i=t<0?-1:1,r=Math.abs(t);return i*Math.pow(r,2.19921875)});return[e[0],e[1],e[2]]},NO=function(n){var e=n.map(function(t){var i=t<0?-1:1,r=Math.abs(t);return i*Math.pow(r,.4547069271758437)});return[e[0],e[1],e[2]]},DO=function(n){var e=NO(OO([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},LO=function(n){var e=_i(AO(MO([n[0],n[1],n[2]])));return lh([e[0],e[1],e[2],n[3]])},UO=function(n){return Bt([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],n)},FO=function(n){return Bt([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],n)},BO=function(n){return n.map(function(e){return e<16/512?e/16:Math.pow(e,1.8)})},jO=function(n){return n.map(function(e){return e>1/512?Math.pow(e,1/1.8):e*16})},VO=function(n){var e=BO([n[0],n[1],n[2]]);return dh(UO([e[0],e[1],e[2]]))},zO=function(n){var e=jO(FO(Qy([n[0],n[1],n[2]]))),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},qO=function(n){var e=VO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},yc=1.09929682680944,ib=.018053968510807,WO=function(n){return n.map(function(e){return e<ib*4.5?e/4.5:Math.pow((e+yc-1)/yc,1/.45)})},GO=function(n){return n.map(function(e){return e>=ib?yc*Math.pow(e,.45)-(yc-1):4.5*e})},$O=function(n){return Bt([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],n)},HO=function(n){return Bt([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],n)},KO=function(n){var e=WO([n[0],n[1],n[2]]);return $O([e[0],e[1],e[2]])},YO=function(n){var e=GO(HO([n[0],n[1],n[2]])),t=e[0],i=e[1],r=e[2];return[t,i,r,n[3]]},XO=function(n){var e=KO([n[0],n[1],n[2]]);return is([e[0],e[1],e[2],n[3]])},ki={name:"color",parse:function(n,e){if(e.type===18){var t=eA[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported color function "'.concat(e.name,'"'));return t(n,e.values)}if(e.type===5){var i=rb(e),r=i[0],o=i[1],s=i[2],a=i[3];return In(r,o,s,a)}if(e.type===20){var c=Rn[e.value.toUpperCase()];if(typeof c<"u")return c}return Rn.TRANSPARENT}},rb=function(n){if(n.value.length===3){var e=n.value.substring(0,1),t=n.value.substring(1,2),i=n.value.substring(2,3);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(i+i,16),1]}if(n.value.length===4){var e=n.value.substring(0,1),t=n.value.substring(1,2),i=n.value.substring(2,3),r=n.value.substring(3,4);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(i+i,16),parseInt(r+r,16)/255]}if(n.value.length===6){var e=n.value.substring(0,2),t=n.value.substring(2,4),i=n.value.substring(4,6);return[parseInt(e,16),parseInt(t,16),parseInt(i,16),1]}if(n.value.length===8){var e=n.value.substring(0,2),t=n.value.substring(2,4),i=n.value.substring(4,6),r=n.value.substring(6,8);return[parseInt(e,16),parseInt(t,16),parseInt(i,16),parseInt(r,16)/255]}return[0,0,0,1]},ob=function(n,e){var t=e.filter(vt);if(Xi(t))throw new Error("Relative color not supported for rgb()");if(t.length===3){var i=t.map(pc),r=i[0],o=i[1],s=i[2];return In(r,o,s,1)}if(t.length===4){var a=t.map(pc),r=a[0],o=a[1],s=a[2],c=a[3];return In(r,o,s,c)}return 0},JO=function(n,e){var t=e.filter(vt),i=t[0].type===20?t[0].value:"unknown",r=!Xi(t);if(r){var o=i,s=sb[o];if(typeof s>"u")throw new Error('Attempting to parse an unsupported color space "'.concat(o,'" for color() function'));var a=st(t[1])?t[1].number:0,c=st(t[2])?t[2].number:0,u=st(t[3])?t[3].number:0,l=t.length>4&&t[4].type===6&&t[4].value==="/"&&st(t[5])?t[5].number:1;return s([a,c,u,l])}else{var d=function(W,A){if(st(A))return A.number;var H=function(Ie){return Ie==="r"||Ie==="x"?0:Ie==="g"||Ie==="y"?1:2};if(ue(A)){var Y=H(A.value);return W[Y]}var J=function(Ie){for(var dt=Ie.filter(vt),Ne="(",Pe=0,ie=dt;Pe<ie.length;Pe++){var Ze=ie[Pe];Ne+=Ze.type===18&&Ze.name==="calc"?J(Ze.values):st(Ze)?Ze.number:Ze.type===6||ue(Ze)?Ze.value:""}return Ne+=")",Ne};if(A.type===18){var ve=A.values.filter(vt);if(A.name==="calc"){var Me=J(ve).replace(/r|x/,W[0].toString()).replace(/g|y/,W[1].toString()).replace(/b|z/,W[2].toString());return new Function("return "+Me)()}}return null},h=t[1].type===18?t[1].name:ue(t[1])||t[1].type===5?"rgb":"unknown",p=ue(t[2])?t[2].value:"unknown",m=t[1].type===18?t[1].values:ue(t[1])?[t[1]]:[];if(ue(t[1])){var f=Rn[t[1].value.toUpperCase()];if(typeof f>"u")throw new Error("Attempting to use unknown color in relative color 'from'");var g=qr(n,t[1].value),y=255&g,b=255&g>>8,S=255&g>>16,w=255&g>>24;m=[{type:17,number:w,flags:1},{type:17,number:S,flags:1},{type:17,number:b,flags:1},{type:17,number:y>1?y/255:y,flags:1}]}else if(t[1].type===5){var k=rb(t[1]),w=k[0],S=k[1],b=k[2],y=k[3];m=[{type:17,number:w,flags:1},{type:17,number:S,flags:1},{type:17,number:b,flags:1},{type:17,number:y>1?y/255:y,flags:1}]}if(m.length===0)throw new Error("Attempting to use unknown color in relative color 'from'");if(p==="unknown")throw new Error("Attempting to use unknown colorspace in relative color 'to'");var C=ZO[h],x=QO[p],I=sb[p];if(typeof C>"u")throw new Error('Attempting to parse an unsupported color space "'.concat(h,'" for color() function'));if(typeof x>"u")throw new Error('Attempting to parse an unsupported color space "'.concat(p,'" for color() function'));var P=C(n,m),D=x(P),a=d(D,t[3]),c=d(D,t[4]),u=d(D,t[5]),l=t.length>6&&t[6].type===6&&t[6].value==="/"&&st(t[7])?t[7].number:1;if(a===null||c===null||u===null)throw new Error("Invalid relative color in color() function");return I([a,c,u,l])}},sb={srgb:cO,"srgb-linear":lh,"display-p3":PO,"a98-rgb":LO,"prophoto-rgb":qO,xyz:nb,"xyz-d50":kO,"xyz-d65":nb,rec2020:XO},ZO={rgb:pO,hsl:fO,lab:mO,lch:gO,oklab:yO,oklch:vO},QO={srgb:SO,"srgb-linear":wO,"display-p3":RO,"a98-rgb":DO,"prophoto-rgb":zO,xyz:tb,"xyz-d50":_O,"xyz-d65":tb,rec2020:YO},eA={hsl:Xy,hsla:Xy,rgb:ob,rgba:ob,lch:hO,oklch:dO,oklab:lO,lab:uO,color:JO},qr=function(n,e){return ki.parse(n,jy.create(e).parseComponentValue())},Rn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},tA={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(n,e){return e.map(function(t){if(ue(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},nA={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},bc=function(n,e){var t=ki.parse(n,e[0]),i=e[1];return i&&Be(i)?{color:t,stop:i}:{color:t,stop:null}},ab=function(n,e){var t=n[0],i=n[n.length-1];t.stop===null&&(t.stop=yt),i.stop===null&&(i.stop=yi);for(var r=[],o=0,s=0;s<n.length;s++){var a=n[s].stop;if(a!==null){var c=Ee(a,e);c>o?r.push(c):r.push(o),o=c}else r.push(null)}for(var u=null,s=0;s<r.length;s++){var l=r[s];if(l===null)u===null&&(u=s);else if(u!==null){for(var d=s-u,h=r[u-1],p=(l-h)/(d+1),m=1;m<=d;m++)r[u+m-1]=p*m;u=null}}return n.map(function(f,g){var y=f.color;return{color:y,stop:Math.max(Math.min(1,r[g]/e),0)}})},iA=function(n,e,t){var i=e/2,r=t/2,o=Ee(n[0],e)-i,s=r-Ee(n[1],t);return(Math.atan2(s,o)+Math.PI*2)%(Math.PI*2)},rA=function(n,e,t){var i=typeof n=="number"?n:iA(n,e,t),r=Math.abs(e*Math.sin(i))+Math.abs(t*Math.cos(i)),o=e/2,s=t/2,a=r/2,c=Math.sin(i-Math.PI/2)*a,u=Math.cos(i-Math.PI/2)*a;return[r,o-u,o+u,s-c,s+c]},cn=function(n,e){return Math.sqrt(n*n+e*e)},cb=function(n,e,t,i,r){var o=[[0,0],[0,e],[n,0],[n,e]];return o.reduce(function(s,a){var c=a[0],u=a[1],l=cn(t-c,i-u);return(r?l<s.optimumDistance:l>s.optimumDistance)?{optimumCorner:a,optimumDistance:l}:s},{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},oA=function(n,e,t,i,r){var o=0,s=0;switch(n.size){case 0:n.shape===0?o=s=Math.min(Math.abs(e),Math.abs(e-i),Math.abs(t),Math.abs(t-r)):n.shape===1&&(o=Math.min(Math.abs(e),Math.abs(e-i)),s=Math.min(Math.abs(t),Math.abs(t-r)));break;case 2:if(n.shape===0)o=s=Math.min(cn(e,t),cn(e,t-r),cn(e-i,t),cn(e-i,t-r));else if(n.shape===1){var a=Math.min(Math.abs(t),Math.abs(t-r))/Math.min(Math.abs(e),Math.abs(e-i)),c=cb(i,r,e,t,!0),u=c[0],l=c[1];o=cn(u-e,(l-t)/a),s=a*o}break;case 1:n.shape===0?o=s=Math.max(Math.abs(e),Math.abs(e-i),Math.abs(t),Math.abs(t-r)):n.shape===1&&(o=Math.max(Math.abs(e),Math.abs(e-i)),s=Math.max(Math.abs(t),Math.abs(t-r)));break;case 3:if(n.shape===0)o=s=Math.max(cn(e,t),cn(e,t-r),cn(e-i,t),cn(e-i,t-r));else if(n.shape===1){var a=Math.max(Math.abs(t),Math.abs(t-r))/Math.max(Math.abs(e),Math.abs(e-i)),d=cb(i,r,e,t,!1),u=d[0],l=d[1];o=cn(u-e,(l-t)/a),s=a*o}break}return Array.isArray(n.size)&&(o=Ee(n.size[0],i),s=n.size.length===2?Ee(n.size[1],r):o),[o,s]},sA=function(n,e){var t=Xt(180),i=[];return En(e).forEach(function(r,o){if(o===0){var s=r[0];if(s.type===20&&s.value==="to"){t=Ky(r);return}else if(Hy(s)){t=hc.parse(n,s);return}}var a=bc(n,r);i.push(a)}),{angle:t,stops:i,type:1}},_c=function(n,e){var t=Xt(180),i=[];return En(e).forEach(function(r,o){if(o===0){var s=r[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){t=Ky(r);return}else if(Hy(s)){t=(hc.parse(n,s)+Xt(270))%Xt(360);return}}var a=bc(n,r);i.push(a)}),{angle:t,stops:i,type:1}},aA=function(n,e){var t=Xt(180),i=[],r=1,o=0,s=3,a=[];return En(e).forEach(function(c,u){var l=c[0];if(u===0){if(ue(l)&&l.value==="linear"){r=1;return}else if(ue(l)&&l.value==="radial"){r=2;return}}if(l.type===18){if(l.name==="from"){var d=ki.parse(n,l.values[0]);i.push({stop:yt,color:d})}else if(l.name==="to"){var d=ki.parse(n,l.values[0]);i.push({stop:yi,color:d})}else if(l.name==="color-stop"){var h=l.values.filter(vt);if(h.length===2){var d=ki.parse(n,h[1]),p=h[0];st(p)&&i.push({stop:{type:16,number:p.number*100,flags:p.flags},color:d})}}}}),r===1?{angle:(t+Xt(180))%Xt(360),stops:i,type:r}:{size:s,shape:o,stops:i,position:a,type:r}},ub="closest-side",lb="farthest-side",db="closest-corner",hb="farthest-corner",pb="circle",fb="ellipse",mb="cover",gb="contain",cA=function(n,e){var t=0,i=3,r=[],o=[];return En(e).forEach(function(s,a){var c=!0;if(a===0){var u=!1;c=s.reduce(function(d,h){if(u)if(ue(h))switch(h.value){case"center":return o.push(uh),d;case"top":case"left":return o.push(yt),d;case"right":case"bottom":return o.push(yi),d}else(Be(h)||vi(h))&&o.push(h);else if(ue(h))switch(h.value){case pb:return t=0,!1;case fb:return t=1,!1;case"at":return u=!0,!1;case ub:return i=0,!1;case mb:case lb:return i=1,!1;case gb:case db:return i=2,!1;case hb:return i=3,!1}else if(vi(h)||Be(h))return Array.isArray(i)||(i=[]),i.push(h),!1;return d},c)}if(c){var l=bc(n,s);r.push(l)}}),{size:i,shape:t,stops:r,position:o,type:2}},kc=function(n,e){var t=0,i=3,r=[],o=[];return En(e).forEach(function(s,a){var c=!0;if(a===0?c=s.reduce(function(l,d){if(ue(d))switch(d.value){case"center":return o.push(uh),!1;case"top":case"left":return o.push(yt),!1;case"right":case"bottom":return o.push(yi),!1}else if(Be(d)||vi(d))return o.push(d),!1;return l},c):a===1&&(c=s.reduce(function(l,d){if(ue(d))switch(d.value){case pb:return t=0,!1;case fb:return t=1,!1;case gb:case ub:return i=0,!1;case lb:return i=1,!1;case db:return i=2,!1;case mb:case hb:return i=3,!1}else if(vi(d)||Be(d))return Array.isArray(i)||(i=[]),i.push(d),!1;return l},c)),c){var u=bc(n,s);r.push(u)}}),{size:i,shape:t,stops:r,position:o,type:2}},uA=function(n){return n.type===1},lA=function(n){return n.type===2},mh={name:"image",parse:function(n,e){if(e.type===22){var t={url:e.value,type:0};return n.cache.addImage(e.value),t}if(e.type===18){var i=vb[e.name];if(typeof i>"u")throw new Error('Attempting to parse an unsupported image function "'.concat(e.name,'"'));return i(n,e.values)}throw new Error("Unsupported image type ".concat(e.type))}};function dA(n){return!(n.type===20&&n.value==="none")&&(n.type!==18||!!vb[n.name])}var vb={"linear-gradient":sA,"-moz-linear-gradient":_c,"-ms-linear-gradient":_c,"-o-linear-gradient":_c,"-webkit-linear-gradient":_c,"radial-gradient":cA,"-moz-radial-gradient":kc,"-ms-radial-gradient":kc,"-o-radial-gradient":kc,"-webkit-radial-gradient":kc,"-webkit-gradient":aA},hA={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(n,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e.filter(function(i){return vt(i)&&dA(i)}).map(function(i){return mh.parse(n,i)})}},pA={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(n,e){return e.map(function(t){if(ue(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},fA={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(n,e){return En(e).map(function(t){return t.filter(Be)}).map(zy)}},mA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(n,e){return En(e).map(function(t){return t.filter(ue).map(function(i){return i.value}).join(" ")}).map(gA)}},gA=function(n){switch(n){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Wr;(function(n){n.AUTO="auto",n.CONTAIN="contain",n.COVER="cover"})(Wr||(Wr={}));var vA={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(n,e){return En(e).map(function(t){return t.filter(yA)})}},yA=function(n){return ue(n)||Be(n)},Sc=function(n){return{name:"border-".concat(n,"-color"),initialValue:"transparent",prefix:!1,type:3,format:"color"}},bA=Sc("top"),_A=Sc("right"),kA=Sc("bottom"),SA=Sc("left"),wc=function(n){return{name:"border-radius-".concat(n),initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return zy(t.filter(Be))}}},wA=wc("top-left"),CA=wc("top-right"),TA=wc("bottom-right"),xA=wc("bottom-left"),Cc=function(n){return{name:"border-".concat(n,"-style"),initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},EA=Cc("top"),IA=Cc("right"),RA=Cc("bottom"),PA=Cc("left"),Tc=function(n){return{name:"border-".concat(n,"-width"),initialValue:"0",type:0,prefix:!1,parse:function(e,t){return gi(t)?t.number:0}}},OA=Tc("top"),AA=Tc("right"),MA=Tc("bottom"),NA=Tc("left"),DA={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},LA={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(n,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},UA={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).reduce(function(t,i){return t|FA(i.value)},0)}},FA=function(n){switch(n){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},BA={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},jA={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(n,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},xc;(function(n){n.NORMAL="normal",n.STRICT="strict"})(xc||(xc={}));var VA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"strict":return xc.STRICT;case"normal":default:return xc.NORMAL}}},zA={name:"line-height",initialValue:"normal",prefix:!1,type:4},yb=function(n,e){return ue(n)&&n.value==="normal"?1.2*e:n.type===17?e*n.number:Be(n)?Ee(n,e):e},qA={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(n,e){return e.type===20&&e.value==="none"?null:mh.parse(n,e)}},WA={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(n,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},gh={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 52;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Ec=function(n){return{name:"margin-".concat(n),initialValue:"0",prefix:!1,type:4}},GA=Ec("top"),$A=Ec("right"),HA=Ec("bottom"),KA=Ec("left"),YA={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},XA={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ic=function(n){return{name:"padding-".concat(n),initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},JA=Ic("top"),ZA=Ic("right"),QA=Ic("bottom"),eM=Ic("left"),tM={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(n,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},nM={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(n,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},iM={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,e){return e.length===1&&ch(e[0],"none")?[]:En(e).map(function(t){for(var i={color:Rn.TRANSPARENT,offsetX:yt,offsetY:yt,blur:yt},r=0,o=0;o<t.length;o++){var s=t[o];vi(s)?(r===0?i.offsetX=s:r===1?i.offsetY=s:i.blur=s,r++):i.color=ki.parse(n,s)}return i})}},rM={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},oM={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(n,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var t=cM[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'.concat(e.name,'"'));return t(e.values)}return null}},sM=function(n){var e=n.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},aM=function(n){var e=n.filter(function(c){return c.type===17}).map(function(c){return c.number}),t=e[0],i=e[1];e[2],e[3];var r=e[4],o=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var s=e[12],a=e[13];return e[14],e[15],e.length===16?[t,i,r,o,s,a]:null},cM={matrix:sM,matrix3d:aM},bb={type:16,number:50,flags:Jo},uM=[bb,bb],lM={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(n,e){var t=e.filter(Be);return t.length!==2?uM:[t[0],t[1]]}},dM={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(n,e){switch(e){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},rs;(function(n){n.NORMAL="normal",n.BREAK_ALL="break-all",n.KEEP_ALL="keep-all"})(rs||(rs={}));var hM={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"break-all":return rs.BREAK_ALL;case"keep-all":return rs.KEEP_ALL;case"normal":default:return rs.NORMAL}}},pM={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(n,e){if(e.type===20)return{auto:!0,order:0};if(st(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},_b={name:"time",parse:function(n,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},fM={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(n,e){return st(e)?e.number:1}},mM={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gM={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},vM={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(n,e){var t=[],i=[];return e.forEach(function(r){switch(r.type){case 20:case 0:t.push(r.value);break;case 17:t.push(r.number.toString());break;case 4:i.push(t.join(" ")),t.length=0;break}}),t.length&&i.push(t.join(" ")),i.map(function(r){return r.indexOf(" ")===-1?r:"'".concat(r,"'")})}},yM={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},bM={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(n,e){if(st(e))return e.number;if(ue(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},_M={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(n,e){return e.filter(ue).map(function(t){return t.value})}},kM={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(n,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},ut=function(n,e){return(n&e)!==0},SM={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(n,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e}},wM={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(n,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;for(var i=[],r=e.filter(Vy),o=0;o<r.length;o++){var s=r[o],a=r[o+1];if(s.type===20){var c=a&&st(a)?a.number:1;i.push({counter:s.value,increment:c})}}return i}},CM={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(n,e){if(e.length===0)return[];for(var t=[],i=e.filter(Vy),r=0;r<i.length;r++){var o=i[r],s=i[r+1];if(ue(o)&&o.value!=="none"){var a=s&&st(s)?s.number:0;t.push({counter:o.value,reset:a})}}return t}},TM={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(n,e){return e.filter(gi).map(function(t){return _b.parse(n,t)})}},xM={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(n,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;var i=[],r=e.filter(sO);if(r.length%2!==0)return null;for(var o=0;o<r.length;o+=2){var s=r[o].value,a=r[o+1].value;i.push({open:s,close:a})}return i}},kb=function(n,e,t){if(!n)return"";var i=n[Math.min(e,n.length-1)];return i?t?i.open:i.close:""},EM={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,e){return e.length===1&&ch(e[0],"none")?[]:En(e).map(function(t){for(var i={color:255,offsetX:yt,offsetY:yt,blur:yt,spread:yt,inset:!1},r=0,o=0;o<t.length;o++){var s=t[o];ch(s,"inset")?i.inset=!0:vi(s)?(r===0?i.offsetX=s:r===1?i.offsetY=s:r===2?i.blur=s:i.spread=s,r++):i.color=ki.parse(n,s)}return i})}},IM={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(n,e){var t=[0,1,2],i=[];return e.filter(ue).forEach(function(r){switch(r.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2);break}}),t.forEach(function(r){i.indexOf(r)===-1&&i.push(r)}),i}},RM={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},PM={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(n,e){return gi(e)?e.number:0}},OM={name:"objectFit",initialValue:"fill",prefix:!1,type:1,parse:function(n,e){return e.filter(ue).reduce(function(t,i){return t|AM(i.value)},0)}},AM=function(n){switch(n){case"contain":return 2;case"cover":return 4;case"none":return 8;case"scale-down":return 16}return 0},MM=function(){function n(e,t){var i,r;this.animationDuration=$(e,TM,t.animationDuration),this.backgroundClip=$(e,tA,t.backgroundClip),this.backgroundColor=$(e,nA,t.backgroundColor),this.backgroundImage=$(e,hA,t.backgroundImage),this.backgroundOrigin=$(e,pA,t.backgroundOrigin),this.backgroundPosition=$(e,fA,t.backgroundPosition),this.backgroundRepeat=$(e,mA,t.backgroundRepeat),this.backgroundSize=$(e,vA,t.backgroundSize),this.borderTopColor=$(e,bA,t.borderTopColor),this.borderRightColor=$(e,_A,t.borderRightColor),this.borderBottomColor=$(e,kA,t.borderBottomColor),this.borderLeftColor=$(e,SA,t.borderLeftColor),this.borderTopLeftRadius=$(e,wA,t.borderTopLeftRadius),this.borderTopRightRadius=$(e,CA,t.borderTopRightRadius),this.borderBottomRightRadius=$(e,TA,t.borderBottomRightRadius),this.borderBottomLeftRadius=$(e,xA,t.borderBottomLeftRadius),this.borderTopStyle=$(e,EA,t.borderTopStyle),this.borderRightStyle=$(e,IA,t.borderRightStyle),this.borderBottomStyle=$(e,RA,t.borderBottomStyle),this.borderLeftStyle=$(e,PA,t.borderLeftStyle),this.borderTopWidth=$(e,OA,t.borderTopWidth),this.borderRightWidth=$(e,AA,t.borderRightWidth),this.borderBottomWidth=$(e,MA,t.borderBottomWidth),this.borderLeftWidth=$(e,NA,t.borderLeftWidth),this.boxShadow=$(e,EM,t.boxShadow),this.color=$(e,DA,t.color),this.direction=$(e,LA,t.direction),this.display=$(e,UA,t.display),this.float=$(e,BA,t.cssFloat),this.fontFamily=$(e,vM,t.fontFamily),this.fontSize=$(e,yM,t.fontSize),this.fontStyle=$(e,kM,t.fontStyle),this.fontVariant=$(e,_M,t.fontVariant),this.fontWeight=$(e,bM,t.fontWeight),this.letterSpacing=$(e,jA,t.letterSpacing),this.lineBreak=$(e,VA,t.lineBreak),this.lineHeight=$(e,zA,t.lineHeight),this.listStyleImage=$(e,qA,t.listStyleImage),this.listStylePosition=$(e,WA,t.listStylePosition),this.listStyleType=$(e,gh,t.listStyleType),this.marginTop=$(e,GA,t.marginTop),this.marginRight=$(e,$A,t.marginRight),this.marginBottom=$(e,HA,t.marginBottom),this.marginLeft=$(e,KA,t.marginLeft),this.opacity=$(e,fM,t.opacity);var o=$(e,YA,t.overflow);this.overflowX=o[0],this.overflowY=o[o.length>1?1:0],this.overflowWrap=$(e,XA,t.overflowWrap),this.paddingTop=$(e,JA,t.paddingTop),this.paddingRight=$(e,ZA,t.paddingRight),this.paddingBottom=$(e,QA,t.paddingBottom),this.paddingLeft=$(e,eM,t.paddingLeft),this.paintOrder=$(e,IM,t.paintOrder),this.position=$(e,nM,t.position),this.textAlign=$(e,tM,t.textAlign),this.textDecorationColor=$(e,mM,(i=t.textDecorationColor)!==null&&i!==void 0?i:t.color),this.textDecorationLine=$(e,gM,(r=t.textDecorationLine)!==null&&r!==void 0?r:t.textDecoration),this.textShadow=$(e,iM,t.textShadow),this.textTransform=$(e,rM,t.textTransform),this.transform=$(e,oM,t.transform),this.transformOrigin=$(e,lM,t.transformOrigin),this.visibility=$(e,dM,t.visibility),this.webkitTextStrokeColor=$(e,RM,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=$(e,PM,t.webkitTextStrokeWidth),this.wordBreak=$(e,hM,t.wordBreak),this.zIndex=$(e,pM,t.zIndex),this.objectFit=$(e,OM,t.objectFit)}return n.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},n.prototype.isTransparent=function(){return bi(this.backgroundColor)},n.prototype.isTransformed=function(){return this.transform!==null},n.prototype.isPositioned=function(){return this.position!==0},n.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},n.prototype.isFloating=function(){return this.float!==0},n.prototype.isInlineLevel=function(){return ut(this.display,4)||ut(this.display,33554432)||ut(this.display,268435456)||ut(this.display,536870912)||ut(this.display,67108864)||ut(this.display,134217728)},n}(),NM=function(){function n(e,t){this.content=$(e,SM,t.content),this.quotes=$(e,xM,t.quotes)}return n}(),Sb=function(){function n(e,t){this.counterIncrement=$(e,wM,t.counterIncrement),this.counterReset=$(e,CM,t.counterReset)}return n}(),$=function(n,e,t){var i=new By,r=t!==null&&typeof t<"u"?t.toString():e.initialValue;i.write(r);var o=new jy(i.read());switch(e.type){case 2:var s=o.parseComponentValue();return e.parse(n,ue(s)?s.value:e.initialValue);case 0:return e.parse(n,o.parseComponentValue());case 1:return e.parse(n,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(e.format){case"angle":return hc.parse(n,o.parseComponentValue());case"color":return ki.parse(n,o.parseComponentValue());case"image":return mh.parse(n,o.parseComponentValue());case"length":var a=o.parseComponentValue();return vi(a)?a:yt;case"length-percentage":var c=o.parseComponentValue();return Be(c)?c:yt;case"time":return _b.parse(n,o.parseComponentValue())}break}},DM="data-html2canvas-debug",LM=function(n){var e=n.getAttribute(DM);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},vh=function(n,e){var t=LM(n);return t===1||e===t},Pn=function(){function n(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,vh(t,3),this.styles=new MM(e,window.getComputedStyle(t,null)),Ih(t)&&(this.styles.animationDuration.some(function(i){return i>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=Za(this.context,t),vh(t,4)&&(this.flags|=16)}return n}();typeof SuppressedError=="function"&&SuppressedError;for(var wb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",UM=typeof Uint8Array>"u"?[]:new Uint8Array(256),Rc=0;Rc<wb.length;Rc++)UM[wb.charCodeAt(Rc)]=Rc;for(var Cb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FM=typeof Uint8Array>"u"?[]:new Uint8Array(256),Pc=0;Pc<Cb.length;Pc++)FM[Cb.charCodeAt(Pc)]=Pc;var BM=1,yh=2,bh=3,Tb=4,xb=5,jM=7,Eb=8,_h=9,kh=10,Ib=11,Rb=12,Pb=13,Ob=14,Sh=15,VM=function(n){for(var e=[],t=0,i=n.length;t<i;){var r=n.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){var o=n.charCodeAt(t++);(o&64512)===56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},zM=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var t=n.length;if(!t)return"";for(var i=[],r=-1,o="";++r<t;){var s=n[r];s<=65535?i.push(s):(s-=65536,i.push((s>>10)+55296,s%1024+56320)),(r+1===t||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},Jt="\xD7",wh="\xF7",qM=function(n){throw new Error("UnicodeTrie not initialized")},WM=function(n,e,t){var i=t-2,r=e[i],o=e[t-1],s=e[t];if(o===yh&&s===bh)return Jt;if(o===yh||o===bh||o===Tb||s===yh||s===bh||s===Tb)return wh;if(o===Eb&&[Eb,_h,Ib,Rb].indexOf(s)!==-1||(o===Ib||o===_h)&&(s===_h||s===kh)||(o===Rb||o===kh)&&s===kh||s===Pb||s===xb||s===jM||o===BM)return Jt;if(o===Pb&&s===Ob){for(;r===xb;)r=e[--i];if(r===Ob)return Jt}if(o===Sh&&s===Sh){for(var a=0;r===Sh;)a++,r=e[--i];if(a%2===0)return Jt}return wh},GM=function(n){var e=VM(n),t=e.length,i=0,r=0,o=e.map(qM);return{next:function(){if(i>=t)return{done:!0,value:null};for(var s=Jt;i<t&&(s=WM(e,o,++i))===Jt;);if(s!==Jt||i===t){var a=zM.apply(null,e.slice(r,i));return r=i,{value:a,done:!1}}return{done:!0,value:null}}}},$M=function(n){for(var e=GM(n),t=[],i;!(i=e.next()).done;)i.value&&t.push(i.value.slice());return t},HM=function(n){var e=123;if(n.createRange){var t=n.createRange();if(t.getBoundingClientRect){var i=n.createElement("boundtest");i.style.height="".concat(e,"px"),i.style.display="block",n.body.appendChild(i),t.selectNode(i);var r=t.getBoundingClientRect(),o=Math.round(r.height);if(n.body.removeChild(i),o===e)return!0}}return!1},KM=function(n){var e=n.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",n.body.appendChild(e);var t=n.createRange();e.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var i=e.firstChild,r=Qa(i.data).map(function(c){return nt(c)}),o=0,s={},a=r.every(function(c,u){t.setStart(i,o),t.setEnd(i,o+c.length);var l=t.getBoundingClientRect();o+=c.length;var d=l.x>s.x||l.y>s.y;return s=l,u===0?!0:d});return n.body.removeChild(e),a},YM=function(){return typeof new Image().crossOrigin<"u"},XM=function(){return typeof new XMLHttpRequest().responseType=="string"},JM=function(n){var e=new Image,t=n.createElement("canvas"),i=t.getContext("2d");if(!i)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},Ab=function(n){return n[0]===0&&n[1]===255&&n[2]===0&&n[3]===255},ZM=function(n){var e=n.createElement("canvas"),t=100;e.width=t,e.height=t;var i=e.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,t,t);var r=new Image,o=e.toDataURL();r.src=o;var s=Ch(t,t,0,0,r);return i.fillStyle="red",i.fillRect(0,0,t,t),Mb(s).then(function(a){i.drawImage(a,0,0);var c=i.getImageData(0,0,t,t).data;i.fillStyle="red",i.fillRect(0,0,t,t);var u=n.createElement("div");return u.style.backgroundImage="url(".concat(o,")"),u.style.height="".concat(t,"px"),Ab(c)?Mb(Ch(t,t,0,0,u)):Promise.reject(!1)}).then(function(a){return i.drawImage(a,0,0),Ab(i.getImageData(0,0,t,t).data)}).catch(function(){return!1})},Ch=function(n,e,t,i,r){var o="http://www.w3.org/2000/svg",s=document.createElementNS(o,"svg"),a=document.createElementNS(o,"foreignObject");return s.setAttributeNS(null,"width",n.toString()),s.setAttributeNS(null,"height",e.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",t.toString()),a.setAttributeNS(null,"y",i.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(a),a.appendChild(r),s},Mb=function(n){return new Promise(function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,i.src="data:image/svg+xml;charset=utf-8,".concat(encodeURIComponent(new XMLSerializer().serializeToString(n)))})},bt={get SUPPORT_RANGE_BOUNDS(){var n=HM(document);return Object.defineProperty(bt,"SUPPORT_RANGE_BOUNDS",{value:n}),n},get SUPPORT_WORD_BREAKING(){var n=bt.SUPPORT_RANGE_BOUNDS&&KM(document);return Object.defineProperty(bt,"SUPPORT_WORD_BREAKING",{value:n}),n},get SUPPORT_SVG_DRAWING(){var n=JM(document);return Object.defineProperty(bt,"SUPPORT_SVG_DRAWING",{value:n}),n},get SUPPORT_FOREIGNOBJECT_DRAWING(){var n=typeof Array.from=="function"&&typeof window.fetch=="function"?ZM(document):Promise.resolve(!1);return Object.defineProperty(bt,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:n}),n},get SUPPORT_CORS_IMAGES(){var n=YM();return Object.defineProperty(bt,"SUPPORT_CORS_IMAGES",{value:n}),n},get SUPPORT_RESPONSE_TYPE(){var n=XM();return Object.defineProperty(bt,"SUPPORT_RESPONSE_TYPE",{value:n}),n},get SUPPORT_CORS_XHR(){var n="withCredentials"in new XMLHttpRequest;return Object.defineProperty(bt,"SUPPORT_CORS_XHR",{value:n}),n},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var n=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(bt,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:n}),n}},os=function(){function n(e,t){this.text=e,this.bounds=t}return n}(),QM=function(n,e,t,i){var r=nN(e,t),o=[],s=0;return r.forEach(function(a){if(t.textDecorationLine.length||a.trim().length>0)if(bt.SUPPORT_RANGE_BOUNDS){var c=Nb(i,s,a.length).getClientRects();if(c.length>1){var u=Th(a),l=0;u.forEach(function(h){o.push(new os(h,Gn.fromDOMRectList(n,Nb(i,l+s,h.length).getClientRects()))),l+=h.length})}else o.push(new os(a,Gn.fromDOMRectList(n,c)))}else{var d=i.splitText(a.length);o.push(new os(a,eN(n,i))),i=d}else bt.SUPPORT_RANGE_BOUNDS||(i=i.splitText(a.length));s+=a.length}),o},eN=function(n,e){var t=e.ownerDocument;if(t){var i=t.createElement("html2canvaswrapper");i.appendChild(e.cloneNode(!0));var r=e.parentNode;if(r){r.replaceChild(i,e);var o=Za(n,i);return i.firstChild&&r.replaceChild(i.firstChild,i),o}}return Gn.EMPTY},Nb=function(n,e,t){var i=n.ownerDocument;if(!i)throw new Error("Node has no owner document");var r=i.createRange();return r.setStart(n,e),r.setEnd(n,e+t),r},Th=function(n){if(bt.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(n)).map(function(t){return t.segment})}return $M(n)},tN=function(n,e){if(bt.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(n)).map(function(i){return i.segment})}return rN(n,e)},nN=function(n,e){return e.letterSpacing!==0?Th(n):tN(n,e)},iN=[32,160,4961,65792,65793,4153,4241],rN=function(n,e){for(var t=e2(n,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),i=[],r,o=function(){if(r.value){var s=r.value.slice(),a=Qa(s),c="";a.forEach(function(u){iN.indexOf(u)===-1?c+=nt(u):(c.length&&i.push(c),i.push(nt(u)),c="")}),c.length&&i.push(c)}};!(r=t.next()).done;)o();return i},oN=function(){function n(e,t,i){this.text=sN(t.data,i.textTransform),this.textBounds=QM(e,this.text,i,t)}return n}(),sN=function(n,e){switch(e){case 1:return n.toLowerCase();case 3:return n.replace(aN,cN);case 2:return n.toUpperCase();default:return n}},aN=/(^|\s|:|-|\(|\))([a-z])/g,cN=function(n,e,t){return n.length>0?e+t.toUpperCase():n},Db=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.src=i.currentSrc||i.src,r.intrinsicWidth=i.naturalWidth,r.intrinsicHeight=i.naturalHeight,r.context.cache.addImage(r.src),r}return e}(Pn),Lb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.canvas=i,r.intrinsicWidth=i.width,r.intrinsicHeight=i.height,r}return e}(Pn),Ub=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this,o=new XMLSerializer,s=Za(t,i);return i.setAttribute("width","".concat(s.width,"px")),i.setAttribute("height","".concat(s.height,"px")),r.svg="data:image/svg+xml,".concat(encodeURIComponent(o.serializeToString(i))),r.intrinsicWidth=i.width.baseVal.value,r.intrinsicHeight=i.height.baseVal.value,r.context.cache.addImage(r.svg),r}return e}(Pn),Fb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.value=i.value,r}return e}(Pn),xh=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.start=i.start,r.reversed=typeof i.reversed=="boolean"&&i.reversed===!0,r}return e}(Pn),uN=[{type:15,flags:0,unit:"px",number:3}],lN=[{type:16,flags:0,number:50}],dN=function(n){return n.width>n.height?new Gn(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new Gn(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n},hN=function(n){var e=n.type===pN?new Array(n.value.length+1).join("\u2022"):n.value;return e.length===0?n.placeholder||"":e},Oc="checkbox",Ac="radio",pN="password",Bb=707406591,Eh=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;switch(r.type=i.type.toLowerCase(),r.checked=i.checked,r.value=hN(i),(r.type===Oc||r.type===Ac)&&(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=dN(r.bounds)),r.type){case Oc:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=uN;break;case Ac:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=lN;break}return r}return e}(Pn),jb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this,o=i.options[i.selectedIndex||0];return r.value=o&&o.text||"",r}return e}(Pn),Vb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;return r.value=i.value,r}return e}(Pn),zb=function(n){an(e,n);function e(t,i){var r=n.call(this,t,i)||this;r.src=i.src,r.width=parseInt(i.width,10)||0,r.height=parseInt(i.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){r.tree=Wb(t,i.contentWindow.document.documentElement);var o=i.contentWindow.document.documentElement?qr(t,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):Rn.TRANSPARENT,s=i.contentWindow.document.body?qr(t,getComputedStyle(i.contentWindow.document.body).backgroundColor):Rn.TRANSPARENT;r.backgroundColor=bi(o)?bi(s)?r.styles.backgroundColor:s:o}}catch{}return r}return e}(Pn),fN=["OL","UL","MENU"],Mc=function(n,e,t,i){for(var r=e.firstChild,o=void 0;r;r=o)if(o=r.nextSibling,Gb(r)&&r.data.length>0)t.textNodes.push(new oN(n,r,t.styles));else if(Gr(r))if(Jb(r)&&r.assignedNodes)r.assignedNodes().forEach(function(a){return Mc(n,a,t,i)});else{var s=qb(n,r);s.styles.isVisible()&&(mN(r,s,i)?s.flags|=4:gN(s.styles)&&(s.flags|=2),fN.indexOf(r.tagName)!==-1&&(s.flags|=8),t.elements.push(s),r.slot,r.shadowRoot?Mc(n,r.shadowRoot,s,i):!Dc(r)&&!$b(r)&&!Lc(r)&&Mc(n,r,s,i))}},qb=function(n,e){return Ph(e)?new Db(n,e):Hb(e)?new Lb(n,e):$b(e)?new Ub(n,e):vN(e)?new Fb(n,e):yN(e)?new xh(n,e):bN(e)?new Eh(n,e):Lc(e)?new jb(n,e):Dc(e)?new Vb(n,e):Yb(e)?new zb(n,e):new Pn(n,e)},Wb=function(n,e){var t=qb(n,e);return t.flags|=4,Mc(n,e,t,t),t},mN=function(n,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Rh(n)&&t.styles.isTransparent()},gN=function(n){return n.isPositioned()||n.isFloating()},Gb=function(n){return n.nodeType===Node.TEXT_NODE},Gr=function(n){return n.nodeType===Node.ELEMENT_NODE},Ih=function(n){return Gr(n)&&typeof n.style<"u"&&!Nc(n)},Nc=function(n){return typeof n.className=="object"},vN=function(n){return n.tagName==="LI"},yN=function(n){return n.tagName==="OL"},bN=function(n){return n.tagName==="INPUT"},_N=function(n){return n.tagName==="HTML"},$b=function(n){return n.tagName==="svg"},Rh=function(n){return n.tagName==="BODY"},Hb=function(n){return n.tagName==="CANVAS"},Kb=function(n){return n.tagName==="VIDEO"},Ph=function(n){return n.tagName==="IMG"},Yb=function(n){return n.tagName==="IFRAME"},Xb=function(n){return n.tagName==="STYLE"},kN=function(n){return n.tagName==="SCRIPT"},Dc=function(n){return n.tagName==="TEXTAREA"},Lc=function(n){return n.tagName==="SELECT"},Jb=function(n){return n.tagName==="SLOT"},Zb=function(n){return n.tagName.indexOf("-")>0},SN=function(){function n(){this.counters={}}return n.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},n.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},n.prototype.pop=function(e){var t=this;e.forEach(function(i){return t.counters[i].pop()})},n.prototype.parse=function(e){var t=this,i=e.counterIncrement,r=e.counterReset,o=!0;i!==null&&i.forEach(function(a){var c=t.counters[a.counter];c&&a.increment!==0&&(o=!1,c.length||c.push(1),c[Math.max(0,c.length-1)]+=a.increment)});var s=[];return o&&r.forEach(function(a){var c=t.counters[a.counter];s.push(a.counter),c||(c=t.counters[a.counter]=[]),c.push(a.reset)}),s},n}(),Qb={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},e_={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},wN={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},CN={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},$r=function(n,e,t,i,r,o){return n<e||n>t?as(n,r,o.length>0):i.integers.reduce(function(s,a,c){for(;n>=a;)n-=a,s+=i.values[c];return s},"")+o},t_=function(n,e,t,i){var r="";do t||n--,r=i(n)+r,n/=e;while(n*e>=e);return r},it=function(n,e,t,i,r){var o=t-e+1;return(n<0?"-":"")+(t_(Math.abs(n),o,i,function(s){return nt(Math.floor(s%o)+e)})+r)},Zi=function(n,e,t){t===void 0&&(t=". ");var i=e.length;return t_(Math.abs(n),i,!1,function(r){return e[Math.floor(r%i)]})+t},Hr=1,Si=2,wi=4,ss=8,$n=function(n,e,t,i,r,o){if(n<-9999||n>9999)return as(n,4,r.length>0);var s=Math.abs(n),a=r;if(s===0)return e[0]+a;for(var c=0;s>0&&c<=4;c++){var u=s%10;u===0&&ut(o,Hr)&&a!==""?a=e[u]+a:u>1||u===1&&c===0||u===1&&c===1&&ut(o,Si)||u===1&&c===1&&ut(o,wi)&&n>100||u===1&&c>1&&ut(o,ss)?a=e[u]+(c>0?t[c-1]:"")+a:u===1&&c>0&&(a=t[c-1]+a),s=Math.floor(s/10)}return(n<0?i:"")+a},n_="\u5341\u767E\u5343\u842C",i_="\u62FE\u4F70\u4EDF\u842C",r_="\u30DE\u30A4\u30CA\u30B9",Oh="\uB9C8\uC774\uB108\uC2A4",as=function(n,e,t){var i=t?". ":"",r=t?"\u3001":"",o=t?", ":"",s=t?" ":"";switch(e){case 0:return"\u2022"+s;case 1:return"\u25E6"+s;case 2:return"\u25FE"+s;case 5:var a=it(n,48,57,!0,i);return a.length<4?"0".concat(a):a;case 4:return Zi(n,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",r);case 6:return $r(n,1,3999,Qb,3,i).toLowerCase();case 7:return $r(n,1,3999,Qb,3,i);case 8:return it(n,945,969,!1,i);case 9:return it(n,97,122,!1,i);case 10:return it(n,65,90,!1,i);case 11:return it(n,1632,1641,!0,i);case 12:case 49:return $r(n,1,9999,e_,3,i);case 35:return $r(n,1,9999,e_,3,i).toLowerCase();case 13:return it(n,2534,2543,!0,i);case 14:case 30:return it(n,6112,6121,!0,i);case 15:return Zi(n,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",r);case 16:return Zi(n,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",r);case 17:case 48:return $n(n,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",n_,"\u8CA0",r,Si|wi|ss);case 47:return $n(n,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",i_,"\u8CA0",r,Hr|Si|wi|ss);case 42:return $n(n,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",n_,"\u8D1F",r,Si|wi|ss);case 41:return $n(n,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",i_,"\u8D1F",r,Hr|Si|wi|ss);case 26:return $n(n,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",r_,r,0);case 25:return $n(n,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",r_,r,Hr|Si|wi);case 31:return $n(n,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Oh,o,Hr|Si|wi);case 33:return $n(n,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Oh,o,0);case 32:return $n(n,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Oh,o,Hr|Si|wi);case 18:return it(n,2406,2415,!0,i);case 20:return $r(n,1,19999,CN,3,i);case 21:return it(n,2790,2799,!0,i);case 22:return it(n,2662,2671,!0,i);case 52:return $r(n,1,10999,wN,3,i);case 23:return Zi(n,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Zi(n,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return it(n,3302,3311,!0,i);case 28:return Zi(n,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",r);case 29:return Zi(n,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",r);case 34:return it(n,3792,3801,!0,i);case 37:return it(n,6160,6169,!0,i);case 38:return it(n,4160,4169,!0,i);case 39:return it(n,2918,2927,!0,i);case 40:return it(n,1776,1785,!0,i);case 43:return it(n,3046,3055,!0,i);case 44:return it(n,3174,3183,!0,i);case 45:return it(n,3664,3673,!0,i);case 46:return it(n,3872,3881,!0,i);case 3:default:return it(n,48,57,!0,i)}},o_="data-html2canvas-ignore",s_=function(){function n(e,t,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=t,this.counters=new SN,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return n.prototype.toIFrame=function(e,t){var i=this,r=TN(e,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var o=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,a=r.contentWindow,c=a.document,u=IN(r).then(function(){return Mt(i,void 0,void 0,function(){var h,p;return xt(this,function(m){switch(m.label){case 0:return this.scrolledElements.forEach(AN),a&&(a.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==t.top||a.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-t.left,a.scrollY-t.top,0,0))),h=this.options.onclone,p=this.clonedReferenceElement,typeof p>"u"?[2,Promise.reject("Error finding the ".concat(this.referenceElement.nodeName," in the cloned document"))]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:m.sent(),m.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,EN(c)]:[3,4];case 3:m.sent(),m.label=4;case 4:return typeof h=="function"?[2,Promise.resolve().then(function(){return h(c,p)}).then(function(){return r})]:[2,r]}})})}),l=c.baseURI;c.open(),c.write("".concat(PN(document.doctype),"<html></html>")),ON(this.referenceElement.ownerDocument,o,s);var d=c.adoptNode(this.documentElement);return UN(d,l),c.replaceChild(d,c.documentElement),c.close(),u},n.prototype.createElementClone=function(e){if(vh(e,2),Hb(e))return this.createCanvasClone(e);if(Kb(e))return this.createVideoClone(e);if(Xb(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Ph(t)&&(Ph(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),Zb(t)?this.createCustomElementClone(t):t},n.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Ah(e.style,t),t},n.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var i=[].slice.call(t.cssRules,0).reduce(function(o,s){return s&&typeof s.cssText=="string"?o+s.cssText:o},""),r=e.cloneNode(!1);return r.textContent=i,r}}catch(o){if(this.context.logger.error("Unable to access cssRules property",o),o.name!=="SecurityError")throw o}return e.cloneNode(!1)},n.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var i=e.ownerDocument.createElement("img");try{return i.src=e.toDataURL(),i}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var o=e.getContext("2d"),s=r.getContext("2d",{willReadFrequently:!0});if(s)if(!this.options.allowTaint&&o)s.putImageData(o.getImageData(0,0,e.width,e.height),0,0);else{var a=(t=e.getContext("webgl2"))!==null&&t!==void 0?t:e.getContext("webgl");if(a){var c=a.getContextAttributes();(c==null?void 0:c.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}s.drawImage(e,0,0)}return r}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},n.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var i=t.getContext("2d");try{return i&&(i.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||i.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},n.prototype.appendChildNode=function(e,t,i){(!Gr(t)||!kN(t)&&!t.hasAttribute(o_)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!Gr(t)||!Xb(t))&&e.appendChild(this.cloneNode(t,i))},n.prototype.cloneChildNodes=function(e,t,i){for(var r=this,o=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;o;o=o.nextSibling)if(Gr(o)&&Jb(o)&&typeof o.assignedNodes=="function"){var s=o.assignedNodes();s.length&&s.forEach(function(a){return r.appendChildNode(t,a,i)})}else this.appendChildNode(t,o,i)},n.prototype.cloneNode=function(e,t){if(Gb(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var i=e.ownerDocument.defaultView;if(i&&Gr(e)&&(Ih(e)||Nc(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var o=i.getComputedStyle(e),s=i.getComputedStyle(e,":before"),a=i.getComputedStyle(e,":after");this.referenceElement===e&&Ih(r)&&(this.clonedReferenceElement=r),Rh(r)&&DN(r);var c=this.counters.parse(new Sb(this.context,o)),u=this.resolvePseudoContent(e,r,s,cs.BEFORE);Zb(e)&&(t=!0),Kb(e)||this.cloneChildNodes(e,r,t),u&&r.insertBefore(u,r.firstChild);var l=this.resolvePseudoContent(e,r,a,cs.AFTER);return l&&r.appendChild(l),this.counters.pop(c),(o&&(this.options.copyStyles||Nc(e))&&!Yb(e)||t)&&Ah(o,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Dc(e)||Lc(e))&&(Dc(r)||Lc(r))&&(r.value=e.value),r}return e.cloneNode(!1)},n.prototype.resolvePseudoContent=function(e,t,i,r){var o=this;if(i){var s=i.content,a=t.ownerDocument;if(!(!a||!s||s==="none"||s==="-moz-alt-content"||i.display==="none")){this.counters.parse(new Sb(this.context,i));var c=new NM(this.context,i),u=a.createElement("html2canvaspseudoelement");Ah(i,u),c.content.forEach(function(d){if(d.type===0)u.appendChild(a.createTextNode(d.value));else if(d.type===22){var h=a.createElement("img");h.src=d.value,h.style.opacity="1",u.appendChild(h)}else if(d.type===18){if(d.name==="attr"){var p=d.values.filter(ue);p.length&&u.appendChild(a.createTextNode(e.getAttribute(p[0].value)||""))}else if(d.name==="counter"){var m=d.values.filter(vt),f=m[0],g=m[1];if(f&&ue(f)){var y=o.counters.getCounterValue(f.value),b=g&&ue(g)?gh.parse(o.context,g.value):3;u.appendChild(a.createTextNode(as(y,b,!1)))}}else if(d.name==="counters"){var S=d.values.filter(vt),f=S[0],w=S[1],g=S[2];if(f&&ue(f)){var k=o.counters.getCounterValues(f.value),C=g&&ue(g)?gh.parse(o.context,g.value):3,x=w&&w.type===0?w.value:"",I=k.map(function(O){return as(O,C,!1)}).join(x);u.appendChild(a.createTextNode(I))}}}else if(d.type===20)switch(d.value){case"open-quote":u.appendChild(a.createTextNode(kb(c.quotes,o.quoteDepth++,!0)));break;case"close-quote":u.appendChild(a.createTextNode(kb(c.quotes,--o.quoteDepth,!1)));break;default:u.appendChild(a.createTextNode(d.value))}}),u.className="".concat(Mh," ").concat(Nh);var l=r===cs.BEFORE?" ".concat(Mh):" ".concat(Nh);return Nc(t)?t.className.baseValue+=l:t.className+=l,u}}},n.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},n}(),cs;(function(n){n[n.BEFORE=0]="BEFORE",n[n.AFTER=1]="AFTER"})(cs||(cs={}));var TN=function(n,e){var t=n.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(o_,"true"),n.body.appendChild(t),t},xN=function(n){return new Promise(function(e){if(n.complete){e();return}if(!n.src){e();return}n.onload=e,n.onerror=e})},EN=function(n){return Promise.all([].slice.call(n.images,0).map(xN))},IN=function(n){return new Promise(function(e,t){var i=n.contentWindow;if(!i)return t("No window assigned for iframe");var r=i.document;i.onload=n.onload=function(){i.onload=n.onload=null;var o=setInterval(function(){r.body.childNodes.length>0&&r.readyState==="complete"&&(clearInterval(o),e(n))},50)}})},RN=["all","d","content"],Ah=function(n,e){for(var t=n.length-1;t>=0;t--){var i=n.item(t);RN.indexOf(i)===-1&&e.style.setProperty(i,n.getPropertyValue(i))}return e},PN=function(n){var e="";return n&&(e+="<!DOCTYPE ",n.name&&(e+=n.name),n.internalSubset&&(e+=n.internalSubset),n.publicId&&(e+='"'.concat(n.publicId,'"')),n.systemId&&(e+='"'.concat(n.systemId,'"')),e+=">"),e},ON=function(n,e,t){n&&n.defaultView&&(e!==n.defaultView.pageXOffset||t!==n.defaultView.pageYOffset)&&n.defaultView.scrollTo(e,t)},AN=function(n){var e=n[0],t=n[1],i=n[2];e.scrollLeft=t,e.scrollTop=i},MN=":before",NN=":after",Mh="___html2canvas___pseudoelement_before",Nh="___html2canvas___pseudoelement_after",a_=`{
|
|
80
80
|
content: "" !important;
|
|
81
81
|
display: none !important;
|
|
82
82
|
}`,DN=function(n){LN(n,".".concat(Mh).concat(MN).concat(a_,`
|