PageSourceSearch

https://synchronex.ai/_next/static/immutable/chunks/15mov4umq-ouw.js

js synchronex.ai collected 2026-10-05 14:38:17 UTC 434,079 bytes, 2 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,700520,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);class n{constructor(){this.events={},this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(e=>e!==t)}}emit(e,t){for(let r of this.events[e]||[])r(t);for(let r of this.events["*"]||[])r(e,t)}}for(var a in i.d(o,{SimpleEventEmitter:()=>n}),r.SimpleEventEmitter=o.SimpleEventEmitter,o)-1===["SimpleEventEmitter"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},956668,(e,t,r)=>{"use strict";var i,o=e.i(467034),n={};n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{PostHogCoreStateless:()=>T,QuotaLimitedFeature:()=>w,applyCallerFeatureFlagOverrides:()=>m,isPostHogFetchContentTooLargeError:()=>E,isPostHogFetchNetworkError:()=>b,logFlushError:()=>v,maybeAdd:()=>_});let s=e.r(700520),l=e.r(370454),u=e.r(732616),c=e.r(699960),d=e.r(856658),p=e.r(183570),f=e.r(239797),h=e.r(143819);
1class g extends Error{constructor(e,t,r,i){super("HTTP error while fetching PostHog: status="+e.status+", reqByteLength="+t),this.response=e,this.reqByteLength=t,this.responseBodyDeadline=r,this.abortController=i,this.name="PostHogFetchHttpError",this._bodyReadTimedOut=!1}get status(){return this.response.status}get retryAfterMs(){try{return(0,p.parseRetryAfterMs)(this.response.headers?.get("retry-after"))}catch{return}}get bodyReadTimedOut(){return this._bodyReadTimedOut}get text(){if(!this.responseBodyTextPromise)if(Date.now()>=this.responseBodyDeadline){this._bodyReadTimedOut=!0;let e=(0,d.createNamedError)("AbortError","Response body read timed out");this.cancelResponseBody(e),this.responseBodyTextPromise=Promise.reject(e)}else{let e,t=new Promise((e,t)=>{this.responseBodyTimer=(0,d.safeSetTimeout)(()=>{this._bodyReadTimedOut=!0;let e=(0,d.createNamedError)("AbortError","Response body read timed out");t(e),this.cancelResponseBody(e)},this.responseBodyDeadline-Date.now())});try{e=Promise.resolve(this.response.text())}catch(t){e=Promise.reject(t)}this.responseBodyTextPromise=Promise.race([e,t]).finally(()=>clearTimeout(this.responseBodyTimer))}return this.responseBodyTextPromise}get json(){return this.text.then(e=>JSON.parse(e))}cancelResponseBody(e){clearTimeout(this.responseBodyTimer),this.abortController.signal.aborted||this.abortController.abort(e),(async()=>{try{await this.response.body?.cancel()}catch{}})()}}class y extends Error{constructor(e){super("Network error while fetching PostHog",e instanceof Error?{cause:e}:{}),this.error=e,this.name="PostHogFetchNetworkError"}}let _=(e,t)=>void 0!==t?{[e]:t}:{},m=(e,t)=>
1{for(let r of Object.keys(t))(r.startsWith("$feature/")||"$active_feature_flags"===r)&&(e[r]=t[r])};async function v(e){if(e instanceof g){let t="";try{t=await e.text}catch{e.bodyReadTimedOut&&(t="<response body read timed out>")}console.error(`Error while flushing PostHog: message=${e.message}, response body=${t}`,e)}else console.error("Error while flushing PostHog",e);return Promise.resolve()}function b(e){return e instanceof y}function S(e){if(e instanceof g)return 502===e.status||504===e.status;if(!(e instanceof y))return!1;let t=e.error;return"ECONNREFUSED"!==(t?.code??t?.cause?.code)}function P(e){try{if("string"!=typeof e)return e instanceof Uint8Array?e.byteLength:e.size;if("u">typeof o.Buffer)return o.Buffer.byteLength(e,d.STRING_FORMAT);return new TextEncoder().encode(e).length}catch{return 0}}function E(e){return"object"==typeof e&&e instanceof g&&413===e.status}function O(e){return e instanceof g?408===e.status||429===e.status||e.status>=500:b(e)}function F(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}var w=((i={}).FeatureFlags="feature_flags",i.Recordings="recordings",i);let A="default";class T{getErrorPropertiesBuilder(){return this._errorPropertiesBuilder||(this._errorPropertiesBuilder=this.createErrorPropertiesBuilder()),this._errorPropertiesBuilder}createErrorPropertiesBuilder(){return new h.ErrorPropertiesBuilder([new h.ErrorCoercer,new h.ObjectCoercer,new h.StringCoercer,new h.PrimitiveCoercer],(0,h.createDefaultStackParser)())}constructor(e,t={}){this.flushPromise=null,this.pendingFlushPromise=null,this.flushPromises=new Set,this._dequeuedMessagesCount=0,this.shutdownPromise=null,this.promiseQueue=new d.PromiseQueue,this._events=new s.SimpleEventEmitter,this._isInitialized=!1;const r="string"==typeof e?e.trim():"",i="string"==typeof t.host?t.host.trim():"",o=!r;this._logger=(0,d.createLogger)("[PostHog]",this.logMsgIfDebug.bind(this)),o&&this._logger.error("You must pass your PostHog project's api key. The client will be disabled."),this.apiKey=r,this.host=(0,d.removeTrailingSlash)(i||"https://us.i.posthog.com"),this.flushAt=t.flushAt?Math.max(t.flushAt,1):20,this.maxBatchSize=Math.max(this.flushAt,t.maxBatchSize??100),this.maxQueueSize=Math.max(this.flushAt,t.maxQueueSize??1e3),this.flushInterval=t.flushInterval??1e4,this.preloadFeatureFlags=t.preloadFeatureFlags??!0,this.defaultOptIn=t.defaultOptIn??!0,this.disableSurveys=t.disableSurveys??!1,this._retryOptions={retryCount:t.fetchRetryCount??3,retryDelay:t.fetchRetryDelay??3e3,retryCheck:O},this.requestTimeout=t.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=t.featureFlagsRequestTimeoutMs??3e3,this.featureFlagsRequestMaxRetries=t.featureFlagsRequestMaxRetries??1,this.remoteConfigRequestTimeoutMs=t.remoteConfigRequestTimeoutMs??3e3,this.disableGeoip=t.disableGeoip??!0,this.disabled=(t.disabled??!1)||o,this.historicalMigration=t?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0,this.evaluationContexts=t?.evaluationContexts??t?.evaluationEnvironments,t?.evaluationEnvironments&&!t?.evaluationContexts&&this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version."),this.disableCompression=!(0,u.isGzipSupported)()||(t?.disableCompression??!1)}logMsgIfDebug(e){this.isDebug&&e()}wrap(e){return this.disabled?void this._logger.warn("The client is disabled"):this._isInitialized?e():void this._initPromise.then(()=>e())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(c.PostHogPersistedProperty.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(c.PostHogPersistedProperty.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(c.PostHogPersistedProperty.OptedOut,!0)})}on(e,t){return this._events.on(e,t)}debug(e=!0){if(this.removeDebugCallback?.(),e){let e=this.on("*",(e,t)=>this._logger.info(e,t));this.removeDebugCallback=()=>{e(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}get isDisabled(){return this.disabled}buildPayload(e){let t=e.properties||{},r={...t,...this.getCommonEventProperties()};return m(r,t),"$feature_flag_called"===e.event&&!1===r.$feature_flag_has_experiment&&this.isMinimalFlagCalledEventsEnabled()&&(r=(0,l.minimizeFlagCalledEventProperties)(r)),{distinct_id:e.distinct_id,event:e.event,properties:r}}isMinimalFlagCalledEventsEnabled(){return!1}
1addPendingPromise(e){return this.promiseQueue.add(e)}identifyStateless(e,t,r){this.wrap(()=>{let i={...this.buildPayload({distinct_id:e,event:"$identify",properties:t})};this.enqueue("identify",i,r)})}async identifyStatelessImmediate(e,t,r){let i={...this.buildPayload({distinct_id:e,event:"$identify",properties:t})};await this.sendImmediate("identify",i,r)}captureStateless(e,t,r,i){this.wrap(()=>{let o=this.buildPayload({distinct_id:e,event:t,properties:r});this.enqueue("capture",o,i)})}async captureStatelessImmediate(e,t,r,i){let o=this.buildPayload({distinct_id:e,event:t,properties:r});await this.sendImmediate("capture",o,i)}aliasStateless(e,t,r,i){this.wrap(()=>{let o=this.buildPayload({event:"$create_alias",distinct_id:t,properties:{...r||{},distinct_id:t,alias:e}});this.enqueue("alias",o,i)})}async aliasStatelessImmediate(e,t,r,i){let o=this.buildPayload({event:"$create_alias",distinct_id:t,properties:{...r||{},distinct_id:t,alias:e}});await this.sendImmediate("alias",o,i)}groupIdentifyStateless(e,t,r,i,o,n){this.wrap(()=>{let a=this.buildPayload({distinct_id:o||`$${e}_${t}`,event:"$groupidentify",properties:{$group_type:e,$group_key:t,$group_set:r||{},...n||{}}});this.enqueue("capture",a,i)})}async groupIdentifyStatelessImmediate(e,t,r,i,o,n){let a=this.buildPayload({distinct_id:o||`$${e}_${t}`,event:"$groupidentify",properties:{$group_type:e,$group_key:t,$group_set:r||{},...n||{}}});await this.sendImmediate("capture",a,i)}async getRemoteConfig(){await this._initPromise;let e=this.host;"https://us.i.posthog.com"===e?e="https://us-assets.i.posthog.com":"https://eu.i.posthog.com"===e&&(e="https://eu-assets.i.posthog.com");let t=`${e}/array/${this.apiKey}/config`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}};return this.fetchWithRetry(t,r,{type:"required",consume:e=>e.json()},{retryCount:0},this.remoteConfigRequestTimeoutMs).catch(e=>{this._logger.error("Remote config could not be loaded",e),this._events.emit("error",e)})}async getFlags(e,t={},r={},i={},o={},n=!1){await this._initPromise;let a=`${this.host}/flags/?v=2${n?"&config=true":""}`,s={token:this.apiKey,distinct_id:e,groups:t,person_properties:r,group_properties:i,...o};r.$device_id&&(s.$device_id=r.$device_id),this.evaluationContexts&&this.evaluationContexts.length>0&&(s.evaluation_contexts=this.evaluationContexts);let u={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify(s)};return this._logger.info("Flags URL",a),this.fetchWithRetry(a,u,{type:"required",consume:e=>e.json()},{retryCount:this.featureFlagsRequestMaxRetries,retryCheck:S},this.featureFlagsRequestTimeoutMs).then(e=>({success:!0,response:(0,l.normalizeFlagsResponse)(e)})).catch(e=>(this._events.emit("error",e),{success:!1,error:this.categorizeRequestError(e)}))}categorizeRequestError(e){if(e instanceof g)return{type:"api_error",statusCode:e.status};if(e instanceof y){let t=e.error;return t instanceof Error&&("AbortError"===t.name||"TimeoutError"===t.name)?{type:"timeout"}:{type:"connection_error"}}return{type:"unknown_error"}}async getFeatureFlagStateless(e,t,r={},i={},o={},n){await this._initPromise;let a=await this.getFeatureFlagDetailStateless(e,t,r,i,o,n);if(void 0===a)return{response:void 0,requestId:void 0};let s=(0,l.getFeatureFlagValue)(a.response);return void 0===s&&(s=!1),{response:s,requestId:a.requestId}}async getFeatureFlagDetailStateless(e,t,r={},i={},o={},n){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(t,r,i,o,n,[e]);if(void 0!==a)return{response:a.flags[e],requestId:a.requestId,evaluatedAt:a.evaluatedAt}}async getFeatureFlagPayloadStateless(e,t,r={},i={},o={},n){await this._initPromise;let a=await this.getFeatureFlagPayloadsStateless(t,r,i,o,n,[e]);if(!a)return;let s=a[e];return void 0===s?null:s}async getFeatureFlagPayloadsStateless(e,t={},r={},i={},o,n){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(e,t,r,i,o,n)).payloads}async getFeatureFlagsStateless(e,t={},r={},i={},o,n){return await this._initPromise,await this.getFeatureFlagsAndPayloadsStateless(e,t,r,i,o,n)}async getFeatureFlagsAndPayloadsStateless(e,t={},r={},i={},o,n){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(e,t,r,i,o,n);return a?{flags:a.featureFlags,payloads:a.featureFlagPayloads,requestId:a.requestId}:{flags:void 0,payloads:void 0,requestId:void 0}}async getFeatureFlagDetailsStateless(e,t={},r={},i={},o,n){await this._initPromise;let a={geoip_disable:o??this.disableGeoip};n&&(a.flag_keys_to_evaluate=n);let s=await this.getFlags(e,t,r,i,a);if(!s.success)return;let l=s.response;return(l.errorsWhileComputingFlags&&console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices"),l.quotaLimited?.includes("feature_flags"))?(console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),{flags:{},featureFlags:{},featureFlagPayloads:{},requestId:l?.requestId,quotaLimited:l.quotaLimited}):l}async getSurveysStateless(){if(await this._initPromise,this.disabled)return[];if(!0===this.disableSurveys)return this._logger.info("Loading surveys is disabled."),[];let e=`${this.host}/api/surveys/?token=${this.apiKey}`,t={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}},r=await this.fetchWithRetry(e,t,{type:"required",consume:e=>{if(200!==e.status||!e.json){let t=`Surveys API could not be loaded: ${e.status}`,r=Error(t);return this._logger.error(r),this._events.emit("error",Error(t)),Promise.resolve(void 0)}return e.json()}}).catch(e=>{this._logger.error("Surveys API could not be loaded",e),this._events.emit("error",e)}),i=r?.surveys;return i&&this._logger.info("Surveys fetched from API: ",JSON.stringify(i)),i??[]}get props(){return this._props||(this._props=this.getPersistedProperty(c.PostHogPersistedProperty.Props)),this._props||{}}set props(e){this._props=e}async register(e){this.wrap(()=>{this.props={...this.props,...e},this.setPersistedProperty(c.PostHogPersistedProperty.Props,this.props)})}async unregister(e){this.wrap(()=>{delete this.props[e],this.setPersistedProperty(c.PostHogPersistedProperty.Props,this.props)})}processBeforeEnqueue(e){return e}async flushStorage(){}getQueueRouteKey(e){return A}persistedQueueKeyForRoute(e){return c.PostHogPersistedProperty.Queue}getActiveQueueRoutes(){return[A]}getRouteQueue(e){return this.getPersistedProperty(this.persistedQueueKeyForRoute(e))||[]}
1enqueue(e,t,r,i){this.wrap(()=>{if(this.optedOut)return void this._events.emit(e,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(t,r);if(null===(o=this.processBeforeEnqueue(o)))return;o=this.normalizeMessage(o);let n=this.persistedQueueKeyForRoute(i??this.getQueueRouteKey(o)),a=this.getPersistedProperty(n)||[];a.length>=this.maxQueueSize&&(a.shift(),this._logger.warn("Queue is full, the oldest event is dropped.")),a.push({message:o}),this.setPersistedProperty(n,a),this._events.emit(e,o),a.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=(0,d.safeSetTimeout)(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(e,t,r,i){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized||await this._initPromise,this.optedOut)return void this._events.emit(e,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(t,r);if(null!==(o=this.processBeforeEnqueue(o))){o=this.normalizeMessage(o);try{await this.sendBatch([o],void 0,i??this.getQueueRouteKey(o))}catch(e){this._events.emit("error",e)}}}normalizeMessage(e){let{type:t,library:r,library_version:i,...o}=e,n=F(o.properties)?o.properties:void 0;return void 0!==r&&n?.$lib===void 0&&(n={...n||{},$lib:r}),void 0!==i&&n?.$lib_version===void 0&&(n={...n||{},$lib_version:i}),n&&(o.properties=n),o.uuid=(0,d.getEventUuid)(o.uuid,f.uuidv7),o}normalizeTimestampForWire(e){let t=e instanceof Date?e:"string"==typeof e?new Date(e):null;if(!t||Number.isNaN(t.getTime()))return e;let r=t.toISOString(),i="string"==typeof e?e.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1]:void 0;return i&&i.length>3?r.replace(/\.\d{3}Z$/,`.${i}Z`):r}prepareMessage(e,t){let r={...e,timestamp:t?.timestamp?t?.timestamp:(0,d.currentISOTime)(),uuid:(0,d.getEventUuid)(t?.uuid,f.uuidv7)};return(t?.disableGeoip??this.disableGeoip)&&(F(r.properties)||(r.properties={}),r.properties.$geoip_disable=!0),r.distinctId&&(r.distinct_id=r.distinctId,delete r.distinctId),r}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.pendingFlushPromise||this.flushAutomatic().catch(async e=>{await v(e)})}flushAutomatic(){return this.flush()}async waitForPendingPromises(e,t=[]){let r=t.filter(e=>!!e),i=0;for(;;){let t=this.promiseQueue.getPromises([...r,...this.flushPromises],e);if(0===t.length)return;i>0&&this._logger.debug(`flush() re-checking ${t.length} pending promise(s) before flushing`),await Promise.all(t.map(e=>e.catch(()=>{}))),i++}}flushWithPendingPromises(){return this.flushInternal(!0)}flush(){return this.flushInternal(!1)}flushInternal(e){if(this.disabled)return Promise.resolve();if(!e&&this.pendingFlushPromise)return this.pendingFlushPromise;let t=this.flushPromise,r=this.promiseQueue.maxId,i=Promise.resolve().then(()=>{if(e)return this.waitForPendingPromises(r,[t,i])}).then(()=>(0,d.allSettled)([t])).then(()=>(this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this._flush()));return this.pendingFlushPromise=i,this.flushPromise=i,this.flushPromises.add(i),this.addPendingPromise(i),(0,d.allSettled)([i]).then(()=>{this.flushPromises.delete(i),this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this.flushPromise===i&&(this.flushPromise=null)}),i}getCustomHeaders(){let e=this.getCustomUserAgent(),t={};return e&&""!==e&&(t["User-Agent"]=e),t}compressPayload(e){return(0,u.gzipCompress)(e,this.isDebug)}getBatchEndpointPath(e){return"/batch/"}async sendBatch(e,t,r=A){let i={api_key:this.apiKey,batch:e.map(e=>{if(!e)return e;let t=this.normalizeTimestampForWire(e.timestamp);return t===e.timestamp?e:{...e,timestamp:t}}),sent_at:(0,d.currentISOTime)()};this.historicalMigration&&(i.historical_migration=!0);let o=(0,d.safeJsonStringify)(i),n=`${this.host}${this.getBatchEndpointPath(r)}`,a=this.disableCompression?null:await this.compressPayload(o),s={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...null!==a&&{"Content-Encoding":"gzip"}},body:a||o};await this.fetchWithRetry(n,s,{type:"successful-write"},t)}async _flush(){let e;this.clearFlushTimer(),await this._initPromise;let t=this.getActiveQueueRoutes();if(!t.some(e=>this.getRouteQueue(e).length>0))return;let r=[];for(let i of t)try{await this._flushRoute(i,r)}catch(t){void 0===e&&(e=t)}if(void 0!==e)throw e;this._events.emit("flush",r)}async _flushRoute(e,t){let r=this.persistedQueueKeyForRoute(e),i=this.getPersistedProperty(r)||[];if(!i.length)return;let o=i.length,n=0;for(;i.length>0&&n<o;){let o=i.slice(0,this.maxBatchSize),a=o.map(e=>void 0===e.message?e.message:this.normalizeMessage(e.message)),s=async()=>{let e=this.getPersistedProperty(r)||[],t=[...o],n=e.filter(e=>{let r=e.message?.uuid,i=t.findIndex(t=>t===e||"string"==typeof r&&r.length>0&&t.message?.uuid===r);return -1===i||(t.splice(i,1),!1)});this.setPersistedProperty(r,n),i=n,this._dequeuedMessagesCount+=o.length,await this.flushStorage()},l={retryCheck:e=>!E(e)&&O(e)};try{await this.sendBatch(a,l,e)}catch(e){if(E(e)&&a.length>1){this.maxBatchSize=Math.max(1,Math.floor(a.length/2)),this._logger.warn(`Received 413 when sending batch of size ${a.length}, reducing batch size to ${this.maxBatchSize}`);continue}throw e instanceof y||await s(),this._events.emit("error",e),e}await s(),t.push(...a),n+=a.length}}async _sendOtlpBatch({path:e,auth:t,payload:r}){let i;if(this.disabled)return{kind:"fatal",error:Error("The client is disabled")};try{i=JSON.stringify(r)}catch(t){return this.logMsgIfDebug(()=>console.warn(`[PostHog] Could not serialize a ${e} batch; reporting it as too large`,t)),{kind:"too-large",measuredLocally:!0}}let o=P(i);if(o>0xa00000)return this.logMsgIfDebug(()=>console.warn(`[PostHog] Not sending a ${e} batch of ${o} bytes: the endpoint accepts at most 10485760`)),{kind:"too-large",measuredLocally:!0};let n="bearer"===t?`${this.host}/i/v1/${e}`:`${this.host}/i/v1/${e}?token=${encodeURIComponent(this.apiKey)}`,a=this.disableCompression?null:await this.compressPayload(i),s=a||i,l={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",..."bearer"===t&&{Authorization:`Bearer ${this.apiKey}`},...null!==a&&{"Content-Encoding":"gzip"}},body:s};try{return await this.fetchWithRetry(n,l,{type:"successful-write"},{retryCheck:e=>!E(e)&&(!(e instanceof g)||void 0===e.retryAfterMs)&&O(e)}),{kind:"ok"}}catch(e){if(E(e))return{kind:"too-large"};if(O(e)){let t=e instanceof g?e.retryAfterMs:void 0;return{kind:"retry-later",error:e,...void 0!==t&&{retryAfterMs:t}}}return{kind:"fatal",error:e}}}
1async _sendLogsBatch(e){return this._sendOtlpBatch({path:"logs",auth:"query-token",payload:e})}async _sendMetricsBatch(e){return this._sendOtlpBatch({path:"metrics",auth:"query-token",payload:e})}async _sendTracesBatch(e){return this._sendOtlpBatch({path:"traces",auth:"bearer",payload:e})}async fetchWithRetry(e,t,r,i,o){let n=P(t.body?t.body:""),a={...this._retryOptions,...i},s=0;return await (0,d.retriable)(async()=>{let i,a,l;s++;let u=new AbortController,c=o??this.requestTimeout,p=Date.now()+c,f=new Promise((e,t)=>{i=(0,d.safeSetTimeout)(()=>{let e=(0,d.createNamedError)("AbortError",`Request timed out after ${c}ms`);t(e),u.abort(e)},c)}),h=!1,_=()=>l??=(async()=>{try{await a?.body?.cancel()}catch{}})();try{let i;try{i=this.fetch(e,{signal:u.signal,...t})}catch(e){throw new y(e)}i.then(e=>{u.signal.aborted&&!h&&Promise.resolve(e.body?.cancel()).catch(()=>{})}).catch(()=>{});try{a=await Promise.race([i,f]),h=!0}catch(e){throw new y(e)}if("no-cors"!==t.mode&&(a.status<200||a.status>=400))throw new g(a,n,p,u);if("successful-write"===r.type){try{await Promise.race([_(),f])}catch{}return}try{return await Promise.race([r.consume(a),f])}catch(e){if(u.signal.aborted)throw new y(e);throw e}}finally{clearTimeout(i),u.signal.aborted&&a&&_()}},{...a,retryCheck:e=>{let t=a.retryCheck(e);return t&&s<=a.retryCount&&e instanceof g&&e.cancelResponseBody(),t}})}async _shutdown(e=3e4){await this._initPromise;let t=!1;if(this.clearFlushTimer(),this.disabled)return;let r=async()=>{try{for(await this.promiseQueue.join();this.getActiveQueueRoutes().some(e=>this.getRouteQueue(e).length>0);){let e=this._dequeuedMessagesCount;if(await this.flush(),t)break;if(this._dequeuedMessagesCount===e){this._logger.warn("Shutdown flush completed but did not send any queued events. Stopping drain to avoid a loop.");break}}}catch(e){if(!("object"==typeof e&&(e instanceof g||b(e))))throw e;await v(e)}};return(0,d.raceWithTimeout)(r(),e,()=>{this._logger.critical("Timeout while shutting down PostHog. Some events may not have been sent.",{shutdownTimeoutMs:e}),t=!0})}async shutdown(e=3e4){return this.shutdownPromise?this._logger.warn("shutdown() called while already shutting down. shutdown() is meant to be called once before process exit - use flush() for per-request cleanup"):this.shutdownPromise=this._shutdown(e).finally(()=>{this.shutdownPromise=null}),this.shutdownPromise}}for(var x in r.PostHogCoreStateless=a.PostHogCoreStateless,r.QuotaLimitedFeature=a.QuotaLimitedFeature,r.applyCallerFeatureFlagOverrides=a.applyCallerFeatureFlagOverrides,r.isPostHogFetchContentTooLargeError=a.isPostHogFetchContentTooLargeError,r.isPostHogFetchNetworkError=a.isPostHogFetchNetworkError,r.logFlushError=a.logFlushError,r.maybeAdd=a.maybeAdd,a)-1===["PostHogCoreStateless","QuotaLimitedFeature","applyCallerFeatureFlagOverrides","isPostHogFetchContentTooLargeError","isPostHogFetchNetworkError","logFlushError","maybeAdd"].indexOf(x)&&(r[x]=a[x]);Object.defineProperty(r,"__esModule",{value:!0})},778452,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PostHogCore:()=>c});let n=e.r(370454),a=e.r(699960),s=e.r(956668),l=e.r(239797),u=e.r(856658);class c extends s.PostHogCoreStateless{constructor(e,t){const r=t?.disableGeoip??!1,i=t?.featureFlagsRequestTimeoutMs??1e4;super(e,{...t,disableGeoip:r,featureFlagsRequestTimeoutMs:i}),this.flagCallReported={},this._sessionMaxLengthSeconds=86400,this.sessionProps={},this._cachedPersonProperties=null,this.sendFeatureFlagEvent=t?.sendFeatureFlagEvent??!0,this.disableRemoteFeatureFlags=t?.disableRemoteFeatureFlags??!1,this._sessionExpirationTimeSeconds=t?.sessionExpirationTimeSeconds??1800,this._personProfiles=t?.personProfiles??"identified_only",this._beforeSend=t?.before_send}setupBootstrap(e){let t=e?.bootstrap;if(!t)return;t.distinctId&&(t.isIdentifiedId?this.getPersistedProperty(a.PostHogPersistedProperty.DistinctId)||(this.setPersistedProperty(a.PostHogPersistedProperty.DistinctId,t.distinctId),this.setPersistedProperty(a.PostHogPersistedProperty.PersonMode,"identified")):this.getPersistedProperty(a.PostHogPersistedProperty.AnonymousId)||this.setPersistedProperty(a.PostHogPersistedProperty.AnonymousId,t.distinctId));let r=t.featureFlags,i=t.featureFlagPayloads??{};if(r&&Object.keys(r).length){let e=(0,n.createFlagsResponseFromFlagsAndPayloads)(r,i);if(Object.keys(e.flags).length>0){this.setBootstrappedFeatureFlagDetails(e);let t=this.getKnownFeatureFlagDetails()||{flags:{},requestId:void 0},r={flags:{...e.flags,...t.flags},requestId:e.requestId};this.setKnownFeatureFlagDetails(r)}}}clearProps(){this.props=void 0,this.sessionProps={},this.flagCallReported={}}on(e,t){return this._events.on(e,t)}reset(e){this.wrap(()=>{let t=[a.PostHogPersistedProperty.Queue,a.PostHogPersistedProperty.AiQueue,a.PostHogPersistedProperty.AiCaptureQueue,a.PostHogPersistedProperty.LogsQueue,...e||[]];for(let e of(this.clearProps(),this._cachedPersonProperties=null,Object.keys(a.PostHogPersistedProperty)))t.includes(a.PostHogPersistedProperty[e])||this.setPersistedProperty(a.PostHogPersistedProperty[e],null);this.disableRemoteFeatureFlags&&!this.disabled?t.includes(a.PostHogPersistedProperty.FeatureFlagDetails)||this.setKnownFeatureFlagDetails({flags:{}}):this.reloadFeatureFlags()})}async _shutdown(e=3e4){try{return await super._shutdown(e)}finally{this.flagCallReported={}}}getCommonEventProperties(){let e=this.getFeatureFlags(),t={};if(e)for(let[r,i]of Object.entries(e))t[`$feature/${r}`]=i;return{...(0,s.maybeAdd)("$active_feature_flags",e?Object.keys(e):void 0),...t,...super.getCommonEventProperties()}}enrichProperties(e){let t=e||{},r={...this.props,...this.sessionProps,...t,...this.getCommonEventProperties(),$session_id:this.getSessionId()};return(0,s.applyCallerFeatureFlagOverrides)(r,t),r}getSessionId(){if(!this._isInitialized)return"";let e=this.getPersistedProperty(a.PostHogPersistedProperty.SessionId),t=this.getPersistedProperty(a.PostHogPersistedProperty.SessionLastTimestamp)||0,r=this.getPersistedProperty(a.PostHogPersistedProperty.SessionStartTimestamp)||0,i=Date.now(),o=i-t,
1n=i-r;return(!e||o>1e3*this._sessionExpirationTimeSeconds||n>1e3*this._sessionMaxLengthSeconds)&&(e=(0,l.uuidv7)(),this.setPersistedProperty(a.PostHogPersistedProperty.SessionId,e),this.setPersistedProperty(a.PostHogPersistedProperty.SessionStartTimestamp,i)),this.setPersistedProperty(a.PostHogPersistedProperty.SessionLastTimestamp,i),e}resetSessionId(){this.wrap(()=>{this.setPersistedProperty(a.PostHogPersistedProperty.SessionId,null),this.setPersistedProperty(a.PostHogPersistedProperty.SessionLastTimestamp,null),this.setPersistedProperty(a.PostHogPersistedProperty.SessionStartTimestamp,null)})}getAnonymousId(){if(!this._isInitialized)return"";let e=this.getPersistedProperty(a.PostHogPersistedProperty.AnonymousId);return e||(e=(0,l.uuidv7)(),this.setPersistedProperty(a.PostHogPersistedProperty.AnonymousId,e)),e}getDistinctId(){return this._isInitialized?this.getPersistedProperty(a.PostHogPersistedProperty.DistinctId)||this.getAnonymousId():""}registerForSession(e){this.sessionProps={...this.sessionProps,...e}}unregisterForSession(e){delete this.sessionProps[e]}identify(e,t,r){this.wrap(()=>{if(!this._requirePersonProcessing("posthog.identify"))return;let i=this.getDistinctId(),o=!!e;e=e||i,t?.$groups&&this.groups(t.$groups);let n=t?.$set_once;delete t?.$set_once;let l=t?.$set||t,c=this.enrichProperties({$anon_distinct_id:this.getAnonymousId(),...(0,s.maybeAdd)("$set",l),...(0,s.maybeAdd)("$set_once",n)}),d=(0,u.isObject)(l)?l:void 0,p=(0,u.isObject)(n)?n:void 0,f=e!==i,h=o&&!f&&!this._isIdentified();if(f)this.setPersistedProperty(a.PostHogPersistedProperty.AnonymousId,i),this.setPersistedProperty(a.PostHogPersistedProperty.DistinctId,e),this.setPersistedProperty(a.PostHogPersistedProperty.PersonMode,"identified"),this.reloadFeatureFlags(),super.identifyStateless(e,c,r),this._cachedPersonProperties=(0,u.getPersonPropertiesHash)(e,d,p);else if(h){this.setPersistedProperty(a.PostHogPersistedProperty.PersonMode,"identified");let t=d||{},r=p||{};this.setPersonPropertiesForFlags({$set:t,$set_once:r},!1),this.capture("$set",{$set:t,$set_once:r}),this._cachedPersonProperties=(0,u.getPersonPropertiesHash)(e,d,p),(d||p)&&this.reloadFeatureFlags()}else(d||p)&&this.setPersonProperties(d,p)})}capture(e,t,r){"$exception"!==e||r?._originatedFromCaptureException||this._logger.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.wrap(()=>{let i=this.getDistinctId();t?.$groups&&this.groups(t.$groups);let o=this.enrichProperties(t),n=this._hasPersonProcessing();o.$process_person_profile=n,o.$is_identified=this._isIdentified(),n&&this._requirePersonProcessing("capture"),super.captureStateless(i,e,o,r)})}alias(e){this.wrap(()=>{if(!this._requirePersonProcessing("posthog.alias"))return;let t=this.getDistinctId(),r=this.enrichProperties({});super.aliasStateless(e,t,r)})}autocapture(e,t,r={},i){this.wrap(()=>{let o={distinct_id:this.getDistinctId(),event:"$autocapture",properties:{...this.enrichProperties(r),$event_type:e,$elements:t}};this.enqueue("autocapture",o,i)})}groups(e){this.wrap(()=>{if(!this._requirePersonProcessing("posthog.group"))return;let t=this.props.$groups||{};this.register({$groups:{...t,...e}}),Object.keys(e).find(r=>t[r]!==e[r])&&this.reloadFeatureFlags()})}group(e,t,r,i){this.wrap(()=>{let o=(this.props.$groups||{})[e]!==t;this.groups({[e]:t}),(o||r)&&this.groupIdentify(e,t,r,i)})}groupIdentify(e,t,r,i){this.wrap(()=>{if(!this._requirePersonProcessing("posthog.groupIdentify"))return;let o=this.getDistinctId(),n=this.enrichProperties({});super.groupIdentifyStateless(e,t,r,i,o,n)})}setPersonPropertiesForFlags(e,t=!0){this.wrap(()=>{let r=this.getPersistedProperty(a.PostHogPersistedProperty.PersonProperties)||{},i=e?.$set||(e?.$set_once?{}:e),o=e?.$set_once,n={};if(o)for(let e in o)!Object.prototype.hasOwnProperty.call(o,e)||e in r||(n[e]=o[e]);this.setPersistedProperty(a.PostHogPersistedProperty.PersonProperties,{...r,...n,...i}),t&&this.reloadFeatureFlags()})}resetPersonPropertiesForFlags(){this.wrap(()=>{this.setPersistedProperty(a.PostHogPersistedProperty.PersonProperties,null)})}setGroupPropertiesForFlags(e){this.wrap(()=>{let t=this.getPersistedProperty(a.PostHogPersistedProperty.GroupProperties)||{};0!==Object.keys(t).length&&Object.keys(t).forEach(r=>{t[r]={...t[r],...e[r]},delete e[r]}),this.setPersistedProperty(a.PostHogPersistedProperty.GroupProperties,{...t,...e})})}resetGroupPropertiesForFlags(){this.wrap(()=>{this.setPersistedProperty(a.PostHogPersistedProperty.GroupProperties,null)})}async remoteConfigAsync(){if(await this._initPromise,!this.disabled)return this._remoteConfigResponsePromise?this._remoteConfigResponsePromise:this._remoteConfigAsync()}async flagsAsync(e){let{sendAnonDistinctId:t=!0,fetchConfig:r=!1,triggerOnRemoteConfig:i=!1}=e??{};if(await this._initPromise,!this.disabled){if(this.disableRemoteFeatureFlags&&!r)return void this._logger.info("Feature flags are disabled (disableRemoteFeatureFlags), skipping reload.");if(this._flagsResponsePromise){this._logger.info("Feature flags are being loaded already, queuing reload.");
1let e=this._pendingFlagsRequest;return new Promise((o,n)=>{this._pendingFlagsRequest={sendAnonDistinctId:t||!!e?.sendAnonDistinctId,fetchConfig:r||!!e?.fetchConfig,triggerOnRemoteConfig:i||!!e?.triggerOnRemoteConfig,waiters:[...e?.waiters??[],{resolve:o,reject:n}]}})}return this._flagsAsync({sendAnonDistinctId:t,fetchConfig:r,triggerOnRemoteConfig:i})}}onRemoteConfig(e){}maybeNotifyRemoteConfig(e,t){if(e)try{this.onRemoteConfig(t)}catch(e){this._logger.error("Error in onRemoteConfig callback:",e)}}cacheSessionReplay(e,t){let r=t?.sessionRecording;r?(this.setPersistedProperty(a.PostHogPersistedProperty.SessionReplay,r),this._logger.info(`Session replay config from ${e}: `,JSON.stringify(r))):"boolean"==typeof r&&!1===r&&(this._logger.info(`Session replay config from ${e} disabled.`),this.setPersistedProperty(a.PostHogPersistedProperty.SessionReplay,null))}async _remoteConfigAsync(){return this._remoteConfigResponsePromise=this._initPromise.then(()=>{let e=this.getPersistedProperty(a.PostHogPersistedProperty.RemoteConfig);return this._logger.info("Cached remote config: ",JSON.stringify(e)),super.getRemoteConfig().then(t=>{if(t){let r={...t};if(delete r.surveys,this._logger.info("Fetched remote config: ",JSON.stringify(r)),!1===this.disableSurveys){let e=t.surveys,r=!0;Array.isArray(e)?this._logger.info("Surveys fetched from remote config: ",JSON.stringify(e)):(this._logger.info("There are no surveys."),r=!1),r?this.setPersistedProperty(a.PostHogPersistedProperty.Surveys,e):this.setPersistedProperty(a.PostHogPersistedProperty.Surveys,null)}else this.setPersistedProperty(a.PostHogPersistedProperty.Surveys,null);this.setPersistedProperty(a.PostHogPersistedProperty.RemoteConfig,r),this.cacheSessionReplay("remote config",t);let i=!1;!1===t.hasFeatureFlags?(this.disableRemoteFeatureFlags||this.setKnownFeatureFlagDetails({flags:{}}),this._logger.warn("Remote config has no feature flags, will not load feature flags.")):!1===this.preloadFeatureFlags||this.disableRemoteFeatureFlags||(i=!0,this.flagsAsync({sendAnonDistinctId:!0,fetchConfig:!0,triggerOnRemoteConfig:!0})),t.supportedCompression?.includes(a.Compression.GZipJS)||(this.disableCompression=!0),this.maybeNotifyRemoteConfig(!i,t),e=t}return e})}).finally(()=>{this._remoteConfigResponsePromise=void 0}),this._remoteConfigResponsePromise}async _flagsAsync(e){let t=e?.sendAnonDistinctId??!0,r=e?.fetchConfig??!1,i=e?.triggerOnRemoteConfig??!1;return this._flagsResponsePromise=this._initPromise.then(async()=>{let e=this.getDistinctId(),o=this.props.$groups||{},n=this.getPersistedProperty(a.PostHogPersistedProperty.PersonProperties)||{},l=this.getPersistedProperty(a.PostHogPersistedProperty.GroupProperties)||{},u=this.getPersistedProperty(a.PostHogPersistedProperty.DeviceId),c={$anon_distinct_id:t?this.getAnonymousId():void 0,$device_id:u??void 0,...this.disableRemoteFeatureFlags?{disable_flags:!0}:{}},d=await super.getFlags(e,o,n,l,c,r);if(!d.success){this.disableRemoteFeatureFlags||this.setKnownFeatureFlagDetails({flags:this.getKnownFeatureFlagDetails()?.flags??{},requestError:d.error,minimalFlagCalledEvents:this.getStoredFlagDetails()?.minimalFlagCalledEvents});return}let p=d.response;if(p?.quotaLimited?.includes(s.QuotaLimitedFeature.FeatureFlags))return this.disableRemoteFeatureFlags||this.setKnownFeatureFlagDetails({flags:this.getKnownFeatureFlagDetails()?.flags??{},quotaLimited:p.quotaLimited,minimalFlagCalledEvents:this.getStoredFlagDetails()?.minimalFlagCalledEvents}),this._logger.warn("[FEATURE FLAGS] Feature flags quota limit exceeded. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),this.maybeNotifyRemoteConfig(i,p),p;if(p?.featureFlags){if(this.disableRemoteFeatureFlags)return this.cacheSessionReplay("flags",p),this.maybeNotifyRemoteConfig(i,p),p;let e=p;if(p.errorsWhileComputingFlags){let t=this.getKnownFeatureFlagDetails();this._logger.info("Cached feature flags: ",JSON.stringify(t));let r={};for(let e in p.flags)p.flags[e].failed||(r[e]=p.flags[e]);e={...p,flags:{...t?.flags,...r}}}this.cacheSessionReplay("flags",p),this.setKnownFeatureFlagDetails({flags:e.flags,requestId:p.requestId,evaluatedAt:p.evaluatedAt,errorsWhileComputingFlags:p.errorsWhileComputingFlags,quotaLimited:p.quotaLimited,minimalFlagCalledEvents:!0===p.minimalFlagCalledEvents}),this.setPersistedProperty(a.PostHogPersistedProperty.FlagsEndpointWasHit,!0),this.maybeNotifyRemoteConfig(i,p)}return p}).finally(()=>{this._flagsResponsePromise=void 0;
1let e=this._pendingFlagsRequest;e&&(this._pendingFlagsRequest=void 0,this._logger.info("Executing pending feature flags reload."),this.flagsAsync({sendAnonDistinctId:e.sendAnonDistinctId,fetchConfig:e.fetchConfig,triggerOnRemoteConfig:e.triggerOnRemoteConfig}).then(t=>e.waiters.forEach(e=>e.resolve(t))).catch(t=>e.waiters.forEach(e=>e.reject(t))))}),this._flagsResponsePromise}setKnownFeatureFlagDetails(e){this.wrap(()=>{this.setPersistedProperty(a.PostHogPersistedProperty.FeatureFlagDetails,e),this._events.emit("featureflags",(0,n.getFlagValuesFromFlags)(e?.flags??{}))})}getKnownFeatureFlagDetails(){let e=this.getPersistedProperty(a.PostHogPersistedProperty.FeatureFlagDetails);if(!e){let e=this.getPersistedProperty(a.PostHogPersistedProperty.FeatureFlags),t=this.getPersistedProperty(a.PostHogPersistedProperty.FeatureFlagPayloads);if(void 0===e&&void 0===t)return;return(0,n.createFlagsResponseFromFlagsAndPayloads)(e??{},t??{})}return(0,n.normalizeFlagsResponse)(e)}getStoredFlagDetails(){return this.getPersistedProperty(a.PostHogPersistedProperty.FeatureFlagDetails)}isMinimalFlagCalledEventsEnabled(){return this.getStoredFlagDetails()?.minimalFlagCalledEvents===!0}getKnownFeatureFlags(){let e=this.getKnownFeatureFlagDetails();if(e)return(0,n.getFlagValuesFromFlags)(e.flags)}getBootstrappedFeatureFlagDetails(){let e=this.getPersistedProperty(a.PostHogPersistedProperty.BootstrapFeatureFlagDetails);if(e)return e}setBootstrappedFeatureFlagDetails(e){this.setPersistedProperty(a.PostHogPersistedProperty.BootstrapFeatureFlagDetails,e)}getBootstrappedFeatureFlags(){let e=this.getBootstrappedFeatureFlagDetails();if(e)return(0,n.getFlagValuesFromFlags)(e.flags)}getBootstrappedFeatureFlagPayloads(){let e=this.getBootstrappedFeatureFlagDetails();if(e)return(0,n.getPayloadsFromFlags)(e.flags)}getFeatureFlagResult(e,t){return this._getFeatureFlagResult(e,t)}getAllFeatureFlags(){return(0,n.flagDetailsToResults)(this.getFeatureFlagDetails()?.flags??{})}_getFeatureFlagResult(e,t={}){let r=this.getStoredFlagDetails(),i=this.getFeatureFlagDetails(),o=r?.quotaLimited?.includes(s.QuotaLimitedFeature.FeatureFlags),l=i?.flags[e],u=(0,n.getFeatureFlagValue)(l);if((t.sendEvent??this.sendFeatureFlagEvent)&&!this.flagCallReported[e]?.has(u)){let t=[];if(r?.requestError){let{type:e,statusCode:i}=r.requestError;"timeout"===e?t.push(a.FeatureFlagError.TIMEOUT):"api_error"===e&&void 0!==i?t.push(a.FeatureFlagError.apiError(i)):"connection_error"===e?t.push(a.FeatureFlagError.CONNECTION_ERROR):t.push(a.FeatureFlagError.UNKNOWN_ERROR)}else r&&(r.errorsWhileComputingFlags&&t.push(a.FeatureFlagError.ERRORS_WHILE_COMPUTING),o?t.push(a.FeatureFlagError.QUOTA_LIMITED):void 0!==u||l||t.push(a.FeatureFlagError.FLAG_MISSING));let n=this.getBootstrappedFeatureFlags()?.[e],c=this.getBootstrappedFeatureFlagPayloads()?.[e],d=t.length>0?t.join(","):void 0;this.flagCallReported[e]=this.flagCallReported[e]??new Set,this.flagCallReported[e].add(u);let p={$feature_flag:e,$feature_flag_response:u,...(0,s.maybeAdd)("$feature_flag_id",l?.metadata?.id),...(0,s.maybeAdd)("$feature_flag_version",l?.metadata?.version),...(0,s.maybeAdd)("$feature_flag_reason",l?.reason?.description??l?.reason?.code),...(0,s.maybeAdd)("$feature_flag_bootstrapped_response",n),...(0,s.maybeAdd)("$feature_flag_bootstrapped_payload",c),$used_bootstrap_value:!this.getPersistedProperty(a.PostHogPersistedProperty.FlagsEndpointWasHit),...(0,s.maybeAdd)("$feature_flag_request_id",i?.requestId),...(0,s.maybeAdd)("$feature_flag_evaluated_at",i?.evaluatedAt),...(0,s.maybeAdd)("$feature_flag_error",d),...(0,s.maybeAdd)("$feature_flag_has_experiment",l?.metadata?.has_experiment)};this.capture("$feature_flag_called",p)}if(void 0===u)switch(t.missingFlagBehavior){case"getFeatureFlagPayload":return i?{key:e,enabled:!1,payload:null}:void 0;
1case"getFeatureFlag":return i&&Object.keys(i.flags).length?{key:e,enabled:!1,payload:null}:void 0;case void 0:return}let c=l?.metadata?.payload,d=void 0!==c?(0,n.parsePayload)(c):null;return{key:e,enabled:(0,n.getEnabledFromValue)(u),variant:(0,n.getVariantFromValue)(u),payload:d}}getFeatureFlag(e,t){let r=this._getFeatureFlagResult(e,{missingFlagBehavior:"getFeatureFlag",sendEvent:t?.sendEvent});return r?.variant??r?.enabled}getFeatureFlagPayload(e){let t=this._getFeatureFlagResult(e,{missingFlagBehavior:"getFeatureFlagPayload",sendEvent:!1});return t?.payload}getFeatureFlagPayloads(){return this.getFeatureFlagDetails()?.featureFlagPayloads}getFeatureFlags(){return this.getFeatureFlagDetails()?.featureFlags}getFeatureFlagDetails(){let e=this.getKnownFeatureFlagDetails(),t=this.getPersistedProperty(a.PostHogPersistedProperty.OverrideFeatureFlags);if(!t)return e;let r={...(e=e??{featureFlags:{},featureFlagPayloads:{},flags:{}}).flags??{}};for(let e in t)t[e]?r[e]=(0,n.updateFlagValue)(r[e],t[e]):delete r[e];let i={...e,flags:r};return(0,n.normalizeFlagsResponse)(i)}getFeatureFlagsAndPayloads(){return{flags:this.getFeatureFlags(),payloads:this.getFeatureFlagPayloads()}}isFeatureEnabled(e,t){if(t?.defaultValue===void 0){let r=this.getFeatureFlag(e,t);return void 0===r?void 0:!!r}let r=this._getFeatureFlagResult(e,{sendEvent:t.sendEvent}),i=r?.variant??r?.enabled;return void 0===i?t.defaultValue:!!i}reloadFeatureFlags(e){this.disableRemoteFeatureFlags&&!this.disabled?this._initPromise.then(()=>e?.cb?.(void 0,this.getFeatureFlags())):this.flagsAsync({sendAnonDistinctId:!0}).then(t=>{e?.cb?.(void 0,t?.featureFlags)}).catch(t=>{e?.cb?.(t,void 0),e?.cb||this._logger.info("Error reloading feature flags",t)})}async reloadRemoteConfigAsync(){return await this.remoteConfigAsync()}async reloadFeatureFlagsAsync(e){return this.disableRemoteFeatureFlags&&!this.disabled?(await this._initPromise,this.getFeatureFlags()):(await this.flagsAsync({sendAnonDistinctId:e}))?.featureFlags}onFeatureFlags(e){return this.on("featureflags",async()=>{let t=this.getFeatureFlags();t&&e(t)})}onFeatureFlag(e,t){return this.on("featureflags",async()=>{let r=this.getFeatureFlag(e);void 0!==r&&t(r)})}async overrideFeatureFlag(e){this.wrap(()=>null===e?this.setPersistedProperty(a.PostHogPersistedProperty.OverrideFeatureFlags,null):this.setPersistedProperty(a.PostHogPersistedProperty.OverrideFeatureFlags,e))}updateFlags(e,t,r){this.wrap(()=>{let i=r?.merge?this.getKnownFeatureFlagDetails()?.flags:void 0,o=i?(0,n.getFlagValuesFromFlags)(i):{},a={};for(let e in i){let t=i[e].metadata?.payload;void 0!==t&&(a[e]=(0,n.parsePayload)(t))}let s={...o,...e},l={...a,...t??{}},u={};for(let[e,t]of Object.entries(s)){let r,i=l[e];if(void 0!==i)try{r=JSON.stringify(i)}catch(t){this._logger.error(`updateFlags: could not serialize the payload for flag "${e}", dropping it.`,t)}u[e]={key:e,enabled:(0,n.getEnabledFromValue)(t),variant:(0,n.getVariantFromValue)(t),reason:void 0,metadata:{id:void 0,version:void 0,description:void 0,payload:r}}}this.setKnownFeatureFlagDetails({flags:u})})}captureException(e,t,r){try{let i=this.getErrorPropertiesBuilder().buildFromUnknown(e,r);this.capture("$exception",{...i,...t},{_originatedFromCaptureException:!0})}catch(e){this._logger.error("Error while capturing $exception:",e)}}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_feedback_text:t,$ai_trace_id:String(e)})}captureTraceMetric(e,t,r){this.capture("$ai_metric",{$ai_metric_name:t,$ai_metric_value:String(r),$ai_trace_id:String(e)})}_isIdentified(){let e=this.getPersistedProperty(a.PostHogPersistedProperty.PersonMode);if("identified"===e)return!0;if(void 0===e){let e=this.getPersistedProperty(a.PostHogPersistedProperty.DistinctId),t=this.getPersistedProperty(a.PostHogPersistedProperty.AnonymousId);if(e&&t&&e!==t)return!0}return!1}_getGroups(){return this.props.$groups||{}}_hasPersonProcessing(){if("always"===this._personProfiles)return!0;if("never"===this._personProfiles)return!1;let e=this._isIdentified(),t=Object.keys(this._getGroups()).length>0,r=!0===this.getPersistedProperty(a.PostHogPersistedProperty.EnablePersonProcessing);return e||t||r}_requirePersonProcessing(e){return"never"===this._personProfiles?(this._logger.error(`${e} was called, but personProfiles is set to "never". This call will be ignored.`),!1):(this.setPersistedProperty(a.PostHogPersistedProperty.EnablePersonProcessing,!0),!0)}createPersonProfile(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.capture("$set",{$set:{},$set_once:{}})}setPersonProperties(e,t,r=!0){this.wrap(()=>{let i=(0,u.isNullish)(e)||(0,u.isEmptyObject)(e),o=(0,u.isNullish)(t)||(0,u.isEmptyObject)(t);
1if(i&&o||!this._requirePersonProcessing("posthog.setPersonProperties"))return;let n=(0,u.getPersonPropertiesHash)(this.getDistinctId(),e,t);this._cachedPersonProperties===n?this._logger.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored."):(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},r),this.capture("$set",{$set:e||{},$set_once:t||{}}),this._cachedPersonProperties=n)})}unsetPersonProperties(e,t=!0){this.wrap(()=>{let r=((0,u.isArray)(e)?e:[e]).filter(e=>(0,u.isString)(e)&&e.length>0);if(0===r.length||!this._requirePersonProcessing("posthog.unsetPersonProperties"))return;let i={...this.getPersistedProperty(a.PostHogPersistedProperty.PersonProperties)||{}};for(let e of r)delete i[e];this.setPersistedProperty(a.PostHogPersistedProperty.PersonProperties,i),t&&this.reloadFeatureFlags(),this.capture("$set",{$unset:r}),this._cachedPersonProperties=null})}processBeforeEnqueue(e){if(!this._beforeSend)return e;let t=e.timestamp,r=e.properties||{},i={uuid:e.uuid,event:e.event,properties:r,$set:r.$set,$set_once:r.$set_once,timestamp:"string"==typeof t?new Date(t):t},o=this._runBeforeSend(i);if(!o)return null;let n={...o.properties??r};return void 0!==o.$set?n.$set=o.$set:delete n.$set,void 0!==o.$set_once?n.$set_once=o.$set_once:delete n.$set_once,{...e,uuid:(0,u.getEventUuid)(o.uuid??e.uuid,l.uuidv7),event:o.event,properties:n,timestamp:o.timestamp}}_runBeforeSend(e){let t=this._beforeSend;if(!t)return e;let r=Array.isArray(t)?t:[t],i=e;for(let t of r)try{if(!(i=t(i)))return this._logger.info(`Event '${e.event}' was rejected in before_send function`),null}catch(t){return this._logger.error(`Error in before_send function for event '${e.event}':`,t),null}return i}}for(var d in r.PostHogCore=o.PostHogCore,o)-1===["PostHogCore"].indexOf(d)&&(r[d]=o[d]);Object.defineProperty(r,"__esModule",{value:!0})},26182,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{getLengthFromRules:()=>s,getRequirementsHint:()=>l,getValidationError:()=>a});let n=e.r(699960);function a(e,t,r){let i=e.trim();if(!r&&""===i)return"This field is required";if(""===i)return!1;if(t&&t.length>0)for(let e of t)switch(e.type){case n.SurveyValidationType.MinLength:if(void 0!==e.value&&i.length<e.value)return e.errorMessage??`Please enter at least ${e.value} characters`;break;case n.SurveyValidationType.MaxLength:if(void 0!==e.value&&i.length>e.value)return e.errorMessage??`Please enter no more than ${e.value} characters`}return!1}function s(e,t){if(!e)return;let r=e.find(e=>e.type===t);return r?.value}function l(e,t){let r=1===e?void 0:e;return r&&t?`Enter ${r}-${t} characters`:r?`Enter at least ${r} ${1===r?"character":"characters"}`:t?`Maximum ${t} ${1===t?"character":"characters"}`:void 0}for(var u in r.getLengthFromRules=o.getLengthFromRules,r.getRequirementsHint=o.getRequirementsHint,r.getValidationError=o.getValidationError,o)-1===["getLengthFromRules","getRequirementsHint","getValidationError"].indexOf(u)&&(r[u]=o[u]);Object.defineProperty(r,"__esModule",{value:!0})},453668,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{resolveTracesConfig:()=>l});let n=e.r(875607);function a(e,t){return"number"==typeof e&&Number.isInteger(e)&&e>=1?e:t}let s=["service.name","service.version","deployment.environment"];function l(e,t,r){let i=(0,n.assignUserAttributes)({...t},function(e){if(!(!e||"object"!=typeof e||Array.isArray(e)))try{if
1(s.every(t=>!(t in e)||"string"==typeof e[t]))return e;let t={...e};for(let e of s)e in t&&"string"!=typeof t[e]&&delete t[e];return t}catch{return}}(e?.resourceAttributes)),o=a(e?.maxExportBatchSize,512);return{serviceName:i?.["service.name"]??e?.serviceName,serviceVersion:i?.["service.version"]??e?.serviceVersion,environment:i?.["deployment.environment"]??e?.environment,resourceAttributes:i,beforeSpanSend:function(e,t){if(!e)return[];let r=[e].flat().filter(e=>!!e),i=r.filter(e=>"function"==typeof e);return i.length!==r.length&&t?.critical(`beforeSpanSend: ignoring ${r.length-i.length} of ${r.length} entries that are not functions. Spans export without them, so whatever they were redacting is not redacted.`),i}(e?.beforeSpanSend,r),maxAttributesPerSpan:a(e?.maxAttributesPerSpan,128),maxEventsPerSpan:a(e?.maxEventsPerSpan,128),maxAttributesPerEvent:128,maxAttributeValueLength:a(e?.maxAttributeValueLength,8192),flushIntervalMs:a(e?.flushIntervalMs,5e3),maxExportBatchSize:o,maxQueueSize:Math.max(a(e?.maxQueueSize,2048),o),maxLiveSpans:a(e?.maxLiveSpans,1e4),maxSpanAgeMs:a(e?.maxSpanAgeMs,36e5)}}for(var u in r.resolveTracesConfig=o.resolveTracesConfig,o)-1===["resolveTracesConfig"].indexOf(u)&&(r[u]=o[u]);Object.defineProperty(r,"__esModule",{value:!0})},589526,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);class n{active(){return this._active}with(e,t){let r=this._active;this._active=e;try{return t()}finally{this._active=r}}}for(var a in i.d(o,{SyncSpanContextManager:()=>n}),r.SyncSpanContextManager=o.SyncSpanContextManager,o)-1===["SyncSpanContextManager"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},822584,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n="0".repeat(32),a="0".repeat(16),s=/^[0-9a-f]+$/;function l(e){let t=new Uint8Array(e),r=globalThis.crypto;if(r&&"function"==typeof r.getRandomValues)try{return r.getRandomValues(t),t}catch{}for(let r=0;r<e;r++)t[r]=Math.floor(256*Math.random());return t}function u(e){let t=function(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}(l(e));return/[^0]/.test(t)?t:t.slice(0,-1)+"1"}function c(){return u(16)}function d(){return u(8)}function p(e,t,r){return"string"==typeof e&&e.length===t&&e!==r&&s.test(e)}function f(e){return p(e,32,n)}function h(e){return p(e,16,a)}for(var g in i.d(o,{getRandomBytes:()=>l,isValidSpanId:()=>h,isValidTraceId:()=>f,newSpanId:()=>d,newTraceId:()=>c}),r.getRandomBytes=o.getRandomBytes,r.isValidSpanId=o.isValidSpanId,r.isValidTraceId=o.isValidTraceId,r.newSpanId=o.newSpanId,r.newTraceId=o.newTraceId,o)-1===["getRandomBytes","isValidSpanId","isValidTraceId","newSpanId","newTraceId"].indexOf(g)&&(r[g]=o[g]);Object.defineProperty(r,"__esModule",{value:!0})},607102,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{TRACE_FLAGS_SAMPLED:()=>d,formatTraceparent:()=>f,normalizeTraceparent:()=>u,parseTraceparent:()=>s,sanitizeTracestate:()=>h,traceparentHeader:()=>c});let n=e.r(822584),a=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;function s(e){let t=l(e);return t&&{traceId:t.traceId,spanId:t.spanId,flags:1&parseInt(t.flags,16)?d:p}}function l(e){if("string"!=typeof e)return;let t=a.exec(e.trim());if(!t)return;let[,r,i,o,s,l]=t;if("ff"!==r&&("00"!==r||!l)&&(0,n.isValidTraceId)(i)&&(0,n.isValidSpanId)(o))return{version:r,traceId:i,spanId:o,flags:s}}function u(e){return l(e)&&e.trim()}function c(e){return Array.isArray(e)&&1===e.length?e[0]:e}let d="01",p="00";function f(e,t,r=d){return`00-${e}-${t}-${r}`}function h(e){if("string"!=typeof e)return;let t=e.trim();if(!t||/[^\x20-\x7e\t]/.test(t))return;let r=t.split(",");if(!(r.length>32)){for(let e of r)if(e.trim()&&!e.includes("="))return;return t.length<=512?t:function(e){let t=[...e],r=()=>t.reduce((e,t)=>
1e+t.length,0)+t.length-1;for(let e=t.length-1;e>=0&&r()>512;e--)t[e].length>128&&t.splice(e,1);for(;t.length&&r()>512;)t.pop();return t.length?t.join(","):void 0}(r)}}for(var g in r.TRACE_FLAGS_SAMPLED=o.TRACE_FLAGS_SAMPLED,r.formatTraceparent=o.formatTraceparent,r.normalizeTraceparent=o.normalizeTraceparent,r.parseTraceparent=o.parseTraceparent,r.sanitizeTracestate=o.sanitizeTracestate,r.traceparentHeader=o.traceparentHeader,o)-1===["TRACE_FLAGS_SAMPLED","formatTraceparent","normalizeTraceparent","parseTraceparent","sanitizeTracestate","traceparentHeader"].indexOf(g)&&(r[g]=o[g]);Object.defineProperty(r,"__esModule",{value:!0})},263690,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n="unknown";function a(e,t,r,i){return"string"==typeof e&&e.trim()?e.length>r?e.slice(0,r):e:(i?.debug(`${t} must be a non-empty string; using "${n}"`),n)}function s(e){if(null==e)return;let t=e;if(e instanceof Date)try{t=e.getTime()}catch{return}if("number"==typeof t&&Number.isFinite(t)&&!(t<0)&&!(t>0x8637bd05af6))return t}function l(e,t,r){let i=s(e);return void 0===i?(void 0!==e&&r?.debug("Span startTime is out of range or not a valid time; using the current time"),t):(t-i>864e5?r?.debug("Span startTime is more than 24 hours in the past; the server will clamp it to receive time and keep the original in $originalTimestamp"):i>t&&r?.debug("Span startTime is in the future; the span may export with a zero duration"),i)}function u(e,t){return e<t?t:e}function c(e,t,r,i){let o=s(e);return void 0===o?(void 0!==e&&i?.debug(`Span ${r} is out of range or not a valid time; using the derived time`),t):o}for(var d in i.d(o,{clampEndTime:()=>u,resolveStartTime:()=>l,resolveSuppliedTime:()=>c,sanitizeName:()=>a,toEpochMs:()=>s}),r.clampEndTime=o.clampEndTime,r.resolveStartTime=o.resolveStartTime,r.resolveSuppliedTime=o.resolveSuppliedTime,r.sanitizeName=o.sanitizeName,r.toEpochMs=o.toEpochMs,o)-1===["clampEndTime","resolveStartTime","resolveSuppliedTime","sanitizeName","toEpochMs"].indexOf(d)&&(r[d]=o[d]);Object.defineProperty(r,"__esModule",{value:!0})},443343,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{NOOP_SPAN:()=>g,NoopSpan:()=>h,PassThroughSpan:()=>y,PostHogSpan:()=>c,applySpanLimits:()=>f,describeError:()=>O,inertSpan:()=>_,monotonicNow:()=>u,nonNegativeCount:()=>p,runWithActiveSpan:()=>E,truncateAttributeValue:()=>b,truncateAttributes:()=>P});let n=e.r(607102),a=e.r(263690),s=e.r(856658),l=e.r(875607);function u(){let e=globalThis.performance;return"function"==typeof e?.now?e.now():void 0}class c{constructor(e,t,r){for(const i of(this._onEnd=t,this._logger=r,this._events=[],this._ended=!1,this._userAttributeCount=0,this._userEventCount=0,this._droppedAttributes=0,this._droppedEvents=0,this._traceId=e.traceId,this._spanId=e.spanId,this._parentSpanId=e.parentSpanId,this._traceState=e.traceState,this._traceFlags=e.traceFlags??n.TRACE_FLAGS_SAMPLED,this._parentIsRemote=e.parentIsRemote??!1,this._name=e.name,this._kind=e.kind,this._autoKeys=new Set(e.autoAttributeKeys),this._maxAttributes=e.maxAttributes,this._maxEvents=e.maxEvents,this._maxAttributesPerEvent=e.maxAttributesPerEvent,this._maxAttributeValueLength=e.maxAttributeValueLength,this._attributes=Object.create(null),Object.keys(e.attributes)))this._writeAttribute(i,e.attributes[i]);this._startMono=e.backdated?void 0:u(),this._startTime=e.clockAnchor&&void 0!==this._startMono?e.clockAnchor.wall+(this._startMono-e.clockAnchor.mono):e.startTime,void 0!==this._startMono&&(this._clockAnchor=e.clockAnchor??{wall:this._startTime,mono:this._startMono})}_now(){if(void 0!==this._startMono){let e=u();if(void 0!==e)return this._startTime+Math.max(0,e-this._startMono)}return Date.now()}_mutable(e){return!this._ended||(this._logger?.debug(`Ignoring ${e} on a span that has already ended`),!1)}_writeAttribute(e,t){if((0,s.isNullish)(t)){e in this._attributes&&!this._autoKeys.has(e)&&this._userAttributeCount--,delete this._attributes[e];return}if(!this._autoKeys.has(e)&&!(e in this._attributes)){if(this._userAttributeCount>=this._maxAttributes)return void this._droppedAttributes++;this._userAttributeCount++}this._attributes[e]=b(t,this._maxAttributeValueLength)}setAttribute(e,t){return this._mutable("setAttribute")&&this._writeAttribute(e,t),this}setAttributes(e){if(this._mutable("setAttributes")){let t=(0,l.assignUserAttributes)({},e);for(let e of Object.keys(t))this._writeAttribute(e,t[e])}return this}addEvent(e,t,r){if(this._mutable("addEvent")){if(this._userEventC
1ount>=this._maxEvents)return this._droppedEvents++,this;this._userEventCount++;let i=t&&S(t,this._maxAttributesPerEvent,this._maxAttributeValueLength);this._events.push({name:(0,a.sanitizeName)(e,"Span event name",this._maxAttributeValueLength,this._logger),timestamp:(0,a.resolveSuppliedTime)(r,this._now(),"event timestamp",this._logger),...i&&{attributes:i.attributes,...i.dropped&&{droppedAttributesCount:i.dropped}}})}return this}setStatus(e,t){if(this._mutable("setStatus")){if("ok"!==e&&"error"!==e)return this._logger?.debug(`Ignoring unknown span status "${String(e)}"; expected "ok" or "error"`),this;this._status={code:e,...t&&{message:v(t,this._maxAttributeValueLength)}}}return this}get statusIsExplicitlyOk(){return this._status?.code==="ok"}recordException(e){if(!this._mutable("recordException"))return this;let{type:t,message:r,stack:i}=O(e);return this.addEvent(d,{"exception.type":t,"exception.message":r,...i&&{"exception.stacktrace":i}}),this.setStatus("error",r)}updateName(e){return this._mutable("updateName")&&(this._name=(0,a.sanitizeName)(e,"Span name",this._maxAttributeValueLength,this._logger)),this}traceparent(){return(0,n.formatTraceparent)(this._traceId,this._spanId,this._traceFlags)}tracestate(){return this._traceState??null}childContext(){return{traceId:this._traceId,parentSpanId:this._spanId,traceState:this._traceState,traceFlags:this._traceFlags,clockAnchor:this._clockAnchor}}end(e){if(this._ended)return void this._logger?.debug("Ignoring end() on a span that has already ended");this._ended=!0;let t=this._now(),r=(0,a.resolveSuppliedTime)(e,t,"end time",this._logger);this._onEnd({traceId:this._traceId,spanId:this._spanId,...this._parentSpanId&&{parentSpanId:this._parentSpanId},...this._traceState&&{traceState:this._traceState},traceFlags:this._traceFlags,parentIsRemote:this._parentIsRemote,name:this._name,kind:this._kind,...this._status&&{status:this._status},attributes:{...this._attributes},events:this._events,startTime:this._startTime,endTime:(0,a.clampEndTime)(r,this._startTime),...this._droppedAttributes&&{droppedAttributesCount:this._droppedAttributes},...this._droppedEvents&&{droppedEventsCount:this._droppedEvents}},this._autoKeys)}}let d="exception";function p(e){return"number"!=typeof e||!Number.isFinite(e)||e<=0?0:Math.min(Math.floor(e),0xffffffff)}function f(e,t,r,i,o,n,a=[]){let u=0,c=0,d={};for(let i of function(e,t){if(!t.length)return Object.keys(e);let r=t.filter(t=>Object.prototype.propertyIsEnumerable.call(e,t)),i=new Set(r);return[...r,...Object.keys(e).filter(e=>!i.has(e))]}(e.attributes,a)){let o=e.attributes[i];if(!(0,s.isNullish)(o)){if(!t.has(i)){if(u>=r){c++;continue}u++}Object.defineProperty(d,i,{value:b(o,n),enumerable:!0,writable:!0,configurable:!0})}}e.attributes=d,c&&(e.droppedAttributesCount=p(e.droppedAttributesCount)+c);let h=0,g=0,y=[];for(let t of e.events){if(h>=i){g++;continue}if(h++,t.attributes){let e=S(t.attributes,o,n);t.attributes=e.attributes,e.dropped&&(t.droppedAttributesCount=p(t.droppedAttributesCount)+e.dropped)}y.push(t)}e.events=y,g&&(e.droppedEventsCount=p(e.droppedEventsCount)+g),e.status?.message&&(e.status={...e.status,message:v(function(e){try{return"string"==typeof e?e:String(e)}catch{return l.UNSERIALIZABLE_VALUE}}(e.status.message),n)})}class h{setAttribute(){return this}setAttributes(){return this}addEvent(){return this}setStatus(){return this}recordException(){return this}updateName(){return this}traceparent(){return null}tracestate(){return null}end(){}}let g=new h;class y extends h{constructor(e,t){super(),this._traceparent=e,this._tracestate=t}traceparent(){return this._traceparent}tracestate(){return this._tracestate??null}}function _(e,t){let r=(0,n.traceparentHeader)(e?.parent)??t,i="string"==typeof r||null==r?r:m(r,"traceparent"),o=(0,n.normalizeTraceparent)(i);if(!o)return g;let a="string"==typeof r||null==r?e?.tracestate:m(r,"tracestate");return new y(o,(0,n.sanitizeTracestate)(a))}function m(e,t){try{let r=e[t];return"function"==typeof r?r.call(e):void 0}catch{return}}function v(e,t){return e.length>t?e.slice(0,t):e}function b(e,t){return function e(t,r,i,o){if(null===t||"object"!=typeof t)return(0,s.isNullish)(t)||i.remainingNodes<=0?t:(i.remainingNodes--,"string"==typeof t?v(t,r):t);if(i.ancestors.has(t))return l.CIRCULAR_VALUE;if(i.remainingNodes<=0||o>=l.MAX_JSON_SAFE_VALUE_DEPTH)return t;i.remainingNodes--,i.ancestors.add(t);try{if(t instanceof Date)return t;let n=function(e){try{let t=e.toJSON;if("function"==typeof t)return{selfDescribed:!0,value:t.call(e)}}catch{}return{selfDescribed:!1}}(t);
1if(n.selfDescribed)return(0,s.isNullish)(n.value)?String(n.value):e(n.value,r,i,o+1);if((0,s.isArray)(t)){let n=Math.min(t.length,l.MAX_JSON_SAFE_VALUE_ITEMS),a=[];for(let s=0;s<n;s++)try{a.push(e(t[s],r,i,o+1))}catch{a.push(l.UNSERIALIZABLE_VALUE)}return t.length>n&&(a.length=t.length),a}let a={},u=0;for(let n of Object.keys(t)){let c;if(u>=l.MAX_JSON_SAFE_VALUE_ITEMS)break;try{c=e(t[n],r,i,o+1)}catch{c=l.UNSERIALIZABLE_VALUE}n&&!(0,s.isNullish)(c)&&u++,Object.defineProperty(a,n,{value:c,enumerable:!0,writable:!0,configurable:!0})}return a}catch{return t}finally{i.ancestors.delete(t)}}(e,t,{ancestors:new WeakSet,remainingNodes:l.MAX_JSON_SAFE_VALUE_NODES},0)}function S(e,t,r){let i;try{i=Object.keys(e)}catch{return{attributes:{},dropped:0}}let o={},n=0,a=0;for(let u of i){let i;if(n>=t){a++;continue}try{i=b(e[u],r)}catch{i=l.UNSERIALIZABLE_VALUE}(0,s.isNullish)(i)||(n++,Object.defineProperty(o,u,{value:i,enumerable:!0,writable:!0,configurable:!0}))}return{attributes:o,dropped:a}}function P(e,t){for(let r of Object.keys(e))e[r]=b(e[r],t);return e}function E(e,t,r){return t===g?r(t):e.with(t,()=>r(t))}function O(e){try{let t=function(e){try{let t=e.stack;return"string"==typeof t&&t?{stack:t}:{}}catch{return{}}}(e);if((0,s.isError)(e))return{type:e.name||"Error",message:e.message||"",...t};if("string"==typeof e)return{type:"string",message:e};if(e&&"object"==typeof e&&"string"==typeof e.message)return{type:"string"==typeof e.name?e.name:"Object",message:e.message,...t};return{type:typeof e,message:String(e)}}catch{return{type:typeof e,message:""}}}for(var F in r.NOOP_SPAN=o.NOOP_SPAN,r.NoopSpan=o.NoopSpan,r.PassThroughSpan=o.PassThroughSpan,r.PostHogSpan=o.PostHogSpan,r.applySpanLimits=o.applySpanLimits,r.describeError=o.describeError,r.inertSpan=o.inertSpan,r.monotonicNow=o.monotonicNow,r.nonNegativeCount=o.nonNegativeCount,r.runWithActiveSpan=o.runWithActiveSpan,r.truncateAttributeValue=o.truncateAttributeValue,r.truncateAttributes=o.truncateAttributes,o)-1===["NOOP_SPAN","NoopSpan","PassThroughSpan","PostHogSpan","applySpanLimits","describeError","inertSpan","monotonicNow","nonNegativeCount","runWithActiveSpan","truncateAttributeValue","truncateAttributes"].indexOf(F)&&(r[F]=o[F]);Object.defineProperty(r,"__esModule",{value:!0})},852207,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{buildOtlpSpan:()=>h,buildOtlpTracesPayload:()=>y,buildTracesResourceAttributes:()=>g,msToUnixNanoString:()=>f,spanKindToOtlp:()=>p});let n=e.r(443343),a=e.r(706150),s=e.r(875607),l=e.r(693710),u={internal:1,server:2,client:3,producer:4,consumer:5},c={ok:1,error:2};function d(e){if("string"==typeof e)return(0,s.sanitizeString)(e);try{return(0,s.sanitizeString)(String(e))}catch{return s.UNSERIALIZABLE_VALUE}}function p(e){return e&&Object.prototype.hasOwnProperty.call(u,e)?u[e]:u.internal}function f(e){let t=Math.floor(e),r=Math.round((e-t)*1e6);return r>=1e6&&(t+=1,r=0),String(t)+String(r).padStart(6,"0")}function h(e,t){let r,i={traceId:e.traceId,spanId:e.spanId,name:d(e.name),kind:p(e.kind),startTimeUnixNano:f(e.startTime),endTimeUnixNano:f(e.endTime),flags:(Number.isFinite(r=parseInt(e.traceFlags,16))?255&r:1)|256|512*!!e.parentIsRemote};e.parentSpanId&&(i.parentSpanId=e.parentSpanId),e.traceState&&(i.traceState=d(e.traceState));let o=(0,a.toOtlpKeyValueList)(e.attributes,t);o.length&&(i.attributes=o),e.events.length&&(i.events=e.events.map(e=>(function(e,t){let r={name:d(e.name),timeUnixNano:f(e.timestamp)};if(e.attributes){let i=(0,a.toOtlpKeyValueList)(e.attributes,t);i.length&&(r.attributes=i)}let i=(0,n.nonNegativeCount)(e.droppedAttributesCount);return i&&(r.droppedAttributesCount=i),r})(e,t)));let s=(0,n.nonNegativeCount)(e.droppedAttributesCount);s&&(i.droppedAttributesCount=s);let l=(0,n.nonNegativeCount)(e.droppedEventsCount);return l&&(i.droppedEventsCount=l),e.status&&(i.status={code:c[e.status.code],...e.status.message&&{message:d(e.status.message)}}),i}
1function g(e,t,r){return(0,l.buildOtlpResourceAttributes)(e,t,r)}function y(e,t,r,i,o){return{resourceSpans:[{resource:{attributes:(0,l.toOtlpResourceKeyValueList)(t,o)},scopeSpans:[{scope:{name:r,version:i},spans:e}]}]}}for(var _ in r.buildOtlpSpan=o.buildOtlpSpan,r.buildOtlpTracesPayload=o.buildOtlpTracesPayload,r.buildTracesResourceAttributes=o.buildTracesResourceAttributes,r.msToUnixNanoString=o.msToUnixNanoString,r.spanKindToOtlp=o.spanKindToOtlp,o)-1===["buildOtlpSpan","buildOtlpTracesPayload","buildTracesResourceAttributes","msToUnixNanoString","spanKindToOtlp"].indexOf(_)&&(r[_]=o[_]);Object.defineProperty(r,"__esModule",{value:!0})},748849,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PostHogTraces:()=>v});let n=e.r(443343),a=e.r(822584),s=e.r(607102),l=e.r(263690),u=e.r(875607),c=e.r(852207),d=e.r(856658),p=e.r(158636),f=e.r(183570),h=e.r(377499);function g(){return(0,n.monotonicNow)()??Date.now()}function y(e){try{return e instanceof n.PostHogSpan}catch{return!1}}function _(e,t){let r=(0,s.parseTraceparent)(e);if(r)return{traceId:r.traceId,parentSpanId:r.spanId,traceState:(0,s.sanitizeTracestate)(t),traceFlags:r.flags,isRemote:!0}}function m(e,t,r){e[t]!==r&&(e[t]=r)}class v{constructor(e,t,r,i,o,n){this._instance=e,this._config=t,this._logger=r,this._getContext=i,this._contextManager=o,this._onSpanQueued=n,this._queue=[],this._flushTimer=new p.FlushTimer(()=>this._flushInBackground()),this._flushPromise=null,this._droppedSinceWarning=0,this._lastDropWarningAt=0,this._dropReasons=new Set,this._consecutiveFlushFailures=0,this._flushJitter=h.NO_JITTER,this._retryAfter=new f.RetryAfterWindow,this._headBatchFailures=0,this._headBatchSize=0,this._headBatchChargeableAt=0,this._generation=0,this._liveSpans=new Map,this._maxExportBatchSize=t.maxExportBatchSize}startSpan(e,t){if(this._instance.isDisabled||this._instance.optedOut)return(0,n.inertSpan)(t,this._contextManager.active());let r=(0,s.traceparentHeader)(t?.parent);if(r&&"string"!=typeof r&&!y(r)){if(function(e){try{return"function"==typeof e.traceparent}catch{return!1}}(r))return this._logger.debug("Span parent is not a span from this SDK; returning an inert span"),(0,n.inertSpan)(t,this._contextManager.active());this._logger.debug("Ignoring an unusable span parent")}let i=this._resolveParent(r,t);if(this._evictAgedSpans(),this._liveSpans.size>=this._config.maxLiveSpans)return this._recordDrop(1,`the live-span limit (${this._config.maxLiveSpans}) was reached — spans are being started and never ended`),(0,n.inertSpan)(t,this._contextManager.active());let o=Date.now(),c=(0,l.resolveStartTime)(t?.startTime,o,this._logger),d=(0,a.newSpanId)();this._liveSpans.set(d,g());let p=this._autoContextAttributes();return new n.PostHogSpan({traceId:i?.traceId??(0,a.newTraceId)(),spanId:d,parentSpanId:i?.parentSpanId,traceState:i?.traceState,traceFlags:i?.traceFlags,parentIsRemote:i?.isRemote,name:(0,l.sanitizeName)(e,"Span name",this._config.maxAttributeValueLength,this._logger),kind:t?.kind??"internal",attributes:(0,u.assignUserAttributes)({...p},t?.attributes),autoAttributeKeys:Object.keys(p),maxAttributes:this._config.maxAttributesPerSpan,maxEvents:this._config.maxEventsPerSpan,maxAttributesPerEvent:this._config.maxAttributesPerEvent,maxAttributeValueLength:this._config.maxAttributeValueLength,startTime:c,backdated:c!==o,clockAnchor:void 0===(0,l.toEpochMs)(t?.startTime)?i?.clockAnchor:void 0},(e,t)=>this._onSpanEnd(e,t),this._logger)}withSpan(e,t,r){let i=this.startSpan(e,"function"==typeof t?void 0:t);try{let e=(0,n.runWithActiveSpan)(this._contextManager,i,"function"==typeof t?t:r);if((0,d.isPromise)(e))return e.then(e=>(i.end(),e),e=>{throw this._recordCallbackError(i,e),i.end(),e});return i.end(),e}catch(e){throw this._recordCallbackError(i,e),i.end(),e}}getActiveSpan(){return this._contextManager.active()??null}get throttled(){return this._retryAfter.isOpen()}async flush(){for(;;){if(!this._queue.length)return;let e=this._flushPromise;
1if(!await (e??this._startFlush()))return}}_startFlush(){this._flushTimer.clear();let e=this._generation,t=Promise.resolve().then(()=>e===this._generation?this._flushInner():0).finally(()=>{this._flushPromise===t&&(this._flushPromise=null),this._armFlushTimerIfQueuedNoEarlierThan()});return this._flushPromise=t,t}reset(){this._flushTimer.clear(),this._queue.length&&this._logger.critical(`Discarding ${this._queue.length} span(s) that were still queued when tracing was shut down. Raise the shutdown timeout or flush earlier if they matter.`),this._queue=[],this._liveSpans.clear(),this._flushPromise=null,this._generation++,this._maxExportBatchSize=this._config.maxExportBatchSize,this._droppedSinceWarning=0,this._dropReasons.clear(),this._lastDropWarningAt=0,this._consecutiveFlushFailures=0,this._flushJitter=h.NO_JITTER,this._retryAfter.reset(),this._resetHeadBatchBudget()}_resetHeadBatchBudget(){this._headBatchFailures=0,this._headBatchChargeableAt=0}_resolveParent(e,t){if("string"==typeof e){let r=_(e,t?.tracestate);return r||this._logger.debug("Ignoring malformed traceparent; starting a new trace"),r}if(y(e))return e.childContext();let r=this._contextManager.active();return y(r)?r.childContext():r instanceof n.PassThroughSpan?_(r.traceparent(),r.tracestate()??void 0):void 0}_autoContextAttributes(){let e;try{e=this._getContext()}catch(e){return this._logger.debug("Failed to read tracing context; span will carry no PostHog attributes",e),{}}let t={};return e.distinctId&&(t.posthogDistinctId=e.distinctId),e.sessionId&&(t.sessionId=e.sessionId),e.currentUrl&&(t["url.full"]=e.currentUrl),e.screenName&&(t["screen.name"]=e.screenName),e.appState&&(t["app.state"]=e.appState),t}_recordCallbackError(e,t){if(!(e instanceof n.PostHogSpan))return;let{type:r,message:i,stack:o}=(0,n.describeError)(t);e.addEvent("exception",{"exception.type":r,"exception.message":i,...o&&{"exception.stacktrace":o}}),e.statusIsExplicitlyOk||e.setStatus("error",i)}_evictAgedSpans(){let e=g()-this._config.maxSpanAgeMs,t=0;for(let[r,i]of this._liveSpans){if(i>e)break;this._liveSpans.delete(r),t++}t&&this._recordDrop(t,`they were still live after ${this._config.maxSpanAgeMs}ms`)}_onSpanEnd(e,t){if(!this._liveSpans.delete(e.spanId))return;if(this._instance.isDisabled||this._instance.optedOut)return void this._recordDrop(1,"the user has opted out");let r=this._runBeforeSpanSend(e,t);if(r){if(this._reportLimitDrops(r),this._queue.length>=this._config.maxQueueSize)return void this._recordDrop(1,`the queue is full (${this._config.maxQueueSize}) — raise the flush frequency or reduce span volume`);this._queue.push(r);try{this._onSpanQueued?.()}catch(e){this._logger.debug("Span queue notification failed",e)}!(this._queue.length>=this._maxExportBatchSize)||this._consecutiveFlushFailures||this._retryAfter.isOpen()?this._armFlushTimerIfQueued():this._flushInBackground()}}_reportLimitDrops(e){let t=e.droppedAttributesCount??0,r=e.droppedEventsCount??0,i=0;for(let t of e.events)i+=t.droppedAttributesCount??0;(t||r||i)&&this._logger.debug(`Span limits discarded data from "${e.name}": ${t} attributes, ${r} events, ${i} event attributes`)}_runBeforeSpanSend(e,t){if(!this._config.beforeSpanSend.length)return e;let r={traceId:e.traceId,spanId:e.spanId,parentSpanId:e.parentSpanId,traceState:e.traceState},i={startTime:e.startTime,endTime:e.endTime},o={attributes:e.droppedAttributesCount,events:e.droppedEventsCount},a=Object.keys(e.attributes),s={traceFlags:e.traceFlags,parentIsRemote:e.parentIsRemote},u=e.status&&{...e.status},c=e,d=e;try{var p;for(let e of this._config.beforeSpanSend){let t=e(c);if(!t)return this._recordDrop(1,"beforeSpanSend dropped it"),null;c=this._keepSpanIdentity(t,r)}if(!((p=d={traceId:r.traceId,spanId:r.spanId,parentSpanId:r.parentSpanId,traceState:r.traceState,name:c.name,kind:c.kind,status:c.status,attributes:c.attributes,events:c.events,startTime:c.startTime,endTime:c.endTime,traceFlags:s.traceFlags,parentIsRemote:s.parentIsRemote,droppedAttributesCount:o.attributes,droppedEventsCount:o.events}).attributes&&"object"==typeof p.attributes&&!Array.isArray(p.attributes)&&Array.isArray(p.events)&&void 0!==p.name&&void 0!==p.kind&&void 0!==p.startTime&&void 0!==p.endTime))return this._logger.debug("beforeSpanSend did not return a span record; dropping the span"),this._recordDrop(1,"beforeSpanSend returned an unusable record"),null;d.name=(0,l.sanitizeName)(d.name,"Span name",this._config.maxAttributeValueLength,this._logger),d.status&&"ok"!==d.status.code&&"error"!==d.status.code&&(this._logger.debug("beforeSpanSend set an unknown span status; keeping the original"),d.status=u),d.startTime=(0,l.toEpochMs)(d.startTime)??i.startTime,d.endTime=(0,l.clampEndTime)((0,l.toEpochMs)(d.endTime)??i.endTime,d.startTime);let e=[];for(let t of d.events)try{e.push({...t,name:(0,l.sanitizeName)(t.name,"Span event name",this._config.maxAttributeValueLength,this._logger),timestamp:(0,l.resolveSuppliedTime)(t.timestamp,d.startTime,"event timestamp",this._logger)})}catch{this._logger.debug("beforeSpanSend left an unreadable span event; dropping it")}return d.events=e,(0,n.applySpanLimits)(d,t,this._config.maxAttributesPerSpan,this._config.maxEventsPerSpan,this._config.maxAttributesPerEvent,this._config.maxAttributeValueLength,a),d}catch(e){return this._logger.debug("beforeSpanSend failed; dropping the span rather than exporting it unscrubbed",e),this._recordDrop(1,"beforeSpanSend failed"),null}}_keepSpanIdentity(e,t){(e.traceId!==t.traceId||e.spanId!==t.spanId||e.parentSpanId!==t.parentSpanId)&&this._logger.debug("beforeSpanSend changed a span identity field; keeping the original ids");try{m(e,"traceId",t.traceId),m(e,"spanId",t.spanId),m(e,"parentSpanId",t.parentSpanId),m(e,"traceState",t.traceState)}catch{try{let r=Object.getOwnPropertyDescriptors(e);for(let e of["traceId","spanId","parentSpanId","traceState"])r[e]={value:t[e],enumerable:!0,writable:!0,configurable:!0};return Object.create(Object.getPrototypeOf(e),r)}catch{;}}return e}_recordDrop(e,t){this._droppedSinceWarning+=e,this._dropReasons.add(t),Date.now()-this._lastDropWarningAt>=this._config.flushIntervalMs&&this._warnAboutDrops()}_warnAboutDrops(){this._droppedSinceWarning&&(this._lastDropWarningAt=Date.now(),this._logger.warn(`Dropping ${this._droppedSinceWarning} span(s): ${[...this._dropReasons].join("; ")}`),this._droppedSinceWarning=0,this._dropReasons.clear())}_encodeBatch(e){let t=[];for(let r of e)try{t.push((0,c.buildOtlpSpan)(r,this._logger))}catch(e){this._logger.debug("Failed to encode a span; dropping it",e),this._recordDrop(1,"its attributes could not be encoded")}return t}_discardQueueIfConsentWithdrawn(){if(!this._instance.isDisabled&&!this._instance.optedOut)return 0;let e=this._queue.length;return this._queue=[],this._resetHeadBatchBudget(),this._recordDrop(e,"the user has opted out"),this._warnAboutDrops(),e}async _flushInner(){if(!this._queue.length)return 0;let e=this._discardQueueIfConsentWithdrawn();if(e)return e;let t=(0,n.truncateAttributes)((0,c.buildTracesResourceAttributes)(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._config.maxAttributeValueLength),r=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),o=this._queue.length,a=0,s=1/0,l=this._generation;try{for(;o>0&&this._queue.length>0;){let e=this._discardQueueIfConsentWithdrawn();if(e)return a+e;let n=this._headBatchFailures>0?Math.min(this._maxExportBatchSize,this._headBatchSize):this._maxExportBatchSize,u=Math.max(1,Math.min(n,s,o,this._queue.length)),d=this._queue.slice(0,u),p=this._encodeBatch(d);if(!p.length){this._queue.splice(0,u),o-=u,a+=u,this._resetHeadBatchBudget();continue}let f=g()>=this._headBatchChargeableAt&&!this._retryAfter.isOpen(),y=await this._instance._sendTracesBatch((0,c.buildOtlpTracesPayload)(p,t,r,i,this._logger));if(l!==this._generation)break;if(this._retryAfter.record(y),"ok"===y.kind){this._consecutiveFlushFailures=0,this._flushJitter=h.NO_JITTER,this._resetHeadBatchBudget(),this._queue.splice(0,u),o-=u,a+=u,this._maxExportBatchSize<this._config.maxExportBatchSize&&this._maxExportBatchSize++;continue}if("too-large"===y.kind){if(1===u){this._queue.splice(0,1),o-=1,a+=1,this._recordDrop(1,"it is too large for the ingestion endpoint"),this._consecutiveFlushFailures=0,this._flushJitter=h.NO_JITTER,this._resetHeadBatchBudget();continue}let e=Math.max(1,Math.floor(u/2));y.measuredLocally?s=e:this._maxExportBatchSize=e,this._resetHeadBatchBudget(),this._logger.debug(`Batch too large; retrying the same spans in batches of ${e}`);continue}if("retry-later"===y.kind){if(this._consecutiveFlushFailures++,this._flushJitter=(0,h.drawJitter)(),this._headBatchSize=u,f&&(this._headBatchFailures++,this._headBatchChargeableAt=g()+this._nextFlushDelay()),this._headBatchFailures<8)return this._logger.debug("Span export failed; retrying on the next flush",y.error),a;if(this._queue.splice(0,u),o-=u,a+=u,this._consecutiveFlushFailures=0,this._flushJitter=h.NO_JITTER,this._resetHeadBatchBudget(),this._recordDrop(u,"the ingestion endpoint failed 8 times in a row"),this._retryAfter.isOpen())return a;continue}this._logger.debug("Dropping a span batch the ingestion endpoint rejected",y.error),this._queue.splice(0,u),o-=u,a+=u,this._consecutiveFlushFailures=0,this._flushJitter=h.NO_JITTER,this._resetHeadBatchBudget(),this._recordDrop(u,"the ingestion endpoint rejected the batch")}return a}finally{this._warnAboutDrops()}}
1_flushInBackground(){this._backgroundFlush||(this._backgroundFlush=this.flush().catch(e=>{this._logger.debug("Background span flush failed",e)}).finally(()=>{this._backgroundFlush=void 0,this._armFlushTimerIfQueuedNoEarlierThan()}))}_armFlushTimerIfQueued(){!this._flushTimer.pending&&this._queue.length&&this._flushTimer.arm(this._nextFlushDelay())}_armFlushTimerIfQueuedNoEarlierThan(){this._queue.length&&this._flushTimer.armNoEarlierThan(this._nextFlushDelay())}_nextFlushDelay(){return Math.max((0,h.backoffDelayMs)(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,h.MAX_FLUSH_BACKOFF_MS),this._retryAfter.remainingMs())}}for(var b in r.PostHogTraces=o.PostHogTraces,o)-1===["PostHogTraces"].indexOf(b)&&(r[b]=o[b]);Object.defineProperty(r,"__esModule",{value:!0})},467526,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{patchFetchForTracingHeaders:()=>s});let n=e.r(864066),a="__posthog_tracing_headers_patched__",s=(e,t)=>{let r=globalThis,i=r.fetch;if(!(0,n.isFunction)(i))return()=>{};let o=i[a]?.original??i,s=async function(i,n){try{let a,s="string"==typeof i?i:i instanceof URL?i.toString():i instanceof Request?i.url:void 0;if(s&&(a=(e=>{try{return new URL(e).hostname}catch{return}})(s))&&t.includes(a)){let t=new Headers(n?.headers??(i instanceof Request?i.headers:void 0)),a=e.getDistinctId(),s=e.getSessionId();a&&t.set("X-POSTHOG-DISTINCT-ID",a),s&&t.set("X-POSTHOG-SESSION-ID",s);let l={...n??{},headers:t};return o.call(r,i,l)}}catch{}return o.call(r,i,n)};return Object.defineProperty(s,a,{value:{original:o},enumerable:!1}),r.fetch=s,()=>{r.fetch===s&&(r.fetch=o)}};for(var l in r.patchFetchForTracingHeaders=o.patchFetchForTracingHeaders,o)-1===["patchFetchForTracingHeaders"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},744094,(e,t,r)=>{"use strict";var i={"./cookie"(t){t.exports=e.r(588047)},"./error-tracking"(t){t.exports=e.r(143819)},"./featureFlagLocalEvaluation"(t){t.exports=e.r(59520)},"./featureFlagUtils"(t){t.exports=e.r(370454)},"./gzip"(t){t.exports=e.r(732616)},"./logs"(t){t.exports=e.r(560382)},"./logs/logs-utils"(t){t.exports=e.r(686601)},"./metrics"(t){t.exports=e.r(454483)},"./posthog-core-stateless"(t){t.exports=e.r(956668)},"./posthog-core"(t){t.exports=e.r(778452)},"./surveys/validation"(t){t.exports=e.r(26182)},"./traces/config"(t){t.exports=e.r(453668)},"./traces/context"(t){t.exports=e.r(589526)},"./traces"(t){t.exports=e.r(748849)},"./traces/span"(t){t.exports=e.r(443343)},"./tracing-headers"(t){t.exports=e.r(467526)},"./types"(t){t.exports=e.r(699960)},"./utils?637c"(t){t.exports=e.r(856658)},"./utils/otlp-any-value"(t){t.exports=e.r(706150)},"./utils/otlp-resource"(t){t.exports=e.r(693710)},"./vendor/uuidv7"(t){t.exports=e.r(239797)}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};for(var s in(()=>{n.r(a);var e=n("./featureFlagUtils"),t=n("./featureFlagLocalEvaluation"),r=n("./gzip"),i=n("./utils?637c"),o={};for(let e in i)0>["resolveFeatureFlagPayload","PostHogTraces","getRequirementsHint","getFeatureFlagValue","isGzipData","hashSHA1","getFeatureFlagVariant","DEFAULT_HISTOGRAM_BOUNDS","getVariantFromValue","getOtlpSeverityNumber","toOtlpKeyValueList","matchFeatureFlagProperty","PostHogMetrics","parseFeatureFlagSemver","InconclusiveMatchError","inertSpan","uuidv7","getLengthFromRules","default","isGzipRequest","getFeatureFlagVariantLookupTable","getEnabledFromValue","parsePayload","isNativeAsyncGzipError","buildRes
1ourceAttributes","resolveMetricsConfig","MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","runWithActiveSpan","toOtlpAnyValue","PostHogLogs","buildMetricsResourceAttributes","buildOtlpLogRecord","getOtlpSeverityText","gzipCompress","buildOtlpMetricsPayload","SyncSpanContextManager","osResourceAttributes","buildOtlpLogsPayload","minimizeFlagCalledEventProperties","flagDetailsToResults","resolveTracesConfig","getFeatureFlagHash","getValidationError","ErrorTracking","isNativeAsyncGzipReadError","relativeDateParseForFeatureFlagMatching","isGzipSupported"].indexOf(e)&&(o[e]=()=>i[e]);n.d(a,o);var s=n("./error-tracking"),l=n("./logs/logs-utils"),u=n("./utils/otlp-any-value"),c=n("./utils/otlp-resource"),d=n("./logs"),p=n("./metrics"),f=n("./traces"),h=n("./traces/context"),g=n("./traces/span"),y=n("./traces/config"),_=n("./vendor/uuidv7"),m=n("./cookie"),o={};for(let e in m)0>["resolveFeatureFlagPayload","PostHogTraces","getRequirementsHint","getFeatureFlagValue","isGzipData","hashSHA1","getFeatureFlagVariant","DEFAULT_HISTOGRAM_BOUNDS","getVariantFromValue","getOtlpSeverityNumber","toOtlpKeyValueList","matchFeatureFlagProperty","PostHogMetrics","parseFeatureFlagSemver","InconclusiveMatchError","inertSpan","uuidv7","getLengthFromRules","default","isGzipRequest","getFeatureFlagVariantLookupTable","getEnabledFromValue","parsePayload","isNativeAsyncGzipError","buildResourceAttributes","resolveMetricsConfig","MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","runWithActiveSpan","toOtlpAnyValue","PostHogLogs","buildMetricsResourceAttributes","buildOtlpLogRecord","getOtlpSeverityText","gzipCompress","buildOtlpMetricsPayload","SyncSpanContextManager","osResourceAttributes","buildOtlpLogsPayload","minimizeFlagCalledEventProperties","flagDetailsToResults","resolveTracesConfig","getFeatureFlagHash","getValidationError","ErrorTracking","isNativeAsyncGzipReadError","relativeDateParseForFeatureFlagMatching","isGzipSupported"].indexOf(e)&&(o[e]=()=>m[e]);n.d(a,o);var v=n("./posthog-core"),o={};for(let e in v)0>["resolveFeatureFlagPayload","PostHogTraces","getRequirementsHint","getFeatureFlagValue","isGzipData","hashSHA1","getFeatureFlagVariant","DEFAULT_HISTOGRAM_BOUNDS","getVariantFromValue","getOtlpSeverityNumber","toOtlpKeyValueList","matchFeatureFlagProperty","PostHogMetrics","parseFeatureFlagSemver","InconclusiveMatchError","inertSpan","uuidv7","getLengthFromRules","default","isGzipRequest","getFeatureFlagVariantLookupTable","getEnabledFromValue","parsePayload","isNativeAsyncGzipError","buildResourceAttributes","resolveMetricsConfig","MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","runWithActiveSpan","toOtlpAnyValue","PostHogLogs","buildMetricsResourceAttributes","buildOtlpLogRecord","getOtlpSeverityText","gzipCompress","buildOtlpMetricsPayload","SyncSpanContextManager","osResourceAttributes","buildOtlpLogsPayload","minimizeFlagCalledEventProperties","flagDetailsToResults","resolveTracesConfig","getFeatureFlagHash","getValidationError","ErrorTracking","isNativeAsyncGzipReadError","relativeDateParseForFeatureFlagMatching","isGzipSupported"].indexOf(e)&&(o[e]=()=>v[e]);n.d(a,o);var b=n("./posthog-core-stateless"),o={};for(let e in b)0>["resolveFeatureFlagPayload","PostHogTraces","getRequirementsHint","getFeatureFlagValue","isGzipData","hashSHA1","getFeatureFlagVariant","DEFAULT_HISTOGRAM_BOUNDS","getVariantFromValue","getOtlpSeverityNumber","toOtlpKeyValueList","matchFeatureFlagProperty","PostHogMetrics","parseFeatureFlagSemver","InconclusiveMatchError","inertSpan","uuidv7","getLengthFromRules","default","isGzipRequest","getFeatureFlagVariantLookupTable","getEnabledFromValue","parsePayload","isNativeAsyncGzipError","buildResourceAttributes","resolveMetricsConfig","MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","runWithActiveSpan","toOtlpAnyValue","PostHogLogs","buildMetricsResourceAttributes","buildOtlpLogRecord","getOtlpSeverityText","gzipCompress","buildOtlpMetricsPayload","SyncSpanContextManager","osResourceAttributes","buildOtlpLogsPayload","minimizeFlagCalledEventProperties","flagDetailsToResults","resolveTracesConfig","getFeatureFlagHash","getValidationError","ErrorTracking","isNativeAsyncGzipReadError","relativeDateParseForFeatureFlagMatching","isGzipSupported"].indexOf(e)&&(o[e]=()=>b[e]);n.d(a,o);var S=n("./tracing-headers"),o={};for(let e in S)0>["resolveFeatureFlagPayload","PostHogTraces","getRequirementsHint","getFeatureFlagValue","isGzipData","hashSHA1","getFeatureFlagVariant","DEFAULT_HISTOGRAM_BOUNDS","getVariantFromValue","getOtlpSeverityNumber","toOtlpKeyValueList","matchFeatureFlagProperty","PostHogMetrics","parseFeatureFlagSemver","InconclusiveMatchError","inertSpan","uuidv7","getLengthFromRules","default","isGzipRequest","getFeatureFlagVariantLookupTable","getEnabledFromValue","parsePayload","isNativeAsyncGzipError","buildRes
1ourceAttributes","resolveMetricsConfig","MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","runWithActiveSpan","toOtlpAnyValue","PostHogLogs","buildMetricsResourceAttributes","buildOtlpLogRecord","getOtlpSeverityText","gzipCompress","buildOtlpMetricsPayload","SyncSpanContextManager","osResourceAttributes","buildOtlpLogsPayload","minimizeFlagCalledEventProperties","flagDetailsToResults","resolveTracesConfig","getFeatureFlagHash","getValidationError","ErrorTracking","isNativeAsyncGzipReadError","relativeDateParseForFeatureFlagMatching","isGzipSupported"].indexOf(e)&&(o[e]=()=>S[e]);n.d(a,o);var P=n("./types"),o={};for(let e in P)0>["resolveFeatureFlagPayload","PostHogTraces","getRequirementsHint","getFeatureFlagValue","isGzipData","hashSHA1","getFeatureFlagVariant","DEFAULT_HISTOGRAM_BOUNDS","getVariantFromValue","getOtlpSeverityNumber","toOtlpKeyValueList","matchFeatureFlagProperty","PostHogMetrics","parseFeatureFlagSemver","InconclusiveMatchError","inertSpan","uuidv7","getLengthFromRules","default","isGzipRequest","getFeatureFlagVariantLookupTable","getEnabledFromValue","parsePayload","isNativeAsyncGzipError","buildResourceAttributes","resolveMetricsConfig","MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","runWithActiveSpan","toOtlpAnyValue","PostHogLogs","buildMetricsResourceAttributes","buildOtlpLogRecord","getOtlpSeverityText","gzipCompress","buildOtlpMetricsPayload","SyncSpanContextManager","osResourceAttributes","buildOtlpLogsPayload","minimizeFlagCalledEventProperties","flagDetailsToResults","resolveTracesConfig","getFeatureFlagHash","getValidationError","ErrorTracking","isNativeAsyncGzipReadError","relativeDateParseForFeatureFlagMatching","isGzipSupported"].indexOf(e)&&(o[e]=()=>P[e]);n.d(a,o);var E=n("./surveys/validation");n.d(a,{DEFAULT_HISTOGRAM_BOUNDS:()=>p.DEFAULT_HISTOGRAM_BOUNDS,ErrorTracking:()=>s,InconclusiveMatchError:()=>t.InconclusiveMatchError,MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES:()=>e.MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES,PostHogLogs:()=>d.PostHogLogs,PostHogMetrics:()=>p.PostHogMetrics,PostHogTraces:()=>f.PostHogTraces,SyncSpanContextManager:()=>h.SyncSpanContextManager,buildMetricsResourceAttributes:()=>p.buildMetricsResourceAttributes,buildOtlpLogRecord:()=>l.buildOtlpLogRecord,buildOtlpLogsPayload:()=>l.buildOtlpLogsPayload,buildOtlpMetricsPayload:()=>p.buildOtlpMetricsPayload,buildResourceAttributes:()=>l.buildResourceAttributes,flagDetailsToResults:()=>e.flagDetailsToResults,getEnabledFromValue:()=>e.getEnabledFromValue,getFeatureFlagHash:()=>t.getFeatureFlagHash,getFeatureFlagValue:()=>e.getFeatureFlagValue,getFeatureFlagVariant:()=>t.getFeatureFlagVariant,getFeatureFlagVariantLookupTable:()=>t.getFeatureFlagVariantLookupTable,getLengthFromRules:()=>E.getLengthFromRules,getOtlpSeverityNumber:()=>l.getOtlpSeverityNumber,getOtlpSeverityText:()=>l.getOtlpSeverityText,getRequirementsHint:()=>E.getRequirementsHint,getValidationError:()=>E.getValidationError,getVariantFromValue:()=>e.getVariantFromValue,gzipCompress:()=>r.gzipCompress,hashSHA1:()=>t.hashSHA1,inertSpan:()=>g.inertSpan,isGzipData:()=>r.isGzipData,isGzipRequest:()=>r.isGzipRequest,isGzipSupported:()=>r.isGzipSupported,isNativeAsyncGzipError:()=>r.isNativeAsyncGzipError,isNativeAsyncGzipReadError:()=>r.isNativeAsyncGzipReadError,matchFeatureFlagProperty:()=>t.matchFeatureFlagProperty,minimizeFlagCalledEventProperties:()=>e.minimizeFlagCalledEventProperties,osResourceAttributes:()=>c.osResourceAttributes,parseFeatureFlagSemver:()=>t.parseFeatureFlagSemver,parsePayload:()=>e.parsePayload,relativeDateParseForFeatureFlagMatching:()=>t.relativeDateParseForFeatureFlagMatching,resolveFeatureFlagPayload:()=>t.resolveFeatureFlagPayload,resolveMetricsConfig:()=>p.resolveMetricsConfig,resolveTracesConfig:()=>y.resolveTracesConfig,runWithActiveSpan:()=>g.runWithActiveSpan,toOtlpAnyValue:()=>u.toOtlpAnyValue,toOtlpKeyValueList:()=>u.toOtlpKeyValueList,uuidv7:()=>_.uuidv7})})(),r.DEFAULT_HISTOGRAM_BOUNDS=a.DEFAULT_HISTOGRAM_BOUNDS,r.ErrorTracking=a.ErrorTracking,r.InconclusiveMatchError=a.InconclusiveMatchError,r.MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES=a.MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES,r.PostHogLogs=a.PostHogLogs,r.PostHogMetrics=a.PostHogMetrics,r.PostHogTraces=a.PostHogTraces,r.SyncSpanContextManager=a.SyncSpanContextManager,r.buildMetricsResourceAttributes=a.buildMetricsResourceAttributes,r.buildOtlpLogRecord=a.buildOtlpLogRecord,r.buildOtlpLogsPayload=a.buildOtlpLogsPayload,r.buildOtlpMetricsPayload=a.buildOtlpMetricsPayload,r.buildRes
1ourceAttributes=a.buildResourceAttributes,r.flagDetailsToResults=a.flagDetailsToResults,r.getEnabledFromValue=a.getEnabledFromValue,r.getFeatureFlagHash=a.getFeatureFlagHash,r.getFeatureFlagValue=a.getFeatureFlagValue,r.getFeatureFlagVariant=a.getFeatureFlagVariant,r.getFeatureFlagVariantLookupTable=a.getFeatureFlagVariantLookupTable,r.getLengthFromRules=a.getLengthFromRules,r.getOtlpSeverityNumber=a.getOtlpSeverityNumber,r.getOtlpSeverityText=a.getOtlpSeverityText,r.getRequirementsHint=a.getRequirementsHint,r.getValidationError=a.getValidationError,r.getVariantFromValue=a.getVariantFromValue,r.gzipCompress=a.gzipCompress,r.hashSHA1=a.hashSHA1,r.inertSpan=a.inertSpan,r.isGzipData=a.isGzipData,r.isGzipRequest=a.isGzipRequest,r.isGzipSupported=a.isGzipSupported,r.isNativeAsyncGzipError=a.isNativeAsyncGzipError,r.isNativeAsyncGzipReadError=a.isNativeAsyncGzipReadError,r.matchFeatureFlagProperty=a.matchFeatureFlagProperty,r.minimizeFlagCalledEventProperties=a.minimizeFlagCalledEventProperties,r.osResourceAttributes=a.osResourceAttributes,r.parseFeatureFlagSemver=a.parseFeatureFlagSemver,r.parsePayload=a.parsePayload,r.relativeDateParseForFeatureFlagMatching=a.relativeDateParseForFeatureFlagMatching,r.resolveFeatureFlagPayload=a.resolveFeatureFlagPayload,r.resolveMetricsConfig=a.resolveMetricsConfig,r.resolveTracesConfig=a.resolveTracesConfig,r.runWithActiveSpan=a.runWithActiveSpan,r.toOtlpAnyValue=a.toOtlpAnyValue,r.toOtlpKeyValueList=a.toOtlpKeyValueList,r.uuidv7=a.uuidv7,a)-1===["DEFAULT_HISTOGRAM_BOUNDS","ErrorTracking","InconclusiveMatchError","MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","PostHogLogs","PostHogMetrics","PostHogTraces","SyncSpanContextManager","buildMetricsResourceAttributes","buildOtlpLogRecord","buildOtlpLogsPayload","buildOtlpMetricsPayload","buildResourceAttributes","flagDetailsToResults","getEnabledFromValue","getFeatureFlagHash","getFeatureFlagValue","getFeatureFlagVariant","getFeatureFlagVariantLookupTable","getLengthFromRules","getOtlpSeverityNumber","getOtlpSeverityText","getRequirementsHint","getValidationError","getVariantFromValue","gzipCompress","hashSHA1","inertSpan","isGzipData","isGzipRequest","isGzipSupported","isNativeAsyncGzipError","isNativeAsyncGzipReadError","matchFeatureFlagProperty","minimizeFlagCalledEventProperties","osResourceAttributes","parseFeatureFlagSemver","parsePayload","relativeDateParseForFeatureFlagMatching","resolveFeatureFlagPayload","resolveMetricsConfig","resolveTracesConfig","runWithActiveSpan","toOtlpAnyValue","toOtlpKeyValueList","uuidv7"].indexOf(s)&&(r[s]=a[s]);Object.defineProperty(r,"__esModule",{value:!0})},238350,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};for(var n in i.r(o),i.d(o,{},{FeatureFlagError:{ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"}}),r.FeatureFlagError=o.FeatureFlagError,o)-1===["FeatureFlagError"].indexOf(n)&&(r[n]=o[n]);Object.defineProperty(r,"__esModule",{value:!0})},113469,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{FeatureFlagEvaluations:()=>a});let n=e.r(238350);class a{constructor(e){this._host=e.host,this._distinctId=e.distinctId,this._groups=e.groups,this._disableGeoip=e.disableGeoip,this._flags=e.flags,this._requestId=e.requestId,this._evaluatedAt=e.evaluatedAt,this._flagDefinitionsLoadedAt=e.flagDefinitionsLoadedAt,this._errorsWhileComputing=e.errorsWhileComputing??!1,this._quotaLimited=e.quotaLimited??!1,this._accessed=e.accessed??new Set,this._isSlice=e.isSlice??!1}isEnabled(e,t={}){let r=this._flags[e];return this._recordAccess(e),r?.enabled??t.defaultValue??!1}getFlag(e){let t=this._flags[e];if(this._recordAccess(e),t)return!!t.enabled&&(t.variant??!0)}getFlagPayload(e){return this._flags[e]?.payload}onlyAccessed(){let e={};for(let t of this._accessed){let r=this._flags[t];r&&(e[t]=r)}return this._cloneWith(e)}only(e){let t={},r=[];for(let i of e){let e=this._flags[i];e?t[i]=e:r.push(i)}return r.length>0&&this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${r.join(", ")}`),this._cloneWith(t)}get keys(){return Object.keys(this._flags)}_getEventProperties(){let e={},t=[];for(let[r,i]of Object.entries(this._flags)){let o=!1!==i.enabled&&(i.variant??!0);e[`$feature/${r}`]=o,i.enabled&&t.push(r)}return t.length>0&&(t.sort(),e.$active_feature_flags=t),e}_cloneWith(e){return new a({host:this._host,distinctId:this._distinctId,groups:this._groups,disableGeoip:this._disableGeoip,flags:e,requestId:this._requestId,evaluatedAt:this._evaluatedAt,flagDefinitionsLoadedAt:this._flagDefinitionsLoadedAt,errorsWhileComputing:this._errorsWhileComputing,quotaLimited:this._quotaLimited,accessed:new Set(this._accessed),isSlice:!0})}_recordAccess(e){if(this._accessed.add(e),""===this._distinctId||this._isSlice&&!(e in this._flags))return;let t=this._flags[e],r=void 0===t?void 0:!1!==t.enabled&&(t.variant??!0),i={$feature_flag:e,$feature_flag_response:r,$feature_flag_id:t?.id,$feature_flag_version:t?.version,$feature_flag_reason:t?.reason,locally_evaluated:t?.locallyEvaluated??!1,[`$feature/${e}`]:r,$feature_flag_request_id:this._requestId,$feature_flag_evaluated_at:t?.locallyEvaluated?Date.now():this._evaluatedAt};t?.hasExperiment!==void 0&&(i.$feature_flag_has_experiment=t.hasExperiment),t?.locallyEvaluated&&void 0!==this._flagDefinitionsLoadedAt&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(n.FeatureFlagError.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(n.FeatureFlagError.QUOTA_LIMITED),void 0===t&&o.push(n.FeatureFlagError.FLAG_MISSING),o.length>0&&(i.$feature_flag_error=o.join(",")),this._host.captureFlagCalledEventIfNeeded({distinctId:this._distinctId,key:e,response:r,groups:this._groups,disableGeoip:this._disableGeoip,properties:i})}}for(var s in r.FeatureFlagEvaluations=o.FeatureFlagEvaluations,o)-1===["FeatureFlagEvaluations"].indexOf(s)&&(r[s]=o[s]);
1Object.defineProperty(r,"__esModule",{value:!0})},915954,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{ClientError:()=>a,FeatureFlagsPoller:()=>l,InconclusiveMatchError:()=>n.InconclusiveMatchError,RequiresServerEvaluation:()=>s,matchProperty:()=>u,parseSemver:()=>c,relativeDateParseForFeatureFlagMatching:()=>n.relativeDateParseForFeatureFlagMatching});let n=e.r(744094);class a extends Error{constructor(e){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=e,Object.setPrototypeOf(this,a.prototype)}}class s extends Error{constructor(e){super(e),function(e,t){e.name=t.name,Error.captureStackTrace(e,t),Object.setPrototypeOf(e,t.prototype)}(this,s)}}class l{constructor({pollingInterval:e,personalApiKey:t,projectApiKey:r,timeout:i,host:o,customHeaders:n,...a}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollerStopped=!1,this.filteredOutFlagKeys=new Set,this.pollingInterval=e,this.personalApiKey=t,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=i,this.projectApiKey=r,this.host=o,this.poller=void 0,this.fetch=a.fetch||fetch,this.onError=a.onError,this.customHeaders=n,this.onLoad=a.onLoad,this.onMinimalFlagCalledEvents=a.onMinimalFlagCalledEvents,this.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.evaluationContexts=a.evaluationContexts,this.loadFeatureFlags()}debug(e=!0){this.debugMode=e}logMsgIfDebug(e){this.debugMode&&e()}createEvaluationContext(e,t={},r={},i={},o={}){return{distinctId:e,groups:t,personProperties:r,groupProperties:i,evaluationCache:o}}async getFeatureFlag(e,t,r={},i={},o={}){let a,l;if(await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return a;
1if(void 0!==(l=this.featureFlagsByKey[e])){let u=this.createEvaluationContext(t,r,i,o);try{a=(await this.computeFlagAndPayloadLocally(l,u)).value,this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${e} -> ${a}`))}catch(t){t instanceof s||t instanceof n.InconclusiveMatchError?this.logMsgIfDebug(()=>console.debug(`${t.name} when computing flag locally: ${e}: ${t.message}`)):t instanceof Error&&this.onError?.(Error(`Error computing flag locally: ${e}: ${t}`))}}return a}async getAllFlagsAndPayloads(e,t){await this.loadFeatureFlags();let r={},i={},o=0==this.featureFlags.length,a=t?t.map(e=>this.featureFlagsByKey[e]).filter(Boolean):this.featureFlags,l={...e,evaluationCache:e.evaluationCache??{}};return await Promise.all(a.map(async e=>{try{let{value:t,payload:o}=await this.computeFlagAndPayloadLocally(e,l);r[e.key]=t,o&&(i[e.key]=o)}catch(t){t instanceof s||t instanceof n.InconclusiveMatchError?this.logMsgIfDebug(()=>console.debug(`${t.name} when computing flag locally: ${e.key}: ${t.message}`)):t instanceof Error&&this.onError?.(Error(`Error computing flag locally: ${e.key}: ${t}`)),o=!0}})),{response:r,payloads:i,fallbackToFlags:o}}async computeFlagAndPayloadLocally(e,t,r={}){let i,{matchValue:o,skipLoadCheck:n=!1}=r;if(n||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};i=void 0!==o?o:await this.computeFlagValueLocally(e,t);let a=this.getFeatureFlagPayload(e.key,i);return{value:i,payload:a}}async computeFlagValueLocally(e,t){let{distinctId:r,groups:i,personProperties:o,groupProperties:a}=t;if(!e.active)return!1;if(e.ensure_experience_continuity)throw new n.InconclusiveMatchError("Flag has experience continuity enabled");let s=(e.filters||{}).aggregation_group_type_index;if(void 0!=s){let r=this.groupTypeMapping[String(s)];if(!r)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${s} for feature flag ${e.key}`)),new n.InconclusiveMatchError("Flag has unknown group type index");if(!(r in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${e.key} without group names passed in`)),!1;"device_id"===e.bucketing_identifier&&(o?.$device_id===void 0||o?.$device_id===null||o?.$device_id==="")&&this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${e.key}`));let l=a[r];return await this.matchFeatureFlagProperties(e,i[r],l,t)}{let i=this.getBucketingValueForFlag(e,r,o);if(void 0===i)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${e.key} without $device_id, falling back to server evaluation`)),new n.InconclusiveMatchError(`Can't compute feature flag: ${e.key} without $device_id`);return await this.matchFeatureFlagProperties(e,i,o,t)}}getBucketingValueForFlag(e,t,r){if(e.filters?.aggregation_group_type_index!=void 0)return t;if("device_id"===e.bucketing_identifier){let e=r?.$device_id;if(null==e||""===e)return;return e}return t}getFeatureFlagPayload(e,t){return(0,n.resolveFeatureFlagPayload)(this.featureFlagsByKey?.[e]?.filters?.payloads,t)}async evaluateFlagDependency(e,t,r){let{evaluationCache:i}=r,o=e.key;if(!this.featureFlagsByKey)throw new n.InconclusiveMatchError("Feature flags not available for dependency evaluation");if(!("dependency_chain"in e))throw new n.InconclusiveMatchError(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let a=e.dependency_chain;if(!Array.isArray(a))throw new n.InconclusiveMatchError(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof a})`);if(0===a.length)throw new n.InconclusiveMatchError(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let e of a){if(!(e in i)){let t=this.featureFlagsByKey[e];if(t)if(t.active)try{let o=await this.computeFlagValueLocally(t,r);i[e]=o}catch(t){throw new n.InconclusiveMatchError(`Error evaluating flag dependency '${e}' for flag '${o}': ${t}`)}else i[e]=!1;else if(this.filteredOutFlagKeys.has(e))i[e]=!1;else throw new n.InconclusiveMatchError(`Missing flag dependency '${e}' for flag '${o}'`)}if(null==i[e])throw new n.InconclusiveMatchError(`Dependency '${e}' could not be evaluated`)}let s=i[o];return this.flagEvaluatesToExpectedValue(e.value,s)}flagEvaluatesToExpectedValue(e,t){return"boolean"==typeof e?e===t||"string"==typeof t&&""!==t&&!0===e:"string"==typeof e&&t===e}async matchFeatureFlagProperties(e,t,r,i){let o,a=e.filters||{},l=a.groups||[],u=a.aggregation_group_type_index,c=a.early_exit??!1,{groups:d,groupProperties:p}=i,f=!1;for(let h of l)try{let n=void 0!==h.aggregation_group_type_index?h.aggregation_group_type_index:u,s=r,l=t;if(n!==u&&null!=n){let t=this.groupTypeMapping[String(n)];if(!t||!(t in d)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${e.key}': group type index ${n} not available`));continue}if(!(t in p)){f=!0;continue}s=p[t],l=d[t]}let g=await this.isConditionMatch(e,l,h,s,i);if("match"===g){let t=h.variant,r=a.multivariate?.variants||[];o=t&&r.some(e=>e.key===t)?t:await this.getMatchingVariant(e,l)||!0;break}if(c&&"out_of_rollout_bound"===g){if(f)break;return!1}}catch(e){if(e instanceof s)throw e;if(e instanceof n.InconclusiveMatchError)f=!0;else throw e}if(void 0!==o)return o;if(f)throw new n.InconclusiveMatchError("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(e,t,r,i,o){let a=r.rollout_percentage,s=e=>{this.logMsgIfDebug(()=>console.warn(e))};if((r.properties||[]).length>0){for(let e of r.properties){let t=e.type,r=!1;if("cohort"===t){let t=await d(e,i,this.cohorts,this.debugMode,e=>this.evaluateFlagDependency(e,i,o));r="not_in"===e.operator?!t:t}else r="flag"===t?await this.evaluateFlagDependency(e,i,o):u(e,i,s);if(!r)return"no_match"}if(void 0==a)return"match"}
1return void 0!=a&&await (0,n.getFeatureFlagHash)(e.key,t)>a/100?"out_of_rollout_bound":"match"}async getMatchingVariant(e,t){return(0,n.getFeatureFlagVariant)(e.key,t,e.filters?.multivariate?.variants||[])}variantLookupTable(e){return(0,n.getFeatureFlagVariantLookupTable)(e.filters?.multivariate?.variants||[])}filterFlagsByEvaluationContexts(e){if(!this.evaluationContexts||0===this.evaluationContexts.length)return e;let t=new Set(this.evaluationContexts);return e.filter(e=>{let r=e.evaluation_contexts??e.evaluation_tags;return!r||0===r.length||r.some(e=>t.has(e))})}updateFlagState(e){let t=this.filterFlagsByEvaluationContexts(e.flags);this.featureFlags=t,this.featureFlagsByKey=t.reduce((e,t)=>(e[t.key]=t,e),{});let r=new Set(t.map(e=>e.key));this.filteredOutFlagKeys=new Set(e.flags.filter(e=>!r.has(e.key)).map(e=>e.key)),this.groupTypeMapping=e.groupTypeMapping,this.cohorts=e.cohorts,this.loadedSuccessfullyOnce=!0,this.onMinimalFlagCalledEvents?.(!0===e.minimalFlagCalledEvents)}warnAboutExperienceContinuityFlags(e){if(this.strictLocalEvaluation)return;let t=e.filter(e=>e.ensure_experience_continuity);t.length>0&&console.warn(`[PostHog] You are using local evaluation but ${t.length} flag(s) have experience continuity enabled: ${t.map(e=>e.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`)}async loadFromCache(e){if(!this.cacheProvider)return!1;try{let t=await this.cacheProvider.getFlagDefinitions();if(t)return this.updateFlagState(t),this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] ${e} (${t.flags.length} flags)`)),this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags),!0;return!1}catch(e){return this.onError?.(Error(`Failed to load from cache: ${e}`)),!1}}async loadFeatureFlags(e=!1){if(!this.loadedSuccessfullyOnce||e)return!e&&this.nextFetchAllowedAt&&Date.now()<this.nextFetchAllowedAt?void this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Skipping fetch, in backoff period")):(this.loadingPromise||(this.loadingPromise=this._loadFeatureFlags().catch(e=>this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Failed to load feature flags: ${e}`))).finally(()=>{this.loadingPromise=void 0})),this.loadingPromise)}isLocalEvaluationReady(){return(this.loadedSuccessfullyOnce??!1)&&(this.featureFlags?.length??0)>0}getFlagDefinitionsLoadedAt(){return this.flagDefinitionsLoadedAt}getPollingInterval(){return this.shouldBeginExponentialBackoff?Math.min(6e4,this.pollingInterval*2**this.backOffCount):this.pollingInterval}beginBackoff(){this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,this.nextFetchAllowedAt=Date.now()+this.getPollingInterval()}clearBackoff(){this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.nextFetchAllowedAt=void 0}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);try{let e=!0;if(this.cacheProvider)try{e=await this.cacheProvider.shouldFetchFlagDefinitions()}catch(e){this.onError?.(Error(`Error in shouldFetchFlagDefinitions: ${e}`))}if(!e&&(await this.loadFromCache("Loaded flags from cache (skipped fetch)")||this.loadedSuccessfullyOnce))return;let t=await this._requestFeatureFlagDefinitions();if(!t)return;switch(t.status){case 304:this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data")),this.flagsEtag=t.headers?.get("ETag")??this.flagsEtag,this.loadedSuccessfullyOnce=!0,this.clearBackoff();return;case 401:throw this.beginBackoff(),new a(`Your project key or secret key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 402:console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),this.featureFlags=[],this.featureFlagsByKey={},this.filteredOutFlagKeys=new Set,this.groupTypeMapping={},this.cohorts={},this.onMinimalFlagCalledEvents?.(!1);return;case 403:throw this.beginBackoff(),new a(`Your secret key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct secret and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new a(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 200:{let r=await t.json()??{};if(!("flags"in r))return void this.onError?.(Error(`Invalid response when getting feature flags: ${JSON.stringify(r)}`));this.flagsEtag=t.headers?.get("ETag")??void 0;let i={flags:r.flags??[],groupTypeMapping:r.group_type_mapping||{},cohorts:r.cohorts||{},minimalFlagCalledEvents:!0===r.minimal_flag_called_events};if(this.updateFlagState(i),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&e)try{await this.cacheProvider.onFlagDefinitionsReceived(i)}catch(e){this.onError?.(Error(`Failed to store in cache: ${e}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags);break}default:return}}catch(e){e instanceof a&&this.onError?.(e)}finally{this.pollerStopped||(this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval()))}}getPersonalApiKeyRequestOptions(e="GET",t){let r={...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`};return t&&(r["If-None-Match"]=t),{method:e,headers:r}}async _requestFeatureFlagDefinitions(){let e=`${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`,t=this.getPersonalApiKeyRequestOptions("GET",this.flagsEtag),r=null;if(this.timeout&&"number"==typeof this.timeout){let e=new AbortController;r=(0,n.safeSetTimeout)(()=>{e.abort()},this.timeout),t.signal=e.signal}try{let i=this.fetch,o=await i(e,t);if(200!==o.status)return clearTimeout(r),o;return{status:o.status,headers:o.headers,body:o.body,text:async()=>{try{return await o.text()}finally{clearTimeout(r)}},json:async()=>{try{return await o.json()}finally{clearTimeout(r)}}}}catch(e){throw clearTimeout(r),e}}async stopPoller(e=3e4){if(this.pollerStopped=!0,clearTimeout(this.poller),this.poller=void 0,this.cacheProvider)try{let t=this.cacheProvider.shutdown();t instanceof Promise&&await (0,n.raceWithTimeout)(t,e,()=>{throw Error(`Cache shutdown timeout after ${e}ms`)})}catch(e){this.onError?.(Error(`Error during cache shutdown: ${e}`))}}}function u(e,t,r){return(0,n.matchFeatureFlagProperty)(e,t,{warnFunction:r})}function c(e){return(0,n.parseFeatureFlagSemver)(e,"strict")}async function d(e,t,r,i=!1,o){let n=String(e.value);if(!(n in r))throw new s(`cohort ${n} not found in local cohorts - likely a static cohort that requires server evaluation`);return p(r[n],t,r,i,o)}async function p(e,t,r,i=!1,o){if(!e)return!0;let a=e.type,l=e.values;if(!l||0===l.length)return!0;let c=!1;if("values"in l[0]){for(let e of l)try{let n=await p(e,t,r,i,o);if("AND"===a){if(!n)return!1}else if(n)return!0}catch(t){if(t instanceof s)throw t;if(t instanceof n.InconclusiveMatchError)i&&console.debug(`Failed to compute property ${e} locally: ${t}`),c=!0;else throw t}if(c)throw new n.InconclusiveMatchError("Can't match cohort without a given cohort property value");return"AND"===a}for(let e of l)try{let s;if("cohort"===e.type)s=await d(e,t,r,i,o);else if("flag"===e.type){if(!o)throw new n.InconclusiveMatchError(`Flag dependency '${e.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);s=await o(e)}else s=u(e,t);let l=e.negation||!1;if("AND"===a){if(!s&&!l||s&&l)return!1}else if(s&&!l||!s&&l)return!0}catch(t){if(t instanceof s)throw t;if(t instanceof n.InconclusiveMatchError)i&&console.debug(`Failed to compute property ${e} locally: ${t}`),c=!0;else throw t}if(c)throw new n.InconclusiveMatchError("can't match cohort without a given cohort property value");return"AND"===a}for(var f in r.ClientError=o.ClientError,r.FeatureFlagsPoller=o.FeatureFlagsPoller,r.InconclusiveMatchError=o.InconclusiveMatchError,r.RequiresServerEvaluation=o.RequiresServerEvaluation,r.matchProperty=o.matchProperty,r.parseSemver=o.parseSemver,r.relativeDateParseForFeatureFlagMatching=o.relativeDateParseForFeatureFlagMatching,o)-1===["ClientError","FeatureFlagsPoller","InconclusiveMatchError","RequiresServerEvaluation","matchProperty","parseSemver","relativeDateParseForFeatureFlagMatching"].indexOf(f)&&(r[f]=o[f]);
1Object.defineProperty(r,"__esModule",{value:!0})},327117,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n=["--unhandled-rejections","--unhandled_rejections"],a=new Set(["throw","strict","warn","warn-with-error-code","none"]),s=[...globalThis.process?.execArgv??[]],l=globalThis.process?.env?.NODE_OPTIONS;function u(e){let t;for(let r=0;r<e.length;r++){let i=e[r],o=n.find(e=>i===e||i.startsWith(`${e}=`));if(!o)continue;let s=i===o?e[++r]:i.slice(o.length+1);a.has(s)&&(t=s)}return t}function c(e=s,t=l){return u(e)??u(function(e){let t=[],r="",i=!1;for(let o=0;o<e.length;o++){let n=e[o];"\\"===n&&i&&o+1<e.length?r+=e[++o]:" "!==n||i?'"'===n?i=!i:r+=n:r&&(t.push(r),r="")}return r&&t.push(r),t}(t??""))??"throw"}let d=c();function p(e,t,r){e(t,{mechanism:{type:"unhandledRejection"===r?"onunhandledrejection":"onuncaughtexception",handled:!1}})}function f(t,r,i=d){let o=globalThis.process;if(o){let n;if("strict"===i)return void o.on("uncaughtExceptionMonitor",(e,r)=>p(t,e,r));o.on("uncaughtException",(n=!1,Object.assign((i,o)=>{let a=e.g.process.listeners("uncaughtException").filter(e=>"domainUncaughtExceptionClear"!==e.name&&!0!==e._posthogErrorHandler).length;p(t,i,o),n||0!==a||(n=!0,r(i))},{_posthogErrorHandler:!0})))}}function h(e,t=d){let r=globalThis.process;r&&"throw"!==t&&"strict"!==t&&"warn-with-error-code"!==t&&r.on("unhandledRejection",t=>{e(t,{mechanism:{type:"onunhandledrejection",handled:!1}})})}for(var g in i.d(o,{addUncaughtExceptionListener:()=>f,addUnhandledRejectionListener:()=>h,getUnhandledRejectionMode:()=>c}),r.addUncaughtExceptionListener=o.addUncaughtExceptionListener,r.addUnhandledRejectionListener=o.addUnhandledRejectionListener,r.getUnhandledRejectionMode=o.getUnhandledRejectionMode,o)-1===["addUncaughtExceptionListener","addUnhandledRejectionListener","getUnhandledRejectionMode"].indexOf(g)&&(r[g]=o[g]);Object.defineProperty(r,"__esModule",{value:!0})},672348,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{default:()=>s});let n=e.r(327117),a=e.r(744094);class s{constructor(e,t,r){this.client=e,this._exceptionAutocaptureEnabled=t.enableExceptionAutocapture||!1,this._logger=r,this._rateLimiter=new a.BucketedRateLimiter({...(0,a.resolveExceptionRateLimiterConfig)(t),refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(e){return(0,a.isObject)(e)&&"__posthog_previously_captured_error"in e&&!0===e.__posthog_previously_captured_error}static async buildEventMessage(e,t,r,i,o){let n={...o},s=e.buildFromUnknown(t,r);s.$exception_list=await e.modifyFrames(s.$exception_list);let l=a.ErrorTracking.getInjectedReleaseId();return l&&(n.$release_id=l),{event:"$exception",distinctId:i,properties:{...s,...n},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&((0,n.addUncaughtExceptionListener)(this.onException.bind(this),this.onFatalError.bind(this)),(0,n.addUnhandledRejectionListener)(this.onException.bind(this)))}onException(e,t){this.client.addPendingPromise((async()=>{if(!s.isPreviouslyCapturedError(e)){let r=await s.buildEventMessage(this.client.getErrorPropertiesBuilder(),e,t),i=r.properties,o=i?.$exception_list[0]?.type??"Exception";return this._rateLimiter.consumeRateLimit(o)?void this._logger.info("Skipping exception capture because of client rate limiting.",{exception:o}):this.client._capturePreparedEvent(r,!1)}})())}async onFatalError(e){console.error(e),await this.client.shutdown(2e3),globalThis.process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}}for(var l in r.default=o.default,o)-1===["default"].indexOf(l)&&(r[l]=o[l]);
1Object.defineProperty(r,"__esModule",{value:!0})},831806,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);class n{getProperty(e){return this._memoryStorage[e]}setProperty(e,t){this._memoryStorage[e]=null!==t?t:void 0}constructor(){this._memoryStorage={}}}for(var a in i.d(o,{PostHogMemoryStorage:()=>n}),r.PostHogMemoryStorage=o.PostHogMemoryStorage,o)-1===["PostHogMemoryStorage"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},90320,(e,t,r)=>{"use strict";var i=e.i(247167),o={};o.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};function a(){let e="u">typeof i.default?i.default.env?.POSTHOG_CAPTURE_MODE:void 0;return"v0"===e||"v1"===e?e:"v0"}for(var s in o.r(n),o.d(n,{resolveCaptureMode:()=>a}),r.resolveCaptureMode=n.resolveCaptureMode,n)-1===["resolveCaptureMode"].indexOf(s)&&(r[s]=n[s]);Object.defineProperty(r,"__esModule",{value:!0})},655731,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(e){return"string"==typeof e.event&&e.event.startsWith("$ai_")}for(var a in i.r(o),i.d(o,{isLegacyOnlyEvent:()=>n},{AI_ROUTE:"ai",ANALYTICS_ROUTE:"analytics"}),r.AI_ROUTE=o.AI_ROUTE,r.ANALYTICS_ROUTE=o.ANALYTICS_ROUTE,r.isLegacyOnlyEvent=o.isLegacyOnlyEvent,o)-1===["AI_ROUTE","ANALYTICS_ROUTE","isLegacyOnlyEvent"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},897930,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);class n extends Error{constructor({requestId:e,drops:t,retryExhausted:r,cause:i}){super(n.buildMessage(e,t,r,i)),this.name="CaptureV1Error",this.requestId=e,this.drops=t,this.retryExhausted=r,this.cause=i}static buildMessage(e,t,r,i){let o=`Capture V1 batch ${e} did not fully deliver: ${t.length} dropped, ${r.length} undelivered`;return i instanceof Error&&(o+=` (${i.message})`),o}}for(var a in i.d(o,{CaptureV1Error:()=>n}),r.CaptureV1Error=o.CaptureV1Error,o)-1===["CaptureV1Error"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},897124,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(e){if("boolean"==typeof e)return e;if("number"==typeof e)return 0!==e;if("string"==typeof e){let t=e.trim().toLowerCase();if("true"===t||"1"===t)return!0;if("false"===t||"0"===t)return!1}}function a(e){return"string"==typeof e?e:void 0}i.r(o);let s=[{property:"$cookieless_mode",optionKey:"cookieless_mode",coerce:n},{property:"$ignore_sent_at",optionKey:"disable_skew_correction",coerce:n},{property:"$process_person_profile",optionKey:"process_person_profile",coerce:n},{property:"$product_tour_id",optionKey:"product_tour_id",coerce:a}],l=[{property:"$session_id",field:"session_id"},{property:"$window_id",field:"window_id"}];function u(e,t,r){void 0===r||t in e||(e[t]=r)}function c(e){var t;let r={..."object"==typeof(t=e.properties)&&null!==t&&!Array.isArray(t)?e.properties:{}},i={};for(let{property:e,optionKey:t,coerce:o}of s)if(e in r){let n=o(r[e]);void 0!==n&&(i[t]=n),delete r[e]}let o={};for(let{property:e,field:t}of l)if(e in r){let i=r[e];"string"==typeof i&&(o[t]=i),delete r[e]}return delete r.$lib,delete r.$lib_version,u(r,"$set",e.$set),u(r,"$set_once",e.$set_once),{event:String(e.event??""),uuid:String(e.uuid??""),distinct_id:String(e.distinct_id??""),timestamp:function(e){if("string"==typeof e){let t=new Date(e);if(Number.isNaN(t.getTime()))return new Date().toISOString();let r=t.toISOString(),i=e.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1];return i&&i.length>3?r.replace(/\.\d{3}Z$/,`.${i}Z`):r}if(e instanceof Date)return Number.isNaN(e.getTime())?new Date().toISOString():e.toISOString();let t=null==e?new Date:new Date(e);return Number.isNaN(t.getTime())?new Date().toISOString():t.toISOString()}(e.timestamp),...o,options:i,properties:r}}function d(e,{createdAt:t,historicalMigration:r}){let i={created_at:t,batch:e.map(c)};return r&&(i.historical_migration=!0),i}for(var p in i.d(o,{buildV1Batch:()=>d,buildV1Event:()=>c,coerceBool:()=>n,coerceString:()=>a}),r.buildV1Batch=o.buildV1Batch,r.buildV1Event=o.buildV1Event,r.coerceBool=o.coerceBool,r.coerceString=o.coerceString,o)-1===["buildV1Batch","buildV1Event","coerceBool","coerceString"].indexOf(p)&&(r[p]=o[p]);
1Object.defineProperty(r,"__esModule",{value:!0})},719618,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{V1CaptureSender:()=>u});let n=e.r(744094),a=e.r(897930),s=e.r(897124),l=new Set([408,500,502,503,504]);class u{constructor(e,t){this.config=e,this.maxBackoffMs=e.maxBackoffMs??3e4,this.fetchFn=t.fetch,this.onError=t.onError,this.now=t.now??Date.now,this.sleep=t.sleep??(e=>new Promise(t=>(0,n.safeSetTimeout)(t,e))),this.generateRequestId=t.generateRequestId??n.uuidv7,this.compress=t.compress??n.gzipCompress}async sendV1Batch(e){if(0===e.length)return;let t=this.generateRequestId(),r=new Date(this.now()).toISOString(),{batch:i}=(0,s.buildV1Batch)(e,{createdAt:r,historicalMigration:this.config.historicalMigration}),o=`${this.config.host}/i/v1/analytics/events`,u=[],c=i,d=Math.max(1,this.config.maxAttempts);for(let e=1;e<=d;e++){let i,s,p=e===d,f=(0,n.safeJsonStringify)({created_at:r,...this.config.historicalMigration?{historical_migration:!0}:{},batch:c});try{let{response:r,signal:n}=i=await this.sendOnce(o,f,e,t),{status:d}=r;if(d<200||d>=300)if(!p&&l.has(d)){let t=this.parseRetryAfter(r);await i.waitFor(i.cancelBody()).catch(()=>{}),s=this.backoffDelay(e,t)}else{let e=await this.buildHttpError(r,d,i.waitFor);return this.surfaceBatchFailure(t,u,c,e)}else{let o;try{o=await i.waitFor(this.parseResponse(r))}catch(e){if(n.aborted)throw e;return this.surfaceBatchFailure(t,u,c,Error(`Capture V1 returned an unparseable ${d} response body`))}let l=this.classify(c,o,u);if(0===l.length)return this.surfacePartialDrops(t,u);if(p)return void this.onError(new a.CaptureV1Error({requestId:t,drops:u,retryExhausted:l.map(e=>e.uuid)}));c=l;let f=this.parseRetryAfter(r);s=this.backoffDelay(e,f)}}catch(r){if(i&&!i.signal.aborted)throw r;if(p)return this.surfaceBatchFailure(t,u,c,r);s=this.backoffDelay(e)}finally{i?.cleanup()}void 0!==s&&await this.sleep(s)}}async sendOnce(e,t,r,i){let o,a=this.buildHeaders(r,i),s=t;if(this.config.compressionEnabled){let e=await this.compress(t,this.config.isDebug);null!==e&&(s=e,a["Content-Encoding"]="gzip")}let l=new AbortController,u="waiting for response headers",c=new Promise((e,t)=>{o=(0,n.safeSetTimeout)(()=>{let e=Error(`Capture V1 request timed out ${u} after ${this.config.requestTimeoutMs}ms`);e.name="AbortError",t(e),l.abort(e)},this.config.requestTimeoutMs)});try{let t,r=this.fetchFn(e,{method:"POST",headers:a,body:s,signal:l.signal}),i=!1;r.then(e=>{l.signal.aborted&&!i&&this.cancelBody(e)}).catch(()=>{});let n=await Promise.race([r,c]);i=!0,u="while reading the response body";let d=!1,p=()=>t??=this.cancelBody(n);return{response:n,signal:l.signal,waitFor:e=>Promise.race([e,c]),cancelBody:p,cleanup:()=>{!d&&(d=!0,clearTimeout(o),l.signal.aborted&&p())}}}catch(e){throw clearTimeout(o),e}}buildHeaders(e,t){let r=`${this.config.libraryId}/${this.config.libraryVersion}`,i={"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`,"PostHog-Sdk-Info":r,"PostHog-Attempt":String(e),"PostHog-Request-Id":t,"PostHog-Request-Timestamp":new Date(this.now()).toISOString()};return this.config.userAgent&&(i["User-Agent"]=this.config.userAgent),i}classify(e,t,r){let i=t.results??{},o=[];for(let t of e){let e=i[t.uuid];e&&("drop"===e.result?r.push({uuid:t.uuid,details:e.details??void 0}):"retry"===e.result&&o.push(t))}return o}backoffDelay(e,t){let r=Math.min(this.config.initialRetryDelayMs*2**(e-1),this.maxBackoffMs);return void 0===t?r:Math.max(r,Math.min(t,this.maxBackoffMs))}parseRetryAfter(e){let t=e.headers?.get("Retry-After");if(!t)return;let r=t.trim();if(/^\d+$/.test(r)){let e=parseInt(r,10);return Number.isFinite(e)&&e>0?1e3*e:void 0}let i=Date.parse(r);if(Number.isNaN(i))return;let o=i-this.now();return o>0?o:void 0}async parseResponse(e){let t=JSON.parse(await e.text());if("object"!=typeof t||null===t||Array.isArray(t))throw Error("unexpected response shape");let r=t.results;if(void 0!==r&&("object"!=typeof r||null===r||Array.isArray(r)))throw Error("unexpected results shape");return{results:r??{}}}async buildHttpError(e,t,r){let i="";try{i=(await r(e.text())).slice(0,512)}catch{}let o=i?`: ${i}`:"";return Error(`Capture V1 request failed with HTTP ${t}${o}`)}
1surfaceBatchFailure(e,t,r,i){this.onError(new a.CaptureV1Error({requestId:e,drops:t,retryExhausted:r.map(e=>e.uuid),cause:i}))}surfacePartialDrops(e,t){t.length>0&&this.onError(new a.CaptureV1Error({requestId:e,drops:t,retryExhausted:[]}))}async cancelBody(e){try{await e.body?.cancel()}catch{}}}for(var c in r.V1CaptureSender=o.V1CaptureSender,o)-1===["V1CaptureSender"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},569128,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};for(var n in i.r(o),i.d(o,{},{AI_BATCH_TARGET_BYTES:5242880,AI_CAPTURE_ENDPOINT_PATH:"/i/v0/ai/batch/",AI_CAPTURE_ROUTE:"ai-capture",AI_MAX_EVENT_BYTES:8388608}),r.AI_BATCH_TARGET_BYTES=o.AI_BATCH_TARGET_BYTES,r.AI_CAPTURE_ENDPOINT_PATH=o.AI_CAPTURE_ENDPOINT_PATH,r.AI_CAPTURE_ROUTE=o.AI_CAPTURE_ROUTE,r.AI_MAX_EVENT_BYTES=o.AI_MAX_EVENT_BYTES,o)-1===["AI_BATCH_TARGET_BYTES","AI_CAPTURE_ENDPOINT_PATH","AI_CAPTURE_ROUTE","AI_MAX_EVENT_BYTES"].indexOf(n)&&(r[n]=o[n]);Object.defineProperty(r,"__esModule",{value:!0})},723312,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{eventByteSize:()=>l,partitionAiBatch:()=>u});let n=e.r(744094),a=e.r(569128),s=new TextEncoder;function l(e){return s.encode((0,n.safeJsonStringify)(e)).length}function u(e,t=a.AI_MAX_EVENT_BYTES,r=a.AI_BATCH_TARGET_BYTES){let i=[],o=[],n=[],s=0;for(let a of e){if(void 0===a)continue;let e=l(a);if(e>t){o.push({event:"string"==typeof a.event?a.event:"unknown",bytes:e});continue}n.length>0&&s+e>r&&(i.push(n),n=[],s=0),n.push(a),s+=e}return n.length>0&&i.push(n),{batches:i,dropped:o}}for(var c in r.eventByteSize=o.eventByteSize,r.partitionAiBatch=o.partitionAiBatch,o)-1===["eventByteSize","partitionAiBatch"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},710012,(e,t,r)=>{"use strict";var i={};i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PostHogBackendClient:()=>S,_resetDeprecationWarningsForTests:()=>b});let n=e.r(49384),a=e.r(744094),s=e.r(238350),l=e.r(113469),u=e.r(915954),c=e.r(672348);var d=i.n(c);let p=e.r(831806),f=e.r(90320),h=e.r(655731),g=e.r(719618),y=e.r(723312),_=e.r(569128),m=new Set;function v(e,t){m.has(e)||(m.add(e),console.warn(`[PostHog] ${t}`))}function b(){m.clear()}class S extends a.PostHogCoreStateless{constructor(e,t={}){const r=function(e){return"string"==typeof e?e.trim():""}(e),i={...t,maxQueueSize:t.maxQueueSize??1e4,flushInterval:t.flushInterval??5e3,host:function(e){return("string"==typeof e?e.trim():"")||"https://us.i.posthog.com"}(t.host),personalApiKey:function(e){return("string"==typeof e?e.trim():"")||void 0}(t.secretKey??t.personalApiKey)};if(super(r,i),this._memoryStorage=new p.PostHogMemoryStorage,this._aiCaptureRouteActive=!1,this._minimalFlagCalledEvents=!1,this.options=i,this.captureMode=(0,f.resolveCaptureMode)(),this.enableFullAiCapture=!0===i.enableFullAiCapture,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval="number"==typeof i.featureFlagsPollingInterval?Math.max(i.featureFlagsPollingInterval,100):3e4,"number"==typeof i.waitUntilDebounceMs&&(this.options.waitUntilDebounceMs=Math.max(i.waitUntilDebounceMs,0)),"number"==typeof i.waitUntilMaxWaitMs&&(this.options.waitUntilMaxWaitMs=Math.max(i.waitUntilMaxWaitMs,0)),!this.disabled&&i.personalApiKey){if(i.personalApiKey.includes("phc_"))throw Error('Your Personal API key is invali
1d. These keys are prefixed with "phx_" and can be created in PostHog project settings.');!1!==i.enableLocalEvaluation&&(this.featureFlagsPoller=new u.FeatureFlagsPoller({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:i.personalApiKey,projectApiKey:r,timeout:i.requestTimeout??1e4,host:this.host,fetch:i.fetch,onError:e=>{this._events.emit("error",e)},onLoad:e=>{this._events.emit("localEvaluationFlagsLoaded",e)},onMinimalFlagCalledEvents:e=>{this._minimalFlagCalledEvents=e},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation,evaluationContexts:i.evaluationContexts??i.evaluationEnvironments}))}this.errorTracking=new(d())(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||5e4}enqueue(e,t,r,i){super.enqueue(e,t,r,i),this.scheduleDebouncedFlush()}_flushEventsAndSpans(e=!1){let t=this.flushWithPendingPromises();return!this._traces||e&&this._traces.throttled?t:(0,a.allSettled)([t,this._traces.flush().catch(()=>{})]).then(([e])=>{if("rejected"===e.status)throw e.reason})}flushAutomatic(){return this._flushKeepingRuntimeAlive(!0)}async flush(){return this._flushKeepingRuntimeAlive(!1)}_flushKeepingRuntimeAlive(e){let t=this._flushEventsAndSpans(e),r=this.options.waitUntil;if(r&&!this._waitUntilCycle)try{r(t.catch(()=>{}))}catch{}return t}scheduleDebouncedFlush(){let e=this.options.waitUntil;if(!e||this.disabled||this.optedOut)return;if(!this._waitUntilCycle){let t,r=new Promise(e=>{t=e});try{e(r)}catch{return}this._waitUntilCycle={resolve:t,startedAt:Date.now(),timer:void 0}}let t=Date.now()-this._waitUntilCycle.startedAt,r=this.options.waitUntilMaxWaitMs??500;if(void 0!==this._waitUntilCycle.timer&&clearTimeout(this._waitUntilCycle.timer),t>=r)return void this.resolveWaitUntilFlush();let i=this.options.waitUntilDebounceMs??50;this._waitUntilCycle.timer=(0,a.safeSetTimeout)(()=>{this.resolveWaitUntilFlush()},i)}_consumeWaitUntilCycle(){let e=this._waitUntilCycle;return e&&(clearTimeout(e.timer),this._waitUntilCycle=void 0),e?.resolve}async resolveWaitUntilFlush(){let e=this._consumeWaitUntilCycle();try{await this._flushEventsAndSpans()}catch{}finally{e?.()}}getPersistedProperty(e){return this._memoryStorage.getProperty(e)}setPersistedProperty(e,t){return this._memoryStorage.setProperty(e,t)}fetch(e,t){return this.options.fetch?this.options.fetch(e,t):fetch(e,t)}getQueueRouteKey(e){return"v1"===this.captureMode&&(0,h.isLegacyOnlyEvent)(e)?h.AI_ROUTE:h.ANALYTICS_ROUTE}persistedQueueKeyForRoute(e){return e===_.AI_CAPTURE_ROUTE?a.PostHogPersistedProperty.AiCaptureQueue:e===h.AI_ROUTE?a.PostHogPersistedProperty.AiQueue:a.PostHogPersistedProperty.Queue}getActiveQueueRoutes(){let e="v1"===this.captureMode?[h.ANALYTICS_ROUTE,h.AI_ROUTE]:[h.ANALYTICS_ROUTE];return this._aiCaptureRouteActive&&e.push(_.AI_CAPTURE_ROUTE),e}getBatchEndpointPath(e){return e===_.AI_CAPTURE_ROUTE?_.AI_CAPTURE_ENDPOINT_PATH:super.getBatchEndpointPath(e)}async sendBatch(e,t,r=h.ANALYTICS_ROUTE){if(r===_.AI_CAPTURE_ROUTE)return this.sendAiCaptureBatch(e,t);if("v1"!==this.captureMode||r===h.AI_ROUTE)return super.sendBatch(e,t,r);let i=e.filter(e=>void 0!==e);await this.getV1Sender().sendV1Batch(i)}async sendAiCaptureBatch(e,t){let{batches:r,dropped:i}=(0,y.partitionAiBatch)(e);for(let{event:e,bytes:t}of i){let r=`Event ${e} (${t} bytes) exceeds the ${_.AI_MAX_EVENT_BYTES/1048576}MiB limit for ${_.AI_CAPTURE_ENDPOINT_PATH}, dropping.`;this._logger.error(r),this._events.emit("error",Error(r))}for(let e of r)await this.sendAiSubBatch(e,t)}async sendAiSubBatch(e,t){try{await super.sendBatch(e,t,_.AI_CAPTURE_ROUTE)}catch(i){if(!(0,a.isPostHogFetchContentTooLargeError)(i))throw i;if(1===e.length){let[t]=e,r="string"==typeof t.event?t.event:"unknown",i=`Event ${r} (${(0,y.eventByteSize)(t)} bytes) was rejected with 413 by ${_.AI_CAPTURE_ENDPOINT_PATH} on its own, dropping.`;this._logger.error(i),this._events.emit("error",Error(i));return}let r=Math.ceil(e.length/2);await this.sendAiSubBatch(e.slice(0,r),t),await this.sendAiSubBatch(e.slice(r),t)}}getV1Sender(){return this._v1Sender||(this._v1Sender=new g.V1CaptureSender({host:this.host,apiKey:this.apiKey,library
1Id:this.getLibraryId(),libraryVersion:this.getLibraryVersion(),userAgent:this.getCustomUserAgent()||void 0,historicalMigration:this.historicalMigration,compressionEnabled:!this.disableCompression,requestTimeoutMs:this.requestTimeout,maxAttempts:(this.options.fetchRetryCount??3)+1,initialRetryDelayMs:this.options.fetchRetryDelay??3e3,isDebug:this.isDebug},{fetch:(e,t)=>this.fetch(e,t),onError:e=>this._events.emit("error",e),compress:e=>this.compressPayload(e)})),this._v1Sender}getLibraryVersion(){return n.version}get metrics(){return this._metrics||(this._metrics=new a.PostHogMetrics(this,(0,a.resolveMetricsConfig)(this.options.metrics),this._logger)),this._metrics}initializeSpanContextManager(){return new a.SyncSpanContextManager}hostResourceAttributes(){return{}}get _spanContextManager(){return this._spanContext||(this._spanContext=this.initializeSpanContextManager()),this._spanContext}get _tracesPipeline(){if(this.options.traces)return this._traces||(this._traces=new a.PostHogTraces(this,(0,a.resolveTracesConfig)(this.options.traces,this.hostResourceAttributes(),this._logger),this._logger,()=>this._tracingContext(),this._spanContextManager,()=>this.scheduleDebouncedFlush())),this._traces}_tracingContext(){let e=this.context?.get();return{distinctId:e?.distinctId,sessionId:e?.sessionId}}startSpan(e,t){return this._tracesPipeline?.startSpan(e,t)??(0,a.inertSpan)(t,this._spanContextManager.active())}withSpan(e,t,r){let i="function"==typeof t?void 0:t,o="function"==typeof t?t:r,n=this._tracesPipeline;return n?i?n.withSpan(e,i,o):n.withSpan(e,o):(0,a.runWithActiveSpan)(this._spanContextManager,(0,a.inertSpan)(i,this._spanContextManager.active()),o)}getActiveSpan(){return this._spanContextManager.active()??null}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}getCommonEventProperties(){let e=super.getCommonEventProperties();return(this.options.isServer??!0)&&(e.$is_server=!0),e}enable(){return super.optIn()}disable(){return super.optOut()}debug(e=!0){super.debug(e),this.featureFlagsPoller?.debug(e)}_warnIfInvalidCapture(e,t,r){"string"==typeof e&&this._logger.warn(t),"$exception"!==e.event||e._originatedFromCaptureException||this._logger.warn(r)}_sendPreparedEvent(e,t,r,i,o){return this.addPendingPromise(this._prepareEventMessage(t,i).then(({distinctId:t,event:i,properties:n,options:a})=>{let s={timestamp:a.timestamp,disableGeoip:a.disableGeoip,uuid:a.uuid},l={distinctId:t,event:i,properties:{...n,...this.getCommonEventProperties()}};return r?this.sendImmediate(e,l,s,o):this.enqueue(e,l,s,o)}).catch(e=>{e&&console.error(e)}))}_capturePreparedEvent(e,t){return this._sendPreparedEvent("capture",e,t)}capture(e){this._warnIfInvalidCapture(e,"Called capture() with a string as the first argument when an object was expected.","Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this._capturePreparedEvent(e,!1)}async captureImmediate(e){return this._warnIfInvalidCapture(e,"Called captureImmediate() with a string as the first argument when an object was expected.","Capturing a `$exception` event via `posthog.captureImmediate('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureExceptionImmediate(error)` instead, which attaches this metadata by default."),this._capturePreparedEvent(e,!0)}captureAi(e){if(this.disabled)return;let t=(0,a.getEventUuid)(e.uuid,a.uuidv7);return this._sendPreparedAiEvent({...e,uuid:t},!1),t}async captureAiImmediate(e){if(this.disabled)return;let t=(0,a.getEventUuid)(e.uuid,a.uuidv7);return await this._sendPreparedAiEvent({...e,uuid:t},!0),t}_sendPreparedAiEvent(e,t){return"string"!=typeof e?.event||e.event.startsWith("$ai_")||this._logger.debug(`captureAi called with non-AI event ${e.event}; routing it to the AI endpoint anyway.`),this._aiCaptureRouteActive=!0,this._sendPreparedEvent("capture",e,t,void 0,_.AI_CAPTURE_ROUTE)}identify({distinctId:e,properties:t={},disableGeoip:r}){let{$set:i,$set_once:o,$anon_distinct_id:n,...a}=t;this._sendPreparedEvent("identify",{distinctId:e,event:"$identify",properties:{$set:i||a,$set_once:o||{},$anon_distinct_id:n??void 0},disableGeoip:r},!1,{includeContextProperties:!1})}async identifyImmediate({distinctId:e,properties:t={},disableGeoip:r}){let{$set:i,$set_once:o,$anon_distinct_id:n,...a}=t;await this._sendPreparedEvent("identify",{distinctId:e,event:"$identify",properties:{$set:i||a,$set_once:o||{},$anon_distinct_id:n??void 0},disableGeoip:r},!0,{includeContextProperties:!1})}setPersonProperties({distinctId:e,properties:t={},propertiesOnce:r={}}){if(0===Object.keys(t).length&&0===Object.keys(r).length)return;let i={};Object.keys(t).length>0&&(i.$set=t),Object.keys(r).length>0&&(i.$set_once=r),this.capture({distinctId:e,event:"$set",properties:i})}unsetPersonProperties({distinctId:e,properties:t}){let r=(Array.isArray(t)?t:[t]).filter(e=>"string"==typeof e&&e.trim().length>0);0!==r.length&&this.capture({distinctId:e,event:"$set",properties:{$unset:r}})}alias(e){this._sendPreparedEvent("alias",{distinctId:e.distinctId,event:"$create_alias",properties:{distinct_id:e.distinctId,alias:e.alias},disableGeoip:e.disableGeoip},!1,{includeContextProperties:!1})}async aliasImmediate(e){await this._sendPreparedEvent("alias",{distinctId:e.distinctId,event:"$create_alias",properties:{distinct_id:e.distinctId,alias:e.alias},disableGeoip:e.disableGeoip},!0,{includeContextProperties:!1})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}async waitForLocalEvaluationReady(e=3e4){return!!this.isLocalEvaluationReady()||void 0!==this.featureFlagsPoller&&new Promise(t=>{let r=setTimeout(()=>{i(),t(!1)},e),i=this._events.on("localEvaluationFlagsLoaded",e=>{clearTimeout(r),i(),t(e>0)})})}_resolveDistinctId(e,t){return"string"==typeof e?{distinctId:e,options:t}:{distinctId:this.context?.get()?.distinctId,options:e}}async _getFeatureFlagResult(e,t,r={},i){let o,n,a,l,c,d,p,f;if(this.disabled)return void this._logger.warn("The client is disabled");let h=r.sendFeatureFlagEvents??!0;if(void 0!==this._flagOverrides&&e in this._flagOverrides){let t=this._flagOverrides[e];if(void 0===t)return;let r=this._payloadOverrides?.[e];return{key:e,enabled:!1!==t,variant:"string"==typeof t?t:void 0,payload:r}}let{groups:g,disableGeoip:y}=r,{onlyEvaluateLocally:_,personProperties:m,groupProperties:v}=r,b=this.addLocalPersonAndGroupProperties(t,g,m,v);m=b.allPersonProperties,v=b.allGroupProperties;let S=this.createFeatureFlagEvaluationContext(t,g,this.personPropertiesForLocalEvaluation(t,m),v);void 0==_&&(_=this.options.strictLocalEvaluation??!1);let P=!1;if(void 0!==this.featureFlagsPoller){await this.featureFlagsPoller?.loadFeatureFlags();let t=this.featureFlagsPoller?.featureFlagsByKey[e];if(t)try{let r=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(t,S,{matchValue:i});if(r){P=!0;let i=r.value;c=t.id,p="Evaluated locally",f=t.has_experiment,o={key:e,enabled:!1!==i,variant:"string"==typeof i?i:void 0,payload:r.payload??void 0}}}catch(t){if(t instanceof u.RequiresServerEvaluation||t instanceof u.InconclusiveMatchError)this._logger?.info(`${t.name} when computing flag locally: ${e}: ${t.message}`);else throw t}}if(!P&&!_){let t=await super.getFeatureFlagDetailsStateless(S.distinctId,S.groups,m,v,y,[e]);if(void 0===t)l=s.FeatureFlagError.UNKNOWN_ERROR;else{this._minimalFlagCalledEvents=!0===t.minimalFlagCalledEvents,n=t.requestId,a=t.evaluatedAt;let r=[];t.errorsWhileComputingFlags&&r.push(s.FeatureFlagError.ERRORS_WHILE_COMPUTING),t.quotaLimited?.includes("feature_flags")&&r.push(s.FeatureFlagError.QUOTA_LIMITED);let i=t.flags[e];if(void 0===i)r.push(s.FeatureFlagError.FLAG_MISSING);else{let t;if(c=i.metadata?.id,d=i.metadata?.version,p=i.reason?.description??i.reason?.code,f=i.metadata?.has_experiment,i.metadata?.payload!==void 0)try{t=JSON.parse(i.metadata.payload)}catch{t=i.metadata.payload}o={key:e,enabled:i.enabled,variant:i.variant??void 0,payload:t}}r.length>0&&(l=r.join(","))}}if(h){let r=void 0===o?void 0:!1!==o.enabled&&(o.variant??!0),i={$feature_flag:e,$feature_flag_response:r,$feature_flag_id:c,$feature_flag_version:d,$feature_flag_reason:p,locally_evaluated:P,[`$feature/${e}`]:r,$feature_flag_request_id:n,$feature_flag_evaluated_at:P?Date.now():a};if(void 0!==f&&(i.$feature_flag_has_experiment=f),P&&this.featureFlagsPoller){let e=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();void 0!==e&&(i.$feature_flag_definitions_loaded_at=e)}l&&(i.$feature_flag_error=l),this._captureFlagCalledEventIfNeeded({distinctId:t,key:e,response:r,groups:g,disableGeoip:y,properties:i})}return void 0!==o&&void 0!==this._payloadOverrides&&e in this._payloadOverrides&&(o={...o,payload:this._payloadOverrides[e]}),o}async getFeatureFlag(e,t,r){v("getFeatureFlag","`getFeatureFlag` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlag(key)` instead — this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(e,t,{...r,sendFeatureFlagEvents:r?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});if(void 0!==i)return!1!==i.enabled&&(i.variant??!0)}async getFeatureFlagPayload(e,t,r,i){if(v("getFeatureFlagPayload","`getFeatureFlagPayload` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlagPayload(key)` instead — this consolidates flag evaluation into a single `/flags` request per incoming request."),void 0!==this._payloadOverrides&&e in this._payloadOverrides)return this._payloadOverrides[e];let o=await this._getFeatureFlagResult(e,t,{...i,sendFeatureFlagEvents:!1},r);if(void 0!==o)return o.payload??null}async getFeatureFlagResult(e,t,r){let{distinctId:i,options:o}=this._resolveDistinctId(t,r);return i?this._getFeatureFlagResult(e,i,{...o,sendFeatureFlagEvents:o?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0}):void this._logger.warn("[PostHog] distinctId is required — pass it explicitly or use withContext()")}async getRemoteConfigPayload(e){if(this.disabled)return void this._logger.warn("The client is disabled");if(!this.options.personalApiKey)throw Error("Personal API key is required for remote config payload decryption");let t=await this._requestRemoteConfigPayload(e);if(!t)return;let r=await t.json();if("string"==typeof r)try{return JSON.parse(r)}catch(e){}return r}async isFeatureEnabled(e,t,r){v("isFeatureEnabled","`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead — this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(e,t,{...r,sendFeatureFlagEvents:r?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});return void 0===i?void 0:!1!==i.enabled&&!!(i.variant??!0)}async getAllFlags(e,t){let{distinctId:r,options:i}=this._resolveDistinctId(e,t);return r?(await this.getAllFlagsAndPayloads(r,i)).featureFlags||{}:(this._logger.warn("[PostHog] distinctId is required to get feature flags — pass it explicitly or use withContext()"),{})}async getAllFlagsAndPayloads(e,t){let{distinctId:r,options:i}=this._resolveDistinctId(e,t);if(!r)return this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads — pass it explicitly or use withContext()"),{featureFlags:{},featureFlagPayloads:{}};if(this.disabled)return this._logger.warn("The client is disabled"),{featureFlags:{},featureFlagPayloads:{}};let{groups:o,disableGeoip:n,flagKeys:a}=i||{},{onlyEvaluateLocally:s,personProperties:l,groupProperties:u}=i||{},c=this.addLocalPersonAndGroupProperties(r,o,l,u);l=c.allPersonProperties,u=c.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(r,o,this.personPropertiesForLocalEvaluation(r,l),u);void 0==s&&(s=this.options.strictLocalEvaluation??!1);let p=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),f={},h={},g=!0;if(p&&(f=p.response,h=p.payloads,g=p.fallbackToFlags),g&&!s){let e=await super.getFeatureFlagsAndPayloadsStateless(d.distinctId,d.groups,l,u,n,a);f={...f,...e.flags||{}},h={...h,...e.payloads||{}}}return void 0!==this._flagOverrides&&(f={...f,...this._flagOverrides}),void 0!==this._payloadOverrides&&(h={...h,...this._payloadOverrides}),{featureFlags:f,featureFlagPayloads:h}}async evaluateFlags(e,t){let r,i,{distinctId:o,options:n}=this._resolveDistinctId(e,t);if(!o)return this._logger.warn("[PostHog] distinctId is required to evaluate feature flags — pass it explicitly or use withContext()"),new l.FeatureFlagEvaluations({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});if(this.disabled)return this._logger.warn("The client is disabled"),new l.FeatureFlagEvaluations({host:this._getFeatureFlagEvaluationsHost(),distinctId:o,flags:{}});let{groups:a,disableGeoip:s}=n||{},u=n?.flagKeys??void 0;if(u?.length===0)return new l.FeatureFlagEvaluations({host:this._getFeatureFlagEvaluationsHost(),distinctId:o,groups:a,disableGeoip:s,flags:{}});let{onlyEvaluateLocally:c,personProperties:d,groupProperties:p}=n||{},f=this.addLocalPersonAndGroupProperties(o,a,d,p);d=f.allPersonProperties,p=f.allGroupProperties;let h=this.createFeatureFlagEvaluationContext(o,a,this.personPropertiesForLocalEvaluation(o,d),p);void 0==c&&(c=this.options.strictLocalEvaluation??!1);let g=u?new Set(u):void 0,y={},_=!1,m=!1,v=await this.featureFlagsPoller?.getAllFlagsAndPayloads(h,u),b=new Set;if(v)for(let[e,t]of Object.entries(v.response)){let r=this.featureFlagsPoller?.featureFlagsByKey[e];y[e]={key:e,enabled:!1!==t,variant:"string"==typeof t?t:void 0,payload:v.payloads[e],id:r?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0,hasExperiment:r?.has_experiment},b.add(e)}let S=void 0!==g&&Array.from(g).some(e=>this.featureFlagsPoller?.featureFlagsByKey[e]===void 0);if((!v||v.fallbackToFlags||S)&&!c){let e=await super.getFeatureFlagDetailsStateless(h.distinctId,h.groups,d,p,s,u);if(e)for(let[t,o]of(this._minimalFlagCalledEvents=!0===e.minimalFlagCalledEvents,r=e.requestId,i=e.evaluatedAt,_=!!e.errorsWhileComputingFlags,m=Array.isArray(e.quotaLimited)&&e.quotaLimited.includes("feature_flags"),Object.entries(e.flags))){let e;if(!b.has(t)){if(o.metadata?.payload!==void 0)try{e=JSON.parse(o.metadata.payload)}catch{e=o.metadata.payload}y[t]={key:t,enabled:o.enabled,variant:o.variant,payload:e,id:o.metadata?.id,version:o.metadata?.version,reason:o.reason?.description??o.reason?.code,locallyEvaluated:!1,hasExperiment:o.metadata?.has_experiment}}}}if(void 0!==this._flagOverrides)for(let[e,t]of Object.entries(this._flagOverrides)){if(void 0===t){delete y[e];continue}let r=y[e];y[e]={key:e,enabled:!1!==t,variant:"string"==typeof t?t:void 0,payload:r?.payload,id:r?.id,version:r?.version,reason:r?.reason,locallyEvaluated:r?.locallyEvaluated??!1,hasExperiment:r?.hasExperiment}}if(void 0!==this._payloadOverrides)for(let[e,t]of Object.entries(this._payloadOverrides)){let r=y[e];r&&(y[e]={...r,payload:t})}if(void 0!==g)for(let e of Object.keys(y))g.has(e)||delete y[e];return new l.FeatureFlagEvaluations({host:this._getFeatureFlagEvaluationsHost(),distinctId:o,groups:a,disableGeoip:s,flags:y,requestId:r,evaluatedAt:i,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:_,quotaLimited:m})}
1_shouldSendMinimalFlagCalledEvent(e,t){return"$feature_flag_called"===e&&this._minimalFlagCalledEvents&&!1===t.$feature_flag_has_experiment}_captureFlagCalledEventIfNeeded(e){let{distinctId:t,key:r,response:i,groups:o,disableGeoip:n,properties:a}=e,s=o&&Object.keys(o).length>0?`_${JSON.stringify(Object.entries(o).sort(([e],[t])=>e<t?-1:+(e>t)))}`:"",l=`${r}_${i}${s}`;t in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[t].has(l)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),this.distinctIdHasSentFlagCalls[t]instanceof Set?this.distinctIdHasSentFlagCalls[t].add(l):this.distinctIdHasSentFlagCalls[t]=new Set([l]),this.capture({distinctId:t,event:"$feature_flag_called",properties:a,groups:o,disableGeoip:n}))}_getFeatureFlagEvaluationsHost(){return this._featureFlagEvaluationsHost||(this._featureFlagEvaluationsHost={captureFlagCalledEventIfNeeded:e=>this._captureFlagCalledEventIfNeeded(e),logWarning:e=>{!1!==this.options.featureFlagsLogWarnings&&console.warn(`[PostHog] ${e}`)}}),this._featureFlagEvaluationsHost}groupIdentify({groupType:e,groupKey:t,properties:r,distinctId:i,disableGeoip:o}){this._sendPreparedEvent("capture",{distinctId:i||`$${e}_${t}`,event:"$groupidentify",properties:{$group_type:e,$group_key:t,$group_set:r||{}},disableGeoip:o},!1,{includeContextProperties:!1})}async groupIdentifyImmediate({groupType:e,groupKey:t,properties:r,distinctId:i,disableGeoip:o}){await this._sendPreparedEvent("capture",{distinctId:i||`$${e}_${t}`,event:"$groupidentify",properties:{$group_type:e,$group_key:t,$group_set:r||{}},disableGeoip:o},!0,{includeContextProperties:!1})}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}overrideFeatureFlags(e){let t=e=>Object.fromEntries(e.map(e=>[e,!0]));if(!1===e){this._flagOverrides=void 0,this._payloadOverrides=void 0;return}if(Array.isArray(e)){this._flagOverrides=t(e);return}if(this._isFeatureFlagOverrideOptions(e)){"flags"in e&&(!1===e.flags?this._flagOverrides=void 0:Array.isArray(e.flags)?this._flagOverrides=t(e.flags):void 0!==e.flags&&(this._flagOverrides={...e.flags})),"payloads"in e&&(!1===e.payloads?this._payloadOverrides=void 0:void 0!==e.payloads&&(this._payloadOverrides={...e.payloads}));return}this._flagOverrides={...e}}_isFeatureFlagOverrideOptions(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;if("flags"in e){let t=e.flags;if(!1===t||Array.isArray(t)||"object"==typeof t&&null!==t)return!0}if("payloads"in e){let t=e.payloads;if(!1===t||"object"==typeof t&&null!==t)return!0}return!1}withContext(e,t,r){return this.context?this.context.run(e,t,r):t()}getContext(){return this.context?.get()}enterContext(e,t){this.context?.enter(e,t)}async _shutdown(e){let t=Date.now()+(e??3e4),r=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(e),this.errorTracking.shutdown(),this._metrics&&(await (0,a.raceWithTimeout)(this._metrics.flush().catch(()=>{}),Math.max(0,t-Date.now())),this._metrics.reset()),this._traces&&(await (0,a.raceWithTimeout)(this._traces.flush().catch(()=>{}),Math.max(0,t-Date.now())),this._traces.reset());try{return await super._shutdown(Math.max(0,t-Date.now()))}finally{this.distinctIdHasSentFlagCalls={},r?.()}}async _requestRemoteConfigPayload(e){if(this.disabled||!this.apiKey||!this.options.personalApiKey)return;let t=`${this.host}/api/projects/@current/feature_flags/${e}/remote_config?token=${encodeURIComponent(this.apiKey)}`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",Authorization:`Bearer ${this.options.personalApiKey}`}},i=null;if(this.options.requestTimeout&&"number"==typeof this.options.requestTimeout){let e=new AbortController;i=(0,a.safeSetTimeout)(()=>{e.abort()},this.options.requestTimeout),r.signal=e.signal}try{return await this.fetch(t,r)}catch(e){this._events.emit("error",e);return}finally{i&&clearTimeout(i)}}extractPropertiesFromEvent(e,t){if(!e)return{personProperties:{},groupProperties:{}};let r={},i={};for(let[o,n]of Object.entries(e))if((0,a.isPlainObject)(n)&&t&&o in t){let e={};for(let[t,r]of Object.entries(n))e[String(t)]=String(r);
1i[String(o)]=e}else r[String(o)]=String(n);return{personProperties:r,groupProperties:i}}async getFeatureFlagsForEvent(e,t,r,i){if(this.disabled||!this.apiKey)return void this._logger.warn("The client is disabled");let o=i?.personProperties||{},n=i?.groupProperties||{},a=i?.flagKeys;if(i?.onlyEvaluateLocally??this.options.strictLocalEvaluation)if(!((this.featureFlagsPoller?.featureFlags?.length||0)>0))return{};else{let i={};for(let[e,r]of Object.entries(t||{}))i[e]=String(r);return await this.getAllFlags(e,{groups:i,personProperties:o,groupProperties:n,disableGeoip:r,onlyEvaluateLocally:!0,flagKeys:a})}if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let i={};for(let[e,r]of Object.entries(t||{}))i[e]=String(r);return await this.getAllFlags(e,{groups:i,personProperties:o,groupProperties:n,disableGeoip:r,onlyEvaluateLocally:!0,flagKeys:a})}return(await super.getFeatureFlagsStateless(e,t,o,n,r)).flags}addLocalPersonAndGroupProperties(e,t,r,i){let o={...r||{}},n={};if(t)for(let e of Object.keys(t))n[e]={$group_key:t[e],...i?.[e]||{}};return{allPersonProperties:o,allGroupProperties:n}}personPropertiesForLocalEvaluation(e,t){return{distinct_id:e,...t||{}}}createFeatureFlagEvaluationContext(e,t,r,i){return{distinctId:e,groups:t||{},personProperties:r||{},groupProperties:i||{},evaluationCache:{}}}captureException(e,t,r,i,o){if(!d().isPreviouslyCapturedError(e)){let n=Error("PostHog syntheticException");this.addPendingPromise(d().buildEventMessage(this.getErrorPropertiesBuilder(),e,{syntheticException:n},t,r).then(e=>this._capturePreparedEvent({...e,uuid:i,flags:o},!1)))}}async captureExceptionImmediate(e,t,r,i){if(!d().isPreviouslyCapturedError(e)){let o=Error("PostHog syntheticException");return this.addPendingPromise(d().buildEventMessage(this.getErrorPropertiesBuilder(),e,{syntheticException:o},t,r).then(e=>this.captureImmediate({...e,flags:i})))}}async prepareEventMessage(e){return this._prepareEventMessage(e)}async _prepareEventMessage(e,t={}){let{distinctId:r,event:i,properties:o,groups:n,flags:s,sendFeatureFlags:l,timestamp:u,disableGeoip:c,uuid:d}=e,p=this.context?.get(),f=t.includeContextProperties??!0,h=r||p?.distinctId,g=f?{...this.props,...p?.properties||{},...o||{}}:{...o||{}};h||(h=(0,a.uuidv7)(),g.$process_person_profile=!1),f&&p?.sessionId&&!g.$session_id&&(g.$session_id=p.sessionId);let y=this._shouldSendMinimalFlagCalledEvent(i,g)?(0,a.minimizeFlagCalledEventProperties)(g):g,_=this._runBeforeSend({distinctId:h,event:i,properties:y,groups:n,flags:s,sendFeatureFlags:l,timestamp:u,disableGeoip:c,uuid:d});if(!_)return Promise.reject(null);let m=await Promise.resolve().then(async()=>{if(s)return l&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),s._getEventProperties();if(l){v("sendFeatureFlags","`sendFeatureFlags` is deprecated and will be removed in a future major version. Pass a `flags` snapshot from `posthog.evaluateFlags(...)` instead — it avoids a second `/flags` request per capture and guarantees the event carries the exact flag values your code branched on.");var e=await this.getFeatureFlagsForEvent(_.distinctId,n,c,"object"==typeof l?l:void 0);if(!e)return{};let t={};for(let[r,i]of Object.entries(e))t[`$feature/${r}`]=i;let r=Object.keys(e).filter(t=>!1!==e[t]).sort();return r.length>0&&(t.$active_feature_flags=r),t}return{}}).catch(()=>({})).then(e=>{let t=_.groups||n;return{...e,..._.properties||{},...void 0!==t&&Object.keys(t).length>0?{$groups:t}:{}}});return"$pageview"===_.event&&this.options.__preview_capture_bot_pageviews&&"string"==typeof m.$raw_user_agent&&(0,a.isBlockedUA)(m.$raw_user_agent,this.options.custom_blocked_useragents||[])&&(_.event="$bot_pageview",m.$browser_type="bot"),{distinctId:_.distinctId,event:_.event,properties:m,options:{timestamp:_.timestamp,disableGeoip:_.disableGeoip,uuid:_.uuid}}}_runBeforeSend(e){let t=this.options.before_send;if(!t)return e;let r=Array.isArray(t)?t:[t],i=e;for(let t of r)try{if(!(i=t(i)))return this._logger.info(`Event '${e.event}' was rejected in beforeSend function`),null;if(!i.properties||0===Object.keys(i.properties).length){let e=`Event '${i.event}' has no properties after beforeSend function, this is likely an error.`;this._logger.warn(e)}}catch(t){return this._logger.error(`Error in before_send function for event '${e.event}':`,t),null}return i}}for(var P in r.PostHogBackendClient=o.PostHogBackendClient,r._resetDeprecationWarningsForTests=o._resetDeprecationWarningsForTests,o)-1===["PostHogBackendClient","_resetDeprecationWarningsForTests"].indexOf(P)&&(r[P]=o[P]);
1Object.defineProperty(r,"__esModule",{value:!0})},309608,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n=/[\x00-\x1f\x7f-\x9f]/g,a={sessionId:"x-posthog-session-id",distinctId:"x-posthog-distinct-id"};function s(e,t,r){null!=r&&""!==r&&(e[t]=r)}function l(e){return Array.isArray(e)?e[0]:e}function u(e){if(Array.isArray(e)){for(let t of e){let e=u(t);if(void 0!==e)return e}return}if("string"!=typeof e)return;let t=e.replace(n,"").trim();if(t)return t.length>1e3?t.slice(0,1e3):t}function c(e){if(!e)return{};let t=u(e[a.sessionId]),r=u(e[a.distinctId]);return{...void 0!==t?{sessionId:t}:{},...void 0!==r?{distinctId:r}:{}}}for(var d in i.d(o,{addProperty:()=>s,getFirstHeaderValue:()=>l,getPostHogTracingHeaderValues:()=>c,sanitizeTracingHeaderValue:()=>u},{POSTHOG_TRACING_HEADERS:a}),r.POSTHOG_TRACING_HEADERS=o.POSTHOG_TRACING_HEADERS,r.addProperty=o.addProperty,r.getFirstHeaderValue=o.getFirstHeaderValue,r.getPostHogTracingHeaderValues=o.getPostHogTracingHeaderValues,r.sanitizeTracingHeaderValue=o.sanitizeTracingHeaderValue,o)-1===["POSTHOG_TRACING_HEADERS","addProperty","getFirstHeaderValue","getPostHogTracingHeaderValues","sanitizeTracingHeaderValue"].indexOf(d)&&(r[d]=o[d]);Object.defineProperty(r,"__esModule",{value:!0})},315545,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{normalizeRequestCurrentUrl:()=>a,normalizeRequestPath:()=>s});let n=e.r(744094);function a(e,t){return t?(0,n.stripUrlHash)(e):e}function s(e,t){let r=function(e){if(!e)return e;let t=e.indexOf("?"),r=e.indexOf("#");return -1===t||-1!==r&&r<t?e:`${e.slice(0,t)}${-1===r?"":e.slice(r)}`}(e);return t?(0,n.stripUrlHash)(r):r}for(var l in r.normalizeRequestCurrentUrl=o.normalizeRequestCurrentUrl,r.normalizeRequestPath=o.normalizeRequestPath,o)-1===["normalizeRequestCurrentUrl","normalizeRequestPath"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},192533,(e,t,r)=>{"use strict";var i={};i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{setupExpressErrorHandler:()=>d,setupExpressRequestContext:()=>c});let n=e.r(672348);var a=i.n(n);let s=e.r(309608),l=e.r(315545);function u(e,t){let{sessionId:r,distinctId:i}=(0,s.getPostHogTracingHeaderValues)(t.headers),o={},n=!0===e.options.disable_capture_url_hashes;return(0,s.addProperty)(o,"$current_url",(0,l.normalizeRequestCurrentUrl)(t.originalUrl||t.url,n)),(0,s.addProperty)(o,"$request_method",t.method),(0,s.addProperty)(o,"$request_path",(0,l.normalizeRequestPath)(t.path,n)),(0,s.addProperty)(o,"$user_agent",(0,s.getFirstHeaderValue)(t.headers["user-agent"])),(0,s.addProperty)(o,"$ip",function(e){let t=(0,s.getFirstHeaderValue)(e.headers["x-forwarded-for"]);if(t){let e=t.split(",")[0].trim();if(e)return e}return e.socket?.remoteAddress}(t)),{...void 0!==r?{sessionId:r}:{},...void 0!==i?{distinctId:i}:{},properties:o}}function c(e,t){var r;t.use((r=e,(e,t,i)=>{r.withContext(u(r,e),()=>i())}))}function d(e,t){var r;t.use((r=e,(e,t,i,o)=>{if(a().isPreviouslyCapturedError(e))return void o(e);let n=u(r,t),s=Error("Synthetic exception"),l={...void 0!==n.sessionId?{$session_id:n.sessionId}:{},...n.properties||{},$response_status_code:i.statusCode};r.addPendingPromise(a().buildEventMessage(r.getErrorPropertiesBuilder(),e,{mechanism:{type:"middleware",handled:!1},syntheticException:s},n.distinctId,l).then(e=>r._capturePreparedEvent(e,!1))),o(e)}))}for(var p in r.setupExpressErrorHandler=o.setupExpressErrorHandler,r.setupExpressRequestContext=o.setupExpressRequestContext,o)-1===["setupExpressErrorHandler","setupExpressRequestContext"].indexOf(p)&&(r[p]=o[p]);
1Object.defineProperty(r,"__esModule",{value:!0})},412794,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PostHogSentryIntegration:()=>u,createEventProcessor:()=>s,sentryIntegration:()=>l});let n=e.r(744094),a="posthog-node";function s(e,{organization:t,projectId:r,prefix:i,severityAllowList:o=["error"],sendExceptionsToPostHog:a=!0}={}){return s=>{if(!("*"===o||o.includes(s.level)))return s;s.tags||(s.tags={});let l=s.tags[u.POSTHOG_ID_TAG];if(void 0===l)return s;let c=e.options.host??"https://us.i.posthog.com",d=new URL(`/project/${e.apiKey}/person/${l}`,c).toString();s.tags["PostHog Person URL"]=d;let p=s.exception?.values||[],f=p.map(e=>({...e,stacktrace:e.stacktrace?{...e.stacktrace,type:"raw",frames:(e.stacktrace.frames||[]).map(e=>({...e,platform:"node:javascript"}))}:void 0})),h={$exception_message:p[0]?.value||s.message,$exception_type:p[0]?.type,$exception_level:s.level,$exception_list:f,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:p[0]?.value||s.message,$sentry_exception_type:p[0]?.type,$sentry_tags:s.tags},g=n.ErrorTracking.getInjectedReleaseId();return g&&(h.$release_id=g),t&&r&&(h.$sentry_url=(i||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+s.event_id),a&&e.capture({event:"$exception",distinctId:l,properties:h}),s}}function l(e,t){let r=s(e,t);return{name:a,processEvent:e=>r(e)}}class u{static{this.POSTHOG_ID_TAG="posthog_distinct_id"}constructor(e,t,r,i,o){this.name=a,this.name=a,this.setupOnce=function(n,a){n(s(e,{organization:t,projectId:a()?.getClient()?.getDsn()?.projectId,prefix:r,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}}for(var c in r.PostHogSentryIntegration=o.PostHogSentryIntegration,r.createEventProcessor=o.createEventProcessor,r.sentryIntegration=o.sentryIntegration,o)-1===["PostHogSentryIntegration","createEventProcessor","sentryIntegration"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},329677,(e,t,r)=>{"use strict";var i={"./extensions/express"(t){t.exports=e.r(192533)},"./extensions/sentry-integration"(t){t.exports=e.r(412794)},"./feature-flag-evaluations"(t){t.exports=e.r(113469)},"./types"(t){t.exports=e.r(238350)},"@posthog/core"(t){t.exports=e.r(744094)}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};for(var s in(()=>{n.r(a);var e=n("./extensions/sentry-integration"),t={};for(let r in e)0>["parsePostHogCookie","FeatureFlagError","default","cookieStoreFromHeader","getPostHogCookieName","cookieStateToProperties","serializePostHogCookie","FeatureFlagEvaluations","uuidv7","readPostHogCookie"].indexOf(r)&&(t[r]=()=>e[r]);n.d(a,t);var r=n("./extensions/express"),t={};for(let e in r)0>["parsePostHogCookie","FeatureFlagError","default","cookieStoreFromHeader","getPostHogCookieName","cookieStateToProperties","serializePostHogCookie","FeatureFlagEvaluations","uuidv7","readPostHogCookie"].indexOf(e)&&(t[e]=()=>r[e]);n.d(a,t);var i=n("./types"),t={};for(let e in i)0>["parsePostHogCookie","FeatureFlagError","default","cookieStoreFromHeader","getPostHogCookieName","cookieStateToProperties","serializePostHogCookie","FeatureFlagEvaluations","uuidv7","readPostHogCookie"].indexOf(e)&&(t[e]=()=>i[e]);n.d(a,t);var o=n("./feature-flag-evaluations"),s=n("@posthog/core");n.d(a,{FeatureFlagError:()=>s.FeatureFlagError,FeatureFlagEvaluations:()=>o.FeatureFlagEvaluations,cookieStateToProperties:()=>s.cookieStateToProperties,cookieStoreFromHeader:()=>s.cookieStoreFromHeader,getPostHogCookieName:()=>s.getPostHogCookieName,parsePostHogCookie:()=>s.parsePostHogCookie,readPostHogCookie:()=>s.readPostHogCookie,serializePostHogCookie:()=>
1s.serializePostHogCookie,uuidv7:()=>s.uuidv7})})(),r.FeatureFlagError=a.FeatureFlagError,r.FeatureFlagEvaluations=a.FeatureFlagEvaluations,r.cookieStateToProperties=a.cookieStateToProperties,r.cookieStoreFromHeader=a.cookieStoreFromHeader,r.getPostHogCookieName=a.getPostHogCookieName,r.parsePostHogCookie=a.parsePostHogCookie,r.readPostHogCookie=a.readPostHogCookie,r.serializePostHogCookie=a.serializePostHogCookie,r.uuidv7=a.uuidv7,a)-1===["FeatureFlagError","FeatureFlagEvaluations","cookieStateToProperties","cookieStoreFromHeader","getPostHogCookieName","parsePostHogCookie","readPostHogCookie","serializePostHogCookie","uuidv7"].indexOf(s)&&(r[s]=a[s]);Object.defineProperty(r,"__esModule",{value:!0})},899343,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PostHogContext:()=>a});let n=(()=>{let e=Error("Cannot find module 'node:async_hooks': Unsupported external type Url for commonjs reference");throw e.code="MODULE_NOT_FOUND",e})();class a{constructor(){this.storage=new n.AsyncLocalStorage}get(){return this.storage.getStore()}run(e,t,r){return this.storage.run(this.resolve(e,r),t)}enter(e,t){this.storage.enterWith(this.resolve(e,t))}resolve(e,t){if(t?.fresh===!0)return e;let r=this.get()||{};return{distinctId:e.distinctId??r.distinctId,sessionId:e.sessionId??r.sessionId,properties:{...r.properties||{},...e.properties||{}}}}}for(var s in r.PostHogContext=o.PostHogContext,o)-1===["PostHogContext"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},426569,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{AsyncLocalStorageSpanContextManager:()=>a});let n=(()=>{let e=Error("Cannot find module 'node:async_hooks': Unsupported external type Url for commonjs reference");throw e.code="MODULE_NOT_FOUND",e})();class a{active(){return this._storage.getStore()}with(e,t){return this._storage.run(e,t)}constructor(){this._storage=new n.AsyncLocalStorage}}for(var s in r.AsyncLocalStorageSpanContextManager=o.AsyncLocalStorageSpanContextManager,o)-1===["AsyncLocalStorageSpanContextManager"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},741790,(e,t,r)=>{!function(){"use strict";var e={431:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,i="",o=0,n=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else if(47===r)break;else r=47;if(47===r){if(n===s-1||1===a);else if(n!==s-1&&2===a){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2)){if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",o=0):o=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),n=s,a=0;continue}}else if(2===i.length||1===i.length){i="",o=0,n=s,a=0;continue}}t&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+e.slice(n+1,s):i=e.slice(n+1,s),o=s-n-1;n=s,a=0}else 46===r&&-1!==a?++a:a=-1}return i}var i={resolve:function(){for(var e,i,o="",n=!1,a=arguments.length-1;a>=-1&&!n;a--)a>=0?i=arguments[a]:(void 0===e&&(e=""),i=e),t(i),0!==i.length&&(o=i+"/"+o,n=47===i.charCodeAt(0));if(o=r(o,!n),n)if(o.length>0)return"/"+o;else return"/";return o.length>0?o:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return(0!==(e=r(e,!i)).length||i||(e="."),e.length>0&&o&&(e+="/"),i)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var o=arguments[r];
1t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":i.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r||(e=i.resolve(e))===(r=i.resolve(r)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var n=e.length,a=n-o,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var l=r.length-s,u=a<l?a:l,c=-1,d=0;d<=u;++d){if(d===u){if(l>u){if(47===r.charCodeAt(s+d))return r.slice(s+d+1);else if(0===d)return r.slice(s+d)}else a>u&&(47===e.charCodeAt(o+d)?c=d:0===d&&(c=0));break}var p=e.charCodeAt(o+d);if(p!==r.charCodeAt(s+d))break;47===p&&(c=d)}var f="";for(d=o+c+1;d<=n;++d)(d===n||47===e.charCodeAt(d))&&(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),i=47===r,o=-1,n=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!n){o=a;break}}else n=!1;return -1===o?i?"/":".":i&&1===o?"//":e.slice(0,o)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw TypeError('"ext" argument must be a string');t(e);var i,o=0,n=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,l=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(47===u){if(!a){o=i+1;break}}else -1===l&&(a=!1,l=i+1),s>=0&&(u===r.charCodeAt(s)?-1==--s&&(n=i):(s=-1,n=l))}return o===n?n=l:-1===n&&(n=e.length),e.slice(o,n)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!a){o=i+1;break}}else -1===n&&(a=!1,n=i+1);return -1===n?"":e.slice(o,n)},extname:function(e){t(e);for(var r=-1,i=0,o=-1,n=!0,a=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47===l){if(!n){i=s+1;break}continue}-1===o&&(n=!1,o=s+1),46===l?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1)}return -1===r||-1===o||0===a||1===a&&r===o-1&&r===i+1?"":e.slice(r,o)},format:function(e){var t,r;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r},parse:function(e){t(e);var r,i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var o=e.charCodeAt(0),n=47===o;n?(i.root="/",r=1):r=0;for(var a=-1,s=0,l=-1,u=!0,c=e.length-1,d=0;c>=r;--c){if(47===(o=e.charCodeAt(c))){if(!u){s=c+1;break}continue}-1===l&&(u=!1,l=c+1),46===o?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1)}return -1===a||-1===l||0===d||1===d&&a===l-1&&a===s+1?-1!==l&&(0===s&&n?i.base=i.name=e.slice(1,l):i.base=i.name=e.slice(s,l)):(0===s&&n?(i.name=e.slice(1,a),i.base=e.slice(1,l)):(i.name=e.slice(s,a),i.base=e.slice(s,l)),i.ext=e.slice(a,l)),s>0?i.dir=e.slice(0,s-1):n&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},r={};function i(t){var o=r[t];if(void 0!==o)return o.exports;var n=r[t]={exports:{}},a=!0;try{e[t](n,n.exports,i),a=!1}finally{a&&delete r[t]}return n.exports}i.ab="/ROOT/node_modules/next/dist/compiled/path-browserify/",t.exports=i(431)}()},443476,(e,t,r)=>{"use strict";var i=e.i(247167),o={};o.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{MAX_CONTEXTLINES_COLNO:()=>f,MAX_CONTEXTLINES_FILE_SIZE:()=>g,MAX_CONTEXTLINES_LINENO:()=>h,addSourceContext:()=>y});let a=e.r(744094),s=(()=>{let e=Error("Cannot find module 'node:fs': Unsupported external type Url for commonjs reference");throw e.code="MODULE_NOT_FOUND",e})(),l=(()=>{let e=Error("Cannot find module 'node:fs/promises': Unsupported external type Url for commonjs reference");throw e.code="MODULE_NOT_FOUND",e})(),u=e.r(741790),c=(()=>{let e=Error("Cannot find module 'node:readline': Unsupported external type Url for commonjs reference");throw e.code="MODULE_NOT_FOUND",e})(),d=new a.ErrorTracking.ReduceableCache(25),p=new a.ErrorTracking.ReduceableCache(20),f=1e3,h=1e4,g=0xa00000;async function y(e,t=l.open,r){let o,n={};try{o=i.default.cwd()}catch{}for(let t=e.length-1;t>=0;t--){var a,s;let r=e[t],i=r?.filename;!(!r||"string"!=typeof i||"number"!=typeof r.lineno||(a=i).startsWith("node:")||a.endsWith(".min.js")||a.endsWith(".min.cjs")||a.endsWith(".min.mjs")||a.startsWith("data:")||void 0!==(s=r).lineno&&s.lineno>h||void 0!==s.colno&&s.colno>f)&&((0,u.isAbsolute)(i)||void 0!==o)&&(n[i]||(n[i]=[]),n[i].push(r.lineno))}let c=Object.keys(n);if(0==c.length)return e;let g=[];for(let e of c){let i=b(e,o);if(void 0===i||p.get(i))continue;let a=n[e];if(!a)continue;a.sort((e,t)=>
1e-t);let s=function(e){if(!e.length)return[];let t=0,r=e[0];if("number"!=typeof r)return[];let i=S(r),o=[];for(;;){if(t===e.length-1){o.push(i);break}let r=e[t+1];if("number"!=typeof r)break;r<=i[1]?i[1]=r+7:(o.push(i),i=S(r)),t++}return o}(a);if(s.every(e=>(function(e,t){let r=d.get(e);if(void 0===r)return!1;for(let e=t[0];e<=t[1];e++)if(void 0===r[e])return!1;return!0})(i,e)))continue;let l=function(e,t,r){let i=e.get(t);return void 0===i?(e.set(t,r),r):i}(d,i,{});g.push(m(e,s,l,i,t,r))}return await Promise.all(g).catch(()=>{}),e&&e.length>0&&function(e,t,r){for(let i of e)if(i.filename&&void 0===i.context_line&&"number"==typeof i.lineno){let e=b(i.filename,r),o=void 0===e?void 0:t.get(e);if(void 0===o)continue;!function(e,t,r){if(void 0===t.lineno||void 0===r)return;t.pre_context=[];for(let i=P(e);i<e;i++){let e=r[i];if(void 0===e)return void v(t);t.pre_context.push(e)}if(void 0===r[e])return v(t);t.context_line=r[e];let i=function(e){return e+7}(e);t.post_context=[];for(let o=e+1;o<=i;o++){let e=r[o];if(void 0===e)break;t.post_context.push(e)}}(i.lineno,i,o)}}(e,d,o),d.reduce(),e}async function _(e,t,r){let i,o=!1;try{i=await t(e,s.constants.O_RDONLY|s.constants.O_NONBLOCK);let n=await i.stat();if(!n.isFile())return;if(n.size>g)return void r?.debug(`Skipping source context for oversized file ${e}: ${n.size} bytes exceeds ${g}`);return o=!0,i}catch{return}finally{i&&!o&&await i.close().catch(()=>{})}}async function m(e,t,r,i,o,n){let a=await _(e,o,n);return void 0===a?void p.set(i,1):new Promise(e=>{let o,n,s=!1;function l(t){s||(s=!0,t?.destroy(),a.close().then(e,e))}try{o=a.createReadStream({autoClose:!1,start:0,end:g-1})}catch{p.set(i,1),l();return}try{n=(0,c.createInterface)({input:o})}catch{p.set(i,1),l(o);return}let u=0,d=0,f=t[0];if(void 0===f)return void l(o);let h=f[0],y=f[1];function _(){p.set(i,1),n.close(),n.removeAllListeners(),l(o)}o.on("error",_),n.on("error",_),n.on("close",()=>l(o)),n.on("line",e=>{if(!(++u<h)&&(r[u]=function(e,t){let r=e,i=r.length;if(i<=150)return r;t>i&&(t=i);let o=Math.max(t-60,0);o<5&&(o=0);let n=Math.min(o+140,i);return n>i-5&&(n=i),n===i&&(o=Math.max(n-140,0)),r=r.slice(o,n),o>0&&(r=`...${r}`),n<i&&(r+="..."),r}(e,0),u>=y)){if(d===t.length-1){n.close(),n.removeAllListeners();return}let e=t[++d];if(void 0===e){n.close(),n.removeAllListeners();return}h=e[0],y=e[1]}})})}function v(e){delete e.pre_context,delete e.context_line,delete e.post_context}function b(e,t){return(0,u.isAbsolute)(e)?JSON.stringify([null,e]):void 0===t?void 0:JSON.stringify([t,e])}function S(e){return[P(e),e+7]}function P(e){return Math.max(1,e-7)}for(var E in r.MAX_CONTEXTLINES_COLNO=n.MAX_CONTEXTLINES_COLNO,r.MAX_CONTEXTLINES_FILE_SIZE=n.MAX_CONTEXTLINES_FILE_SIZE,r.MAX_CONTEXTLINES_LINENO=n.MAX_CONTEXTLINES_LINENO,r.addSourceContext=n.addSourceContext,n)-1===["MAX_CONTEXTLINES_COLNO","MAX_CONTEXTLINES_FILE_SIZE","MAX_CONTEXTLINES_LINENO","addSourceContext"].indexOf(E)&&(r[E]=n[E]);Object.defineProperty(r,"__esModule",{value:!0})},653958,(e,t,r)=>{"use strict";var i=e.i(247167),o={};o.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{createModulerModifier:()=>s});let a=e.r(741790);function s(){let e=function(e=i.default.argv[1]?(0,a.dirname)(i.default.argv[1]):i.default.cwd(),t="\\"===a.sep){let r=t?l(e):e;return e=>{if(!e)return;let i=t?l(e):e,{dir:o,base:n,ext:s}=a.posix.parse(i);(".js"===s||".mjs"===s||".cjs"===s)&&(n=n.slice(0,-1*s.length));let u=decodeURIComponent(n);o||(o=".");let c=o.lastIndexOf("/node_modules");if(c>-1)return`${o.slice(c+14).replace(/\//g,".")}:${u}`;if(o.startsWith(r)){let e=o.slice(r.length+1).replace(/\//g,".");return e?`${e}:${u}`:u}return u}}();return async t=>{for(let r of t)r.module=e(r.filename);return t}}function l(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}for(var u in r.createModulerModifier=n.createModulerModifier,n)-1===["createModulerModifier"].indexOf(u)&&(r[u]=n[u]);
1Object.defineProperty(r,"__esModule",{value:!0})},323306,(e,t,r)=>{"use strict";var i=e.i(247167),o={};o.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{createRelativePathModifier:()=>s});let a=e.r(741790);function s(e=i.default.cwd()){let t="\\"===a.sep,r=e=>t?e.replace(/\\/g,"/"):e,o=r(e);return async e=>{for(let t of e)!(!t.filename||t.filename.startsWith("node:")||t.filename.startsWith("data:"))&&(0,a.isAbsolute)(t.filename)&&(t.filename=r((0,a.relative)(o,r(t.filename))));return e}}for(var l in r.createRelativePathModifier=n.createRelativePathModifier,n)-1===["createRelativePathModifier"].indexOf(l)&&(r[l]=n[l]);Object.defineProperty(r,"__esModule",{value:!0})},440224,(e,t,r)=>{var i=e.i(247167),o=e.i(467034),n={7492:function(e){e.exports=function(e,r,i){if(e.filter)return e.filter(r,i);if(null==e||"function"!=typeof r)throw TypeError();for(var o=[],n=0;n<e.length;n++)if(t.call(e,n)){var a=e[n];r.call(i,a,n,e)&&o.push(a)}return o};var t=Object.prototype.hasOwnProperty},6810:function(e,t,r){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n,a,s=r(3431).codes,l=s.ERR_AMBIGUOUS_ARGUMENT,u=s.ERR_INVALID_ARG_TYPE,c=s.ERR_INVALID_ARG_VALUE,d=s.ERR_INVALID_RETURN_VALUE,p=s.ERR_MISSING_ARGS,f=r(9396),h=r(4268).inspect,g=r(4268).types,y=g.isPromise,_=g.isRegExp,m=Object.assign,v=Object.is?Object.is:r(8388);function b(){var e=r(2761);n=e.isDeepEqual,a=e.isDeepStrictEqual}var S=!1,P=e.exports=w,E={};function O(e){if(e.message instanceof Error)throw e.message;throw new f(e)}function F(e,t,r,i){if(!r){var o=!1;if(0===t)o=!0,i="No value argument passed to `assert.ok()`";else if(i instanceof Error)throw i;var n=new f({actual:r,expected:!0,message:i,operator:"==",stackStartFn:e});throw n.generatedMessage=o,n}}function w(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];F.apply(void 0,[w,t.length].concat(t))}P.fail=function e(t,r,o,n,a){var s,l=arguments.length;if(0===l?s="Failed":1===l?(o=t,t=void 0):(!1===S&&(S=!0,(i.default.emitWarning?i.default.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===l&&(n="!=")),o instanceof Error)throw o;var u={actual:t,expected:r,operator:void 0===n?"fail":n,stackStartFn:a||e};void 0!==o&&(u.message=o);var c=new f(u);throw s&&(c.message=s,c.generatedMessage=!0),c},P.AssertionError=f,P.ok=w,P.equal=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");t!=r&&O({actual:t,expected:r,message:i,operator:"==",stackStartFn:e})},P.notEqual=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");t==r&&O({actual:t,expected:r,message:i,operator:"!=",stackStartFn:e})},P.deepEqual=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");void 0===n&&b(),n(t,r)||O({actual:t,expected:r,message:i,operator:"deepEqual",stackStartFn:e})},P.notDeepEqual=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");void 0===n&&b(),n(t,r)&&O({actual:t,expected:r,message:i,operator:"notDeepEqual",stackStartFn:e})},P.deepStrictEqual=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");void 0===n&&b(),a(t,r)||O({actual:t,expected:r,message:i,operator:"deepStrictEqual",stackStartFn:e})},P.notDeepStrictEqual=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");void 0===n&&b(),a(t,r)&&O({actual:t,expected:r,message:i,operator:"notDeepStrictEqual",stackStartFn:e})},P.strictEqual=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");v(t,r)||O({actual:t,expected:r,message:i,operator:"strictEqual",stackStartFn:e})},P.notStrictEqual=function e(t,r,i){if(arguments.length<2)throw new p("actual","expected");
1v(t,r)&&O({actual:t,expected:r,message:i,operator:"notStrictEqual",stackStartFn:e})};var A=function e(t,r,i){var o=this;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");r.forEach(function(e){e in t&&(void 0!==i&&"string"==typeof i[e]&&_(t[e])&&t[e].test(i[e])?o[e]=i[e]:o[e]=t[e])})};function T(e,t,r,i){if("function"!=typeof t){if(_(t))return t.test(e);if(2==arguments.length)throw new u("expected",["Function","RegExp"],t);if("object"!==o(e)||null===e){var s=new f({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:i});throw s.operator=i.name,s}var l=Object.keys(t);if(t instanceof Error)l.push("name","message");else if(0===l.length)throw new c("error",t,"may not be an empty object");return void 0===n&&b(),l.forEach(function(o){if(!("string"==typeof e[o]&&_(t[o])&&t[o].test(e[o]))&&(!(o in e)||!a(e[o],t[o]))){if(!r){var n=new f({actual:new A(e,l),expected:new A(t,l,e),operator:"deepStrictEqual",stackStartFn:i});throw n.actual=e,n.expected=t,n.operator=i.name,n}O({actual:e,expected:t,message:r,operator:i.name,stackStartFn:i})}}),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return E}function I(e){return y(e)||null!==e&&"object"===o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function M(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!I(t=e()))throw new d("instance of Promise","promiseFn",t)}else if(I(e))t=e;else throw new u("promiseFn",["Function","Promise"],e);return Promise.resolve().then(function(){return t}).then(function(){return E}).catch(function(e){return e})})}function R(e,t,r,i){if("string"==typeof r){if(4==arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===o(t)&&null!==t){if(t.message===r)throw new l("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new l("error/message",'The error "'.concat(t,'" is identical to the message.'));i=r,r=void 0}else if(null!=r&&"object"!==o(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(t===E){var n="";r&&r.name&&(n+=" (".concat(r.name,")")),n+=i?": ".concat(i):".";var a="rejects"===e.name?"rejection":"exception";O({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(n),stackStartFn:e})}if(r&&!T(t,r,i,e))throw t}function k(e,t,r,i){if(t!==E){if("string"==typeof r&&(i=r,r=void 0),!r||T(t,r)){var o=i?": ".concat(i):".",n="doesNotReject"===e.name?"rejection":"exception";O({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(n).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function j(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];F.apply(void 0,[j,t.length].concat(t))}P.throws=function e(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];R.apply(void 0,[e,x(t)].concat(i))},P.rejects=function e(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return M(t).then(function(t){return R.apply(void 0,[e,t].concat(i))})},P.doesNotThrow=function e(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];k.apply(void 0,[e,x(t)].concat(i))},P.doesNotReject=function e(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return M(t).then(function(t){return k.apply(void 0,[e,t].concat(i))})},P.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===o(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=h(t);var i=new f({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),n=t.stack;if("string"==typeof n){var a=n.split("\n");a.shift();for(var s=i.stack.split("\n"),l=0;l<a.length;l++){var u=s.indexOf(a[l]);if(-1!==u){s=s.slice(0,u);break}}i.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw i}},P.strict=m(j,P,{equal:P.strictEqual,deepEqual:P.deepStrictEqual,notEqual:P.notStrictEqual,notDeepEqual:P.notDeepStrictEqual}
1),P.strict.strict=P.strict},9396:function(e,t,r){"use strict";function o(e,t){return t&&("object"===c(t)||"function"==typeof t)?t:n(e)}function n(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){var r;if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return s(e,arguments,u(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),l(i,e)})(e)}function s(e,t,r){return(s=!function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?function(e,t,r){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return r&&l(o,r.prototype),o}:Reflect.construct).apply(null,arguments)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var d=r(4268).inspect,p=r(3431).codes.ERR_INVALID_ARG_TYPE;function f(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var h="",g="",y="",_="",m={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function v(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function b(e){return d(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}e.exports=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(e){if(!(this instanceof r))throw TypeError("Cannot call a class as a function");if("object"!==c(e)||null===e)throw new p("options","Object",e);var t,a=e.message,s=e.operator,l=e.stackStartFn,d=e.actual,S=e.expected,P=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=a)t=o(this,u(r).call(this,String(a)));else if(i.default.stderr&&i.default.stderr.isTTY&&(i.default.stderr&&i.default.stderr.getColorDepth&&1!==i.default.stderr.getColorDepth()?(h="\x1b[34m",g="\x1b[32m",_="\x1b[39m",y="\x1b[31m"):(h="",g="",_="",y="")),"object"===c(d)&&null!==d&&"object"===c(S)&&null!==S&&"stack"in d&&d instanceof Error&&"stack"in S&&S instanceof Error&&(d=v(d),S=v(S)),"deepStrictEqual"===s||"strictEqual"===s)t=o(this,u(r).call(this,function(e,t,r){var o="",n="",a=0,s="",l=!1,u=b(e),d=u.split("\n"),p=b(t).split("\n"),v=0,S="";if("strictEqual"===r&&"object"===c(e)&&"object"===c(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===d.length&&1===p.length&&d[0]!==p[0]){var P=d[0].length+p[0].length;if(P<=10){if(("object"!==c(e)||null===e)&&("object"!==c(t)||null===t)&&(0!==e||0!==t))return"".concat(m[r],"\n\n")+"".concat(d[0]," !== ").concat(p[0],"\n")}else if("strictEqualObject"!==r&&P<(i.default.stderr&&i.default.stderr.isTTY?i.default.stderr.columns:80)){for(;d[0][v]===p[0][v];)v++;v>2&&(S="\n  ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",v),"^"),v=0)}}for(var E=d[d.length-1],O=p[p.length-1];E===O&&(v++<2?s="\n  ".concat(E).concat(s):o=E,d.pop(),p.pop(),0!==d.length&&0!==p.length);)E=d[d.length-1],O=p[p.length-1];var F=Math.max(d.length,p.length);if(0===F){var w=u.split("\n");if(w.length>30)for(w[26]="".concat(h,"...").concat(_);w.length>27;)w.pop();return"".concat(m.notIdentical,"\n\n").concat(w.join("\n"),"\n")}v>3&&(s="\n".concat(h,"...").concat(_).concat(s),l=!0),""!==o&&(s="\n  ".concat(o).concat(s),o="");
1var A=0,T=m[r]+"\n".concat(g,"+ actual").concat(_," ").concat(y,"- expected").concat(_),x=" ".concat(h,"...").concat(_," Lines skipped");for(v=0;v<F;v++){var I=v-a;if(d.length<v+1)I>1&&v>2&&(I>4?(n+="\n".concat(h,"...").concat(_),l=!0):I>3&&(n+="\n  ".concat(p[v-2]),A++),n+="\n  ".concat(p[v-1]),A++),a=v,o+="\n".concat(y,"-").concat(_," ").concat(p[v]),A++;else if(p.length<v+1)I>1&&v>2&&(I>4?(n+="\n".concat(h,"...").concat(_),l=!0):I>3&&(n+="\n  ".concat(d[v-2]),A++),n+="\n  ".concat(d[v-1]),A++),a=v,n+="\n".concat(g,"+").concat(_," ").concat(d[v]),A++;else{var M=p[v],R=d[v],k=R!==M&&(!f(R,",")||R.slice(0,-1)!==M);k&&f(M,",")&&M.slice(0,-1)===R&&(k=!1,R+=","),k?(I>1&&v>2&&(I>4?(n+="\n".concat(h,"...").concat(_),l=!0):I>3&&(n+="\n  ".concat(d[v-2]),A++),n+="\n  ".concat(d[v-1]),A++),a=v,n+="\n".concat(g,"+").concat(_," ").concat(R),o+="\n".concat(y,"-").concat(_," ").concat(M),A+=2):(n+=o,o="",(1===I||0===v)&&(n+="\n  ".concat(R),A++))}if(A>20&&v<F-2)return"".concat(T).concat(x,"\n").concat(n,"\n").concat(h,"...").concat(_).concat(o,"\n")+"".concat(h,"...").concat(_)}return"".concat(T).concat(l?x:"","\n").concat(n).concat(o).concat(s).concat(S)}(d,S,s)));else if("notDeepStrictEqual"===s||"notStrictEqual"===s){var E=m[s],O=b(d).split("\n");if("notStrictEqual"===s&&"object"===c(d)&&null!==d&&(E=m.notStrictEqualObject),O.length>30)for(O[26]="".concat(h,"...").concat(_);O.length>27;)O.pop();t=1===O.length?o(this,u(r).call(this,"".concat(E," ").concat(O[0]))):o(this,u(r).call(this,"".concat(E,"\n\n").concat(O.join("\n"),"\n")))}else{var F=b(d),w="",A=m[s];"notDeepEqual"===s||"notEqual"===s?(F="".concat(m[s],"\n\n").concat(F)).length>1024&&(F="".concat(F.slice(0,1021),"...")):(w="".concat(b(S)),F.length>512&&(F="".concat(F.slice(0,509),"...")),w.length>512&&(w="".concat(w.slice(0,509),"...")),"deepEqual"===s||"equal"===s?F="".concat(A,"\n\n").concat(F,"\n\nshould equal\n\n"):w=" ".concat(s," ").concat(w)),t=o(this,u(r).call(this,"".concat(F).concat(w)))}return Error.stackTraceLimit=P,t.generatedMessage=!a,Object.defineProperty(n(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=d,t.expected=S,t.operator=s,Error.captureStackTrace&&Error.captureStackTrace(n(t),l),t.stack,t.name="AssertionError",o(t)}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&l(r,e),t=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(e,t){return d(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){var i,o,n;i=e,o=t,n=r[t],o in i?Object.defineProperty(i,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[o]=n})}return e}({},t,{customInspect:!1,depth:0}))}}],function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(r.prototype,t),r}(a(Error))},3431:function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a,s,l={};function u(e,t,r){r||(r=Error);var a=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");function a(r,n,s){var l,u;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");
1return(l=(u=o(a).call(this,"string"==typeof t?t:t(r,n,s)))&&("object"===i(u)||"function"==typeof u)?u:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)).code=e,l}return a.prototype=Object.create(r&&r.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),r&&n(a,r),a}(r);l[e]=a}function c(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(e,t,o){if((void 0===a&&(a=r(6810)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(n="not ",t.substr(0,n.length)===n))?(d="must not be",t=t.replace(/^not /,"")):d="must be",s=" argument",(void 0===l||l>e.length)&&(l=e.length),e.substring(l-s.length,l)===s)p="The ".concat(e," ").concat(d," ").concat(c(t,"type"));else{var n,s,l,u,d,p,f=("number"!=typeof u&&(u=0),u+1>e.length||-1===e.indexOf(".",u))?"argument":"property";p='The "'.concat(e,'" ').concat(f," ").concat(d," ").concat(c(t,"type"))}return p+". Received type ".concat(i(o))},TypeError),u("ERR_INVALID_ARG_VALUE",function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(4268));var o=s.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(i,". Received ").concat(o)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(e,t,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(i(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")},TypeError),u("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];void 0===a&&(a=r(6810)),a(t.length>0,"At least one arg needs to be specified");var o="The ",n=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),n){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,n-1).join(", "),o+=", and ".concat(t[n-1]," arguments")}return"".concat(o," must be specified")},TypeError),e.exports.codes=l},2761:function(e,t,r){"use strict";function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],i=!0,o=!1,n=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,n=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw n}}return r}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=void 0!==/a/g.flags,a=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},s=function(e){var t=[];return e.forEach(function(e,r){return t.push([r,e])}),t},l=Object.is?Object.is:r(8388),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},c=Number.isNaN?Number.isNaN:r(5211);function d(e){return e.call.bind(e)}var p=d(Object.prototype.hasOwnProperty),f=d(Object.prototype.propertyIsEnumerable),h=d(Object.prototype.toString),g=r(4268).types,y=g.isAnyArrayBuffer,_=g.isArrayBufferView,m=g.isDate,v=g.isMap,b=g.isRegExp,S=g.isSet,P=g.isNativeError,E=g.isBoxedPrimitive,O=g.isNumberObject,F=g.isStringObject,w=g.isBooleanObject,A=g.isBigIntObject,T=g.isSymbolObject,x=g.isFloat32Array,I=g.isFloat64Array;function M(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=0x100000000}function R(e){return Object.keys(e).filter(M).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function k(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,o=0,n=Math.min(r,i);o<n;++o)if(e[o]!==t[o]){r=e[o],i=t[o];break}return r<i?-1:+(i<r)}function j(e,t,r,i){if(e===t)return 0!==e||!r||l(e,t);if(r){if("object"!==o(e))return"number"==typeof e&&c(e)&&c(t);if("object"!==o(t)||null===e||null===t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==o(e))return(null===t||"object"!==o(t))&&e==t;if(null===t||"object"!==o(t))return!1}var a=h(e);if(a!==h(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var s=R(e),u=R(t);return s.length===u.length&&L(e,t,r,i,1,s)}if("[object Object]"===a&&(!v(e)&&v(t)||!S(e)&&S(t)))return!1;if(m(e)){if(!m(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(b(e)){if(!b(t)||(n?e.source!==t.source||e.flags!==t.flags:RegExp.prototype.toString.call(e)!==RegExp.prototype.toString.call(t)))return!1}else if(P(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(_(e)){if(!r&&(x(e)||I(e))){if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1}else if(e.byteLength!==t.byteLength||0!==k(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))return!1;var d=R(e),p=R(t);return d.length===p.length&&L(e,t,r,i,0,d)}else if(S(e))return!!S(t)&&e.size===t.size&&L(e,t,r,i,2);else if(v(e))return!!v(t)&&e.size===t.size&&L(e,t,r,i,3);
1else if(y(e)){if(e.byteLength!==t.byteLength||0!==k(new Uint8Array(e),new Uint8Array(t)))return!1}else if(E(e)&&(O(e)?!(O(t)&&l(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t))):F(e)?!F(t)||String.prototype.valueOf.call(e)!==String.prototype.valueOf.call(t):w(e)?!w(t)||Boolean.prototype.valueOf.call(e)!==Boolean.prototype.valueOf.call(t):A(e)?!A(t)||BigInt.prototype.valueOf.call(e)!==BigInt.prototype.valueOf.call(t):!T(t)||Symbol.prototype.valueOf.call(e)!==Symbol.prototype.valueOf.call(t)))return!1;return L(e,t,r,i,0)}function C(e,t){return t.filter(function(t){return f(e,t)})}function L(e,t,r,n,l,c){if(5==arguments.length){c=Object.keys(e);var d=Object.keys(t);if(c.length!==d.length)return!1}for(var h=0;h<c.length;h++)if(!p(t,c[h]))return!1;if(r&&5==arguments.length){var g=u(e);if(0!==g.length){var y=0;for(h=0;h<g.length;h++){var _=g[h];if(f(e,_)){if(!f(t,_))return!1;c.push(_),y++}else if(f(t,_))return!1}var m=u(t);if(g.length!==m.length&&C(t,m).length!==y)return!1}else{var v=u(t);if(0!==v.length&&0!==C(t,v).length)return!1}}if(0===c.length&&(0===l||1===l&&0===e.length||0===e.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var b=n.val1.get(e);if(void 0!==b){var S=n.val2.get(t);if(void 0!==S)return b===S}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var P=function(e,t,r,n,l,u){var c=0;if(2===u){if(!function(e,t,r,i){for(var n=null,s=a(e),l=0;l<s.length;l++){var u=s[l];if("object"===o(u)&&null!==u)null===n&&(n=new Set),n.add(u);else if(!t.has(u)){if(r||!function(e,t,r){var i=U(r);return null!=i?i:t.has(i)&&!e.has(i)}(e,t,u))return!1;null===n&&(n=new Set),n.add(u)}}if(null!==n){for(var c=a(t),d=0;d<c.length;d++){var p=c[d];if("object"===o(p)&&null!==p){if(!N(n,p,r,i))return!1}else if(!r&&!e.has(p)&&!N(n,p,r,i))return!1}return 0===n.size}return!0}(e,t,r,l))return!1}else if(3===u){if(!function(e,t,r,n){for(var a=null,l=s(e),u=0;u<l.length;u++){var c=i(l[u],2),d=c[0],p=c[1];if("object"===o(d)&&null!==d)null===a&&(a=new Set),a.add(d);else{var f=t.get(d);if(void 0===f&&!t.has(d)||!j(p,f,r,n)){if(r||!function(e,t,r,i,o){var n=U(r);if(null!=n)return n;var a=t.get(n);return(void 0!==a||!!t.has(n))&&!!j(i,a,!1,o)&&!e.has(n)&&j(i,a,!1,o)}(e,t,d,p,n))return!1;null===a&&(a=new Set),a.add(d)}}}if(null!==a){for(var h=s(t),g=0;g<h.length;g++){var y=i(h[g],2),d=y[0],_=y[1];if("object"===o(d)&&null!==d){if(!D(a,e,d,_,r,n))return!1}else if(!r&&(!e.has(d)||!j(e.get(d),_,!1,n))&&!D(a,e,d,_,!1,n))return!1}return 0===a.size}return!0}(e,t,r,l))return!1}else if(1===u)for(;c<e.length;c++)if(p(e,c)){if(!p(t,c)||!j(e[c],t[c],r,l))return!1}else{if(p(t,c))return!1;for(var d=Object.keys(e);c<d.length;c++){var f=d[c];if(!p(t,f)||!j(e[f],t[f],r,l))return!1}if(d.length!==Object.keys(t).length)return!1;return!0}for(c=0;c<n.length;c++){var h=n[c];if(!j(e[h],t[h],r,l))return!1}return!0}(e,t,r,c,n,l);return n.val1.delete(e),n.val2.delete(t),P}function N(e,t,r,i){for(var o=a(e),n=0;n<o.length;n++){var s=o[n];if(j(t,s,r,i))return e.delete(s),!0}return!1}function U(e){switch(o(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e*=1;case"number":if(c(e))return!1}return!0}function D(e,t,r,i,o,n){for(var s=a(e),l=0;l<s.length;l++){var u=s[l];if(j(r,u,o,n)&&j(i,t.get(u),o,n))return e.delete(u),!0}return!1}e.exports={isDeepEqual:function(e,t){return j(e,t,!1)},isDeepStrictEqual:function(e,t){return j(e,t,!0)}}},1648:function(e,t,r){"use strict";var i=r(7797),o=r(4834),n=r(8772);e.exports=r(9095)||i.call(n,o)},4757:function(e,t,r){"use strict";var i=r(7797),o=r(4834),n=r(1648);e.exports=function(){return n(i,o,arguments)}},4834:function(e){"use strict";e.exports=Function.prototype.apply},8772:function(e){"use strict";e.exports=Function.prototype.call},2462:function(e,t,r){"use strict";var i=r(7797),o=r(4785),n=r(8772),a=r(1648);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(i,n,e)}},9095:function(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},2400:function(e,t,r){"use strict";var i=r(7797),o=r(1893),n=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||i.call(a,n),l=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(i,a,arguments);return l&&u&&l(t,"length").configurable&&u(t,"length",{value:1+c(0,e.length-(arguments.length-1))}),t};var d=function(){return s(i,n,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},2982:function(e,t,r){"use strict";
1var i=r(1893),o=r(5494),n=o(i("String.prototype.indexOf"));e.exports=function(e,t){var r=i(e,!!t);return"function"==typeof r&&n(e,".prototype.")>-1?o(r):r}},5494:function(e,t,r){"use strict";var i=r(3798),o=r(871),n=r(2462),a=r(4757);e.exports=function(e){var t=n(arguments),r=e.length-(arguments.length-1);return i(t,1+(r>0?r:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},2071:function(e,t,r){"use strict";var i=r(871),o=r(9546),n=r(4785),a=r(8322);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new n("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(i)i(e,t,{configurable:null===u&&d?d.configurable:!u,enumerable:null===s&&d?d.enumerable:!s,value:r,writable:null===l&&d?d.writable:!l});else if(!c&&(s||l||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},1246:function(e,t,r){"use strict";var i=r(7238),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),n=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),u=function(e,t,r,i){(!(t in e)||"function"==typeof i&&"[object Function]"===n.call(i)&&i())&&(l?s(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},c=function(e,t){var r=arguments.length>2?arguments[2]:{},n=i(t);o&&(n=a.call(n,Object.getOwnPropertySymbols(t)));for(var s=0;s<n.length;s+=1)u(e,n[s],t[n[s]],r[n[s]])};c.supportsDescriptors=!!l,e.exports=c},3859:function(e,t,r){"use strict";var i,o=r(2462),n=r(8322);try{i=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!i&&n&&n(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof l&&function(e){return l(null==e?e:s(e))}},871:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1247:function(e){"use strict";e.exports=EvalError},6621:function(e){"use strict";e.exports=Error},6136:function(e){"use strict";e.exports=RangeError},252:function(e){"use strict";e.exports=ReferenceError},9546:function(e){"use strict";e.exports=SyntaxError},4785:function(e){"use strict";e.exports=TypeError},1223:function(e){"use strict";e.exports=URIError},8300:function(e){"use strict";e.exports=Object},3639:function(e){"use strict";e.exports={assign:function(e,t){if(null==e)throw TypeError("Cannot convert first argument to object");for(var r=Object(e),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var n=Object.keys(Object(o)),a=0,s=n.length;a<s;a++){var l=n[a],u=Object.getOwnPropertyDescriptor(o,l);void 0!==u&&u.enumerable&&(r[l]=o[l])}}return r},polyfill:function(){}}},4680:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,i,o){if("[object Function]"!==r.call(i))throw TypeError("iterator must be a function");var n=e.length;if(n===+n)for(var a=0;a<n;a++)i.call(o,e[a],a,e);else for(var s in e)t.call(e,s)&&i.call(o,e[s],s,e)}},6555:function(e){"use strict";var t=Object.prototype.toString,r=Math.max,i=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var o=0;o<t.length;
1o+=1)r[o+e.length]=t[o];return r},o=function(e,t){for(var r=[],i=t||0,o=0;i<e.length;i+=1,o+=1)r[o]=e[i];return r},n=function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r};e.exports=function(e){var a,s=this;if("function"!=typeof s||"[object Function]"!==t.apply(s))throw TypeError("Function.prototype.bind called on incompatible "+s);for(var l=o(arguments,1),u=r(0,s.length-l.length),c=[],d=0;d<u;d++)c[d]="$"+d;if(a=Function("binder","return function ("+n(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=s.apply(this,i(l,arguments));return Object(t)===t?t:this}return s.apply(e,i(l,arguments))}),s.prototype){var p=function(){};p.prototype=s.prototype,a.prototype=new p,p.prototype=null}return a}},7797:function(e,t,r){"use strict";var i=r(6555);e.exports=Function.prototype.bind||i},1893:function(e,t,r){"use strict";var i,o=r(8300),n=r(6621),a=r(1247),s=r(6136),l=r(252),u=r(9546),c=r(4785),d=r(1223),p=r(4197),f=r(4455),h=r(1295),g=r(6949),y=r(2943),_=r(1721),m=r(3536),v=Function,b=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},S=r(8322),P=r(871),E=function(){throw new c},O=S?function(){try{return arguments.callee,E}catch(e){try{return S(arguments,"callee").get}catch(e){return E}}}():E,F=r(9131)(),w=r(9717),A=r(45),T=r(7767),x=r(4834),I=r(8772),M={},R="u">typeof Uint8Array&&w?w(Uint8Array):i,k={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":F&&w?w([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":"u"<typeof Atomics?i:Atomics,"%BigInt%":"u"<typeof BigInt?i:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"u"<typeof Float16Array?i:Float16Array,"%Float32Array%":"u"<typeof Float32Array?i:Float32Array,"%Float64Array%":"u"<typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":M,"%Int8Array%":"u"<typeof Int8Array?i:Int8Array,"%Int16Array%":"u"<typeof Int16Array?i:Int16Array,"%Int32Array%":"u"<typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":F&&w?w(w([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"u"<typeof Map?i:Map,"%MapIteratorPrototype%":"u">typeof Map&&F&&w?w((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?i:Promise,"%Proxy%":"u"<typeof Proxy?i:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":"u"<typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?i:Set,"%SetIteratorPrototype%":"u">typeof Set&&F&&w?w((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":F&&w?w(""[Symbol.iterator]()):i,"%Symbol%":F?Symbol:i,"%SyntaxError%":u,"%ThrowTypeError%":O,"%TypedArray%":R,"%TypeError%":c,"%Uint8Array%":"u"<typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?i:Uint32Array,"%URIError%":d,"%WeakMap%":"u"<typeof WeakMap?i:WeakMap,"%WeakRef%":"u"<typeof WeakRef?i:WeakRef,"%WeakSet%":"u"<typeof WeakSet?i:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":x,"%Object.defineProperty%":P,"%Object.getPrototypeOf%":A,"%Math.abs%":p,"%Math.floor%":f,"%Math.max%":h,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":_,"%Math.sign%":m,"%Reflect.getPrototypeOf%":T};if(w)try{null.error}catch(e){var j=w(w(e));k["%Error.prototype%"]=j}var C=function e(t){var r;if("%AsyncFunction%"===t)r=b("async function () {}");else if("%GeneratorFunction%"===t)r=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=b("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&w&&(r=w(o.prototype))}return k[t]=r,r},L={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=r(7797),U=r(3383),D=N.call(I,Array.prototype.concat),B=N.call(x,Array.prototype.splice),$=N.call(I,String.prototype.replace),H=N.call(I,String.prototype.slice),V=N.call(I,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,q=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var i=[];return $(e,z,function(e,t,r,o){i[i.length]=r?$(o,G,"$1"):t||e}),i},W=function(e,t){var r,i=e;if(U(L,i)&&(i="%"+(r=L[i])[0]+"%"),U(k,i)){var o=k[i];if(o===M&&(o=C(i)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=q(e),i=r.length>0?r[0]:"",o=W("%"+i+"%",t),n=o.name,a=o.value,s=!1,l=o.alias;l&&(i=l[0],B(r,D([0,1],l)));for(var d=1,p=!0;d<r.length;d+=1){var f=r[d],h=H(f,0,1),g=H(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===g||"'"===g||"`"===g)&&h!==g)throw new u("property names with quotes must have matching quotes");if("constructor"!==f&&p||(s=!0),i+="."+f,U(k,n="%"+i+"%"))a=k[n];
1else if(null!=a){if(!(f in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&d+1>=r.length){var y=S(a,f);a=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[f]}else p=U(a,f),a=a[f];p&&!s&&(k[n]=a)}}return a}},45:function(e,t,r){"use strict";e.exports=r(8300).getPrototypeOf||null},7767:function(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},9717:function(e,t,r){"use strict";var i=r(7767),o=r(45),n=r(3859);e.exports=i?function(e){return i(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return o(e)}:n?function(e){return n(e)}:null},8422:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},8322:function(e,t,r){"use strict";var i=r(8422);if(i)try{i([],"length")}catch(e){i=null}e.exports=i},8122:function(e,t,r){"use strict";var i=r(871),o=function(){return!!i};o.hasArrayLengthDefineBug=function(){if(!i)return null;try{return 1!==i([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},8564:function(e,t,r){"use strict";var i="u">typeof Symbol&&Symbol,o=r(9094);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9094:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9131:function(e,t,r){"use strict";var i="u">typeof Symbol&&Symbol,o=r(6313);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&o()}},6313:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3383:function(e,t,r){"use strict";var i=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(7797).call(i,o)},1638:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},6960:function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,i=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},o=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},n=function(){return i(arguments)}();i.isLegacyArguments=o,e.exports=n?i:o},8979:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,i=/^\s*(?:function)?\*/,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,n=Object.getPrototypeOf,a=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?n(a):{};e.exports=function(e){return"function"==typeof e&&(!!i.test(r.call(e))||(o?n(e)===s:"[object GeneratorFunction]"===t.call(e)))}},2397:function(e){"use strict";e.exports=function(e){return e!=e}},5211:function(e,t,r){"use strict";var i=r(2400),o=r(1246),n=r(2397),a=r(8840),s=r(9682),l=i(a(),Number);o(l,{getPolyfill:a,implementation:n,shim:s}),e.exports=l},8840:function(e,t,r){"use strict";var i=r(2397);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i}},9682:function(e,t,r){"use strict";var i=r(1246),o=r(8840);e.exports=function(){var e=o();return i(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},9572:function(t,r,i){"use strict";var o=i(4680),n=i(3147),a=i(2982),s=a("Object.prototype.toString"),l=i(8564)()&&"symbol"==typeof Symbol.toStringTag,u=n(),c=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return -1},d=a("String.prototype.slice"),p={},f=i(9745),h=Object.getPrototypeOf;l&&f&&h&&o(u,function(t){var r=new e.g[t];if(!(Symbol.toStringTag in r))throw EvalError("this engine has support for Symbol.toStringTag, but "+t+" does not have the property! Please report this.");var i=h(r),o=f(i,Symbol.toStringTag);o||(o=f(h(i),Symbol.toStringTag)),p[t]=o.get});var g=function(e){var t=!1;return o(p,function(r,i){if(!t)try{t=r.call(e)===i}catch(e){}}),t};t.exports=function(e){return!!e&&"object"==typeof e&&(l?!!f&&g(e):c(u,d(s(e),8,-1))>-1)}},4197:function(e){"use strict";e.exports=Math.abs},4455:function(e){"use strict";e.exports=Math.floor},6128:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},1295:function(e){"use strict";e.exports=Math.max},6949:function(e){"use strict";e.exports=Math.min},2943:function(e){"use strict";e.exports=Math.pow},1721:function(e){"use strict";e.exports=Math.round},3536:function(e,t,r){"use strict";var i=r(6128);e.exports=function(e){return i(e)||0===e?e:e<0?-1:1}},8388:function(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:!!(e===r||t(e)&&t(r))}},7742:function(e,t,r){"use strict";var i;if(!Object.keys){var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=r(426),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),u=s.call(function(){}
1,"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("u"<typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){if("u"<typeof window||!f)return d(e);try{return d(e)}catch(e){return!1}};i=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),i=a(e),s=t&&"[object String]"===n.call(e),d=[];if(!t&&!r&&!i)throw TypeError("Object.keys called on a non-object");var p=u&&r;if(s&&e.length>0&&!o.call(e,0))for(var f=0;f<e.length;++f)d.push(String(f));if(i&&e.length>0)for(var g=0;g<e.length;++g)d.push(String(g));else for(var y in e)!(p&&"prototype"===y)&&o.call(e,y)&&d.push(String(y));if(l)for(var _=h(e),m=0;m<c.length;++m)!(_&&"constructor"===c[m])&&o.call(e,c[m])&&d.push(c[m]);return d}}e.exports=i},7238:function(e,t,r){"use strict";var i=Array.prototype.slice,o=r(426),n=Object.keys,a=n?function(e){return n(e)}:r(7742),s=Object.keys;a.shim=function(){return Object.keys?!function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)&&(Object.keys=function(e){return o(e)?s(i.call(e)):s(e)}):Object.keys=a,Object.keys||a},e.exports=a},426:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),i="[object Arguments]"===r;return i||(i="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),i}},3798:function(e,t,r){"use strict";var i=r(1893),o=r(2071),n=r(8122)(),a=r(8322),s=r(4785),l=i("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,u=!0;if("length"in e&&a){var c=a(e,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(u=!1)}return(i||u||!r)&&(n?o(e,"length",t,!0,!0):o(e,"length",t)),e}},3614:function(e){e.exports=function(e){return e instanceof o.Buffer}},7551:function(e,t,r){"use strict";var i=r(6960),o=r(8979),n=r(3051),a=r(9572);function s(e){return e.call.bind(e)}var l="u">typeof BigInt,u="u">typeof Symbol,c=s(Object.prototype.toString),d=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(l)var h=s(BigInt.prototype.valueOf);if(u)var g=s(Symbol.prototype.valueOf);function y(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function _(e){return"[object Map]"===c(e)}function m(e){return"[object Set]"===c(e)}function v(e){return"[object WeakMap]"===c(e)}function b(e){return"[object WeakSet]"===c(e)}function S(e){return"[object ArrayBuffer]"===c(e)}function P(e){return!("u"<typeof ArrayBuffer)&&(S.working?S(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===c(e)}function O(e){return!("u"<typeof DataView)&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||O(e)},t.isUint8Array=function(e){return"Uint8Array"===n(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},t.isUint16Array=function(e){return"Uint16Array"===n(e)},t.isUint32Array=function(e){return"Uint32Array"===n(e)},t.isInt8Array=function(e){return"Int8Array"===n(e)},t.isInt16Array=function(e){return"Int16Array"===n(e)},t.isInt32Array=function(e){return"Int32Array"===n(e)},t.isFloat32Array=function(e){return"Float32Array"===n(e)},t.isFloat64Array=function(e){return"Float64Array"===n(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},_.working="u">typeof Map&&_(new Map),t.isMap=function(e){return!("u"<typeof Map)&&(_.working?_(e):e instanceof Map)},m.working="u">typeof Set&&m(new Set),t.isSet=function(e){return!("u"<typeof Set)&&(m.working?m(e):e instanceof Set)},v.working="u">typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return!("u"<typeof WeakMap)&&(v.working?v(e):e instanceof WeakMap)},b.working="u">typeof WeakSet&&b(new WeakSet),t.isWeakSet=function(e){return b(e)},S.working="u">typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=P,E.working="u">typeof ArrayBuffer&&"u">typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=O;var F="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function w(e){return"[object SharedArrayBuffer]"===c(e)}function A(e){return void 0!==F&&(void 0===w.working&&(w.working=w(new F)),w.working?w(e):e instanceof F)}function T(e){return y(e,d)}function x(e){return y(e,p)}function I(e){return y(e,f)}function M(e){return l&&y(e,h)}function R(e){return u&&y(e,g)}t.isSharedArrayBuffer=A,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},t.isGeneratorObject=function(e){return"[object Generator]"===c(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},t.isNumberObject=T,t.isStringObject=x,t.isBooleanObject=I,t.isBigIntObject=M,t.isSymbolObject=R,t.isBoxedPrimitive=function(e){return T(e)||x(e)||I(e)||M(e)||R(e)},t.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(P(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},4268:function(e,t,r){var o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++)r[t[i]]=Object.getOwnPropertyDescriptor(e,t[i]);return r},n=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}for(var r=1,i=arguments,o=i.length,a=String(e).replace(n,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}}),s=i[r];r<o;s=i[++r])_(s)||!P(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(e,r){if(void 0!==i.default&&!0===i.default.noDeprecation)return e;if(void 0===i.default)return function(){return t.deprecate(e,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(i.default.throwDeprecation)throw Error(r);i.default.traceDeprecation?console.trace(r):console.error(r),o=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(i.default.env.NODE_DEBUG){var l=i.default.env.NODE_DEBUG;s=RegExp("^"+(l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function u(e,r){var i={seen:[],stylize:d};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),y(r)?i.showHidden=r:r&&t._extend(i,r),b(i.showHidden)&&(i.showHidden=!1),b(i.depth)&&(i.depth=2),b(i.colors)&&(i.colors=!1),b(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=c),p(i,e,i.depth)}function c(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function d(e,t){return e}function p(e,r,i){if(e.customInspect&&r&&F(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var o,n,a,s,l,u,c=r.inspect(i,e);return v(c)||(c=p(e,c,i)),c}var d=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";
1return e.stylize(r,"string")}return m(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):_(t)?e.stylize("null","null"):void 0}(e,r);if(d)return d;var P=Object.keys(r),w=(l={},P.forEach(function(e,t){l[e]=!0}),l);if(e.showHidden&&(P=Object.getOwnPropertyNames(r)),O(r)&&(P.indexOf("message")>=0||P.indexOf("description")>=0))return f(r);if(0===P.length){if(F(r)){var A=r.name?": "+r.name:"";return e.stylize("[Function"+A+"]","special")}if(S(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(O(r))return f(r)}var T="",I=!1,M=["{","}"];if(g(r)&&(I=!0,M=["[","]"]),F(r)&&(T=" [Function"+(r.name?": "+r.name:"")+"]"),S(r)&&(T=" "+RegExp.prototype.toString.call(r)),E(r)&&(T=" "+Date.prototype.toUTCString.call(r)),O(r)&&(T=" "+f(r)),0===P.length&&(!I||0==r.length))return M[0]+T+M[1];if(i<0)if(S(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");else return e.stylize("[Object]","special");return e.seen.push(r),u=I?function(e,t,r,i,o){for(var n=[],a=0,s=t.length;a<s;++a)x(t,String(a))?n.push(h(e,t,r,i,String(a),!0)):n.push("");return o.forEach(function(o){o.match(/^\d+$/)||n.push(h(e,t,r,i,o,!0))}),n}(e,r,i,w,P):P.map(function(t){return h(e,r,i,w,t,I)}),e.seen.pop(),o=u,n=T,a=M,s=0,o.reduce(function(e,t){return s++,t.indexOf("\n")>=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?a[0]+(""===n?"":n+"\n ")+" "+o.join(",\n  ")+" "+a[1]:a[0]+n+" "+o.join(", ")+" "+a[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,i,o,n){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),x(i,o)||(a="["+o+"]"),!s&&(0>e.seen.indexOf(l.value)?(s=_(r)?p(e,l.value,null):p(e,l.value,r-1)).indexOf("\n")>-1&&(s=n?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(n&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function g(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function _(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function S(e){return P(e)&&"[object RegExp]"===w(e)}function P(e){return"object"==typeof e&&null!==e}function E(e){return P(e)&&"[object Date]"===w(e)}function O(e){return P(e)&&("[object Error]"===w(e)||e instanceof Error)}function F(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()])if(s.test(e)){var r=i.default.pid;a[e]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,i)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(7551),t.isArray=g,t.isBoolean=y,t.isNull=_,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=S,t.types.isRegExp=S,t.isObject=P,t.isDate=E,t.types.isDate=E,t.isError=O,t.types.isNativeError=O,t.isFunction=F,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(3614);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[A((e=new Date).getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(1638),t._extend=function(e,t){if(!t||!P(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var I="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t=e[I];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,
1configurable:!0}),t}function t(){for(var t,r,i=new Promise(function(e,i){t=e,r=i}),o=[],n=0;n<arguments.length;n++)o.push(arguments[n]);o.push(function(e,i){e?r(e):t(i)});try{e.apply(this,o)}catch(e){r(e)}return i}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=I,t.callbackify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw TypeError("The last argument must be of type Function");var n=this,a=function(){return o.apply(n,arguments)};e.apply(this,t).then(function(e){i.default.nextTick(a.bind(null,null,e))},function(e){i.default.nextTick(M.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},3051:function(t,r,i){"use strict";var o=i(4680),n=i(3147),a=i(2982),s=a("Object.prototype.toString"),l=i(8564)()&&"symbol"==typeof Symbol.toStringTag,u=n(),c=a("String.prototype.slice"),d={},p=i(9745),f=Object.getPrototypeOf;l&&p&&f&&o(u,function(t){if("function"==typeof e.g[t]){var r=new e.g[t];if(!(Symbol.toStringTag in r))throw EvalError("this engine has support for Symbol.toStringTag, but "+t+" does not have the property! Please report this.");var i=f(r),o=p(i,Symbol.toStringTag);o||(o=p(f(i),Symbol.toStringTag)),d[t]=o.get}});var h=function(e){var t=!1;return o(d,function(r,i){if(!t)try{var o=r.call(e);o===i&&(t=o)}catch(e){}}),t},g=i(9572);t.exports=function(e){return!!g(e)&&(l?h(e):c(s(e),8,-1))}},3147:function(t,r,i){"use strict";var o=i(7492);t.exports=function(){return o(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(t){return"function"==typeof e.g[t]})}},9745:function(e,t,r){"use strict";e.exports=r(8322)}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}},i=!0;try{n[e](r,r.exports,s),i=!1}finally{i&&delete a[e]}return r.exports}s.ab="/ROOT/node_modules/next/dist/compiled/assert/",t.exports=s(6810)},354171,(e,t,r)=>{var i=e.i(467034),o=e.i(247167);!function(){"use strict";var r={132:function(e,t,r){var n=r(613),a=r(682),s=r(371),l=r(519),u=r(793);for(var c in u)t[c]=u[c];function d(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,d.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):(this.mode===t.INFLATE||this.mode===t.GUNZIP||this.mode===t.INFLATERAW||this.mode===t.UNZIP)&&l.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null},d.prototype.write=function(e,t,r,i,o,n,a){return this._write(!0,e,t,r,i,o,n,a)},d.prototype.writeSync=function(e,t,r,i,o,n,a){return this._write(!1,e,t,r,i,o,n,a)},d.prototype._write=function(e,r,a,s,l,u,c,d){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==t.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw Error("Invalid flush value");if(null==a&&(a=i.Buffer.alloc(0),l=0,s=0),this.strm.avail_in=l,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=d,this.strm.output=u,this.strm.next_out=c,this.flush=r,!e)return(this._process(),this._checkError())?this._afterSync():void 0;var p=this;return o.default.nextTick(function(){p._process(),p._after()}),this},d.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},d.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31===this.strm.input[e]){if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break}else{this.mode=t.INFLATE;break}case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=l.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=l.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=l.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=l.inflate(this.strm,this.flush);break;default:throw Error("Unknown mode "+this.mode)}}
1,d.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},d.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},d.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},d.prototype.init=function(e,r,i,o,a){n(4==arguments.length||5==arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(e>=8&&e<=15,"invalid windowBits"),n(r>=-1&&r<=9,"invalid compression level"),n(i>=1&&i<=9,"invalid memlevel"),n(o===t.Z_FILTERED||o===t.Z_HUFFMAN_ONLY||o===t.Z_RLE||o===t.Z_FIXED||o===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,i,o,a),this._setDictionary()},d.prototype.params=function(){throw Error("deflateParams Not supported")},d.prototype.reset=function(){this._reset(),this._setDictionary()},d.prototype._init=function(e,r,i,o,n){switch(this.level=e,this.windowBits=r,this.memLevel=i,this.strategy=o,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,(this.mode===t.GZIP||this.mode===t.GUNZIP)&&(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),(this.mode===t.DEFLATERAW||this.mode===t.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=l.inflateInit2(this.strm,this.windowBits);break;default:throw Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=n,this.write_in_progress=!1,this.init_done=!0},d.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},d.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=l.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=d},953:function(e,t,r){var i=r(181).Buffer,n=r(203).Transform,a=r(132),s=r(23),l=r(613).ok,u=r(181).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var d=Object.keys(a),p=0;p<d.length;p++){var f=d[p];f.match(/^Z/)&&Object.defineProperty(t,f,{enumerable:!0,value:a[f],writable:!1})}for(var h={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ER
1ROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},g=Object.keys(h),y=0;y<g.length;y++){var _=g[y];h[h[_]]=_}function m(e,t,r){var o=[],n=0;function a(){for(var t;null!==(t=e.read());)o.push(t),n+=t.length;e.once("readable",a)}function s(){var t,a=null;n>=u?a=RangeError(c):t=i.concat(o,n),o=[],e.close(),r(a,t)}e.on("error",function(t){e.removeListener("end",s),e.removeListener("readable",a),r(t)}),e.on("end",s),e.end(t),a()}function v(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function b(e){if(!(this instanceof b))return new b(e);T.call(this,e,a.DEFLATE)}function S(e){if(!(this instanceof S))return new S(e);T.call(this,e,a.INFLATE)}function P(e){if(!(this instanceof P))return new P(e);T.call(this,e,a.GZIP)}function E(e){if(!(this instanceof E))return new E(e);T.call(this,e,a.GUNZIP)}function O(e){if(!(this instanceof O))return new O(e);T.call(this,e,a.DEFLATERAW)}function F(e){if(!(this instanceof F))return new F(e);T.call(this,e,a.INFLATERAW)}function w(e){if(!(this instanceof w))return new w(e);T.call(this,e,a.UNZIP)}function A(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function T(e,r){var o=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,n.call(this,e),e.flush&&!A(e.flush))throw Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!A(e.finishFlush))throw Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){x(s),s._hadError=!0;var i=Error(e);i.errno=r,i.code=t.codes[r],s.emit("error",i)};var l=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(l=e.level);var u=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(u=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,l,e.memLevel||t.Z_DEFAULT_MEMLEVEL,u,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=l,this._strategy=u,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function x(e,t){t&&o.default.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function I(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(h),writable:!1}),t.Deflate=b,t.Inflate=S,t.Gzip=P,t.Gunzip=E,t.DeflateRaw=O,t.InflateRaw=F,t.Unzip=w,t.createDeflate=function(e){return new b(e)},t.createInflate=function(e){return new S(e)},t.createDeflateRaw=function(e){return new O(e)},t.createInflateRaw=function(e){return new F(e)},t.createGzip=function(e){return new P(e)},t.createGunzip=function(e){return new E(e)},t.createUnzip=function(e){return new w(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new b(t),e,r)},t.deflateSync=function(e,t){return v(new b(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new P(t),e,r)},t.gzipSync=function(e,t){return v(new P(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new O(t),e,r)},t.deflateRawSync=function(e,t){return v(new O(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new w(t),e,r)},t.unzipSync=function(e,t){return v(new w(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new S(t),e,r)},t.inflateSync=function(e,t){return v(new S(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new E(t),e,r)},t.gunzipSync=function(e,t){return v(new E(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new F(t),e,r)},t.inflateRawSync=function(e,t){return v(new F(t),e)},s.inherits(T,n),T.prototype.params=function(e,r,i){if(e<t.Z_MIN_LEVEL||e>t.Z_MAX_LEVEL)throw RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var n=this;this.flush(a.Z_SYNC_FLUSH,function(){l(n._handle,"zlib binding closed"),n._handle.params(e,r),!n._hadError&&(n._level=e,n._strategy=r,i&&i())})}else o.default.nextTick(i)},T.prototype.reset=function(){return l(this._handle,"zlib binding closed"),this._handle.reset()},T.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},T.prototype.flush=function(e,t){var r=this,n=this._writableState;"function"!=typeof e&&(void 0!==e||t)||(t=e,e=a.Z_FULL_FLUSH),n.ended?t&&o.default.nextTick(t):n.ending?t&&this.once("end",t):n.needDrain?t&&this.once("drain",function(){return r.flush(e,t)}):(this._flushFlag=e,this.write(i.alloc(0),"",t))},T.prototype.close=function(e){x(this,e),o.default.nextTick(I,this)},T.prototype._transform=function(e,t,r){var o,n=this._writableState,s=(n.ending||n.ended)&&(!e||n.length===e.length);return null===e||i.isBuffer(e)?this._handle?void(s?o=this._finishFlushFlag:(o=this._flushFlag,e.length>=n.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),this._processChunk(e,o,r)):r(Error("zlib binding closed")):r(Error("invalid input"))},T.prototype._processChunk=function(e,t,r){var o=e&&e.length,n=this._chunkSize-this._offset,a=0,s=this,d="function"==typeof r;if(!d){var p,f=[],h=0;this.on("error",function(e){p=e}),l(this._handle,"zlib binding closed");do var g=this._handle.writeSync(t,e,a,o,this._buffer,this._offset,n);while(!this._hadError&&m(g[0],g[1]))if(this._hadError)throw p;if(h>=u)throw x(this),RangeError(c);var y=i.concat(f,h);return x(this),y}l(this._handle,"zlib binding closed");var _=this._handle.write(t,e,a,o,this._buffer,this._offset,n);function m(u,c){if(this&&(this.buffer=null,this.callback=null),!s._hadError){var p=n-c;if(l(p>=0,"have should not go down"),p>0){var g=s._buffer.slice(s._offset,s._offset+p);s._offset+=p,d?s.push(g):(f.push(g),h+=g.length)}if((0===c||s._offset>=s._chunkSize)&&(n=s._chunkSize,s._offset=0,s._buffer=i.allocUnsafe(s._chunkSize)),0===c){if(a+=o-u,o=u,!d)return!0;var y=s._handle.write(t,e,a,o,s._buffer,s._offset,s._chunkSize);
1return y.callback=m,void(y.buffer=e)}if(!d)return!1;r()}}_.buffer=e,_.callback=m},s.inherits(b,T),s.inherits(S,T),s.inherits(P,T),s.inherits(E,T),s.inherits(O,T),s.inherits(F,T),s.inherits(w,T)},589:function(e,t){var r="u">typeof Uint8Array&&"u">typeof Uint16Array&&"u">typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw TypeError(r+"must be non-object");for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,i,o){if(t.subarray&&e.subarray)return void e.set(t.subarray(r,r+i),o);for(var n=0;n<i;n++)e[o+n]=t[r+n]},flattenChunks:function(e){var t,r,i,o,n,a;for(t=0,i=0,r=e.length;t<r;t++)i+=e[t].length;for(a=new Uint8Array(i),o=0,t=0,r=e.length;t<r;t++)n=e[t],a.set(n,o),o+=n.length;return a}},o={arraySet:function(e,t,r,i,o){for(var n=0;n<i;n++)e[o+n]=t[r+n]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(r)},797:function(e){e.exports=function(e,t,r,i){for(var o=65535&e,n=e>>>16&65535,a=0;0!==r;){a=r>2e3?2e3:r,r-=a;do n=n+(o=o+t[i++]|0)|0;while(--a)o%=65521,n%=65521}return o|n<<16}},793:function(e){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},535:function(e){var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?0xedb88320^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,i,o){var n=o+i;e^=-1;for(var a=o;a<n;a++)e=e>>>8^t[(e^r[a])&255];return -1^e}},371:function(e,t,r){var i,o=r(589),n=r(81),a=r(797),s=r(535),l=r(858),u=573;function c(e,t){return e.msg=l[t],t}function d(e){return(e<<1)-9*(e>4)}function p(e){for(var t=e.length;--t>=0;)e[t]=0}function f(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function h(e,t){n._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,f(e.strm)}function g(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var r,i,o=e.max_chain_length,n=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,c=e.w_mask,d=e.prev,p=e.strstart+258,f=u[n+a-1],h=u[n+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(r=t)+a]!==h||u[r+a-1]!==f||u[r]!==u[n]||u[++r]!==u[n+1])continue;n+=2,r++;do;while(u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&n<p)if(i=258-(p-n),n=p-258,i>a){if(e.match_start=t,a=i,i>=s)break;f=u[n+a-1],h=u[n+a]}}while((t=d[t&c])>l&&0!=--o)return a<=e.lookahead?a:e.lookahead}function m(e){var t,r,i,n,l,u=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){o.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=r=e.hash_size;do i=e.head[--t],e.head[t]=i>=u?i-u:0;while(--r)t=r=u;do i=e.prev[--t],e.prev[t]=i>=u?i-u:0;while(--r)n+=u}if(0===e.strm.avail_in)break;if(r=function(e,t,r,i){var n=e.avail_in;return(n>i&&(n=i),0===n)?0:(e.avail_in-=n,o.arraySet(t,e.input,e.next_in,n,r),1===e.state.wrap?e.adler=a(e.adler,t,n,r):2===e.state.wrap&&(e.adler=s(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function v(e,t){for(var r,i;;){if(e.lookahead<262){if(m(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-262&&(e.match_length=_(e,r)),e.match_length>=3)if(i=n._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(0!=--e.match_length)e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;
1else i=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(h(e,!1),0===e.strm.avail_out))return 1}return(e.insert=e.strstart<2?e.strstart:2,4===t)?(h(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}function b(e,t){for(var r,i,o;;){if(e.lookahead<262){if(m(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-262&&(e.match_length=_(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,i=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(0!=--e.prev_length)if(e.match_available=0,e.match_length=2,e.strstart++,i&&(h(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=n._tr_tally(e,0,e.window[e.strstart-1]))&&h(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return(e.match_available&&(i=n._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t)?(h(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}function S(e,t,r,i,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=o}function P(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*u),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),p(this.dyn_ltree),p(this.dyn_dtree),p(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),p(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),p(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=+(2!==t.wrap),t.last_flush=0,n._tr_init(t),0):c(e,-2)}function O(e){var t,r=E(e);return 0===r&&((t=e.state).window_size=2*t.w_size,p(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function F(e,t,r,i,n,a){if(!e)return -2;var s=1;if(-1===t&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),n<1||n>9||8!==r||i<8||i>15||t<0||t>9||a<0||a>4)return c(e,-2);8===i&&(i=9);var l=new P;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=n+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new o.Buf8(2*l.w_size),l.head=new o.Buf16(l.hash_size),l.prev=new o.Buf16(l.w_size),l.lit_bufsize=1<<n+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new o.Buf8(l.pending_buf_size),l.d_buf=+l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,O(e)}i=[new S(0,0,0,0,function(e,t){var r=65535;for(65535>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(m(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,h(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-262&&(h(e,!1),0===e.strm.avail_out))return 1}return(e.insert=0,4===t)?(h(e,!0),0===e.strm.avail_out)?3:4:(e.strstart>e.block_start&&(h(e,!1),e.strm.avail_out),1)}),new S(4,4,8,4,v),new S(4,5,16,8,v),new S(4,6,32,32,v),new S(4,4,16,16,b),new S(8,16,32,32,b),new S(8,16,128,128,b),new S(8,32,128,256,b),new S(32,128,258,1024,b),new S(32,258,258,4096,b)],t.deflateInit=function(e,t){return F(e,t,8,15,8,0)},t.deflateInit2=F,t.deflateReset=O,t.deflateResetKeep=E,t.deflateSetHeader=function(e,t){return e&&e.state&&2===e.state.wrap?(e.state.gzhead=t,0):-2},t.deflate=function(e,t){if(!e||!e.state||t>5||t<0)return e?c(e,-2):-2;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||666===o.status&&4!==t)return c(e,0===e.avail_out?-5:-2);if(o.strm=e,r=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,g(o,31),g(o,139),g(o,8),o.gzhead?(g(o,+!!o.gzhead.text+2*!!o.gzhead.hcrc+4*!!o.gzhead.extra+8*!!o.gzhead.name+16*!!o.gzhead.comment),g(o,255&o.gzhead.time),g(o,o.gzhead.time>>8&255),g(o,o.gzhead.time>>16&255),g(o,o.gzhead.time>>24&255),g(o,9===o.level?2:4*(o.strategy>=2||o.level<2)),g(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(g(o,255&o.gzhead.extra.length),g(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=s(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(g(o,0),g(o,0),g(o,0),g(o,0),g(o,0),g(o,9===o.level?2:4*(o.strategy>=2||o.level<2)),g(o,3),o.status=113);else{var r,o,a,l,u=8+(o.w_bits-8<<4)<<8;u|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(u|=32),u+=31-u%31,o.status=113,y(o,u),0!==o.strstart&&(y(o,e.adler>>>16),y(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),f(e),a=o.pending,o.pending!==o.pending_buf_size));)g(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;
1if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),f(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,g(o,l)}while(0!==l)o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),f(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,g(o,l)}while(0!==l)o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&f(e),o.pending+2<=o.pending_buf_size&&(g(o,255&e.adler),g(o,e.adler>>8&255),e.adler=0,o.status=113)):o.status=113),0!==o.pending){if(f(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&d(t)<=d(r)&&4!==t)return c(e,-5);if(666===o.status&&0!==e.avail_in)return c(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var _=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(m(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(h(e,!1),0===e.strm.avail_out))return 1}return(e.insert=0,4===t)?(h(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,i,o,a,s=e.window;;){if(e.lookahead<=258){if(m(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=s[o=e.strstart-1])===s[++o]&&i===s[++o]&&i===s[++o]){a=e.strstart+258;do;while(i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&o<a)e.match_length=258-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=n._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(h(e,!1),0===e.strm.avail_out))return 1}return(e.insert=0,4===t)?(h(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(o,t):i[o.level].func(o,t);if((3===_||4===_)&&(o.status=666),1===_||3===_)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===_&&(1===t?n._tr_align(o):5!==t&&(n._tr_stored_block(o,0,0,!1),3===t&&(p(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),f(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(g(o,255&e.adler),g(o,e.adler>>8&255),g(o,e.adler>>16&255),g(o,e.adler>>24&255),g(o,255&e.total_in),g(o,e.total_in>>8&255),g(o,e.total_in>>16&255),g(o,e.total_in>>24&255)):(y(o,e.adler>>>16),y(o,65535&e.adler)),f(e),o.wrap>0&&(o.wrap=-o.wrap),+(0===o.pending))},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?c(e,-2):(e.state=null,113===t?c(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var r,i,n,s,l,u,c,d,f=t.length;if(!e||!e.state||2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return -2;for(1===s&&(e.adler=a(e.adler,t,f,0)),r.wrap=0,f>=r.w_size&&(0===s&&(p(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new o.Buf8(r.w_size),o.arraySet(d,t,f-r.w_size,r.w_size,0),t=d,f=r.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=f,e.
1next_in=0,e.input=t,m(r);r.lookahead>=3;){i=r.strstart,n=r.lookahead-2;do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+3-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--n)r.strstart=i,r.lookahead=2,m(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=u,e.input=c,e.avail_in=l,r.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},970:function(e){e.exports=function(e,t){var r,i,o,n,a,s,l,u,c,d,p,f,h,g,y,_,m,v,b,S,P,E,O,F,w;r=e.state,i=e.next_in,F=e.input,o=i+(e.avail_in-5),n=e.next_out,w=e.output,a=n-(t-e.avail_out),s=n+(e.avail_out-257),l=r.dmax,u=r.wsize,c=r.whave,d=r.wnext,p=r.window,f=r.hold,h=r.bits,g=r.lencode,y=r.distcode,_=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;e:do for(h<15&&(f+=F[i++]<<h,h+=8,f+=F[i++]<<h,h+=8),v=g[f&_];;){if(f>>>=b=v>>>24,h-=b,0==(b=v>>>16&255))w[n++]=65535&v;else if(16&b)for(S=65535&v,(b&=15)&&(h<b&&(f+=F[i++]<<h,h+=8),S+=f&(1<<b)-1,f>>>=b,h-=b),h<15&&(f+=F[i++]<<h,h+=8,f+=F[i++]<<h,h+=8),v=y[f&m];;){if(f>>>=b=v>>>24,h-=b,16&(b=v>>>16&255)){if(P=65535&v,h<(b&=15)&&(f+=F[i++]<<h,(h+=8)<b&&(f+=F[i++]<<h,h+=8)),(P+=f&(1<<b)-1)>l){e.msg="invalid distance too far back",r.mode=30;break e}if(f>>>=b,h-=b,P>(b=n-a)){if((b=P-b)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,O=p,0===d){if(E+=u-b,b<S){S-=b;do w[n++]=p[E++];while(--b)E=n-P,O=w}}else if(d<b){if(E+=u+d-b,(b-=d)<S){S-=b;do w[n++]=p[E++];while(--b)if(E=0,d<S){S-=b=d;do w[n++]=p[E++];while(--b)E=n-P,O=w}}}else if(E+=d-b,b<S){S-=b;do w[n++]=p[E++];while(--b)E=n-P,O=w}for(;S>2;)w[n++]=O[E++],w[n++]=O[E++],w[n++]=O[E++],S-=3;S&&(w[n++]=O[E++],S>1&&(w[n++]=O[E++]))}else{E=n-P;do w[n++]=w[E++],w[n++]=w[E++],w[n++]=w[E++],S-=3;while(S>2)S&&(w[n++]=w[E++],S>1&&(w[n++]=w[E++]))}}else if((64&b)==0){v=y[(65535&v)+(f&(1<<b)-1)];continue}else{e.msg="invalid distance code",r.mode=30;break e}break}else if((64&b)==0){v=g[(65535&v)+(f&(1<<b)-1)];continue}else if(32&b){r.mode=12;break e}else{e.msg="invalid literal/length code",r.mode=30;break e}break}while(i<o&&n<s)i-=S=h>>3,h-=S<<3,f&=(1<<h)-1,e.next_in=i,e.next_out=n,e.avail_in=i<o?5+(o-i):5-(i-o),e.avail_out=n<s?257+(s-n):257-(n-s),r.hold=f,r.bits=h}},519:function(e,t,r){var i,o,n=r(589),a=r(797),s=r(535),l=r(970),u=r(6);function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):-2}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):-2}function h(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,f(e)):-2}function g(e,t){var r,i;return e?(e.state=i=new d,i.window=null,0!==(r=h(e,t))&&(e.state=null),r):-2}var y=!0;function _(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}t.inflateReset=f,t.inflateReset2=h,t.inflateResetKeep=p,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var r,d,p,f,h,g,m,v,b,S,P,E,O,F,w,A,T,x,I,M,R,k,j,C,L=0,N=new n.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return -2;12===(r=e.state).mode&&(r.mode=13),h=e.next_out,p=e.output,m=e.avail_out,f=e.next_in,d=e.input,g=e.avail_in,v=r.hold,b=r.bits,S=g,P=m,k=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;b<16;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(2&r.wrap&&35615===v){r.check=0,N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0),v=0,b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){e.msg="incorrect header check",r.mode=30;break}if((15&v)!=8){e.msg="unknown compression method",r.mode=30;break}if(v>>>=4,b-=4,R=(15&v)+8,0===r.wbits)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<R,e.adler=r.check=1,r.mode=512&v?10:12,v=0,b=0;break;case 2:for(;b<16;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(r.flags=v,(255&r.flags)!=8){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=v>>8&1),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0)),v=0,b=0,r.mode=3;case 3:for(;b<32;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}r.head&&(r.head.time=v),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,N[2]=v>>>16&255,N[3]=v>>>24&255,r.check=s(r.check,N,4,0)),v=0,b=0,r.mode=4;case 4:for(;b<16;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}r.head&&(r.head.xflags=255&v,r.head.os=v>>8),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0)),v=0,b=0,r.mode=5;case 5:if(1024&r.flags){for(;b<16;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}r.length=v,r.head&&(r.head.extra_len=v),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0)),v=0,b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((E=r.length)>g&&(E=g),E&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=Array(r.head.extra_len)),n.arraySet(r.head.extra,d,f,E,R)),512&r.flags&&(r.check=s(r.check,d,E,f)),g-=E,f+=E,r.length-=E),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;E=0;do R=d[f+E++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R));while(R&&E<g)if(512&r.flags&&(r.check=s(r.check,d,E,f)),g-=E,f+=E,R)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;E=0;do R=d[f+E++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R));while(R&&E<g)if(512&r.flags&&(r.check=s(r.check,d,E,f)),g-=E,f+=E,R)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;b<16;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(v!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=0,b=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;b<32;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}e.adler=r.check=c(v),v=0,b=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=h,e.avail_out=m,e.next_in=f,e.avail_in=g,r.hold=v,r.bits=b,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){v>>>=7&b,b-=7&b,r.mode=27;break}for(;b<3;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}switch(r.last=1&v,b-=1,3&(v>>>=1)){case 0:r.mode=14;break;case 1:if(!function(e){if(y){var t;for(i=new n.Buf32(512),o=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(u(1,e.lens,0,288,i,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;u(2,e.lens,0,32,o,0,e.work,{bits:5}),y=!1}
1e.lencode=i,e.lenbits=9,e.distcode=o,e.distbits=5}(r),r.mode=20,6===t){v>>>=2,b-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}v>>>=2,b-=2;break;case 14:for(v>>>=7&b,b-=7&b;b<32;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if((65535&v)!=(v>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&v,v=0,b=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(E=r.length){if(E>g&&(E=g),E>m&&(E=m),0===E)break e;n.arraySet(p,d,f,E,h),g-=E,f+=E,m-=E,h+=E,r.length-=E;break}r.mode=12;break;case 17:for(;b<14;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(r.nlen=(31&v)+257,b-=5,r.ndist=(31&(v>>>=5))+1,b-=5,r.ncode=(15&(v>>>=5))+4,v>>>=4,b-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;b<3;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}r.lens[U[r.have++]]=7&v,v>>>=3,b-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,j={bits:r.lenbits},k=u(0,r.lens,0,19,r.lencode,0,r.work,j),r.lenbits=j.bits,k){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;w=(L=r.lencode[v&(1<<r.lenbits)-1])>>>24,A=L>>>16&255,T=65535&L,!(w<=b);){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(T<16)v>>>=w,b-=w,r.lens[r.have++]=T;else{if(16===T){for(C=w+2;b<C;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(v>>>=w,b-=w,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}R=r.lens[r.have-1],E=3+(3&v),v>>>=2,b-=2}else if(17===T){for(C=w+3;b<C;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}v>>>=w,b-=w,R=0,E=3+(7&v),v>>>=3,b-=3}else{for(C=w+7;b<C;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}v>>>=w,b-=w,R=0,E=11+(127&v),v>>>=7,b-=7}if(r.have+E>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;E--;)r.lens[r.have++]=R}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,j={bits:r.lenbits},k=u(1,r.lens,0,r.nlen,r.lencode,0,r.work,j),r.lenbits=j.bits,k){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,j={bits:r.distbits},k=u(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,j),r.distbits=j.bits,k){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(g>=6&&m>=258){e.next_out=h,e.avail_out=m,e.next_in=f,e.avail_in=g,r.hold=v,r.bits=b,l(e,P),h=e.next_out,p=e.output,m=e.avail_out,f=e.next_in,d=e.input,g=e.avail_in,v=r.hold,b=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;w=(L=r.lencode[v&(1<<r.lenbits)-1])>>>24,A=L>>>16&255,T=65535&L,!(w<=b);){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(A&&(240&A)==0){for(x=w,I=A,M=T;w=(L=r.lencode[M+((v&(1<<x+I)-1)>>x)])>>>24,A=L>>>16&255,T=65535&L,!(x+w<=b);){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}v>>>=x,b-=x,r.back+=x}if(v>>>=w,b-=w,r.back+=w,r.length=T,0===A){r.mode=26;break}if(32&A){r.back=-1,r.mode=12;break}if(64&A){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&A,r.mode=22;case 22:if(r.extra){for(C=r.extra;b<C;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}r.length+=v&(1<<r.extra)-1,v>>>=r.extra,b-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;w=(L=r.distcode[v&(1<<r.distbits)-1])>>>24,A=L>>>16&255,T=65535&L,!(w<=b);){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if((240&A)==0){for(x=w,I=A,M=T;w=(L=r.distcode[M+((v&(1<<x+I)-1)>>x)])>>>24,A=L>>>16&255,T=65535&L,!(x+w<=b);){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}v>>>=x,b-=x,r.back+=x}if(v>>>=w,b-=w,r.back+=w,64&A){e.msg="invalid distance code",r.mode=30;break}r.offset=T,r.extra=15&A,r.mode=24;case 24:if(r.extra){for(C=r.extra;b<C;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}r.offset+=v&(1<<r.extra)-1,v>>>=r.extra,b-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break e;if(E=P-m,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}E>r.wnext?(E-=r.wnext,O=r.wsize-E):O=r.wnext-E,E>r.length&&(E=r.length),F=r.window}else F=p,O=h-r.offset,E=r.length;E>m&&(E=m),m-=E,r.length-=E;do p[h++]=F[O++];while(--E)0===r.length&&(r.mode=21);break;case 26:if(0===m)break e;p[h++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;b<32;){if(0===g)break e;g--,v|=d[f++]<<b,b+=8}if(P-=m,e.total_out+=P,r.total+=P,P&&(e.adler=r.check=r.flags?s(r.check,p,P,h-P):a(r.check,p,P,h-P)),P=m,(r.flags?v:c(v))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=0,b=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;b<32;){if(0===g)break e;g--,v+=d[f++]<<b,b+=8}if(v!==(0|r.total)){e.msg="incorrect length check",r.mode=30;break}v=0,b=0}r.mode=29;case 29:k=1;break e;case 30:k=-3;break e;case 31:return -4;default:return -2}return e.next_out=h,e.avail_out=m,e.next_in=f,e.avail_in=g,r.hold=v,r.bits=b,(r.wsize||P!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&_(e,e.output,e.next_out,P-e.avail_out),S-=e.avail_in,P-=e.avail_out,e.total_in+=S,e.total_out+=P,r.total+=P,r.wrap&&P&&(e.adler=r.check=r.flags?s(r.check,p,P,e.next_out-P):a(r.check,p,P,e.next_out-P)),e.data_type=r.bits+64*!!r.last+128*(12===r.mode)+256*(20===r.mode||15===r.mode),(0===S&&0===P||4===t)&&0===k&&(k=-5),k},t.inflateEnd=function(e){if(!e||!e.state)return -2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&(2&(r=e.state).wrap)!=0?(r.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var r,i=t.length;return e&&e.state&&(0===(r=e.state).wrap||11===r.mode)?11===r.mode&&a(1,t,i,0)!==r.check?-3:_(e,t,i,i)?(r.mode=31,-4):(r.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},6:function(e,t,r){var i=r(589),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,l,u,c,d,p){var f,h,g,y,_,m,v,b,S,P=p.bits,E=0,O=0,F=0,w=0,A=0,T=0,x=0,I=0,M=0,R=0,k=null,j=0,C=new i.Buf16(16),L=new i.Buf16(16),N=null,U=0;for(E=0;E<=15;E++)C[E]=0;for(O=0;O<l;O++)C[t[r+O]]++;for(A=P,w=15;w>=1&&0===C[w];w--);if(A>w&&(A=w),0===w)return u[c++]=0x1400000,u[c++]=0x1400000,p.bits=1,0;for(F=1;F<w&&0===C[F];F++);for(A<F&&(A=F),I=1,E=1;E<=15;E++)if(I<<=1,(I-=C[E])<0)return -1;if(I>0&&(0===e||1!==w))return -1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+C[E];for(O=0;O<l;O++)0!==t[r+O]&&(d[L[t[r+O]]++]=O);if(0===e?(k=N=d,m=19):1===e?(k=o,j-=257,N=n,U-=257,m=256):(k=a,N=s,m=-1),R=0,O=0,E=F,_=c,T=A,x=0,g=-1,y=(M=1<<A)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){v=E-x,d[O]<m?(b=0,S=d[O]):d[O]>m?(b=N[U+d[O]],S=k[j+d[O]]):(b=96,S=0),f=1<<E-x,F=h=1<<T;do u[_+(R>>x)+(h-=f)]=v<<24|b<<16|S;while(0!==h)for(f=1<<E-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,O++,0==--C[E]){if(E===w)break;E=t[r+d[O]]}if(E>A&&(R&y)!==g){for(0===x&&(x=A),_+=F,I=1<<(T=E-x);T+x<w&&!((I-=C[T+x])<=0);)T++,I<<=1;if(M+=1<<T,1===e&&M>852||2===e&&M>592)return 1;u[g=R&y]=A<<24|T<<16|_-c}}return 0!==R&&(u[_+R]=E-x<<24|4194304),p.bits=A,0}},858:function(e){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},81:function(e,t,r){var i,o,n,a=r(589);function s(e){for(var t=e.length;--t>=0;)e[t]=0}var l=573,u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=Array(576);s(f);var h=Array(60);s(h);var g=Array(512);s(g);var y=Array(256);s(y);var _=Array(29);s(_);var m=Array(30);function v(e,t,r,i,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=o,this.has_stree=e&&e.length}function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function S(e){return e<256?g[e]:g[256+(e>>>7)]}
1function P(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,P(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function O(e,t,r){E(e,r[2*t],r[2*t+1])}function F(e,t){var r=0;do r|=1&e,e>>>=1,r<<=1;while(--t>0)return r>>>1}function w(e,t,r){var i,o,n=Array(16),a=0;for(i=1;i<=15;i++)n[i]=a=a+r[i-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=F(n[s]++,s))}}function A(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function T(e){e.bi_valid>8?P(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function x(e,t,r,i){var o=2*t,n=2*r;return e[o]<e[n]||e[o]===e[n]&&i[t]<=i[r]}function I(e,t,r){for(var i=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&x(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!x(t,i,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=i}function M(e,t,r){var i,o,n,a,s=0;if(0!==e.last_lit)do i=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],o=e.pending_buf[e.l_buf+s],s++,0===i?O(e,o,t):(O(e,(n=y[o])+256+1,t),0!==(a=u[n])&&E(e,o-=_[n],a),O(e,n=S(--i),r),0!==(a=c[n])&&E(e,i-=m[n],a));while(s<e.last_lit)O(e,256,t)}function R(e,t){var r,i,o,n=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=l,r=0;r<u;r++)0!==n[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):n[2*r+1]=0;for(;e.heap_len<2;)n[2*(o=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[o]=0,e.opt_len--,s&&(e.static_len-=a[2*o+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)I(e,n,r);o=u;do r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],I(e,n,1),i=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=i,n[2*o]=n[2*r]+n[2*i],e.depth[o]=(e.depth[r]>=e.depth[i]?e.depth[r]:e.depth[i])+1,n[2*r+1]=n[2*i+1]=o,e.heap[1]=o++,I(e,n,1);while(e.heap_len>=2)e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,i,o,n,a,s,u=t.dyn_tree,c=t.max_code,d=t.stat_desc.static_tree,p=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,y=0;for(n=0;n<=15;n++)e.bl_count[n]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<l;r++)(n=u[2*u[2*(i=e.heap[r])+1]+1]+1)>g&&(n=g,y++),u[2*i+1]=n,!(i>c)&&(e.bl_count[n]++,a=0,i>=h&&(a=f[i-h]),s=u[2*i],e.opt_len+=s*(n+a),p&&(e.static_len+=s*(d[2*i+1]+a)));if(0!==y){do{for(n=g-1;0===e.bl_count[n];)n--;e.bl_count[n]--,e.bl_count[n+1]+=2,e.bl_count[g]--,y-=2}while(y>0)for(n=g;0!==n;n--)for(i=e.bl_count[n];0!==i;)!((o=e.heap[--r])>c)&&(u[2*o+1]!==n&&(e.opt_len+=(n-u[2*o+1])*u[2*o],u[2*o+1]=n),i--)}}(e,t),w(n,c,e.bl_count)}function k(e,t,r){var i,o,n=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)o=a,a=t[(i+1)*2+1],++s<l&&o===a||(s<u?e.bl_tree[2*o]+=s:0!==o?(o!==n&&e.bl_tree[2*o]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,n=o,0===a?(l=138,u=3):o===a?(l=6,u=3):(l=7,u=4))}function j(e,t,r){var i,o,n=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),i=0;i<=r;i++)if(o=a,a=t[(i+1)*2+1],!(++s<l)||o!==a){if(s<u)do O(e,o,e.bl_tree);while(0!=--s)else 0!==o?(o!==n&&(O(e,o,e.bl_tree),s--),O(e,16,e.bl_tree),E(e,s-3,2)):s<=10?(O(e,17,e.bl_tree),E(e,s-3,3)):(O(e,18,e.bl_tree),E(e,s-11,7));s=0,n=o,0===a?(l=138,u=3):o===a?(l=6,u=3):(l=7,u=4)}}s(m);var C=!1;function L(e,t,r,i){E(e,0+ +!!i,3),T(e),P(e,r),P(e,~r),a.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}t._tr_init=function(e){C||(!function(){var e,t,r,a,s,l=Array(16);for(a=0,r=0;a<28;a++)for(_[a]=r,e=0;e<1<<u[a];e++)y[r++]=a;for(y[r-1]=a,s=0,a=0;a<16;a++)for(m[a]=s,e=0;e<1<<c[a];e++)g[s++]=a;for(s>>=7;a<30;a++)for(m[a]=s<<7,e=0;e<1<<c[a]-7;e++)g[256+s++]=a;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)f[2*e+1]=8,e++,l[8]++;for(;e<=255;)f[2*e+1]=9,e++,l[9]++;for(;e<=279;)f[2*e+1]=7,e++,l[7]++;for(;e<=287;)f[2*e+1]=8,e++,l[8]++;for(w(f,287,l),e=0;e<30;e++)h[2*e+1]=5,h[2*e]=F(e,5);i=new v(f,u,257,286,15),o=new v(h,c,0,30,15),n=new v([],d,0,19,7)}(),C=!0),e.l_desc=new b(e.dyn_ltree,i),e.d_desc=new b(e.dyn_dtree,o),e.bl_desc=new b(e.bl_tree,n),e.bi_buf=0,e.bi_valid=0,A(e)},t._tr_stored_block=L,t._tr_flush_block=function(e,t,r,i){var o,n,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=0xf3ffc07f;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),R(e,e.l_desc),R(e,e.d_desc),a=function(e){var t;for(k(e,e.dyn_ltree,e.l_desc.max_code),k(e,e.dyn_dtree,e.d_desc.max_code),R(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*p[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(n=e.static_len+3+7>>>3)<=o&&(o=n)):o=n=r+5,r+4<=o&&-1!==t?L(e,t,r,i):4===e.strategy||n===o?(E(e,2+ +!!i,3),M(e,f,h)):(E(e,4+ +!!i,3),function(e,t,r,i){var o;for(E(e,t-257,5),E(e,r-1,5),E(e,i-4,4),o=0;o<i;o++)E(e,e.bl_tree[2*p[o]+1],3);j(e,e.dyn_ltree,t-1),j(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),M(e,e.dyn_ltree,e.dyn_dtree)),A(e),i&&T(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[(y[r]+256+1)*2]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){E(e,2,3),O(e,256,f),16===e.bi_valid?(P(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},682:function(e){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},613:function(t){t.exports=e.r(440224)},181:function(t){t.exports=e.r(467034)},203:function(t){t.exports=e.r(612569)},23:function(t){t.exports=e.r(477398)}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}},o=!0;try{r[e](i,i.exports,a),o=!1}finally{o&&delete n[e]}return i.exports}a.ab="/ROOT/node_modules/next/dist/compiled/browserify-zlib/",t.exports=a(953)}()},337646,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{gzipCompress:()=>s});let n=e.r(354171),a=(0,e.r(477398).promisify)(n.gzip);async function s(e,t=!0){try{let t=await a(e);return new Uint8Array(t)}catch(e){return t&&console.error("Failed to gzip compress data",e),null}}for(var l in r.gzipCompress=o.gzipCompress,o)-1===["gzipCompress"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},945425,(e,t,r)=>{var i;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="/ROOT/node_modules/next/dist/compiled/os-browserify/"),(i={}).endianness=function(){return"LE"},i.hostname=function(){return"u">typeof location?location.hostname:""},i.loadavg=function(){return[]},i.uptime=function(){return 0},i.freemem=function(){return Number.MAX_VALUE},i.totalmem=function(){return Number.MAX_VALUE},i.cpus=function(){return[]},i.type=function(){return"Browser"},i.release=function(){return"u">typeof navigator?navigator.appVersion:""},i.networkInterfaces=i.getNetworkInterfaces=function(){return{}},i.arch=function(){return"javascript"},i.platform=function(){return"browser"},i.tmpdir=i.tmpDir=function(){return"/tmp"},i.EOL="\n",i.homedir=function(){return"/"},t.exports=i},660878,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{hostOsResourceAttributes:()=>s});let n=e.r(945425),a=e.r(744094);function s(){let e,t;try{e=(0,n.platform)(),t=(0,n.release)()}catch{}return(0,a.osResourceAttributes)(e,t)}for(var l in r.hostOsResourceAttributes=o.hostOsResourceAttributes,o)-1===["hostOsResourceAttributes"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},592135,(e,t,r)=>{"use strict";var i={"../client"(t){t.exports=e.r(710012)},"../exports"(t){t.exports=e.r(329677)},"../extensions/context/context"(t){t.exports=e.r(899343)},"../extensions/context/span-context.node"(t){t.exports=e.r(426569)},"../extensions/error-tracking/modifiers/context-lines.node"(t){t.exports=e.r(443476)},"../extensions/error-tracking/modifiers/module.node"(t){t.exports=e.r(653958)},"../extensions/error-tracking/modifiers/relative-path.node"(t){t.exports=e.r(323306)},"../gzip.node"(t){t.exports=e.r(337646)},"../host-os.node"(t){t.exports=e.r(660878)},"@posthog/core"(t){t.exports=e.r(744094)}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};for(var s in(()=>{n.r(a);var e=n("../exports"),t={};for(let r in e)0>["PostHog","default"].indexOf(r)&&(t[r]=()=>e[r]);n.d(a,t);var r=n("../extensions/error-tracking/modifiers/module.node"),i=n("../extensions/error-tracking/modifiers/context-lines.node"),o=n("../extensions/error-tracking/modifiers/relative-path.node"),s=n("../client"),l=n("@posthog/core"),u=n("../extensions/context/context"),c=n("../extensions/context/span-context.node"),d=n("../gzip.node"),p=n("../host-os.node");class f extends s.PostHogBackendClient{getLibraryId(){return"posthog-node"}compressPayload(e){return(0,d.gzipCompress)(e,this.isDebug)}initializeContext(){return new u.PostHogContext}initializeSpanContextManager(){return new c.AsyncLocalStorageSpanContextManager}hostResourceAttributes(){return(0,p.hostOsResourceAttributes)()}createErrorPropertiesBuilder(){return new l.ErrorTracking.ErrorPropertiesBuilder([new l.ErrorTracking.EventCoercer,new l.ErrorTracking.ErrorCoercer,new l.ErrorTracking.ObjectCoercer,new l.ErrorTracking.StringCoercer,new l.ErrorTracking.PrimitiveCoercer],l.
1ErrorTracking.createStackParser("node:javascript",l.ErrorTracking.nodeStackLineParser),[(0,r.createModulerModifier)(),e=>(0,i.addSourceContext)(e,void 0,this._logger),(0,o.createRelativePathModifier)()])}}n.d(a,{PostHog:()=>f})})(),r.PostHog=a.PostHog,a)-1===["PostHog"].indexOf(s)&&(r[s]=a[s]);Object.defineProperty(r,"__esModule",{value:!0})},125115,e=>{"use strict";var t=e.i(247167);function r(e={}){let t=o(e.synchronex_account_id)??o(e.account_id)??o(e.accountId),i=o(e.sx_workspace)??o(e.workspace_id)??o(e.workspaceId)??window.localStorage.getItem("synchronex.active_workspace_id");return{...e,product:"synchronex",...t?{synchronex_account_id:t}:{},...i?{sx_workspace:i}:{}}}function i(t={}){e.A(604435).then(({default:e})=>{let i=r(t);e.register(i);let n=o(i.sx_workspace);n&&e.group("sx_workspace",n)})}function o(e){return"string"==typeof e&&e.length>0?e:null}e.s(["initPostHog",0,function(){e.A(604435).then(({default:e})=>{e.__loaded||(e.init("phc_m2UxHb6sHE6rRoMkSrueigazgRsK3bZ7ra9PbUNc3yar",{api_host:t.default.env.NEXT_PUBLIC_POSTHOG_HOST??"https://app.posthog.com",capture_pageview:!1,capture_pageleave:!0}),i())})},"registerSynchronexAnalyticsContext",0,i,"track",0,function(t,o){e.A(604435).then(({default:e})=>{i(o),e.capture(t,r(o))})}])},49384,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};for(var n in i.r(o),i.d(o,{},{version:"5.52.1"}),r.version=o.version,o)-1===["version"].indexOf(n)&&(r[n]=o[n]);Object.defineProperty(r,"__esModule",{value:!0})},318770,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterestbot","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"];for(var a in i.d(o,{},{DEFAULT_BLOCKED_UA_STRS:n,isBlockedUA:function(e,t=[]){if(!e)return!1;let r=e.toLowerCase();return n.concat(t).some(e=>{let t=e.toLowerCase();return -1!==r.indexOf(t)})}}),r.DEFAULT_BLOCKED_UA_STRS=o.DEFAULT_BLOCKED_UA_STRS,r.isBlockedUA=o.isBlockedUA,o)-1===["DEFAULT_BLOCKED_UA_STRS","isBlockedUA"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},160607,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(e,t){return -1!==e.indexOf(t)}function a(e){return["distinct_id","distinctid"].includes(e.toLowerCase())}function s(e){let t=[];return JSON.stringify(e,function(e,r){if("bigint"==typeof r)return r.toString();if("function"!=typeof r&&"symbol"!=typeof r){if(r instanceof Error)return{name:r.name,message:r.message,stack:r.stack};if(r&&"object"==typeof r){for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(t.includes(r))return"[Circular]";t.push(r)}return r}})??"null"}function l(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map(l):Object.keys(e).sort().reduce((t,r)=>(t[r]=l(e[r]),t),{})}function u(e,t,r){return JSON.stringify({distinct_id:e,userPropertiesToSet:t?l(t):void 0,userPropertiesToSetOnce:r?l(r):void 0})}for(var c in i.r(o),i.d(o,{getPersonPropertiesHash:()=>u,includes:()=>n,isDistinctIdStringLike:()=>a,safeJsonStringify:()=>s},{stripLeadingDollar:function(e){return e.replace(/^\$/,"")},trim:function(e){return e.trim()}}),r.getPersonPropertiesHash=o.getPersonPropertiesHash,r.includes=o.includes,r.isDistinctIdStringLike=o.isDistinctIdStringLike,r.safeJsonStringify=o.safeJsonStringify,r.stripLeadingDollar=o.stripLeadingDollar,r.trim=o.trim,o)-1===["getPersonPropertiesHash","includes","isDistinctIdStringLike","safeJsonStringify","stripLeadingDollar","trim"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},515318,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{isWebKit:()=>a});let n=e.r(160607);function a(e){return(0,n.includes)(e,"AppleWebKit")&&!(0,n.includes)(e,"Chrome")}for(var s in r.isWebKit=o.isWebKit,o)-1===["isWebKit"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},699960,(e,t,r)=>{"use strict";var i,o,n={};n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a);var s=((i={}).AnonymousId="anonymous_id",i.DistinctId="distinct_id",i.Props="props",i.EnablePersonProcessing="enable_person_processing",i.PersonMode="person_mode",i.FeatureFlagDetails="feature_flag_details",i.FeatureFlags="feature_flags",i.FeatureFlagPayloads="feature_flag_payloads",i.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",i.BootstrapFeatureFlags="bootstrap_feature_flags",i.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",i.OverrideFeatureFlags="override_feature_flags",i.Queue="queue",i.AiQueue="ai_queue",i.AiCaptureQueue="ai_capture_queue",i.LogsQueue="logs_queue",i.OptedOut="opted_out",i.SessionId="session_id",i.SessionStartTimestamp="session_start_timestamp",i.SessionLastTimestamp="session_timestamp",i.PersonProperties="person_properties",i.GroupProperties="group_properties",i.InstalledAppBuild="installed_app_build",i.InstalledAppVersion="installed_app_version",i.SessionReplay="session_replay",i.PushRegistered="push_registered",i.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",i.SurveyLastSeenDate="survey_last_seen_date",i.SurveysSeen="surveys_seen",i.Surveys="surveys",i.RemoteConfig="remote_config",i.FlagsEndpointWasHit="flags_endpoint_was_hit",i.DeviceId="device_id",i),l=((o={}).GZipJS="gzip-js",o.Base64="base64",o);for(var u in n.d(a,{Compression:()=>l,PostHogPersistedProperty:()=>s},{ActionStepStringMatching:{Contains:"contains",Exact:"exact",Regex:"regex"},FeatureFlagError:{ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",TIMEOUT:"timeout",CONNECTION_ERROR:"connection_error",UNKNOWN_ERROR:"unknown_error",apiError:e=>`api_error_${e}`}
1,SurveyMatchType:{Regex:"regex",NotRegex:"not_regex",Exact:"exact",IsNot:"is_not",Icontains:"icontains",NotIcontains:"not_icontains"},SurveyPosition:{TopLeft:"top_left",TopCenter:"top_center",TopRight:"top_right",MiddleLeft:"middle_left",MiddleCenter:"middle_center",MiddleRight:"middle_right",Left:"left",Right:"right",Center:"center"},SurveyQuestionBranchingType:{NextQuestion:"next_question",End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},SurveyQuestionDescriptionContentType:{Html:"html",Text:"text"},SurveyQuestionType:{Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},SurveyRatingDisplay:{Number:"number",Emoji:"emoji"},SurveySchedule:{Once:"once",Recurring:"recurring",Always:"always"},SurveyType:{Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},SurveyValidationType:{MinLength:"min_length",MaxLength:"max_length"},SurveyWidgetType:{Button:"button",Tab:"tab",Selector:"selector"},knownUnsafeEditableEvent:["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],knownUnsafeEditableEventProperty:["token"]}),r.ActionStepStringMatching=a.ActionStepStringMatching,r.Compression=a.Compression,r.FeatureFlagError=a.FeatureFlagError,r.PostHogPersistedProperty=a.PostHogPersistedProperty,r.SurveyMatchType=a.SurveyMat
1chType,r.SurveyPosition=a.SurveyPosition,r.SurveyQuestionBranchingType=a.SurveyQuestionBranchingType,r.SurveyQuestionDescriptionContentType=a.SurveyQuestionDescriptionContentType,r.SurveyQuestionType=a.SurveyQuestionType,r.SurveyRatingDisplay=a.SurveyRatingDisplay,r.SurveySchedule=a.SurveySchedule,r.SurveyType=a.SurveyType,r.SurveyValidationType=a.SurveyValidationType,r.SurveyWidgetType=a.SurveyWidgetType,r.knownUnsafeEditableEvent=a.knownUnsafeEditableEvent,r.knownUnsafeEditableEventProperty=a.knownUnsafeEditableEventProperty,a)-1===["ActionStepStringMatching","Compression","FeatureFlagError","PostHogPersistedProperty","SurveyMatchType","SurveyPosition","SurveyQuestionBranchingType","SurveyQuestionDescriptionContentType","SurveyQuestionType","SurveyRatingDisplay","SurveySchedule","SurveyType","SurveyValidationType","SurveyWidgetType","knownUnsafeEditableEvent","knownUnsafeEditableEventProperty"].indexOf(u)&&(r[u]=a[u]);Object.defineProperty(r,"__esModule",{value:!0})},864066,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{hasOwnProperty:()=>u,isArray:()=>d,isBoolean:()=>E,isBuiltin:()=>I,isEmptyObject:()=>g,isEmptyString:()=>m,isError:()=>M,isErrorEvent:()=>R,isEvent:()=>k,isFile:()=>F,isFormData:()=>O,isFunction:()=>p,isKnownUnsafeEditableEvent:()=>A,isKnownUnsafeEditableEventProperty:()=>T,isNativeFunction:()=>f,isNoLike:()=>D,isNull:()=>v,isNullish:()=>b,isNumber:()=>S,isObject:()=>h,isPlainError:()=>w,isPlainObject:()=>j,isPositiveNumber:()=>P,isPrimitive:()=>x,isString:()=>_,isUndefined:()=>y,isYesLike:()=>N,noLikeValues:()=>U,yesLikeValues:()=>L});let n=e.r(699960),a=e.r(160607),s=Array.isArray,l=Object.prototype,u=l.hasOwnProperty,c=l.toString,d=s||function(e){return"[object Array]"===c.call(e)},p=e=>"function"==typeof e,f=e=>p(e)&&-1!==e.toString().indexOf("[native code]"),h=e=>e===Object(e)&&!d(e),g=e=>{if(h(e)){for(let t in e)if(u.call(e,t))return!1;return!0}return!1},y=e=>void 0===e,_=e=>"[object String]"==c.call(e),m=e=>_(e)&&0===e.trim().length,v=e=>null===e,b=e=>y(e)||v(e),S=e=>"[object Number]"==c.call(e)&&e==e,P=e=>S(e)&&e>0,E=e=>"[object Boolean]"===c.call(e),O=e=>e instanceof FormData,F=e=>e instanceof File,w=e=>e instanceof Error,A=e=>(0,a.includes)(n.knownUnsafeEditableEvent,e),T=e=>(0,a.includes)(n.knownUnsafeEditableEventProperty,e);function x(e){return null===e||"object"!=typeof e}function I(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function M(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return C(e,Error)}}function R(e){return I(e,"ErrorEvent")}function k(e){return"u">typeof Event&&C(e,Event)}function j(e){return I(e,"Object")}function C(e,t){try{return e instanceof t}catch{return!1}}let L=[!0,"true",1,"1","yes"],N=e=>(0,a.includes)(L,e),U=[!1,"false",0,"0","no"],D=e=>(0,a.includes)(U,e);for(var B in r.hasOwnProperty=o.hasOwnProperty,r.isArray=o.isArray,r.isBoolean=o.isBoolean,r.isBuiltin=o.isBuiltin,r.isEmptyObject=o.isEmptyObject,r.isEmptyString=o.isEmptyString,r.isError=o.isError,r.isErrorEvent=o.isErrorEvent,r.isEvent=o.isEvent,r.isFile=o.isFile,r.isFormData=o.isFormData,r.isFunction=o.isFunction,r.isKnownUnsafeEditableEvent=o.isKnownUnsafeEditableEvent,r.isKnownUnsafeEditableEventProperty=o.isKnownUnsafeEditableEventProperty,r.isNativeFunction=o.isNativeFunction,r.isNoLike=o.isNoLike,r.isNull=o.isNull,r.isNullish=o.isNullish,r.isNumber=o.isNumber,r.isObject=o.isObject,r.isPlainError=o.isPlainError,r.isPlainObject=o.isPlainObject,r.isPositiveNumber=o.isPositiveNumber,r.isPrimitive=o.isPrimitive,r.isString=o.isString,r.isUndefined=o.isUndefined,r.isYesLike=o.isYesLike,r.noLikeValues=o.noLikeValues,r.yesLikeValues=o.yesLikeValues,o)-1===["hasOwnProperty","isArray","isBoolean","isBuiltin","isEmptyObject","isEmptyString","isError","isErrorEvent","isEvent","isFile","isFormData","isFunction","isKnownUnsafeEditableEvent","isKnownUnsafeEditableEventProperty","isNativeFunction","isNoLike","isNull","isNullish","isNumber","isObject","isPlainError","isPlainObject","isPositiveNumber","isPrimitive","
1isString","isUndefined","isYesLike","noLikeValues","yesLikeValues"].indexOf(B)&&(r[B]=o[B]);Object.defineProperty(r,"__esModule",{value:!0})},538078,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{clampToRange:()=>function e(t,r,i,o,a){if(r>i&&(o.warn("min cannot be greater than max."),r=i),(0,n.isNumber)(t))if(t>i)return o.warn(" cannot be  greater than max: "+i+". Using max value instead."),i;else return t<r?(o.warn(" cannot be less than min: "+r+". Using min value instead."),r):t;return o.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+a),e(a??i,r,i,o)},getRemoteConfigBool:()=>a,getRemoteConfigNumber:()=>s,isValidSampleRate:()=>l});let n=e.r(864066);function a(e,t,r=!0){if(null==e)return r;if("boolean"==typeof e)return e;if("object"==typeof e){let i=e[t];return"boolean"==typeof i?i:r}return r}function s(e,t){if(null==e||"object"!=typeof e)return;let r=e[t];if("number"==typeof r&&Number.isFinite(r))return r;if("string"==typeof r){let e=r.trim();if(""===e)return;let t=Number(e);return Number.isFinite(t)?t:void 0}}function l(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0&&e<=1}for(var u in r.clampToRange=o.clampToRange,r.getRemoteConfigBool=o.getRemoteConfigBool,r.getRemoteConfigNumber=o.getRemoteConfigNumber,r.isValidSampleRate=o.isValidSampleRate,o)-1===["clampToRange","getRemoteConfigBool","getRemoteConfigNumber","isValidSampleRate"].indexOf(u)&&(r[u]=o[u]);Object.defineProperty(r,"__esModule",{value:!0})},35591,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{BucketedRateLimiter:()=>u,DEFAULT_EXCEPTION_RATE_LIMITER_BUCKET_SIZE:()=>s,DEFAULT_EXCEPTION_RATE_LIMITER_REFILL_RATE:()=>a,resolveExceptionRateLimiterConfig:()=>l});let n=e.r(538078),a=1,s=10;function l(e={}){return{refillRate:e.exceptionRateLimiterRefillRate??e.__exceptionRateLimiterRefillRate??a,bucketSize:e.exceptionRateLimiterBucketSize??e.__exceptionRateLimiterBucketSize??s}}class u{constructor(e){this._buckets={},this._onBucketRateLimited=e._onBucketRateLimited,this._bucketSize=(0,n.clampToRange)(e.bucketSize,0,100,e._logger),this._refillRate=(0,n.clampToRange)(e.refillRate,0,this._bucketSize,e._logger),this._refillInterval=(0,n.clampToRange)(e.refillInterval,0,864e5,e._logger)}_applyRefill(e,t){let r=Math.floor((t-e.lastAccess)/this._refillInterval);if(r>0){let t=r*this._refillRate;e.tokens=Math.min(e.tokens+t,this._bucketSize),e.lastAccess=e.lastAccess+r*this._refillInterval}}consumeRateLimit(e){let t=Date.now(),r=String(e),i=this._buckets[r];return i?this._applyRefill(i,t):(i={tokens:this._bucketSize,lastAccess:t},this._buckets[r]=i),0===i.tokens||(i.tokens--,0===i.tokens&&this._onBucketRateLimited?.(e),0===i.tokens)}stop(){this._buckets={}}}for(var c in r.BucketedRateLimiter=o.BucketedRateLimiter,r.DEFAULT_EXCEPTION_RATE_LIMITER_BUCKET_SIZE=o.DEFAULT_EXCEPTION_RATE_LIMITER_BUCKET_SIZE,r.DEFAULT_EXCEPTION_RATE_LIMITER_REFILL_RATE=o.DEFAULT_EXCEPTION_RATE_LIMITER_REFILL_RATE,r.resolveExceptionRateLimiterConfig=o.resolveExceptionRateLimiterConfig,o)-1===["BucketedRateLimiter","DEFAULT_EXCEPTION_RATE_LIMITER_BUCKET_SIZE","DEFAULT_EXCEPTION_RATE_LIMITER_REFILL_RATE","resolveExceptionRateLimiterConfig"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},875607,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n="[Circular]",a="[Truncated]",s="[Unserializable]",l="[Function]",u=Date.prototype.getTime,c=Date.prototype.toISOString,d=Object.prototype.propertyIsEnumerable;function p(e){let t="";for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i>=55296&&i<=56319){let i=e.charCodeAt(r+1);i>=56320&&i<=57343?(t+=e[r]+e[r+1],r++):t+="�"}else t+=i>=56320&&i<=57343?"�":e[r]}return t}function f(e){let t={ancestors:new WeakSet,remainingNodes:1e4},r=(e,i)=>{if(t.remainingNodes<=0)return a;t.remainingNodes--;try{if(null==e||"boolean"==typeof e)return e;if("string"==typeof e)return p(e);if("number"==typeof e)return Number.isFinite(e)?e:null;if("bigint"==typeof e)return e.toString();if("function"==typeof e)return l;if("symbol"==typeof e)return e.description?`Symbol(${e.description})`:"Symbol()";if(i>=20)return a;if(t.ancestors.has(e))return n;t.ancestors.add(e);try{let o;if(e instanceof Date)return Number.isFinite(u.call(e))?c.call(e):null;let n=!1;try{let t=e.toJSON;"function"==typeof t&&(o=t.call(e),n=!0)}catch{n=!1}if(n)return r(o,i+1);if(Array.isArray(e)){let o=Math.min(e.length,1e3),n=[],s=0;for(;s<o&&t.remainingNodes>0;s++)n.push(r(e[s],i+1));return e.length>s&&n.push(a),n}let s={},l=0,p=!1;for(let o in e){if(!d.call(e,o))break;if(l>=1e3||t.remainingNodes<=0){p=!0;break}let n=r(e[o],i+1);Object.defineProperty(s,o,{value:n,enumerable:!0,configurable:!0,writable:!0}),l++}return p&&(s[a]="Additional properties omitted"),s}finally{t.ancestors.delete(e)}}catch{return s}};return r(e,0)}function h(e,t){if(!t)return e;let r=[];try{r=Object.keys(t)}catch{r=[]}for(let i of r){let r;try{r=t[i]}catch{r=s}Object.defineProperty(e,i,{value:r,enumerable:!0,writable:!0,configurable:!0})}return e}for(var g in i.d(o,{assignUserAttributes:()=>h,sanitizeString:()=>p,toJsonSafeValue:()=>f},{CIRCULAR_VALUE:n,FUNCTION_VALUE:l,MAX_JSON_SAFE_VALUE_DEPTH:20,MAX_JSON_SAFE_VALUE_ITEMS:1e3,MAX_JSON_SAFE_VALUE_NODES:1e4,TRUNCATED_VALUE:a,UNSERIALIZABLE_VALUE:s}),r.CIRCULAR_VALUE=o.CIRCULAR_VALUE,r.FUNCTION_VALUE=o.FUNCTION_VALUE,r.MAX_JSON_SAFE_VALUE_DEPTH=o.MAX_JSON_SAFE_VALUE_DEPTH,r.MAX_JSON_SAFE_VALUE_ITEMS=o.MAX_JSON_SAFE_VALUE_ITEMS,r.MAX_JSON_SAFE_VALUE_NODES=o.MAX_JSON_SAFE_VALUE_NODES,r.TRUNCATED_VALUE=o.TRUNCATED_VALUE,r.UNSERIALIZABLE_VALUE=o.UNSERIALIZABLE_VALUE,r.assignUserAttributes=o.assignUserAttributes,r.sanitizeString=o.sanitizeString,r.toJsonSafeValue=o.toJsonSafeValue,o)-1===["CIRCULAR_VALUE","FUNCTION_VALUE","MAX_JSON_SAFE_VALUE_DEPTH","MAX_JSON_SAFE_VALUE_ITEMS","MAX_JSON_SAFE_VALUE_NODES","TRUNCATED_VALUE","UNSERIALIZABLE_VALUE","assignUserAttributes","sanitizeString","toJsonSafeValue"].indexOf(g)&&(r[g]=o[g]);Object.defineProperty(r,"__esModule",{value:!0})},712310,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n=(e,t,r)=>{function i(o,...n){t(()=>{(0,r[o])(e,...n)})}return{debug:(...e)=>{i("debug",...e)},info:(...e)=>{i("log",...e)},warn:(...e)=>{i("warn",...e)},error:(...e)=>{i("error",...e)},critical:(...t)=>{r.error(e,...t)},createLogger:i=>n(`${e} ${i}`,t,r)}},a=e=>e();function s(e,t=a){return n(e,t,function(e=console){return{log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),debug:e.debug.bind(e)}}())}for(var l in i.d(o,{createLogger:()=>s},{_createLogger:n}),r._createLogger=o._createLogger,r.createLogger=o.createLogger,o)-1===["_createLogger","createLogger"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},239797,(e,t,r)=>{"use strict";let i;var o={};o.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n);let a="0123456789abcdef";class s{constructor(e){this.bytes=e}static ofInner(e){if(16===e.length)return new s(e);throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(i)||e<0||t<0||r<0||i<0||e>0xffffffffffff||t>4095||r>0x3fffffff||i>0xffffffff)throw RangeError("invalid field value");let o=new Uint8Array(16);return o[0]=e/0x10000000000,o[1]=e/0x100000000,o[2]=e/0x1000000,o[3]=e/65536,o[4]=e/256,o[5]=e,o[6]=112|t>>>8,o[7]=t,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new s(o)}static parse(e){let t;switch(e.length){case 32:t=/^[0-9a-f]{32}$/i.exec(e)?.[0];break;case 36:t=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e)?.slice(1,6).join("");break;case 38:t=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(e)?.slice(1,6).join("");break;case 45:t=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e)?.slice(1,6).join("")}if(t){let e=new Uint8Array(16);for(let r=0;r<16;r+=4){let i=parseInt(t.substring(2*r,2*r+8),16);e[r+0]=i>>>24,e[r+1]=i>>>16,e[r+2]=i>>>8,e[r+3]=i}return new s(e)}throw SyntaxError("could not parse UUID string")}toString(){let e="";for(let t=0;t<this.bytes.length;t++)e+=a.charAt(this.bytes[t]>>>4),e+=a.charAt(15&this.bytes[t]),(3===t||5===t||7===t||9===t)&&(e+="-");return e}toHex(){let e="";for(let t=0;t<this.bytes.length;t++)e+=a.charAt(this.bytes[t]>>>4),e+=a.charAt(15&this.bytes[t]);return e}toJSON(){return this.toString()}getVariant(){let e=this.bytes[8]>>>4;if(e<0)throw Error("unreachable");if(e<=7)return this.bytes.every(e=>0===e)?"NIL":"VAR_0";if(e<=11)return"VAR_10";if(e<=13)return"VAR_110";if(e<=15)return this.bytes.every(e=>255===e)?"MAX":"VAR_RESERVED";throw Error("unreachable")}getVersion(){return"VAR_10"===this.getVariant()?this.bytes[6]>>>4:void 0}clone(){return new s(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(let t=0;t<16;t++){let r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class l{constructor(e){this.timestamp=0,this.counter=0,this.random=e??u()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(e,t){let r=this.generateOrAbortCore(e,t);return void 0===r&&(this.timestamp=0,r=this.generateOrAbortCore(e,t)),r}generateOrAbortCore(e,t){if(!Number.isInteger(e)||e<1||e>0xffffffffffff)throw RangeError("`unixTsMs` must be a 48-bit positive integer");if(t<0||t>0xffffffffffff)throw RangeError("`rollbackAllowance` out of reasonable range");if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+t>=this.timestamp))return;this.counter++,this.counter>0x3ffffffffff&&(this.timestamp++,this.resetCounter())}return s.fromFieldsV7(this.timestamp,Math.trunc(this.counter/0x40000000),this.counter&0x40000000-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}generateV4(){let e=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return e[6]=64|e[6]>>>4,e[8]=128|e[8]>>>2,s.ofInner(e)}}let u=()=>({nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())>>>0}),c=()=>(i||(i=new l)).generate(),d=()=>(i||(i=new l)).generateV4();for(var p in o.d(n,{UUID:()=>s,V7Generator:()=>l},{uuidv4:()=>d().toString(),uuidv4obj:d,uuidv7:()=>c().toString(),uuidv7obj:c}),r.UUID=n.UUID,r.V7Generator=n.V7Generator,r.uuidv4=n.uuidv4,r.uuidv4obj=n.uuidv4obj,r.uuidv7=n.uuidv7,r.uuidv7obj=n.uuidv7obj,n)-1===["UUID","V7Generator","uuidv4","uuidv4obj","uuidv7","uuidv7obj"].indexOf(p)&&(r[p]=n[p]);Object.defineProperty(r,"__esModule",{value:!0})},139967,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PromiseQueue:()=>a});let n=e.r(239797);class a{add(e){let t=(0,n.uuidv7)(),r=++this.nextId;return this.promiseByIds[t]={id:r,promise:e},e.catch(()=>{}).finally(()=>{delete this.promiseByIds[t]}),e}async join(){let e=Object.values(this.promiseByIds).map(e=>e.promise),t=e.length;for(;t>0;)await Promise.all(e),t=(e=Object.values(this.promiseByIds).map(e=>e.promise)).length}getPromises(e=[],t=this.nextId){let r=new Set(e);return Object.values(this.promiseByIds).filter(e=>e.id<=t&&!r.has(e.promise)).map(e=>e.promise)}get maxId(){return this.nextId}get length(){return Object.keys(this.promiseByIds).length}constructor(){this.promiseByIds={},this.nextId=0}}for(var s in r.PromiseQueue=o.PromiseQueue,o)-1===["PromiseQueue"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},753883,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{detectBrowser:()=>eu,detectBrowserVersion:()=>ed,detectDevice:()=>eh,detectDeviceType:()=>eg,detectOS:()=>ef});let n=e.r(160607),a=e.r(864066),s="Mobile",l="Android",u="Tablet",c=l+" "+u,d="iPad",p="Apple",f=p+" Watch",h="Safari",g="BlackBerry",y="Samsung",_=y+"Browser",m=y+" Internet",v="Chrome",b=v+" OS",S=v+" iOS",P="Internet Explorer",E=P+" "+s,O="Opera",F=O+" Mini",w="Edge",A="Microsoft "+w,T="Firefox",x=T+" iOS",I="Nintendo",M="PlayStation",R="Xbox",k=l+" "+s,j=s+" "+h,C="Windows",L=C+" Phone",N="Nokia",U="Ouya",D="Generic",B=D+" "+s.toLowerCase(),$=D+" "+u.toLowerCase(),H="Konqueror",V="Oculus Browser",z="Vivaldi",G="Yandex",q="Whale",W="DuckDuckGo",K="Pale Moon",Z="Waterfox",J="Brave",X="Claude",Q="Codex",Y="ChatGPT",ee="Google Search App",et="(\\d+(\\.\\d+)?)",er=RegExp("Version/"+et),ei=RegExp("("+X+"|"+Q+"|"+Y+")\\/"+et),eo=RegExp(R,"i"),en=RegExp(M+" \\w+","i"),ea=RegExp(I+" \\w+","i"),es=RegExp(g+"|PlayBook|BB10","i"),el={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000","5.1":"XP","5.2":"XP","6.0":"Vista","6.1":"7","6.2":"8","6.3":"8.1","6.4":"10","10.0":"10"},eu=function(e,t,r,i){var o;t=t||"";let a=r?.brave?J:null;if(a)return a;if(i?.detectGoogleSearchApp&&(0,n.includes)(e,"GSA/"))return ee;if((0,n.includes)(e," OPR/")&&(0,n.includes)(e,"Mini"))return F;if((0,n.includes)(e," OPR/"))return O;if(es.test(e))return g;if((0,n.includes)(e,"IE"+s)||(0,n.includes)(e,"WPDesktop"))return E;if((0,n.includes)(e,"OculusBrowser"))return V;if((0,n.includes)(e,_))return m;if((0,n.includes)(e,w)||(0,n.includes)(e,"Edg/"))return A;if((0,n.includes)(e,z+"/"))return z;if((0,n.includes)(e,"YaBrowser/"))return G;if((0,n.includes)(e,q+"/"))return q;if((0,n.includes)(e,W+"/")||(0,n.includes)(e,"Ddg/"))return W;if((0,n.includes)(e,X+"/"))return X;if((0,n.includes)(e,Q+"/"))return Q;if((0,n.includes)(e,Y+"/"))return Y;if((0,n.includes)(e,"FBIOS"))return"Facebook "+s;if((0,n.includes)(e,"UCWEB")||(0,n.includes)(e,"UCBrowser"))return"UC Browser";if((0,n.includes)(e,"CriOS"))return S;if((0,n.includes)(e,"CrMo")||(0,n.includes)(e,v))return v;if((0,n.includes)(e,l)&&(0,n.includes)(e,h))return k;if((0,n.includes)(e,"FxiOS"))return x;if((0,n.includes)(e.toLowerCase(),H.toLowerCase()))return H;if((0,n.includes)(e,J+"/"))return J;if((o=t)&&(0,n.includes)(o,p)||(0,n.includes)(e,h)&&!(0,n.includes)(e,v)&&!(0,n.includes)(e,l))return(0,n.includes)(e,s)?j:h;if((0,n.includes)(e,"PaleMoon/"))return K;else if((0,n.includes)(e,Z+"/"))return Z;else if((0,n.includes)(e,T))return T;else if((0,n.includes)(e,"MSIE")||(0,n.includes)(e,"Trident/"))return P;else if((0,n.includes)(e,"Gecko"))return T;return""},ec={[E]:[RegExp("rv:"+et)],[A]:[RegExp(w+"?\\/"+et)],[v]:[RegExp("("+v+"|CrMo)\\/"+et)],[S]:[RegExp("CriOS\\/"+et)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+et)],[h]:[er],[j]:[er],[O]:[RegExp("("+O+"|OPR)\\/"+et)],[T]:[RegExp(T+"\\/"+et)],[x]:[RegExp("FxiOS\\/"+et)],[H]:[RegExp("Konqueror[:/]?"+et,"i")],[g]:[RegExp(g+" "+et),er],[k]:[RegExp("android\\s"+et,"i")],[m]:[RegExp(_+"\\/"+et)],[V]:[RegExp("OculusBrowser\\/"+et)],[z]:[RegExp(z+"\\/"+et)],[G]:[RegExp("YaBrowser\\/"+et)],[q]:[RegExp(q+"\\/"+et)],[J]:[RegExp(J+"\\/"+et)],[X]:[ei],[Q]:[ei],[Y]:[ei],[W]:[RegExp("(DuckDuckGo|Ddg)\\/"+et)],[K]:[RegExp("PaleMoon\\/"+et)],[Z]:[RegExp(Z+"\\/"+et)],[ee]:[RegExp("GSA\\/"+et)],[P]:[RegExp("(rv:|MSIE )"+et)],Mozilla:[RegExp("rv:"+et)]}
1,ed=function(e,t,r,i){let o=ec[eu(e,t,r,i)];if((0,a.isUndefined)(o))return null;for(let t=0;t<o.length;t++){let r=o[t],i=e.match(r);if(i)return parseFloat(i[i.length-2])}return null},ep=[[RegExp(R+"; "+R+" (.*?)[);]","i"),e=>[R,e&&e[1]||""]],[RegExp(I,"i"),[I,""]],[RegExp(M,"i"),[M,""]],[es,[g,""]],[RegExp(C,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[L,""];if(new RegExp(s).test(t)&&!/IEMobile\b/.test(t))return[C+" "+s,""];let r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){let e=el[r[1]]||"";return/arm/i.test(t)&&(e="RT"),[C,e]}return[C,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t="";return e&&e.length>=3&&(t=(0,a.isUndefined)(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+l+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+l+")","i"),e=>e&&e[2]?[l,[e[2],e[3],e[4]||"0"].join(".")]:[l,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{let t=["Mac OS X",""];if(e&&e[1]){let r=[e[1],e[2],e[3]||"0"];t[1]=r.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[b,""]],[/Linux|debian/i,["Linux",""]]],ef=function(e){for(let t=0;t<ep.length;t++){let[r,i]=ep[t],o=r.exec(e),n=o&&((0,a.isFunction)(i)?i(o,e):i);if(n)return n}return["",""]},eh=function(e){if(ea.test(e))return I;if(en.test(e))return M;if(eo.test(e))return R;if(RegExp(U,"i").test(e))return U;if(RegExp("("+L+"|WPDesktop)","i").test(e))return L;if(/iPad/.test(e))return d;if(/iPod/.test(e))return"iPod Touch";if(/iPhone/.test(e))return"iPhone";if(/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e))return f;else if(es.test(e))return g;else if(/(kobo)\s(ereader|touch)/i.test(e))return"Kobo";else if(RegExp(N,"i").test(e))return N;else if(/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e))return"Kindle Fire";else if(/(Android|ZTE)/i.test(e))if(!(!new RegExp(s).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)))return l;else return/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?l:c;else if(RegExp("(pda|"+s+")","i").test(e))return B;else if(RegExp(u,"i").test(e)&&!RegExp(u+" pc","i").test(e))return $;else return""},eg=function(e,t){let r=eh(e);return r===d||r===c||"Kobo"===r||"Kindle Fire"===r||r===$?u:r===I||r===R||r===M||r===U?"Console":r===f?"Wearable":r?s:t?.userAgentDataPlatform==="Android"&&(t?.maxTouchPoints??0)>0?Math.min(t?.screenWidth??0,t?.screenHeight??0)/(t?.devicePixelRatio??1)>=600?u:s:"Desktop"};for(var ey in r.detectBrowser=o.detectBrowser,r.detectBrowserVersion=o.detectBrowserVersion,r.detectDevice=o.detectDevice,r.detectDeviceType=o.detectDeviceType,r.detectOS=o.detectOS,o)-1===["detectBrowser","detectBrowserVersion","detectDevice","detectDeviceType","detectOS"].indexOf(ey)&&(r[ey]=o[ey]);Object.defineProperty(r,"__esModule",{value:!0})},672014,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n=/\bFBAV\/(\d+(?:\.\d+)*)/i,a=[[/\bInstagram(?:[ /](\d+(?:\.\d+)*))?\b/i,"Instagram"],[/\bBarcelona[ /](\d+(?:\.\d+)*)?/i,"Threads"],[/\b(?:MessengerForiOS|(?:FBAN|FB_IAB)\/Orca-Android)\b/i,"Messenger",n],[/\bFBAN\/EMA\b/i,"Facebook Lite",n],[/\b(?:FBIOS|(?:FBAN|FB_IAB)\/(?:FB4A|FBIOS))\b/i,"Facebook",n],[/\bLinkedInApp(?:\]?\/(\d+(?:\.\d+)*))?\b/i,"LinkedIn"],[/\bTwitter(?:Android| for (?:iPhone|iPad|Android))(?:\/(\d+(?:\.\d+)*))?\b/i,"Twitter"],[/\b(?:musical_ly|trill)(?:[_/](\d+\.\d+(?:\.\d+)*))?(?=\b|_)/i,"TikTok",/\bapp_version\/(\d+(?:\.\d+)*)/i],[/\b(?:MicroMessenger|WeChat)\/(\d+(?:\.\d+)*)?/i,"WeChat"],[/\bLine\/(\d+(?:\.\d+)*)?/i,"Line"],[/\bGSA\/(\d+(?:\.\d+)*)?/i,"Google"],[/\[Pinterest\/(?:iOS|Android)\b|\bPinterest(?: for (?:Android(?: Tablet)?|iOS))?\/(\d+(?:\.\d+)*)/i,"Pinterest"],[/\b(?:WA4A|WAiOS)\/(\d+(?:\.\d+)*)?/i,"WhatsApp"],[/\bSnapchat[ /](\d+(?:\.\d+)*)?/i,"Snapchat"],[/\bBing(?:Web|Sapphire)\/(\d+(?:\.\d+)*)?/i,"Bing"],[/\bNAVER\(inapp; search;/i,"Naver",/\bNAVER\(inapp; search;[^;)]*; (\d+(?:\.\d+)*)/i],[/\bKAKAOTALK[ /](\d+\.\d+(?:\.\d+)*)?/i,"KakaoTalk"]];function s(e){for(let t=0;t<a.length;t++){let[r,i,o]=a[t],n=e.match(r);
1if(n){let t=o&&e.match(o)||n;return[i,t?.[1]||""]}}return["",""]}for(var l in i.d(o,{detectWebviewApp:()=>s}),r.detectWebviewApp=o.detectWebviewApp,o)-1===["detectWebviewApp"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},856658,(e,t,r)=>{"use strict";var i={"./bot-detection"(t){t.exports=e.r(318770)},"./browser-utils"(t){t.exports=e.r(515318)},"./bucketed-rate-limiter"(t){t.exports=e.r(35591)},"./json-utils"(t){t.exports=e.r(875607)},"./logger"(t){t.exports=e.r(712310)},"./number-utils"(t){t.exports=e.r(538078)},"./promise-queue"(t){t.exports=e.r(139967)},"./string-utils"(t){t.exports=e.r(160607)},"./type-utils"(t){t.exports=e.r(864066)},"./user-agent-utils"(t){t.exports=e.r(753883)},"./webview-app-utils"(t){t.exports=e.r(672014)}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};for(var s in(()=>{n.r(a);var e=n("./type-utils"),t=n("./bot-detection"),r={};for(let e in t)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>t[e]);n.d(a,r);var i=n("./browser-utils"),r={};for(let e in i)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>i[e]);n.d(a,r);var o=n("./bucketed-rate-limiter"),r={};for(let e in o)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>o[e]);n.d(a,r);var s=n("./json-utils"),l=n("./number-utils"),r={};for(let e in l)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>l[e]);n.d(a,r);var u=n("./string-utils"),r={};for(let e in u)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>u[e]);n.d(a,r);var r={};for(let t in e)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(t)&&(r[t]=()=>e[t]);n.d(a,r);var c=n("./promise-queue"),r={};for(let e in c)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>c[e]);n.d(a,r);var d=n("./logger"),r={};for(let e in d)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>d[e]);n.d(a,r);var p=n("./user-agent-utils"),r={};for(let e in p)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>p[e]);n.d(a,r);var f=n("./webview-app-utils"),r={};for(let e in f)0>["UUID_REGEX","trySafe","currentTimestamp","getEventUuid","createNamedError","currentISOTime","assert","isValidUUID","removeTrailingSlash","default","allSettled","STRING_FORMAT","stripUrlHash","safeSetTimeout","raceWithTimeout","retriable","isPromise","getFetch","isUrl","toJsonSafeValue"].indexOf(e)&&(r[e]=()=>f[e]);n.d(a,r);let h=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function g(e){return"string"==typeof e&&h.test(e)}function y(e,t){return g(e)?e:t()}function _(e,t){let r=Error(t);try{Object.defineProperty(r,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch{}return r}function m(e,t){if(!e||"string"!=typeof e||0===e.trim().length)throw Error(t)}function v(t){return(0,e.isString)(t)&&/^(https?:\/\/|\/|\.\.?\/)/i.test(t.trim())}function b(e){return e?.replace(/\/+$/,"")}function S(e){return e?e.split("#")[0]:e}async function P(e,t){let r=null;for(let i=0;i<t.retryCount+1;i++){i>0&&await new Promise(e=>setTimeout(e,t.retryDelay));try{return await e()}catch(e){if(r=e,!t.retryCheck(e))throw e}}throw r}function E(){return new Date().getTime()}function O(){return new Date().toISOString()}function F(e){try{return e()}catch{return}}function w(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}async function A(e,t,r){let i;try{return await Promise.race([e,new Promise((e,o)=>{i=w(()=>{try{r?.(),e()}catch(e){o(e)}},t)})])}finally{clearTimeout(i)}}function T(){return"u">typeof fetch?fetch:void 0!==globalThis.fetch?globalThis.fetch:void 0}function x(e){return Promise.all(e.map(e=>(e??Promise.resolve()).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))}n.d(a,{allSettled:()=>x,assert:()=>m,createNamedError:()=>_,currentISOTime:()=>O,currentTimestamp:()=>E,getEventUuid:()=>y,getFetch:()=>T,isUrl:()=>v,isValidUUID:()=>g,raceWithTimeout:()=>A,removeTrailingSlash:()=>b,retriable:()=>P,safeSetTimeout:()=>w,stripUrlHash:()=>S,toJsonSafeValue:()=>s.toJsonSafeValue,trySafe:()=>F},{STRING_FORMAT:"utf8",UUID_REGEX:h,isPromise:e=>e&&"function"==typeof e.then})})(),r.STRING_FORMAT=a.STRING_FORMAT,r.UUID_REGEX=a.UUID_REGEX,r.allSettled=a.allSettled,r.assert=a.assert,r.createNamedError=a.createNamedError,r.currentISOTime=a.currentISOTime,r.currentTimestamp=a.currentTimestamp,r.getEventUuid=a.getEventUuid,r.getFetch=a.getFetch,r.isPromise=a.isPromise,r.isUrl=a.isUrl,r.isValidUUID=a.isValidUUID,r.raceWithTimeout=a.raceWithTimeout,r.removeTrailingSlash=a.removeTrailingSlash,r.retriable=a.retriable,r.safeSetTimeout=a.safeSetTimeout,r.stripUrlHash=a.stripUrlHash,r.toJsonSafeValue=a.toJsonSafeValue,r.trySafe=a.trySafe,a)-1===["STRING_FORMAT","UUID_REGEX","allSettled","assert","createNamedError","currentISOTime","currentTimestamp","getEventUuid","getFetch","isPromise","isUrl","isValidUUID","raceWithTimeout","removeTrailingSlash","retriable","safeSetTimeout","stripUrlHash","toJsonSafeValue","trySafe"].indexOf(s)&&(r[s]=a[s]);
1Object.defineProperty(r,"__esModule",{value:!0})},588047,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{cookieStateToProperties:()=>d,cookieStoreFromHeader:()=>s,getConsentCookieName:()=>f,getPostHogCookieName:()=>l,isOptedOut:()=>h,parsePostHogCookie:()=>p,readPostHogCookie:()=>c,serializePostHogCookie:()=>u});let n=e.r(856658),a=e.r(239797);function s(e){let t={};if(e)for(let r of e.split(";")){let[e,...i]=r.trim().split("=");if(e){let r=i.join("=").trim();try{t[e.trim()]=decodeURIComponent(r)}catch{t[e.trim()]=r}}}return{get:e=>e in t?{value:t[e]}:void 0}}function l(e){let t=e.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ");return`ph_${t}_posthog`}function u(e){let t=Date.now();return JSON.stringify({distinct_id:e,$device_id:e,$user_state:"anonymous",$sesid:[t,(0,a.uuidv7)(),t]})}function c(e,t){let r=l(t),i=e.get(r);return i?p(i.value):null}function d(e){if(!e)return;let t={};return e.sessionId&&(t.$session_id=e.sessionId),e.deviceId&&(t.$device_id=e.deviceId),Object.keys(t).length>0?t:void 0}function p(e){if(!e)return null;try{let t=JSON.parse(e);if(!t||"object"!=typeof t||!t.distinct_id)return null;let r=(0,n.isArray)(t.$sesid)?t.$sesid[1]:void 0;return{distinctId:String(t.distinct_id),isIdentified:"identified"===t.$user_state,sessionId:"string"==typeof r?r:void 0,deviceId:"string"==typeof t.$device_id?t.$device_id:void 0}}catch{return null}}function f(e,t){return t?.consent_persistence_name?t.consent_persistence_name:t?.opt_out_capturing_cookie_prefix?t.opt_out_capturing_cookie_prefix+e:"__ph_opt_in_out_"+e}function h(e,t,r){let i=f(t,r),o=e.get(i);return o?(0,n.isNoLike)(o.value):r?.opt_out_capturing_by_default??!1}for(var g in r.cookieStateToProperties=o.cookieStateToProperties,r.cookieStoreFromHeader=o.cookieStoreFromHeader,r.getConsentCookieName=o.getConsentCookieName,r.getPostHogCookieName=o.getPostHogCookieName,r.isOptedOut=o.isOptedOut,r.parsePostHogCookie=o.parsePostHogCookie,r.readPostHogCookie=o.readPostHogCookie,r.serializePostHogCookie=o.serializePostHogCookie,o)-1===["cookieStateToProperties","cookieStoreFromHeader","getConsentCookieName","getPostHogCookieName","isOptedOut","parsePostHogCookie","readPostHogCookie","serializePostHogCookie"].indexOf(g)&&(r[g]=o[g]);Object.defineProperty(r,"__esModule",{value:!0})},293915,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{DOMExceptionCoercer:()=>a});let n=e.r(856658);class a{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){let r=(0,n.isString)(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){let t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?`${t}: ${e.message}`:t}isDOMException(e){return(0,n.isBuiltin)(e,"DOMException")}isDOMError(e){return(0,n.isBuiltin)(e,"DOMError")}}for(var s in r.DOMExceptionCoercer=o.DOMExceptionCoercer,o)-1===["DOMExceptionCoercer"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},390969,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{ErrorCoercer:()=>a});let n=e.r(864066);class a{match(e){return(0,n.isError)(e)}coerce(e,t){let r=this.getStack(e);return{type:this.getType(e),value:this.getMessage(e,t),stack:r??t.syntheticException?.stack,cause:e.cause?t.next(e.cause):void 0,synthetic:void 0===r}}getType(e){return e.name||e.constructor.name}getMessage(e,t){let r=e.message;return r.error&&"string"==typeof r.error.message?String(r.error.message):String(r)}getStack(e){return e.stacktrace||e.stack||void 0}}for(var s in r.ErrorCoercer=o.ErrorCoercer,o)-1===["ErrorCoercer"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},900360,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{ErrorEventCoercer:()=>a});let n=e.r(856658);class a{match(e){return!!(0,n.isErrorEvent)(e)&&(void 0!=e.error||this._hasUsableMessage(e))}coerce(e,t){if(void 0!=e.error)return t.apply(e.error);let r=t.apply(e.message);return{...r,stack:this._buildLocationStack(e)??r.stack,synthetic:!0}}_hasUsableMessage(e){return(0,n.isString)(e.message)&&e.message.length>0}_buildLocationStack(e){let t=e.lineno??0,r=e.colno??0;if((0,n.isString)(e.filename)&&0!==e.filename.length&&0!==t)return`Error
2    at ${e.filename}:${t}:${r}`}}for(var s in r.ErrorEventCoercer=o.ErrorEventCoercer,o)-1===["ErrorEventCoercer"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},558877,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function a(e,t=40){let r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(let e=r.length;e>0;e--){let i=r.slice(0,e).join(", ");if(!(i.length>t)){if(e===r.length)return i;return i.length<=t?i:`${i.slice(0,t)}...`}}return""}for(var s in i.r(o),i.d(o,{extractExceptionKeysForMessage:()=>a,truncate:()=>n}),r.extractExceptionKeysForMessage=o.extractExceptionKeysForMessage,r.truncate=o.truncate,o)-1===["extractExceptionKeysForMessage","truncate"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},758839,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{EventCoercer:()=>s});let n=e.r(856658),a=e.r(558877);class s{match(e){return(0,n.isEvent)(e)}coerce(e,t){let r=e.constructor.name;return{type:r,value:`${r} captured as exception with keys: ${(0,a.extractExceptionKeysForMessage)(e)}`,stack:t.syntheticException?.stack,synthetic:!0}}}for(var l in r.EventCoercer=o.EventCoercer,o)-1===["EventCoercer"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},409173,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};for(var n in i.r(o),i.d(o,{},{severityLevels:["fatal","error","warning","log","info","debug"]}),r.severityLevels=o.severityLevels,o)-1===["severityLevels"].indexOf(n)&&(r[n]=o[n]);
2Object.defineProperty(r,"__esModule",{value:!0})},442216,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{ObjectCoercer:()=>l});let n=e.r(856658),a=e.r(409173),s=e.r(558877);class l{match(e){return"object"==typeof e&&null!==e}coerce(e,t){let r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:this.getStack(e)??t.syntheticException?.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if((0,n.isEvent)(e))return e.constructor.name;let t="name"in e?e.name:void 0;return(0,n.isString)(t)&&!(0,n.isEmptyString)(t)?t:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){let t=`'${e.name}' captured as exception`;return"message"in e&&"string"==typeof e.message&&(t+=` with message: '${e.message}'`),t}if("message"in e&&"string"==typeof e.message)return e.message;let t=this.getObjectClassName(e),r=(0,s.extractExceptionKeysForMessage)(e);return`${t&&"Object"!==t?`'${t}'`:"Object"} captured as exception with keys: ${r}`}isSeverityLevel(e){return(0,n.isString)(e)&&!(0,n.isEmptyString)(e)&&a.severityLevels.indexOf(e)>=0}getStack(e){try{if((0,n.isString)(e.stacktrace)&&e.stacktrace.length>0)return e.stacktrace;return(0,n.isString)(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if((0,n.isError)(r))return r}}getObjectClassName(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}for(var u in r.ObjectCoercer=o.ObjectCoercer,o)-1===["ObjectCoercer"].indexOf(u)&&(r[u]=o[u]);Object.defineProperty(r,"__esModule",{value:!0})},465663,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PrimitiveCoercer:()=>a});let n=e.r(856658);class a{match(e){return(0,n.isPrimitive)(e)}coerce(e,t){return{type:"Error",value:`Primitive value captured as exception: ${String(e)}`,stack:t.syntheticException?.stack,synthetic:!0}}}for(var s in r.PrimitiveCoercer=o.PrimitiveCoercer,o)-1===["PrimitiveCoercer"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},840668,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PromiseRejectionEventCoercer:()=>a});let n=e.r(856658);class a{match(e){return(0,n.isBuiltin)(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!(0,n.isEvent)(e))return!1;try{let t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch{return!1}}coerce(e,t){let r=this.getUnhandledRejectionReason(e);return(0,n.isPrimitive)(r)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(r)}`,stack:t.syntheticException?.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch{}return e}}for(var s in r.PromiseRejectionEventCoercer=o.PromiseRejectionEventCoercer,o)-1===["PromiseRejectionEventCoercer"].indexOf(s)&&(r[s]=o[s]);
2Object.defineProperty(r,"__esModule",{value:!0})},514735,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class a{match(e){return"string"==typeof e}coerce(e,t){let[r,i]=this.getInfos(e);return{type:r??"Error",value:i??e,stack:t.syntheticException?.stack,synthetic:!0}}getInfos(e){let t="Error",r=e,i=e.match(n);return i&&(t=i[1],r=i[2]),[t,r]}}for(var s in i.d(o,{StringCoercer:()=>a}),r.StringCoercer=o.StringCoercer,o)-1===["StringCoercer"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},291385,(e,t,r)=>{"use strict";var i={"./dom-exception-coercer"(t){t.exports=e.r(293915)},"./error-coercer"(t){t.exports=e.r(390969)},"./error-event-coercer"(t){t.exports=e.r(900360)},"./event-coercer"(t){t.exports=e.r(758839)},"./object-coercer"(t){t.exports=e.r(442216)},"./primitive-coercer"(t){t.exports=e.r(465663)},"./promise-rejection-event"(t){t.exports=e.r(840668)},"./string-coercer"(t){t.exports=e.r(514735)}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};for(var s in(()=>{n.r(a);var e=n("./dom-exception-coercer"),t={};for(let r in e)"default"!==r&&(t[r]=()=>e[r]);n.d(a,t);var r=n("./error-coercer"),t={};for(let e in r)"default"!==e&&(t[e]=()=>r[e]);n.d(a,t);var i=n("./error-event-coercer"),t={};for(let e in i)"default"!==e&&(t[e]=()=>i[e]);n.d(a,t);var o=n("./string-coercer"),t={};for(let e in o)"default"!==e&&(t[e]=()=>o[e]);n.d(a,t);var s=n("./object-coercer"),t={};for(let e in s)"default"!==e&&(t[e]=()=>s[e]);n.d(a,t);var l=n("./event-coercer"),t={};for(let e in l)"default"!==e&&(t[e]=()=>l[e]);n.d(a,t);var u=n("./primitive-coercer"),t={};for(let e in u)"default"!==e&&(t[e]=()=>u[e]);n.d(a,t);var c=n("./promise-rejection-event"),t={};for(let e in c)"default"!==e&&(t[e]=()=>c[e]);n.d(a,t)})(),a)r[s]=a[s];Object.defineProperty(r,"__esModule",{value:!0})},538220,(e,t,r)=>{"use strict";let i,o,n;var a={};a.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};function l(e){let t=globalThis._posthogChunkIds;if(!t)return;let r=Object.keys(t);return n&&r.length===o?n:(o=r.length,n=r.reduce((r,o)=>{i||(i={});let n=i[o];if(n)r[n[0]]=n[1];
2else{let n=e(o);for(let e=n.length-1;e>=0;e--){let a=n[e],s=a?.filename,l=t[o];if(s&&l){r[s]=l,i[o]=[s,l];break}}}return r},{}))}for(var u in a.r(s),a.d(s,{getFilenameToChunkIdMap:()=>l}),r.getFilenameToChunkIdMap=s.getFilenameToChunkIdMap,s)-1===["getFilenameToChunkIdMap"].indexOf(u)&&(r[u]=s[u]);Object.defineProperty(r,"__esModule",{value:!0})},199303,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{ErrorPropertiesBuilder:()=>s});let n=e.r(856658),a=e.r(538220);class s{constructor(e,t,r=[]){this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t={}){let r=t&&t.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,t,0).apply(e),o=this.buildParsingContext(t),n=this.parseStacktrace(i,o);return{$exception_list:this.convertToExceptionList(n,r),$exception_level:"error"}}async modifyFrames(e){for(let t of e)t.stacktrace&&t.stacktrace.frames&&(0,n.isArray)(t.stacktrace.frames)&&(t.stacktrace.frames=await this.applyModifiers(t.stacktrace.frames));return e}coerceFallback(e){return{type:"Error",value:"Unknown error",stack:e.syntheticException?.stack,synthetic:!0}}parseStacktrace(e,t){let r,i;return null!=e.cause&&(r=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),{...e,cause:r,stack:i}}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(let r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}async applyModifiers(e){let t=e;for(let e of this.modifiers)t=await e(t);return t}convertToExceptionList(e,t){let r={type:e.type,value:e.value,mechanism:{type:t.type??"generic",handled:t.handled??!0,synthetic:e.synthetic??!1}};e.stack&&(r.stacktrace={type:"raw",frames:e.stack});let i=[r];return null!=e.cause&&i.push(...this.convertToExceptionList(e.cause,{...t,handled:!0})),i}buildParsingContext(e){return{chunkIdMap:(0,a.getFilenameToChunkIdMap)(this.stackParser),skipFirstLines:e.skipFirstLines??1}}buildCoercingContext(e,t,r=0){let i=(r,i)=>{if(i<=4){let o=this.buildCoercingContext(e,t,i);return this.applyCoercers(r,o)}};return{...t,syntheticException:0==r?t.syntheticException:void 0,mechanism:e,apply:e=>i(e,r),next:e=>i(e,r+1)}}}for(var l in r.ErrorPropertiesBuilder=o.ErrorPropertiesBuilder,o)-1===["ErrorPropertiesBuilder"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},578988,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{DEFAULT_EXCEPTION_STEPS_CONFIG:()=>l,EXCEPTION_STEP_INTERNAL_FIELDS:()=>a,ExceptionStepsBuffer:()=>d,getUtf8ByteLength:()=>p,resolveExceptionStepsConfig:()=>u,stripReservedExceptionStepFields:()=>c});let n=e.r(856658),a={MESSAGE:"$message",TIMESTAMP:"$timestamp"},s=new Set([a.MESSAGE,a.TIMESTAMP]),l={enabled:!0,max_bytes:32768};function u(e){return e?{enabled:e.enabled??l.enabled,max_bytes:function(e,t){if(!(0,n.isNumber)(e)||1/0===e||-1/0===e)return t;let r=Math.floor(e);return r<0?t:r}(e.max_bytes,l.max_bytes)}:{...l}}function c(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((r,i)=>(s.has(i)?t.push(i):r[i]=e[i],r),{}),droppedKeys:t}}class d{constructor(e){this._entries=[],this._totalBytes=0,this._config=u(e)}setConfig(e){this._config=u(e),this._trimToMaxBytes()}add(e){let t=function(e){let t;try{t=(0,n.safeJsonStringify)(e)}catch{return}try{let e=JSON.parse(t);if(!(0,n.isObject)(e))return;let r=e[a.MESSAGE],i=e[a.TIMESTAMP];if(!(0,n.isString)(r)||0===r.trim().length||!(0,n.isString)(i)&&!(0,n.isNumber)(i))return;return{step:e,json:t}}catch{return}}(e);if(!t)return;let r=p(t.json);r>this._config.max_bytes||(this._entries.push({step:t.step,bytes:r}),this._totalBytes+=r,this._trimToMaxBytes())}getAttachable(){return this._entries.map(e=>e.step)}clear(){this._entries=[],this._totalBytes=0}size(){return this._entries.length}_trimToMaxBytes(){for(;this._totalBytes>this._config.max_bytes&&this._entries.length>0;){let e=this._entries.shift();e&&(this._totalBytes-=e.bytes)}}}function p(e){if("u">typeof TextEncoder)return new TextEncoder().encode(e).length;let t=encodeURIComponent(e),r=0;for(let e=0;e<t.length;e++)"%"===t[e]?(r+=1,e+=2):r+=1;return r}for(var f in r.DEFAULT_EXCEPTION_STEPS_CONFIG=o.DEFAULT_EXCEPTION_STEPS_CONFIG,r.EXCEPTION_STEP_INTERNAL_FIELDS=o.EXCEPTION_STEP_INTERNAL_FIELDS,r.ExceptionStepsBuffer=o.ExceptionStepsBuffer,r.getUtf8ByteLength=o.getUtf8ByteLength,r.resolveExceptionStepsConfig=o.resolveExceptionStepsConfig,r.stripReservedExceptionStepFields=o.stripReservedExceptionStepFields,o)-1===["DEFAULT_EXCEPTION_STEPS_CONFIG","EXCEPTION_STEP_INTERNAL_FIELDS","ExceptionStepsBuffer","getUtf8ByteLength","resolveExceptionStepsConfig","stripReservedExceptionStepFields"].indexOf(f)&&(r[f]=o[f]);
2Object.defineProperty(r,"__esModule",{value:!0})},546731,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{UNKNOWN_FUNCTION:()=>a,createFrame:()=>u});let n=e.r(856658),a="?",s=/^([a-z][a-z0-9.+-]+):/i,l=["http","https","file","blob","app","capacitor","ionic","webpack","webpack-internal","ng"];function u(e,t,r,i,o){let u={platform:e,filename:t,function:"<anonymous>"===r?a:r,in_app:function(e){if(!e||"<anonymous>"===e)return!1;let t=s.exec(e);return!t||l.includes(t[1].toLowerCase())}(t)};return(0,n.isUndefined)(i)||(u.lineno=i),(0,n.isUndefined)(o)||(u.colno=o),u}for(var c in r.UNKNOWN_FUNCTION=o.UNKNOWN_FUNCTION,r.createFrame=o.createFrame,o)-1===["UNKNOWN_FUNCTION","createFrame"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},784150,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{extractSafariExtensionDetails:()=>a});let n=e.r(546731),a=(e,t)=>{let r=-1!==e.indexOf("safari-extension"),i=-1!==e.indexOf("safari-web-extension");return r||i?[-1!==e.indexOf("@")?e.split("@")[0]:n.UNKNOWN_FUNCTION,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};for(var s in r.extractSafariExtensionDetails=o.extractSafariExtensionDetails,o)-1===["extractSafariExtensionDetails"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},252887,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{chromeStackLineParser:()=>c});let n=e.r(546731),a=e.r(784150),s=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,l=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,c=(e,t)=>{let r=s.exec(e);if(r){let[,e,i,o]=r;return(0,n.createFrame)(t,e,n.UNKNOWN_FUNCTION,+i,+o)}let i=l.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){let e=u.exec(i[2]);e&&(i[2]=e[1],i[3]=e[2],i[4]=e[3])}let[e,r]=(0,a.extractSafariExtensionDetails)(i[1]||n.UNKNOWN_FUNCTION,i[2]);return(0,n.createFrame)(t,r,e,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}};for(var d in r.chromeStackLineParser=o.chromeStackLineParser,o)-1===["chromeStackLineParser"].indexOf(d)&&(r[d]=o[d]);Object.defineProperty(r,"__esModule",{value:!0})},50017,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{geckoStackLineParser:()=>u});let n=e.r(546731),a=e.r(784150),s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,l=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=(e,t)=>
2{let r=s.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){let e=l.exec(r[3]);e&&(r[1]=r[1]||"eval",r[3]=e[1],r[4]=e[2],r[5]="")}let e=r[3],i=r[1]||n.UNKNOWN_FUNCTION;return[i,e]=(0,a.extractSafariExtensionDetails)(i,e),(0,n.createFrame)(t,e,i,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}};for(var c in r.geckoStackLineParser=o.geckoStackLineParser,o)-1===["geckoStackLineParser"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},520869,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{winjsStackLineParser:()=>s});let n=e.r(546731),a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=(e,t)=>{let r=a.exec(e);return r?(0,n.createFrame)(t,r[2],r[1]||n.UNKNOWN_FUNCTION,+r[3],r[4]?+r[4]:void 0):void 0};for(var l in r.winjsStackLineParser=o.winjsStackLineParser,o)-1===["winjsStackLineParser"].indexOf(l)&&(r[l]=o[l]);Object.defineProperty(r,"__esModule",{value:!0})},738949,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{opera10StackLineParser:()=>s,opera11StackLineParser:()=>u});let n=e.r(546731),a=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,s=(e,t)=>{let r=a.exec(e);return r?(0,n.createFrame)(t,r[2],r[3]||n.UNKNOWN_FUNCTION,+r[1]):void 0},l=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,u=(e,t)=>{let r=l.exec(e);return r?(0,n.createFrame)(t,r[5],r[3]||r[4]||n.UNKNOWN_FUNCTION,+r[1],+r[2]):void 0};for(var c in r.opera10StackLineParser=o.opera10StackLineParser,r.opera11StackLineParser=o.opera11StackLineParser,o)-1===["opera10StackLineParser","opera11StackLineParser"].indexOf(c)&&(r[c]=o[c]);Object.defineProperty(r,"__esModule",{value:!0})},173231,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{nodeStackLineParser:()=>c});let n=e.r(546731),a=/^\s*[-]{4,}$/,s=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,l=/^Promise\.(?:all|any)$/,u=/^index \d+$/,c=(e,t)=>{let r=e.match(s);if(r){let e,i,o,a,s;if(r[1]){let t=(o=r[1]).lastIndexOf(".");if("."===o[t-1]&&t--,t>0){e=o.slice(0,t),i=o.slice(t+1);let r=e.indexOf(".Module");r>0&&(o=o.slice(r+1),e=e.slice(0,r))}a=void 0}i&&(a=e,s=i),"<anonymous>"===i&&(s=void 0,o=void 0),void 0===o&&(s=s||n.UNKNOWN_FUNCTION,o=a?`${a}.${s}`:s);let c=r[2]?.startsWith("file://")?r[2].slice(7):r[2],p="native"===r[5];return c?.match(/\/[A-Z]:/)&&(c=c.slice(1)),c||!r[5]||p||(c=r[5]),l.test(o)&&u.test(c||"")&&(c="node:internal/promise"),{filename:c?decodeURI(c):void 0,module:void 0,function:o,lineno:d(r[3]),colno:d(r[4]),in_app:function(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==e&&!e.includes("node_modules/")}(c||"",p),platform:t}}if(e.match(a))return{filename:e,platform:t}};function d(e){return parseInt(e||"",10)||void 0}for(var p in r.nodeStackLineParser=o.nodeStackLineParser,o)-1===["nodeStackLineParser"].indexOf(p)&&(r[p]=o[p]);Object.defineProperty(r,"__esModule",{value:!0})},205105,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
2),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{chromeStackLineParser:()=>a.chromeStackLineParser,createDefaultStackParser:()=>y,createStackParser:()=>_,geckoStackLineParser:()=>s.geckoStackLineParser,nodeStackLineParser:()=>c.nodeStackLineParser,opera10StackLineParser:()=>u.opera10StackLineParser,opera11StackLineParser:()=>u.opera11StackLineParser,reverseAndStripFrames:()=>g,winjsStackLineParser:()=>l.winjsStackLineParser});let n=e.r(546731),a=e.r(252887),s=e.r(50017),l=e.r(520869),u=e.r(738949),c=e.r(173231),d=/\(error: (.*)\)/;function p(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function f(e,t){let r=t.start;for(;r>0&&p(e[r-1],e[r-1+t.length]);)r--;return t.start-r}function h(e,t){let r=t.start+t.length,i=r;for(;i<e.length&&p(e[i],e[i-t.length]);)i++;return i-r}function g(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,50).map(e=>{var r;return{...e,filename:e.filename||((r=t)[r.length-1]||{}).filename,function:e.function||n.UNKNOWN_FUNCTION}})}function y(){return _("web:javascript",a.chromeStackLineParser,s.geckoStackLineParser)}function _(e,...t){return(r,i=0)=>{let o=[],n=r.split("\n"),a=Math.min(n.length,i+1e3),s=[];for(let r=i;r<a;r++){let i=n[r];if(i.length>1024)continue;let a=d.test(i)?i.replace(d,"$1"):i;if(!a.match(/\S*Error: /)){for(let r of t){let t=r(a,e);if(t){o.push(t);let e=function(e){for(let t=1;t<=10;t++){let r=e.length-2*t;if(r<0)break;let i=!0;for(let o=0;o<t;o++)if(!p(e[r+o],e[r+t+o])){i=!1;break}if(i){for(let i=0;i<t;i++)e[r+i]=e[r+t+i];return e.length=r+t,{start:r,length:t}}}}(o);if(e){for(let t=s.length-1;t>=0;t--){let r=s[t];if(r.start+r.length<=e.start)break;s.pop()}s.push(e)}break}}if(function(e,t){let r=t[0],i=e.length-(r?f(e,r):0);for(let r of t)i-=h(e,r);return i}(o,s)>=50)break}}let l=[...s].sort((e,t)=>t.start-e.start),u=l[l.length-1];if(u){let e=f(o,u);for(let t of(o.splice(u.start-e,e),l))t.start-=e}for(let e of l)!function(e,t){let r=t.start+t.length,i=h(e,t);i&&e.splice(r+i===e.length?r:t.start,i)}(o,e);return s.some(e=>0===e.start&&o.length===e.length)&&function(e){let t=e.map(e=>`${e.function}|${e.filename}|${e.lineno}|${e.colno}|${e.module}`),r=0;for(let e=1;e<t.length;e++)(function(e,t,r){for(let i=0;i<e.length;i++){let o=e[(t+i)%e.length],n=e[(r+i)%e.length];if(o!==n)return o<n}return!1})(t,e,r)&&(r=e);e.push(...e.splice(0,r))}(o),g(o)}}for(var m in r.chromeStackLineParser=o.chromeStackLineParser,r.createDefaultStackParser=o.createDefaultStackParser,r.createStackParser=o.createStackParser,r.geckoStackLineParser=o.geckoStackLineParser,r.nodeStackLineParser=o.nodeStackLineParser,r.opera10StackLineParser=o.opera10StackLineParser,r.opera11StackLineParser=o.opera11StackLineParser,r.reverseAndStripFrames=o.reverseAndStripFrames,r.winjsStackLineParser=o.winjsStackLineParser,o)-1===["chromeStackLineParser","createDefaultStackParser","createStackParser","geckoStackLineParser","nodeStackLineParser","opera10StackLineParser","opera11StackLineParser","reverseAndStripFrames","winjsStackLineParser"].indexOf(m)&&(r[m]=o[m]);Object.defineProperty(r,"__esModule",{value:!0})},800351,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(){let e=globalThis._posthogReleaseId;return"string"==typeof e&&e.length>0?e:void 0}for(var a in i.r(o),i.d(o,{getInjectedReleaseId:()=>n}),r.getInjectedReleaseId=o.getInjectedReleaseId,o)-1===["getInjectedReleaseId"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},585598,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
2),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);class n{constructor(e){this._maxSize=e,this._cache=new Map}get(e){let t=this._cache.get(e);if(void 0!==t)return this._cache.delete(e),this._cache.set(e,t),t}set(e,t){this._cache.set(e,t)}reduce(){for(;this._cache.size>=this._maxSize;){let e=this._cache.keys().next().value;e&&this._cache.delete(e)}}}for(var a in i.d(o,{ReduceableCache:()=>n}),r.ReduceableCache=o.ReduceableCache,o)-1===["ReduceableCache"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},143819,(e,t,r)=>{"use strict";var i={"./coercers"(t){t.exports=e.r(291385)},"./error-properties-builder"(t){t.exports=e.r(199303)},"./exception-steps"(t){t.exports=e.r(578988)},"./parsers"(t){t.exports=e.r(205105)},"./release"(t){t.exports=e.r(800351)},"./utils?198b"(t){t.exports=e.r(585598)}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};for(var s in(()=>{n.r(a);var e=n("./error-properties-builder"),t={};for(let r in e)"default"!==r&&(t[r]=()=>e[r]);n.d(a,t);var r=n("./parsers"),t={};for(let e in r)"default"!==e&&(t[e]=()=>r[e]);n.d(a,t);var i=n("./coercers"),t={};for(let e in i)"default"!==e&&(t[e]=()=>i[e]);n.d(a,t);var o=n("./utils?198b"),t={};for(let e in o)"default"!==e&&(t[e]=()=>o[e]);n.d(a,t);var s=n("./exception-steps"),t={};for(let e in s)"default"!==e&&(t[e]=()=>s[e]);n.d(a,t);var l=n("./release"),t={};for(let e in l)"default"!==e&&(t[e]=()=>l[e]);n.d(a,t)})(),a)r[s]=a[s];Object.defineProperty(r,"__esModule",{value:!0})},370454,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o);let n=e=>{if("flags"in e){let t=a(e.flags),r=s(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([e,t])=>[e,u(t)])),i=Object.fromEntries(Object.entries(t).map(([e,t])=>{var i,o;return[e,{key:e,enabled:"string"==typeof(i=t)||i,variant:"string"==typeof i?i:void 0,reason:void 0,metadata:{id:void 0,version:void 0,payload:(o=r[e])?JSON.stringify(o):void 0,description:void 0}}]}));return{...e,featureFlags:t,featureFlagPayloads:r,flags:i}}},a=e=>Object.fromEntries(Object.entries(e??{}).map(([e,t])=>[e,l(t)]).filter(([,e])=>void 0!==e)),s=e=>{let t=e??{};return Object.fromEntries(Object.keys(t).filter(e=>{let r=t[e];return r.enabled&&r.metadata&&void 0!==r.metadata.payload}).map(e=>{let r=t[e].metadata?.payload;return[e,r?u(r):void 0]}))},l=e=>void 0===e?void 0:e.variant??e.enabled,u=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}};function c(e){return"string"==typeof e||e}function d(e){return"string"==typeof e?e:void 0}let p=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],f=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain",...p,"$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"];for(var h in i.d(o,{getEnabledFromValue:()=>c,getVariantFromValue:()=>d}
2,{MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES:p,MINIMAL_FLAG_CALLED_EVENT_PROPERTIES:f,createFlagsResponseFromFlagsAndPayloads:(e,t)=>{let r=[...new Set([...Object.keys(e??{}),...Object.keys(t??{})])].filter(r=>e?.[r]!==void 0||!!t?.[r]).reduce((t,r)=>(t[r]=e?.[r]??!0,t),{});return n({featureFlags:r,featureFlagPayloads:t??{}})},flagDetailsToResults:e=>Object.values(e).map(e=>{let t=e.variant??e.enabled,r=e.metadata?.payload;return{key:e.key,enabled:c(t),variant:d(t),payload:void 0!==r?u(r):null}}),getFeatureFlagValue:l,getFlagValuesFromFlags:a,getPayloadsFromFlags:s,minimizeFlagCalledEventProperties:(e,t=[])=>{let r={},i=t=>{void 0!==e[t]&&(r[t]=e[t])};return f.forEach(i),t.forEach(i),r},normalizeFlagsResponse:n,parsePayload:u,updateFlagValue:(e,t)=>({...e,enabled:c(t),variant:d(t)})}),r.MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES=o.MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES,r.MINIMAL_FLAG_CALLED_EVENT_PROPERTIES=o.MINIMAL_FLAG_CALLED_EVENT_PROPERTIES,r.createFlagsResponseFromFlagsAndPayloads=o.createFlagsResponseFromFlagsAndPayloads,r.flagDetailsToResults=o.flagDetailsToResults,r.getEnabledFromValue=o.getEnabledFromValue,r.getFeatureFlagValue=o.getFeatureFlagValue,r.getFlagValuesFromFlags=o.getFlagValuesFromFlags,r.getPayloadsFromFlags=o.getPayloadsFromFlags,r.getVariantFromValue=o.getVariantFromValue,r.minimizeFlagCalledEventProperties=o.minimizeFlagCalledEventProperties,r.normalizeFlagsResponse=o.normalizeFlagsResponse,r.parsePayload=o.parsePayload,r.updateFlagValue=o.updateFlagValue,o)-1===["MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES","MINIMAL_FLAG_CALLED_EVENT_PROPERTIES","createFlagsResponseFromFlagsAndPayloads","flagDetailsToResults","getEnabledFromValue","getFeatureFlagValue","getFlagValuesFromFlags","getPayloadsFromFlags","getVariantFromValue","minimizeFlagCalledEventProperties","normalizeFlagsResponse","parsePayload","updateFlagValue"].indexOf(h)&&(r[h]=o[h]);Object.defineProperty(r,"__esModule",{value:!0})},59520,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{InconclusiveMatchError:()=>s,getFeatureFlagHash:()=>S,getFeatureFlagVariant:()=>E,getFeatureFlagVariantLookupTable:()=>P,hashSHA1:()=>b,matchFeatureFlagProperty:()=>v,parseFeatureFlagSemver:()=>g,relativeDateParseForFeatureFlagMatching:()=>m,resolveFeatureFlagPayload:()=>O});let n=e.r(370454),a=["is_not","is_set"];class s extends Error{constructor(e){super(e),this.name=this.constructor.name,Object.setPrototypeOf(this,s.prototype)}}function l(e){if("boolean"==typeof e)return e;if("string"==typeof e)return"true"===e.toLowerCase();if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!l(t in e?e[t]:null))return!1;return!0}function u(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let r=e.charCodeAt(t+1);if(t+1>=e.length||r<56320||r>57343)throw new s("Cannot stringify an unpaired surrogate like the flags service");t++}else if(r>=56320&&r<=57343)throw new s("Cannot stringify an unpaired surrogate like the flags service")}}function c(e,t){let r=0,i=0;for(;r<e.length&&i<t.length;){let o=e.charCodeAt(r),n=t.charCodeAt(i),a=o>=55296&&o<=56319,s=n>=55296&&n<=56319,l=a?e.charCodeAt(r+1):0,u=s?t.charCodeAt(i+1):0,c=a?(o-55296)*1024+l-56320+65536:o,d=s?(n-55296)*1024+u-56320+65536:n;if(c!==d)return c-d;r+=a?2:1,i+=s?2:1}return e.length-t.length}function d(e){return"string"==typeof e?(u(e),e):function e(t,r=new Set){if(null===t)return"null";if("string"==typeof t)return u(t),JSON.stringify(t);if("boolean"==typeof t)return t?"true":"false";if("number"==typeof t){if(!Number.isFinite(t))throw new s(`Cannot stringify non-finite number ${t} like the flags service`);if(Number.isInteger(t))throw new s(`Cannot distinguish integer ${t} from an integral JSON float during local evaluation`);return String(t)}if(Array.isArray(t)){if(r.has(t))throw new s("Cannot stringify a circular array during local evaluation");r.add(t);try{let i=[];for(let o=0;o<t.length;o++)i.push(o in t?e(t[o],r):"null");return`[${i.join(",")}]`}finally{r.delete(t)}}if("object"==typeof t){let i=Object.getPrototypeOf(t);if(i!==Object.prototype&&null!==i)throw new s("Cannot stringify a non-JSON object like the flags service");if(r.has(t))throw new s("Cannot stringify a circular object during local evaluation");r.add(t);try{let i=Object.keys(t);
2return i.forEach(u),`{${i.sort(c).map(i=>`${JSON.stringify(i)}:${e(t[i],r)}`).join(",")}}`}finally{r.delete(t)}}throw new s(`Cannot stringify ${typeof t} like the flags service`)}(e)}function p(e){try{return new RegExp(e),!0}catch{return!1}}function f(e){return String(e).replace(/[A-Z]/g,e=>e.toLowerCase())}function h(e,t,r){if(!/^\d+$/.test(e)||"strict"===r&&e.length>1&&"0"===e[0])throw new s(`Invalid semver: ${t}`);return parseInt(e,10)}function g(e,t="strict"){let r=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!r||r.startsWith("."))throw new s(`Invalid semver: ${e}`);let i=r.split("."),o=r=>void 0===r||""===r?0:h(r,e,t);return[o(i[0]),o(i[1]),o(i[2])]}function y(e,t){for(let r=0;r<3;r++){if(e[r]<t[r])return -1;if(e[r]>t[r])return 1}return 0}function _(e){if(e instanceof Date)return e;if("string"==typeof e||"number"==typeof e){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new s(`${e} is in an invalid date format`)}throw new s(`The date provided ${e} must be a string, number, or date object`)}function m(e){let t=e.match(/^-?(?<number>[0-9]+)(?<interval>[a-z])$/),r=new Date(new Date().toISOString());if(!t||!t.groups)return null;let i=parseInt(t.groups.number);if(i>=1e4)return null;let o=t.groups.interval;if("h"===o)r.setUTCHours(r.getUTCHours()-i);else if("d"===o)r.setUTCDate(r.getUTCDate()-i);else if("w"===o)r.setUTCDate(r.getUTCDate()-7*i);else if("m"===o)r.setUTCMonth(r.getUTCMonth()-i);else{if("y"!==o)return null;r.setUTCFullYear(r.getUTCFullYear()-i)}return r}function v(e,t,r={}){let i=e.key,o=e.value,n=e.operator||"exact",c=r.semverParsingPolicy??"strict";if(Object.prototype.hasOwnProperty.call(t,i)){if("is_not_set"===n)return!1;else if("is_set"===n)return!0}else throw new s(`Property ${i} not found in propertyValues`);let b=t[i];if(void 0===b)return r.warnFunction?.(`Property ${i} cannot have a value of undefined with the ${n} operator`),"is_not"===n;if(null===b&&!a.includes(n)&&"exact"!==n&&"is_not"!==n)return r.warnFunction?.(`Property ${i} cannot have a value of null with the ${n} operator`),!1;let S=(e,t)=>{if(function e(t){if("boolean"==typeof t)return!0;if("string"==typeof t){let e=t.toLowerCase();return"true"===e||"false"===e}if(!Array.isArray(t))return!1;for(let r=0;r<t.length;r++)if(!e(r in t?t[r]:null))return!1;return!0}(e))return!function e(t,r=new Set){if(null!==t&&"boolean"!=typeof t){if("string"==typeof t)return void u(t);if("number"==typeof t){if(!Number.isFinite(t))throw new s(`Cannot represent non-finite number ${t} like the flags service`);return}if(Array.isArray(t)){if(r.has(t))throw new s("Cannot represent a circular array during local evaluation");r.add(t);try{for(let i=0;i<t.length;i++)i in t&&e(t[i],r)}finally{r.delete(t)}return}if("object"==typeof t){let i=Object.getPrototypeOf(t);if(i!==Object.prototype&&null!==i)throw new s("Cannot represent a non-JSON object like the flags service");if(r.has(t))throw new s("Cannot represent a circular object during local evaluation");r.add(t);try{for(let i of Object.keys(t))u(i),e(t[i],r)}finally{r.delete(t)}return}throw new s(`Cannot represent ${typeof t} like the flags service`)}}(t),l(e)===l(t);if(Array.isArray(e)){let r=d(t).toLowerCase();return e.some(e=>d(e).toLowerCase()===r)}return d(e).toLowerCase()===d(t).toLowerCase()},P=(e,t,r)=>{if("gt"===r)return e>t;if("gte"===r)return e>=t;if("lt"===r)return e<t;if("lte"===r)return e<=t;throw Error(`Invalid operator: ${r}`)};switch(n){case"exact":return S(o,b);case"is_not":return!S(o,b);case"is_set":return!0;case"icontains":return f(b).includes(f(o));case"not_icontains":return!f(b).includes(f(o));case"starts_with":return f(b).startsWith(f(o));case"not_starts_with":return!f(b).startsWith(f(o));case"ends_with":return f(b).endsWith(f(o));case"not_ends_with":return!f(b).endsWith(f(o));case"regex":return p(String(o))&&null!==String(b).match(String(o));case"not_regex":return p(String(o))&&null===String(b).match(String(o));case"gt":case"gte":case"lt":case"lte":{let e="number"==typeof o?o:parseFloat(String(o)),t="number"==typeof b?b:null!=b?parseFloat(String(b)):0/0;if(Number.isFinite(e)&&Number.isFinite(t))return P(t,e,n);return P(String(b),String(o),n)}
2case"is_date_after":case"is_date_before":{if("boolean"==typeof o)throw new s("Date operations cannot be performed on boolean values");let e=m(String(o));null==e&&(e=_(o));let t=_(b);return"is_date_before"===n?t<e:t>e}case"semver_eq":return 0===y(g(String(b),c),g(String(o),c));case"semver_neq":return 0!==y(g(String(b),c),g(String(o),c));case"semver_gt":return y(g(String(b),c),g(String(o),c))>0;case"semver_gte":return y(g(String(b),c),g(String(o),c))>=0;case"semver_lt":return 0>y(g(String(b),c),g(String(o),c));case"semver_lte":return 0>=y(g(String(b),c),g(String(o),c));case"semver_tilde":{let e,t=g(String(b),c),{lower:r,upper:i}={lower:[(e=g(String(o),c))[0],e[1],e[2]],upper:[e[0],e[1]+1,0]};return y(t,r)>=0&&0>y(t,i)}case"semver_caret":{let e=g(String(b),c),{lower:t,upper:r}=function(e,t){let[r,i,o]=g(e,t);return{lower:[r,i,o],upper:r>0?[r+1,0,0]:i>0?[0,i+1,0]:[0,0,o+1]}}(String(o),c);return y(e,t)>=0&&0>y(e,r)}case"semver_wildcard":{let e=g(String(b),c),{lower:t,upper:r}=function(e,t){let r=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!r)throw new s(`Invalid wildcard semver: ${e}`);let i=r.split("."),o=r=>{if("legacy-permissive"===t){let e=parseInt(r,10);if(!isNaN(e))return e}else try{return h(r,e,t)}catch{}throw new s(`Invalid wildcard semver: ${e}`)},n=o(i[0]);if(1===i.length)return{lower:[n,0,0],upper:[n+1,0,0]};let a=o(i[1]);return{lower:[n,a,0],upper:[n,a+1,0]}}(String(o),c);return y(e,t)>=0&&0>y(e,r)}default:throw new s(`Unknown operator: ${n}`)}}async function b(e){let t=globalThis.crypto?.subtle;if(!t)throw Error("SubtleCrypto API not available");return Array.from(new Uint8Array(await t.digest("SHA-1",new TextEncoder().encode(e)))).map(e=>e.toString(16).padStart(2,"0")).join("")}async function S(e,t,r=""){return parseInt((await b(`${e}.${t}${r}`)).slice(0,15),16)/0x1000000000000000}function P(e){let t=[],r=0;for(let i of e){let e=r+i.rollout_percentage/100;t.push({valueMin:r,valueMax:e,key:i.key}),r=e}return t}async function E(e,t,r){let i=await S(e,t,"variant");return P(r).find(e=>i>=e.valueMin&&i<e.valueMax)?.key}function O(e,t){if(!1===t||null==t||!e)return null;let r=e["boolean"==typeof t?t.toString():t]||null;return null==r?null:(0,n.parsePayload)(r)}for(var F in r.InconclusiveMatchError=o.InconclusiveMatchError,r.getFeatureFlagHash=o.getFeatureFlagHash,r.getFeatureFlagVariant=o.getFeatureFlagVariant,r.getFeatureFlagVariantLookupTable=o.getFeatureFlagVariantLookupTable,r.hashSHA1=o.hashSHA1,r.matchFeatureFlagProperty=o.matchFeatureFlagProperty,r.parseFeatureFlagSemver=o.parseFeatureFlagSemver,r.relativeDateParseForFeatureFlagMatching=o.relativeDateParseForFeatureFlagMatching,r.resolveFeatureFlagPayload=o.resolveFeatureFlagPayload,o)-1===["InconclusiveMatchError","getFeatureFlagHash","getFeatureFlagVariant","getFeatureFlagVariantLookupTable","hashSHA1","matchFeatureFlagProperty","parseFeatureFlagSemver","relativeDateParseForFeatureFlagMatching","resolveFeatureFlagPayload"].indexOf(F)&&(r[F]=o[F]);Object.defineProperty(r,"__esModule",{value:!0})},732616,(e,t,r)=>{"use strict";let i;var o={};o.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{gzipCompress:()=>_,isGzipData:()=>d,isGzipRequest:()=>p,isGzipSupported:()=>l,isNativeAsyncGzipError:()=>h,isNativeAsyncGzipReadError:()=>f});let a=e.r(699960),s=e.r(856658);function l(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&"function"==typeof Response.prototype.blob}let u="NativeGzipValidationError",c=e=>e.length>=2&&31===e[0]&&139===e[1],d=e=>e instanceof ArrayBuffer?c(new Uint8Array(e)):!!ArrayBuffer.isView(e)&&c(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),p=(e,t)=>e===a.Compression.GZipJS||t===a.Compression.GZipJS||"gzip"===t,f=e=>!!e&&"object"==typeof e&&"NotReadableError"===("name"in e?String(e.name):""),h=e=>{if(!e||"object"!=typeof e)return!1;let t="name"in e?String(e.name):"";return f(e)||t===u},g=e=>
2{throw(0,s.createNamedError)(u,`Native gzip produced invalid output: ${e}`)},y=async(e,t)=>{e.size<18&&g("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());c(r)&&8===r[2]||g("invalid-header");let o=new DataView(await e.slice(e.size-8).arrayBuffer());o.getUint32(0,!0)!==(e=>{let t=(()=>{if(i)return i;i=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t=1&t?0xedb88320^t>>>1:t>>>1;i[e]=t>>>0}return i})(),r=0xffffffff;for(let i=0;i<e.length;i++)r=t[(r^e[i])&255]^r>>>8;return(0xffffffff^r)>>>0})(t)&&g("invalid-crc");let n=t.length>>>0;o.getUint32(4,!0)!==n&&g("invalid-size")};async function _(e,t=!0,r){try{let t=new TextEncoder().encode(e),r=new globalThis.CompressionStream("gzip"),i=r.writable.getWriter(),o=i.write(t).then(()=>i.close()).catch(async e=>{try{await i.abort(e)}catch{}throw e}),n=new Response(r.readable).blob(),[a]=await Promise.all([n,o]);return await y(a,t),a}catch(e){if(r?.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}}for(var m in r.gzipCompress=n.gzipCompress,r.isGzipData=n.isGzipData,r.isGzipRequest=n.isGzipRequest,r.isGzipSupported=n.isGzipSupported,r.isNativeAsyncGzipError=n.isNativeAsyncGzipError,r.isNativeAsyncGzipReadError=n.isNativeAsyncGzipReadError,n)-1===["gzipCompress","isGzipData","isGzipRequest","isGzipSupported","isNativeAsyncGzipError","isNativeAsyncGzipReadError"].indexOf(m)&&(r[m]=n[m]);Object.defineProperty(r,"__esModule",{value:!0})},706150,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{toOtlpAnyValue:()=>u,toOtlpKeyValueList:()=>c});let n=e.r(864066),a=e.r(875607),s=Object.prototype.propertyIsEnumerable;function l(){return{ancestors:new WeakSet,remainingNodes:a.MAX_JSON_SAFE_VALUE_NODES}}function u(e,t){try{return d(e,t,l(),0)}catch{return{stringValue:a.UNSERIALIZABLE_VALUE}}}function c(e,t){try{return p(e,t,l(),0)}catch{return[]}}function d(e,t,r,i){if(r.remainingNodes<=0)return{stringValue:a.TRUNCATED_VALUE};if(r.remainingNodes--,(0,n.isBoolean)(e))return{boolValue:e};if("bigint"==typeof e){let r,i;return r=e.toString(),e>=(i=BigInt("9223372036854775808"))||e<-i?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}if("number"==typeof e){if(!Number.isFinite(e))return{stringValue:String(e)};if(Number.isInteger(e)){if(Number.isSafeInteger(e))return{intValue:String(e)};if("u"<typeof BigInt)return{stringValue:String(e)};let r=BigInt(e).toString();return e>=0x8000000000000000||e<-0x8000000000000000?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}return{doubleValue:e}}if("string"==typeof e)return{stringValue:(0,a.sanitizeString)(e)};if("function"==typeof e)return{stringValue:a.FUNCTION_VALUE};if("symbol"==typeof e)return{stringValue:String(e)};if("object"==typeof e&&null!==e){if(r.ancestors.has(e))return{stringValue:a.CIRCULAR_VALUE};if(i>=a.MAX_JSON_SAFE_VALUE_DEPTH)return{stringValue:a.TRUNCATED_VALUE};if(e instanceof Date){let t=Number.isFinite(e.getTime())?e.toISOString():String(e);return{stringValue:"string"==typeof t?(0,a.sanitizeString)(t):String(t)}}r.ancestors.add(e);try{try{let o=e.toJSON;if("function"==typeof o)return d(o.call(e),t,r,i+1)}catch{}if((0,n.isArray)(e))return{arrayValue:{values:function(e,t,r,i){let o=[],s=Math.min(e.length,a.MAX_JSON_SAFE_VALUE_ITEMS),l=0;for(;l<s&&r.remainingNodes>0;l++)try{let a=l in e?e[l]:void 0;if((0,n.isNullish)(a))continue;o.push(d(a,t,r,i))}catch{o.push({stringValue:a.UNSERIALIZABLE_VALUE})}return e.length>l&&o.push({stringValue:a.TRUNCATED_VALUE}),o}(e,t,r,i+1)}};return{kvlistValue:{values:p(e,t,r,i+1)}}}finally{r.ancestors.delete(e)}}return{stringValue:(0,a.sanitizeString)(String(e))}}function p(e,t,r,i){let o=[];for(let l in e)if(s.call(e,l)){if(!l){t?.debug("Dropping an attribute with an empty key");continue}if(o.length>=a.MAX_JSON_SAFE_VALUE_ITEMS||r.remainingNodes<=0){t?.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{let s=e[l];
2if((0,n.isNull)(s)||(0,n.isUndefined)(s))continue;o.push({key:(0,a.sanitizeString)(l),value:d(s,t,r,i)})}catch{o.push({key:(0,a.sanitizeString)(l),value:{stringValue:a.UNSERIALIZABLE_VALUE}})}}return o}for(var f in r.toOtlpAnyValue=o.toOtlpAnyValue,r.toOtlpKeyValueList=o.toOtlpKeyValueList,o)-1===["toOtlpAnyValue","toOtlpKeyValueList"].indexOf(f)&&(r[f]=o[f]);Object.defineProperty(r,"__esModule",{value:!0})},693710,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{buildOtlpResourceAttributes:()=>s,normalizeOsName:()=>d,osResourceAttributes:()=>p,toOtlpResourceKeyValueList:()=>u});let n=e.r(875607),a=e.r(706150);function s(e,t,r){return{...(0,n.assignUserAttributes)({},e.resourceAttributes),"service.name":e.serviceName||"unknown_service",...e.environment&&{"deployment.environment":e.environment},...e.serviceVersion&&{"service.version":e.serviceVersion},"telemetry.sdk.name":t,"telemetry.sdk.version":r}}let l=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function u(e,t){let r=(0,n.assignUserAttributes)({},e),i={};for(let e of l)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e],delete r[e]);return[...(0,a.toOtlpKeyValueList)(r,t),...(0,a.toOtlpKeyValueList)(i,t)]}let c={darwin:"macOS",win32:"Windows",cygwin:"Windows",linux:"Linux",android:"Android",freebsd:"FreeBSD",openbsd:"OpenBSD",netbsd:"NetBSD",sunos:"SunOS",aix:"AIX",haiku:"Haiku","Mac OS X":"macOS"};function d(e){if(e)return Object.prototype.hasOwnProperty.call(c,e)?c[e]:e}function p(e,t){let r=d(e);return{...r?{"os.name":r}:{},...t?{"os.version":t}:{}}}for(var f in r.buildOtlpResourceAttributes=o.buildOtlpResourceAttributes,r.normalizeOsName=o.normalizeOsName,r.osResourceAttributes=o.osResourceAttributes,r.toOtlpResourceKeyValueList=o.toOtlpResourceKeyValueList,o)-1===["buildOtlpResourceAttributes","normalizeOsName","osResourceAttributes","toOtlpResourceKeyValueList"].indexOf(f)&&(r[f]=o[f]);Object.defineProperty(r,"__esModule",{value:!0})},686601,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{buildOtlpLogRecord:()=>f,buildOtlpLogsPayload:()=>g,buildResourceAttributes:()=>h,getOtlpSeverityNumber:()=>p,getOtlpSeverityText:()=>d});let n=e.r(856658),a=e.r(875607),s=e.r(706150),l=e.r(693710),u={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},c=u.info;function d(e){return(u[e]||c).text}function p(e){return(u[e]||c).number}function f(e,t,r,i){let{text:o,number:l}=u[e.level||"info"]||c,d=function(e=Date.now()){return String(e)+"000000"}((0,n.isNumber)(i)?i:void 0),p={};t.distinctId&&(p.posthogDistinctId=t.distinctId),t.sessionId&&(p.sessionId=t.sessionId),t.windowId&&(p["window.id"]=t.windowId),(0,n.isNullish)(t.sessionStartTimestamp)||(p.sessionStartTimestamp=String(t.sessionStartTimestamp)),(0,n.isNullish)(t.lastActivityTimestamp)||(p.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(p["url.full"]=t.currentUrl),t.screenName&&(p["screen.name"]=t.screenName),t.appState&&(p["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(p.feature_flags=t.activeFeatureFlags);let f={...p},h=e.attributes;if(h){let e=[];try{e=Object.keys(h)}catch{e=[]}for(let t of e){let e;try{e=h[t]}catch{e=a.UNSERIALIZABLE_VALUE}Object.defineProperty(f,t,{value:e,enumerable:!0,writable:!0,configurable:!0})}}let g={timeUnixNano:d,observedTimeUnixNano:d,severityNumber:l,severityText:o,body:{stringValue:function(e){try{return(0,a.sanitizeString)(String(e))}catch{return a.UNSERIALIZABLE_VALUE}}(e.body)},attributes:(0,s.toOtlpKeyValueList)(f,r)};return e.trace_id&&(g.traceId=e.trace_id),e.span_id&&(g.spanId=e.span_id),(0,n.isUndefined)(e.trace_flags)||(g.flags=e.trace_flags),g}
2function h(e,t,r){return(0,l.buildOtlpResourceAttributes)(e,t,r)}function g(e,t,r,i){return{resourceLogs:[{resource:{attributes:(0,l.toOtlpResourceKeyValueList)(t)},scopeLogs:[{scope:{name:r,version:i},logRecords:e}]}]}}for(var y in r.buildOtlpLogRecord=o.buildOtlpLogRecord,r.buildOtlpLogsPayload=o.buildOtlpLogsPayload,r.buildResourceAttributes=o.buildResourceAttributes,r.getOtlpSeverityNumber=o.getOtlpSeverityNumber,r.getOtlpSeverityText=o.getOtlpSeverityText,o)-1===["buildOtlpLogRecord","buildOtlpLogsPayload","buildResourceAttributes","getOtlpSeverityNumber","getOtlpSeverityText"].indexOf(y)&&(r[y]=o[y]);Object.defineProperty(r,"__esModule",{value:!0})},158636,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{FlushTimer:()=>a});let n=e.r(856658);class a{constructor(e){this._onFire=e,this._firesAt=0}get pending(){return!!this._timer}arm(e){this.clear(),this._firesAt=Date.now()+e,this._timer=(0,n.safeSetTimeout)(()=>{this._timer=void 0,this._onFire()},e)}armNoEarlierThan(e){this._timer&&Date.now()+e<=this._firesAt||this.arm(e)}clear(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}for(var s in r.FlushTimer=o.FlushTimer,o)-1===["FlushTimer"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},183570,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(e,t=Date.now()){if("string"!=typeof e||!e)return;let r=e.trim(),i=/^\d+\s*,/.test(r)?r.slice(0,r.indexOf(",")).trim():r,o=/^\d+$/.test(i)?Number(i):0/0;if(!Number.isFinite(o)&&/^[+-]?[\d.]+$/.test(i))return;let a=Number.isFinite(o)?1e3*o:Date.parse(i)-t;if(Number.isFinite(a)&&!(a<=0))return Math.min(a,3e5)}i.r(o);class a{record(e){if("too-large"===e.kind)return;if("retry-later"!==e.kind)return void this.reset();if(!e.retryAfterMs)return;let t=this.isOpen(),r=Date.now(),i=Math.min(e.retryAfterMs,3e5);if(!t){this._installedAt=r,this._until=r+i;return}this._until=Math.max(this._until,Math.min(r+i,this._installedAt+3e5))}remainingMs(){let e=Date.now();if(e<this._installedAt-5e3)return this.reset(),0;let t=Math.min(3e5,Math.max(0,this._until-e));return 0===t&&this.reset(),t}isOpen(){return this.remainingMs()>0}reset(){this._until=0,this._installedAt=0}constructor(){this._until=0,this._installedAt=0}}for(var s in i.d(o,{RetryAfterWindow:()=>a,parseRetryAfterMs:()=>n},{MAX_RETRY_AFTER_MS:3e5}),r.MAX_RETRY_AFTER_MS=o.MAX_RETRY_AFTER_MS,r.RetryAfterWindow=o.RetryAfterWindow,r.parseRetryAfterMs=o.parseRetryAfterMs,o)-1===["MAX_RETRY_AFTER_MS","RetryAfterWindow","parseRetryAfterMs"].indexOf(s)&&(r[s]=o[s]);Object.defineProperty(r,"__esModule",{value:!0})},377499,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(){return .75+.25*Math.random()*2}function a(e,t,r,i){let o=Math.min(Math.max(0,t-1),6),n=e*2**o;return Math.round((void 0===i?n:Math.min(n,Math.max(i,e)))*r)}for(var s in i.r(o),i.d(o,{backoffDelayMs:()=>a,drawJitter:()=>n},{MAX_FLUSH_BACKOFF_EXPONENT:6,MAX_FLUSH_BACKOFF_MS:3e4,NO_JITTER:1}),r.MAX_FLUSH_BACKOFF_EXPONENT=o.MAX_FLUSH_BACKOFF_EXPONENT,r.MAX_FLUSH_BACKOFF_MS=o.MAX_FLUSH_BACKOFF_MS,r.NO_JITTER=o.NO_JITTER,r.backoffDelayMs=o.backoffDelayMs,r.drawJitter=o.drawJitter,o)-1===["MAX_FLUSH_BACKOFF_EXPONENT","MAX_FLUSH_BACKOFF_MS","NO_JITTER","backoffDelayMs","drawJitter"].indexOf(s)&&(r[s]=o[s]);
2Object.defineProperty(r,"__esModule",{value:!0})},560382,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PostHogLogs:()=>d});let n=e.r(686601),a=e.r(699960),s=e.r(856658),l=e.r(158636),u=e.r(183570),c=e.r(377499);class d{constructor(e,t,r,i,o,n=()=>Promise.resolve(),a){this._instance=e,this._config=t,this._logger=r,this._getContext=i,this._onReady=o,this._waitForStoragePersist=n,this._scopeName=a,this._flushTimer=new l.FlushTimer(()=>this._flushInBackground()),this._flushPromise=null,this._evictedSinceAdvance=0,this._queueGeneration=0,this._retryAfter=new u.RetryAfterWindow,this._consecutiveFlushFailures=0,this._flushJitter=c.NO_JITTER,this._intervalWindowStart=0,this._intervalLogCount=0,this._droppedWarned=!1,this._maxBufferSize=t.maxBufferSize,this._maxQueueSize=Math.max(t.maxQueueSize??t.maxBufferSize,t.maxBufferSize),this._flushIntervalMs=t.flushIntervalMs,this._maxBatchRecordsPerPost=t.maxBatchRecordsPerPost,this._rateCapWindowMs=t.rateCapWindowMs,this._maxLogsPerInterval=t.maxLogsPerInterval}clearQueue(){this._queueGeneration++,this._instance.setPersistedProperty(a.PostHogPersistedProperty.LogsQueue,[])}reset(){this._flushTimer.clear(),this._intervalWindowStart=0,this._intervalLogCount=0,this._droppedWarned=!1,this._consecutiveFlushFailures=0,this._flushJitter=c.NO_JITTER,this._retryAfter.reset(),this._maxBatchRecordsPerPost=this._config.maxBatchRecordsPerPost}onReconnect(){if(this._consecutiveFlushFailures=0,this._flushJitter=c.NO_JITTER,this._retryAfter.isOpen()){this._hasQueuedRecords()&&this._armFlushTimer();return}this._flushInBackground()}captureLog(e,t){if(this._instance.isDisabled||this._instance.optedOut||!e?.body)return;let r=this._runBeforeSend(e);if(null===r)return;if(!r.body)return void this._logger.info("Log was rejected in beforeSend function");if(!this._checkRateLimit())return;let i={record:(0,n.buildOtlpLogRecord)(r,t?.context??this._getContext(),this._logger,t?.occurredAtMs)};this._onReady(()=>this._enqueue(i))}_runBeforeSend(e){let t=this._config.beforeSend;if(!t)return e;let r=(0,s.isArray)(t)?t:[t],i=e;for(let e of r)try{let t=e(i);if(!t)return this._logger.info("Log was rejected in beforeSend function"),null;i=t}catch(e){return this._logger.error("Error in beforeSend function for log:",e),null}return i}_checkRateLimit(){if(void 0===this._maxLogsPerInterval)return!0;let e=Date.now(),t=e-this._intervalWindowStart;return((t>=this._rateCapWindowMs||t<0)&&(this._intervalWindowStart=e,this._intervalLogCount=0,this._droppedWarned=!1),this._intervalLogCount>=this._maxLogsPerInterval)?(this._droppedWarned||(this._logger.warn(`captureLog dropping logs: exceeded ${this._maxLogsPerInterval} logs per ${this._rateCapWindowMs}ms`),this._droppedWarned=!0),!1):(this._intervalLogCount++,!0)}async flush(){if(!this._instance.isDisabled)return this._flushPromise||(this._flushPromise=this._flushInner().finally(()=>{this._flushPromise=null})),this._flushPromise}async _flushInner(){this._flushTimer.clear();let e=this._instance.getPersistedProperty(a.PostHogPersistedProperty.LogsQueue)??[];if(0===e.length)return;let t=e.length,r=0;for(;e.length>0&&r<t;){let t=this._queueGeneration;this._evictedSinceAdvance=0;let i=Math.min(e.length,this._maxBatchRecordsPerPost),o=e.slice(0,i),s=o.map(e=>e.record),l=(0,n.buildOtlpLogsPayload)(s,this._buildResourceAttributes(),this._scopeName??this._instance.getLibraryId(),this._instance.getLibraryVersion()),u=await this._instance._sendLogsBatch(l);if(this._queueGeneration!==t)return;if("too-large"===u.kind&&o.length>1){this._maxBatchRecordsPerPost=Math.max(1,Math.floor(o.length/2)),this._logger.warn(`Logs batch of size ${o.length} was too large for the ingestion endpoint, reducing batch size to ${this._maxBatchRecordsPerPost}`);continue}if(this._retryAfter.record(u),this._flushTimer.pending&&this._flushTimer.arm(Math.max(this._flushIntervalMs,this._retryAfter.remainingMs())),"retry-later"===u.kind||("too-large"===u.kind?this._logger.warn("Dropping a single log record with batch size 1 — the record 
2is larger than the server cap and cannot be split further."):"ok"===u.kind&&this._maxBatchRecordsPerPost<this._config.maxBatchRecordsPerPost&&(this._maxBatchRecordsPerPost=Math.min(this._config.maxBatchRecordsPerPost,this._maxBatchRecordsPerPost+1)),await this._persistQueueAdvance(o.length),e=this._instance.getPersistedProperty(a.PostHogPersistedProperty.LogsQueue)??[],r+=o.length,"fatal"===u.kind))throw u.error}}async _persistQueueAdvance(e){let t=Math.max(0,e-this._evictedSinceAdvance),r=this._instance.getPersistedProperty(a.PostHogPersistedProperty.LogsQueue)??[];this._instance.setPersistedProperty(a.PostHogPersistedProperty.LogsQueue,r.slice(t)),await this._waitForStoragePersist()}_buildResourceAttributes(){return(0,n.buildResourceAttributes)(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion())}_enqueue(e){if(this._instance.optedOut)return;let t=this._instance.getPersistedProperty(a.PostHogPersistedProperty.LogsQueue)??[];(t.length>=this._maxQueueSize&&(t.shift(),this._evictedSinceAdvance++,this._logger.info("Logs queue is full, dropping oldest record.")),t.push(e),this._instance.setPersistedProperty(a.PostHogPersistedProperty.LogsQueue,t),t.length>=this._maxBufferSize&&!this._retryAfter.isOpen())?this._flushInBackground():this._armFlushTimer()}_armFlushTimer(){this._flushTimer.pending||this._flushTimer.arm(Math.max(this._flushIntervalMs,this._retryAfter.remainingMs()))}_nextFlushDelay(){return Math.max((0,c.backoffDelayMs)(this._flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,c.MAX_FLUSH_BACKOFF_MS),this._retryAfter.remainingMs())}_hasQueuedRecords(){let e=this._instance.getPersistedProperty(a.PostHogPersistedProperty.LogsQueue);return!!e&&e.length>0}async shutdown(e){this._flushTimer.clear();let t=this.flush().catch(()=>{});void 0===e?await t:await (0,s.raceWithTimeout)(t,e)}async flushWithTimeout(e){let t=this.flush();await (0,s.raceWithTimeout)(t,e,()=>{t.catch(()=>{})})}_flushInBackground(){this.flush().then(()=>{this._consecutiveFlushFailures=0,this._flushJitter=c.NO_JITTER},e=>{this._consecutiveFlushFailures++,this._flushJitter=(0,c.drawJitter)(),this._logger.error("PostHog logs flush failed:",e)}).finally(()=>{!this._instance.isDisabled&&this._hasQueuedRecords()&&this._flushTimer.armNoEarlierThan(this._nextFlushDelay())})}}for(var p in r.PostHogLogs=o.PostHogLogs,o)-1===["PostHogLogs"].indexOf(p)&&(r[p]=o[p]);Object.defineProperty(r,"__esModule",{value:!0})},564741,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{DEFAULT_HISTOGRAM_BOUNDS:()=>a,bucketIndexFor:()=>u,buildMetricsResourceAttributes:()=>c,buildOtlpMetricsPayload:()=>d,msToUnixNano:()=>s,seriesKey:()=>l});let n=e.r(693710),a=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function s(e){return String(e)+"000000"}function l(e,t,r,i){let o="";return i&&(o=Object.keys(i).sort().map(e=>`${JSON.stringify(e)}:${JSON.stringify(i[e])}`).join(",")),`${e}\u0000${t}\u0000${r??""}\u0000${o}`}function u(e,t){for(let r=0;r<t.length;r++)if(e<=t[r])return r;return t.length}function c(e,t,r){return(0,n.buildOtlpResourceAttributes)(e,t,r)}function d(e,t,r,i){return{resourceMetrics:[{resource:{attributes:(0,n.toOtlpResourceKeyValueList)(t)},scopeMetrics:[{scope:{name:r,version:i},metrics:e}]}]}}for(var p in r.DEFAULT_HISTOGRAM_BOUNDS=o.DEFAULT_HISTOGRAM_BOUNDS,r.bucketIndexFor=o.bucketIndexFor,r.buildMetricsResourceAttributes=o.buildMetricsResourceAttributes,r.buildOtlpMetricsPayload=o.buildOtlpMetricsPayload,r.msToUnixNano=o.msToUnixNano,r.seriesKey=o.seriesKey,o)-1===["DEFAULT_HISTOGRAM_BOUNDS","bucketIndexFor","buildMetricsResourceAttributes","buildOtlpMetricsPayload","msToUnixNano","seriesKey"].indexOf(p)&&(r[p]=o[p]);Object.defineProperty(r,"__esModule",{value:!0})},838540,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
2),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(e){let t=e?.resourceAttributes;return{serviceName:t?.["service.name"]??e?.serviceName,serviceVersion:t?.["service.version"]??e?.serviceVersion,environment:t?.["deployment.environment"]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}for(var a in i.r(o),i.d(o,{resolveMetricsConfig:()=>n}),r.resolveMetricsConfig=o.resolveMetricsConfig,o)-1===["resolveMetricsConfig"].indexOf(a)&&(r[a]=o[a]);Object.defineProperty(r,"__esModule",{value:!0})},454483,(e,t,r)=>{"use strict";var i={};i.d=(e,t,r)=>{var o=(t,r)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,[r]:t[o]})};o(t,"get"),o(r,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{DEFAULT_HISTOGRAM_BOUNDS:()=>c.DEFAULT_HISTOGRAM_BOUNDS,PostHogMetrics:()=>p,buildMetricsResourceAttributes:()=>c.buildMetricsResourceAttributes,buildOtlpMetricsPayload:()=>c.buildOtlpMetricsPayload,resolveMetricsConfig:()=>d.resolveMetricsConfig});let n=e.r(856658),a=e.r(158636),s=e.r(183570),l=e.r(377499),u=e.r(706150),c=e.r(564741),d=e.r(838540);class p{constructor(e,t,r){this._instance=e,this._config=t,this._logger=r,this._series=new Map,this._flushTimer=new a.FlushTimer(()=>this.flush().catch(e=>{this._logger.error("Metrics flush failed:",e)})),this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._retryAfter=new s.RetryAfterWindow,this._consecutiveFlushFailures=0,this._flushJitter=l.NO_JITTER,this._generation=0}count(e,t=1,r){this._capture({name:e,type:"count",value:t,unit:r?.unit,attributes:r?.attributes})}gauge(e,t,r){this._capture({name:e,type:"gauge",value:t,unit:r?.unit,attributes:r?.attributes})}histogram(e,t,r){this._capture({name:e,type:"histogram",value:t,unit:r?.unit,attributes:r?.attributes})}flush(){let e=this._flushPromise,t=(async()=>{e&&await e.catch(()=>{}),await this._doFlush()})().finally(()=>{this._flushPromise===t&&(this._flushPromise=null)});return this._flushPromise=t,t}drainWindow(){if(0===this._series.size)return null;let e=this._series;return this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._buildPayload(e)}reset(){this._generation++,this._retryAfter.reset(),this._consecutiveFlushFailures=0,this._flushJitter=l.NO_JITTER,this._flushTimer.clear(),this._series=new Map,this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set}_capture(e){let t,r;if(this._instance.isDisabled||this._instance.optedOut)return;let i=this._runBeforeSend(e);if(null===i)return;if(!i.name||"string"!=typeof i.name)return void this._logger.warn("Dropping metric with empty name");if("number"!=typeof i.value||!Number.isFinite(i.value))return void this._logger.warn(`Dropping metric '${i.name}': value must be a finite number`);if("count"===i.type&&i.value<0)return void this._logger.warn(`Dropping count '${i.name}': counters are monotonic, value must be >= 0`);try{t=i.attributes?{...i.attributes}:void 0,r=(0,c.seriesKey)(i.type,i.name,i.unit,t)}catch(e){this._logger.warn(`Dropping metric '${i.name}': attributes could not be serialized`,e);return}let o=this._series.get(r);if(!o){if(!this._admitNewSeries())return;o={name:i.name,type:i.type,unit:i.unit,attributes:t,windowStartMs:Date.now()},this._series.set(r,o)}let n=this._typeByName.get(i.name);void 0===n?this._typeByName.set(i.name,i.type):n===i.type||this._typeCollisionWarned.has(i.name)||(this._typeCollisionWarned.add(i.name),this._logger.warn(`Metric name '${i.name}' is already used as a ${n}; recording it as a ${i.type} too will blend both series in charts. Use a distinct name.`)),this._fold(o,i.value),this._armFlushTimer()}_admitNewSeries(){return this._series.size<this._config.maxSeriesPerFlush||(this._seriesCapWarned||(this._seriesCapWarned=!0,this._logger.warn(`Metric series cap reached (${this._config.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}_fold(e,t){switch(e.type){case"count":e.total=(e.total??0)+t;break;case"gauge":e.last=t;break;case"histogram":{e.hist||(e.hist={count:0,sum:0,min:t,max:t,bucketCounts:Array(c.DEFAULT_HISTOGRAM_BOUNDS.length+1).fill(0)});let r=e.hist;r.count+=1,r.sum+=t,r.min=Math.min(r.min,t),r.max=Math.max(r.max,t),r.bucketCounts[(0,c.bucketIndexFor)(t,c.DEFAULT_HISTOGRAM_BOUNDS)]+=1}}}_runBeforeSend(e){let t=this._config.beforeSend;if(!t)return e;let r=(0,n.isArray)(t)?t:[t],i=e;for(let e of r)try{let t=e(i);if(!t)return this._logger.info("Metric was rejected in beforeSend function"),null;i=t}catch(e){return this._logger.error("Error in beforeSend function for metric:",e),null}return i}_armFlushTimer(){this._flushTimer.pending||this._flushTimer.arm(this._nextFlushDelay())}_nextFlushDelay(){return Math.max((0,l.backoffDelayMs)(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,l.MAX_FLUSH_BACKOFF_MS),this._retryAfter.remainingMs())}async _doFlush(){if(this._flushTimer.clear(),0===this._series.size)return;let e=this._series;this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set;let t=this._generation,r=await this._instance._sendMetricsBatch(this._buildPayload(e));if(t===this._generation)switch(this._retryAfter.record(r),"retry-later"===r.kind?(this._consecutiveFlushFailures++,this._flushJitter=(0,l.drawJitter)()):(this._consecutiveFlushFailures=0,this._flushJitter=l.NO_JITTER),this._flushTimer.pending&&this._flushTimer.arm(this._nextFlushDelay()),r.kind){case"ok":return;case"retry-later":this._mergeWindowBack(e),this._flushTimer.armNoEarlierThan(this._nextFlushDelay());return;case"too-large":this._logger.warn("Metrics batch exceeded the server size limit and was dropped");return;case"fatal":this._logger.error("Failed to send metrics batch:",r.error);return}}_buildPayload(e){return(0,c.buildOtlpMetricsPayload)(this._buildMetrics(e),(0,c.buildMetricsResourceAttributes)(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._instance.getLibraryId(),this._instance.getLibraryVersion())}_buildMetrics(e){let t=(0,c.msToUnixNano)(Date.now()),r=new Map;for(let i of e.values()){let e=(0,c.seriesKey)(i.type,i.name,i.unit,void 0),o=r.get(e);o||(o={name:i.name,...i.unit&&{unit:i.unit}},"count"===i.type?o.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:"gauge"===i.type?o.gauge={dataPoints:[]}:o.histogram={aggregationTemporality:1,dataPoints:[]},r.set(e,o));let n=(0,u.toOtlpKeyValueList)(i.attributes??{},this._logger),a=(0,c.msToUnixNano)(i.windowStartMs);if("count"===i.type){let e={attributes:n,startTimeUnixNano:a,timeUnixNano:t,asDouble:i.total??0};o.sum.dataPoints.push(e)}else if("gauge"===i.type){let e={attributes:n,timeUnixNano:t,asDouble:i.last??0};o.gauge.dataPoints.push(e)}else if(i.hist){let e={attributes:n,startTimeUnixNano:a,timeUnixNano:t,count:i.hist.count,sum:i.hist.sum,min:i.hist.min,max:i.hist.max,bucketCounts:i.hist.bucketCounts,explicitBounds:c.DEFAULT_HISTOGRAM_BOUNDS};o.histogram.dataPoints.push(e)}}return Array.from(r.values())}_mergeWindowBack(e){for(let[t,r]of e){let e=this._series.get(t);if(!e){this._admitNewSeries()&&this._series.set(t,r);continue}switch(e.windowStartMs=Math.min(e.windowStartMs,r.windowStartMs),e.type){case"count":e.total=(e.total??0)+(r.total??0);break;case"gauge":break;case"histogram":if(r.hist)if(e.hist){e.hist.count+=r.hist.count,e.hist.sum+=r.hist.sum,e.hist.min=Math.min(e.hist.min,r.hist.min),e.hist.max=Math.max(e.hist.max,r.hist.max);for(let t=0;t<e.hist.bucketCounts.length;t++)e.hist.bucketCounts[t]+=r.hist.bucketCounts[t]}else e.hist=r.hist}}}}for(var f in r.DEFAULT_HISTOGRAM_BOUNDS=o.DEFAULT_HISTOGRAM_BOUNDS,r.PostHogMetrics=o.PostHogMetrics,r.buildMetricsResourceAttributes=o.buildMetricsResourceAttributes,r.buildOtlpMetricsPayload=o.buildOtlpMetricsPayload,r.resolveMetricsConfig=o.resolveMetricsConfig,o)-1===["DEFAULT_HISTOGRAM_BOUNDS","PostHogMetrics","buildMetricsResourceAttributes","buildOtlpMetricsPayload","resolveMetricsConfig"].indexOf(f)&&(r[f]=o[f]);
2Object.defineProperty(r,"__esModule",{value:!0})}]);

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