userpath-js 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +6 -6
- package/dist/index.js +6 -6
- package/dist/server/index.js +5 -6
- package/dist/types/src/base/events.d.ts +4 -0
- package/dist/types/src/base/events.d.ts.map +1 -1
- package/dist/types/src/base/session.d.ts +12 -0
- package/dist/types/src/base/session.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var W0=Object.defineProperty;var q0=($,X)=>{for(var Y in X)W0($,Y,{get:X[Y],enumerable:!0,configurable:!0,set:(H)=>X[Y]=()=>H})};var O_={name:"userpath-js",version:"1.1.2",private:!1,main:"dist/index.js",types:"dist/types/sdk/src/index.d.ts",scripts:{dev:"bun build src/index.ts --outdir ./dist --watch",types:"tsc",test:"vitest run","test:watch":"vitest","test:ui":"vitest --ui","test:coverage":"vitest --coverage",build:"bun run build.client && bun run build.pixel && bun run build.server && bun run build.browser","build.prod":"bun run build.client.prod && bun run build.pixel.prod && bun run build.server.prod && bun run build.browser.prod","build.client":"bun run types && bun build src/index.ts --outdir ./dist --no-cache","build.client.prod":"bun run types && bun build src/index.ts --outdir ./dist --minify","build.pixel":"bun build src/pixel.ts --outdir ./dist","build.pixel.prod":"bun build src/pixel.ts --outdir ./dist --minify","build.server":"bun run types && bun build src/server/index.ts --outdir ./dist/server","build.server.prod":"bun run types && bun build src/server/index.ts --outdir ./dist/server --minify","build.browser":"bun run types && bun build src/browser/index.ts --outdir ./dist/browser","build.browser.prod":"bun run types && bun build src/browser/index.ts --outdir ./dist/browser --minify",release:"NPM_TOKEN=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 bun run build.prod && npm publish"},dependencies:{"iconv-lite":"^0.6.3"},exports:{".":{types:"./dist/types/src/index.d.ts",default:"./dist/index.js"},"./server":{types:"./dist/types/src/server/index.d.ts",default:"./dist/server/index.js"},"./browser":{types:"./dist/types/src/browser/index.d.ts",default:"./dist/browser/index.js"}},files:["dist/index.js","dist/types","dist/server","dist/browser"]};var z=()=>typeof window>"u"||typeof document>"u"||typeof IntersectionObserver>"u"||window.document===void 0||window.location===void 0||window.navigator===void 0||window.history===void 0;function U$($){let Y=new URL($).hostname,H=Y.split(".");return`.${H.length>2?H.slice(-2).join("."):Y}`}function J_($,X){return Object.fromEntries(Object.entries($).filter(([Y])=>!X.includes(Y)))}function L(){return z()?{location:{href:"",pathname:"",host:""},addEventListener:($,X,Y)=>{return()=>{}},removeEventListener:($,X,Y)=>{return()=>{}},clearInterval:()=>{},setInterval:()=>{return 0},scrollTo:()=>{},scrollBy:()=>{},setTimeout:()=>{return 0},clearTimeout:()=>{},innerHeight:0,pageYOffset:0,documentElement:{scrollHeight:0,offsetHeight:0,clientHeight:0,scrollTop:0},screen:{width:0,height:0}}:window}function Z(){return z()?{hidden:!1,location:{href:""},referrer:"",title:"",querySelector:()=>null,closest:()=>null,clearTimeout:()=>{},setTimeout:()=>{return 0},innerHeight:0,pageYOffset:0,documentElement:{scrollHeight:0,offsetHeight:0,clientHeight:0,scrollTop:0}}:document}var K_=z()?{cookie:""}:window.document;function C$($,X,Y={}){let{days:H=7,path:Q="/",domain:q,sameSite:B="strict"}=Y,V=H?new Date(Date.now()+H*86400000).toUTCString():"",J=`${encodeURIComponent($)}=${encodeURIComponent(X)}`;if(V)J+=`; expires=${V}`;if(Q)J+=`; path=${Q}`;if(q)J+=`; domain=${q}`;if(B)J+=`; samesite=${B}`;J+="; secure",K_.cookie=J}function j_($){let X=encodeURIComponent($)+"=",Y=K_.cookie.split(";");for(let H=0;H<Y.length;H++){let Q=Y[H];while(Q.charAt(0)===" ")Q=Q.substring(1,Q.length);if(Q.indexOf(X)===0)return decodeURIComponent(Q.substring(X.length,Q.length))}return null}var c$=z()?{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}:window.localStorage;class i${namespace;constructor({namespace:$}){this.namespace=$}getItem($){let X=c$.getItem(`${this.namespace}.${$}`)||"";try{return JSON.parse(X)}catch(Y){return null}}setItem($,X){c$.setItem(`${this.namespace}.${$}`,JSON.stringify(X))}removeItem($){c$.removeItem(`${this.namespace}.${$}`)}}var R$=new i$({namespace:"userpath"});var y={appId:"",apiKey:"",serverUrl:"https://api.userpath.co",version:1,flushIntervalMs:5000,autoTrack:{errors:!0,clicks:!0,scrolling:!0,forms:!0,videos:!0,pageVisibility:!0,pageInactivity:!0,performance:!0}};class n${serverUrl;appId;version;constructor($){this.serverUrl=$.serverUrl||y.serverUrl,this.appId=$.appId,this.version=$.version||y.version,C$("_up.app",this.appId,{days:365,sameSite:"lax",domain:U$(this.serverUrl)}),R$.setItem("app",this.appId)}buildUrl($){return`${this.serverUrl}/v${this.version}/${$}`}}var _={};q0(_,{void:()=>i0,util:()=>E,unknown:()=>d0,union:()=>s0,undefined:()=>u0,tuple:()=>e0,transformer:()=>V1,symbol:()=>m0,string:()=>k_,strictObject:()=>r0,setErrorMap:()=>J0,set:()=>X1,record:()=>$1,quotelessJson:()=>V0,promise:()=>B1,preprocess:()=>K1,pipeline:()=>j1,ostring:()=>L1,optional:()=>O1,onumber:()=>D1,oboolean:()=>N1,objectUtil:()=>o$,object:()=>o0,number:()=>v_,nullable:()=>J1,null:()=>l0,never:()=>c0,nativeEnum:()=>q1,nan:()=>h0,map:()=>_1,makeIssue:()=>k$,literal:()=>H1,lazy:()=>Q1,late:()=>T0,isValid:()=>o,isDirty:()=>z$,isAsync:()=>W$,isAborted:()=>b$,intersection:()=>t0,instanceof:()=>y0,getParsedType:()=>l,getErrorMap:()=>H$,function:()=>Y1,enum:()=>W1,effect:()=>V1,discriminatedUnion:()=>a0,defaultErrorMap:()=>c,datetimeRegex:()=>w_,date:()=>g0,custom:()=>F_,coerce:()=>G1,boolean:()=>E_,bigint:()=>x0,array:()=>n0,any:()=>p0,addIssueToContext:()=>j,ZodVoid:()=>E$,ZodUnknown:()=>r,ZodUnion:()=>K$,ZodUndefined:()=>O$,ZodType:()=>F,ZodTuple:()=>d,ZodTransformer:()=>u,ZodSymbol:()=>v$,ZodString:()=>h,ZodSet:()=>X$,ZodSchema:()=>F,ZodRecord:()=>P$,ZodReadonly:()=>w$,ZodPromise:()=>Y$,ZodPipeline:()=>f$,ZodParsedType:()=>K,ZodOptional:()=>g,ZodObject:()=>S,ZodNumber:()=>s,ZodNullable:()=>n,ZodNull:()=>J$,ZodNever:()=>p,ZodNativeEnum:()=>N$,ZodNaN:()=>I$,ZodMap:()=>S$,ZodLiteral:()=>D$,ZodLazy:()=>L$,ZodIssueCode:()=>O,ZodIntersection:()=>j$,ZodFunction:()=>B$,ZodFirstPartyTypeKind:()=>G,ZodError:()=>b,ZodEnum:()=>t,ZodEffects:()=>u,ZodDiscriminatedUnion:()=>T$,ZodDefault:()=>G$,ZodDate:()=>$$,ZodCatch:()=>A$,ZodBranded:()=>y$,ZodBoolean:()=>V$,ZodBigInt:()=>a,ZodArray:()=>x,ZodAny:()=>_$,Schema:()=>F,ParseStatus:()=>U,OK:()=>R,NEVER:()=>A1,INVALID:()=>N,EMPTY_PATH:()=>K0,DIRTY:()=>e,BRAND:()=>z0});var E;(function($){$.assertEqual=(Q)=>{};function X(Q){}$.assertIs=X;function Y(Q){throw Error()}$.assertNever=Y,$.arrayToEnum=(Q)=>{let q={};for(let B of Q)q[B]=B;return q},$.getValidEnumValues=(Q)=>{let q=$.objectKeys(Q).filter((V)=>typeof Q[Q[V]]!=="number"),B={};for(let V of q)B[V]=Q[V];return $.objectValues(B)},$.objectValues=(Q)=>{return $.objectKeys(Q).map(function(q){return Q[q]})},$.objectKeys=typeof Object.keys==="function"?(Q)=>Object.keys(Q):(Q)=>{let q=[];for(let B in Q)if(Object.prototype.hasOwnProperty.call(Q,B))q.push(B);return q},$.find=(Q,q)=>{for(let B of Q)if(q(B))return B;return},$.isInteger=typeof Number.isInteger==="function"?(Q)=>Number.isInteger(Q):(Q)=>typeof Q==="number"&&Number.isFinite(Q)&&Math.floor(Q)===Q;function H(Q,q=" | "){return Q.map((B)=>typeof B==="string"?`'${B}'`:B).join(q)}$.joinValues=H,$.jsonStringifyReplacer=(Q,q)=>{if(typeof q==="bigint")return q.toString();return q}})(E||(E={}));var o$;(function($){$.mergeShapes=(X,Y)=>{return{...X,...Y}}})(o$||(o$={}));var K=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),l=($)=>{switch(typeof $){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN($)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":if(Array.isArray($))return K.array;if($===null)return K.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return K.promise;if(typeof Map<"u"&&$ instanceof Map)return K.map;if(typeof Set<"u"&&$ instanceof Set)return K.set;if(typeof Date<"u"&&$ instanceof Date)return K.date;return K.object;default:return K.unknown}};var O=E.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),V0=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class b extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(Y)=>{this.issues=[...this.issues,Y]},this.addIssues=(Y=[])=>{this.issues=[...this.issues,...Y]};let X=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,X);else this.__proto__=X;this.name="ZodError",this.issues=$}format($){let X=$||function(Q){return Q.message},Y={_errors:[]},H=(Q)=>{for(let q of Q.issues)if(q.code==="invalid_union")q.unionErrors.map(H);else if(q.code==="invalid_return_type")H(q.returnTypeError);else if(q.code==="invalid_arguments")H(q.argumentsError);else if(q.path.length===0)Y._errors.push(X(q));else{let B=Y,V=0;while(V<q.path.length){let J=q.path[V];if(V!==q.path.length-1)B[J]=B[J]||{_errors:[]};else B[J]=B[J]||{_errors:[]},B[J]._errors.push(X(q));B=B[J],V++}}};return H(this),Y}static assert($){if(!($ instanceof b))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(X)=>X.message){let X={},Y=[];for(let H of this.issues)if(H.path.length>0){let Q=H.path[0];X[Q]=X[Q]||[],X[Q].push($(H))}else Y.push($(H));return{formErrors:Y,fieldErrors:X}}get formErrors(){return this.flatten()}}b.create=($)=>{return new b($)};var O0=($,X)=>{let Y;switch($.code){case O.invalid_type:if($.received===K.undefined)Y="Required";else Y=`Expected ${$.expected}, received ${$.received}`;break;case O.invalid_literal:Y=`Invalid literal value, expected ${JSON.stringify($.expected,E.jsonStringifyReplacer)}`;break;case O.unrecognized_keys:Y=`Unrecognized key(s) in object: ${E.joinValues($.keys,", ")}`;break;case O.invalid_union:Y="Invalid input";break;case O.invalid_union_discriminator:Y=`Invalid discriminator value. Expected ${E.joinValues($.options)}`;break;case O.invalid_enum_value:Y=`Invalid enum value. Expected ${E.joinValues($.options)}, received '${$.received}'`;break;case O.invalid_arguments:Y="Invalid function arguments";break;case O.invalid_return_type:Y="Invalid function return type";break;case O.invalid_date:Y="Invalid date";break;case O.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(Y=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")Y=`${Y} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)Y=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)Y=`Invalid input: must end with "${$.validation.endsWith}"`;else E.assertNever($.validation);else if($.validation!=="regex")Y=`Invalid ${$.validation}`;else Y="Invalid";break;case O.too_small:if($.type==="array")Y=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")Y=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")Y=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")Y=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")Y=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else Y="Invalid input";break;case O.too_big:if($.type==="array")Y=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")Y=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")Y=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")Y=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")Y=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else Y="Invalid input";break;case O.custom:Y="Invalid input";break;case O.invalid_intersection_types:Y="Intersection results could not be merged";break;case O.not_multiple_of:Y=`Number must be a multiple of ${$.multipleOf}`;break;case O.not_finite:Y="Number must be finite";break;default:Y=X.defaultError,E.assertNever($)}return{message:Y}},c=O0;var L_=c;function J0($){L_=$}function H$(){return L_}var k$=($)=>{let{data:X,path:Y,errorMaps:H,issueData:Q}=$,q=[...Y,...Q.path||[]],B={...Q,path:q};if(Q.message!==void 0)return{...Q,path:q,message:Q.message};let V="",J=H.filter((A)=>!!A).slice().reverse();for(let A of J)V=A(B,{data:X,defaultError:V}).message;return{...Q,path:q,message:V}},K0=[];function j($,X){let Y=H$(),H=k$({issueData:X,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,Y,Y===c?void 0:c].filter((Q)=>!!Q)});$.common.issues.push(H)}class U{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,X){let Y=[];for(let H of X){if(H.status==="aborted")return N;if(H.status==="dirty")$.dirty();Y.push(H.value)}return{status:$.value,value:Y}}static async mergeObjectAsync($,X){let Y=[];for(let H of X){let Q=await H.key,q=await H.value;Y.push({key:Q,value:q})}return U.mergeObjectSync($,Y)}static mergeObjectSync($,X){let Y={};for(let H of X){let{key:Q,value:q}=H;if(Q.status==="aborted")return N;if(q.status==="aborted")return N;if(Q.status==="dirty")$.dirty();if(q.status==="dirty")$.dirty();if(Q.value!=="__proto__"&&(typeof q.value<"u"||H.alwaysSet))Y[Q.value]=q.value}return{status:$.value,value:Y}}}var N=Object.freeze({status:"aborted"}),e=($)=>({status:"dirty",value:$}),R=($)=>({status:"valid",value:$}),b$=($)=>$.status==="aborted",z$=($)=>$.status==="dirty",o=($)=>$.status==="valid",W$=($)=>typeof Promise<"u"&&$ instanceof Promise;var D;(function($){$.errToObj=(X)=>typeof X==="string"?{message:X}:X||{},$.toString=(X)=>typeof X==="string"?X:X?.message})(D||(D={}));class m{constructor($,X,Y,H){this._cachedPath=[],this.parent=$,this.data=X,this._path=Y,this._key=H}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var D_=($,X)=>{if(o(X))return{success:!0,data:X.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let Y=new b($.common.issues);return this._error=Y,this._error}}}};function M($){if(!$)return{};let{errorMap:X,invalid_type_error:Y,required_error:H,description:Q}=$;if(X&&(Y||H))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(X)return{errorMap:X,description:Q};return{errorMap:(B,V)=>{let{message:J}=$;if(B.code==="invalid_enum_value")return{message:J??V.defaultError};if(typeof V.data>"u")return{message:J??H??V.defaultError};if(B.code!=="invalid_type")return{message:V.defaultError};return{message:J??Y??V.defaultError}},description:Q}}class F{get description(){return this._def.description}_getType($){return l($.data)}_getOrReturnCtx($,X){return X||{common:$.parent.common,data:$.data,parsedType:l($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new U,ctx:{common:$.parent.common,data:$.data,parsedType:l($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let X=this._parse($);if(W$(X))throw Error("Synchronous parse encountered promise.");return X}_parseAsync($){let X=this._parse($);return Promise.resolve(X)}parse($,X){let Y=this.safeParse($,X);if(Y.success)return Y.data;throw Y.error}safeParse($,X){let Y={common:{issues:[],async:X?.async??!1,contextualErrorMap:X?.errorMap},path:X?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:l($)},H=this._parseSync({data:$,path:Y.path,parent:Y});return D_(Y,H)}"~validate"($){let X={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:l($)};if(!this["~standard"].async)try{let Y=this._parseSync({data:$,path:[],parent:X});return o(Y)?{value:Y.value}:{issues:X.common.issues}}catch(Y){if(Y?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;X.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:X}).then((Y)=>o(Y)?{value:Y.value}:{issues:X.common.issues})}async parseAsync($,X){let Y=await this.safeParseAsync($,X);if(Y.success)return Y.data;throw Y.error}async safeParseAsync($,X){let Y={common:{issues:[],contextualErrorMap:X?.errorMap,async:!0},path:X?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:l($)},H=this._parse({data:$,path:Y.path,parent:Y}),Q=await(W$(H)?H:Promise.resolve(H));return D_(Y,Q)}refine($,X){let Y=(H)=>{if(typeof X==="string"||typeof X>"u")return{message:X};else if(typeof X==="function")return X(H);else return X};return this._refinement((H,Q)=>{let q=$(H),B=()=>Q.addIssue({code:O.custom,...Y(H)});if(typeof Promise<"u"&&q instanceof Promise)return q.then((V)=>{if(!V)return B(),!1;else return!0});if(!q)return B(),!1;else return!0})}refinement($,X){return this._refinement((Y,H)=>{if(!$(Y))return H.addIssue(typeof X==="function"?X(Y,H):X),!1;else return!0})}_refinement($){return new u({schema:this,typeName:G.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(X)=>this["~validate"](X)}}optional(){return g.create(this,this._def)}nullable(){return n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return x.create(this)}promise(){return Y$.create(this,this._def)}or($){return K$.create([this,$],this._def)}and($){return j$.create(this,$,this._def)}transform($){return new u({...M(this._def),schema:this,typeName:G.ZodEffects,effect:{type:"transform",transform:$}})}default($){let X=typeof $==="function"?$:()=>$;return new G$({...M(this._def),innerType:this,defaultValue:X,typeName:G.ZodDefault})}brand(){return new y$({typeName:G.ZodBranded,type:this,...M(this._def)})}catch($){let X=typeof $==="function"?$:()=>$;return new A$({...M(this._def),innerType:this,catchValue:X,typeName:G.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return f$.create(this,$)}readonly(){return w$.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var j0=/^c[^\s-]{8,}$/i,L0=/^[0-9a-z]+$/,D0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,N0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,G0=/^[a-z0-9_-]{21}$/i,A0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,w0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,M0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,F0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",r$,k0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,v0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,E0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,P0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,S0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,I0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,G_="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",f0=new RegExp(`^${G_}$`);function A_($){let X="[0-5]\\d";if($.precision)X=`${X}\\.\\d{${$.precision}}`;else if($.precision==null)X=`${X}(\\.\\d+)?`;let Y=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${X})${Y}`}function Z0($){return new RegExp(`^${A_($)}$`)}function w_($){let X=`${G_}T${A_($)}`,Y=[];if(Y.push($.local?"Z?":"Z"),$.offset)Y.push("([+-]\\d{2}:?\\d{2})");return X=`${X}(${Y.join("|")})`,new RegExp(`^${X}$`)}function U0($,X){if((X==="v4"||!X)&&k0.test($))return!0;if((X==="v6"||!X)&&E0.test($))return!0;return!1}function C0($,X){if(!A0.test($))return!1;try{let[Y]=$.split(".");if(!Y)return!1;let H=Y.replace(/-/g,"+").replace(/_/g,"/").padEnd(Y.length+(4-Y.length%4)%4,"="),Q=JSON.parse(atob(H));if(typeof Q!=="object"||Q===null)return!1;if("typ"in Q&&Q?.typ!=="JWT")return!1;if(!Q.alg)return!1;if(X&&Q.alg!==X)return!1;return!0}catch{return!1}}function R0($,X){if((X==="v4"||!X)&&v0.test($))return!0;if((X==="v6"||!X)&&P0.test($))return!0;return!1}class h extends F{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==K.string){let Q=this._getOrReturnCtx($);return j(Q,{code:O.invalid_type,expected:K.string,received:Q.parsedType}),N}let Y=new U,H=void 0;for(let Q of this._def.checks)if(Q.kind==="min"){if($.data.length<Q.value)H=this._getOrReturnCtx($,H),j(H,{code:O.too_small,minimum:Q.value,type:"string",inclusive:!0,exact:!1,message:Q.message}),Y.dirty()}else if(Q.kind==="max"){if($.data.length>Q.value)H=this._getOrReturnCtx($,H),j(H,{code:O.too_big,maximum:Q.value,type:"string",inclusive:!0,exact:!1,message:Q.message}),Y.dirty()}else if(Q.kind==="length"){let q=$.data.length>Q.value,B=$.data.length<Q.value;if(q||B){if(H=this._getOrReturnCtx($,H),q)j(H,{code:O.too_big,maximum:Q.value,type:"string",inclusive:!0,exact:!0,message:Q.message});else if(B)j(H,{code:O.too_small,minimum:Q.value,type:"string",inclusive:!0,exact:!0,message:Q.message});Y.dirty()}}else if(Q.kind==="email"){if(!M0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"email",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="emoji"){if(!r$)r$=new RegExp(F0,"u");if(!r$.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"emoji",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="uuid"){if(!N0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"uuid",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="nanoid"){if(!G0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"nanoid",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="cuid"){if(!j0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"cuid",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="cuid2"){if(!L0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"cuid2",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="ulid"){if(!D0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"ulid",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="url")try{new URL($.data)}catch{H=this._getOrReturnCtx($,H),j(H,{validation:"url",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="regex"){if(Q.regex.lastIndex=0,!Q.regex.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"regex",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="trim")$.data=$.data.trim();else if(Q.kind==="includes"){if(!$.data.includes(Q.value,Q.position))H=this._getOrReturnCtx($,H),j(H,{code:O.invalid_string,validation:{includes:Q.value,position:Q.position},message:Q.message}),Y.dirty()}else if(Q.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(Q.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(Q.kind==="startsWith"){if(!$.data.startsWith(Q.value))H=this._getOrReturnCtx($,H),j(H,{code:O.invalid_string,validation:{startsWith:Q.value},message:Q.message}),Y.dirty()}else if(Q.kind==="endsWith"){if(!$.data.endsWith(Q.value))H=this._getOrReturnCtx($,H),j(H,{code:O.invalid_string,validation:{endsWith:Q.value},message:Q.message}),Y.dirty()}else if(Q.kind==="datetime"){if(!w_(Q).test($.data))H=this._getOrReturnCtx($,H),j(H,{code:O.invalid_string,validation:"datetime",message:Q.message}),Y.dirty()}else if(Q.kind==="date"){if(!f0.test($.data))H=this._getOrReturnCtx($,H),j(H,{code:O.invalid_string,validation:"date",message:Q.message}),Y.dirty()}else if(Q.kind==="time"){if(!Z0(Q).test($.data))H=this._getOrReturnCtx($,H),j(H,{code:O.invalid_string,validation:"time",message:Q.message}),Y.dirty()}else if(Q.kind==="duration"){if(!w0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"duration",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="ip"){if(!U0($.data,Q.version))H=this._getOrReturnCtx($,H),j(H,{validation:"ip",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="jwt"){if(!C0($.data,Q.alg))H=this._getOrReturnCtx($,H),j(H,{validation:"jwt",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="cidr"){if(!R0($.data,Q.version))H=this._getOrReturnCtx($,H),j(H,{validation:"cidr",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="base64"){if(!S0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"base64",code:O.invalid_string,message:Q.message}),Y.dirty()}else if(Q.kind==="base64url"){if(!I0.test($.data))H=this._getOrReturnCtx($,H),j(H,{validation:"base64url",code:O.invalid_string,message:Q.message}),Y.dirty()}else E.assertNever(Q);return{status:Y.value,value:$.data}}_regex($,X,Y){return this.refinement((H)=>$.test(H),{validation:X,code:O.invalid_string,...D.errToObj(Y)})}_addCheck($){return new h({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...D.errToObj($)})}url($){return this._addCheck({kind:"url",...D.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...D.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...D.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...D.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...D.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...D.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...D.errToObj($)})}base64($){return this._addCheck({kind:"base64",...D.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...D.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...D.errToObj($)})}ip($){return this._addCheck({kind:"ip",...D.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...D.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...D.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...D.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...D.errToObj($)})}regex($,X){return this._addCheck({kind:"regex",regex:$,...D.errToObj(X)})}includes($,X){return this._addCheck({kind:"includes",value:$,position:X?.position,...D.errToObj(X?.message)})}startsWith($,X){return this._addCheck({kind:"startsWith",value:$,...D.errToObj(X)})}endsWith($,X){return this._addCheck({kind:"endsWith",value:$,...D.errToObj(X)})}min($,X){return this._addCheck({kind:"min",value:$,...D.errToObj(X)})}max($,X){return this._addCheck({kind:"max",value:$,...D.errToObj(X)})}length($,X){return this._addCheck({kind:"length",value:$,...D.errToObj(X)})}nonempty($){return this.min(1,D.errToObj($))}trim(){return new h({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new h({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new h({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let X of this._def.checks)if(X.kind==="min"){if($===null||X.value>$)$=X.value}return $}get maxLength(){let $=null;for(let X of this._def.checks)if(X.kind==="max"){if($===null||X.value<$)$=X.value}return $}}h.create=($)=>{return new h({checks:[],typeName:G.ZodString,coerce:$?.coerce??!1,...M($)})};function b0($,X){let Y=($.toString().split(".")[1]||"").length,H=(X.toString().split(".")[1]||"").length,Q=Y>H?Y:H,q=Number.parseInt($.toFixed(Q).replace(".","")),B=Number.parseInt(X.toFixed(Q).replace(".",""));return q%B/10**Q}class s extends F{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==K.number){let Q=this._getOrReturnCtx($);return j(Q,{code:O.invalid_type,expected:K.number,received:Q.parsedType}),N}let Y=void 0,H=new U;for(let Q of this._def.checks)if(Q.kind==="int"){if(!E.isInteger($.data))Y=this._getOrReturnCtx($,Y),j(Y,{code:O.invalid_type,expected:"integer",received:"float",message:Q.message}),H.dirty()}else if(Q.kind==="min"){if(Q.inclusive?$.data<Q.value:$.data<=Q.value)Y=this._getOrReturnCtx($,Y),j(Y,{code:O.too_small,minimum:Q.value,type:"number",inclusive:Q.inclusive,exact:!1,message:Q.message}),H.dirty()}else if(Q.kind==="max"){if(Q.inclusive?$.data>Q.value:$.data>=Q.value)Y=this._getOrReturnCtx($,Y),j(Y,{code:O.too_big,maximum:Q.value,type:"number",inclusive:Q.inclusive,exact:!1,message:Q.message}),H.dirty()}else if(Q.kind==="multipleOf"){if(b0($.data,Q.value)!==0)Y=this._getOrReturnCtx($,Y),j(Y,{code:O.not_multiple_of,multipleOf:Q.value,message:Q.message}),H.dirty()}else if(Q.kind==="finite"){if(!Number.isFinite($.data))Y=this._getOrReturnCtx($,Y),j(Y,{code:O.not_finite,message:Q.message}),H.dirty()}else E.assertNever(Q);return{status:H.value,value:$.data}}gte($,X){return this.setLimit("min",$,!0,D.toString(X))}gt($,X){return this.setLimit("min",$,!1,D.toString(X))}lte($,X){return this.setLimit("max",$,!0,D.toString(X))}lt($,X){return this.setLimit("max",$,!1,D.toString(X))}setLimit($,X,Y,H){return new s({...this._def,checks:[...this._def.checks,{kind:$,value:X,inclusive:Y,message:D.toString(H)}]})}_addCheck($){return new s({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:D.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:D.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:D.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:D.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:D.toString($)})}multipleOf($,X){return this._addCheck({kind:"multipleOf",value:$,message:D.toString(X)})}finite($){return this._addCheck({kind:"finite",message:D.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:D.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:D.toString($)})}get minValue(){let $=null;for(let X of this._def.checks)if(X.kind==="min"){if($===null||X.value>$)$=X.value}return $}get maxValue(){let $=null;for(let X of this._def.checks)if(X.kind==="max"){if($===null||X.value<$)$=X.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&E.isInteger($.value))}get isFinite(){let $=null,X=null;for(let Y of this._def.checks)if(Y.kind==="finite"||Y.kind==="int"||Y.kind==="multipleOf")return!0;else if(Y.kind==="min"){if(X===null||Y.value>X)X=Y.value}else if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return Number.isFinite(X)&&Number.isFinite($)}}s.create=($)=>{return new s({checks:[],typeName:G.ZodNumber,coerce:$?.coerce||!1,...M($)})};class a extends F{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==K.bigint)return this._getInvalidInput($);let Y=void 0,H=new U;for(let Q of this._def.checks)if(Q.kind==="min"){if(Q.inclusive?$.data<Q.value:$.data<=Q.value)Y=this._getOrReturnCtx($,Y),j(Y,{code:O.too_small,type:"bigint",minimum:Q.value,inclusive:Q.inclusive,message:Q.message}),H.dirty()}else if(Q.kind==="max"){if(Q.inclusive?$.data>Q.value:$.data>=Q.value)Y=this._getOrReturnCtx($,Y),j(Y,{code:O.too_big,type:"bigint",maximum:Q.value,inclusive:Q.inclusive,message:Q.message}),H.dirty()}else if(Q.kind==="multipleOf"){if($.data%Q.value!==BigInt(0))Y=this._getOrReturnCtx($,Y),j(Y,{code:O.not_multiple_of,multipleOf:Q.value,message:Q.message}),H.dirty()}else E.assertNever(Q);return{status:H.value,value:$.data}}_getInvalidInput($){let X=this._getOrReturnCtx($);return j(X,{code:O.invalid_type,expected:K.bigint,received:X.parsedType}),N}gte($,X){return this.setLimit("min",$,!0,D.toString(X))}gt($,X){return this.setLimit("min",$,!1,D.toString(X))}lte($,X){return this.setLimit("max",$,!0,D.toString(X))}lt($,X){return this.setLimit("max",$,!1,D.toString(X))}setLimit($,X,Y,H){return new a({...this._def,checks:[...this._def.checks,{kind:$,value:X,inclusive:Y,message:D.toString(H)}]})}_addCheck($){return new a({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:D.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:D.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:D.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:D.toString($)})}multipleOf($,X){return this._addCheck({kind:"multipleOf",value:$,message:D.toString(X)})}get minValue(){let $=null;for(let X of this._def.checks)if(X.kind==="min"){if($===null||X.value>$)$=X.value}return $}get maxValue(){let $=null;for(let X of this._def.checks)if(X.kind==="max"){if($===null||X.value<$)$=X.value}return $}}a.create=($)=>{return new a({checks:[],typeName:G.ZodBigInt,coerce:$?.coerce??!1,...M($)})};class V$ extends F{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==K.boolean){let Y=this._getOrReturnCtx($);return j(Y,{code:O.invalid_type,expected:K.boolean,received:Y.parsedType}),N}return R($.data)}}V$.create=($)=>{return new V$({typeName:G.ZodBoolean,coerce:$?.coerce||!1,...M($)})};class $$ extends F{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==K.date){let Q=this._getOrReturnCtx($);return j(Q,{code:O.invalid_type,expected:K.date,received:Q.parsedType}),N}if(Number.isNaN($.data.getTime())){let Q=this._getOrReturnCtx($);return j(Q,{code:O.invalid_date}),N}let Y=new U,H=void 0;for(let Q of this._def.checks)if(Q.kind==="min"){if($.data.getTime()<Q.value)H=this._getOrReturnCtx($,H),j(H,{code:O.too_small,message:Q.message,inclusive:!0,exact:!1,minimum:Q.value,type:"date"}),Y.dirty()}else if(Q.kind==="max"){if($.data.getTime()>Q.value)H=this._getOrReturnCtx($,H),j(H,{code:O.too_big,message:Q.message,inclusive:!0,exact:!1,maximum:Q.value,type:"date"}),Y.dirty()}else E.assertNever(Q);return{status:Y.value,value:new Date($.data.getTime())}}_addCheck($){return new $$({...this._def,checks:[...this._def.checks,$]})}min($,X){return this._addCheck({kind:"min",value:$.getTime(),message:D.toString(X)})}max($,X){return this._addCheck({kind:"max",value:$.getTime(),message:D.toString(X)})}get minDate(){let $=null;for(let X of this._def.checks)if(X.kind==="min"){if($===null||X.value>$)$=X.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let X of this._def.checks)if(X.kind==="max"){if($===null||X.value<$)$=X.value}return $!=null?new Date($):null}}$$.create=($)=>{return new $$({checks:[],coerce:$?.coerce||!1,typeName:G.ZodDate,...M($)})};class v$ extends F{_parse($){if(this._getType($)!==K.symbol){let Y=this._getOrReturnCtx($);return j(Y,{code:O.invalid_type,expected:K.symbol,received:Y.parsedType}),N}return R($.data)}}v$.create=($)=>{return new v$({typeName:G.ZodSymbol,...M($)})};class O$ extends F{_parse($){if(this._getType($)!==K.undefined){let Y=this._getOrReturnCtx($);return j(Y,{code:O.invalid_type,expected:K.undefined,received:Y.parsedType}),N}return R($.data)}}O$.create=($)=>{return new O$({typeName:G.ZodUndefined,...M($)})};class J$ extends F{_parse($){if(this._getType($)!==K.null){let Y=this._getOrReturnCtx($);return j(Y,{code:O.invalid_type,expected:K.null,received:Y.parsedType}),N}return R($.data)}}J$.create=($)=>{return new J$({typeName:G.ZodNull,...M($)})};class _$ extends F{constructor(){super(...arguments);this._any=!0}_parse($){return R($.data)}}_$.create=($)=>{return new _$({typeName:G.ZodAny,...M($)})};class r extends F{constructor(){super(...arguments);this._unknown=!0}_parse($){return R($.data)}}r.create=($)=>{return new r({typeName:G.ZodUnknown,...M($)})};class p extends F{_parse($){let X=this._getOrReturnCtx($);return j(X,{code:O.invalid_type,expected:K.never,received:X.parsedType}),N}}p.create=($)=>{return new p({typeName:G.ZodNever,...M($)})};class E$ extends F{_parse($){if(this._getType($)!==K.undefined){let Y=this._getOrReturnCtx($);return j(Y,{code:O.invalid_type,expected:K.void,received:Y.parsedType}),N}return R($.data)}}E$.create=($)=>{return new E$({typeName:G.ZodVoid,...M($)})};class x extends F{_parse($){let{ctx:X,status:Y}=this._processInputParams($),H=this._def;if(X.parsedType!==K.array)return j(X,{code:O.invalid_type,expected:K.array,received:X.parsedType}),N;if(H.exactLength!==null){let q=X.data.length>H.exactLength.value,B=X.data.length<H.exactLength.value;if(q||B)j(X,{code:q?O.too_big:O.too_small,minimum:B?H.exactLength.value:void 0,maximum:q?H.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:H.exactLength.message}),Y.dirty()}if(H.minLength!==null){if(X.data.length<H.minLength.value)j(X,{code:O.too_small,minimum:H.minLength.value,type:"array",inclusive:!0,exact:!1,message:H.minLength.message}),Y.dirty()}if(H.maxLength!==null){if(X.data.length>H.maxLength.value)j(X,{code:O.too_big,maximum:H.maxLength.value,type:"array",inclusive:!0,exact:!1,message:H.maxLength.message}),Y.dirty()}if(X.common.async)return Promise.all([...X.data].map((q,B)=>{return H.type._parseAsync(new m(X,q,X.path,B))})).then((q)=>{return U.mergeArray(Y,q)});let Q=[...X.data].map((q,B)=>{return H.type._parseSync(new m(X,q,X.path,B))});return U.mergeArray(Y,Q)}get element(){return this._def.type}min($,X){return new x({...this._def,minLength:{value:$,message:D.toString(X)}})}max($,X){return new x({...this._def,maxLength:{value:$,message:D.toString(X)}})}length($,X){return new x({...this._def,exactLength:{value:$,message:D.toString(X)}})}nonempty($){return this.min(1,$)}}x.create=($,X)=>{return new x({type:$,minLength:null,maxLength:null,exactLength:null,typeName:G.ZodArray,...M(X)})};function q$($){if($ instanceof S){let X={};for(let Y in $.shape){let H=$.shape[Y];X[Y]=g.create(q$(H))}return new S({...$._def,shape:()=>X})}else if($ instanceof x)return new x({...$._def,type:q$($.element)});else if($ instanceof g)return g.create(q$($.unwrap()));else if($ instanceof n)return n.create(q$($.unwrap()));else if($ instanceof d)return d.create($.items.map((X)=>q$(X)));else return $}class S extends F{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),X=E.objectKeys($);return this._cached={shape:$,keys:X},this._cached}_parse($){if(this._getType($)!==K.object){let J=this._getOrReturnCtx($);return j(J,{code:O.invalid_type,expected:K.object,received:J.parsedType}),N}let{status:Y,ctx:H}=this._processInputParams($),{shape:Q,keys:q}=this._getCached(),B=[];if(!(this._def.catchall instanceof p&&this._def.unknownKeys==="strip")){for(let J in H.data)if(!q.includes(J))B.push(J)}let V=[];for(let J of q){let A=Q[J],I=H.data[J];V.push({key:{status:"valid",value:J},value:A._parse(new m(H,I,H.path,J)),alwaysSet:J in H.data})}if(this._def.catchall instanceof p){let J=this._def.unknownKeys;if(J==="passthrough")for(let A of B)V.push({key:{status:"valid",value:A},value:{status:"valid",value:H.data[A]}});else if(J==="strict"){if(B.length>0)j(H,{code:O.unrecognized_keys,keys:B}),Y.dirty()}else if(J==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let J=this._def.catchall;for(let A of B){let I=H.data[A];V.push({key:{status:"valid",value:A},value:J._parse(new m(H,I,H.path,A)),alwaysSet:A in H.data})}}if(H.common.async)return Promise.resolve().then(async()=>{let J=[];for(let A of V){let I=await A.key,F$=await A.value;J.push({key:I,value:F$,alwaysSet:A.alwaysSet})}return J}).then((J)=>{return U.mergeObjectSync(Y,J)});else return U.mergeObjectSync(Y,V)}get shape(){return this._def.shape()}strict($){return D.errToObj,new S({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(X,Y)=>{let H=this._def.errorMap?.(X,Y).message??Y.defaultError;if(X.code==="unrecognized_keys")return{message:D.errToObj($).message??H};return{message:H}}}:{}})}strip(){return new S({...this._def,unknownKeys:"strip"})}passthrough(){return new S({...this._def,unknownKeys:"passthrough"})}extend($){return new S({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new S({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:G.ZodObject})}setKey($,X){return this.augment({[$]:X})}catchall($){return new S({...this._def,catchall:$})}pick($){let X={};for(let Y of E.objectKeys($))if($[Y]&&this.shape[Y])X[Y]=this.shape[Y];return new S({...this._def,shape:()=>X})}omit($){let X={};for(let Y of E.objectKeys(this.shape))if(!$[Y])X[Y]=this.shape[Y];return new S({...this._def,shape:()=>X})}deepPartial(){return q$(this)}partial($){let X={};for(let Y of E.objectKeys(this.shape)){let H=this.shape[Y];if($&&!$[Y])X[Y]=H;else X[Y]=H.optional()}return new S({...this._def,shape:()=>X})}required($){let X={};for(let Y of E.objectKeys(this.shape))if($&&!$[Y])X[Y]=this.shape[Y];else{let Q=this.shape[Y];while(Q instanceof g)Q=Q._def.innerType;X[Y]=Q}return new S({...this._def,shape:()=>X})}keyof(){return M_(E.objectKeys(this.shape))}}S.create=($,X)=>{return new S({shape:()=>$,unknownKeys:"strip",catchall:p.create(),typeName:G.ZodObject,...M(X)})};S.strictCreate=($,X)=>{return new S({shape:()=>$,unknownKeys:"strict",catchall:p.create(),typeName:G.ZodObject,...M(X)})};S.lazycreate=($,X)=>{return new S({shape:$,unknownKeys:"strip",catchall:p.create(),typeName:G.ZodObject,...M(X)})};class K$ extends F{_parse($){let{ctx:X}=this._processInputParams($),Y=this._def.options;function H(Q){for(let B of Q)if(B.result.status==="valid")return B.result;for(let B of Q)if(B.result.status==="dirty")return X.common.issues.push(...B.ctx.common.issues),B.result;let q=Q.map((B)=>new b(B.ctx.common.issues));return j(X,{code:O.invalid_union,unionErrors:q}),N}if(X.common.async)return Promise.all(Y.map(async(Q)=>{let q={...X,common:{...X.common,issues:[]},parent:null};return{result:await Q._parseAsync({data:X.data,path:X.path,parent:q}),ctx:q}})).then(H);else{let Q=void 0,q=[];for(let V of Y){let J={...X,common:{...X.common,issues:[]},parent:null},A=V._parseSync({data:X.data,path:X.path,parent:J});if(A.status==="valid")return A;else if(A.status==="dirty"&&!Q)Q={result:A,ctx:J};if(J.common.issues.length)q.push(J.common.issues)}if(Q)return X.common.issues.push(...Q.ctx.common.issues),Q.result;let B=q.map((V)=>new b(V));return j(X,{code:O.invalid_union,unionErrors:B}),N}}get options(){return this._def.options}}K$.create=($,X)=>{return new K$({options:$,typeName:G.ZodUnion,...M(X)})};var i=($)=>{if($ instanceof L$)return i($.schema);else if($ instanceof u)return i($.innerType());else if($ instanceof D$)return[$.value];else if($ instanceof t)return $.options;else if($ instanceof N$)return E.objectValues($.enum);else if($ instanceof G$)return i($._def.innerType);else if($ instanceof O$)return[void 0];else if($ instanceof J$)return[null];else if($ instanceof g)return[void 0,...i($.unwrap())];else if($ instanceof n)return[null,...i($.unwrap())];else if($ instanceof y$)return i($.unwrap());else if($ instanceof w$)return i($.unwrap());else if($ instanceof A$)return i($._def.innerType);else return[]};class T$ extends F{_parse($){let{ctx:X}=this._processInputParams($);if(X.parsedType!==K.object)return j(X,{code:O.invalid_type,expected:K.object,received:X.parsedType}),N;let Y=this.discriminator,H=X.data[Y],Q=this.optionsMap.get(H);if(!Q)return j(X,{code:O.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Y]}),N;if(X.common.async)return Q._parseAsync({data:X.data,path:X.path,parent:X});else return Q._parseSync({data:X.data,path:X.path,parent:X})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,X,Y){let H=new Map;for(let Q of X){let q=i(Q.shape[$]);if(!q.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let B of q){if(H.has(B))throw Error(`Discriminator property ${String($)} has duplicate value ${String(B)}`);H.set(B,Q)}}return new T$({typeName:G.ZodDiscriminatedUnion,discriminator:$,options:X,optionsMap:H,...M(Y)})}}function s$($,X){let Y=l($),H=l(X);if($===X)return{valid:!0,data:$};else if(Y===K.object&&H===K.object){let Q=E.objectKeys(X),q=E.objectKeys($).filter((V)=>Q.indexOf(V)!==-1),B={...$,...X};for(let V of q){let J=s$($[V],X[V]);if(!J.valid)return{valid:!1};B[V]=J.data}return{valid:!0,data:B}}else if(Y===K.array&&H===K.array){if($.length!==X.length)return{valid:!1};let Q=[];for(let q=0;q<$.length;q++){let B=$[q],V=X[q],J=s$(B,V);if(!J.valid)return{valid:!1};Q.push(J.data)}return{valid:!0,data:Q}}else if(Y===K.date&&H===K.date&&+$===+X)return{valid:!0,data:$};else return{valid:!1}}class j$ extends F{_parse($){let{status:X,ctx:Y}=this._processInputParams($),H=(Q,q)=>{if(b$(Q)||b$(q))return N;let B=s$(Q.value,q.value);if(!B.valid)return j(Y,{code:O.invalid_intersection_types}),N;if(z$(Q)||z$(q))X.dirty();return{status:X.value,value:B.data}};if(Y.common.async)return Promise.all([this._def.left._parseAsync({data:Y.data,path:Y.path,parent:Y}),this._def.right._parseAsync({data:Y.data,path:Y.path,parent:Y})]).then(([Q,q])=>H(Q,q));else return H(this._def.left._parseSync({data:Y.data,path:Y.path,parent:Y}),this._def.right._parseSync({data:Y.data,path:Y.path,parent:Y}))}}j$.create=($,X,Y)=>{return new j$({left:$,right:X,typeName:G.ZodIntersection,...M(Y)})};class d extends F{_parse($){let{status:X,ctx:Y}=this._processInputParams($);if(Y.parsedType!==K.array)return j(Y,{code:O.invalid_type,expected:K.array,received:Y.parsedType}),N;if(Y.data.length<this._def.items.length)return j(Y,{code:O.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N;if(!this._def.rest&&Y.data.length>this._def.items.length)j(Y,{code:O.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),X.dirty();let Q=[...Y.data].map((q,B)=>{let V=this._def.items[B]||this._def.rest;if(!V)return null;return V._parse(new m(Y,q,Y.path,B))}).filter((q)=>!!q);if(Y.common.async)return Promise.all(Q).then((q)=>{return U.mergeArray(X,q)});else return U.mergeArray(X,Q)}get items(){return this._def.items}rest($){return new d({...this._def,rest:$})}}d.create=($,X)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new d({items:$,typeName:G.ZodTuple,rest:null,...M(X)})};class P$ extends F{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:X,ctx:Y}=this._processInputParams($);if(Y.parsedType!==K.object)return j(Y,{code:O.invalid_type,expected:K.object,received:Y.parsedType}),N;let H=[],Q=this._def.keyType,q=this._def.valueType;for(let B in Y.data)H.push({key:Q._parse(new m(Y,B,Y.path,B)),value:q._parse(new m(Y,Y.data[B],Y.path,B)),alwaysSet:B in Y.data});if(Y.common.async)return U.mergeObjectAsync(X,H);else return U.mergeObjectSync(X,H)}get element(){return this._def.valueType}static create($,X,Y){if(X instanceof F)return new P$({keyType:$,valueType:X,typeName:G.ZodRecord,...M(Y)});return new P$({keyType:h.create(),valueType:$,typeName:G.ZodRecord,...M(X)})}}class S$ extends F{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:X,ctx:Y}=this._processInputParams($);if(Y.parsedType!==K.map)return j(Y,{code:O.invalid_type,expected:K.map,received:Y.parsedType}),N;let H=this._def.keyType,Q=this._def.valueType,q=[...Y.data.entries()].map(([B,V],J)=>{return{key:H._parse(new m(Y,B,Y.path,[J,"key"])),value:Q._parse(new m(Y,V,Y.path,[J,"value"]))}});if(Y.common.async){let B=new Map;return Promise.resolve().then(async()=>{for(let V of q){let J=await V.key,A=await V.value;if(J.status==="aborted"||A.status==="aborted")return N;if(J.status==="dirty"||A.status==="dirty")X.dirty();B.set(J.value,A.value)}return{status:X.value,value:B}})}else{let B=new Map;for(let V of q){let{key:J,value:A}=V;if(J.status==="aborted"||A.status==="aborted")return N;if(J.status==="dirty"||A.status==="dirty")X.dirty();B.set(J.value,A.value)}return{status:X.value,value:B}}}}S$.create=($,X,Y)=>{return new S$({valueType:X,keyType:$,typeName:G.ZodMap,...M(Y)})};class X$ extends F{_parse($){let{status:X,ctx:Y}=this._processInputParams($);if(Y.parsedType!==K.set)return j(Y,{code:O.invalid_type,expected:K.set,received:Y.parsedType}),N;let H=this._def;if(H.minSize!==null){if(Y.data.size<H.minSize.value)j(Y,{code:O.too_small,minimum:H.minSize.value,type:"set",inclusive:!0,exact:!1,message:H.minSize.message}),X.dirty()}if(H.maxSize!==null){if(Y.data.size>H.maxSize.value)j(Y,{code:O.too_big,maximum:H.maxSize.value,type:"set",inclusive:!0,exact:!1,message:H.maxSize.message}),X.dirty()}let Q=this._def.valueType;function q(V){let J=new Set;for(let A of V){if(A.status==="aborted")return N;if(A.status==="dirty")X.dirty();J.add(A.value)}return{status:X.value,value:J}}let B=[...Y.data.values()].map((V,J)=>Q._parse(new m(Y,V,Y.path,J)));if(Y.common.async)return Promise.all(B).then((V)=>q(V));else return q(B)}min($,X){return new X$({...this._def,minSize:{value:$,message:D.toString(X)}})}max($,X){return new X$({...this._def,maxSize:{value:$,message:D.toString(X)}})}size($,X){return this.min($,X).max($,X)}nonempty($){return this.min(1,$)}}X$.create=($,X)=>{return new X$({valueType:$,minSize:null,maxSize:null,typeName:G.ZodSet,...M(X)})};class B$ extends F{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:X}=this._processInputParams($);if(X.parsedType!==K.function)return j(X,{code:O.invalid_type,expected:K.function,received:X.parsedType}),N;function Y(B,V){return k$({data:B,path:X.path,errorMaps:[X.common.contextualErrorMap,X.schemaErrorMap,H$(),c].filter((J)=>!!J),issueData:{code:O.invalid_arguments,argumentsError:V}})}function H(B,V){return k$({data:B,path:X.path,errorMaps:[X.common.contextualErrorMap,X.schemaErrorMap,H$(),c].filter((J)=>!!J),issueData:{code:O.invalid_return_type,returnTypeError:V}})}let Q={errorMap:X.common.contextualErrorMap},q=X.data;if(this._def.returns instanceof Y$){let B=this;return R(async function(...V){let J=new b([]),A=await B._def.args.parseAsync(V,Q).catch((d$)=>{throw J.addIssue(Y(V,d$)),J}),I=await Reflect.apply(q,this,A);return await B._def.returns._def.type.parseAsync(I,Q).catch((d$)=>{throw J.addIssue(H(I,d$)),J})})}else{let B=this;return R(function(...V){let J=B._def.args.safeParse(V,Q);if(!J.success)throw new b([Y(V,J.error)]);let A=Reflect.apply(q,this,J.data),I=B._def.returns.safeParse(A,Q);if(!I.success)throw new b([H(A,I.error)]);return I.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new B$({...this._def,args:d.create($).rest(r.create())})}returns($){return new B$({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,X,Y){return new B$({args:$?$:d.create([]).rest(r.create()),returns:X||r.create(),typeName:G.ZodFunction,...M(Y)})}}class L$ extends F{get schema(){return this._def.getter()}_parse($){let{ctx:X}=this._processInputParams($);return this._def.getter()._parse({data:X.data,path:X.path,parent:X})}}L$.create=($,X)=>{return new L$({getter:$,typeName:G.ZodLazy,...M(X)})};class D$ extends F{_parse($){if($.data!==this._def.value){let X=this._getOrReturnCtx($);return j(X,{received:X.data,code:O.invalid_literal,expected:this._def.value}),N}return{status:"valid",value:$.data}}get value(){return this._def.value}}D$.create=($,X)=>{return new D$({value:$,typeName:G.ZodLiteral,...M(X)})};function M_($,X){return new t({values:$,typeName:G.ZodEnum,...M(X)})}class t extends F{_parse($){if(typeof $.data!=="string"){let X=this._getOrReturnCtx($),Y=this._def.values;return j(X,{expected:E.joinValues(Y),received:X.parsedType,code:O.invalid_type}),N}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let X=this._getOrReturnCtx($),Y=this._def.values;return j(X,{received:X.data,code:O.invalid_enum_value,options:Y}),N}return R($.data)}get options(){return this._def.values}get enum(){let $={};for(let X of this._def.values)$[X]=X;return $}get Values(){let $={};for(let X of this._def.values)$[X]=X;return $}get Enum(){let $={};for(let X of this._def.values)$[X]=X;return $}extract($,X=this._def){return t.create($,{...this._def,...X})}exclude($,X=this._def){return t.create(this.options.filter((Y)=>!$.includes(Y)),{...this._def,...X})}}t.create=M_;class N$ extends F{_parse($){let X=E.getValidEnumValues(this._def.values),Y=this._getOrReturnCtx($);if(Y.parsedType!==K.string&&Y.parsedType!==K.number){let H=E.objectValues(X);return j(Y,{expected:E.joinValues(H),received:Y.parsedType,code:O.invalid_type}),N}if(!this._cache)this._cache=new Set(E.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let H=E.objectValues(X);return j(Y,{received:Y.data,code:O.invalid_enum_value,options:H}),N}return R($.data)}get enum(){return this._def.values}}N$.create=($,X)=>{return new N$({values:$,typeName:G.ZodNativeEnum,...M(X)})};class Y$ extends F{unwrap(){return this._def.type}_parse($){let{ctx:X}=this._processInputParams($);if(X.parsedType!==K.promise&&X.common.async===!1)return j(X,{code:O.invalid_type,expected:K.promise,received:X.parsedType}),N;let Y=X.parsedType===K.promise?X.data:Promise.resolve(X.data);return R(Y.then((H)=>{return this._def.type.parseAsync(H,{path:X.path,errorMap:X.common.contextualErrorMap})}))}}Y$.create=($,X)=>{return new Y$({type:$,typeName:G.ZodPromise,...M(X)})};class u extends F{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===G.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:X,ctx:Y}=this._processInputParams($),H=this._def.effect||null,Q={addIssue:(q)=>{if(j(Y,q),q.fatal)X.abort();else X.dirty()},get path(){return Y.path}};if(Q.addIssue=Q.addIssue.bind(Q),H.type==="preprocess"){let q=H.transform(Y.data,Q);if(Y.common.async)return Promise.resolve(q).then(async(B)=>{if(X.value==="aborted")return N;let V=await this._def.schema._parseAsync({data:B,path:Y.path,parent:Y});if(V.status==="aborted")return N;if(V.status==="dirty")return e(V.value);if(X.value==="dirty")return e(V.value);return V});else{if(X.value==="aborted")return N;let B=this._def.schema._parseSync({data:q,path:Y.path,parent:Y});if(B.status==="aborted")return N;if(B.status==="dirty")return e(B.value);if(X.value==="dirty")return e(B.value);return B}}if(H.type==="refinement"){let q=(B)=>{let V=H.refinement(B,Q);if(Y.common.async)return Promise.resolve(V);if(V instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return B};if(Y.common.async===!1){let B=this._def.schema._parseSync({data:Y.data,path:Y.path,parent:Y});if(B.status==="aborted")return N;if(B.status==="dirty")X.dirty();return q(B.value),{status:X.value,value:B.value}}else return this._def.schema._parseAsync({data:Y.data,path:Y.path,parent:Y}).then((B)=>{if(B.status==="aborted")return N;if(B.status==="dirty")X.dirty();return q(B.value).then(()=>{return{status:X.value,value:B.value}})})}if(H.type==="transform")if(Y.common.async===!1){let q=this._def.schema._parseSync({data:Y.data,path:Y.path,parent:Y});if(!o(q))return N;let B=H.transform(q.value,Q);if(B instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:X.value,value:B}}else return this._def.schema._parseAsync({data:Y.data,path:Y.path,parent:Y}).then((q)=>{if(!o(q))return N;return Promise.resolve(H.transform(q.value,Q)).then((B)=>({status:X.value,value:B}))});E.assertNever(H)}}u.create=($,X,Y)=>{return new u({schema:$,typeName:G.ZodEffects,effect:X,...M(Y)})};u.createWithPreprocess=($,X,Y)=>{return new u({schema:X,effect:{type:"preprocess",transform:$},typeName:G.ZodEffects,...M(Y)})};class g extends F{_parse($){if(this._getType($)===K.undefined)return R(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}g.create=($,X)=>{return new g({innerType:$,typeName:G.ZodOptional,...M(X)})};class n extends F{_parse($){if(this._getType($)===K.null)return R(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}n.create=($,X)=>{return new n({innerType:$,typeName:G.ZodNullable,...M(X)})};class G$ extends F{_parse($){let{ctx:X}=this._processInputParams($),Y=X.data;if(X.parsedType===K.undefined)Y=this._def.defaultValue();return this._def.innerType._parse({data:Y,path:X.path,parent:X})}removeDefault(){return this._def.innerType}}G$.create=($,X)=>{return new G$({innerType:$,typeName:G.ZodDefault,defaultValue:typeof X.default==="function"?X.default:()=>X.default,...M(X)})};class A$ extends F{_parse($){let{ctx:X}=this._processInputParams($),Y={...X,common:{...X.common,issues:[]}},H=this._def.innerType._parse({data:Y.data,path:Y.path,parent:{...Y}});if(W$(H))return H.then((Q)=>{return{status:"valid",value:Q.status==="valid"?Q.value:this._def.catchValue({get error(){return new b(Y.common.issues)},input:Y.data})}});else return{status:"valid",value:H.status==="valid"?H.value:this._def.catchValue({get error(){return new b(Y.common.issues)},input:Y.data})}}removeCatch(){return this._def.innerType}}A$.create=($,X)=>{return new A$({innerType:$,typeName:G.ZodCatch,catchValue:typeof X.catch==="function"?X.catch:()=>X.catch,...M(X)})};class I$ extends F{_parse($){if(this._getType($)!==K.nan){let Y=this._getOrReturnCtx($);return j(Y,{code:O.invalid_type,expected:K.nan,received:Y.parsedType}),N}return{status:"valid",value:$.data}}}I$.create=($)=>{return new I$({typeName:G.ZodNaN,...M($)})};var z0=Symbol("zod_brand");class y$ extends F{_parse($){let{ctx:X}=this._processInputParams($),Y=X.data;return this._def.type._parse({data:Y,path:X.path,parent:X})}unwrap(){return this._def.type}}class f$ extends F{_parse($){let{status:X,ctx:Y}=this._processInputParams($);if(Y.common.async)return(async()=>{let Q=await this._def.in._parseAsync({data:Y.data,path:Y.path,parent:Y});if(Q.status==="aborted")return N;if(Q.status==="dirty")return X.dirty(),e(Q.value);else return this._def.out._parseAsync({data:Q.value,path:Y.path,parent:Y})})();else{let H=this._def.in._parseSync({data:Y.data,path:Y.path,parent:Y});if(H.status==="aborted")return N;if(H.status==="dirty")return X.dirty(),{status:"dirty",value:H.value};else return this._def.out._parseSync({data:H.value,path:Y.path,parent:Y})}}static create($,X){return new f$({in:$,out:X,typeName:G.ZodPipeline})}}class w$ extends F{_parse($){let X=this._def.innerType._parse($),Y=(H)=>{if(o(H))H.value=Object.freeze(H.value);return H};return W$(X)?X.then((H)=>Y(H)):Y(X)}unwrap(){return this._def.innerType}}w$.create=($,X)=>{return new w$({innerType:$,typeName:G.ZodReadonly,...M(X)})};function N_($,X){let Y=typeof $==="function"?$(X):typeof $==="string"?{message:$}:$;return typeof Y==="string"?{message:Y}:Y}function F_($,X={},Y){if($)return _$.create().superRefine((H,Q)=>{let q=$(H);if(q instanceof Promise)return q.then((B)=>{if(!B){let V=N_(X,H),J=V.fatal??Y??!0;Q.addIssue({code:"custom",...V,fatal:J})}});if(!q){let B=N_(X,H),V=B.fatal??Y??!0;Q.addIssue({code:"custom",...B,fatal:V})}return});return _$.create()}var T0={object:S.lazycreate},G;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(G||(G={}));var y0=($,X={message:`Input not instance of ${$.name}`})=>F_((Y)=>Y instanceof $,X),k_=h.create,v_=s.create,h0=I$.create,x0=a.create,E_=V$.create,g0=$$.create,m0=v$.create,u0=O$.create,l0=J$.create,p0=_$.create,d0=r.create,c0=p.create,i0=E$.create,n0=x.create,o0=S.create,r0=S.strictCreate,s0=K$.create,a0=T$.create,t0=j$.create,e0=d.create,$1=P$.create,_1=S$.create,X1=X$.create,Y1=B$.create,Q1=L$.create,H1=D$.create,W1=t.create,q1=N$.create,B1=Y$.create,V1=u.create,O1=g.create,J1=n.create,K1=u.createWithPreprocess,j1=f$.create,L1=()=>k_().optional(),D1=()=>v_().optional(),N1=()=>E_().optional(),G1={string:($)=>h.create({...$,coerce:!0}),number:($)=>s.create({...$,coerce:!0}),boolean:($)=>V$.create({...$,coerce:!0}),bigint:($)=>a.create({...$,coerce:!0}),date:($)=>$$.create({...$,coerce:!0})};var A1=N;var v=_;var w1=["page_view","page_visibility","page_exit","page_load","core_web_vitals","form_submit","input_fill","input_select","input_radio","input_checkbox","input_range","click","scroll","video_play","video_pause","video_complete","user_active","user_inactive","purchase","error"],M1=_.enum(w1),h$=_.string().or(M1),F1=["api","ga","stripe"],k1=_.enum(F1),P_=_.object({event_id:_.string().uuid().optional(),event_name:h$,org_id:_.string(),app_id:_.string(),session_id:_.string().uuid(),user_id:_.string().optional(),server_key:_.string().optional().nullable(),data_source:k1.default("api"),properties:_.record(_.string(),_.any()),url:_.string().optional(),referrer:_.string().optional(),title:_.string().optional(),price:_.number().optional(),amount:_.number().optional(),currency:_.string().optional(),user_agent:_.string(),device_type:_.string(),browser:_.string(),os:_.string(),screen_width:_.number().int().optional(),screen_height:_.number().int().optional(),language:_.string().optional(),timestamp:_.string(),city:_.string().optional(),continent:_.string().optional(),country:_.string().optional(),latitude:_.number().optional(),longitude:_.number().optional(),postal_code:_.string().optional(),region:_.string().optional(),region_code:_.string().optional(),timezone:_.string().optional(),ip:_.string().optional(),error_message:_.string().optional(),error_details:_.string().optional(),error_source:_.string().optional(),error_filename:_.string().optional(),error_lineno:_.number().int().optional(),error_colno:_.number().int().optional()}),v1=_.object({name:h$,amount:_.number().optional(),currency:_.string().optional(),price:_.number().optional(),properties:_.record(_.any()).optional(),url:_.string().optional(),referrer:_.string().optional(),title:_.string().optional(),stack:_.string().optional(),source:_.string().optional(),lineno:_.number().int().optional(),colno:_.number().int().optional(),filename:_.string().optional(),message:_.string().optional(),additional:_.record(_.any()).optional(),context:_.record(_.any()).optional(),timestamp:_.string(),userAgent:_.string().optional()}),S_=_.object({userAgent:_.string(),screenWidth:_.number().int().optional(),screenHeight:_.number().int().optional(),language:_.string().optional(),timezone:_.string().optional(),events:_.array(v1),location:_.object({city:_.string().optional(),continent:_.string().optional(),country:_.string().optional(),latitude:_.union([_.number(),_.string()]).optional(),longitude:_.union([_.number(),_.string()]).optional(),postalCode:_.string().optional(),region:_.string().optional(),regionCode:_.string().optional(),timezone:_.string().optional(),ip:_.string().optional()}).nullable().optional()});var a$=_.object({_id:_.string(),orgId:_.string(),userId:_.string(),role:_.enum(["owner","admin","member","viewer"]),createdAt:_.date()}),x$=_.array(a$);var t$=_.object({_id:_.string(),name:_.string(),slug:_.string(),onboarded:_.record(_.string(),_.boolean()),createdAt:_.date(),blockedIPs:_.array(_.string()).optional()}),hX=_.object({ip:_.string().min(1,"IP address is required")}),g$=_.array(t$);var e$=_.object({id:_.string(),name:_.string(),email:_.string().email(),image:_.string().url(),emailVerified:_.boolean(),createdAt:_.date(),updatedAt:_.date(),role:_.enum(["user","admin"]).default("user"),city:_.string().optional(),country:_.string().optional(),regionCode:_.string().optional(),zip:_.string().optional(),userAgent:_.string().optional(),ip:_.string().optional(),fbClickId:_.string().optional(),fbBrowserId:_.string().optional(),gClickId:_.string().optional(),stripeCustomerId:_.string().optional(),sid:_.string().optional()}),mX=_.object({createdAt:_.date(),expiresAt:_.date(),id:_.string(),ipAddress:_.string(),token:_.string(),updatedAt:_.date(),userAgent:_.string(),userId:_.string()}),I_=_.array(e$);var f_=_.object({organizations:g$,members:x$});var E1=_.object({input:_.number().positive().describe("Cost per million input tokens"),output:_.number().positive().describe("Cost per million output tokens")}),P1=_.enum(["anthropic","openai","xai"]),S1=_.enum(["basic","standard","complex"]),I1=_.object({order:_.number().int().positive().describe("Model priority order"),provider:P1,name:_.string().min(1).describe("Model name identifier"),complexity:S1,cost:E1,description:_.string().optional().describe("Model description"),tools:_.array(_.string()).optional().describe("Model tools")}),nX=_.array(I1);var f1=_.object({id:_.string(),_id:_.string(),name:_.string(),start:_.string().optional(),prefix:_.string().optional(),enabled:_.boolean().default(!0),createdAt:_.string(),updatedAt:_.string(),expiresAt:_.string().nullable(),lastRequest:_.string().nullable(),lastRefillAt:_.string().nullable(),key:_.string().optional(),userId:_.string(),metadata:_.record(_.any()),permissions:_.record(_.array(_.string())),rateLimitEnabled:_.boolean(),rateLimitMax:_.number(),rateLimitTimeWindow:_.number(),refillAmount:_.number().nullable(),refillInterval:_.number().nullable(),remaining:_.number().nullable(),requestCount:_.number()}),sX=_.object({name:_.string()}),aX=_.object({keyId:_.string(),name:_.string().optional(),enabled:_.boolean().optional()}),tX=_.object({keyId:_.string()}),eX=f1.pick({id:!0,name:!0,key:!0,start:!0,prefix:!0,enabled:!0,createdAt:!0,updatedAt:!0});var $_=_.object({_id:_.string(),name:_.string().min(1,"Name is required"),url:_.string().url("Please provide a valid URL"),orgId:_.string(),createdAt:_.date(),updatedAt:_.date(),currencyCode:_.string().length(3).optional(),conversionPrice:_.number().positive().optional(),lastImportSummary:_.string().optional()}),X8=$_.omit({_id:!0,createdAt:!0,updatedAt:!0}),Y8=_.object({orgId:_.string(),name:_.string().min(1,"Name is required"),url:_.string().url("Please provide a valid URL"),currencyCode:_.string().length(3).optional(),conversionPrice:_.number().positive().optional()}),Q8=$_.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),H8=$_.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),W8=_.object({hasActiveIntegrations:_.boolean(),hasEvents:_.boolean(),integrations:_.object({googleAnalytics:_.boolean(),stripe:_.boolean()}),totalEvents:_.number()});var Z1=_.object({provider:_.enum(["openai","anthropic","xai"]),name:_.string(),type:_.enum(["fast","smart"]),inputTokens:_.number(),outputTokens:_.number(),totalTokens:_.number(),totalDuration:_.number(),thinkingDuration:_.number(),inputCost:_.number(),outputCost:_.number(),totalCost:_.number()}),__=_.object({_id:_.string(),chatId:_.string(),orgId:_.string(),appId:_.string(),userId:_.string(),content:_.string(),role:_.enum(["user","assistant"]),model:Z1.optional(),replyToMessageId:_.string().optional(),createdAt:_.date(),updatedAt:_.date()}),V8=__.omit({_id:!0,orgId:!0,appId:!0,userId:!0,createdAt:!0,updatedAt:!0}).extend({modelName:_.string().optional(),segmentId:_.string().optional()}),O8=__.pick({content:!0,role:!0,chatId:!0,orgId:!0,appId:!0,userId:!0,model:!0,replyToMessageId:!0}),J8=__.extend({type:_.enum(["text","image","error"])});var L8=_.object({_id:_.string(),orgId:_.string(),appId:_.string(),chatId:_.string(),userId:_.string(),messageId:_.string(),vote:_.enum(["up","down"]),reason:_.string().optional(),createdAt:_.date(),updatedAt:_.date()});var U1=_.object({name:_.string(),type:_.string(),defaultType:_.string().optional(),defaultExpression:_.string().optional(),comment:_.string().optional()}),C1=_.object({name:_.string(),database:_.string(),engine:_.string(),columns:_.array(U1)}),G8=_.array(C1);var M8=v.object({activeUsers:v.number(),pageViews:v.number(),revenue:v.number(),sessions:v.number(),totalEvents:v.number()}),F8=v.object({revenue:v.number().default(0),pageViews:v.number().default(0),totalEvents:v.number().default(0),activeUsers:v.number().default(0),conversions:v.number().optional(),conversionRate:v.number().optional(),sessions:v.number().optional(),eventsImported:v.number().optional(),avgSessionDuration:v.number().optional(),bounceRate:v.number().optional(),newUsers:v.number().optional(),returningUsers:v.number().optional(),topTrafficSource:v.string().optional(),avgOrderValue:v.number().optional(),topConvertingPage:v.string().optional()}),k8=v.object({period:v.enum(["today","last_7_days","last_30_days","last_3_months"]).default("last_30_days"),timezone:v.string().default("UTC")}),v8=v.object({appId:v.string(),name:v.string(),domain:v.string(),visitors:v.number(),pageviews:v.number(),revenue:v.number(),conversionRate:v.number(),bounceRate:v.number(),visitorData:v.array(v.object({visitors:v.number()}))});var R1=_.object({integrationId:_.string(),orgId:_.string(),appId:_.string(),displayName:_.string(),jobType:_.literal("coordinator"),totalPages:_.number().optional(),pageSize:_.number().default(1000),dateRange:_.object({startDate:_.string(),endDate:_.string()}).optional()}),b1=_.object({integrationId:_.string(),orgId:_.string(),appId:_.string(),displayName:_.string(),jobType:_.literal("ingestion"),page:_.number(),pageSize:_.number(),totalPages:_.number(),coordinatorJobId:_.string(),dateRange:_.object({startDate:_.string(),endDate:_.string()}),offset:_.number(),limit:_.number()}),z1=_.object({propertyId:_.string(),displayName:_.string(),name:_.string(),parent:_.string(),websiteUrl:_.string().optional(),timeZone:_.string().optional(),createTime:_.string().optional(),updateTime:_.string().optional()}),T1=_.object({accountId:_.string(),displayName:_.string(),name:_.string(),createTime:_.string().optional(),updateTime:_.string().optional(),regionCode:_.string().optional()}),U_=_.object({_id:_.string(),appId:_.string(),orgId:_.string(),propertyId:_.string(),accountId:_.string(),displayName:_.string(),timeZone:_.string().optional().default("America/New_York"),importPurchaseEvents:_.boolean().default(!1),conversionPrice:_.number().positive().optional(),conversionCurrency:_.string().length(3).optional(),useSmartPurchaseDetection:_.boolean().optional(),isActive:_.boolean().default(!0),lastImportStartDate:_.string().optional(),lastImportEndDate:_.string().optional(),isImporting:_.boolean().default(!1),createdAt:_.date(),updatedAt:_.date()}),S8=_.object({appName:_.string().min(1,"App name is required"),appUrl:_.string().min(1,"App URL is required"),propertyId:_.string().min(1,"Property ID is required"),accountId:_.string().min(1,"Account ID is required"),displayName:_.string().min(1,"Display name is required"),timeZone:_.string().min(1,"Time zone is required").optional(),importPurchaseEvents:_.boolean().default(!1),conversionPrice:_.number().positive().optional(),conversionCurrency:_.string().length(3).optional(),useSmartPurchaseDetection:_.boolean().optional()}),I8=U_.omit({_id:!0,createdAt:!0,updatedAt:!0}).partial({lastImportStartDate:!0,lastImportEndDate:!0,isImporting:!0}),f8=U_.omit({_id:!0,appId:!0,orgId:!0,createdAt:!0,updatedAt:!0}).partial(),y1=z1.extend({account:T1}),Z8=_.object({properties:_.array(y1),accountId:_.string()}),U8=_.object({sessionId:_.string(),userId:_.string(),orgId:_.string(),propertyId:_.string(),appId:_.string().optional(),status:_.enum(["pending","in_progress","completed","failed"]),error:_.string().optional(),summary:_.object({activeUsers:_.number(),pageViews:_.number(),sessions:_.number(),eventsImported:_.number(),revenue:_.number(),conversions:_.number(),avgSessionDuration:_.number(),bounceRate:_.number(),newUsers:_.number(),returningUsers:_.number(),topTrafficSource:_.string(),conversionRate:_.number(),avgOrderValue:_.number(),topConvertingPage:_.string()}).optional(),createdAt:_.date(),updatedAt:_.date()}),h1=_.enum(["coordinator","ingestion"]),C_=_.enum(["waiting","active","completed","failed","delayed","paused"]),C8=_.discriminatedUnion("jobType",[R1,b1]),x1=_.object({jobId:_.string(),integrationId:_.string(),jobType:h1,status:C_,progress:_.object({current:_.number(),total:_.number(),percentage:_.number()}),data:_.object({eventsImported:_.number(),page:_.number().optional(),totalPages:_.number().optional(),coordinatorJobId:_.string().optional(),startTime:_.date().optional(),endTime:_.date().optional(),error:_.string().optional()}),createdAt:_.date(),updatedAt:_.date()}),R8=_.object({integrationId:_.string(),status:_.enum(["not_started","in_progress","completed","failed","partial"]),progress:_.object({totalJobs:_.number(),completedJobs:_.number(),failedJobs:_.number(),pendingJobs:_.number(),percentage:_.number()}),coordinator:_.object({jobId:_.string(),status:C_,progress:_.object({current:_.number(),total:_.number(),percentage:_.number()}),phase:_.enum(["creating_jobs","monitoring_ingestion","completed","waiting","active","failed","delayed","paused"]),createdAt:_.date(),updatedAt:_.date()}).nullable(),summary:_.object({totalEventsImported:_.number(),startTime:_.date().optional(),estimatedEndTime:_.date().optional(),lastUpdated:_.date()}),jobs:_.array(x1)}),b8=_.object({gaEventName:_.string(),userpathEventName:_.string(),description:_.string(),requiresEcommerce:_.boolean().default(!1),propertyMappings:_.record(_.string()).optional()}),z8=_.object({activeUsers:_.number(),pageViews:_.number(),sessions:_.number(),bounceRate:_.number(),usersByCountry:_.array(_.object({country:_.string(),users:_.number()})),topPages:_.array(_.object({page:_.string(),views:_.number()})),trafficSources:_.array(_.object({source:_.string(),users:_.number()})),deviceTypes:_.array(_.object({device:_.string(),users:_.number()})),dailyMetrics:_.array(_.object({date:_.string(),users:_.number(),sessions:_.number()})),conversions:_.array(_.object({event:_.string(),count:_.number()}))});var u1;((Z_)=>{let $;((g1)=>{let Y;((I)=>{I.MATCH_TYPE_UNSPECIFIED="MATCH_TYPE_UNSPECIFIED";I.EXACT="EXACT";I.BEGINS_WITH="BEGINS_WITH";I.ENDS_WITH="ENDS_WITH";I.CONTAINS="CONTAINS";I.FULL_REGEXP="FULL_REGEXP";I.PARTIAL_REGEXP="PARTIAL_REGEXP"})(Y=g1.MatchType||={})})($=Z_.StringFilter||={});let X;((m1)=>{let Y;((A)=>{A.OPERATION_UNSPECIFIED="OPERATION_UNSPECIFIED";A.EQUAL="EQUAL";A.LESS_THAN="LESS_THAN";A.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL";A.GREATER_THAN="GREATER_THAN";A.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL"})(Y=m1.Operation||={})})(X=Z_.NumericFilter||={})})(u1||={});var d1;((p1)=>{let $;((l1)=>{let X;((B)=>{B.ORDER_TYPE_UNSPECIFIED="ORDER_TYPE_UNSPECIFIED";B.ALPHANUMERIC="ALPHANUMERIC";B.CASE_INSENSITIVE_ALPHANUMERIC="CASE_INSENSITIVE_ALPHANUMERIC";B.NUMERIC="NUMERIC"})(X=l1.OrderType||={})})($=p1.DimensionOrderBy||={})})(d1||={});var i1;((c1)=>{let $;((q)=>{q.GRANULARITY_UNSPECIFIED="GRANULARITY_UNSPECIFIED";q.DAILY="DAILY";q.WEEKLY="WEEKLY";q.MONTHLY="MONTHLY"})($=c1.Granularity||={})})(i1||={});var h8=_.object({goalId:_.string(),goalName:_.string(),eventNames:_.array(_.string()),period:_.string(),metrics:_.object({totalConversions:_.number(),uniqueSessions:_.number(),uniqueUsers:_.number(),conversionRate:_.number(),totalRevenue:_.number(),averageOrderValue:_.number(),revenuePerVisitor:_.number()}),timeSeries:_.array(_.object({date:_.string(),conversions:_.number(),sessions:_.number(),conversionRate:_.number(),revenue:_.number()})),topEvents:_.array(_.object({eventName:_.string(),conversions:_.number(),conversionRate:_.number(),revenue:_.number()})),trend:_.object({change:_.number(),direction:_.enum(["up","down","stable"])})}),x8=_.object({goalId:_.string(),goalName:_.string(),period:_.string(),funnelSteps:_.array(_.object({step:_.string(),stepNumber:_.number(),sessions:_.number(),conversionRate:_.number(),dropOffRate:_.number()})),totalSessions:_.number(),totalConversions:_.number(),overallConversionRate:_.number()}),g8=_.object({goalId:_.string(),goalName:_.string(),period:_.string(),totalRevenue:_.number(),totalConversions:_.number(),averageOrderValue:_.number(),revenuePerVisitor:_.number(),revenueByEvent:_.array(_.object({eventName:_.string(),revenue:_.number(),conversions:_.number(),averageOrderValue:_.number(),percentage:_.number()})),revenueTimeSeries:_.array(_.object({date:_.string(),revenue:_.number(),conversions:_.number(),averageOrderValue:_.number()}))}),m8=_.object({period:_.string(),totalGoals:_.number(),goals:_.array(_.object({goalId:_.string(),goalName:_.string(),eventNames:_.array(_.string()),conversions:_.number(),conversionRate:_.number(),revenue:_.number(),averageOrderValue:_.number(),revenuePerVisitor:_.number(),trend:_.object({change:_.number(),direction:_.enum(["up","down","stable"])})})),aggregated:_.object({totalConversions:_.number(),totalRevenue:_.number(),avgConversionRate:_.number(),avgRevenuePerVisitor:_.number()})}),u8=_.object({period:_.string(),totalGoals:_.number(),goalsNeedingAttention:_.array(_.object({goalId:_.string(),goalName:_.string(),eventNames:_.array(_.string()),issueType:_.enum(["no_conversions","low_conversion_rate","low_activity","no_data"]),issueDescription:_.string(),metrics:_.object({conversions:_.number(),conversionRate:_.number(),sessions:_.number(),revenue:_.number()}),recommendations:_.array(_.string()),severity:_.enum(["critical","warning","info"])})),trafficAnalysis:_.object({totalSessions:_.number(),sessionsWithGoalEvents:_.number(),goalEventCoverage:_.number(),commonIssues:_.array(_.object({issue:_.string(),description:_.string(),affectedGoals:_.number(),recommendation:_.string()}))}),implementationHealth:_.object({eventTrackingStatus:_.array(_.object({eventName:_.string(),isActive:_.boolean(),lastSeen:_.string().optional(),frequency:_.number()})),dataQualityIssues:_.array(_.object({issue:_.string(),description:_.string(),severity:_.enum(["critical","warning","info"]),affectedGoals:_.array(_.string())}))})});var n1=($)=>{if(!$||$.trim()==="")throw Error("Regex pattern cannot be empty");let X=[/\(\?\#.*?\)/,/\(\?\{.*?\}\)/,/\(\?\<.*?\>.*?\)/,/\\[kKgG]/,/\(\?\<=/,/\(\?\<!/];for(let H of X)if(H.test($))throw Error("Regex pattern contains features not supported by RE2 (ClickHouse)");if($.length>500)throw Error("Regex pattern is too long (max 500 characters)");if(($.match(/[*+?{]/g)||[]).length>20)throw Error("Regex pattern has too many quantifiers (potential performance issue)");try{return new RegExp($),!0}catch(H){throw Error(`Invalid regex pattern: ${H instanceof Error?H.message:"Unknown error"}`)}},o1=($,X)=>{if(["gt","gte","lt","lte"].includes(X)){if(!$.includes(":"))throw Error(`Properties field with '${X}' operator requires 'key:value' format`);let[Y,H]=$.split(":",2);if(!Y||!H)throw Error("Property key:value format requires both key and value parts");if(isNaN(parseFloat(H)))throw Error(`Property value '${H}' must be numeric for '${X}' operator`)}if(X==="equals"&&$.includes(":")){let[Y,H]=$.split(":",2);if(!Y||H===void 0)throw Error("Property key:value format requires both key and value parts")}return!0},Q$=($)=>{return $.replace(/['"]/g,"").replace(/[;]/g,"").replace(/--/g,"").trim()},r1=_.object({key:_.string().min(1,"Property key cannot be empty"),operator:_.enum(["equals","gt","gte","lt","lte"]),value:_.string().min(1,"Property value cannot be empty")}),R_=_.object({field:_.enum(["url","properties","country","device_type","browser"]),operator:_.enum(["equals","contains","starts_with","ends_with","regex","gt","gte","lt","lte","in","not_in","multi_property"]),value:_.union([_.string().min(1,"Condition value cannot be empty").transform(Q$),_.number(),_.array(_.string().min(1,"Array items cannot be empty")).min(1,"Array cannot be empty for in/not_in operators").max(100,"Array cannot have more than 100 items (performance limit)"),_.array(r1).min(1,"Multi-property rules cannot be empty").max(10,"Cannot have more than 10 property rules (performance limit)")]),eventIndex:_.number().int().min(0,"Event index must be non-negative").optional()}).superRefine(($,X)=>{if($.operator==="regex"&&typeof $.value==="string")try{n1($.value)}catch(Y){X.addIssue({code:_.ZodIssueCode.custom,message:Y instanceof Error?Y.message:"Invalid regex pattern",path:["value"]})}if($.field==="properties"&&typeof $.value==="string"&&["gt","gte","lt","lte","equals"].includes($.operator))try{o1($.value,$.operator)}catch(Y){X.addIssue({code:_.ZodIssueCode.custom,message:Y instanceof Error?Y.message:"Invalid property format",path:["value"]})}if(["in","not_in"].includes($.operator)&&!Array.isArray($.value))X.addIssue({code:_.ZodIssueCode.custom,message:"Value for in/not_in operators must be an array",path:["value"]});if($.operator==="multi_property"&&!Array.isArray($.value))X.addIssue({code:_.ZodIssueCode.custom,message:"Value for multi_property operator must be an array of PropertyRule objects",path:["value"]})}),b_=_.object({timeWindow:_.enum(["1_hour","24_hours","7_days","30_days"]).default("24_hours"),allowRepeatedSteps:_.boolean().default(!1),maxStepInterval:_.number().int("Max step interval must be an integer").min(1,"Max step interval must be at least 1 second").max(604800,"Max step interval cannot exceed 7 days (604800 seconds)").default(3600)}),s1=_.object({_id:_.string(),name:_.string().min(1,"Goal name is required").max(100,"Goal name cannot exceed 100 characters").transform(Q$),description:_.string().max(500,"Description cannot exceed 500 characters").transform(Q$).optional(),orgId:_.string().min(1,"Organization ID is required"),appId:_.string().min(1,"App ID is required"),eventNames:_.array(_.string().min(1,"Event name cannot be empty").max(50,"Event name cannot exceed 50 characters").transform(Q$)).min(1,"At least one event name is required").max(10,"Cannot have more than 10 events in a funnel (performance limit)"),createdAt:_.date(),updatedAt:_.date()}),d8=s1.extend({conditions:_.array(R_).max(20,"Cannot have more than 20 conditions (performance limit)").optional(),funnelSettings:b_.optional()}).superRefine(($,X)=>{if($.funnelSettings&&$.eventNames.length<=1)X.addIssue({code:_.ZodIssueCode.custom,message:"Funnel settings can only be applied to multi-step goals (2+ events)",path:["funnelSettings"]});if($.conditions)for(let Y=0;Y<$.conditions.length;Y++){let H=$.conditions[Y];if(H.eventIndex!==void 0&&(H.eventIndex<0||H.eventIndex>=$.eventNames.length))X.addIssue({code:_.ZodIssueCode.custom,message:`Event index ${H.eventIndex} is out of bounds. Must be between 0 and ${$.eventNames.length-1}`,path:["conditions",Y,"eventIndex"]})}}),m$=_.object({_id:_.string(),name:_.string().min(1,"Goal name is required").max(100,"Goal name cannot exceed 100 characters").transform(Q$),description:_.string().max(500,"Description cannot exceed 500 characters").transform(Q$).optional(),orgId:_.string().min(1,"Organization ID is required"),appId:_.string().min(1,"App ID is required"),eventNames:_.array(_.string().min(1,"Event name cannot be empty").max(50,"Event name cannot exceed 50 characters").transform(Q$)).min(1,"At least one event name is required").max(10,"Cannot have more than 10 events in a funnel (performance limit)"),createdAt:_.date(),updatedAt:_.date()}),X_=m$.extend({conditions:_.array(R_).max(20,"Cannot have more than 20 conditions (performance limit)").optional(),funnelSettings:b_.optional()}),c8=m$.omit({_id:!0,createdAt:!0,updatedAt:!0}),i8=X_.omit({_id:!0,createdAt:!0,updatedAt:!0}),n8=m$.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),o8=X_.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),r8=m$.omit({_id:!0,orgId:!0,appId:!0,createdAt:!0,updatedAt:!0}).partial(),s8=X_.omit({_id:!0,orgId:!0,appId:!0,createdAt:!0,updatedAt:!0}).partial();var z_=_.enum(["page_view","page_visibility","page_exit","form_submit","input_fill","input_select","input_radio","input_checkbox","input_range","click","scroll","video_play","video_pause","video_complete","user_active","user_inactive","purchase","error","identity","default"]),a1=_.object({event_name:h$,event_icon:z_.default("default"),description:_.string(),details:_.string().optional(),timestamp:_.string(),url:_.string(),referrer:_.string(),properties:_.string().optional(),timeSinceLastEvent:_.string().nullable().optional(),country:_.string().optional(),city:_.string().optional()}),t1=_.object({journeyId:_.string().uuid(),userId:_.string().uuid(),userEmail:_.string().email().optional(),userName:_.string().optional(),firstTouch:_.string(),lastTouch:_.string(),daysToConversion:_.number().int(),conversionRevenue:_.number(),isConverted:_.boolean(),referrerPath:_.string(),urlPath:_.string(),events:_.array(a1),totalDuration:_.string().optional(),lastSeen:_.string().optional()}),e1=_.object({index:_.number().int(),event_icon:z_.default("default"),description:_.string(),details:_.string().optional(),timestamp:_.string().nullable(),timeSinceLastEvent:_.string().nullable().optional(),url:_.string().optional()}),$Y=_.object({success:_.boolean(),error:_.string().optional(),journey:t1.optional(),simplifiedJourney:_.array(e1).optional()});var $6=_.object({name:_.literal("clickhouse-run-query"),arguments:_.object({query:_.string().describe("SQL query to execute")})}).describe("Execute a SQL query on ClickHouse"),_6=_.object({name:_.literal("clickhouse-list-tables"),arguments:_.object({database:_.string().optional()})}).describe("List all tables in ClickHouse"),X6=_.object({name:_.literal("clickhouse-describe-table"),arguments:_.object({table_name:_.string(),database:_.string().optional()})}).describe("Get schema information for a table"),Y6=_.object({name:_.literal("clickhouse-list-databases"),arguments:_.object({})}).describe("List all databases in ClickHouse"),Q6=_.object({name:_.literal("clickhouse-describe-database"),arguments:_.object({database_name:_.string()})}).describe("Get schema information for a database"),H6=_.object({name:_.literal("clickhouse-list-columns"),arguments:_.object({table_name:_.string(),database:_.string().optional()})}).describe("List all columns in a table"),W6=_.object({name:_.literal("plot-chart"),arguments:_.object({chartType:_.enum(["bar","line","pie","scatter","area"]).describe("Type of chart to plot"),data:_.string().describe("JSON string containing the chart data in the needed format for Recharts to render the chart."),title:_.string().optional().describe("Chart title"),xAxis:_.string().optional().describe("X-axis field name (for applicable chart types)"),yAxis:_.string().optional().describe("Y-axis field name (for applicable chart types)"),options:_.string().optional().describe("Additional chart options as JSON string")})}).describe("Generate interactive React charts using the npm library recharts 2.x"),q6=_.object({name:_.literal("get-sitemap"),arguments:_.object({appId:_.string().describe("The app ID to get the sitemap for")})}).describe("Get the sitemap and useful stats for a given app. Returned data includes: url, visitCount, lastVisitAt, title and uniqueVisitors."),B6=_.object({name:_.literal("mongodb-find"),arguments:_.object({collection:_.string().describe("Collection name to query"),filter:_.string().optional().describe("MongoDB filter as JSON string (default: {})"),options:_.string().optional().describe("MongoDB find options as JSON string"),database:_.string().optional().describe("Database name (defaults to current database)")})}).describe("Execute a find query on MongoDB"),V6=_.object({name:_.literal("mongodb-aggregate"),arguments:_.object({collection:_.string().describe("Collection name to query"),pipeline:_.string().describe("MongoDB aggregation pipeline as JSON string"),database:_.string().optional().describe("Database name (defaults to current database)")})}).describe("Execute an aggregation pipeline on MongoDB"),O6=_.object({name:_.literal("mongodb-list-collections"),arguments:_.object({database:_.string().optional().describe("Database name (defaults to current database)")})}).describe("List all collections in MongoDB database"),J6=_.object({name:_.literal("mongodb-list-databases"),arguments:_.object({})}).describe("List all databases in MongoDB"),K6=_.object({name:_.literal("mongodb-describe-collection"),arguments:_.object({collection:_.string().describe("Collection name to describe"),database:_.string().optional().describe("Database name (defaults to current database)")})}).describe("Get schema information for a MongoDB collection"),j6=_.object({name:_.literal("mongodb-count"),arguments:_.object({collection:_.string().describe("Collection name to count"),filter:_.string().optional().describe("MongoDB filter as JSON string (default: {})"),database:_.string().optional().describe("Database name (defaults to current database)")})}).describe("Count documents in a MongoDB collection"),L6=_.object({name:_.literal("mongodb-insert"),arguments:_.object({operation:_.enum(["insert","update","upsert"]).describe("Type of operation: insert, update, or upsert"),document:_.string().describe("Document to insert or update as JSON string"),filter:_.string().optional().describe("Filter for update/upsert operations as JSON string"),database:_.string().optional().describe("Database name (defaults to current database)")})}).describe("Insert or update documents in the goals collection (restricted access)"),D6=_.object({name:_.literal("mongodb-update"),arguments:_.object({operation:_.enum(["update"]),document:_.string(),filter:_.string().optional(),database:_.string().optional()})}),YY=_.discriminatedUnion("name",[$6,_6,X6,Y6,Q6,H6,W6,q6,B6,V6,O6,J6,K6,j6,L6,D6]);var N6=["LCP","FID","CLS"],G6=["good","needs-improvement","poor"];var T_=_.object({metric:_.enum(N6),value:_.number().positive().describe("Metric value in appropriate units (ms for LCP/FID, score for CLS)"),rating:_.enum(G6).describe("Performance rating based on Google Web Vitals thresholds")}),y_=_.object({page_load_time:_.number().nonnegative().describe("Total page load time (loadEventEnd - navigationStart)"),dom_content_loaded_time:_.number().nonnegative().describe("Time when DOMContentLoaded event fired"),time_to_first_byte:_.number().nonnegative().describe("Time to First Byte (TTFB) - server response time"),dom_interactive_time:_.number().nonnegative().describe("Time when DOM becomes interactive"),connect_time:_.number().nonnegative().describe("Time spent establishing connection to server"),dns_lookup_time:_.number().nonnegative().describe("Time spent in DNS resolution"),navigation_type:_.number().int().min(0).max(255).describe("Type of navigation (0=navigate, 1=reload, 2=back_forward, 255=reserved)"),redirect_count:_.number().int().nonnegative().describe("Number of redirects that occurred before reaching the page")}),WY=_.union([T_,y_]);var A6=_.object({name:_.literal("core_web_vitals"),properties:T_,timestamp:_.string().datetime()}),w6=_.object({name:_.literal("page_load"),properties:y_,timestamp:_.string().datetime()}),qY=_.union([A6,w6]);var T=_.object({direction:_.enum(["up","down","neutral"]),percentage:_.number().min(0)}),M6=_.object({metric:_.enum(["LCP","FID","CLS"]),value:_.number(),rating:_.enum(["good","needs-improvement","poor"]),date:_.string(),url:_.string().optional()}),F6=_.object({page_load_time:_.number(),dom_content_loaded_time:_.number(),time_to_first_byte:_.number(),dom_interactive_time:_.number(),connect_time:_.number(),dns_lookup_time:_.number(),navigation_type:_.number(),redirect_count:_.number(),date:_.string(),url:_.string().optional()}),k6=_.object({avgLCP:T,avgFID:T,avgCLS:T,goodLCPPercent:T,goodFIDPercent:T,goodCLSPercent:T,totalMeasurements:T}),BY=_.object({avgLCP:_.number(),avgFID:_.number(),avgCLS:_.number(),avgPageLoadTime:_.number(),avgTTFB:_.number(),goodLCPPercent:_.number(),goodFIDPercent:_.number(),goodCLSPercent:_.number(),totalMeasurements:_.number(),trends:k6,previousPeriod:_.object({avgLCP:_.number(),avgFID:_.number(),avgCLS:_.number(),avgPageLoadTime:_.number(),avgTTFB:_.number(),goodLCPPercent:_.number(),goodFIDPercent:_.number(),goodCLSPercent:_.number(),totalMeasurements:_.number()})}),v6=_.object({coreWebVitals:_.array(M6),pageLoads:_.array(F6)}),E6=_.object({url:_.string(),pageTitle:_.string().optional(),avgLCP:_.number(),avgFID:_.number(),avgCLS:_.number(),goodLCPPercent:_.number(),goodFIDPercent:_.number(),goodCLSPercent:_.number(),avgPageLoadTime:_.number(),avgTTFB:_.number(),measurements:_.number(),visitors:_.number(),trends:_.object({avgLCP:T,avgFID:T,avgCLS:T,avgPageLoadTime:T,avgTTFB:T,visitors:T})}),VY=_.object({pages:_.array(E6),totalPages:_.number()}),P6=_.object({affectedPages:_.number().optional(),avgValue:_.number().optional(),threshold:_.number().optional(),poorCount:_.number().optional(),pages:_.array(_.object({url:_.string(),value:_.number().optional(),loadTime:_.number().optional()})).optional(),errorCount:_.number().optional(),errorTypes:_.number().optional(),topErrors:_.array(_.string()).optional(),browser:_.string().optional(),issueCount:_.number().optional(),metrics:_.array(_.object({metric:_.string(),value:_.number()})).optional(),totalMeasurements:_.number().optional(),avgLoadTime:_.number().optional(),avgLCP:_.number().optional(),avgFID:_.number().optional(),avgCLS:_.number().optional()}),S6=_.object({id:_.string(),title:_.string(),description:_.string(),impact:_.enum(["high","medium","low"]),category:_.enum(["lcp","fid","cls","general"]),priority:_.number(),evidence:P6}),I6=_.object({totalMeasurements:_.number(),problemPages:_.number(),errorPatterns:_.number(),slowPages:_.number(),avgLCP:_.number(),avgFID:_.number(),avgCLS:_.number()}),OY=_.object({recommendations:_.array(S6),analysis:I6}),JY=_.object({url:_.string(),metrics:_.object({avgLCP:_.number(),avgFID:_.number(),avgCLS:_.number(),goodLCPPercent:_.number(),goodFIDPercent:_.number(),goodCLSPercent:_.number(),avgPageLoadTime:_.number(),avgTTFB:_.number(),visitors:_.number(),measurements:_.number(),totalMeasurements:_.number()}),trends:v6});var f6=_.enum(["pathname"]),Z6=_.enum(["equals","contains","startsWith","endsWith"]),Y_=_.object({field:f6,operator:Z6,value:_.union([_.string(),_.array(_.string()),_.number()])}),LY=_.object({_id:_.string(),name:_.string().min(1,"Name is required"),description:_.string().optional(),conditions:_.array(Y_),appId:_.string(),orgId:_.string(),createdAt:_.date(),updatedAt:_.date()}),DY=_.object({name:_.string().min(1,"Name is required"),description:_.string().optional(),conditions:_.array(Y_).min(1,"At least one condition is required")}),NY=_.object({name:_.string().min(1,"Name is required").optional(),description:_.string().optional(),conditions:_.array(Y_).min(1,"At least one condition is required").optional()}),GY=_.object({isValid:_.boolean(),errors:_.array(_.string())}),AY=_.object({count:_.number(),preview:_.array(_.any())});var FY=_.object({id:_.string(),object:_.literal("payment_intent"),amount:_.number(),currency:_.string(),status:_.enum(["succeeded","processing","requires_payment_method","requires_confirmation","requires_action","requires_capture","canceled"]),created:_.number(),customer:_.string().nullable(),description:_.string().nullable(),metadata:_.record(_.string()).default({}),receipt_email:_.string().nullable(),payment_method_types:_.array(_.string()),shipping:_.object({address:_.object({city:_.string().nullable(),country:_.string().nullable(),line1:_.string().nullable(),line2:_.string().nullable(),postal_code:_.string().nullable(),state:_.string().nullable()}).nullable(),name:_.string().nullable(),phone:_.string().nullable()}).nullable(),latest_charge:_.string().nullable()}),kY=_.object({id:_.string(),billing_details:_.object({address:_.object({city:_.string().nullable(),country:_.string().nullable(),line1:_.string().nullable(),line2:_.string().nullable(),postal_code:_.string().nullable(),state:_.string().nullable()}).nullable(),email:_.string().nullable(),name:_.string().nullable(),phone:_.string().nullable()}),payment_method_details:_.object({card:_.object({brand:_.string().nullable(),country:_.string().nullable(),funding:_.string().nullable(),last4:_.string().nullable()}).nullable()}).nullable()}),vY=_.object({id:_.string(),email:_.string().nullable(),name:_.string().nullable(),phone:_.string().nullable(),address:_.object({city:_.string().nullable(),country:_.string().nullable(),line1:_.string().nullable(),line2:_.string().nullable(),postal_code:_.string().nullable(),state:_.string().nullable()}).nullable(),metadata:_.record(_.string()).default({})}),EY=_.object({_id:_.string(),appId:_.string(),orgId:_.string(),stripeAccountId:_.string(),accountId:_.string(),displayName:_.string().optional(),scope:_.enum(["read_only","read_write"]).default("read_write"),isActive:_.boolean(),isImporting:_.boolean(),lastImportStartDate:_.date().optional(),lastImportEndDate:_.date().optional(),createdAt:_.date(),updatedAt:_.date()}),PY=_.object({appId:_.string(),orgId:_.string(),stripeAccountId:_.string(),accountId:_.string(),displayName:_.string().optional(),scope:_.enum(["read_only","read_write"]).default("read_write"),isActive:_.boolean().default(!0),isImporting:_.boolean().default(!1),lastImportStartDate:_.date().optional(),lastImportEndDate:_.date().optional()}),SY=_.object({displayName:_.string().optional(),isActive:_.boolean().optional(),isImporting:_.boolean().optional(),lastImportStartDate:_.date().optional(),lastImportEndDate:_.date().optional()}).partial(),IY=_.object({appName:_.string().min(1,"App name is required"),appUrl:_.string().min(1,"App URL is required"),stripeAccountId:_.string().min(1,"Stripe user ID is required"),displayName:_.string().optional(),scope:_.enum(["read_only","read_write"]).default("read_write"),livemode:_.boolean().default(!1),lookbackMonths:_.number().min(1).max(24).default(6),includeFailedPayments:_.boolean().default(!1)}),fY=_.object({code:_.string().min(1,"Authorization code is required"),state:_.string().min(1,"State parameter is required")}),ZY=_.object({device_type:_.enum(["desktop","mobile","tablet"]),browser:_.string(),os:_.string(),screen_width:_.number(),screen_height:_.number()}),UY=_.object({country:_.string(),city:_.string().optional(),region:_.string().optional(),timezone:_.string(),language:_.string()}),CY=_.object({lookback_months:_.number().default(6),include_failed_payments:_.boolean().default(!1),include_refunds:_.boolean().default(!0),batch_size:_.number().default(100),enrich_with_existing_data:_.boolean().default(!0)});var U6=_.enum(["waiting","active","completed","failed","delayed","paused"]),RY=_.object({integrationId:_.string(),orgId:_.string(),appId:_.string(),stripeAccountId:_.string(),displayName:_.string(),lookbackMonths:_.number().default(6)}),bY=_.object({jobId:_.string(),integrationId:_.string(),status:U6,progress:_.object({current:_.number(),total:_.number(),percentage:_.number()}),data:_.object({eventsImported:_.number(),paymentsProcessed:_.number().optional(),customersProcessed:_.number().optional(),revenue:_.number().optional(),startTime:_.date().optional(),endTime:_.date().optional(),error:_.string().optional()}),createdAt:_.date(),updatedAt:_.date()}),zY=_.object({integrationId:_.string(),status:_.enum(["not_started","in_progress","completed","failed"]),progress:_.object({percentage:_.number(),paymentsImported:_.number(),customersImported:_.number(),revenue:_.number()}),summary:_.object({totalEventsImported:_.number(),startTime:_.date().optional(),endTime:_.date().optional(),lastUpdated:_.date()})});var h_=["free","basic","pro","enterprise","userpath"],C6=["monthly","yearly"],R6=["active","canceled","past_due","incomplete","paused"];var b6=_.object({sites:_.number(),ai:_.number(),events:_.number(),seats:_.number()}),hY=_.object({_id:_.string(),order:_.number(),orgId:_.string().optional(),name:_.union([_.enum(h_),_.string()]),type:_.enum(["public","private"]),displayName:_.string(),description:_.string(),monthlyPrice:_.number(),monthlyPriceId:_.string(),yearlyPrice:_.number(),yearlyPriceId:_.string(),limits:b6,features:_.array(_.string()),popular:_.boolean().default(!1),archived:_.boolean().default(!1)}),z6=_.object({reason:_.string().optional(),comment:_.string().optional(),feedback:_.string().optional(),cancelledAt:_.date().optional()}).optional(),xY=_.object({id:_.string().optional(),_id:_.string().optional(),plan:_.union([_.enum(h_),_.string()]),referenceId:_.string(),stripeCustomerId:_.string().optional(),stripeSubscriptionId:_.string().optional(),interval:_.enum(C6).optional(),status:_.enum(R6),periodStart:_.date().optional(),periodEnd:_.date().optional(),cancelAtPeriodEnd:_.boolean().optional(),seats:_.number().optional(),trialStart:_.date().optional(),trialEnd:_.date().optional(),cancelDetails:z6,coupon:_.string().optional()}),gY=_.object({usage:_.object({sites:_.number(),ai:_.number(),events:_.number(),seats:_.number()}),limits:_.object({sites:_.number(),ai:_.number(),events:_.number(),seats:_.number()})});var T6=["owner","admin","member","viewer"],y6=_.enum(T6),lY=_.object({id:_.string(),name:_.string(),role:y6,email:_.string().email(),status:_.enum(["active","pending","inactive"]),image:_.string().optional()});var h6=_.object({_id:_.string().optional(),name:_.string(),email:_.string().email(),createdAt:_.union([_.date(),_.string()]).optional(),updatedAt:_.union([_.date(),_.string()]).optional()}),cY=h6.omit({_id:!0,createdAt:!0,updatedAt:!0});/*!
|
|
1
|
+
var o1=Object.defineProperty;var c1=(e)=>e;function u1(e,r){this[e]=c1.bind(null,r)}var l1=(e,r)=>{for(var n in r)o1(e,n,{get:r[n],enumerable:!0,configurable:!0,set:u1.bind(r,n)})};var dt={name:"userpath-js",version:"1.1.3",private:!1,main:"dist/index.js",types:"dist/types/sdk/src/index.d.ts",scripts:{dev:"bun build src/index.ts --outdir ./dist --watch",types:"tsc",test:"vitest run","test:watch":"vitest","test:ui":"vitest --ui","test:coverage":"vitest --coverage",build:"bun run build.client && bun run build.pixel && bun run build.server && bun run build.browser","build.prod":"bun run build.client.prod && bun run build.pixel.prod && bun run build.server.prod && bun run build.browser.prod","build.client":"bun run types && bun build src/index.ts --outdir ./dist --no-cache","build.client.prod":"bun run types && bun build src/index.ts --outdir ./dist --minify","build.pixel":"bun build src/pixel.ts --outdir ./dist","build.pixel.prod":"bun build src/pixel.ts --outdir ./dist --minify","build.server":"bun run types && bun build src/server/index.ts --outdir ./dist/server","build.server.prod":"bun run types && bun build src/server/index.ts --outdir ./dist/server --minify","build.browser":"bun run types && bun build src/browser/index.ts --outdir ./dist/browser","build.browser.prod":"bun run types && bun build src/browser/index.ts --outdir ./dist/browser --minify",release:"bun run build.prod && npm publish"},dependencies:{"iconv-lite":"^0.6.3"},exports:{".":{types:"./dist/types/src/index.d.ts",default:"./dist/index.js"},"./server":{types:"./dist/types/src/server/index.d.ts",default:"./dist/server/index.js"},"./browser":{types:"./dist/types/src/browser/index.d.ts",default:"./dist/browser/index.js"}},files:["dist/index.js","dist/types","dist/server","dist/browser"]};var R=()=>typeof window>"u"||typeof document>"u"||typeof IntersectionObserver>"u"||window.document===void 0||window.location===void 0||window.navigator===void 0||window.history===void 0;function xe(e){let n=new URL(e).hostname,s=n.split(".");return`.${s.length>2?s.slice(-2).join("."):n}`}function mt(e,r){return Object.fromEntries(Object.entries(e).filter(([n])=>!r.includes(n)))}function h(){return R()?{location:{href:"",pathname:"",host:""},addEventListener:(e,r,n)=>()=>{},removeEventListener:(e,r,n)=>()=>{},clearInterval:()=>{},setInterval:()=>0,scrollTo:()=>{},scrollBy:()=>{},setTimeout:()=>0,clearTimeout:()=>{},innerHeight:0,pageYOffset:0,documentElement:{scrollHeight:0,offsetHeight:0,clientHeight:0,scrollTop:0},screen:{width:0,height:0}}:window}function T(){return R()?{hidden:!1,location:{href:""},referrer:"",title:"",querySelector:()=>null,closest:()=>null,clearTimeout:()=>{},setTimeout:()=>0,innerHeight:0,pageYOffset:0,documentElement:{scrollHeight:0,offsetHeight:0,clientHeight:0,scrollTop:0}}:document}var ht=R()?{cookie:""}:window.document;function Ce(e,r,n={}){let{days:s=7,path:i="/",domain:o,sameSite:c="strict"}=n,u=s?new Date(Date.now()+s*86400000).toUTCString():"",p=`${encodeURIComponent(e)}=${encodeURIComponent(r)}`;if(u)p+=`; expires=${u}`;if(i)p+=`; path=${i}`;if(o)p+=`; domain=${o}`;if(c)p+=`; samesite=${c}`;p+="; secure",ht.cookie=p}function Ue(e){let r=encodeURIComponent(e)+"=",n=ht.cookie.split(";");for(let s=0;s<n.length;s++){let i=n[s];while(i.charAt(0)===" ")i=i.substring(1,i.length);if(i.indexOf(r)===0)return decodeURIComponent(i.substring(r.length,i.length))}return null}var We=R()?{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}:window.localStorage;class qe{namespace;constructor({namespace:e}){this.namespace=e}getItem(e){let r=We.getItem(`${this.namespace}.${e}`)||"";try{return JSON.parse(r)}catch(n){return null}}setItem(e,r){We.setItem(`${this.namespace}.${e}`,JSON.stringify(r))}removeItem(e){We.removeItem(`${this.namespace}.${e}`)}}var ae=new qe({namespace:"userpath"});var M={appId:"",apiKey:"",serverUrl:"https://api.userpath.co",version:1,flushIntervalMs:5000,autoTrack:{errors:!0,clicks:!0,scrolling:!0,forms:!0,videos:!0,pageVisibility:!0,pageInactivity:!0,performance:!0}};class Xe{serverUrl;appId;version;constructor(e){this.serverUrl=e.serverUrl||M.serverUrl,this.appId=e.appId,this.version=e.version||M.version,Ce("_up.app",this.appId,{days:365,sameSite:"lax",domain:xe(this.serverUrl)}),ae.setItem("app",this.appId)}buildUrl(e){return`${this.serverUrl}/v${this.version}/${e}`}}var t={};l1(t,{BRAND:()=>j1,DIRTY:()=>ee,EMPTY_PATH:()=>f1,INVALID:()=>g,NEVER:()=>Er,OK:()=>P,ParseStatus:()=>O,Schema:()=>E,ZodAny:()=>re,ZodArray:()=>H,ZodBigInt:()=>J,ZodBoolean:()=>pe,ZodBranded:()=>je,ZodCatch:()=>ve,ZodDate:()=>te,ZodDefault:()=>ye,ZodDiscriminatedUnion:()=>Me,ZodEffects:()=>F,ZodEnum:()=>Z,ZodError:()=>L,ZodFirstPartyTypeKind:()=>_,ZodFunction:()=>le,ZodIntersection:()=>fe,ZodIssueCode:()=>l,ZodLazy:()=>ge,ZodLiteral:()=>_e,ZodMap:()=>Oe,ZodNaN:()=>Ne,ZodNativeEnum:()=>be,ZodNever:()=>B,ZodNull:()=>me,ZodNullable:()=>q,ZodNumber:()=>Q,ZodObject:()=>k,ZodOptional:()=>G,ZodParsedType:()=>d,ZodPipeline:()=>Pe,ZodPromise:()=>se,ZodReadonly:()=>Ee,ZodRecord:()=>Te,ZodSchema:()=>E,ZodSet:()=>ne,ZodString:()=>j,ZodSymbol:()=>we,ZodTransformer:()=>F,ZodTuple:()=>Y,ZodType:()=>E,ZodUndefined:()=>de,ZodUnion:()=>he,ZodUnknown:()=>K,ZodVoid:()=>Ie,addIssueToContext:()=>m,any:()=>U1,array:()=>K1,bigint:()=>z1,boolean:()=>Ct,coerce:()=>vr,custom:()=>St,date:()=>F1,datetimeRegex:()=>vt,defaultErrorMap:()=>U,discriminatedUnion:()=>er,effect:()=>dr,enum:()=>ur,function:()=>ar,getErrorMap:()=>oe,getParsedType:()=>V,instanceof:()=>G1,intersection:()=>tr,isAborted:()=>Re,isAsync:()=>ce,isDirty:()=>De,isValid:()=>X,late:()=>H1,lazy:()=>or,literal:()=>cr,makeIssue:()=>ke,map:()=>sr,nan:()=>$1,nativeEnum:()=>lr,never:()=>q1,null:()=>Y1,nullable:()=>hr,number:()=>xt,object:()=>Q1,objectUtil:()=>Ke,oboolean:()=>yr,onumber:()=>br,optional:()=>mr,ostring:()=>_r,pipeline:()=>gr,preprocess:()=>fr,promise:()=>pr,quotelessJson:()=>d1,record:()=>nr,set:()=>ir,setErrorMap:()=>h1,strictObject:()=>J1,string:()=>At,symbol:()=>V1,transformer:()=>dr,tuple:()=>rr,undefined:()=>B1,union:()=>Z1,unknown:()=>W1,util:()=>x,void:()=>X1});var x;(function(e){e.assertEqual=(i)=>{};function r(i){}e.assertIs=r;function n(i){throw Error()}e.assertNever=n,e.arrayToEnum=(i)=>{let o={};for(let c of i)o[c]=c;return o},e.getValidEnumValues=(i)=>{let o=e.objectKeys(i).filter((u)=>typeof i[i[u]]!=="number"),c={};for(let u of o)c[u]=i[u];return e.objectValues(c)},e.objectValues=(i)=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys==="function"?(i)=>Object.keys(i):(i)=>{let o=[];for(let c in i)if(Object.prototype.hasOwnProperty.call(i,c))o.push(c);return o},e.find=(i,o)=>{for(let c of i)if(o(c))return c;return},e.isInteger=typeof Number.isInteger==="function"?(i)=>Number.isInteger(i):(i)=>typeof i==="number"&&Number.isFinite(i)&&Math.floor(i)===i;function s(i,o=" | "){return i.map((c)=>typeof c==="string"?`'${c}'`:c).join(o)}e.joinValues=s,e.jsonStringifyReplacer=(i,o)=>{if(typeof o==="bigint")return o.toString();return o}})(x||(x={}));var Ke;(function(e){e.mergeShapes=(r,n)=>({...r,...n})})(Ke||(Ke={}));var d=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),V=(e)=>{switch(typeof e){case"undefined":return d.undefined;case"string":return d.string;case"number":return Number.isNaN(e)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":if(Array.isArray(e))return d.array;if(e===null)return d.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return d.promise;if(typeof Map<"u"&&e instanceof Map)return d.map;if(typeof Set<"u"&&e instanceof Set)return d.set;if(typeof Date<"u"&&e instanceof Date)return d.date;return d.object;default:return d.unknown}};var l=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),d1=(e)=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class L extends Error{get errors(){return this.issues}constructor(e){super();this.issues=[],this.addIssue=(n)=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,r);else this.__proto__=r;this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},n={_errors:[]},s=(i)=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let c=n,u=0;while(u<o.path.length){let p=o.path[u];if(u!==o.path.length-1)c[p]=c[p]||{_errors:[]};else c[p]=c[p]||{_errors:[]},c[p]._errors.push(r(o));c=c[p],u++}}};return s(this),n}static assert(e){if(!(e instanceof L))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(r)=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}L.create=(e)=>new L(e);var m1=(e,r)=>{let n;switch(e.code){case l.invalid_type:if(e.received===d.undefined)n="Required";else n=`Expected ${e.expected}, received ${e.received}`;break;case l.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,x.jsonStringifyReplacer)}`;break;case l.unrecognized_keys:n=`Unrecognized key(s) in object: ${x.joinValues(e.keys,", ")}`;break;case l.invalid_union:n="Invalid input";break;case l.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${x.joinValues(e.options)}`;break;case l.invalid_enum_value:n=`Invalid enum value. Expected ${x.joinValues(e.options)}, received '${e.received}'`;break;case l.invalid_arguments:n="Invalid function arguments";break;case l.invalid_return_type:n="Invalid function return type";break;case l.invalid_date:n="Invalid date";break;case l.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==="number")n=`${n} at one or more positions greater than or equal to ${e.validation.position}`}else if("startsWith"in e.validation)n=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)n=`Invalid input: must end with "${e.validation.endsWith}"`;else x.assertNever(e.validation);else if(e.validation!=="regex")n=`Invalid ${e.validation}`;else n="Invalid";break;case l.too_small:if(e.type==="array")n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="bigint")n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="date")n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`;else n="Invalid input";break;case l.too_big:if(e.type==="array")n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else n="Invalid input";break;case l.custom:n="Invalid input";break;case l.invalid_intersection_types:n="Intersection results could not be merged";break;case l.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case l.not_finite:n="Number must be finite";break;default:n=r.defaultError,x.assertNever(e)}return{message:n}},U=m1;var ft=U;function h1(e){ft=e}function oe(){return ft}var ke=(e)=>{let{data:r,path:n,errorMaps:s,issueData:i}=e,o=[...n,...i.path||[]],c={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let u="",p=s.filter((b)=>!!b).slice().reverse();for(let b of p)u=b(c,{data:r,defaultError:u}).message;return{...i,path:o,message:u}},f1=[];function m(e,r){let n=oe(),s=ke({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===U?void 0:U].filter((i)=>!!i)});e.common.issues.push(s)}class O{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return g;if(s.status==="dirty")e.dirty();n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return O.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted")return g;if(o.status==="aborted")return g;if(i.status==="dirty")e.dirty();if(o.status==="dirty")e.dirty();if(i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet))n[i.value]=o.value}return{status:e.value,value:n}}}var g=Object.freeze({status:"aborted"}),ee=(e)=>({status:"dirty",value:e}),P=(e)=>({status:"valid",value:e}),Re=(e)=>e.status==="aborted",De=(e)=>e.status==="dirty",X=(e)=>e.status==="valid",ce=(e)=>typeof Promise<"u"&&e instanceof Promise;var f;(function(e){e.errToObj=(r)=>typeof r==="string"?{message:r}:r||{},e.toString=(r)=>typeof r==="string"?r:r?.message})(f||(f={}));class z{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var gt=(e,r)=>{if(X(r))return{success:!0,data:r.value};else{if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new L(e.common.issues);return this._error=n,this._error}}}};function v(e){if(!e)return{};let{errorMap:r,invalid_type_error:n,required_error:s,description:i}=e;if(r&&(n||s))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(r)return{errorMap:r,description:i};return{errorMap:(c,u)=>{let{message:p}=e;if(c.code==="invalid_enum_value")return{message:p??u.defaultError};if(typeof u.data>"u")return{message:p??s??u.defaultError};if(c.code!=="invalid_type")return{message:u.defaultError};return{message:p??n??u.defaultError}},description:i}}class E{get description(){return this._def.description}_getType(e){return V(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:V(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:V(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(ce(r))throw Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)},s=this._parseSync({data:e,path:n.path,parent:n});return gt(n,s)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return X(n)?{value:n.value}:{issues:r.common.issues}}catch(n){if(n?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((n)=>X(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(ce(s)?s:Promise.resolve(s));return gt(n,i)}refine(e,r){let n=(s)=>{if(typeof r==="string"||typeof r>"u")return{message:r};else if(typeof r==="function")return r(s);else return r};return this._refinement((s,i)=>{let o=e(s),c=()=>i.addIssue({code:l.custom,...n(s)});if(typeof Promise<"u"&&o instanceof Promise)return o.then((u)=>{if(!u)return c(),!1;else return!0});if(!o)return c(),!1;else return!0})}refinement(e,r){return this._refinement((n,s)=>{if(!e(n))return s.addIssue(typeof r==="function"?r(n,s):r),!1;else return!0})}_refinement(e){return new F({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(r)=>this["~validate"](r)}}optional(){return G.create(this,this._def)}nullable(){return q.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return H.create(this)}promise(){return se.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return fe.create(this,e,this._def)}transform(e){return new F({...v(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e==="function"?e:()=>e;return new ye({...v(this._def),innerType:this,defaultValue:r,typeName:_.ZodDefault})}brand(){return new je({typeName:_.ZodBranded,type:this,...v(this._def)})}catch(e){let r=typeof e==="function"?e:()=>e;return new ve({...v(this._def),innerType:this,catchValue:r,typeName:_.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return Pe.create(this,e)}readonly(){return Ee.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var g1=/^c[^\s-]{8,}$/i,_1=/^[0-9a-z]+$/,b1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,y1=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,v1=/^[a-z0-9_-]{21}$/i,E1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,S1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,A1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,x1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Qe,C1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,k1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,w1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,I1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,T1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,O1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",N1=new RegExp(`^${bt}$`);function yt(e){let r="[0-5]\\d";if(e.precision)r=`${r}\\.\\d{${e.precision}}`;else if(e.precision==null)r=`${r}(\\.\\d+)?`;let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${r})${n}`}function P1(e){return new RegExp(`^${yt(e)}$`)}function vt(e){let r=`${bt}T${yt(e)}`,n=[];if(n.push(e.local?"Z?":"Z"),e.offset)n.push("([+-]\\d{2}:?\\d{2})");return r=`${r}(${n.join("|")})`,new RegExp(`^${r}$`)}function L1(e,r){if((r==="v4"||!r)&&C1.test(e))return!0;if((r==="v6"||!r)&&w1.test(e))return!0;return!1}function R1(e,r){if(!E1.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let s=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(s));if(typeof i!=="object"||i===null)return!1;if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(r&&i.alg!==r)return!1;return!0}catch{return!1}}function D1(e,r){if((r==="v4"||!r)&&k1.test(e))return!0;if((r==="v6"||!r)&&I1.test(e))return!0;return!1}class j extends E{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==d.string){let i=this._getOrReturnCtx(e);return m(i,{code:l.invalid_type,expected:d.string,received:i.parsedType}),g}let n=new O,s=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.length<i.value)s=this._getOrReturnCtx(e,s),m(s,{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="max"){if(e.data.length>i.value)s=this._getOrReturnCtx(e,s),m(s,{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="length"){let o=e.data.length>i.value,c=e.data.length<i.value;if(o||c){if(s=this._getOrReturnCtx(e,s),o)m(s,{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});else if(c)m(s,{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});n.dirty()}}else if(i.kind==="email"){if(!A1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"email",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="emoji"){if(!Qe)Qe=new RegExp(x1,"u");if(!Qe.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"emoji",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="uuid"){if(!y1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"uuid",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="nanoid"){if(!v1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"nanoid",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="cuid"){if(!g1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"cuid",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="cuid2"){if(!_1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"cuid2",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="ulid"){if(!b1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"ulid",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),m(s,{validation:"url",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="regex"){if(i.regex.lastIndex=0,!i.regex.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"regex",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="trim")e.data=e.data.trim();else if(i.kind==="includes"){if(!e.data.includes(i.value,i.position))s=this._getOrReturnCtx(e,s),m(s,{code:l.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()}else if(i.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(i.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(i.kind==="startsWith"){if(!e.data.startsWith(i.value))s=this._getOrReturnCtx(e,s),m(s,{code:l.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()}else if(i.kind==="endsWith"){if(!e.data.endsWith(i.value))s=this._getOrReturnCtx(e,s),m(s,{code:l.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()}else if(i.kind==="datetime"){if(!vt(i).test(e.data))s=this._getOrReturnCtx(e,s),m(s,{code:l.invalid_string,validation:"datetime",message:i.message}),n.dirty()}else if(i.kind==="date"){if(!N1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{code:l.invalid_string,validation:"date",message:i.message}),n.dirty()}else if(i.kind==="time"){if(!P1(i).test(e.data))s=this._getOrReturnCtx(e,s),m(s,{code:l.invalid_string,validation:"time",message:i.message}),n.dirty()}else if(i.kind==="duration"){if(!S1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"duration",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="ip"){if(!L1(e.data,i.version))s=this._getOrReturnCtx(e,s),m(s,{validation:"ip",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="jwt"){if(!R1(e.data,i.alg))s=this._getOrReturnCtx(e,s),m(s,{validation:"jwt",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="cidr"){if(!D1(e.data,i.version))s=this._getOrReturnCtx(e,s),m(s,{validation:"cidr",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="base64"){if(!T1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"base64",code:l.invalid_string,message:i.message}),n.dirty()}else if(i.kind==="base64url"){if(!O1.test(e.data))s=this._getOrReturnCtx(e,s),m(s,{validation:"base64url",code:l.invalid_string,message:i.message}),n.dirty()}else x.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement((s)=>e.test(s),{validation:r,code:l.invalid_string,...f.errToObj(n)})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...f.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...f.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...f.errToObj(e)})}datetime(e){if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...f.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...f.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...f.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...f.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...f.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...f.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...f.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...f.errToObj(r)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new j({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find((e)=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find((e)=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)if(r.kind==="min"){if(e===null||r.value>e)e=r.value}return e}get maxLength(){let e=null;for(let r of this._def.checks)if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return e}}j.create=(e)=>new j({checks:[],typeName:_.ZodString,coerce:e?.coerce??!1,...v(e)});function M1(e,r){let n=(e.toString().split(".")[1]||"").length,s=(r.toString().split(".")[1]||"").length,i=n>s?n:s,o=Number.parseInt(e.toFixed(i).replace(".","")),c=Number.parseInt(r.toFixed(i).replace(".",""));return o%c/10**i}class Q extends E{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==d.number){let i=this._getOrReturnCtx(e);return m(i,{code:l.invalid_type,expected:d.number,received:i.parsedType}),g}let n=void 0,s=new O;for(let i of this._def.checks)if(i.kind==="int"){if(!x.isInteger(e.data))n=this._getOrReturnCtx(e,n),m(n,{code:l.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()}else if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)n=this._getOrReturnCtx(e,n),m(n,{code:l.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)n=this._getOrReturnCtx(e,n),m(n,{code:l.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()}else if(i.kind==="multipleOf"){if(M1(e.data,i.value)!==0)n=this._getOrReturnCtx(e,n),m(n,{code:l.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()}else if(i.kind==="finite"){if(!Number.isFinite(e.data))n=this._getOrReturnCtx(e,n),m(n,{code:l.not_finite,message:i.message}),s.dirty()}else x.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,f.toString(r))}gt(e,r){return this.setLimit("min",e,!1,f.toString(r))}lte(e,r){return this.setLimit("max",e,!0,f.toString(r))}lt(e,r){return this.setLimit("max",e,!1,f.toString(r))}setLimit(e,r,n,s){return new Q({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:f.toString(s)}]})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)if(r.kind==="min"){if(e===null||r.value>e)e=r.value}return e}get maxValue(){let e=null;for(let r of this._def.checks)if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks)if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;else if(n.kind==="min"){if(r===null||n.value>r)r=n.value}else if(n.kind==="max"){if(e===null||n.value<e)e=n.value}return Number.isFinite(r)&&Number.isFinite(e)}}Q.create=(e)=>new Q({checks:[],typeName:_.ZodNumber,coerce:e?.coerce||!1,...v(e)});class J extends E{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==d.bigint)return this._getInvalidInput(e);let n=void 0,s=new O;for(let i of this._def.checks)if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)n=this._getOrReturnCtx(e,n),m(n,{code:l.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)n=this._getOrReturnCtx(e,n),m(n,{code:l.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()}else if(i.kind==="multipleOf"){if(e.data%i.value!==BigInt(0))n=this._getOrReturnCtx(e,n),m(n,{code:l.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()}else x.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return m(r,{code:l.invalid_type,expected:d.bigint,received:r.parsedType}),g}gte(e,r){return this.setLimit("min",e,!0,f.toString(r))}gt(e,r){return this.setLimit("min",e,!1,f.toString(r))}lte(e,r){return this.setLimit("max",e,!0,f.toString(r))}lt(e,r){return this.setLimit("max",e,!1,f.toString(r))}setLimit(e,r,n,s){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:f.toString(s)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)if(r.kind==="min"){if(e===null||r.value>e)e=r.value}return e}get maxValue(){let e=null;for(let r of this._def.checks)if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return e}}J.create=(e)=>new J({checks:[],typeName:_.ZodBigInt,coerce:e?.coerce??!1,...v(e)});class pe extends E{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==d.boolean){let n=this._getOrReturnCtx(e);return m(n,{code:l.invalid_type,expected:d.boolean,received:n.parsedType}),g}return P(e.data)}}pe.create=(e)=>new pe({typeName:_.ZodBoolean,coerce:e?.coerce||!1,...v(e)});class te extends E{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==d.date){let i=this._getOrReturnCtx(e);return m(i,{code:l.invalid_type,expected:d.date,received:i.parsedType}),g}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return m(i,{code:l.invalid_date}),g}let n=new O,s=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.getTime()<i.value)s=this._getOrReturnCtx(e,s),m(s,{code:l.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()}else if(i.kind==="max"){if(e.data.getTime()>i.value)s=this._getOrReturnCtx(e,s),m(s,{code:l.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()}else x.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:f.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)if(r.kind==="min"){if(e===null||r.value>e)e=r.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return e!=null?new Date(e):null}}te.create=(e)=>new te({checks:[],coerce:e?.coerce||!1,typeName:_.ZodDate,...v(e)});class we extends E{_parse(e){if(this._getType(e)!==d.symbol){let n=this._getOrReturnCtx(e);return m(n,{code:l.invalid_type,expected:d.symbol,received:n.parsedType}),g}return P(e.data)}}we.create=(e)=>new we({typeName:_.ZodSymbol,...v(e)});class de extends E{_parse(e){if(this._getType(e)!==d.undefined){let n=this._getOrReturnCtx(e);return m(n,{code:l.invalid_type,expected:d.undefined,received:n.parsedType}),g}return P(e.data)}}de.create=(e)=>new de({typeName:_.ZodUndefined,...v(e)});class me extends E{_parse(e){if(this._getType(e)!==d.null){let n=this._getOrReturnCtx(e);return m(n,{code:l.invalid_type,expected:d.null,received:n.parsedType}),g}return P(e.data)}}me.create=(e)=>new me({typeName:_.ZodNull,...v(e)});class re extends E{constructor(){super(...arguments);this._any=!0}_parse(e){return P(e.data)}}re.create=(e)=>new re({typeName:_.ZodAny,...v(e)});class K extends E{constructor(){super(...arguments);this._unknown=!0}_parse(e){return P(e.data)}}K.create=(e)=>new K({typeName:_.ZodUnknown,...v(e)});class B extends E{_parse(e){let r=this._getOrReturnCtx(e);return m(r,{code:l.invalid_type,expected:d.never,received:r.parsedType}),g}}B.create=(e)=>new B({typeName:_.ZodNever,...v(e)});class Ie extends E{_parse(e){if(this._getType(e)!==d.undefined){let n=this._getOrReturnCtx(e);return m(n,{code:l.invalid_type,expected:d.void,received:n.parsedType}),g}return P(e.data)}}Ie.create=(e)=>new Ie({typeName:_.ZodVoid,...v(e)});class H extends E{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==d.array)return m(r,{code:l.invalid_type,expected:d.array,received:r.parsedType}),g;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,c=r.data.length<s.exactLength.value;if(o||c)m(r,{code:o?l.too_big:l.too_small,minimum:c?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty()}if(s.minLength!==null){if(r.data.length<s.minLength.value)m(r,{code:l.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()}if(s.maxLength!==null){if(r.data.length>s.maxLength.value)m(r,{code:l.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()}if(r.common.async)return Promise.all([...r.data].map((o,c)=>s.type._parseAsync(new z(r,o,r.path,c)))).then((o)=>O.mergeArray(n,o));let i=[...r.data].map((o,c)=>s.type._parseSync(new z(r,o,r.path,c)));return O.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new H({...this._def,minLength:{value:e,message:f.toString(r)}})}max(e,r){return new H({...this._def,maxLength:{value:e,message:f.toString(r)}})}length(e,r){return new H({...this._def,exactLength:{value:e,message:f.toString(r)}})}nonempty(e){return this.min(1,e)}}H.create=(e,r)=>new H({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...v(r)});function ue(e){if(e instanceof k){let r={};for(let n in e.shape){let s=e.shape[n];r[n]=G.create(ue(s))}return new k({...e._def,shape:()=>r})}else if(e instanceof H)return new H({...e._def,type:ue(e.element)});else if(e instanceof G)return G.create(ue(e.unwrap()));else if(e instanceof q)return q.create(ue(e.unwrap()));else if(e instanceof Y)return Y.create(e.items.map((r)=>ue(r)));else return e}class k extends E{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==d.object){let p=this._getOrReturnCtx(e);return m(p,{code:l.invalid_type,expected:d.object,received:p.parsedType}),g}let{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof B&&this._def.unknownKeys==="strip")){for(let p in s.data)if(!o.includes(p))c.push(p)}let u=[];for(let p of o){let b=i[p],w=s.data[p];u.push({key:{status:"valid",value:p},value:b._parse(new z(s,w,s.path,p)),alwaysSet:p in s.data})}if(this._def.catchall instanceof B){let p=this._def.unknownKeys;if(p==="passthrough")for(let b of c)u.push({key:{status:"valid",value:b},value:{status:"valid",value:s.data[b]}});else if(p==="strict"){if(c.length>0)m(s,{code:l.unrecognized_keys,keys:c}),n.dirty()}else if(p==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let b of c){let w=s.data[b];u.push({key:{status:"valid",value:b},value:p._parse(new z(s,w,s.path,b)),alwaysSet:b in s.data})}}if(s.common.async)return Promise.resolve().then(async()=>{let p=[];for(let b of u){let w=await b.key,Ae=await b.value;p.push({key:w,value:Ae,alwaysSet:b.alwaysSet})}return p}).then((p)=>O.mergeObjectSync(n,p));else return O.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;if(r.code==="unrecognized_keys")return{message:f.errToObj(e).message??s};return{message:s}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new k({...this._def,catchall:e})}pick(e){let r={};for(let n of x.objectKeys(e))if(e[n]&&this.shape[n])r[n]=this.shape[n];return new k({...this._def,shape:()=>r})}omit(e){let r={};for(let n of x.objectKeys(this.shape))if(!e[n])r[n]=this.shape[n];return new k({...this._def,shape:()=>r})}deepPartial(){return ue(this)}partial(e){let r={};for(let n of x.objectKeys(this.shape)){let s=this.shape[n];if(e&&!e[n])r[n]=s;else r[n]=s.optional()}return new k({...this._def,shape:()=>r})}required(e){let r={};for(let n of x.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];while(i instanceof G)i=i._def.innerType;r[n]=i}return new k({...this._def,shape:()=>r})}keyof(){return Et(x.objectKeys(this.shape))}}k.create=(e,r)=>new k({shape:()=>e,unknownKeys:"strip",catchall:B.create(),typeName:_.ZodObject,...v(r)});k.strictCreate=(e,r)=>new k({shape:()=>e,unknownKeys:"strict",catchall:B.create(),typeName:_.ZodObject,...v(r)});k.lazycreate=(e,r)=>new k({shape:e,unknownKeys:"strip",catchall:B.create(),typeName:_.ZodObject,...v(r)});class he extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;let o=i.map((c)=>new L(c.ctx.common.issues));return m(r,{code:l.invalid_union,unionErrors:o}),g}if(r.common.async)return Promise.all(n.map(async(i)=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);else{let i=void 0,o=[];for(let u of n){let p={...r,common:{...r.common,issues:[]},parent:null},b=u._parseSync({data:r.data,path:r.path,parent:p});if(b.status==="valid")return b;else if(b.status==="dirty"&&!i)i={result:b,ctx:p};if(p.common.issues.length)o.push(p.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let c=o.map((u)=>new L(u));return m(r,{code:l.invalid_union,unionErrors:c}),g}}get options(){return this._def.options}}he.create=(e,r)=>new he({options:e,typeName:_.ZodUnion,...v(r)});var W=(e)=>{if(e instanceof ge)return W(e.schema);else if(e instanceof F)return W(e.innerType());else if(e instanceof _e)return[e.value];else if(e instanceof Z)return e.options;else if(e instanceof be)return x.objectValues(e.enum);else if(e instanceof ye)return W(e._def.innerType);else if(e instanceof de)return[void 0];else if(e instanceof me)return[null];else if(e instanceof G)return[void 0,...W(e.unwrap())];else if(e instanceof q)return[null,...W(e.unwrap())];else if(e instanceof je)return W(e.unwrap());else if(e instanceof Ee)return W(e.unwrap());else if(e instanceof ve)return W(e._def.innerType);else return[]};class Me extends E{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==d.object)return m(r,{code:l.invalid_type,expected:d.object,received:r.parsedType}),g;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);if(!i)return m(r,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),g;if(r.common.async)return i._parseAsync({data:r.data,path:r.path,parent:r});else return i._parseSync({data:r.data,path:r.path,parent:r})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let i of r){let o=W(i.shape[e]);if(!o.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of o){if(s.has(c))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);s.set(c,i)}}return new Me({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...v(n)})}}function Je(e,r){let n=V(e),s=V(r);if(e===r)return{valid:!0,data:e};else if(n===d.object&&s===d.object){let i=x.objectKeys(r),o=x.objectKeys(e).filter((u)=>i.indexOf(u)!==-1),c={...e,...r};for(let u of o){let p=Je(e[u],r[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(n===d.array&&s===d.array){if(e.length!==r.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let c=e[o],u=r[o],p=Je(c,u);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else if(n===d.date&&s===d.date&&+e===+r)return{valid:!0,data:e};else return{valid:!1}}class fe extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=(i,o)=>{if(Re(i)||Re(o))return g;let c=Je(i.value,o.value);if(!c.valid)return m(n,{code:l.invalid_intersection_types}),g;if(De(i)||De(o))r.dirty();return{status:r.value,value:c.data}};if(n.common.async)return Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o));else return s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}fe.create=(e,r,n)=>new fe({left:e,right:r,typeName:_.ZodIntersection,...v(n)});class Y extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==d.array)return m(n,{code:l.invalid_type,expected:d.array,received:n.parsedType}),g;if(n.data.length<this._def.items.length)return m(n,{code:l.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;if(!this._def.rest&&n.data.length>this._def.items.length)m(n,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty();let i=[...n.data].map((o,c)=>{let u=this._def.items[c]||this._def.rest;if(!u)return null;return u._parse(new z(n,o,n.path,c))}).filter((o)=>!!o);if(n.common.async)return Promise.all(i).then((o)=>O.mergeArray(r,o));else return O.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new Y({...this._def,rest:e})}}Y.create=(e,r)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Y({items:e,typeName:_.ZodTuple,rest:null,...v(r)})};class Te extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==d.object)return m(n,{code:l.invalid_type,expected:d.object,received:n.parsedType}),g;let s=[],i=this._def.keyType,o=this._def.valueType;for(let c in n.data)s.push({key:i._parse(new z(n,c,n.path,c)),value:o._parse(new z(n,n.data[c],n.path,c)),alwaysSet:c in n.data});if(n.common.async)return O.mergeObjectAsync(r,s);else return O.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){if(r instanceof E)return new Te({keyType:e,valueType:r,typeName:_.ZodRecord,...v(n)});return new Te({keyType:j.create(),valueType:e,typeName:_.ZodRecord,...v(r)})}}class Oe extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==d.map)return m(n,{code:l.invalid_type,expected:d.map,received:n.parsedType}),g;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([c,u],p)=>({key:s._parse(new z(n,c,n.path,[p,"key"])),value:i._parse(new z(n,u,n.path,[p,"value"]))}));if(n.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let u of o){let p=await u.key,b=await u.value;if(p.status==="aborted"||b.status==="aborted")return g;if(p.status==="dirty"||b.status==="dirty")r.dirty();c.set(p.value,b.value)}return{status:r.value,value:c}})}else{let c=new Map;for(let u of o){let{key:p,value:b}=u;if(p.status==="aborted"||b.status==="aborted")return g;if(p.status==="dirty"||b.status==="dirty")r.dirty();c.set(p.value,b.value)}return{status:r.value,value:c}}}}Oe.create=(e,r,n)=>new Oe({valueType:r,keyType:e,typeName:_.ZodMap,...v(n)});class ne extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==d.set)return m(n,{code:l.invalid_type,expected:d.set,received:n.parsedType}),g;let s=this._def;if(s.minSize!==null){if(n.data.size<s.minSize.value)m(n,{code:l.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()}if(s.maxSize!==null){if(n.data.size>s.maxSize.value)m(n,{code:l.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty()}let i=this._def.valueType;function o(u){let p=new Set;for(let b of u){if(b.status==="aborted")return g;if(b.status==="dirty")r.dirty();p.add(b.value)}return{status:r.value,value:p}}let c=[...n.data.values()].map((u,p)=>i._parse(new z(n,u,n.path,p)));if(n.common.async)return Promise.all(c).then((u)=>o(u));else return o(c)}min(e,r){return new ne({...this._def,minSize:{value:e,message:f.toString(r)}})}max(e,r){return new ne({...this._def,maxSize:{value:e,message:f.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}ne.create=(e,r)=>new ne({valueType:e,minSize:null,maxSize:null,typeName:_.ZodSet,...v(r)});class le extends E{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==d.function)return m(r,{code:l.invalid_type,expected:d.function,received:r.parsedType}),g;function n(c,u){return ke({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,oe(),U].filter((p)=>!!p),issueData:{code:l.invalid_arguments,argumentsError:u}})}function s(c,u){return ke({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,oe(),U].filter((p)=>!!p),issueData:{code:l.invalid_return_type,returnTypeError:u}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof se){let c=this;return P(async function(...u){let p=new L([]),b=await c._def.args.parseAsync(u,i).catch((Ye)=>{throw p.addIssue(n(u,Ye)),p}),w=await Reflect.apply(o,this,b);return await c._def.returns._def.type.parseAsync(w,i).catch((Ye)=>{throw p.addIssue(s(w,Ye)),p})})}else{let c=this;return P(function(...u){let p=c._def.args.safeParse(u,i);if(!p.success)throw new L([n(u,p.error)]);let b=Reflect.apply(o,this,p.data),w=c._def.returns.safeParse(b,i);if(!w.success)throw new L([s(b,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new le({...this._def,args:Y.create(e).rest(K.create())})}returns(e){return new le({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new le({args:e?e:Y.create([]).rest(K.create()),returns:r||K.create(),typeName:_.ZodFunction,...v(n)})}}class ge extends E{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ge.create=(e,r)=>new ge({getter:e,typeName:_.ZodLazy,...v(r)});class _e extends E{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return m(r,{received:r.data,code:l.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}_e.create=(e,r)=>new _e({value:e,typeName:_.ZodLiteral,...v(r)});function Et(e,r){return new Z({values:e,typeName:_.ZodEnum,...v(r)})}class Z extends E{_parse(e){if(typeof e.data!=="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return m(r,{expected:x.joinValues(n),received:r.parsedType,code:l.invalid_type}),g}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return m(r,{received:r.data,code:l.invalid_enum_value,options:n}),g}return P(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Z.create(e,{...this._def,...r})}exclude(e,r=this._def){return Z.create(this.options.filter((n)=>!e.includes(n)),{...this._def,...r})}}Z.create=Et;class be extends E{_parse(e){let r=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==d.string&&n.parsedType!==d.number){let s=x.objectValues(r);return m(n,{expected:x.joinValues(s),received:n.parsedType,code:l.invalid_type}),g}if(!this._cache)this._cache=new Set(x.getValidEnumValues(this._def.values));if(!this._cache.has(e.data)){let s=x.objectValues(r);return m(n,{received:n.data,code:l.invalid_enum_value,options:s}),g}return P(e.data)}get enum(){return this._def.values}}be.create=(e,r)=>new be({values:e,typeName:_.ZodNativeEnum,...v(r)});class se extends E{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==d.promise&&r.common.async===!1)return m(r,{code:l.invalid_type,expected:d.promise,received:r.parsedType}),g;let n=r.parsedType===d.promise?r.data:Promise.resolve(r.data);return P(n.then((s)=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}se.create=(e,r)=>new se({type:e,typeName:_.ZodPromise,...v(r)});class F extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:(o)=>{if(m(n,o),o.fatal)r.abort();else r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async(c)=>{if(r.value==="aborted")return g;let u=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});if(u.status==="aborted")return g;if(u.status==="dirty")return ee(u.value);if(r.value==="dirty")return ee(u.value);return u});else{if(r.value==="aborted")return g;let c=this._def.schema._parseSync({data:o,path:n.path,parent:n});if(c.status==="aborted")return g;if(c.status==="dirty")return ee(c.value);if(r.value==="dirty")return ee(c.value);return c}}if(s.type==="refinement"){let o=(c)=>{let u=s.refinement(c,i);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(c.status==="aborted")return g;if(c.status==="dirty")r.dirty();return o(c.value),{status:r.value,value:c.value}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((c)=>{if(c.status==="aborted")return g;if(c.status==="dirty")r.dirty();return o(c.value).then(()=>({status:r.value,value:c.value}))})}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!X(o))return g;let c=s.transform(o.value,i);if(c instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((o)=>{if(!X(o))return g;return Promise.resolve(s.transform(o.value,i)).then((c)=>({status:r.value,value:c}))});x.assertNever(s)}}F.create=(e,r,n)=>new F({schema:e,typeName:_.ZodEffects,effect:r,...v(n)});F.createWithPreprocess=(e,r,n)=>new F({schema:r,effect:{type:"preprocess",transform:e},typeName:_.ZodEffects,...v(n)});class G extends E{_parse(e){if(this._getType(e)===d.undefined)return P(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}G.create=(e,r)=>new G({innerType:e,typeName:_.ZodOptional,...v(r)});class q extends E{_parse(e){if(this._getType(e)===d.null)return P(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}q.create=(e,r)=>new q({innerType:e,typeName:_.ZodNullable,...v(r)});class ye extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;if(r.parsedType===d.undefined)n=this._def.defaultValue();return this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ye.create=(e,r)=>new ye({innerType:e,typeName:_.ZodDefault,defaultValue:typeof r.default==="function"?r.default:()=>r.default,...v(r)});class ve extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});if(ce(s))return s.then((i)=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})}));else return{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ve.create=(e,r)=>new ve({innerType:e,typeName:_.ZodCatch,catchValue:typeof r.catch==="function"?r.catch:()=>r.catch,...v(r)});class Ne extends E{_parse(e){if(this._getType(e)!==d.nan){let n=this._getOrReturnCtx(e);return m(n,{code:l.invalid_type,expected:d.nan,received:n.parsedType}),g}return{status:"valid",value:e.data}}}Ne.create=(e)=>new Ne({typeName:_.ZodNaN,...v(e)});var j1=Symbol("zod_brand");class je extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Pe extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});if(i.status==="aborted")return g;if(i.status==="dirty")return r.dirty(),ee(i.value);else return this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();else{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});if(s.status==="aborted")return g;if(s.status==="dirty")return r.dirty(),{status:"dirty",value:s.value};else return this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new Pe({in:e,out:r,typeName:_.ZodPipeline})}}class Ee extends E{_parse(e){let r=this._def.innerType._parse(e),n=(s)=>{if(X(s))s.value=Object.freeze(s.value);return s};return ce(r)?r.then((s)=>n(s)):n(r)}unwrap(){return this._def.innerType}}Ee.create=(e,r)=>new Ee({innerType:e,typeName:_.ZodReadonly,...v(r)});function _t(e,r){let n=typeof e==="function"?e(r):typeof e==="string"?{message:e}:e;return typeof n==="string"?{message:n}:n}function St(e,r={},n){if(e)return re.create().superRefine((s,i)=>{let o=e(s);if(o instanceof Promise)return o.then((c)=>{if(!c){let u=_t(r,s),p=u.fatal??n??!0;i.addIssue({code:"custom",...u,fatal:p})}});if(!o){let c=_t(r,s),u=c.fatal??n??!0;i.addIssue({code:"custom",...c,fatal:u})}return});return re.create()}var H1={object:k.lazycreate},_;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(_||(_={}));var G1=(e,r={message:`Input not instance of ${e.name}`})=>St((n)=>n instanceof e,r),At=j.create,xt=Q.create,$1=Ne.create,z1=J.create,Ct=pe.create,F1=te.create,V1=we.create,B1=de.create,Y1=me.create,U1=re.create,W1=K.create,q1=B.create,X1=Ie.create,K1=H.create,Q1=k.create,J1=k.strictCreate,Z1=he.create,er=Me.create,tr=fe.create,rr=Y.create,nr=Te.create,sr=Oe.create,ir=ne.create,ar=le.create,or=ge.create,cr=_e.create,ur=Z.create,lr=be.create,pr=se.create,dr=F.create,mr=G.create,hr=q.create,fr=F.createWithPreprocess,gr=Pe.create,_r=()=>At().optional(),br=()=>xt().optional(),yr=()=>Ct().optional(),vr={string:(e)=>j.create({...e,coerce:!0}),number:(e)=>Q.create({...e,coerce:!0}),boolean:(e)=>pe.create({...e,coerce:!0}),bigint:(e)=>J.create({...e,coerce:!0}),date:(e)=>te.create({...e,coerce:!0})};var Er=g;var A=t;var Sr=["page_view","page_visibility","page_exit","page_load","core_web_vitals","form_submit","input_fill","input_select","input_radio","input_checkbox","input_range","click","scroll","video_play","video_pause","video_complete","user_active","user_inactive","purchase","error"],Ar=t.enum(Sr),He=t.string().or(Ar),xr=["api","ga","stripe"],Cr=t.enum(xr),kt=t.object({event_id:t.string().uuid().optional(),event_name:He,org_id:t.string(),app_id:t.string(),session_id:t.string().uuid(),user_id:t.string().optional(),server_key:t.string().optional().nullable(),data_source:Cr.default("api"),properties:t.record(t.string(),t.any()),url:t.string().optional(),referrer:t.string().optional(),title:t.string().optional(),price:t.number().optional(),amount:t.number().optional(),currency:t.string().optional(),user_agent:t.string(),device_type:t.string(),browser:t.string(),os:t.string(),screen_width:t.number().int().optional(),screen_height:t.number().int().optional(),language:t.string().optional(),timestamp:t.string(),city:t.string().optional(),continent:t.string().optional(),country:t.string().optional(),latitude:t.number().optional(),longitude:t.number().optional(),postal_code:t.string().optional(),region:t.string().optional(),region_code:t.string().optional(),timezone:t.string().optional(),ip:t.string().optional(),error_message:t.string().optional(),error_details:t.string().optional(),error_source:t.string().optional(),error_filename:t.string().optional(),error_lineno:t.number().int().optional(),error_colno:t.number().int().optional()}),kr=t.object({name:He,amount:t.number().optional(),currency:t.string().optional(),price:t.number().optional(),properties:t.record(t.any()).optional(),url:t.string().optional(),referrer:t.string().optional(),title:t.string().optional(),stack:t.string().optional(),source:t.string().optional(),lineno:t.number().int().optional(),colno:t.number().int().optional(),filename:t.string().optional(),message:t.string().optional(),additional:t.record(t.any()).optional(),context:t.record(t.any()).optional(),timestamp:t.string(),userAgent:t.string().optional()}),wt=t.object({userAgent:t.string(),screenWidth:t.number().int().optional(),screenHeight:t.number().int().optional(),language:t.string().optional(),timezone:t.string().optional(),events:t.array(kr),location:t.object({city:t.string().optional(),continent:t.string().optional(),country:t.string().optional(),latitude:t.union([t.number(),t.string()]).optional(),longitude:t.union([t.number(),t.string()]).optional(),postalCode:t.string().optional(),region:t.string().optional(),regionCode:t.string().optional(),timezone:t.string().optional(),ip:t.string().optional()}).nullable().optional()});var Ze=t.object({_id:t.string(),orgId:t.string(),userId:t.string(),role:t.enum(["owner","admin","member","viewer"]),createdAt:t.date()}),Ge=t.array(Ze);var et=t.object({_id:t.string(),name:t.string(),slug:t.string(),onboarded:t.record(t.string(),t.boolean()),createdAt:t.date(),blockedIPs:t.array(t.string()).optional()}),zs=t.object({ip:t.string().min(1,"IP address is required")}),$e=t.array(et);var tt=t.object({id:t.string(),name:t.string(),email:t.string().email(),image:t.string().url(),emailVerified:t.boolean(),createdAt:t.date(),updatedAt:t.date(),role:t.enum(["user","admin"]).default("user"),city:t.string().optional(),country:t.string().optional(),regionCode:t.string().optional(),zip:t.string().optional(),userAgent:t.string().optional(),ip:t.string().optional(),fbClickId:t.string().optional(),fbBrowserId:t.string().optional(),gClickId:t.string().optional(),stripeCustomerId:t.string().optional(),sid:t.string().optional()}),Bs=t.object({createdAt:t.date(),expiresAt:t.date(),id:t.string(),ipAddress:t.string(),token:t.string(),updatedAt:t.date(),userAgent:t.string(),userId:t.string()}),It=t.array(tt);var Tt=t.object({organizations:$e,members:Ge});var wr=t.object({input:t.number().positive().describe("Cost per million input tokens"),output:t.number().positive().describe("Cost per million output tokens")}),Ir=t.enum(["anthropic","openai","xai"]),Tr=t.enum(["basic","standard","complex"]),Or=t.object({order:t.number().int().positive().describe("Model priority order"),provider:Ir,name:t.string().min(1).describe("Model name identifier"),complexity:Tr,cost:wr,description:t.string().optional().describe("Model description"),tools:t.array(t.string()).optional().describe("Model tools")}),Qs=t.array(Or);var Nr=t.object({id:t.string(),_id:t.string(),name:t.string(),start:t.string().optional(),prefix:t.string().optional(),enabled:t.boolean().default(!0),createdAt:t.string(),updatedAt:t.string(),expiresAt:t.string().nullable(),lastRequest:t.string().nullable(),lastRefillAt:t.string().nullable(),key:t.string().optional(),userId:t.string(),metadata:t.record(t.any()),permissions:t.record(t.array(t.string())),rateLimitEnabled:t.boolean(),rateLimitMax:t.number(),rateLimitTimeWindow:t.number(),refillAmount:t.number().nullable(),refillInterval:t.number().nullable(),remaining:t.number().nullable(),requestCount:t.number()}),ei=t.object({name:t.string()}),ti=t.object({keyId:t.string(),name:t.string().optional(),enabled:t.boolean().optional()}),ri=t.object({keyId:t.string()}),ni=Nr.pick({id:!0,name:!0,key:!0,start:!0,prefix:!0,enabled:!0,createdAt:!0,updatedAt:!0});var rt=t.object({_id:t.string(),name:t.string().min(1,"Name is required"),url:t.string().url("Please provide a valid URL"),orgId:t.string(),createdAt:t.date(),updatedAt:t.date(),currencyCode:t.string().length(3).optional(),conversionPrice:t.number().positive().optional(),lastImportSummary:t.string().optional()}),ai=rt.omit({_id:!0,createdAt:!0,updatedAt:!0}),oi=t.object({orgId:t.string(),name:t.string().min(1,"Name is required"),url:t.string().url("Please provide a valid URL"),currencyCode:t.string().length(3).optional(),conversionPrice:t.number().positive().optional()}),ci=rt.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),ui=rt.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),li=t.object({hasActiveIntegrations:t.boolean(),hasEvents:t.boolean(),integrations:t.object({googleAnalytics:t.boolean(),stripe:t.boolean()}),totalEvents:t.number()});var Pr=t.object({provider:t.enum(["openai","anthropic","xai"]),name:t.string(),type:t.enum(["fast","smart"]),inputTokens:t.number(),outputTokens:t.number(),totalTokens:t.number(),totalDuration:t.number(),thinkingDuration:t.number(),inputCost:t.number(),outputCost:t.number(),totalCost:t.number()}),nt=t.object({_id:t.string(),chatId:t.string(),orgId:t.string(),appId:t.string(),userId:t.string(),content:t.string(),role:t.enum(["user","assistant"]),model:Pr.optional(),replyToMessageId:t.string().optional(),createdAt:t.date(),updatedAt:t.date()}),mi=nt.omit({_id:!0,orgId:!0,appId:!0,userId:!0,createdAt:!0,updatedAt:!0}).extend({modelName:t.string().optional(),segmentId:t.string().optional()}),hi=nt.pick({content:!0,role:!0,chatId:!0,orgId:!0,appId:!0,userId:!0,model:!0,replyToMessageId:!0}),fi=nt.extend({type:t.enum(["text","image","error"])});var bi=t.object({_id:t.string(),orgId:t.string(),appId:t.string(),chatId:t.string(),userId:t.string(),messageId:t.string(),vote:t.enum(["up","down"]),reason:t.string().optional(),createdAt:t.date(),updatedAt:t.date()});var Lr=t.object({name:t.string(),type:t.string(),defaultType:t.string().optional(),defaultExpression:t.string().optional(),comment:t.string().optional()}),Rr=t.object({name:t.string(),database:t.string(),engine:t.string(),columns:t.array(Lr)}),Ei=t.array(Rr);var xi=A.object({activeUsers:A.number(),pageViews:A.number(),revenue:A.number(),sessions:A.number(),totalEvents:A.number()}),Ci=A.object({revenue:A.number().default(0),pageViews:A.number().default(0),totalEvents:A.number().default(0),activeUsers:A.number().default(0),conversions:A.number().optional(),conversionRate:A.number().optional(),sessions:A.number().optional(),eventsImported:A.number().optional(),avgSessionDuration:A.number().optional(),bounceRate:A.number().optional(),newUsers:A.number().optional(),returningUsers:A.number().optional(),topTrafficSource:A.string().optional(),avgOrderValue:A.number().optional(),topConvertingPage:A.string().optional()}),ki=A.object({period:A.enum(["today","last_7_days","last_30_days","last_3_months"]).default("last_30_days"),timezone:A.string().default("UTC")}),wi=A.object({appId:A.string(),name:A.string(),domain:A.string(),visitors:A.number(),pageviews:A.number(),revenue:A.number(),conversionRate:A.number(),bounceRate:A.number(),visitorData:A.array(A.object({visitors:A.number()}))});var Dr=t.object({integrationId:t.string(),orgId:t.string(),appId:t.string(),displayName:t.string(),jobType:t.literal("coordinator"),totalPages:t.number().optional(),pageSize:t.number().default(1000),dateRange:t.object({startDate:t.string(),endDate:t.string()}).optional()}),Mr=t.object({integrationId:t.string(),orgId:t.string(),appId:t.string(),displayName:t.string(),jobType:t.literal("ingestion"),page:t.number(),pageSize:t.number(),totalPages:t.number(),coordinatorJobId:t.string(),dateRange:t.object({startDate:t.string(),endDate:t.string()}),offset:t.number(),limit:t.number()}),jr=t.object({propertyId:t.string(),displayName:t.string(),name:t.string(),parent:t.string(),websiteUrl:t.string().optional(),timeZone:t.string().optional(),createTime:t.string().optional(),updateTime:t.string().optional()}),Hr=t.object({accountId:t.string(),displayName:t.string(),name:t.string(),createTime:t.string().optional(),updateTime:t.string().optional(),regionCode:t.string().optional()}),Nt=t.object({_id:t.string(),appId:t.string(),orgId:t.string(),propertyId:t.string(),accountId:t.string(),displayName:t.string(),timeZone:t.string().optional().default("America/New_York"),importPurchaseEvents:t.boolean().default(!1),conversionPrice:t.number().positive().optional(),conversionCurrency:t.string().length(3).optional(),useSmartPurchaseDetection:t.boolean().optional(),isActive:t.boolean().default(!0),lastImportStartDate:t.string().optional(),lastImportEndDate:t.string().optional(),isImporting:t.boolean().default(!1),createdAt:t.date(),updatedAt:t.date()}),Oi=t.object({appName:t.string().min(1,"App name is required"),appUrl:t.string().min(1,"App URL is required"),propertyId:t.string().min(1,"Property ID is required"),accountId:t.string().min(1,"Account ID is required"),displayName:t.string().min(1,"Display name is required"),timeZone:t.string().min(1,"Time zone is required").optional(),importPurchaseEvents:t.boolean().default(!1),conversionPrice:t.number().positive().optional(),conversionCurrency:t.string().length(3).optional(),useSmartPurchaseDetection:t.boolean().optional()}),Ni=Nt.omit({_id:!0,createdAt:!0,updatedAt:!0}).partial({lastImportStartDate:!0,lastImportEndDate:!0,isImporting:!0}),Pi=Nt.omit({_id:!0,appId:!0,orgId:!0,createdAt:!0,updatedAt:!0}).partial(),Gr=jr.extend({account:Hr}),Li=t.object({properties:t.array(Gr),accountId:t.string()}),Ri=t.object({sessionId:t.string(),userId:t.string(),orgId:t.string(),propertyId:t.string(),appId:t.string().optional(),status:t.enum(["pending","in_progress","completed","failed"]),error:t.string().optional(),summary:t.object({activeUsers:t.number(),pageViews:t.number(),sessions:t.number(),eventsImported:t.number(),revenue:t.number(),conversions:t.number(),avgSessionDuration:t.number(),bounceRate:t.number(),newUsers:t.number(),returningUsers:t.number(),topTrafficSource:t.string(),conversionRate:t.number(),avgOrderValue:t.number(),topConvertingPage:t.string()}).optional(),createdAt:t.date(),updatedAt:t.date()}),$r=t.enum(["coordinator","ingestion"]),Pt=t.enum(["waiting","active","completed","failed","delayed","paused"]),Di=t.discriminatedUnion("jobType",[Dr,Mr]),zr=t.object({jobId:t.string(),integrationId:t.string(),jobType:$r,status:Pt,progress:t.object({current:t.number(),total:t.number(),percentage:t.number()}),data:t.object({eventsImported:t.number(),page:t.number().optional(),totalPages:t.number().optional(),coordinatorJobId:t.string().optional(),startTime:t.date().optional(),endTime:t.date().optional(),error:t.string().optional()}),createdAt:t.date(),updatedAt:t.date()}),Mi=t.object({integrationId:t.string(),status:t.enum(["not_started","in_progress","completed","failed","partial"]),progress:t.object({totalJobs:t.number(),completedJobs:t.number(),failedJobs:t.number(),pendingJobs:t.number(),percentage:t.number()}),coordinator:t.object({jobId:t.string(),status:Pt,progress:t.object({current:t.number(),total:t.number(),percentage:t.number()}),phase:t.enum(["creating_jobs","monitoring_ingestion","completed","waiting","active","failed","delayed","paused"]),createdAt:t.date(),updatedAt:t.date()}).nullable(),summary:t.object({totalEventsImported:t.number(),startTime:t.date().optional(),estimatedEndTime:t.date().optional(),lastUpdated:t.date()}),jobs:t.array(zr)}),ji=t.object({gaEventName:t.string(),userpathEventName:t.string(),description:t.string(),requiresEcommerce:t.boolean().default(!1),propertyMappings:t.record(t.string()).optional()}),Hi=t.object({activeUsers:t.number(),pageViews:t.number(),sessions:t.number(),bounceRate:t.number(),usersByCountry:t.array(t.object({country:t.string(),users:t.number()})),topPages:t.array(t.object({page:t.string(),views:t.number()})),trafficSources:t.array(t.object({source:t.string(),users:t.number()})),deviceTypes:t.array(t.object({device:t.string(),users:t.number()})),dailyMetrics:t.array(t.object({date:t.string(),users:t.number(),sessions:t.number()})),conversions:t.array(t.object({event:t.string(),count:t.number()}))});var Br;((Ot)=>{let e;((Fr)=>{let n;((w)=>{w.MATCH_TYPE_UNSPECIFIED="MATCH_TYPE_UNSPECIFIED";w.EXACT="EXACT";w.BEGINS_WITH="BEGINS_WITH";w.ENDS_WITH="ENDS_WITH";w.CONTAINS="CONTAINS";w.FULL_REGEXP="FULL_REGEXP";w.PARTIAL_REGEXP="PARTIAL_REGEXP"})(n=Fr.MatchType||={})})(e=Ot.StringFilter||={});let r;((Vr)=>{let n;((b)=>{b.OPERATION_UNSPECIFIED="OPERATION_UNSPECIFIED";b.EQUAL="EQUAL";b.LESS_THAN="LESS_THAN";b.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL";b.GREATER_THAN="GREATER_THAN";b.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL"})(n=Vr.Operation||={})})(r=Ot.NumericFilter||={})})(Br||={});var Wr;((Ur)=>{let e;((Yr)=>{let r;((c)=>{c.ORDER_TYPE_UNSPECIFIED="ORDER_TYPE_UNSPECIFIED";c.ALPHANUMERIC="ALPHANUMERIC";c.CASE_INSENSITIVE_ALPHANUMERIC="CASE_INSENSITIVE_ALPHANUMERIC";c.NUMERIC="NUMERIC"})(r=Yr.OrderType||={})})(e=Ur.DimensionOrderBy||={})})(Wr||={});var Xr;((qr)=>{let e;((o)=>{o.GRANULARITY_UNSPECIFIED="GRANULARITY_UNSPECIFIED";o.DAILY="DAILY";o.WEEKLY="WEEKLY";o.MONTHLY="MONTHLY"})(e=qr.Granularity||={})})(Xr||={});var zi=t.object({goalId:t.string(),goalName:t.string(),eventNames:t.array(t.string()),period:t.string(),metrics:t.object({totalConversions:t.number(),uniqueSessions:t.number(),uniqueUsers:t.number(),conversionRate:t.number(),totalRevenue:t.number(),averageOrderValue:t.number(),revenuePerVisitor:t.number()}),timeSeries:t.array(t.object({date:t.string(),conversions:t.number(),sessions:t.number(),conversionRate:t.number(),revenue:t.number()})),topEvents:t.array(t.object({eventName:t.string(),conversions:t.number(),conversionRate:t.number(),revenue:t.number()})),trend:t.object({change:t.number(),direction:t.enum(["up","down","stable"])})}),Fi=t.object({goalId:t.string(),goalName:t.string(),period:t.string(),funnelSteps:t.array(t.object({step:t.string(),stepNumber:t.number(),sessions:t.number(),conversionRate:t.number(),dropOffRate:t.number()})),totalSessions:t.number(),totalConversions:t.number(),overallConversionRate:t.number()}),Vi=t.object({goalId:t.string(),goalName:t.string(),period:t.string(),totalRevenue:t.number(),totalConversions:t.number(),averageOrderValue:t.number(),revenuePerVisitor:t.number(),revenueByEvent:t.array(t.object({eventName:t.string(),revenue:t.number(),conversions:t.number(),averageOrderValue:t.number(),percentage:t.number()})),revenueTimeSeries:t.array(t.object({date:t.string(),revenue:t.number(),conversions:t.number(),averageOrderValue:t.number()}))}),Bi=t.object({period:t.string(),totalGoals:t.number(),goals:t.array(t.object({goalId:t.string(),goalName:t.string(),eventNames:t.array(t.string()),conversions:t.number(),conversionRate:t.number(),revenue:t.number(),averageOrderValue:t.number(),revenuePerVisitor:t.number(),trend:t.object({change:t.number(),direction:t.enum(["up","down","stable"])})})),aggregated:t.object({totalConversions:t.number(),totalRevenue:t.number(),avgConversionRate:t.number(),avgRevenuePerVisitor:t.number()})}),Yi=t.object({period:t.string(),totalGoals:t.number(),goalsNeedingAttention:t.array(t.object({goalId:t.string(),goalName:t.string(),eventNames:t.array(t.string()),issueType:t.enum(["no_conversions","low_conversion_rate","low_activity","no_data"]),issueDescription:t.string(),metrics:t.object({conversions:t.number(),conversionRate:t.number(),sessions:t.number(),revenue:t.number()}),recommendations:t.array(t.string()),severity:t.enum(["critical","warning","info"])})),trafficAnalysis:t.object({totalSessions:t.number(),sessionsWithGoalEvents:t.number(),goalEventCoverage:t.number(),commonIssues:t.array(t.object({issue:t.string(),description:t.string(),affectedGoals:t.number(),recommendation:t.string()}))}),implementationHealth:t.object({eventTrackingStatus:t.array(t.object({eventName:t.string(),isActive:t.boolean(),lastSeen:t.string().optional(),frequency:t.number()})),dataQualityIssues:t.array(t.object({issue:t.string(),description:t.string(),severity:t.enum(["critical","warning","info"]),affectedGoals:t.array(t.string())}))})});var Kr=(e)=>{if(!e||e.trim()==="")throw Error("Regex pattern cannot be empty");let r=[/\(\?\#.*?\)/,/\(\?\{.*?\}\)/,/\(\?\<.*?\>.*?\)/,/\\[kKgG]/,/\(\?\<=/,/\(\?\<!/];for(let s of r)if(s.test(e))throw Error("Regex pattern contains features not supported by RE2 (ClickHouse)");if(e.length>500)throw Error("Regex pattern is too long (max 500 characters)");if((e.match(/[*+?{]/g)||[]).length>20)throw Error("Regex pattern has too many quantifiers (potential performance issue)");try{return new RegExp(e),!0}catch(s){throw Error(`Invalid regex pattern: ${s instanceof Error?s.message:"Unknown error"}`)}},Qr=(e,r)=>{if(["gt","gte","lt","lte"].includes(r)){if(!e.includes(":"))throw Error(`Properties field with '${r}' operator requires 'key:value' format`);let[n,s]=e.split(":",2);if(!n||!s)throw Error("Property key:value format requires both key and value parts");if(isNaN(parseFloat(s)))throw Error(`Property value '${s}' must be numeric for '${r}' operator`)}if(r==="equals"&&e.includes(":")){let[n,s]=e.split(":",2);if(!n||s===void 0)throw Error("Property key:value format requires both key and value parts")}return!0},ie=(e)=>e.replace(/['"]/g,"").replace(/[;]/g,"").replace(/--/g,"").trim(),Jr=t.object({key:t.string().min(1,"Property key cannot be empty"),operator:t.enum(["equals","gt","gte","lt","lte"]),value:t.string().min(1,"Property value cannot be empty")}),Lt=t.object({field:t.enum(["url","properties","country","device_type","browser"]),operator:t.enum(["equals","contains","starts_with","ends_with","regex","gt","gte","lt","lte","in","not_in","multi_property"]),value:t.union([t.string().min(1,"Condition value cannot be empty").transform(ie),t.number(),t.array(t.string().min(1,"Array items cannot be empty")).min(1,"Array cannot be empty for in/not_in operators").max(100,"Array cannot have more than 100 items (performance limit)"),t.array(Jr).min(1,"Multi-property rules cannot be empty").max(10,"Cannot have more than 10 property rules (performance limit)")]),eventIndex:t.number().int().min(0,"Event index must be non-negative").optional()}).superRefine((e,r)=>{if(e.operator==="regex"&&typeof e.value==="string")try{Kr(e.value)}catch(n){r.addIssue({code:t.ZodIssueCode.custom,message:n instanceof Error?n.message:"Invalid regex pattern",path:["value"]})}if(e.field==="properties"&&typeof e.value==="string"&&["gt","gte","lt","lte","equals"].includes(e.operator))try{Qr(e.value,e.operator)}catch(n){r.addIssue({code:t.ZodIssueCode.custom,message:n instanceof Error?n.message:"Invalid property format",path:["value"]})}if(["in","not_in"].includes(e.operator)&&!Array.isArray(e.value))r.addIssue({code:t.ZodIssueCode.custom,message:"Value for in/not_in operators must be an array",path:["value"]});if(e.operator==="multi_property"&&!Array.isArray(e.value))r.addIssue({code:t.ZodIssueCode.custom,message:"Value for multi_property operator must be an array of PropertyRule objects",path:["value"]})}),Rt=t.object({timeWindow:t.enum(["1_hour","24_hours","7_days","30_days"]).default("24_hours"),allowRepeatedSteps:t.boolean().default(!1),maxStepInterval:t.number().int("Max step interval must be an integer").min(1,"Max step interval must be at least 1 second").max(604800,"Max step interval cannot exceed 7 days (604800 seconds)").default(3600)}),Zr=t.object({_id:t.string(),name:t.string().min(1,"Goal name is required").max(100,"Goal name cannot exceed 100 characters").transform(ie),description:t.string().max(500,"Description cannot exceed 500 characters").transform(ie).optional(),orgId:t.string().min(1,"Organization ID is required"),appId:t.string().min(1,"App ID is required"),eventNames:t.array(t.string().min(1,"Event name cannot be empty").max(50,"Event name cannot exceed 50 characters").transform(ie)).min(1,"At least one event name is required").max(10,"Cannot have more than 10 events in a funnel (performance limit)"),createdAt:t.date(),updatedAt:t.date()}),qi=Zr.extend({conditions:t.array(Lt).max(20,"Cannot have more than 20 conditions (performance limit)").optional(),funnelSettings:Rt.optional()}).superRefine((e,r)=>{if(e.funnelSettings&&e.eventNames.length<=1)r.addIssue({code:t.ZodIssueCode.custom,message:"Funnel settings can only be applied to multi-step goals (2+ events)",path:["funnelSettings"]});if(e.conditions)for(let n=0;n<e.conditions.length;n++){let s=e.conditions[n];if(s.eventIndex!==void 0&&(s.eventIndex<0||s.eventIndex>=e.eventNames.length))r.addIssue({code:t.ZodIssueCode.custom,message:`Event index ${s.eventIndex} is out of bounds. Must be between 0 and ${e.eventNames.length-1}`,path:["conditions",n,"eventIndex"]})}}),ze=t.object({_id:t.string(),name:t.string().min(1,"Goal name is required").max(100,"Goal name cannot exceed 100 characters").transform(ie),description:t.string().max(500,"Description cannot exceed 500 characters").transform(ie).optional(),orgId:t.string().min(1,"Organization ID is required"),appId:t.string().min(1,"App ID is required"),eventNames:t.array(t.string().min(1,"Event name cannot be empty").max(50,"Event name cannot exceed 50 characters").transform(ie)).min(1,"At least one event name is required").max(10,"Cannot have more than 10 events in a funnel (performance limit)"),createdAt:t.date(),updatedAt:t.date()}),st=ze.extend({conditions:t.array(Lt).max(20,"Cannot have more than 20 conditions (performance limit)").optional(),funnelSettings:Rt.optional()}),Xi=ze.omit({_id:!0,createdAt:!0,updatedAt:!0}),Ki=st.omit({_id:!0,createdAt:!0,updatedAt:!0}),Qi=ze.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),Ji=st.omit({_id:!0,orgId:!0,createdAt:!0,updatedAt:!0}),Zi=ze.omit({_id:!0,orgId:!0,appId:!0,createdAt:!0,updatedAt:!0}).partial(),ea=st.omit({_id:!0,orgId:!0,appId:!0,createdAt:!0,updatedAt:!0}).partial();var Dt=t.enum(["page_view","page_visibility","page_exit","form_submit","input_fill","input_select","input_radio","input_checkbox","input_range","click","scroll","video_play","video_pause","video_complete","user_active","user_inactive","purchase","error","identity","default"]),en=t.object({event_name:He,event_icon:Dt.default("default"),description:t.string(),details:t.string().optional(),timestamp:t.string(),url:t.string(),referrer:t.string(),properties:t.string().optional(),timeSinceLastEvent:t.string().nullable().optional(),country:t.string().optional(),city:t.string().optional()}),tn=t.object({journeyId:t.string().uuid(),userId:t.string().uuid(),userEmail:t.string().email().optional(),userName:t.string().optional(),firstTouch:t.string(),lastTouch:t.string(),daysToConversion:t.number().int(),conversionRevenue:t.number(),isConverted:t.boolean(),referrerPath:t.string(),urlPath:t.string(),events:t.array(en),totalDuration:t.string().optional(),lastSeen:t.string().optional()}),rn=t.object({index:t.number().int(),event_icon:Dt.default("default"),description:t.string(),details:t.string().optional(),timestamp:t.string().nullable(),timeSinceLastEvent:t.string().nullable().optional(),url:t.string().optional()}),sa=t.object({success:t.boolean(),error:t.string().optional(),journey:tn.optional(),simplifiedJourney:t.array(rn).optional()});var nn=t.object({name:t.literal("clickhouse-run-query"),arguments:t.object({query:t.string().describe("SQL query to execute")})}).describe("Execute a SQL query on ClickHouse"),sn=t.object({name:t.literal("clickhouse-list-tables"),arguments:t.object({database:t.string().optional()})}).describe("List all tables in ClickHouse"),an=t.object({name:t.literal("clickhouse-describe-table"),arguments:t.object({table_name:t.string(),database:t.string().optional()})}).describe("Get schema information for a table"),on=t.object({name:t.literal("clickhouse-list-databases"),arguments:t.object({})}).describe("List all databases in ClickHouse"),cn=t.object({name:t.literal("clickhouse-describe-database"),arguments:t.object({database_name:t.string()})}).describe("Get schema information for a database"),un=t.object({name:t.literal("clickhouse-list-columns"),arguments:t.object({table_name:t.string(),database:t.string().optional()})}).describe("List all columns in a table"),ln=t.object({name:t.literal("plot-chart"),arguments:t.object({chartType:t.enum(["bar","line","pie","scatter","area"]).describe("Type of chart to plot"),data:t.string().describe("JSON string containing the chart data in the needed format for Recharts to render the chart."),title:t.string().optional().describe("Chart title"),xAxis:t.string().optional().describe("X-axis field name (for applicable chart types)"),yAxis:t.string().optional().describe("Y-axis field name (for applicable chart types)"),options:t.string().optional().describe("Additional chart options as JSON string")})}).describe("Generate interactive React charts using the npm library recharts 2.x"),pn=t.object({name:t.literal("get-sitemap"),arguments:t.object({appId:t.string().describe("The app ID to get the sitemap for")})}).describe("Get the sitemap and useful stats for a given app. Returned data includes: url, visitCount, lastVisitAt, title and uniqueVisitors."),dn=t.object({name:t.literal("mongodb-find"),arguments:t.object({collection:t.string().describe("Collection name to query"),filter:t.string().optional().describe("MongoDB filter as JSON string (default: {})"),options:t.string().optional().describe("MongoDB find options as JSON string"),database:t.string().optional().describe("Database name (defaults to current database)")})}).describe("Execute a find query on MongoDB"),mn=t.object({name:t.literal("mongodb-aggregate"),arguments:t.object({collection:t.string().describe("Collection name to query"),pipeline:t.string().describe("MongoDB aggregation pipeline as JSON string"),database:t.string().optional().describe("Database name (defaults to current database)")})}).describe("Execute an aggregation pipeline on MongoDB"),hn=t.object({name:t.literal("mongodb-list-collections"),arguments:t.object({database:t.string().optional().describe("Database name (defaults to current database)")})}).describe("List all collections in MongoDB database"),fn=t.object({name:t.literal("mongodb-list-databases"),arguments:t.object({})}).describe("List all databases in MongoDB"),gn=t.object({name:t.literal("mongodb-describe-collection"),arguments:t.object({collection:t.string().describe("Collection name to describe"),database:t.string().optional().describe("Database name (defaults to current database)")})}).describe("Get schema information for a MongoDB collection"),_n=t.object({name:t.literal("mongodb-count"),arguments:t.object({collection:t.string().describe("Collection name to count"),filter:t.string().optional().describe("MongoDB filter as JSON string (default: {})"),database:t.string().optional().describe("Database name (defaults to current database)")})}).describe("Count documents in a MongoDB collection"),bn=t.object({name:t.literal("mongodb-insert"),arguments:t.object({operation:t.enum(["insert","update","upsert"]).describe("Type of operation: insert, update, or upsert"),document:t.string().describe("Document to insert or update as JSON string"),filter:t.string().optional().describe("Filter for update/upsert operations as JSON string"),database:t.string().optional().describe("Database name (defaults to current database)")})}).describe("Insert or update documents in the goals collection (restricted access)"),yn=t.object({name:t.literal("mongodb-update"),arguments:t.object({operation:t.enum(["update"]),document:t.string(),filter:t.string().optional(),database:t.string().optional()})}),oa=t.discriminatedUnion("name",[nn,sn,an,on,cn,un,ln,pn,dn,mn,hn,fn,gn,_n,bn,yn]);var vn=["LCP","FID","CLS"],En=["good","needs-improvement","poor"];var Mt=t.object({metric:t.enum(vn),value:t.number().positive().describe("Metric value in appropriate units (ms for LCP/FID, score for CLS)"),rating:t.enum(En).describe("Performance rating based on Google Web Vitals thresholds")}),jt=t.object({page_load_time:t.number().nonnegative().describe("Total page load time (loadEventEnd - navigationStart)"),dom_content_loaded_time:t.number().nonnegative().describe("Time when DOMContentLoaded event fired"),time_to_first_byte:t.number().nonnegative().describe("Time to First Byte (TTFB) - server response time"),dom_interactive_time:t.number().nonnegative().describe("Time when DOM becomes interactive"),connect_time:t.number().nonnegative().describe("Time spent establishing connection to server"),dns_lookup_time:t.number().nonnegative().describe("Time spent in DNS resolution"),navigation_type:t.number().int().min(0).max(255).describe("Type of navigation (0=navigate, 1=reload, 2=back_forward, 255=reserved)"),redirect_count:t.number().int().nonnegative().describe("Number of redirects that occurred before reaching the page")}),la=t.union([Mt,jt]);var Sn=t.object({name:t.literal("core_web_vitals"),properties:Mt,timestamp:t.string().datetime()}),An=t.object({name:t.literal("page_load"),properties:jt,timestamp:t.string().datetime()}),pa=t.union([Sn,An]);var D=t.object({direction:t.enum(["up","down","neutral"]),percentage:t.number().min(0)}),xn=t.object({metric:t.enum(["LCP","FID","CLS"]),value:t.number(),rating:t.enum(["good","needs-improvement","poor"]),date:t.string(),url:t.string().optional()}),Cn=t.object({page_load_time:t.number(),dom_content_loaded_time:t.number(),time_to_first_byte:t.number(),dom_interactive_time:t.number(),connect_time:t.number(),dns_lookup_time:t.number(),navigation_type:t.number(),redirect_count:t.number(),date:t.string(),url:t.string().optional()}),kn=t.object({avgLCP:D,avgFID:D,avgCLS:D,goodLCPPercent:D,goodFIDPercent:D,goodCLSPercent:D,totalMeasurements:D}),da=t.object({avgLCP:t.number(),avgFID:t.number(),avgCLS:t.number(),avgPageLoadTime:t.number(),avgTTFB:t.number(),goodLCPPercent:t.number(),goodFIDPercent:t.number(),goodCLSPercent:t.number(),totalMeasurements:t.number(),trends:kn,previousPeriod:t.object({avgLCP:t.number(),avgFID:t.number(),avgCLS:t.number(),avgPageLoadTime:t.number(),avgTTFB:t.number(),goodLCPPercent:t.number(),goodFIDPercent:t.number(),goodCLSPercent:t.number(),totalMeasurements:t.number()})}),wn=t.object({coreWebVitals:t.array(xn),pageLoads:t.array(Cn)}),In=t.object({url:t.string(),pageTitle:t.string().optional(),avgLCP:t.number(),avgFID:t.number(),avgCLS:t.number(),goodLCPPercent:t.number(),goodFIDPercent:t.number(),goodCLSPercent:t.number(),avgPageLoadTime:t.number(),avgTTFB:t.number(),measurements:t.number(),visitors:t.number(),trends:t.object({avgLCP:D,avgFID:D,avgCLS:D,avgPageLoadTime:D,avgTTFB:D,visitors:D})}),ma=t.object({pages:t.array(In),totalPages:t.number()}),Tn=t.object({affectedPages:t.number().optional(),avgValue:t.number().optional(),threshold:t.number().optional(),poorCount:t.number().optional(),pages:t.array(t.object({url:t.string(),value:t.number().optional(),loadTime:t.number().optional()})).optional(),errorCount:t.number().optional(),errorTypes:t.number().optional(),topErrors:t.array(t.string()).optional(),browser:t.string().optional(),issueCount:t.number().optional(),metrics:t.array(t.object({metric:t.string(),value:t.number()})).optional(),totalMeasurements:t.number().optional(),avgLoadTime:t.number().optional(),avgLCP:t.number().optional(),avgFID:t.number().optional(),avgCLS:t.number().optional()}),On=t.object({id:t.string(),title:t.string(),description:t.string(),impact:t.enum(["high","medium","low"]),category:t.enum(["lcp","fid","cls","general"]),priority:t.number(),evidence:Tn}),Nn=t.object({totalMeasurements:t.number(),problemPages:t.number(),errorPatterns:t.number(),slowPages:t.number(),avgLCP:t.number(),avgFID:t.number(),avgCLS:t.number()}),ha=t.object({recommendations:t.array(On),analysis:Nn}),fa=t.object({url:t.string(),metrics:t.object({avgLCP:t.number(),avgFID:t.number(),avgCLS:t.number(),goodLCPPercent:t.number(),goodFIDPercent:t.number(),goodCLSPercent:t.number(),avgPageLoadTime:t.number(),avgTTFB:t.number(),visitors:t.number(),measurements:t.number(),totalMeasurements:t.number()}),trends:wn});var Pn=t.enum(["pathname"]),Ln=t.enum(["equals","contains","startsWith","endsWith"]),it=t.object({field:Pn,operator:Ln,value:t.union([t.string(),t.array(t.string()),t.number()])}),ba=t.object({_id:t.string(),name:t.string().min(1,"Name is required"),description:t.string().optional(),conditions:t.array(it),appId:t.string(),orgId:t.string(),createdAt:t.date(),updatedAt:t.date()}),ya=t.object({name:t.string().min(1,"Name is required"),description:t.string().optional(),conditions:t.array(it).min(1,"At least one condition is required")}),va=t.object({name:t.string().min(1,"Name is required").optional(),description:t.string().optional(),conditions:t.array(it).min(1,"At least one condition is required").optional()}),Ea=t.object({isValid:t.boolean(),errors:t.array(t.string())}),Sa=t.object({count:t.number(),preview:t.array(t.any())});var Ca=t.object({id:t.string(),object:t.literal("payment_intent"),amount:t.number(),currency:t.string(),status:t.enum(["succeeded","processing","requires_payment_method","requires_confirmation","requires_action","requires_capture","canceled"]),created:t.number(),customer:t.string().nullable(),description:t.string().nullable(),metadata:t.record(t.string()).default({}),receipt_email:t.string().nullable(),payment_method_types:t.array(t.string()),shipping:t.object({address:t.object({city:t.string().nullable(),country:t.string().nullable(),line1:t.string().nullable(),line2:t.string().nullable(),postal_code:t.string().nullable(),state:t.string().nullable()}).nullable(),name:t.string().nullable(),phone:t.string().nullable()}).nullable(),latest_charge:t.string().nullable()}),ka=t.object({id:t.string(),billing_details:t.object({address:t.object({city:t.string().nullable(),country:t.string().nullable(),line1:t.string().nullable(),line2:t.string().nullable(),postal_code:t.string().nullable(),state:t.string().nullable()}).nullable(),email:t.string().nullable(),name:t.string().nullable(),phone:t.string().nullable()}),payment_method_details:t.object({card:t.object({brand:t.string().nullable(),country:t.string().nullable(),funding:t.string().nullable(),last4:t.string().nullable()}).nullable()}).nullable()}),wa=t.object({id:t.string(),email:t.string().nullable(),name:t.string().nullable(),phone:t.string().nullable(),address:t.object({city:t.string().nullable(),country:t.string().nullable(),line1:t.string().nullable(),line2:t.string().nullable(),postal_code:t.string().nullable(),state:t.string().nullable()}).nullable(),metadata:t.record(t.string()).default({})}),Ia=t.object({_id:t.string(),appId:t.string(),orgId:t.string(),stripeAccountId:t.string(),accountId:t.string(),displayName:t.string().optional(),scope:t.enum(["read_only","read_write"]).default("read_write"),isActive:t.boolean(),isImporting:t.boolean(),lastImportStartDate:t.date().optional(),lastImportEndDate:t.date().optional(),createdAt:t.date(),updatedAt:t.date()}),Ta=t.object({appId:t.string(),orgId:t.string(),stripeAccountId:t.string(),accountId:t.string(),displayName:t.string().optional(),scope:t.enum(["read_only","read_write"]).default("read_write"),isActive:t.boolean().default(!0),isImporting:t.boolean().default(!1),lastImportStartDate:t.date().optional(),lastImportEndDate:t.date().optional()}),Oa=t.object({displayName:t.string().optional(),isActive:t.boolean().optional(),isImporting:t.boolean().optional(),lastImportStartDate:t.date().optional(),lastImportEndDate:t.date().optional()}).partial(),Na=t.object({appName:t.string().min(1,"App name is required"),appUrl:t.string().min(1,"App URL is required"),stripeAccountId:t.string().min(1,"Stripe user ID is required"),displayName:t.string().optional(),scope:t.enum(["read_only","read_write"]).default("read_write"),livemode:t.boolean().default(!1),lookbackMonths:t.number().min(1).max(24).default(6),includeFailedPayments:t.boolean().default(!1)}),Pa=t.object({code:t.string().min(1,"Authorization code is required"),state:t.string().min(1,"State parameter is required")}),La=t.object({device_type:t.enum(["desktop","mobile","tablet"]),browser:t.string(),os:t.string(),screen_width:t.number(),screen_height:t.number()}),Ra=t.object({country:t.string(),city:t.string().optional(),region:t.string().optional(),timezone:t.string(),language:t.string()}),Da=t.object({lookback_months:t.number().default(6),include_failed_payments:t.boolean().default(!1),include_refunds:t.boolean().default(!0),batch_size:t.number().default(100),enrich_with_existing_data:t.boolean().default(!0)});var Rn=t.enum(["waiting","active","completed","failed","delayed","paused"]),Ma=t.object({integrationId:t.string(),orgId:t.string(),appId:t.string(),stripeAccountId:t.string(),displayName:t.string(),lookbackMonths:t.number().default(6)}),ja=t.object({jobId:t.string(),integrationId:t.string(),status:Rn,progress:t.object({current:t.number(),total:t.number(),percentage:t.number()}),data:t.object({eventsImported:t.number(),paymentsProcessed:t.number().optional(),customersProcessed:t.number().optional(),revenue:t.number().optional(),startTime:t.date().optional(),endTime:t.date().optional(),error:t.string().optional()}),createdAt:t.date(),updatedAt:t.date()}),Ha=t.object({integrationId:t.string(),status:t.enum(["not_started","in_progress","completed","failed"]),progress:t.object({percentage:t.number(),paymentsImported:t.number(),customersImported:t.number(),revenue:t.number()}),summary:t.object({totalEventsImported:t.number(),startTime:t.date().optional(),endTime:t.date().optional(),lastUpdated:t.date()})});var Ht=["free","basic","pro","enterprise","userpath"],Dn=["monthly","yearly"],Mn=["active","canceled","past_due","incomplete","paused"];var jn=t.object({sites:t.number(),ai:t.number(),events:t.number(),seats:t.number()}),za=t.object({_id:t.string(),order:t.number(),orgId:t.string().optional(),name:t.union([t.enum(Ht),t.string()]),type:t.enum(["public","private"]),displayName:t.string(),description:t.string(),monthlyPrice:t.number(),monthlyPriceId:t.string(),yearlyPrice:t.number(),yearlyPriceId:t.string(),limits:jn,features:t.array(t.string()),popular:t.boolean().default(!1),archived:t.boolean().default(!1)}),Hn=t.object({reason:t.string().optional(),comment:t.string().optional(),feedback:t.string().optional(),cancelledAt:t.date().optional()}).optional(),Fa=t.object({id:t.string().optional(),_id:t.string().optional(),plan:t.union([t.enum(Ht),t.string()]),referenceId:t.string(),stripeCustomerId:t.string().optional(),stripeSubscriptionId:t.string().optional(),interval:t.enum(Dn).optional(),status:t.enum(Mn),periodStart:t.date().optional(),periodEnd:t.date().optional(),cancelAtPeriodEnd:t.boolean().optional(),seats:t.number().optional(),trialStart:t.date().optional(),trialEnd:t.date().optional(),cancelDetails:Hn,coupon:t.string().optional()}),Va=t.object({usage:t.object({sites:t.number(),ai:t.number(),events:t.number(),seats:t.number()}),limits:t.object({sites:t.number(),ai:t.number(),events:t.number(),seats:t.number()})});var Gn=["owner","admin","member","viewer"],$n=t.enum(Gn),Ua=t.object({id:t.string(),name:t.string(),role:$n,email:t.string().email(),status:t.enum(["active","pending","inactive"]),image:t.string().optional()});var zn=t.object({_id:t.string().optional(),name:t.string(),email:t.string().email(),createdAt:t.union([t.date(),t.string()]).optional(),updatedAt:t.union([t.date(),t.string()]).optional()}),Xa=zn.omit({_id:!0,createdAt:!0,updatedAt:!0});/*!
|
|
2
2
|
* re2js
|
|
3
3
|
* RE2JS is the JavaScript port of RE2, a regular expression engine that provides linear time matching
|
|
4
4
|
*
|
|
@@ -7,8 +7,8 @@ var W0=Object.defineProperty;var q0=($,X)=>{for(var Y in X)W0($,Y,{get:X[Y],enum
|
|
|
7
7
|
* @homepage https://github.com/le0pard/re2js#readme
|
|
8
8
|
* @repository github:le0pard/re2js
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/class
|
|
11
|
-
`,10],["\v",11],["\f",12],["\r",13],[" ",32],['"',34],["$",36],["&",38],["(",40],[")",41],["*",42],["+",43],["-",45],[".",46],["0",48],["1",49],["2",50],["3",51],["4",52],["5",53],["6",54],["7",55],["8",56],["9",57],[":",58],["<",60],[">",62],["?",63],["A",65],["B",66],["C",67],["F",70],["P",80],["Q",81],["U",85],["Z",90],["[",91],["\\",92],["]",93],["^",94],["_",95],["a",97],["b",98],["f",102],["i",105],["m",109],["n",110],["r",114],["s",115],["t",116],["v",118],["x",120],["z",122],["{",123],["|",124],["}",125]]))();static toUpperCase($){let X=String.fromCodePoint($).toUpperCase();if(X.length>1)return $;let Y=String.fromCodePoint(X.codePointAt(0)).toLowerCase();if(Y.length>1||Y.codePointAt(0)!==$)return $;return X.codePointAt(0)}static toLowerCase($){let X=String.fromCodePoint($).toLowerCase();if(X.length>1)return $;let Y=String.fromCodePoint(X.codePointAt(0)).toUpperCase();if(Y.length>1||Y.codePointAt(0)!==$)return $;return X.codePointAt(0)}}class W{static CASE_ORBIT=(()=>new Map([[75,107],[107,8490],[8490,75],[83,115],[115,383],[383,83],[181,924],[924,956],[956,181],[197,229],[229,8491],[8491,197],[452,453],[453,454],[454,452],[455,456],[456,457],[457,455],[458,459],[459,460],[460,458],[497,498],[498,499],[499,497],[837,921],[921,953],[953,8126],[8126,837],[914,946],[946,976],[976,914],[917,949],[949,1013],[1013,917],[920,952],[952,977],[977,1012],[1012,920],[922,954],[954,1008],[1008,922],[928,960],[960,982],[982,928],[929,961],[961,1009],[1009,929],[931,962],[962,963],[963,931],[934,966],[966,981],[981,934],[937,969],[969,8486],[8486,937],[1042,1074],[1074,7296],[7296,1042],[1044,1076],[1076,7297],[7297,1044],[1054,1086],[1086,7298],[7298,1054],[1057,1089],[1089,7299],[7299,1057],[1058,1090],[1090,7300],[7300,7301],[7301,1058],[1066,1098],[1098,7302],[7302,1066],[1122,1123],[1123,7303],[7303,1122],[7304,42570],[42570,42571],[42571,7304],[7305,7306],[7306,7305],[7776,7777],[7777,7835],[7835,7776],[223,7838],[7838,223],[8064,8072],[8072,8064],[8065,8073],[8073,8065],[8066,8074],[8074,8066],[8067,8075],[8075,8067],[8068,8076],[8076,8068],[8069,8077],[8077,8069],[8070,8078],[8078,8070],[8071,8079],[8079,8071],[8080,8088],[8088,8080],[8081,8089],[8089,8081],[8082,8090],[8090,8082],[8083,8091],[8091,8083],[8084,8092],[8092,8084],[8085,8093],[8093,8085],[8086,8094],[8094,8086],[8087,8095],[8095,8087],[8096,8104],[8104,8096],[8097,8105],[8105,8097],[8098,8106],[8106,8098],[8099,8107],[8107,8099],[8100,8108],[8108,8100],[8101,8109],[8109,8101],[8102,8110],[8110,8102],[8103,8111],[8111,8103],[8115,8124],[8124,8115],[8131,8140],[8140,8131],[912,8147],[8147,912],[944,8163],[8163,944],[8179,8188],[8188,8179],[612,42955],[42955,612],[42956,42957],[42957,42956],[42970,42971],[42971,42970],[411,42972],[42972,411],[64261,64262],[64262,64261],[66560,66600],[66600,66560],[66561,66601],[66601,66561],[66562,66602],[66602,66562],[66563,66603],[66603,66563],[66564,66604],[66604,66564],[66565,66605],[66605,66565],[66566,66606],[66606,66566],[66567,66607],[66607,66567],[66568,66608],[66608,66568],[66569,66609],[66609,66569],[66570,66610],[66610,66570],[66571,66611],[66611,66571],[66572,66612],[66612,66572],[66573,66613],[66613,66573],[66574,66614],[66614,66574],[66575,66615],[66615,66575],[66576,66616],[66616,66576],[66577,66617],[66617,66577],[66578,66618],[66618,66578],[66579,66619],[66619,66579],[66580,66620],[66620,66580],[66581,66621],[66621,66581],[66582,66622],[66622,66582],[66583,66623],[66623,66583],[66584,66624],[66624,66584],[66585,66625],[66625,66585],[66586,66626],[66626,66586],[66587,66627],[66627,66587],[66588,66628],[66628,66588],[66589,66629],[66629,66589],[66590,66630],[66630,66590],[66591,66631],[66631,66591],[66592,66632],[66632,66592],[66593,66633],[66633,66593],[66594,66634],[66634,66594],[66595,66635],[66635,66595],[66596,66636],[66636,66596],[66597,66637],[66637,66597],[66598,66638],[66638,66598],[66599,66639],[66639,66599],[66736,66776],[66776,66736],[66737,66777],[66777,66737],[66738,66778],[66778,66738],[66739,66779],[66779,66739],[66740,66780],[66780,66740],[66741,66781],[66781,66741],[66742,66782],[66782,66742],[66743,66783],[66783,66743],[66744,66784],[66784,66744],[66745,66785],[66785,66745],[66746,66786],[66786,66746],[66747,66787],[66787,66747],[66748,66788],[66788,66748],[66749,66789],[66789,66749],[66750,66790],[66790,66750],[66751,66791],[66791,66751],[66752,66792],[66792,66752],[66753,66793],[66793,66753],[66754,66794],[66794,66754],[66755,66795],[66795,66755],[66756,66796],[66796,66756],[66757,66797],[66797,66757],[66758,66798],[66798,66758],[66759,66799],[66799,66759],[66760,66800],[66800,66760],[66761,66801],[66801,66761],[66762,66802],[66802,66762],[66763,66803],[66803,66763],[66764,66804],[66804,66764],[66765,66805],[66805,66765],[66766,66806],[66806,66766],[66767,66807],[66807,66767],[66768,66808],[66808,66768],[66769,66809],[66809,66769],[66770,66810],[66810,66770],[66771,66811],[66811,66771],[66928,66967],[66967,66928],[66929,66968],[66968,66929],[66930,66969],[66969,66930],[66931,66970],[66970,66931],[66932,66971],[66971,66932],[66933,66972],[66972,66933],[66934,66973],[66973,66934],[66935,66974],[66974,66935],[66936,66975],[66975,66936],[66937,66976],[66976,66937],[66938,66977],[66977,66938],[66940,66979],[66979,66940],[66941,66980],[66980,66941],[66942,66981],[66981,66942],[66943,66982],[66982,66943],[66944,66983],[66983,66944],[66945,66984],[66984,66945],[66946,66985],[66985,66946],[66947,66986],[66986,66947],[66948,66987],[66987,66948],[66949,66988],[66988,66949],[66950,66989],[66989,66950],[66951,66990],[66990,66951],[66952,66991],[66991,66952],[66953,66992],[66992,66953],[66954,66993],[66993,66954],[66956,66995],[66995,66956],[66957,66996],[66996,66957],[66958,66997],[66997,66958],[66959,66998],[66998,66959],[66960,66999],[66999,66960],[66961,67000],[67000,66961],[66962,67001],[67001,66962],[66964,67003],[67003,66964],[66965,67004],[67004,66965],[68736,68800],[68800,68736],[68737,68801],[68801,68737],[68738,68802],[68802,68738],[68739,68803],[68803,68739],[68740,68804],[68804,68740],[68741,68805],[68805,68741],[68742,68806],[68806,68742],[68743,68807],[68807,68743],[68744,68808],[68808,68744],[68745,68809],[68809,68745],[68746,68810],[68810,68746],[68747,68811],[68811,68747],[68748,68812],[68812,68748],[68749,68813],[68813,68749],[68750,68814],[68814,68750],[68751,68815],[68815,68751],[68752,68816],[68816,68752],[68753,68817],[68817,68753],[68754,68818],[68818,68754],[68755,68819],[68819,68755],[68756,68820],[68820,68756],[68757,68821],[68821,68757],[68758,68822],[68822,68758],[68759,68823],[68823,68759],[68760,68824],[68824,68760],[68761,68825],[68825,68761],[68762,68826],[68826,68762],[68763,68827],[68827,68763],[68764,68828],[68828,68764],[68765,68829],[68829,68765],[68766,68830],[68830,68766],[68767,68831],[68831,68767],[68768,68832],[68832,68768],[68769,68833],[68833,68769],[68770,68834],[68834,68770],[68771,68835],[68835,68771],[68772,68836],[68836,68772],[68773,68837],[68837,68773],[68774,68838],[68838,68774],[68775,68839],[68839,68775],[68776,68840],[68840,68776],[68777,68841],[68841,68777],[68778,68842],[68842,68778],[68779,68843],[68843,68779],[68780,68844],[68844,68780],[68781,68845],[68845,68781],[68782,68846],[68846,68782],[68783,68847],[68847,68783],[68784,68848],[68848,68784],[68785,68849],[68849,68785],[68786,68850],[68850,68786],[68944,68976],[68976,68944],[68945,68977],[68977,68945],[68946,68978],[68978,68946],[68947,68979],[68979,68947],[68948,68980],[68980,68948],[68949,68981],[68981,68949],[68950,68982],[68982,68950],[68951,68983],[68983,68951],[68952,68984],[68984,68952],[68953,68985],[68985,68953],[68954,68986],[68986,68954],[68955,68987],[68987,68955],[68956,68988],[68988,68956],[68957,68989],[68989,68957],[68958,68990],[68990,68958],[68959,68991],[68991,68959],[68960,68992],[68992,68960],[68961,68993],[68993,68961],[68962,68994],[68994,68962],[68963,68995],[68995,68963],[68964,68996],[68996,68964],[68965,68997],[68997,68965],[71840,71872],[71872,71840],[71841,71873],[71873,71841],[71842,71874],[71874,71842],[71843,71875],[71875,71843],[71844,71876],[71876,71844],[71845,71877],[71877,71845],[71846,71878],[71878,71846],[71847,71879],[71879,71847],[71848,71880],[71880,71848],[71849,71881],[71881,71849],[71850,71882],[71882,71850],[71851,71883],[71883,71851],[71852,71884],[71884,71852],[71853,71885],[71885,71853],[71854,71886],[71886,71854],[71855,71887],[71887,71855],[71856,71888],[71888,71856],[71857,71889],[71889,71857],[71858,71890],[71890,71858],[71859,71891],[71891,71859],[71860,71892],[71892,71860],[71861,71893],[71893,71861],[71862,71894],[71894,71862],[71863,71895],[71895,71863],[71864,71896],[71896,71864],[71865,71897],[71897,71865],[71866,71898],[71898,71866],[71867,71899],[71899,71867],[71868,71900],[71900,71868],[71869,71901],[71901,71869],[71870,71902],[71902,71870],[71871,71903],[71903,71871],[93760,93792],[93792,93760],[93761,93793],[93793,93761],[93762,93794],[93794,93762],[93763,93795],[93795,93763],[93764,93796],[93796,93764],[93765,93797],[93797,93765],[93766,93798],[93798,93766],[93767,93799],[93799,93767],[93768,93800],[93800,93768],[93769,93801],[93801,93769],[93770,93802],[93802,93770],[93771,93803],[93803,93771],[93772,93804],[93804,93772],[93773,93805],[93805,93773],[93774,93806],[93806,93774],[93775,93807],[93807,93775],[93776,93808],[93808,93776],[93777,93809],[93809,93777],[93778,93810],[93810,93778],[93779,93811],[93811,93779],[93780,93812],[93812,93780],[93781,93813],[93813,93781],[93782,93814],[93814,93782],[93783,93815],[93815,93783],[93784,93816],[93816,93784],[93785,93817],[93817,93785],[93786,93818],[93818,93786],[93787,93819],[93819,93787],[93788,93820],[93820,93788],[93789,93821],[93821,93789],[93790,93822],[93822,93790],[93791,93823],[93823,93791],[125184,125218],[125218,125184],[125185,125219],[125219,125185],[125186,125220],[125220,125186],[125187,125221],[125221,125187],[125188,125222],[125222,125188],[125189,125223],[125223,125189],[125190,125224],[125224,125190],[125191,125225],[125225,125191],[125192,125226],[125226,125192],[125193,125227],[125227,125193],[125194,125228],[125228,125194],[125195,125229],[125229,125195],[125196,125230],[125230,125196],[125197,125231],[125231,125197],[125198,125232],[125232,125198],[125199,125233],[125233,125199],[125200,125234],[125234,125200],[125201,125235],[125235,125201],[125202,125236],[125236,125202],[125203,125237],[125237,125203],[125204,125238],[125238,125204],[125205,125239],[125239,125205],[125206,125240],[125240,125206],[125207,125241],[125241,125207],[125208,125242],[125242,125208],[125209,125243],[125243,125209],[125210,125244],[125244,125210],[125211,125245],[125245,125211],[125212,125246],[125246,125212],[125213,125247],[125247,125213],[125214,125248],[125248,125214],[125215,125249],[125249,125215],[125216,125250],[125250,125216],[125217,125251],[125251,125217]]))();static C=[[0,31,1],[127,159,1],[173,888,715],[889,896,7],[897,899,1],[907,909,2],[930,1328,398],[1367,1368,1],[1419,1420,1],[1424,1480,56],[1481,1487,1],[1515,1518,1],[1525,1541,1],[1564,1757,193],[1806,1807,1],[1867,1868,1],[1970,1983,1],[2043,2044,1],[2094,2095,1],[2111,2140,29],[2141,2143,2],[2155,2159,1],[2191,2198,1],[2274,2436,162],[2445,2446,1],[2449,2450,1],[2473,2481,8],[2483,2485,1],[2490,2491,1],[2501,2502,1],[2505,2506,1],[2511,2518,1],[2520,2523,1],[2526,2532,6],[2533,2559,26],[2560,2564,4],[2571,2574,1],[2577,2578,1],[2601,2609,8],[2612,2618,3],[2619,2621,2],[2627,2630,1],[2633,2634,1],[2638,2640,1],[2642,2648,1],[2653,2655,2],[2656,2661,1],[2679,2688,1],[2692,2702,10],[2706,2729,23],[2737,2740,3],[2746,2747,1],[2758,2766,4],[2767,2769,2],[2770,2783,1],[2788,2789,1],[2802,2808,1],[2816,2820,4],[2829,2830,1],[2833,2834,1],[2857,2865,8],[2868,2874,6],[2875,2885,10],[2886,2889,3],[2890,2894,4],[2895,2900,1],[2904,2907,1],[2910,2916,6],[2917,2936,19],[2937,2945,1],[2948,2955,7],[2956,2957,1],[2961,2966,5],[2967,2968,1],[2971,2973,2],[2976,2978,1],[2981,2983,1],[2987,2989,1],[3002,3005,1],[3011,3013,1],[3017,3022,5],[3023,3025,2],[3026,3030,1],[3032,3045,1],[3067,3071,1],[3085,3089,4],[3113,3130,17],[3131,3141,10],[3145,3150,5],[3151,3156,1],[3159,3163,4],[3164,3166,2],[3167,3172,5],[3173,3184,11],[3185,3190,1],[3213,3217,4],[3241,3252,11],[3258,3259,1],[3269,3273,4],[3278,3284,1],[3287,3292,1],[3295,3300,5],[3301,3312,11],[3316,3327,1],[3341,3345,4],[3397,3401,4],[3408,3411,1],[3428,3429,1],[3456,3460,4],[3479,3481,1],[3506,3516,10],[3518,3519,1],[3527,3529,1],[3531,3534,1],[3541,3543,2],[3552,3557,1],[3568,3569,1],[3573,3584,1],[3643,3646,1],[3676,3712,1],[3715,3717,2],[3723,3748,25],[3750,3774,24],[3775,3781,6],[3783,3791,8],[3802,3803,1],[3808,3839,1],[3912,3949,37],[3950,3952,1],[3992,4029,37],[4045,4059,14],[4060,4095,1],[4294,4296,2],[4297,4300,1],[4302,4303,1],[4681,4686,5],[4687,4695,8],[4697,4702,5],[4703,4745,42],[4750,4751,1],[4785,4790,5],[4791,4799,8],[4801,4806,5],[4807,4823,16],[4881,4886,5],[4887,4955,68],[4956,4989,33],[4990,4991,1],[5018,5023,1],[5110,5111,1],[5118,5119,1],[5789,5791,1],[5881,5887,1],[5910,5918,1],[5943,5951,1],[5972,5983,1],[5997,6001,4],[6004,6015,1],[6110,6111,1],[6122,6127,1],[6138,6143,1],[6158,6170,12],[6171,6175,1],[6265,6271,1],[6315,6319,1],[6390,6399,1],[6431,6444,13],[6445,6447,1],[6460,6463,1],[6465,6467,1],[6510,6511,1],[6517,6527,1],[6572,6575,1],[6602,6607,1],[6619,6621,1],[6684,6685,1],[6751,6781,30],[6782,6794,12],[6795,6799,1],[6810,6815,1],[6830,6831,1],[6863,6911,1],[6989,7156,167],[7157,7163,1],[7224,7226,1],[7242,7244,1],[7307,7311,1],[7355,7356,1],[7368,7375,1],[7419,7423,1],[7958,7959,1],[7966,7967,1],[8006,8007,1],[8014,8015,1],[8024,8030,2],[8062,8063,1],[8117,8133,16],[8148,8149,1],[8156,8176,20],[8177,8181,4],[8191,8203,12],[8204,8207,1],[8234,8238,1],[8288,8303,1],[8306,8307,1],[8335,8349,14],[8350,8351,1],[8385,8399,1],[8433,8447,1],[8588,8591,1],[9258,9279,1],[9291,9311,1],[11124,11125,1],[11158,11508,350],[11509,11512,1],[11558,11560,2],[11561,11564,1],[11566,11567,1],[11624,11630,1],[11633,11646,1],[11671,11679,1],[11687,11743,8],[11870,11903,1],[11930,12020,90],[12021,12031,1],[12246,12271,1],[12352,12439,87],[12440,12544,104],[12545,12548,1],[12592,12687,95],[12774,12782,1],[12831,42125,29294],[42126,42127,1],[42183,42191,1],[42540,42559,1],[42744,42751,1],[42958,42959,1],[42962,42964,2],[42973,42993,1],[43053,43055,1],[43066,43071,1],[43128,43135,1],[43206,43213,1],[43226,43231,1],[43348,43358,1],[43389,43391,1],[43470,43482,12],[43483,43485,1],[43519,43575,56],[43576,43583,1],[43598,43599,1],[43610,43611,1],[43715,43738,1],[43767,43776,1],[43783,43784,1],[43791,43792,1],[43799,43807,1],[43815,43823,8],[43884,43887,1],[44014,44015,1],[44026,44031,1],[55204,55215,1],[55239,55242,1],[55292,63743,1],[64110,64111,1],[64218,64255,1],[64263,64274,1],[64280,64284,1],[64311,64317,6],[64319,64325,3],[64451,64466,1],[64912,64913,1],[64968,64974,1],[64976,65007,1],[65050,65055,1],[65107,65127,20],[65132,65135,1],[65141,65277,136],[65278,65280,1],[65471,65473,1],[65480,65481,1],[65488,65489,1],[65496,65497,1],[65501,65503,1],[65511,65519,8],[65520,65531,1],[65534,65535,1],[65548,65575,27],[65595,65598,3],[65614,65615,1],[65630,65663,1],[65787,65791,1],[65795,65798,1],[65844,65846,1],[65935,65949,14],[65950,65951,1],[65953,65999,1],[66046,66175,1],[66205,66207,1],[66257,66271,1],[66300,66303,1],[66340,66348,1],[66379,66383,1],[66427,66431,1],[66462,66500,38],[66501,66503,1],[66518,66559,1],[66718,66719,1],[66730,66735,1],[66772,66775,1],[66812,66815,1],[66856,66863,1],[66916,66926,1],[66939,66955,16],[66963,66966,3],[66978,66994,16],[67002,67005,3],[67006,67007,1],[67060,67071,1],[67383,67391,1],[67414,67423,1],[67432,67455,1],[67462,67505,43],[67515,67583,1],[67590,67591,1],[67593,67638,45],[67641,67643,1],[67645,67646,1],[67670,67743,73],[67744,67750,1],[67760,67807,1],[67827,67830,3],[67831,67834,1],[67868,67870,1],[67898,67902,1],[67904,67967,1],[68024,68027,1],[68048,68049,1],[68100,68103,3],[68104,68107,1],[68116,68120,4],[68150,68151,1],[68155,68158,1],[68169,68175,1],[68185,68191,1],[68256,68287,1],[68327,68330,1],[68343,68351,1],[68406,68408,1],[68438,68439,1],[68467,68471,1],[68498,68504,1],[68509,68520,1],[68528,68607,1],[68681,68735,1],[68787,68799,1],[68851,68857,1],[68904,68911,1],[68922,68927,1],[68966,68968,1],[68998,69005,1],[69008,69215,1],[69247,69290,43],[69294,69295,1],[69298,69313,1],[69317,69371,1],[69416,69423,1],[69466,69487,1],[69514,69551,1],[69580,69599,1],[69623,69631,1],[69710,69713,1],[69750,69758,1],[69821,69827,6],[69828,69839,1],[69865,69871,1],[69882,69887,1],[69941,69960,19],[69961,69967,1],[70007,70015,1],[70112,70133,21],[70134,70143,1],[70162,70210,48],[70211,70271,1],[70279,70281,2],[70286,70302,16],[70314,70319,1],[70379,70383,1],[70394,70399,1],[70404,70413,9],[70414,70417,3],[70418,70441,23],[70449,70452,3],[70458,70469,11],[70470,70473,3],[70474,70478,4],[70479,70481,2],[70482,70486,1],[70488,70492,1],[70500,70501,1],[70509,70511,1],[70517,70527,1],[70538,70540,2],[70541,70543,2],[70582,70593,11],[70595,70596,1],[70598,70603,5],[70614,70617,3],[70618,70624,1],[70627,70655,1],[70748,70754,6],[70755,70783,1],[70856,70863,1],[70874,71039,1],[71094,71095,1],[71134,71167,1],[71237,71247,1],[71258,71263,1],[71277,71295,1],[71354,71359,1],[71370,71375,1],[71396,71423,1],[71451,71452,1],[71468,71471,1],[71495,71679,1],[71740,71839,1],[71923,71934,1],[71943,71944,1],[71946,71947,1],[71956,71959,3],[71990,71993,3],[71994,72007,13],[72008,72015,1],[72026,72095,1],[72104,72105,1],[72152,72153,1],[72165,72191,1],[72264,72271,1],[72355,72367,1],[72441,72447,1],[72458,72639,1],[72674,72687,1],[72698,72703,1],[72713,72759,46],[72774,72783,1],[72813,72815,1],[72848,72849,1],[72872,72887,15],[72888,72959,1],[72967,72970,3],[73015,73017,1],[73019,73022,3],[73032,73039,1],[73050,73055,1],[73062,73065,3],[73103,73106,3],[73113,73119,1],[73130,73439,1],[73465,73471,1],[73489,73531,42],[73532,73533,1],[73563,73647,1],[73649,73663,1],[73714,73726,1],[74650,74751,1],[74863,74869,6],[74870,74879,1],[75076,77711,1],[77811,77823,1],[78896,78911,1],[78934,78943,1],[82939,82943,1],[83527,90367,1],[90426,92159,1],[92729,92735,1],[92767,92778,11],[92779,92781,1],[92863,92874,11],[92875,92879,1],[92910,92911,1],[92918,92927,1],[92998,93007,1],[93018,93026,8],[93048,93052,1],[93072,93503,1],[93562,93759,1],[93851,93951,1],[94027,94030,1],[94088,94094,1],[94112,94175,1],[94181,94191,1],[94194,94207,1],[100344,100351,1],[101590,101630,1],[101641,110575,1],[110580,110588,8],[110591,110883,292],[110884,110897,1],[110899,110927,1],[110931,110932,1],[110934,110947,1],[110952,110959,1],[111356,113663,1],[113771,113775,1],[113789,113791,1],[113801,113807,1],[113818,113819,1],[113824,117759,1],[118010,118015,1],[118452,118527,1],[118574,118575,1],[118599,118607,1],[118724,118783,1],[119030,119039,1],[119079,119080,1],[119155,119162,1],[119275,119295,1],[119366,119487,1],[119508,119519,1],[119540,119551,1],[119639,119647,1],[119673,119807,1],[119893,119965,72],[119968,119969,1],[119971,119972,1],[119975,119976,1],[119981,119994,13],[119996,120004,8],[120070,120075,5],[120076,120085,9],[120093,120122,29],[120127,120133,6],[120135,120137,1],[120145,120486,341],[120487,120780,293],[120781,121484,703],[121485,121498,1],[121504,121520,16],[121521,122623,1],[122655,122660,1],[122667,122879,1],[122887,122905,18],[122906,122914,8],[122917,122923,6],[122924,122927,1],[122990,123022,1],[123024,123135,1],[123181,123183,1],[123198,123199,1],[123210,123213,1],[123216,123535,1],[123567,123583,1],[123642,123646,1],[123648,124111,1],[124154,124367,1],[124411,124414,1],[124416,124895,1],[124903,124908,5],[124911,124927,16],[125125,125126,1],[125143,125183,1],[125260,125263,1],[125274,125277,1],[125280,126064,1],[126133,126208,1],[126270,126463,1],[126468,126496,28],[126499,126501,2],[126502,126504,2],[126515,126520,5],[126522,126524,2],[126525,126529,1],[126531,126534,1],[126536,126540,2],[126544,126547,3],[126549,126550,1],[126552,126560,2],[126563,126565,2],[126566,126571,5],[126579,126589,5],[126591,126602,11],[126620,126624,1],[126628,126634,6],[126652,126703,1],[126706,126975,1],[127020,127023,1],[127124,127135,1],[127151,127152,1],[127168,127184,16],[127222,127231,1],[127406,127461,1],[127491,127503,1],[127548,127551,1],[127561,127567,1],[127570,127583,1],[127590,127743,1],[128728,128731,1],[128749,128751,1],[128765,128767,1],[128887,128890,1],[128986,128991,1],[129004,129007,1],[129009,129023,1],[129036,129039,1],[129096,129103,1],[129114,129119,1],[129160,129167,1],[129198,129199,1],[129212,129215,1],[129218,129279,1],[129620,129631,1],[129646,129647,1],[129661,129663,1],[129674,129678,1],[129735,129741,1],[129757,129758,1],[129770,129775,1],[129785,129791,1],[129939,130042,103],[130043,131071,1],[173792,173823,1],[177978,177983,1],[178206,178207,1],[183970,183983,1],[191457,191471,1],[192094,194559,1],[195102,196607,1],[201547,201551,1],[205744,917759,1],[918000,1114111,1]];static Cc=[[0,31,1],[127,159,1]];static Cf=[[173,1536,1363],[1537,1541,1],[1564,1757,193],[1807,2192,385],[2193,2274,81],[6158,8203,2045],[8204,8207,1],[8234,8238,1],[8288,8292,1],[8294,8303,1],[65279,65529,250],[65530,65531,1],[69821,69837,16],[78896,78911,1],[113824,113827,1],[119155,119162,1],[917505,917536,31],[917537,917631,1]];static Co=[[57344,63743,1],[983040,1048573,1],[1048576,1114109,1]];static Cs=[[55296,57343,1]];static L=[[65,90,1],[97,122,1],[170,181,11],[186,192,6],[193,214,1],[216,246,1],[248,705,1],[710,721,1],[736,740,1],[748,750,2],[880,884,1],[886,887,1],[890,893,1],[895,902,7],[904,906,1],[908,910,2],[911,929,1],[931,1013,1],[1015,1153,1],[1162,1327,1],[1329,1366,1],[1369,1376,7],[1377,1416,1],[1488,1514,1],[1519,1522,1],[1568,1610,1],[1646,1647,1],[1649,1747,1],[1749,1765,16],[1766,1774,8],[1775,1786,11],[1787,1788,1],[1791,1808,17],[1810,1839,1],[1869,1957,1],[1969,1994,25],[1995,2026,1],[2036,2037,1],[2042,2048,6],[2049,2069,1],[2074,2084,10],[2088,2112,24],[2113,2136,1],[2144,2154,1],[2160,2183,1],[2185,2190,1],[2208,2249,1],[2308,2361,1],[2365,2384,19],[2392,2401,1],[2417,2432,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2493,2510,17],[2524,2525,1],[2527,2529,1],[2544,2545,1],[2556,2565,9],[2566,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2649,2652,1],[2654,2674,20],[2675,2676,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2749,2768,19],[2784,2785,1],[2809,2821,12],[2822,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2877,2908,31],[2909,2911,2],[2912,2913,1],[2929,2947,18],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3024,3077,53],[3078,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3133,3160,27],[3161,3162,1],[3165,3168,3],[3169,3200,31],[3205,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3261,3293,32],[3294,3296,2],[3297,3313,16],[3314,3332,18],[3333,3340,1],[3342,3344,1],[3346,3386,1],[3389,3406,17],[3412,3414,1],[3423,3425,1],[3450,3455,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3585,3632,1],[3634,3635,1],[3648,3654,1],[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3760,1],[3762,3763,1],[3773,3776,3],[3777,3780,1],[3782,3804,22],[3805,3807,1],[3840,3904,64],[3905,3911,1],[3913,3948,1],[3976,3980,1],[4096,4138,1],[4159,4176,17],[4177,4181,1],[4186,4189,1],[4193,4197,4],[4198,4206,8],[4207,4208,1],[4213,4225,1],[4238,4256,18],[4257,4293,1],[4295,4301,6],[4304,4346,1],[4348,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4992,5007,1],[5024,5109,1],[5112,5117,1],[5121,5740,1],[5743,5759,1],[5761,5786,1],[5792,5866,1],[5873,5880,1],[5888,5905,1],[5919,5937,1],[5952,5969,1],[5984,5996,1],[5998,6000,1],[6016,6067,1],[6103,6108,5],[6176,6264,1],[6272,6276,1],[6279,6312,1],[6314,6320,6],[6321,6389,1],[6400,6430,1],[6480,6509,1],[6512,6516,1],[6528,6571,1],[6576,6601,1],[6656,6678,1],[6688,6740,1],[6823,6917,94],[6918,6963,1],[6981,6988,1],[7043,7072,1],[7086,7087,1],[7098,7141,1],[7168,7203,1],[7245,7247,1],[7258,7293,1],[7296,7306,1],[7312,7354,1],[7357,7359,1],[7401,7404,1],[7406,7411,1],[7413,7414,1],[7418,7424,6],[7425,7615,1],[7680,7957,1],[7960,7965,1],[7968,8005,1],[8008,8013,1],[8016,8023,1],[8025,8031,2],[8032,8061,1],[8064,8116,1],[8118,8124,1],[8126,8130,4],[8131,8132,1],[8134,8140,1],[8144,8147,1],[8150,8155,1],[8160,8172,1],[8178,8180,1],[8182,8188,1],[8305,8319,14],[8336,8348,1],[8450,8455,5],[8458,8467,1],[8469,8473,4],[8474,8477,1],[8484,8490,2],[8491,8493,1],[8495,8505,1],[8508,8511,1],[8517,8521,1],[8526,8579,53],[8580,11264,2684],[11265,11492,1],[11499,11502,1],[11506,11507,1],[11520,11557,1],[11559,11565,6],[11568,11623,1],[11631,11648,17],[11649,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[11823,12293,470],[12294,12337,43],[12338,12341,1],[12347,12348,1],[12353,12438,1],[12445,12447,1],[12449,12538,1],[12540,12543,1],[12549,12591,1],[12593,12686,1],[12704,12735,1],[12784,12799,1],[13312,19903,1],[19968,42124,1],[42192,42237,1],[42240,42508,1],[42512,42527,1],[42538,42539,1],[42560,42606,1],[42623,42653,1],[42656,42725,1],[42775,42783,1],[42786,42888,1],[42891,42957,1],[42960,42961,1],[42963,42965,2],[42966,42972,1],[42994,43009,1],[43011,43013,1],[43015,43018,1],[43020,43042,1],[43072,43123,1],[43138,43187,1],[43250,43255,1],[43259,43261,2],[43262,43274,12],[43275,43301,1],[43312,43334,1],[43360,43388,1],[43396,43442,1],[43471,43488,17],[43489,43492,1],[43494,43503,1],[43514,43518,1],[43520,43560,1],[43584,43586,1],[43588,43595,1],[43616,43638,1],[43642,43646,4],[43647,43695,1],[43697,43701,4],[43702,43705,3],[43706,43709,1],[43712,43714,2],[43739,43741,1],[43744,43754,1],[43762,43764,1],[43777,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[43824,43866,1],[43868,43881,1],[43888,44002,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[63744,64109,1],[64112,64217,1],[64256,64262,1],[64275,64279,1],[64285,64287,2],[64288,64296,1],[64298,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64433,1],[64467,64829,1],[64848,64911,1],[64914,64967,1],[65008,65019,1],[65136,65140,1],[65142,65276,1],[65313,65338,1],[65345,65370,1],[65382,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1],[66176,66204,1],[66208,66256,1],[66304,66335,1],[66349,66368,1],[66370,66377,1],[66384,66421,1],[66432,66461,1],[66464,66499,1],[66504,66511,1],[66560,66717,1],[66736,66771,1],[66776,66811,1],[66816,66855,1],[66864,66915,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[67008,67059,1],[67072,67382,1],[67392,67413,1],[67424,67431,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3],[67648,67669,1],[67680,67702,1],[67712,67742,1],[67808,67826,1],[67828,67829,1],[67840,67861,1],[67872,67897,1],[67968,68023,1],[68030,68031,1],[68096,68112,16],[68113,68115,1],[68117,68119,1],[68121,68149,1],[68192,68220,1],[68224,68252,1],[68288,68295,1],[68297,68324,1],[68352,68405,1],[68416,68437,1],[68448,68466,1],[68480,68497,1],[68608,68680,1],[68736,68786,1],[68800,68850,1],[68864,68899,1],[68938,68965,1],[68975,68997,1],[69248,69289,1],[69296,69297,1],[69314,69316,1],[69376,69404,1],[69415,69424,9],[69425,69445,1],[69488,69505,1],[69552,69572,1],[69600,69622,1],[69635,69687,1],[69745,69746,1],[69749,69763,14],[69764,69807,1],[69840,69864,1],[69891,69926,1],[69956,69959,3],[69968,70002,1],[70006,70019,13],[70020,70066,1],[70081,70084,1],[70106,70108,2],[70144,70161,1],[70163,70187,1],[70207,70208,1],[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70312,1],[70320,70366,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70461,70480,19],[70493,70497,1],[70528,70537,1],[70539,70542,3],[70544,70581,1],[70583,70609,26],[70611,70656,45],[70657,70708,1],[70727,70730,1],[70751,70753,1],[70784,70831,1],[70852,70853,1],[70855,71040,185],[71041,71086,1],[71128,71131,1],[71168,71215,1],[71236,71296,60],[71297,71338,1],[71352,71424,72],[71425,71450,1],[71488,71494,1],[71680,71723,1],[71840,71903,1],[71935,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71983,1],[71999,72001,2],[72096,72103,1],[72106,72144,1],[72161,72163,2],[72192,72203,11],[72204,72242,1],[72250,72272,22],[72284,72329,1],[72349,72368,19],[72369,72440,1],[72640,72672,1],[72704,72712,1],[72714,72750,1],[72768,72818,50],[72819,72847,1],[72960,72966,1],[72968,72969,1],[72971,73008,1],[73030,73056,26],[73057,73061,1],[73063,73064,1],[73066,73097,1],[73112,73440,328],[73441,73458,1],[73474,73476,2],[73477,73488,1],[73490,73523,1],[73648,73728,80],[73729,74649,1],[74880,75075,1],[77712,77808,1],[77824,78895,1],[78913,78918,1],[78944,82938,1],[82944,83526,1],[90368,90397,1],[92160,92728,1],[92736,92766,1],[92784,92862,1],[92880,92909,1],[92928,92975,1],[92992,92995,1],[93027,93047,1],[93053,93071,1],[93504,93548,1],[93760,93823,1],[93952,94026,1],[94032,94099,67],[94100,94111,1],[94176,94177,1],[94179,94208,29],[94209,100343,1],[100352,101589,1],[101631,101640,1],[110576,110579,1],[110581,110587,1],[110589,110590,1],[110592,110882,1],[110898,110928,30],[110929,110930,1],[110933,110948,15],[110949,110951,1],[110960,111355,1],[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119973,3],[119974,119977,3],[119978,119980,1],[119982,119993,1],[119995,119997,2],[119998,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120146,120485,1],[120488,120512,1],[120514,120538,1],[120540,120570,1],[120572,120596,1],[120598,120628,1],[120630,120654,1],[120656,120686,1],[120688,120712,1],[120714,120744,1],[120746,120770,1],[120772,120779,1],[122624,122654,1],[122661,122666,1],[122928,122989,1],[123136,123180,1],[123191,123197,1],[123214,123536,322],[123537,123565,1],[123584,123627,1],[124112,124139,1],[124368,124397,1],[124400,124896,496],[124897,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1],[124928,125124,1],[125184,125251,1],[125259,126464,1205],[126465,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static foldL=[[837,837,1]];static Ll=[[97,122,1],[181,223,42],[224,246,1],[248,255,1],[257,311,2],[312,328,2],[329,375,2],[378,382,2],[383,384,1],[387,389,2],[392,396,4],[397,402,5],[405,409,4],[410,411,1],[414,417,3],[419,421,2],[424,426,2],[427,429,2],[432,436,4],[438,441,3],[442,445,3],[446,447,1],[454,460,3],[462,476,2],[477,495,2],[496,499,3],[501,505,4],[507,563,2],[564,569,1],[572,575,3],[576,578,2],[583,591,2],[592,659,1],[661,687,1],[881,883,2],[887,891,4],[892,893,1],[912,940,28],[941,974,1],[976,977,1],[981,983,1],[985,1007,2],[1008,1011,1],[1013,1019,3],[1020,1072,52],[1073,1119,1],[1121,1153,2],[1163,1215,2],[1218,1230,2],[1231,1327,2],[1376,1416,1],[4304,4346,1],[4349,4351,1],[5112,5117,1],[7296,7304,1],[7306,7424,118],[7425,7467,1],[7531,7543,1],[7545,7578,1],[7681,7829,2],[7830,7837,1],[7839,7935,2],[7936,7943,1],[7952,7957,1],[7968,7975,1],[7984,7991,1],[8000,8005,1],[8016,8023,1],[8032,8039,1],[8048,8061,1],[8064,8071,1],[8080,8087,1],[8096,8103,1],[8112,8116,1],[8118,8119,1],[8126,8130,4],[8131,8132,1],[8134,8135,1],[8144,8147,1],[8150,8151,1],[8160,8167,1],[8178,8180,1],[8182,8183,1],[8458,8462,4],[8463,8467,4],[8495,8505,5],[8508,8509,1],[8518,8521,1],[8526,8580,54],[11312,11359,1],[11361,11365,4],[11366,11372,2],[11377,11379,2],[11380,11382,2],[11383,11387,1],[11393,11491,2],[11492,11500,8],[11502,11507,5],[11520,11557,1],[11559,11565,6],[42561,42605,2],[42625,42651,2],[42787,42799,2],[42800,42801,1],[42803,42865,2],[42866,42872,1],[42874,42876,2],[42879,42887,2],[42892,42894,2],[42897,42899,2],[42900,42901,1],[42903,42921,2],[42927,42933,6],[42935,42947,2],[42952,42954,2],[42957,42961,4],[42963,42971,2],[42998,43002,4],[43824,43866,1],[43872,43880,1],[43888,43967,1],[64256,64262,1],[64275,64279,1],[65345,65370,1],[66600,66639,1],[66776,66811,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[68800,68850,1],[68976,68997,1],[71872,71903,1],[93792,93823,1],[119834,119859,1],[119886,119892,1],[119894,119911,1],[119938,119963,1],[119990,119993,1],[119995,119997,2],[119998,120003,1],[120005,120015,1],[120042,120067,1],[120094,120119,1],[120146,120171,1],[120198,120223,1],[120250,120275,1],[120302,120327,1],[120354,120379,1],[120406,120431,1],[120458,120485,1],[120514,120538,1],[120540,120545,1],[120572,120596,1],[120598,120603,1],[120630,120654,1],[120656,120661,1],[120688,120712,1],[120714,120719,1],[120746,120770,1],[120772,120777,1],[120779,122624,1845],[122625,122633,1],[122635,122654,1],[122661,122666,1],[125218,125251,1]];static foldLl=[[65,90,1],[192,214,1],[216,222,1],[256,302,2],[306,310,2],[313,327,2],[330,376,2],[377,381,2],[385,386,1],[388,390,2],[391,393,2],[394,395,1],[398,401,1],[403,404,1],[406,408,1],[412,413,1],[415,416,1],[418,422,2],[423,425,2],[428,430,2],[431,433,2],[434,435,1],[437,439,2],[440,444,4],[452,453,1],[455,456,1],[458,459,1],[461,475,2],[478,494,2],[497,498,1],[500,502,2],[503,504,1],[506,562,2],[570,571,1],[573,574,1],[577,579,2],[580,582,1],[584,590,2],[837,880,43],[882,886,4],[895,902,7],[904,906,1],[908,910,2],[911,913,2],[914,929,1],[931,939,1],[975,984,9],[986,1006,2],[1012,1015,3],[1017,1018,1],[1021,1071,1],[1120,1152,2],[1162,1216,2],[1217,1229,2],[1232,1326,2],[1329,1366,1],[4256,4293,1],[4295,4301,6],[5024,5109,1],[7305,7312,7],[7313,7354,1],[7357,7359,1],[7680,7828,2],[7838,7934,2],[7944,7951,1],[7960,7965,1],[7976,7983,1],[7992,7999,1],[8008,8013,1],[8025,8031,2],[8040,8047,1],[8072,8079,1],[8088,8095,1],[8104,8111,1],[8120,8124,1],[8136,8140,1],[8152,8155,1],[8168,8172,1],[8184,8188,1],[8486,8490,4],[8491,8498,7],[8579,11264,2685],[11265,11311,1],[11360,11362,2],[11363,11364,1],[11367,11373,2],[11374,11376,1],[11378,11381,3],[11390,11392,1],[11394,11490,2],[11499,11501,2],[11506,42560,31054],[42562,42604,2],[42624,42650,2],[42786,42798,2],[42802,42862,2],[42873,42877,2],[42878,42886,2],[42891,42893,2],[42896,42898,2],[42902,42922,2],[42923,42926,1],[42928,42932,1],[42934,42948,2],[42949,42951,1],[42953,42955,2],[42956,42960,4],[42966,42972,2],[42997,65313,22316],[65314,65338,1],[66560,66599,1],[66736,66771,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[68736,68786,1],[68944,68965,1],[71840,71871,1],[93760,93791,1],[125184,125217,1]];static Lm=[[688,705,1],[710,721,1],[736,740,1],[748,750,2],[884,890,6],[1369,1600,231],[1765,1766,1],[2036,2037,1],[2042,2074,32],[2084,2088,4],[2249,2417,168],[3654,3782,128],[4348,6103,1755],[6211,6823,612],[7288,7293,1],[7468,7530,1],[7544,7579,35],[7580,7615,1],[8305,8319,14],[8336,8348,1],[11388,11389,1],[11631,11823,192],[12293,12337,44],[12338,12341,1],[12347,12445,98],[12446,12540,94],[12541,12542,1],[40981,42232,1251],[42233,42237,1],[42508,42623,115],[42652,42653,1],[42775,42783,1],[42864,42888,24],[42994,42996,1],[43000,43001,1],[43471,43494,23],[43632,43741,109],[43763,43764,1],[43868,43871,1],[43881,65392,21511],[65438,65439,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[68942,68975,33],[92992,92995,1],[93504,93506,1],[93547,93548,1],[94099,94111,1],[94176,94177,1],[94179,110576,16397],[110577,110579,1],[110581,110587,1],[110589,110590,1],[122928,122989,1],[123191,123197,1],[124139,125259,1120]];static Lo=[[170,186,16],[443,448,5],[449,451,1],[660,1488,828],[1489,1514,1],[1519,1522,1],[1568,1599,1],[1601,1610,1],[1646,1647,1],[1649,1747,1],[1749,1774,25],[1775,1786,11],[1787,1788,1],[1791,1808,17],[1810,1839,1],[1869,1957,1],[1969,1994,25],[1995,2026,1],[2048,2069,1],[2112,2136,1],[2144,2154,1],[2160,2183,1],[2185,2190,1],[2208,2248,1],[2308,2361,1],[2365,2384,19],[2392,2401,1],[2418,2432,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2493,2510,17],[2524,2525,1],[2527,2529,1],[2544,2545,1],[2556,2565,9],[2566,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2649,2652,1],[2654,2674,20],[2675,2676,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2749,2768,19],[2784,2785,1],[2809,2821,12],[2822,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2877,2908,31],[2909,2911,2],[2912,2913,1],[2929,2947,18],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3024,3077,53],[3078,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3133,3160,27],[3161,3162,1],[3165,3168,3],[3169,3200,31],[3205,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3261,3293,32],[3294,3296,2],[3297,3313,16],[3314,3332,18],[3333,3340,1],[3342,3344,1],[3346,3386,1],[3389,3406,17],[3412,3414,1],[3423,3425,1],[3450,3455,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3585,3632,1],[3634,3635,1],[3648,3653,1],[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3760,1],[3762,3763,1],[3773,3776,3],[3777,3780,1],[3804,3807,1],[3840,3904,64],[3905,3911,1],[3913,3948,1],[3976,3980,1],[4096,4138,1],[4159,4176,17],[4177,4181,1],[4186,4189,1],[4193,4197,4],[4198,4206,8],[4207,4208,1],[4213,4225,1],[4238,4352,114],[4353,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4992,5007,1],[5121,5740,1],[5743,5759,1],[5761,5786,1],[5792,5866,1],[5873,5880,1],[5888,5905,1],[5919,5937,1],[5952,5969,1],[5984,5996,1],[5998,6000,1],[6016,6067,1],[6108,6176,68],[6177,6210,1],[6212,6264,1],[6272,6276,1],[6279,6312,1],[6314,6320,6],[6321,6389,1],[6400,6430,1],[6480,6509,1],[6512,6516,1],[6528,6571,1],[6576,6601,1],[6656,6678,1],[6688,6740,1],[6917,6963,1],[6981,6988,1],[7043,7072,1],[7086,7087,1],[7098,7141,1],[7168,7203,1],[7245,7247,1],[7258,7287,1],[7401,7404,1],[7406,7411,1],[7413,7414,1],[7418,8501,1083],[8502,8504,1],[11568,11623,1],[11648,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[12294,12348,54],[12353,12438,1],[12447,12449,2],[12450,12538,1],[12543,12549,6],[12550,12591,1],[12593,12686,1],[12704,12735,1],[12784,12799,1],[13312,19903,1],[19968,40980,1],[40982,42124,1],[42192,42231,1],[42240,42507,1],[42512,42527,1],[42538,42539,1],[42606,42656,50],[42657,42725,1],[42895,42999,104],[43003,43009,1],[43011,43013,1],[43015,43018,1],[43020,43042,1],[43072,43123,1],[43138,43187,1],[43250,43255,1],[43259,43261,2],[43262,43274,12],[43275,43301,1],[43312,43334,1],[43360,43388,1],[43396,43442,1],[43488,43492,1],[43495,43503,1],[43514,43518,1],[43520,43560,1],[43584,43586,1],[43588,43595,1],[43616,43631,1],[43633,43638,1],[43642,43646,4],[43647,43695,1],[43697,43701,4],[43702,43705,3],[43706,43709,1],[43712,43714,2],[43739,43740,1],[43744,43754,1],[43762,43777,15],[43778,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[43968,44002,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[63744,64109,1],[64112,64217,1],[64285,64287,2],[64288,64296,1],[64298,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64433,1],[64467,64829,1],[64848,64911,1],[64914,64967,1],[65008,65019,1],[65136,65140,1],[65142,65276,1],[65382,65391,1],[65393,65437,1],[65440,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1],[66176,66204,1],[66208,66256,1],[66304,66335,1],[66349,66368,1],[66370,66377,1],[66384,66421,1],[66432,66461,1],[66464,66499,1],[66504,66511,1],[66640,66717,1],[66816,66855,1],[66864,66915,1],[67008,67059,1],[67072,67382,1],[67392,67413,1],[67424,67431,1],[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3],[67648,67669,1],[67680,67702,1],[67712,67742,1],[67808,67826,1],[67828,67829,1],[67840,67861,1],[67872,67897,1],[67968,68023,1],[68030,68031,1],[68096,68112,16],[68113,68115,1],[68117,68119,1],[68121,68149,1],[68192,68220,1],[68224,68252,1],[68288,68295,1],[68297,68324,1],[68352,68405,1],[68416,68437,1],[68448,68466,1],[68480,68497,1],[68608,68680,1],[68864,68899,1],[68938,68941,1],[68943,69248,305],[69249,69289,1],[69296,69297,1],[69314,69316,1],[69376,69404,1],[69415,69424,9],[69425,69445,1],[69488,69505,1],[69552,69572,1],[69600,69622,1],[69635,69687,1],[69745,69746,1],[69749,69763,14],[69764,69807,1],[69840,69864,1],[69891,69926,1],[69956,69959,3],[69968,70002,1],[70006,70019,13],[70020,70066,1],[70081,70084,1],[70106,70108,2],[70144,70161,1],[70163,70187,1],[70207,70208,1],[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70312,1],[70320,70366,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70461,70480,19],[70493,70497,1],[70528,70537,1],[70539,70542,3],[70544,70581,1],[70583,70609,26],[70611,70656,45],[70657,70708,1],[70727,70730,1],[70751,70753,1],[70784,70831,1],[70852,70853,1],[70855,71040,185],[71041,71086,1],[71128,71131,1],[71168,71215,1],[71236,71296,60],[71297,71338,1],[71352,71424,72],[71425,71450,1],[71488,71494,1],[71680,71723,1],[71935,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71983,1],[71999,72001,2],[72096,72103,1],[72106,72144,1],[72161,72163,2],[72192,72203,11],[72204,72242,1],[72250,72272,22],[72284,72329,1],[72349,72368,19],[72369,72440,1],[72640,72672,1],[72704,72712,1],[72714,72750,1],[72768,72818,50],[72819,72847,1],[72960,72966,1],[72968,72969,1],[72971,73008,1],[73030,73056,26],[73057,73061,1],[73063,73064,1],[73066,73097,1],[73112,73440,328],[73441,73458,1],[73474,73476,2],[73477,73488,1],[73490,73523,1],[73648,73728,80],[73729,74649,1],[74880,75075,1],[77712,77808,1],[77824,78895,1],[78913,78918,1],[78944,82938,1],[82944,83526,1],[90368,90397,1],[92160,92728,1],[92736,92766,1],[92784,92862,1],[92880,92909,1],[92928,92975,1],[93027,93047,1],[93053,93071,1],[93507,93546,1],[93952,94026,1],[94032,94208,176],[94209,100343,1],[100352,101589,1],[101631,101640,1],[110592,110882,1],[110898,110928,30],[110929,110930,1],[110933,110948,15],[110949,110951,1],[110960,111355,1],[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[122634,123136,502],[123137,123180,1],[123214,123536,322],[123537,123565,1],[123584,123627,1],[124112,124138,1],[124368,124397,1],[124400,124896,496],[124897,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1],[124928,125124,1],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static Lt=[[453,459,3],[498,8072,7574],[8073,8079,1],[8088,8095,1],[8104,8111,1],[8124,8140,16],[8188,8188,1]];static foldLt=[[452,454,2],[455,457,2],[458,460,2],[497,499,2],[8064,8071,1],[8080,8087,1],[8096,8103,1],[8115,8131,16],[8179,8179,1]];static Lu=[[65,90,1],[192,214,1],[216,222,1],[256,310,2],[313,327,2],[330,376,2],[377,381,2],[385,386,1],[388,390,2],[391,393,2],[394,395,1],[398,401,1],[403,404,1],[406,408,1],[412,413,1],[415,416,1],[418,422,2],[423,425,2],[428,430,2],[431,433,2],[434,435,1],[437,439,2],[440,444,4],[452,461,3],[463,475,2],[478,494,2],[497,500,3],[502,504,1],[506,562,2],[570,571,1],[573,574,1],[577,579,2],[580,582,1],[584,590,2],[880,882,2],[886,895,9],[902,904,2],[905,906,1],[908,910,2],[911,913,2],[914,929,1],[931,939,1],[975,978,3],[979,980,1],[984,1006,2],[1012,1015,3],[1017,1018,1],[1021,1071,1],[1120,1152,2],[1162,1216,2],[1217,1229,2],[1232,1326,2],[1329,1366,1],[4256,4293,1],[4295,4301,6],[5024,5109,1],[7305,7312,7],[7313,7354,1],[7357,7359,1],[7680,7828,2],[7838,7934,2],[7944,7951,1],[7960,7965,1],[7976,7983,1],[7992,7999,1],[8008,8013,1],[8025,8031,2],[8040,8047,1],[8120,8123,1],[8136,8139,1],[8152,8155,1],[8168,8172,1],[8184,8187,1],[8450,8455,5],[8459,8461,1],[8464,8466,1],[8469,8473,4],[8474,8477,1],[8484,8490,2],[8491,8493,1],[8496,8499,1],[8510,8511,1],[8517,8579,62],[11264,11311,1],[11360,11362,2],[11363,11364,1],[11367,11373,2],[11374,11376,1],[11378,11381,3],[11390,11392,1],[11394,11490,2],[11499,11501,2],[11506,42560,31054],[42562,42604,2],[42624,42650,2],[42786,42798,2],[42802,42862,2],[42873,42877,2],[42878,42886,2],[42891,42893,2],[42896,42898,2],[42902,42922,2],[42923,42926,1],[42928,42932,1],[42934,42948,2],[42949,42951,1],[42953,42955,2],[42956,42960,4],[42966,42972,2],[42997,65313,22316],[65314,65338,1],[66560,66599,1],[66736,66771,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[68736,68786,1],[68944,68965,1],[71840,71871,1],[93760,93791,1],[119808,119833,1],[119860,119885,1],[119912,119937,1],[119964,119966,2],[119967,119973,3],[119974,119977,3],[119978,119980,1],[119982,119989,1],[120016,120041,1],[120068,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120120,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120172,120197,1],[120224,120249,1],[120276,120301,1],[120328,120353,1],[120380,120405,1],[120432,120457,1],[120488,120512,1],[120546,120570,1],[120604,120628,1],[120662,120686,1],[120720,120744,1],[120778,125184,4406],[125185,125217,1]];static Upper=this.Lu;static foldLu=[[97,122,1],[181,223,42],[224,246,1],[248,255,1],[257,303,2],[307,311,2],[314,328,2],[331,375,2],[378,382,2],[383,384,1],[387,389,2],[392,396,4],[402,405,3],[409,411,1],[414,417,3],[419,421,2],[424,429,5],[432,436,4],[438,441,3],[445,447,2],[453,454,1],[456,457,1],[459,460,1],[462,476,2],[477,495,2],[498,499,1],[501,505,4],[507,543,2],[547,563,2],[572,575,3],[576,578,2],[583,591,2],[592,596,1],[598,599,1],[601,603,2],[604,608,4],[609,611,2],[612,614,1],[616,620,1],[623,625,2],[626,629,3],[637,640,3],[642,643,1],[647,652,1],[658,669,11],[670,837,167],[881,883,2],[887,891,4],[892,893,1],[940,943,1],[945,974,1],[976,977,1],[981,983,1],[985,1007,2],[1008,1011,1],[1013,1019,3],[1072,1119,1],[1121,1153,2],[1163,1215,2],[1218,1230,2],[1231,1327,2],[1377,1414,1],[4304,4346,1],[4349,4351,1],[5112,5117,1],[7296,7304,1],[7306,7545,239],[7549,7566,17],[7681,7829,2],[7835,7841,6],[7843,7935,2],[7936,7943,1],[7952,7957,1],[7968,7975,1],[7984,7991,1],[8000,8005,1],[8017,8023,2],[8032,8039,1],[8048,8061,1],[8112,8113,1],[8126,8144,18],[8145,8160,15],[8161,8165,4],[8526,8580,54],[11312,11359,1],[11361,11365,4],[11366,11372,2],[11379,11382,3],[11393,11491,2],[11500,11502,2],[11507,11520,13],[11521,11557,1],[11559,11565,6],[42561,42605,2],[42625,42651,2],[42787,42799,2],[42803,42863,2],[42874,42876,2],[42879,42887,2],[42892,42897,5],[42899,42900,1],[42903,42921,2],[42933,42947,2],[42952,42954,2],[42957,42961,4],[42967,42971,2],[42998,43859,861],[43888,43967,1],[65345,65370,1],[66600,66639,1],[66776,66811,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[68800,68850,1],[68976,68997,1],[71872,71903,1],[93792,93823,1],[125218,125251,1]];static M=[[768,879,1],[1155,1161,1],[1425,1469,1],[1471,1473,2],[1474,1476,2],[1477,1479,2],[1552,1562,1],[1611,1631,1],[1648,1750,102],[1751,1756,1],[1759,1764,1],[1767,1768,1],[1770,1773,1],[1809,1840,31],[1841,1866,1],[1958,1968,1],[2027,2035,1],[2045,2070,25],[2071,2073,1],[2075,2083,1],[2085,2087,1],[2089,2093,1],[2137,2139,1],[2199,2207,1],[2250,2273,1],[2275,2307,1],[2362,2364,1],[2366,2383,1],[2385,2391,1],[2402,2403,1],[2433,2435,1],[2492,2494,2],[2495,2500,1],[2503,2504,1],[2507,2509,1],[2519,2530,11],[2531,2558,27],[2561,2563,1],[2620,2622,2],[2623,2626,1],[2631,2632,1],[2635,2637,1],[2641,2672,31],[2673,2677,4],[2689,2691,1],[2748,2750,2],[2751,2757,1],[2759,2761,1],[2763,2765,1],[2786,2787,1],[2810,2815,1],[2817,2819,1],[2876,2878,2],[2879,2884,1],[2887,2888,1],[2891,2893,1],[2901,2903,1],[2914,2915,1],[2946,3006,60],[3007,3010,1],[3014,3016,1],[3018,3021,1],[3031,3072,41],[3073,3076,1],[3132,3134,2],[3135,3140,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3170,3171,1],[3201,3203,1],[3260,3262,2],[3263,3268,1],[3270,3272,1],[3274,3277,1],[3285,3286,1],[3298,3299,1],[3315,3328,13],[3329,3331,1],[3387,3388,1],[3390,3396,1],[3398,3400,1],[3402,3405,1],[3415,3426,11],[3427,3457,30],[3458,3459,1],[3530,3535,5],[3536,3540,1],[3542,3544,2],[3545,3551,1],[3570,3571,1],[3633,3636,3],[3637,3642,1],[3655,3662,1],[3761,3764,3],[3765,3772,1],[3784,3790,1],[3864,3865,1],[3893,3897,2],[3902,3903,1],[3953,3972,1],[3974,3975,1],[3981,3991,1],[3993,4028,1],[4038,4139,101],[4140,4158,1],[4182,4185,1],[4190,4192,1],[4194,4196,1],[4199,4205,1],[4209,4212,1],[4226,4237,1],[4239,4250,11],[4251,4253,1],[4957,4959,1],[5906,5909,1],[5938,5940,1],[5970,5971,1],[6002,6003,1],[6068,6099,1],[6109,6155,46],[6156,6157,1],[6159,6277,118],[6278,6313,35],[6432,6443,1],[6448,6459,1],[6679,6683,1],[6741,6750,1],[6752,6780,1],[6783,6832,49],[6833,6862,1],[6912,6916,1],[6964,6980,1],[7019,7027,1],[7040,7042,1],[7073,7085,1],[7142,7155,1],[7204,7223,1],[7376,7378,1],[7380,7400,1],[7405,7412,7],[7415,7417,1],[7616,7679,1],[8400,8432,1],[11503,11505,1],[11647,11744,97],[11745,11775,1],[12330,12335,1],[12441,12442,1],[42607,42610,1],[42612,42621,1],[42654,42655,1],[42736,42737,1],[43010,43014,4],[43019,43043,24],[43044,43047,1],[43052,43136,84],[43137,43188,51],[43189,43205,1],[43232,43249,1],[43263,43302,39],[43303,43309,1],[43335,43347,1],[43392,43395,1],[43443,43456,1],[43493,43561,68],[43562,43574,1],[43587,43596,9],[43597,43643,46],[43644,43645,1],[43696,43698,2],[43699,43700,1],[43703,43704,1],[43710,43711,1],[43713,43755,42],[43756,43759,1],[43765,43766,1],[44003,44010,1],[44012,44013,1],[64286,65024,738],[65025,65039,1],[65056,65071,1],[66045,66272,227],[66422,66426,1],[68097,68099,1],[68101,68102,1],[68108,68111,1],[68152,68154,1],[68159,68325,166],[68326,68900,574],[68901,68903,1],[68969,68973,1],[69291,69292,1],[69372,69375,1],[69446,69456,1],[69506,69509,1],[69632,69634,1],[69688,69702,1],[69744,69747,3],[69748,69759,11],[69760,69762,1],[69808,69818,1],[69826,69888,62],[69889,69890,1],[69927,69940,1],[69957,69958,1],[70003,70016,13],[70017,70018,1],[70067,70080,1],[70089,70092,1],[70094,70095,1],[70188,70199,1],[70206,70209,3],[70367,70378,1],[70400,70403,1],[70459,70460,1],[70462,70468,1],[70471,70472,1],[70475,70477,1],[70487,70498,11],[70499,70502,3],[70503,70508,1],[70512,70516,1],[70584,70592,1],[70594,70597,3],[70599,70602,1],[70604,70608,1],[70610,70625,15],[70626,70709,83],[70710,70726,1],[70750,70832,82],[70833,70851,1],[71087,71093,1],[71096,71104,1],[71132,71133,1],[71216,71232,1],[71339,71351,1],[71453,71467,1],[71724,71738,1],[71984,71989,1],[71991,71992,1],[71995,71998,1],[72000,72002,2],[72003,72145,142],[72146,72151,1],[72154,72160,1],[72164,72193,29],[72194,72202,1],[72243,72249,1],[72251,72254,1],[72263,72273,10],[72274,72283,1],[72330,72345,1],[72751,72758,1],[72760,72767,1],[72850,72871,1],[72873,72886,1],[73009,73014,1],[73018,73020,2],[73021,73023,2],[73024,73029,1],[73031,73098,67],[73099,73102,1],[73104,73105,1],[73107,73111,1],[73459,73462,1],[73472,73473,1],[73475,73524,49],[73525,73530,1],[73534,73538,1],[73562,78912,5350],[78919,78933,1],[90398,90415,1],[92912,92916,1],[92976,92982,1],[94031,94033,2],[94034,94087,1],[94095,94098,1],[94180,94192,12],[94193,113821,19628],[113822,118528,4706],[118529,118573,1],[118576,118598,1],[119141,119145,1],[119149,119154,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[119362,119364,1],[121344,121398,1],[121403,121452,1],[121461,121476,15],[121499,121503,1],[121505,121519,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1],[123023,123184,161],[123185,123190,1],[123566,123628,62],[123629,123631,1],[124140,124143,1],[124398,124399,1],[125136,125142,1],[125252,125258,1],[917760,917999,1]];static foldM=[[921,953,32],[8126,8126,1]];static Mc=[[2307,2363,56],[2366,2368,1],[2377,2380,1],[2382,2383,1],[2434,2435,1],[2494,2496,1],[2503,2504,1],[2507,2508,1],[2519,2563,44],[2622,2624,1],[2691,2750,59],[2751,2752,1],[2761,2763,2],[2764,2818,54],[2819,2878,59],[2880,2887,7],[2888,2891,3],[2892,2903,11],[3006,3007,1],[3009,3010,1],[3014,3016,1],[3018,3020,1],[3031,3073,42],[3074,3075,1],[3137,3140,1],[3202,3203,1],[3262,3264,2],[3265,3268,1],[3271,3272,1],[3274,3275,1],[3285,3286,1],[3315,3330,15],[3331,3390,59],[3391,3392,1],[3398,3400,1],[3402,3404,1],[3415,3458,43],[3459,3535,76],[3536,3537,1],[3544,3551,1],[3570,3571,1],[3902,3903,1],[3967,4139,172],[4140,4145,5],[4152,4155,3],[4156,4182,26],[4183,4194,11],[4195,4196,1],[4199,4205,1],[4227,4228,1],[4231,4236,1],[4239,4250,11],[4251,4252,1],[5909,5940,31],[6070,6078,8],[6079,6085,1],[6087,6088,1],[6435,6438,1],[6441,6443,1],[6448,6449,1],[6451,6456,1],[6681,6682,1],[6741,6743,2],[6753,6755,2],[6756,6765,9],[6766,6770,1],[6916,6965,49],[6971,6973,2],[6974,6977,1],[6979,6980,1],[7042,7073,31],[7078,7079,1],[7082,7143,61],[7146,7148,1],[7150,7154,4],[7155,7204,49],[7205,7211,1],[7220,7221,1],[7393,7415,22],[12334,12335,1],[43043,43044,1],[43047,43136,89],[43137,43188,51],[43189,43203,1],[43346,43347,1],[43395,43444,49],[43445,43450,5],[43451,43454,3],[43455,43456,1],[43567,43568,1],[43571,43572,1],[43597,43643,46],[43645,43755,110],[43758,43759,1],[43765,44003,238],[44004,44006,2],[44007,44009,2],[44010,44012,2],[69632,69634,2],[69762,69808,46],[69809,69810,1],[69815,69816,1],[69932,69957,25],[69958,70018,60],[70067,70069,1],[70079,70080,1],[70094,70188,94],[70189,70190,1],[70194,70195,1],[70197,70368,171],[70369,70370,1],[70402,70403,1],[70462,70463,1],[70465,70468,1],[70471,70472,1],[70475,70477,1],[70487,70498,11],[70499,70584,85],[70585,70586,1],[70594,70597,3],[70599,70602,1],[70604,70605,1],[70607,70709,102],[70710,70711,1],[70720,70721,1],[70725,70832,107],[70833,70834,1],[70841,70843,2],[70844,70846,1],[70849,71087,238],[71088,71089,1],[71096,71099,1],[71102,71216,114],[71217,71218,1],[71227,71228,1],[71230,71340,110],[71342,71343,1],[71350,71454,104],[71456,71457,1],[71462,71724,262],[71725,71726,1],[71736,71984,248],[71985,71989,1],[71991,71992,1],[71997,72000,3],[72002,72145,143],[72146,72147,1],[72156,72159,1],[72164,72249,85],[72279,72280,1],[72343,72751,408],[72766,72873,107],[72881,72884,3],[73098,73102,1],[73107,73108,1],[73110,73461,351],[73462,73475,13],[73524,73525,1],[73534,73535,1],[73537,90410,16873],[90411,90412,1],[94033,94087,1],[94192,94193,1],[119141,119142,1],[119149,119154,1]];static Me=[[1160,1161,1],[6846,8413,1567],[8414,8416,1],[8418,8420,1],[42608,42610,1]];static Mn=[[768,879,1],[1155,1159,1],[1425,1469,1],[1471,1473,2],[1474,1476,2],[1477,1479,2],[1552,1562,1],[1611,1631,1],[1648,1750,102],[1751,1756,1],[1759,1764,1],[1767,1768,1],[1770,1773,1],[1809,1840,31],[1841,1866,1],[1958,1968,1],[2027,2035,1],[2045,2070,25],[2071,2073,1],[2075,2083,1],[2085,2087,1],[2089,2093,1],[2137,2139,1],[2199,2207,1],[2250,2273,1],[2275,2306,1],[2362,2364,2],[2369,2376,1],[2381,2385,4],[2386,2391,1],[2402,2403,1],[2433,2492,59],[2497,2500,1],[2509,2530,21],[2531,2558,27],[2561,2562,1],[2620,2625,5],[2626,2631,5],[2632,2635,3],[2636,2637,1],[2641,2672,31],[2673,2677,4],[2689,2690,1],[2748,2753,5],[2754,2757,1],[2759,2760,1],[2765,2786,21],[2787,2810,23],[2811,2815,1],[2817,2876,59],[2879,2881,2],[2882,2884,1],[2893,2901,8],[2902,2914,12],[2915,2946,31],[3008,3021,13],[3072,3076,4],[3132,3134,2],[3135,3136,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3170,3171,1],[3201,3260,59],[3263,3270,7],[3276,3277,1],[3298,3299,1],[3328,3329,1],[3387,3388,1],[3393,3396,1],[3405,3426,21],[3427,3457,30],[3530,3538,8],[3539,3540,1],[3542,3633,91],[3636,3642,1],[3655,3662,1],[3761,3764,3],[3765,3772,1],[3784,3790,1],[3864,3865,1],[3893,3897,2],[3953,3966,1],[3968,3972,1],[3974,3975,1],[3981,3991,1],[3993,4028,1],[4038,4141,103],[4142,4144,1],[4146,4151,1],[4153,4154,1],[4157,4158,1],[4184,4185,1],[4190,4192,1],[4209,4212,1],[4226,4229,3],[4230,4237,7],[4253,4957,704],[4958,4959,1],[5906,5908,1],[5938,5939,1],[5970,5971,1],[6002,6003,1],[6068,6069,1],[6071,6077,1],[6086,6089,3],[6090,6099,1],[6109,6155,46],[6156,6157,1],[6159,6277,118],[6278,6313,35],[6432,6434,1],[6439,6440,1],[6450,6457,7],[6458,6459,1],[6679,6680,1],[6683,6742,59],[6744,6750,1],[6752,6754,2],[6757,6764,1],[6771,6780,1],[6783,6832,49],[6833,6845,1],[6847,6862,1],[6912,6915,1],[6964,6966,2],[6967,6970,1],[6972,6978,6],[7019,7027,1],[7040,7041,1],[7074,7077,1],[7080,7081,1],[7083,7085,1],[7142,7144,2],[7145,7149,4],[7151,7153,1],[7212,7219,1],[7222,7223,1],[7376,7378,1],[7380,7392,1],[7394,7400,1],[7405,7412,7],[7416,7417,1],[7616,7679,1],[8400,8412,1],[8417,8421,4],[8422,8432,1],[11503,11505,1],[11647,11744,97],[11745,11775,1],[12330,12333,1],[12441,12442,1],[42607,42612,5],[42613,42621,1],[42654,42655,1],[42736,42737,1],[43010,43014,4],[43019,43045,26],[43046,43052,6],[43204,43205,1],[43232,43249,1],[43263,43302,39],[43303,43309,1],[43335,43345,1],[43392,43394,1],[43443,43446,3],[43447,43449,1],[43452,43453,1],[43493,43561,68],[43562,43566,1],[43569,43570,1],[43573,43574,1],[43587,43596,9],[43644,43696,52],[43698,43700,1],[43703,43704,1],[43710,43711,1],[43713,43756,43],[43757,43766,9],[44005,44008,3],[44013,64286,20273],[65024,65039,1],[65056,65071,1],[66045,66272,227],[66422,66426,1],[68097,68099,1],[68101,68102,1],[68108,68111,1],[68152,68154,1],[68159,68325,166],[68326,68900,574],[68901,68903,1],[68969,68973,1],[69291,69292,1],[69372,69375,1],[69446,69456,1],[69506,69509,1],[69633,69688,55],[69689,69702,1],[69744,69747,3],[69748,69759,11],[69760,69761,1],[69811,69814,1],[69817,69818,1],[69826,69888,62],[69889,69890,1],[69927,69931,1],[69933,69940,1],[70003,70016,13],[70017,70070,53],[70071,70078,1],[70089,70092,1],[70095,70191,96],[70192,70193,1],[70196,70198,2],[70199,70206,7],[70209,70367,158],[70371,70378,1],[70400,70401,1],[70459,70460,1],[70464,70502,38],[70503,70508,1],[70512,70516,1],[70587,70592,1],[70606,70610,2],[70625,70626,1],[70712,70719,1],[70722,70724,1],[70726,70750,24],[70835,70840,1],[70842,70847,5],[70848,70850,2],[70851,71090,239],[71091,71093,1],[71100,71101,1],[71103,71104,1],[71132,71133,1],[71219,71226,1],[71229,71231,2],[71232,71339,107],[71341,71344,3],[71345,71349,1],[71351,71453,102],[71455,71458,3],[71459,71461,1],[71463,71467,1],[71727,71735,1],[71737,71738,1],[71995,71996,1],[71998,72003,5],[72148,72151,1],[72154,72155,1],[72160,72193,33],[72194,72202,1],[72243,72248,1],[72251,72254,1],[72263,72273,10],[72274,72278,1],[72281,72283,1],[72330,72342,1],[72344,72345,1],[72752,72758,1],[72760,72765,1],[72767,72850,83],[72851,72871,1],[72874,72880,1],[72882,72883,1],[72885,72886,1],[73009,73014,1],[73018,73020,2],[73021,73023,2],[73024,73029,1],[73031,73104,73],[73105,73109,4],[73111,73459,348],[73460,73472,12],[73473,73526,53],[73527,73530,1],[73536,73538,2],[73562,78912,5350],[78919,78933,1],[90398,90409,1],[90413,90415,1],[92912,92916,1],[92976,92982,1],[94031,94095,64],[94096,94098,1],[94180,113821,19641],[113822,118528,4706],[118529,118573,1],[118576,118598,1],[119143,119145,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[119362,119364,1],[121344,121398,1],[121403,121452,1],[121461,121476,15],[121499,121503,1],[121505,121519,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1],[123023,123184,161],[123185,123190,1],[123566,123628,62],[123629,123631,1],[124140,124143,1],[124398,124399,1],[125136,125142,1],[125252,125258,1],[917760,917999,1]];static foldMn=[[921,953,32],[8126,8126,1]];static N=[[48,57,1],[178,179,1],[185,188,3],[189,190,1],[1632,1641,1],[1776,1785,1],[1984,1993,1],[2406,2415,1],[2534,2543,1],[2548,2553,1],[2662,2671,1],[2790,2799,1],[2918,2927,1],[2930,2935,1],[3046,3058,1],[3174,3183,1],[3192,3198,1],[3302,3311,1],[3416,3422,1],[3430,3448,1],[3558,3567,1],[3664,3673,1],[3792,3801,1],[3872,3891,1],[4160,4169,1],[4240,4249,1],[4969,4988,1],[5870,5872,1],[6112,6121,1],[6128,6137,1],[6160,6169,1],[6470,6479,1],[6608,6618,1],[6784,6793,1],[6800,6809,1],[6992,7001,1],[7088,7097,1],[7232,7241,1],[7248,7257,1],[8304,8308,4],[8309,8313,1],[8320,8329,1],[8528,8578,1],[8581,8585,1],[9312,9371,1],[9450,9471,1],[10102,10131,1],[11517,12295,778],[12321,12329,1],[12344,12346,1],[12690,12693,1],[12832,12841,1],[12872,12879,1],[12881,12895,1],[12928,12937,1],[12977,12991,1],[42528,42537,1],[42726,42735,1],[43056,43061,1],[43216,43225,1],[43264,43273,1],[43472,43481,1],[43504,43513,1],[43600,43609,1],[44016,44025,1],[65296,65305,1],[65799,65843,1],[65856,65912,1],[65930,65931,1],[66273,66299,1],[66336,66339,1],[66369,66378,9],[66513,66517,1],[66720,66729,1],[67672,67679,1],[67705,67711,1],[67751,67759,1],[67835,67839,1],[67862,67867,1],[68028,68029,1],[68032,68047,1],[68050,68095,1],[68160,68168,1],[68221,68222,1],[68253,68255,1],[68331,68335,1],[68440,68447,1],[68472,68479,1],[68521,68527,1],[68858,68863,1],[68912,68921,1],[68928,68937,1],[69216,69246,1],[69405,69414,1],[69457,69460,1],[69573,69579,1],[69714,69743,1],[69872,69881,1],[69942,69951,1],[70096,70105,1],[70113,70132,1],[70384,70393,1],[70736,70745,1],[70864,70873,1],[71248,71257,1],[71360,71369,1],[71376,71395,1],[71472,71483,1],[71904,71922,1],[72016,72025,1],[72688,72697,1],[72784,72812,1],[73040,73049,1],[73120,73129,1],[73552,73561,1],[73664,73684,1],[74752,74862,1],[90416,90425,1],[92768,92777,1],[92864,92873,1],[93008,93017,1],[93019,93025,1],[93552,93561,1],[93824,93846,1],[118000,118009,1],[119488,119507,1],[119520,119539,1],[119648,119672,1],[120782,120831,1],[123200,123209,1],[123632,123641,1],[124144,124153,1],[124401,124410,1],[125127,125135,1],[125264,125273,1],[126065,126123,1],[126125,126127,1],[126129,126132,1],[126209,126253,1],[126255,126269,1],[127232,127244,1],[130032,130041,1]];static Nd=[[48,57,1],[1632,1641,1],[1776,1785,1],[1984,1993,1],[2406,2415,1],[2534,2543,1],[2662,2671,1],[2790,2799,1],[2918,2927,1],[3046,3055,1],[3174,3183,1],[3302,3311,1],[3430,3439,1],[3558,3567,1],[3664,3673,1],[3792,3801,1],[3872,3881,1],[4160,4169,1],[4240,4249,1],[6112,6121,1],[6160,6169,1],[6470,6479,1],[6608,6617,1],[6784,6793,1],[6800,6809,1],[6992,7001,1],[7088,7097,1],[7232,7241,1],[7248,7257,1],[42528,42537,1],[43216,43225,1],[43264,43273,1],[43472,43481,1],[43504,43513,1],[43600,43609,1],[44016,44025,1],[65296,65305,1],[66720,66729,1],[68912,68921,1],[68928,68937,1],[69734,69743,1],[69872,69881,1],[69942,69951,1],[70096,70105,1],[70384,70393,1],[70736,70745,1],[70864,70873,1],[71248,71257,1],[71360,71369,1],[71376,71395,1],[71472,71481,1],[71904,71913,1],[72016,72025,1],[72688,72697,1],[72784,72793,1],[73040,73049,1],[73120,73129,1],[73552,73561,1],[90416,90425,1],[92768,92777,1],[92864,92873,1],[93008,93017,1],[93552,93561,1],[118000,118009,1],[120782,120831,1],[123200,123209,1],[123632,123641,1],[124144,124153,1],[124401,124410,1],[125264,125273,1],[130032,130041,1]];static Nl=[[5870,5872,1],[8544,8578,1],[8581,8584,1],[12295,12321,26],[12322,12329,1],[12344,12346,1],[42726,42735,1],[65856,65908,1],[66369,66378,9],[66513,66517,1],[74752,74862,1]];static No=[[178,179,1],[185,188,3],[189,190,1],[2548,2553,1],[2930,2935,1],[3056,3058,1],[3192,3198,1],[3416,3422,1],[3440,3448,1],[3882,3891,1],[4969,4988,1],[6128,6137,1],[6618,8304,1686],[8308,8313,1],[8320,8329,1],[8528,8543,1],[8585,9312,727],[9313,9371,1],[9450,9471,1],[10102,10131,1],[11517,12690,1173],[12691,12693,1],[12832,12841,1],[12872,12879,1],[12881,12895,1],[12928,12937,1],[12977,12991,1],[43056,43061,1],[65799,65843,1],[65909,65912,1],[65930,65931,1],[66273,66299,1],[66336,66339,1],[67672,67679,1],[67705,67711,1],[67751,67759,1],[67835,67839,1],[67862,67867,1],[68028,68029,1],[68032,68047,1],[68050,68095,1],[68160,68168,1],[68221,68222,1],[68253,68255,1],[68331,68335,1],[68440,68447,1],[68472,68479,1],[68521,68527,1],[68858,68863,1],[69216,69246,1],[69405,69414,1],[69457,69460,1],[69573,69579,1],[69714,69733,1],[70113,70132,1],[71482,71483,1],[71914,71922,1],[72794,72812,1],[73664,73684,1],[93019,93025,1],[93824,93846,1],[119488,119507,1],[119520,119539,1],[119648,119672,1],[125127,125135,1],[126065,126123,1],[126125,126127,1],[126129,126132,1],[126209,126253,1],[126255,126269,1],[127232,127244,1]];static P=[[33,35,1],[37,42,1],[44,47,1],[58,59,1],[63,64,1],[91,93,1],[95,123,28],[125,161,36],[167,171,4],[182,183,1],[187,191,4],[894,903,9],[1370,1375,1],[1417,1418,1],[1470,1472,2],[1475,1478,3],[1523,1524,1],[1545,1546,1],[1548,1549,1],[1563,1565,2],[1566,1567,1],[1642,1645,1],[1748,1792,44],[1793,1805,1],[2039,2041,1],[2096,2110,1],[2142,2404,262],[2405,2416,11],[2557,2678,121],[2800,3191,391],[3204,3572,368],[3663,3674,11],[3675,3844,169],[3845,3858,1],[3860,3898,38],[3899,3901,1],[3973,4048,75],[4049,4052,1],[4057,4058,1],[4170,4175,1],[4347,4960,613],[4961,4968,1],[5120,5742,622],[5787,5788,1],[5867,5869,1],[5941,5942,1],[6100,6102,1],[6104,6106,1],[6144,6154,1],[6468,6469,1],[6686,6687,1],[6816,6822,1],[6824,6829,1],[6990,6991,1],[7002,7008,1],[7037,7039,1],[7164,7167,1],[7227,7231,1],[7294,7295,1],[7360,7367,1],[7379,8208,829],[8209,8231,1],[8240,8259,1],[8261,8273,1],[8275,8286,1],[8317,8318,1],[8333,8334,1],[8968,8971,1],[9001,9002,1],[10088,10101,1],[10181,10182,1],[10214,10223,1],[10627,10648,1],[10712,10715,1],[10748,10749,1],[11513,11516,1],[11518,11519,1],[11632,11776,144],[11777,11822,1],[11824,11855,1],[11858,11869,1],[12289,12291,1],[12296,12305,1],[12308,12319,1],[12336,12349,13],[12448,12539,91],[42238,42239,1],[42509,42511,1],[42611,42622,11],[42738,42743,1],[43124,43127,1],[43214,43215,1],[43256,43258,1],[43260,43310,50],[43311,43359,48],[43457,43469,1],[43486,43487,1],[43612,43615,1],[43742,43743,1],[43760,43761,1],[44011,64830,20819],[64831,65040,209],[65041,65049,1],[65072,65106,1],[65108,65121,1],[65123,65128,5],[65130,65131,1],[65281,65283,1],[65285,65290,1],[65292,65295,1],[65306,65307,1],[65311,65312,1],[65339,65341,1],[65343,65371,28],[65373,65375,2],[65376,65381,1],[65792,65794,1],[66463,66512,49],[66927,67671,744],[67871,67903,32],[68176,68184,1],[68223,68336,113],[68337,68342,1],[68409,68415,1],[68505,68508,1],[68974,69293,319],[69461,69465,1],[69510,69513,1],[69703,69709,1],[69819,69820,1],[69822,69825,1],[69952,69955,1],[70004,70005,1],[70085,70088,1],[70093,70107,14],[70109,70111,1],[70200,70205,1],[70313,70612,299],[70613,70615,2],[70616,70731,115],[70732,70735,1],[70746,70747,1],[70749,70854,105],[71105,71127,1],[71233,71235,1],[71264,71276,1],[71353,71484,131],[71485,71486,1],[71739,72004,265],[72005,72006,1],[72162,72255,93],[72256,72262,1],[72346,72348,1],[72350,72354,1],[72448,72457,1],[72673,72769,96],[72770,72773,1],[72816,72817,1],[73463,73464,1],[73539,73551,1],[73727,74864,1137],[74865,74868,1],[77809,77810,1],[92782,92783,1],[92917,92983,66],[92984,92987,1],[92996,93549,553],[93550,93551,1],[93847,93850,1],[94178,113823,19645],[121479,121483,1],[124415,125278,863],[125279,125279,1]];static Pc=[[95,8255,8160],[8256,8276,20],[65075,65076,1],[65101,65103,1],[65343,65343,1]];static Pd=[[45,1418,1373],[1470,5120,3650],[6150,8208,2058],[8209,8213,1],[11799,11802,3],[11834,11835,1],[11840,11869,29],[12316,12336,20],[12448,65073,52625],[65074,65112,38],[65123,65293,170],[68974,69293,319]];static Pe=[[41,93,52],[125,3899,3774],[3901,5788,1887],[8262,8318,56],[8334,8969,635],[8971,9002,31],[10089,10101,2],[10182,10215,33],[10217,10223,2],[10628,10648,2],[10713,10715,2],[10749,11811,1062],[11813,11817,2],[11862,11868,2],[12297,12305,2],[12309,12315,2],[12318,12319,1],[64830,65048,218],[65078,65092,2],[65096,65114,18],[65116,65118,2],[65289,65341,52],[65373,65379,3]];static Pf=[[187,8217,8030],[8221,8250,29],[11779,11781,2],[11786,11789,3],[11805,11809,4]];static Pi=[[171,8216,8045],[8219,8220,1],[8223,8249,26],[11778,11780,2],[11785,11788,3],[11804,11808,4]];static Po=[[33,35,1],[37,39,1],[42,46,2],[47,58,11],[59,63,4],[64,92,28],[161,167,6],[182,183,1],[191,894,703],[903,1370,467],[1371,1375,1],[1417,1472,55],[1475,1478,3],[1523,1524,1],[1545,1546,1],[1548,1549,1],[1563,1565,2],[1566,1567,1],[1642,1645,1],[1748,1792,44],[1793,1805,1],[2039,2041,1],[2096,2110,1],[2142,2404,262],[2405,2416,11],[2557,2678,121],[2800,3191,391],[3204,3572,368],[3663,3674,11],[3675,3844,169],[3845,3858,1],[3860,3973,113],[4048,4052,1],[4057,4058,1],[4170,4175,1],[4347,4960,613],[4961,4968,1],[5742,5867,125],[5868,5869,1],[5941,5942,1],[6100,6102,1],[6104,6106,1],[6144,6149,1],[6151,6154,1],[6468,6469,1],[6686,6687,1],[6816,6822,1],[6824,6829,1],[6990,6991,1],[7002,7008,1],[7037,7039,1],[7164,7167,1],[7227,7231,1],[7294,7295,1],[7360,7367,1],[7379,8214,835],[8215,8224,9],[8225,8231,1],[8240,8248,1],[8251,8254,1],[8257,8259,1],[8263,8273,1],[8275,8277,2],[8278,8286,1],[11513,11516,1],[11518,11519,1],[11632,11776,144],[11777,11782,5],[11783,11784,1],[11787,11790,3],[11791,11798,1],[11800,11801,1],[11803,11806,3],[11807,11818,11],[11819,11822,1],[11824,11833,1],[11836,11839,1],[11841,11843,2],[11844,11855,1],[11858,11860,1],[12289,12291,1],[12349,12539,190],[42238,42239,1],[42509,42511,1],[42611,42622,11],[42738,42743,1],[43124,43127,1],[43214,43215,1],[43256,43258,1],[43260,43310,50],[43311,43359,48],[43457,43469,1],[43486,43487,1],[43612,43615,1],[43742,43743,1],[43760,43761,1],[44011,65040,21029],[65041,65046,1],[65049,65072,23],[65093,65094,1],[65097,65100,1],[65104,65106,1],[65108,65111,1],[65119,65121,1],[65128,65130,2],[65131,65281,150],[65282,65283,1],[65285,65287,1],[65290,65294,2],[65295,65306,11],[65307,65311,4],[65312,65340,28],[65377,65380,3],[65381,65792,411],[65793,65794,1],[66463,66512,49],[66927,67671,744],[67871,67903,32],[68176,68184,1],[68223,68336,113],[68337,68342,1],[68409,68415,1],[68505,68508,1],[69461,69465,1],[69510,69513,1],[69703,69709,1],[69819,69820,1],[69822,69825,1],[69952,69955,1],[70004,70005,1],[70085,70088,1],[70093,70107,14],[70109,70111,1],[70200,70205,1],[70313,70612,299],[70613,70615,2],[70616,70731,115],[70732,70735,1],[70746,70747,1],[70749,70854,105],[71105,71127,1],[71233,71235,1],[71264,71276,1],[71353,71484,131],[71485,71486,1],[71739,72004,265],[72005,72006,1],[72162,72255,93],[72256,72262,1],[72346,72348,1],[72350,72354,1],[72448,72457,1],[72673,72769,96],[72770,72773,1],[72816,72817,1],[73463,73464,1],[73539,73551,1],[73727,74864,1137],[74865,74868,1],[77809,77810,1],[92782,92783,1],[92917,92983,66],[92984,92987,1],[92996,93549,553],[93550,93551,1],[93847,93850,1],[94178,113823,19645],[121479,121483,1],[124415,125278,863],[125279,125279,1]];static Ps=[[40,91,51],[123,3898,3775],[3900,5787,1887],[8218,8222,4],[8261,8317,56],[8333,8968,635],[8970,9001,31],[10088,10100,2],[10181,10214,33],[10216,10222,2],[10627,10647,2],[10712,10714,2],[10748,11810,1062],[11812,11816,2],[11842,11861,19],[11863,11867,2],[12296,12304,2],[12308,12314,2],[12317,64831,52514],[65047,65077,30],[65079,65091,2],[65095,65113,18],[65115,65117,2],[65288,65339,51],[65371,65375,4],[65378,65378,1]];static S=[[36,43,7],[60,62,1],[94,96,2],[124,126,2],[162,166,1],[168,169,1],[172,174,2],[175,177,1],[180,184,4],[215,247,32],[706,709,1],[722,735,1],[741,747,1],[749,751,2],[752,767,1],[885,900,15],[901,1014,113],[1154,1421,267],[1422,1423,1],[1542,1544,1],[1547,1550,3],[1551,1758,207],[1769,1789,20],[1790,2038,248],[2046,2047,1],[2184,2546,362],[2547,2554,7],[2555,2801,246],[2928,3059,131],[3060,3066,1],[3199,3407,208],[3449,3647,198],[3841,3843,1],[3859,3861,2],[3862,3863,1],[3866,3871,1],[3892,3896,2],[4030,4037,1],[4039,4044,1],[4046,4047,1],[4053,4056,1],[4254,4255,1],[5008,5017,1],[5741,6107,366],[6464,6622,158],[6623,6655,1],[7009,7018,1],[7028,7036,1],[8125,8127,2],[8128,8129,1],[8141,8143,1],[8157,8159,1],[8173,8175,1],[8189,8190,1],[8260,8274,14],[8314,8316,1],[8330,8332,1],[8352,8384,1],[8448,8449,1],[8451,8454,1],[8456,8457,1],[8468,8470,2],[8471,8472,1],[8478,8483,1],[8485,8489,2],[8494,8506,12],[8507,8512,5],[8513,8516,1],[8522,8525,1],[8527,8586,59],[8587,8592,5],[8593,8967,1],[8972,9000,1],[9003,9257,1],[9280,9290,1],[9372,9449,1],[9472,10087,1],[10132,10180,1],[10183,10213,1],[10224,10626,1],[10649,10711,1],[10716,10747,1],[10750,11123,1],[11126,11157,1],[11159,11263,1],[11493,11498,1],[11856,11857,1],[11904,11929,1],[11931,12019,1],[12032,12245,1],[12272,12287,1],[12292,12306,14],[12307,12320,13],[12342,12343,1],[12350,12351,1],[12443,12444,1],[12688,12689,1],[12694,12703,1],[12736,12773,1],[12783,12800,17],[12801,12830,1],[12842,12871,1],[12880,12896,16],[12897,12927,1],[12938,12976,1],[12992,13311,1],[19904,19967,1],[42128,42182,1],[42752,42774,1],[42784,42785,1],[42889,42890,1],[43048,43051,1],[43062,43065,1],[43639,43641,1],[43867,43882,15],[43883,64297,20414],[64434,64450,1],[64832,64847,1],[64975,65020,45],[65021,65023,1],[65122,65124,2],[65125,65126,1],[65129,65284,155],[65291,65308,17],[65309,65310,1],[65342,65344,2],[65372,65374,2],[65504,65510,1],[65512,65518,1],[65532,65533,1],[65847,65855,1],[65913,65929,1],[65932,65934,1],[65936,65948,1],[65952,66000,48],[66001,66044,1],[67703,67704,1],[68296,69006,710],[69007,71487,2480],[73685,73713,1],[92988,92991,1],[92997,113820,20823],[117760,117999,1],[118016,118451,1],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119140,1],[119146,119148,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119296,119361,1],[119365,119552,187],[119553,119638,1],[120513,120539,26],[120571,120597,26],[120629,120655,26],[120687,120713,26],[120745,120771,26],[120832,121343,1],[121399,121402,1],[121453,121460,1],[121462,121475,1],[121477,121478,1],[123215,123647,432],[126124,126128,4],[126254,126704,450],[126705,126976,271],[126977,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127245,127405,1],[127462,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129211,1],[129216,129217,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129673,1],[129679,129734,1],[129742,129756,1],[129759,129769,1],[129776,129784,1],[129792,129938,1],[129940,130031,1]];static Sc=[[36,162,126],[163,165,1],[1423,1547,124],[2046,2047,1],[2546,2547,1],[2555,2801,246],[3065,3647,582],[6107,8352,2245],[8353,8384,1],[43064,65020,21956],[65129,65284,155],[65504,65505,1],[65509,65510,1],[73693,73696,1],[123647,126128,2481]];static Sk=[[94,96,2],[168,175,7],[180,184,4],[706,709,1],[722,735,1],[741,747,1],[749,751,2],[752,767,1],[885,900,15],[901,2184,1283],[8125,8127,2],[8128,8129,1],[8141,8143,1],[8157,8159,1],[8173,8175,1],[8189,8190,1],[12443,12444,1],[42752,42774,1],[42784,42785,1],[42889,42890,1],[43867,43882,15],[43883,64434,20551],[64435,64450,1],[65342,65344,2],[65507,127995,62488],[127996,127999,1]];static Sm=[[43,60,17],[61,62,1],[124,126,2],[172,177,5],[215,247,32],[1014,1542,528],[1543,1544,1],[8260,8274,14],[8314,8316,1],[8330,8332,1],[8472,8512,40],[8513,8516,1],[8523,8592,69],[8593,8596,1],[8602,8603,1],[8608,8614,3],[8622,8654,32],[8655,8658,3],[8660,8692,32],[8693,8959,1],[8992,8993,1],[9084,9115,31],[9116,9139,1],[9180,9185,1],[9655,9665,10],[9720,9727,1],[9839,10176,337],[10177,10180,1],[10183,10213,1],[10224,10239,1],[10496,10626,1],[10649,10711,1],[10716,10747,1],[10750,11007,1],[11056,11076,1],[11079,11084,1],[64297,65122,825],[65124,65126,1],[65291,65308,17],[65309,65310,1],[65372,65374,2],[65506,65513,7],[65514,65516,1],[69006,69007,1],[120513,120539,26],[120571,120597,26],[120629,120655,26],[120687,120713,26],[120745,120771,26],[126704,126705,1]];static So=[[166,169,3],[174,176,2],[1154,1421,267],[1422,1550,128],[1551,1758,207],[1769,1789,20],[1790,2038,248],[2554,2928,374],[3059,3064,1],[3066,3199,133],[3407,3449,42],[3841,3843,1],[3859,3861,2],[3862,3863,1],[3866,3871,1],[3892,3896,2],[4030,4037,1],[4039,4044,1],[4046,4047,1],[4053,4056,1],[4254,4255,1],[5008,5017,1],[5741,6464,723],[6622,6655,1],[7009,7018,1],[7028,7036,1],[8448,8449,1],[8451,8454,1],[8456,8457,1],[8468,8470,2],[8471,8478,7],[8479,8483,1],[8485,8489,2],[8494,8506,12],[8507,8522,15],[8524,8525,1],[8527,8586,59],[8587,8597,10],[8598,8601,1],[8604,8607,1],[8609,8610,1],[8612,8613,1],[8615,8621,1],[8623,8653,1],[8656,8657,1],[8659,8661,2],[8662,8691,1],[8960,8967,1],[8972,8991,1],[8994,9000,1],[9003,9083,1],[9085,9114,1],[9140,9179,1],[9186,9257,1],[9280,9290,1],[9372,9449,1],[9472,9654,1],[9656,9664,1],[9666,9719,1],[9728,9838,1],[9840,10087,1],[10132,10175,1],[10240,10495,1],[11008,11055,1],[11077,11078,1],[11085,11123,1],[11126,11157,1],[11159,11263,1],[11493,11498,1],[11856,11857,1],[11904,11929,1],[11931,12019,1],[12032,12245,1],[12272,12287,1],[12292,12306,14],[12307,12320,13],[12342,12343,1],[12350,12351,1],[12688,12689,1],[12694,12703,1],[12736,12773,1],[12783,12800,17],[12801,12830,1],[12842,12871,1],[12880,12896,16],[12897,12927,1],[12938,12976,1],[12992,13311,1],[19904,19967,1],[42128,42182,1],[43048,43051,1],[43062,43063,1],[43065,43639,574],[43640,43641,1],[64832,64847,1],[64975,65021,46],[65022,65023,1],[65508,65512,4],[65517,65518,1],[65532,65533,1],[65847,65855,1],[65913,65929,1],[65932,65934,1],[65936,65948,1],[65952,66000,48],[66001,66044,1],[67703,67704,1],[68296,71487,3191],[73685,73692,1],[73697,73713,1],[92988,92991,1],[92997,113820,20823],[117760,117999,1],[118016,118451,1],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119140,1],[119146,119148,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119296,119361,1],[119365,119552,187],[119553,119638,1],[120832,121343,1],[121399,121402,1],[121453,121460,1],[121462,121475,1],[121477,121478,1],[123215,126124,2909],[126254,126976,722],[126977,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127245,127405,1],[127462,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,127994,1],[128000,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129211,1],[129216,129217,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129673,1],[129679,129734,1],[129742,129756,1],[129759,129769,1],[129776,129784,1],[129792,129938,1],[129940,130031,1]];static Z=[[32,160,128],[5760,8192,2432],[8193,8202,1],[8232,8233,1],[8239,8287,48],[12288,12288,1]];static Zl=[[8232,8232,1]];static Zp=[[8233,8233,1]];static Zs=[[32,160,128],[5760,8192,2432],[8193,8202,1],[8239,8287,48],[12288,12288,1]];static Adlam=[[125184,125259,1],[125264,125273,1],[125278,125279,1]];static Ahom=[[71424,71450,1],[71453,71467,1],[71472,71494,1]];static Anatolian_Hieroglyphs=[[82944,83526,1]];static Arabic=[[1536,1540,1],[1542,1547,1],[1549,1562,1],[1564,1566,1],[1568,1599,1],[1601,1610,1],[1622,1647,1],[1649,1756,1],[1758,1791,1],[1872,1919,1],[2160,2190,1],[2192,2193,1],[2199,2273,1],[2275,2303,1],[64336,64450,1],[64467,64829,1],[64832,64911,1],[64914,64967,1],[64975,65008,33],[65009,65023,1],[65136,65140,1],[65142,65276,1],[69216,69246,1],[69314,69316,1],[69372,69375,1],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[126704,126705,1]];static Armenian=[[1329,1366,1],[1369,1418,1],[1421,1423,1],[64275,64279,1]];static Avestan=[[68352,68405,1],[68409,68415,1]];static Balinese=[[6912,6988,1],[6990,7039,1]];static Bamum=[[42656,42743,1],[92160,92728,1]];static Bassa_Vah=[[92880,92909,1],[92912,92917,1]];static Batak=[[7104,7155,1],[7164,7167,1]];static Bengali=[[2432,2435,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2492,2500,1],[2503,2504,1],[2507,2510,1],[2519,2524,5],[2525,2527,2],[2528,2531,1],[2534,2558,1]];static Bhaiksuki=[[72704,72712,1],[72714,72758,1],[72760,72773,1],[72784,72812,1]];static Bopomofo=[[746,747,1],[12549,12591,1],[12704,12735,1]];static Brahmi=[[69632,69709,1],[69714,69749,1],[69759,69759,1]];static Braille=[[10240,10495,1]];static Buginese=[[6656,6683,1],[6686,6687,1]];static Buhid=[[5952,5971,1]];static Canadian_Aboriginal=[[5120,5759,1],[6320,6389,1],[72368,72383,1]];static Carian=[[66208,66256,1]];static Caucasian_Albanian=[[66864,66915,1],[66927,66927,1]];static Chakma=[[69888,69940,1],[69942,69959,1]];static Cham=[[43520,43574,1],[43584,43597,1],[43600,43609,1],[43612,43615,1]];static Cherokee=[[5024,5109,1],[5112,5117,1],[43888,43967,1]];static Chorasmian=[[69552,69579,1]];static Common=[[0,64,1],[91,96,1],[123,169,1],[171,185,1],[187,191,1],[215,247,32],[697,735,1],[741,745,1],[748,767,1],[884,894,10],[901,903,2],[1541,1548,7],[1563,1567,4],[1600,1757,157],[2274,2404,130],[2405,3647,1242],[4053,4056,1],[4347,5867,1520],[5868,5869,1],[5941,5942,1],[6146,6147,1],[6149,7379,1230],[7393,7401,8],[7402,7404,1],[7406,7411,1],[7413,7415,1],[7418,8192,774],[8193,8203,1],[8206,8292,1],[8294,8304,1],[8308,8318,1],[8320,8334,1],[8352,8384,1],[8448,8485,1],[8487,8489,1],[8492,8497,1],[8499,8525,1],[8527,8543,1],[8585,8587,1],[8592,9257,1],[9280,9290,1],[9312,10239,1],[10496,11123,1],[11126,11157,1],[11159,11263,1],[11776,11869,1],[12272,12292,1],[12294,12296,2],[12297,12320,1],[12336,12343,1],[12348,12351,1],[12443,12444,1],[12448,12539,91],[12540,12688,148],[12689,12703,1],[12736,12773,1],[12783,12832,49],[12833,12895,1],[12927,13007,1],[13055,13144,89],[13145,13311,1],[19904,19967,1],[42752,42785,1],[42888,42890,1],[43056,43065,1],[43310,43471,161],[43867,43882,15],[43883,64830,20947],[64831,65040,209],[65041,65049,1],[65072,65106,1],[65108,65126,1],[65128,65131,1],[65279,65281,2],[65282,65312,1],[65339,65344,1],[65371,65381,1],[65392,65438,46],[65439,65504,65],[65505,65510,1],[65512,65518,1],[65529,65533,1],[65792,65794,1],[65799,65843,1],[65847,65855,1],[65936,65948,1],[66000,66044,1],[66273,66299,1],[113824,113827,1],[117760,118009,1],[118016,118451,1],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119142,1],[119146,119162,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119488,119507,1],[119520,119539,1],[119552,119638,1],[119648,119672,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119973,3],[119974,119977,3],[119978,119980,1],[119982,119993,1],[119995,119997,2],[119998,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120146,120485,1],[120488,120779,1],[120782,120831,1],[126065,126132,1],[126209,126269,1],[126976,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127232,127405,1],[127462,127487,1],[127489,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129211,1],[129216,129217,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129673,1],[129679,129734,1],[129742,129756,1],[129759,129769,1],[129776,129784,1],[129792,129938,1],[129940,130041,1],[917505,917536,31],[917537,917631,1]];static foldCommon=[[924,956,32]];static Coptic=[[994,1007,1],[11392,11507,1],[11513,11519,1]];static Cuneiform=[[73728,74649,1],[74752,74862,1],[74864,74868,1],[74880,75075,1]];static Cypriot=[[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3]];static Cypro_Minoan=[[77712,77810,1]];static Cyrillic=[[1024,1156,1],[1159,1327,1],[7296,7306,1],[7467,7544,77],[11744,11775,1],[42560,42655,1],[65070,65071,1],[122928,122989,1],[123023,123023,1]];static Deseret=[[66560,66639,1]];static Devanagari=[[2304,2384,1],[2389,2403,1],[2406,2431,1],[43232,43263,1],[72448,72457,1]];static Dives_Akuru=[[71936,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71989,1],[71991,71992,1],[71995,72006,1],[72016,72025,1]];static Dogra=[[71680,71739,1]];static Duployan=[[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[113820,113823,1]];static Egyptian_Hieroglyphs=[[77824,78933,1],[78944,82938,1]];static Elbasan=[[66816,66855,1]];static Elymaic=[[69600,69622,1]];static Ethiopic=[[4608,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4957,4988,1],[4992,5017,1],[11648,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[43777,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[124896,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1]];static Garay=[[68928,68965,1],[68969,68997,1],[69006,69007,1]];static Georgian=[[4256,4293,1],[4295,4301,6],[4304,4346,1],[4348,4351,1],[7312,7354,1],[7357,7359,1],[11520,11557,1],[11559,11565,6]];static Glagolitic=[[11264,11359,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1]];static Gothic=[[66352,66378,1]];static Grantha=[[70400,70403,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70460,70468,1],[70471,70472,1],[70475,70477,1],[70480,70487,7],[70493,70499,1],[70502,70508,1],[70512,70516,1]];static Greek=[[880,883,1],[885,887,1],[890,893,1],[895,900,5],[902,904,2],[905,906,1],[908,910,2],[911,929,1],[931,993,1],[1008,1023,1],[7462,7466,1],[7517,7521,1],[7526,7530,1],[7615,7936,321],[7937,7957,1],[7960,7965,1],[7968,8005,1],[8008,8013,1],[8016,8023,1],[8025,8031,2],[8032,8061,1],[8064,8116,1],[8118,8132,1],[8134,8147,1],[8150,8155,1],[8157,8175,1],[8178,8180,1],[8182,8190,1],[8486,43877,35391],[65856,65934,1],[65952,119296,53344],[119297,119365,1]];static foldGreek=[[181,837,656]];static Gujarati=[[2689,2691,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2748,2757,1],[2759,2761,1],[2763,2765,1],[2768,2784,16],[2785,2787,1],[2790,2801,1],[2809,2815,1]];static Gunjala_Gondi=[[73056,73061,1],[73063,73064,1],[73066,73102,1],[73104,73105,1],[73107,73112,1],[73120,73129,1]];static Gurmukhi=[[2561,2563,1],[2565,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2620,2622,2],[2623,2626,1],[2631,2632,1],[2635,2637,1],[2641,2649,8],[2650,2652,1],[2654,2662,8],[2663,2678,1]];static Gurung_Khema=[[90368,90425,1]];static Han=[[11904,11929,1],[11931,12019,1],[12032,12245,1],[12293,12295,2],[12321,12329,1],[12344,12347,1],[13312,19903,1],[19968,40959,1],[63744,64109,1],[64112,64217,1],[94178,94179,1],[94192,94193,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static Hangul=[[4352,4607,1],[12334,12335,1],[12593,12686,1],[12800,12830,1],[12896,12926,1],[43360,43388,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[65440,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1]];static Hanifi_Rohingya=[[68864,68903,1],[68912,68921,1]];static Hanunoo=[[5920,5940,1]];static Hatran=[[67808,67826,1],[67828,67829,1],[67835,67839,1]];static Hebrew=[[1425,1479,1],[1488,1514,1],[1519,1524,1],[64285,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64335,1]];static Hiragana=[[12353,12438,1],[12445,12447,1],[110593,110879,1],[110898,110928,30],[110929,110930,1],[127488,127488,1]];static Imperial_Aramaic=[[67648,67669,1],[67671,67679,1]];static Inherited=[[768,879,1],[1157,1158,1],[1611,1621,1],[1648,2385,737],[2386,2388,1],[6832,6862,1],[7376,7378,1],[7380,7392,1],[7394,7400,1],[7405,7412,7],[7416,7417,1],[7616,7679,1],[8204,8205,1],[8400,8432,1],[12330,12333,1],[12441,12442,1],[65024,65039,1],[65056,65069,1],[66045,66272,227],[70459,118528,48069],[118529,118573,1],[118576,118598,1],[119143,119145,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[917760,917999,1]];static foldInherited=[[921,953,32],[8126,8126,1]];static Inscriptional_Pahlavi=[[68448,68466,1],[68472,68479,1]];static Inscriptional_Parthian=[[68416,68437,1],[68440,68447,1]];static Javanese=[[43392,43469,1],[43472,43481,1],[43486,43487,1]];static Kaithi=[[69760,69826,1],[69837,69837,1]];static Kannada=[[3200,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3260,3268,1],[3270,3272,1],[3274,3277,1],[3285,3286,1],[3293,3294,1],[3296,3299,1],[3302,3311,1],[3313,3315,1]];static Katakana=[[12449,12538,1],[12541,12543,1],[12784,12799,1],[13008,13054,1],[13056,13143,1],[65382,65391,1],[65393,65437,1],[110576,110579,1],[110581,110587,1],[110589,110590,1],[110592,110880,288],[110881,110882,1],[110933,110948,15],[110949,110951,1]];static Kawi=[[73472,73488,1],[73490,73530,1],[73534,73562,1]];static Kayah_Li=[[43264,43309,1],[43311,43311,1]];static Kharoshthi=[[68096,68099,1],[68101,68102,1],[68108,68115,1],[68117,68119,1],[68121,68149,1],[68152,68154,1],[68159,68168,1],[68176,68184,1]];static Khitan_Small_Script=[[94180,101120,6940],[101121,101589,1],[101631,101631,1]];static Khmer=[[6016,6109,1],[6112,6121,1],[6128,6137,1],[6624,6655,1]];static Khojki=[[70144,70161,1],[70163,70209,1]];static Khudawadi=[[70320,70378,1],[70384,70393,1]];static Kirat_Rai=[[93504,93561,1]];static Lao=[[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3773,1],[3776,3780,1],[3782,3784,2],[3785,3790,1],[3792,3801,1],[3804,3807,1]];static Latin=[[65,90,1],[97,122,1],[170,186,16],[192,214,1],[216,246,1],[248,696,1],[736,740,1],[7424,7461,1],[7468,7516,1],[7522,7525,1],[7531,7543,1],[7545,7614,1],[7680,7935,1],[8305,8319,14],[8336,8348,1],[8490,8491,1],[8498,8526,28],[8544,8584,1],[11360,11391,1],[42786,42887,1],[42891,42957,1],[42960,42961,1],[42963,42965,2],[42966,42972,1],[42994,43007,1],[43824,43866,1],[43868,43876,1],[43878,43881,1],[64256,64262,1],[65313,65338,1],[65345,65370,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[122624,122654,1],[122661,122666,1]];static Lepcha=[[7168,7223,1],[7227,7241,1],[7245,7247,1]];static Limbu=[[6400,6430,1],[6432,6443,1],[6448,6459,1],[6464,6468,4],[6469,6479,1]];static Linear_A=[[67072,67382,1],[67392,67413,1],[67424,67431,1]];static Linear_B=[[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1]];static Lisu=[[42192,42239,1],[73648,73648,1]];static Lycian=[[66176,66204,1]];static Lydian=[[67872,67897,1],[67903,67903,1]];static Mahajani=[[69968,70006,1]];static Makasar=[[73440,73464,1]];static Malayalam=[[3328,3340,1],[3342,3344,1],[3346,3396,1],[3398,3400,1],[3402,3407,1],[3412,3427,1],[3430,3455,1]];static Mandaic=[[2112,2139,1],[2142,2142,1]];static Manichaean=[[68288,68326,1],[68331,68342,1]];static Marchen=[[72816,72847,1],[72850,72871,1],[72873,72886,1]];static Masaram_Gondi=[[72960,72966,1],[72968,72969,1],[72971,73014,1],[73018,73020,2],[73021,73023,2],[73024,73031,1],[73040,73049,1]];static Medefaidrin=[[93760,93850,1]];static Meetei_Mayek=[[43744,43766,1],[43968,44013,1],[44016,44025,1]];static Mende_Kikakui=[[124928,125124,1],[125127,125142,1]];static Meroitic_Cursive=[[68000,68023,1],[68028,68047,1],[68050,68095,1]];static Meroitic_Hieroglyphs=[[67968,67999,1]];static Miao=[[93952,94026,1],[94031,94087,1],[94095,94111,1]];static Modi=[[71168,71236,1],[71248,71257,1]];static Mongolian=[[6144,6145,1],[6148,6150,2],[6151,6169,1],[6176,6264,1],[6272,6314,1],[71264,71276,1]];static Mro=[[92736,92766,1],[92768,92777,1],[92782,92783,1]];static Multani=[[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70313,1]];static Myanmar=[[4096,4255,1],[43488,43518,1],[43616,43647,1],[71376,71395,1]];static Nabataean=[[67712,67742,1],[67751,67759,1]];static Nag_Mundari=[[124112,124153,1]];static Nandinagari=[[72096,72103,1],[72106,72151,1],[72154,72164,1]];static New_Tai_Lue=[[6528,6571,1],[6576,6601,1],[6608,6618,1],[6622,6623,1]];static Newa=[[70656,70747,1],[70749,70753,1]];static Nko=[[1984,2042,1],[2045,2047,1]];static Nushu=[[94177,110960,16783],[110961,111355,1]];static Nyiakeng_Puachue_Hmong=[[123136,123180,1],[123184,123197,1],[123200,123209,1],[123214,123215,1]];static Ogham=[[5760,5788,1]];static Ol_Chiki=[[7248,7295,1]];static Ol_Onal=[[124368,124410,1],[124415,124415,1]];static Old_Hungarian=[[68736,68786,1],[68800,68850,1],[68858,68863,1]];static Old_Italic=[[66304,66339,1],[66349,66351,1]];static Old_North_Arabian=[[68224,68255,1]];static Old_Permic=[[66384,66426,1]];static Old_Persian=[[66464,66499,1],[66504,66517,1]];static Old_Sogdian=[[69376,69415,1]];static Old_South_Arabian=[[68192,68223,1]];static Old_Turkic=[[68608,68680,1]];static Old_Uyghur=[[69488,69513,1]];static Oriya=[[2817,2819,1],[2821,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2876,2884,1],[2887,2888,1],[2891,2893,1],[2901,2903,1],[2908,2909,1],[2911,2915,1],[2918,2935,1]];static Osage=[[66736,66771,1],[66776,66811,1]];static Osmanya=[[66688,66717,1],[66720,66729,1]];static Pahawh_Hmong=[[92928,92997,1],[93008,93017,1],[93019,93025,1],[93027,93047,1],[93053,93071,1]];static Palmyrene=[[67680,67711,1]];static Pau_Cin_Hau=[[72384,72440,1]];static Phags_Pa=[[43072,43127,1]];static Phoenician=[[67840,67867,1],[67871,67871,1]];static Psalter_Pahlavi=[[68480,68497,1],[68505,68508,1],[68521,68527,1]];static Rejang=[[43312,43347,1],[43359,43359,1]];static Runic=[[5792,5866,1],[5870,5880,1]];static Samaritan=[[2048,2093,1],[2096,2110,1]];static Saurashtra=[[43136,43205,1],[43214,43225,1]];static Sharada=[[70016,70111,1]];static Shavian=[[66640,66687,1]];static Siddham=[[71040,71093,1],[71096,71133,1]];static SignWriting=[[120832,121483,1],[121499,121503,1],[121505,121519,1]];static Sinhala=[[3457,3459,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3530,3535,5],[3536,3540,1],[3542,3544,2],[3545,3551,1],[3558,3567,1],[3570,3572,1],[70113,70132,1]];static Sogdian=[[69424,69465,1]];static Sora_Sompeng=[[69840,69864,1],[69872,69881,1]];static Soyombo=[[72272,72354,1]];static Sundanese=[[7040,7103,1],[7360,7367,1]];static Sunuwar=[[72640,72673,1],[72688,72697,1]];static Syloti_Nagri=[[43008,43052,1]];static Syriac=[[1792,1805,1],[1807,1866,1],[1869,1871,1],[2144,2154,1]];static Tagalog=[[5888,5909,1],[5919,5919,1]];static Tagbanwa=[[5984,5996,1],[5998,6000,1],[6002,6003,1]];static Tai_Le=[[6480,6509,1],[6512,6516,1]];static Tai_Tham=[[6688,6750,1],[6752,6780,1],[6783,6793,1],[6800,6809,1],[6816,6829,1]];static Tai_Viet=[[43648,43714,1],[43739,43743,1]];static Takri=[[71296,71353,1],[71360,71369,1]];static Tamil=[[2946,2947,1],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3006,3010,1],[3014,3016,1],[3018,3021,1],[3024,3031,7],[3046,3066,1],[73664,73713,1],[73727,73727,1]];static Tangsa=[[92784,92862,1],[92864,92873,1]];static Tangut=[[94176,94208,32],[94209,100343,1],[100352,101119,1],[101632,101640,1]];static Telugu=[[3072,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3132,3140,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3160,3162,1],[3165,3168,3],[3169,3171,1],[3174,3183,1],[3191,3199,1]];static Thaana=[[1920,1969,1]];static Thai=[[3585,3642,1],[3648,3675,1]];static Tibetan=[[3840,3911,1],[3913,3948,1],[3953,3991,1],[3993,4028,1],[4030,4044,1],[4046,4052,1],[4057,4058,1]];static Tifinagh=[[11568,11623,1],[11631,11632,1],[11647,11647,1]];static Tirhuta=[[70784,70855,1],[70864,70873,1]];static Todhri=[[67008,67059,1]];static Toto=[[123536,123566,1]];static Tulu_Tigalari=[[70528,70537,1],[70539,70542,3],[70544,70581,1],[70583,70592,1],[70594,70597,3],[70599,70602,1],[70604,70613,1],[70615,70616,1],[70625,70626,1]];static Ugaritic=[[66432,66461,1],[66463,66463,1]];static Vai=[[42240,42539,1]];static Vithkuqi=[[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1]];static Wancho=[[123584,123641,1],[123647,123647,1]];static Warang_Citi=[[71840,71922,1],[71935,71935,1]];static Yezidi=[[69248,69289,1],[69291,69293,1],[69296,69297,1]];static Yi=[[40960,42124,1],[42128,42182,1]];static Zanabazar_Square=[[72192,72263,1]];static CATEGORIES=(()=>new Map([["C",W.C],["Cc",W.Cc],["Cf",W.Cf],["Co",W.Co],["Cs",W.Cs],["L",W.L],["Ll",W.Ll],["Lm",W.Lm],["Lo",W.Lo],["Lt",W.Lt],["Lu",W.Lu],["M",W.M],["Mc",W.Mc],["Me",W.Me],["Mn",W.Mn],["N",W.N],["Nd",W.Nd],["Nl",W.Nl],["No",W.No],["P",W.P],["Pc",W.Pc],["Pd",W.Pd],["Pe",W.Pe],["Pf",W.Pf],["Pi",W.Pi],["Po",W.Po],["Ps",W.Ps],["S",W.S],["Sc",W.Sc],["Sk",W.Sk],["Sm",W.Sm],["So",W.So],["Z",W.Z],["Zl",W.Zl],["Zp",W.Zp],["Zs",W.Zs]]))();static SCRIPTS=(()=>new Map([["Adlam",W.Adlam],["Ahom",W.Ahom],["Anatolian_Hieroglyphs",W.Anatolian_Hieroglyphs],["Arabic",W.Arabic],["Armenian",W.Armenian],["Avestan",W.Avestan],["Balinese",W.Balinese],["Bamum",W.Bamum],["Bassa_Vah",W.Bassa_Vah],["Batak",W.Batak],["Bengali",W.Bengali],["Bhaiksuki",W.Bhaiksuki],["Bopomofo",W.Bopomofo],["Brahmi",W.Brahmi],["Braille",W.Braille],["Buginese",W.Buginese],["Buhid",W.Buhid],["Canadian_Aboriginal",W.Canadian_Aboriginal],["Carian",W.Carian],["Caucasian_Albanian",W.Caucasian_Albanian],["Chakma",W.Chakma],["Cham",W.Cham],["Cherokee",W.Cherokee],["Chorasmian",W.Chorasmian],["Common",W.Common],["Coptic",W.Coptic],["Cuneiform",W.Cuneiform],["Cypriot",W.Cypriot],["Cypro_Minoan",W.Cypro_Minoan],["Cyrillic",W.Cyrillic],["Deseret",W.Deseret],["Devanagari",W.Devanagari],["Dives_Akuru",W.Dives_Akuru],["Dogra",W.Dogra],["Duployan",W.Duployan],["Egyptian_Hieroglyphs",W.Egyptian_Hieroglyphs],["Elbasan",W.Elbasan],["Elymaic",W.Elymaic],["Ethiopic",W.Ethiopic],["Garay",W.Garay],["Georgian",W.Georgian],["Glagolitic",W.Glagolitic],["Gothic",W.Gothic],["Grantha",W.Grantha],["Greek",W.Greek],["Gujarati",W.Gujarati],["Gunjala_Gondi",W.Gunjala_Gondi],["Gurmukhi",W.Gurmukhi],["Gurung_Khema",W.Gurung_Khema],["Han",W.Han],["Hangul",W.Hangul],["Hanifi_Rohingya",W.Hanifi_Rohingya],["Hanunoo",W.Hanunoo],["Hatran",W.Hatran],["Hebrew",W.Hebrew],["Hiragana",W.Hiragana],["Imperial_Aramaic",W.Imperial_Aramaic],["Inherited",W.Inherited],["Inscriptional_Pahlavi",W.Inscriptional_Pahlavi],["Inscriptional_Parthian",W.Inscriptional_Parthian],["Javanese",W.Javanese],["Kaithi",W.Kaithi],["Kannada",W.Kannada],["Katakana",W.Katakana],["Kawi",W.Kawi],["Kayah_Li",W.Kayah_Li],["Kharoshthi",W.Kharoshthi],["Khitan_Small_Script",W.Khitan_Small_Script],["Khmer",W.Khmer],["Khojki",W.Khojki],["Khudawadi",W.Khudawadi],["Kirat_Rai",W.Kirat_Rai],["Lao",W.Lao],["Latin",W.Latin],["Lepcha",W.Lepcha],["Limbu",W.Limbu],["Linear_A",W.Linear_A],["Linear_B",W.Linear_B],["Lisu",W.Lisu],["Lycian",W.Lycian],["Lydian",W.Lydian],["Mahajani",W.Mahajani],["Makasar",W.Makasar],["Malayalam",W.Malayalam],["Mandaic",W.Mandaic],["Manichaean",W.Manichaean],["Marchen",W.Marchen],["Masaram_Gondi",W.Masaram_Gondi],["Medefaidrin",W.Medefaidrin],["Meetei_Mayek",W.Meetei_Mayek],["Mende_Kikakui",W.Mende_Kikakui],["Meroitic_Cursive",W.Meroitic_Cursive],["Meroitic_Hieroglyphs",W.Meroitic_Hieroglyphs],["Miao",W.Miao],["Modi",W.Modi],["Mongolian",W.Mongolian],["Mro",W.Mro],["Multani",W.Multani],["Myanmar",W.Myanmar],["Nabataean",W.Nabataean],["Nag_Mundari",W.Nag_Mundari],["Nandinagari",W.Nandinagari],["New_Tai_Lue",W.New_Tai_Lue],["Newa",W.Newa],["Nko",W.Nko],["Nushu",W.Nushu],["Nyiakeng_Puachue_Hmong",W.Nyiakeng_Puachue_Hmong],["Ogham",W.Ogham],["Ol_Chiki",W.Ol_Chiki],["Ol_Onal",W.Ol_Onal],["Old_Hungarian",W.Old_Hungarian],["Old_Italic",W.Old_Italic],["Old_North_Arabian",W.Old_North_Arabian],["Old_Permic",W.Old_Permic],["Old_Persian",W.Old_Persian],["Old_Sogdian",W.Old_Sogdian],["Old_South_Arabian",W.Old_South_Arabian],["Old_Turkic",W.Old_Turkic],["Old_Uyghur",W.Old_Uyghur],["Oriya",W.Oriya],["Osage",W.Osage],["Osmanya",W.Osmanya],["Pahawh_Hmong",W.Pahawh_Hmong],["Palmyrene",W.Palmyrene],["Pau_Cin_Hau",W.Pau_Cin_Hau],["Phags_Pa",W.Phags_Pa],["Phoenician",W.Phoenician],["Psalter_Pahlavi",W.Psalter_Pahlavi],["Rejang",W.Rejang],["Runic",W.Runic],["Samaritan",W.Samaritan],["Saurashtra",W.Saurashtra],["Sharada",W.Sharada],["Shavian",W.Shavian],["Siddham",W.Siddham],["SignWriting",W.SignWriting],["Sinhala",W.Sinhala],["Sogdian",W.Sogdian],["Sora_Sompeng",W.Sora_Sompeng],["Soyombo",W.Soyombo],["Sundanese",W.Sundanese],["Sunuwar",W.Sunuwar],["Syloti_Nagri",W.Syloti_Nagri],["Syriac",W.Syriac],["Tagalog",W.Tagalog],["Tagbanwa",W.Tagbanwa],["Tai_Le",W.Tai_Le],["Tai_Tham",W.Tai_Tham],["Tai_Viet",W.Tai_Viet],["Takri",W.Takri],["Tamil",W.Tamil],["Tangsa",W.Tangsa],["Tangut",W.Tangut],["Telugu",W.Telugu],["Thaana",W.Thaana],["Thai",W.Thai],["Tibetan",W.Tibetan],["Tifinagh",W.Tifinagh],["Tirhuta",W.Tirhuta],["Todhri",W.Todhri],["Toto",W.Toto],["Tulu_Tigalari",W.Tulu_Tigalari],["Ugaritic",W.Ugaritic],["Vai",W.Vai],["Vithkuqi",W.Vithkuqi],["Wancho",W.Wancho],["Warang_Citi",W.Warang_Citi],["Yezidi",W.Yezidi],["Yi",W.Yi],["Zanabazar_Square",W.Zanabazar_Square]]))();static FOLD_CATEGORIES=(()=>new Map([["L",W.foldL],["Ll",W.foldLl],["Lt",W.foldLt],["Lu",W.foldLu],["M",W.foldM],["Mn",W.foldMn]]))();static FOLD_SCRIPT=(()=>new Map([["Common",W.foldCommon],["Greek",W.foldGreek],["Inherited",W.foldInherited]]))()}class u${static MAX_RUNE=1114111;static MAX_ASCII=127;static MAX_LATIN1=255;static MAX_BMP=65535;static MIN_FOLD=65;static MAX_FOLD=125251;static is32($,X){let Y=0,H=$.length;while(Y<H){let Q=Y+Math.floor((H-Y)/2),q=$[Q];if(q[0]<=X&&X<=q[1])return(X-q[0])%q[2]===0;if(X<q[0])H=Q;else Y=Q+1}return!1}static is($,X){if(X<=this.MAX_LATIN1){for(let Y of $){if(X>Y[1])continue;if(X<Y[0])return!1;return(X-Y[0])%Y[2]===0}return!1}return $.length>0&&X>=$[0][0]&&this.is32($,X)}static isUpper($){if($<=this.MAX_LATIN1){let X=String.fromCodePoint($);return X.toUpperCase()===X&&X.toLowerCase()!==X}return this.is(W.Upper,$)}static isPrint($){if($<=this.MAX_LATIN1)return $>=32&&$<127||$>=161&&$!==173;return this.is(W.L,$)||this.is(W.M,$)||this.is(W.N,$)||this.is(W.P,$)||this.is(W.S,$)}static simpleFold($){if(W.CASE_ORBIT.has($))return W.CASE_ORBIT.get($);let X=k.toLowerCase($);if(X!==$)return X;return k.toUpperCase($)}static equalsIgnoreCase($,X){if($<0||X<0||$===X)return!0;if($<=this.MAX_ASCII&&X<=this.MAX_ASCII){if(k.CODES.get("A")<=$&&$<=k.CODES.get("Z"))$|=32;if(k.CODES.get("A")<=X&&X<=k.CODES.get("Z"))X|=32;return $===X}for(let Y=this.simpleFold($);Y!==$;Y=this.simpleFold(Y))if(Y===X)return!0;return!1}}class M${static METACHARACTERS="\\.+*?()|[]{}^$";static EMPTY_BEGIN_LINE=1;static EMPTY_END_LINE=2;static EMPTY_BEGIN_TEXT=4;static EMPTY_END_TEXT=8;static EMPTY_WORD_BOUNDARY=16;static EMPTY_NO_WORD_BOUNDARY=32;static EMPTY_ALL=(()=>-1)();static emptyInts(){return[]}static isalnum($){return k.CODES.get("0")<=$&&$<=k.CODES.get("9")||k.CODES.get("a")<=$&&$<=k.CODES.get("z")||k.CODES.get("A")<=$&&$<=k.CODES.get("Z")}static unhex($){if(k.CODES.get("0")<=$&&$<=k.CODES.get("9"))return $-k.CODES.get("0");if(k.CODES.get("a")<=$&&$<=k.CODES.get("f"))return $-k.CODES.get("a")+10;if(k.CODES.get("A")<=$&&$<=k.CODES.get("F"))return $-k.CODES.get("A")+10;return-1}static escapeRune($){let X="";if(u$.isPrint($)){if(this.METACHARACTERS.indexOf(String.fromCodePoint($))>=0)X+="\\";X+=String.fromCodePoint($)}else switch($){case k.CODES.get('"'):X+="\\\"";break;case k.CODES.get("\\"):X+="\\\\";break;case k.CODES.get("\t"):X+="\\t";break;case k.CODES.get(`
|
|
12
|
-
`):
|
|
13
|
-
`))
|
|
14
|
-
`))Y|=this.EMPTY_END_LINE;if(this.isWordRune($)!==this.isWordRune(X))Y|=this.EMPTY_WORD_BOUNDARY;else Y|=this.EMPTY_NO_WORD_BOUNDARY;return Y}static quoteMeta($){return $.split("").map((X)=>{if(this.METACHARACTERS.indexOf(X)>=0)return`\\${X}`;return X}).join("")}static charCount($){return $>u$.MAX_BMP?2:1}static stringToUtf8ByteArray($){if(globalThis.TextEncoder)return Array.from(new TextEncoder().encode($));else{let X=[],Y=0;for(let H=0;H<$.length;H++){let Q=$.charCodeAt(H);if(Q<128)X[Y++]=Q;else if(Q<2048)X[Y++]=Q>>6|192,X[Y++]=Q&63|128;else if((Q&64512)===55296&&H+1<$.length&&($.charCodeAt(H+1)&64512)===56320)Q=65536+((Q&1023)<<10)+($.charCodeAt(++H)&1023),X[Y++]=Q>>18|240,X[Y++]=Q>>12&63|128,X[Y++]=Q>>6&63|128,X[Y++]=Q&63|128;else X[Y++]=Q>>12|224,X[Y++]=Q>>6&63|128,X[Y++]=Q&63|128}return X}}static utf8ByteArrayToString($){if(globalThis.TextDecoder)return new TextDecoder("utf-8").decode(new Uint8Array($));else{let X=[],Y=0,H=0;while(Y<$.length){let Q=$[Y++];if(Q<128)X[H++]=String.fromCharCode(Q);else if(Q>191&&Q<224){let q=$[Y++];X[H++]=String.fromCharCode((Q&31)<<6|q&63)}else if(Q>239&&Q<365){let q=$[Y++],B=$[Y++],V=$[Y++],J=((Q&7)<<18|(q&63)<<12|(B&63)<<6|V&63)-65536;X[H++]=String.fromCharCode(55296+(J>>10)),X[H++]=String.fromCharCode(56320+(J&1023))}else{let q=$[Y++],B=$[Y++];X[H++]=String.fromCharCode((Q&15)<<12|(q&63)<<6|B&63)}}return X.join("")}}}var _0=($=[],X=0)=>{let Y={};for(let H=0;H<$.length;H++){let Q=$[H],q=X+H;Y[Q]=q,Y[q]=Q}return Object.freeze(Y)};class Q_{static Encoding=(()=>_0(["UTF_16","UTF_8"]))();getEncoding(){throw Error("not implemented")}isUTF8Encoding(){return this.getEncoding()===Q_.Encoding.UTF_8}isUTF16Encoding(){return this.getEncoding()===Q_.Encoding.UTF_16}}class w{static Op=(()=>_0(["NO_MATCH","EMPTY_MATCH","LITERAL","CHAR_CLASS","ANY_CHAR_NOT_NL","ANY_CHAR","BEGIN_LINE","END_LINE","BEGIN_TEXT","END_TEXT","WORD_BOUNDARY","NO_WORD_BOUNDARY","CAPTURE","STAR","PLUS","QUEST","REPEAT","CONCAT","ALTERNATE","LEFT_PAREN","VERTICAL_BAR"]))();static isPseudoOp($){return $>=w.Op.LEFT_PAREN}static emptySubs(){return[]}static quoteIfHyphen($){if($===k.CODES.get("-"))return"\\";return""}static fromRegexp($){let X=new w($.op);return X.flags=$.flags,X.subs=$.subs,X.runes=$.runes,X.cap=$.cap,X.min=$.min,X.max=$.max,X.name=$.name,X.namedGroups=$.namedGroups,X}constructor($){this.op=$,this.flags=0,this.subs=w.emptySubs(),this.runes=[],this.min=0,this.max=0,this.cap=0,this.name=null,this.namedGroups={}}reinit(){this.flags=0,this.subs=w.emptySubs(),this.runes=[],this.cap=0,this.min=0,this.max=0,this.name=null,this.namedGroups={}}toString(){return this.appendTo()}appendTo(){let $="";switch(this.op){case w.Op.NO_MATCH:$+="[^\\x00-\\x{10FFFF}]";break;case w.Op.EMPTY_MATCH:$+="(?:)";break;case w.Op.STAR:case w.Op.PLUS:case w.Op.QUEST:case w.Op.REPEAT:{let X=this.subs[0];if(X.op>w.Op.CAPTURE||X.op===w.Op.LITERAL&&X.runes.length>1)$+=`(?:${X.appendTo()})`;else $+=X.appendTo();switch(this.op){case w.Op.STAR:$+="*";break;case w.Op.PLUS:$+="+";break;case w.Op.QUEST:$+="?";break;case w.Op.REPEAT:if($+=`{${this.min}`,this.min!==this.max){if($+=",",this.max>=0)$+=this.max}$+="}";break}if((this.flags&C.NON_GREEDY)!==0)$+="?";break}case w.Op.CONCAT:{for(let X of this.subs)if(X.op===w.Op.ALTERNATE)$+=`(?:${X.appendTo()})`;else $+=X.appendTo();break}case w.Op.ALTERNATE:{let X="";for(let Y of this.subs)$+=X,X="|",$+=Y.appendTo();break}case w.Op.LITERAL:if((this.flags&C.FOLD_CASE)!==0)$+="(?i:";for(let X of this.runes)$+=M$.escapeRune(X);if((this.flags&C.FOLD_CASE)!==0)$+=")";break;case w.Op.ANY_CHAR_NOT_NL:$+="(?-s:.)";break;case w.Op.ANY_CHAR:$+="(?s:.)";break;case w.Op.CAPTURE:if(this.name===null||this.name.length===0)$+="(";else $+=`(?P<${this.name}>`;if(this.subs[0].op!==w.Op.EMPTY_MATCH)$+=this.subs[0].appendTo();$+=")";break;case w.Op.BEGIN_TEXT:$+="\\A";break;case w.Op.END_TEXT:if((this.flags&C.WAS_DOLLAR)!==0)$+="(?-m:$)";else $+="\\z";break;case w.Op.BEGIN_LINE:$+="^";break;case w.Op.END_LINE:$+="$";break;case w.Op.WORD_BOUNDARY:$+="\\b";break;case w.Op.NO_WORD_BOUNDARY:$+="\\B";break;case w.Op.CHAR_CLASS:if(this.runes.length%2!==0){$+="[invalid char class]";break}if($+="[",this.runes.length===0)$+="^\\x00-\\x{10FFFF}";else if(this.runes[0]===0&&this.runes[this.runes.length-1]===u$.MAX_RUNE){$+="^";for(let X=1;X<this.runes.length-1;X+=2){let Y=this.runes[X]+1,H=this.runes[X+1]-1;if($+=w.quoteIfHyphen(Y),$+=M$.escapeRune(Y),Y!==H)$+="-",$+=w.quoteIfHyphen(H),$+=M$.escapeRune(H)}}else for(let X=0;X<this.runes.length;X+=2){let Y=this.runes[X],H=this.runes[X+1];if($+=w.quoteIfHyphen(Y),$+=M$.escapeRune(Y),Y!==H)$+="-",$+=w.quoteIfHyphen(H),$+=M$.escapeRune(H)}$+="]";break;default:$+=this.op;break}return $}maxCap(){let $=0;if(this.op===w.Op.CAPTURE)$=this.cap;if(this.subs!==null)for(let X of this.subs){let Y=X.maxCap();if($<Y)$=Y}return $}equals($){if(!($!==null&&$ instanceof w))return!1;if(this.op!==$.op)return!1;switch(this.op){case w.Op.END_TEXT:{if((this.flags&C.WAS_DOLLAR)!==($.flags&C.WAS_DOLLAR))return!1;break}case w.Op.LITERAL:case w.Op.CHAR_CLASS:{if(this.runes===null&&$.runes===null)break;if(this.runes===null||$.runes===null)return!1;if(this.runes.length!==$.runes.length)return!1;for(let X=0;X<this.runes.length;X++)if(this.runes[X]!==$.runes[X])return!1;break}case w.Op.ALTERNATE:case w.Op.CONCAT:{if(this.subs.length!==$.subs.length)return!1;for(let X=0;X<this.subs.length;++X)if(!this.subs[X].equals($.subs[X]))return!1;break}case w.Op.STAR:case w.Op.PLUS:case w.Op.QUEST:{if((this.flags&C.NON_GREEDY)!==($.flags&C.NON_GREEDY)||!this.subs[0].equals($.subs[0]))return!1;break}case w.Op.REPEAT:{if((this.flags&C.NON_GREEDY)!==($.flags&C.NON_GREEDY)||this.min!==$.min||this.max!==$.max||!this.subs[0].equals($.subs[0]))return!1;break}case w.Op.CAPTURE:{if(this.cap!==$.cap||(this.name===null?$.name!==null:this.name!==$.name)||!this.subs[0].equals($.subs[0]))return!1;break}}return!0}}class P{constructor($,X){this.sign=$,this.cls=X}}var x_=[48,57],g_=[9,10,12,13,32,32],m_=[48,57,65,90,95,95,97,122],AQ=new Map([["\\d",new P(1,x_)],["\\D",new P(-1,x_)],["\\s",new P(1,g_)],["\\S",new P(-1,g_)],["\\w",new P(1,m_)],["\\W",new P(-1,m_)]]),u_=[48,57,65,90,97,122],l_=[65,90,97,122],p_=[0,127],d_=[9,9,32,32],c_=[0,31,127,127],i_=[48,57],n_=[33,126],o_=[97,122],r_=[32,126],s_=[33,47,58,64,91,96,123,126],a_=[9,13,32,32],t_=[65,90],e_=[48,57,65,90,95,95,97,122],$0=[48,57,65,70,97,102],wQ=new Map([["[:alnum:]",new P(1,u_)],["[:^alnum:]",new P(-1,u_)],["[:alpha:]",new P(1,l_)],["[:^alpha:]",new P(-1,l_)],["[:ascii:]",new P(1,p_)],["[:^ascii:]",new P(-1,p_)],["[:blank:]",new P(1,d_)],["[:^blank:]",new P(-1,d_)],["[:cntrl:]",new P(1,c_)],["[:^cntrl:]",new P(-1,c_)],["[:digit:]",new P(1,i_)],["[:^digit:]",new P(-1,i_)],["[:graph:]",new P(1,n_)],["[:^graph:]",new P(-1,n_)],["[:lower:]",new P(1,o_)],["[:^lower:]",new P(-1,o_)],["[:print:]",new P(1,r_)],["[:^print:]",new P(-1,r_)],["[:punct:]",new P(1,s_)],["[:^punct:]",new P(-1,s_)],["[:space:]",new P(1,a_)],["[:^space:]",new P(-1,a_)],["[:upper:]",new P(1,t_)],["[:^upper:]",new P(-1,t_)],["[:word:]",new P(1,e_)],["[:^word:]",new P(-1,e_)],["[:xdigit:]",new P(1,$0)],["[:^xdigit:]",new P(-1,$0)]]);class H_ extends Error{constructor($,X){super($);this.name="BetterAuthError",this.message=$,this.cause=X,this.stack=""}}function x6($){return{authorize(X,Y="AND"){let H=!1;for(let[Q,q]of Object.entries(X)){let B=$[Q];if(!B)return{success:!1,error:`You are not allowed to access resource: ${Q}`};if(Array.isArray(q))H=q.every((V)=>B.includes(V));else if(typeof q==="object"){let V=q;if(V.connector==="OR")H=V.actions.some((J)=>B.includes(J));else H=V.actions.every((J)=>B.includes(J))}else throw new H_("Invalid access control request");if(H&&Y==="OR")return{success:H};if(!H&&Y==="AND")return{success:!1,error:`unauthorized to access resource "${Q}"`}}if(H)return{success:H};return{success:!1,error:"Not authorized"}},statements:$}}function l$($){return{newRole(X){return x6(X)},statements:$}}var W_={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"]},q_=l$(W_),X0=q_.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"]}),Y0=q_.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"]}),Q0=q_.newRole({organization:[],member:[],invitation:[],team:[]});var g6={...W_,project:["create","read","update","delete"]},p$=l$(g6),bQ=p$.newRole({project:["create","read","update","delete"],...Y0.statements}),zQ=p$.newRole({project:["create","read","update","delete"],...X0.statements}),TQ=p$.newRole({project:["create","read","update"],...Q0.statements}),yQ=p$.newRole({project:["read"]});function m6($){switch($.toLowerCase()){case"google":return"https://www.google.com";case"bing":return"https://www.bing.com";case"yahoo":return"https://www.yahoo.com";case"facebook":return"https://www.facebook.com";case"twitter":case"x":return"https://twitter.com";case"instagram":return"https://www.instagram.com";case"linkedin":return"https://www.linkedin.com";case"youtube":return"https://www.youtube.com";case"pinterest":return"https://www.pinterest.com";case"reddit":return"https://www.reddit.com";case"tiktok":return"https://www.tiktok.com";case"snapchat":return"https://www.snapchat.com";default:return null}}function H0($){if(!$||$.trim()==="")return null;let X=$.trim();if(X==="/"||X==="direct")return null;try{return new URL(X),X}catch(Y){if(X.includes(".")){if(X.startsWith("http"))return X;else if(X.match(/^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(\/.*)?$/))return`https://${X}`}let H=m6(X);if(H)return H;return X}}var u6;((f)=>(f.User=e$,f.Users=I_,f.Organization=t$,f.Organizations=g$,f.Member=a$,f.Members=x$,f.Event=P_,f.Events=S_,f.Workspace=f_))(u6||={});function l6(){if(z())return{};let $={},X=L().location,Y="";if("search"in X)Y=X.search;else if("href"in X&&X.href)Y=new URL(X.href).search;if(Y){let H=new URLSearchParams(Y);for(let[Q,q]of H.entries())$[Q]=q}return $}function Z$(){let $=Z().referrer,X=l6(),Y=X.utm_source||X.source||X.ref||X.utm_medium||X.utm_campaign||X.utm_content,H="";if($&&$.trim()!=="")H=$;else if(Y){let Q=H0(Y);if(Q)H=Q}return H}class B_{#X;#$;#_;#Q;#W;#q;#B;#Y;#V;#H;#v;#E;#P;#S;#I;#O;#f;#j;#w;#J;#M;#L;#F;#D;#Z;#K;#N;#U;#z=60000;#G;#A=!1;#C;#R;#b=[];#k;constructor($,X=y){this.#X=$,this.#k=X,this.#$=new Set,this.#_=0,this.#O=null,this.#f=L().location.href,this.#j=new Map,this.#w=new WeakMap,this.#J=new WeakMap,this.#M=Date.now(),this.#L=0,this.#F=this.#M,this.#D=Z().hidden,this.#Z=Date.now(),this.#K=null,this.#N=!1,this.#G=null,this.#Q=this.handleClick.bind(this),this.#W=this.handleScroll.bind(this),this.#q=this.handleScroll.bind(this),this.#B=this.handleInputFocus.bind(this),this.#Y=this.handleInputBlur.bind(this),this.#V=this.handleFormChange.bind(this),this.#H=this.handleFormSubmit.bind(this),this.#v=this.handleVideoPlay.bind(this),this.#E=this.handleVideoPause.bind(this),this.#P=this.handleVideoEnd.bind(this),this.#S=this.handleVisibilityChange.bind(this),this.#I=this.handleBeforeUnload.bind(this),this.#U=this.handleUserActivity.bind(this),this.#C=this.handleError.bind(this),this.#R=this.handleRejection.bind(this);let Y=this.#k.autoTrack??y.autoTrack;if(typeof Y==="boolean"){if(Y)this.setupClickTracking(),this.setupScrollTracking(),this.setupFormTracking(),this.setupVideoTracking(),this.setupPageTimeTracking(),this.setupInactivityTracking(),this.setupPerformanceTracking()}else{if(Y.clicks!==!1)this.setupClickTracking();if(Y.scrolling!==!1)this.setupScrollTracking();if(Y.forms!==!1)this.setupFormTracking();if(Y.videos!==!1)this.setupVideoTracking();if(Y.pageVisibility!==!1)this.setupPageTimeTracking();if(Y.pageInactivity!==!1)this.setupInactivityTracking();if(Y.performance!==!1)this.setupPerformanceTracking()}}destroy(){if(L().removeEventListener("click",this.#Q),L().removeEventListener("scroll",this.#W),L().removeEventListener("resize",this.#q),L().removeEventListener("focus",this.#B,!0),L().removeEventListener("blur",this.#Y,!0),L().removeEventListener("change",this.#V,!0),L().removeEventListener("submit",this.#H,!0),L().removeEventListener("play",this.#v,!0),L().removeEventListener("pause",this.#E,!0),L().removeEventListener("ended",this.#P,!0),L().removeEventListener("visibilitychange",this.#S),L().removeEventListener("beforeunload",this.#I),this.#O)L().clearTimeout(this.#O);if(["mousemove","mousedown","keydown","touchstart","scroll"].forEach(($)=>{L().removeEventListener($,this.#U,!0)}),this.#K)L().clearTimeout(this.#K);this.uninstallErrorHandler(),this.#b.forEach(($)=>{try{$.disconnect()}catch(X){}}),this.#b=[]}setupClickTracking(){L().addEventListener("click",this.#Q)}handleClick($){let X=$.target;if(!X)return;let Y=this.extractClickLabel(X);if(!Y)return;this.trackCustomEvent("click",{label:Y,element:X.tagName.toLowerCase(),id:X.id||void 0})}handleScroll(){let $=L().location.href;if($!==this.#f)this.#f=$,this.#_=0,this.#$.clear();if(this.#O)L().clearTimeout(this.#O);this.#O=L().setTimeout(()=>{let X=this.calculateScrollDepth();if(X>this.#_)this.#_=X,this.checkAndTrackScrollDepth(X)},100)}setupScrollTracking(){L().addEventListener("scroll",this.#W),L().addEventListener("resize",this.#q)}calculateScrollDepth(){let $=L().innerHeight,X=Math.max(Z().documentElement.scrollHeight,Z().documentElement.offsetHeight,Z().documentElement.clientHeight),Y=L().pageYOffset||Z().documentElement.scrollTop;return Math.round((Y+$)/X*100)}checkAndTrackScrollDepth($){let X=L().location.href;if($>50&&!this.#$.has(X))this.#$.add(X),this.trackCustomEvent("scroll")}extractClickLabel($){let X=$.getAttribute("aria-label");if(X)return`${X}`;if($ instanceof HTMLButtonElement||$ instanceof HTMLAnchorElement){let H=$.textContent?.trim();if(H)return`${H}`}if($ instanceof HTMLInputElement){if($.type==="submit"&&$.value)return`${$.value}`;if($.type==="checkbox"){let H=this.findInputLabel($),Q=$.checked?"Checked":"Unchecked";return H?`${Q} ${H}`:null}}let Y=$.closest("label");if(Y){let H=Y.textContent?.trim();if(H)return`${H}`}return null}findInputLabel($){let X=$.getAttribute("aria-label");if(X)return X;if($.id){let H=Z().querySelector(`label[for="${$.id}"]`);if(H&&H.textContent)return H.textContent.trim()}let Y=$.closest("label");if(Y&&Y.textContent)return Y.textContent.trim().replace($.value,"").trim();return null}trackPageView(){let $={name:"page_view",url:L().location.href,referrer:Z$(),title:Z().title,timestamp:new Date().toISOString()};return this.#X.track($)}trackCustomEvent($,X={},Y={immediate:!1,userAgent:void 0,url:void 0}){let{referrer:H}=X||{},Q={name:$,url:Y.url||L().location.href,referrer:H||Z$(),title:Z().title,properties:J_(X,["url"]),timestamp:new Date().toISOString(),userAgent:Y.userAgent};if(Y.immediate)return this.#X.publish([Q]);else return this.#X.track(Q)}trackPurchase($,X={userAgent:void 0,url:void 0}){let{referrer:Y}=$.properties||{},H={name:"purchase",url:X.url||L().location.href,userAgent:X.userAgent,referrer:Y||Z$(),title:Z().title,price:$.price,currency:$.currency,amount:$.amount,properties:{...$.properties},timestamp:new Date().toISOString()};return this.#X.track(H)}setupFormTracking(){L().addEventListener("focus",this.#B,!0),L().addEventListener("blur",this.#Y,!0),L().addEventListener("change",this.#V,!0),L().addEventListener("submit",this.#H,!0)}handleInputFocus($){let X=$.target;if(!X||!(X instanceof HTMLInputElement||X instanceof HTMLTextAreaElement||X instanceof HTMLSelectElement))return;if(X instanceof HTMLInputElement&&X.type==="password")return;this.#w.set(X,this.getElementValue(X));let Y=X.closest("form");if(Y&&!this.#j.has(Y))this.#j.set(Y,Date.now())}getElementValue($){if($ instanceof HTMLSelectElement)return $.value;if($ instanceof HTMLInputElement||$ instanceof HTMLTextAreaElement)return $.value;return""}handleInputBlur($){let X=$.target;if(!X||!(X instanceof HTMLInputElement||X instanceof HTMLTextAreaElement||X instanceof HTMLSelectElement))return;if(X instanceof HTMLInputElement&&X.type==="password")return;let Y=this.#w.get(X)||"",H=this.getElementValue(X);if(H!==Y&&H.trim()!==""){let Q=X instanceof HTMLSelectElement?"select":X.type,q=this.findFormElementLabel(X)||this.getInputIdentifier(X);if(!q)return;this.trackCustomEvent("input_fill",{input_type:Q,label:q,form_name:this.getFormName(X)})}this.#w.delete(X)}getFormName($){let X=$.closest("form");if(!X)return;return X.getAttribute("name")||X.getAttribute("id")||X.getAttribute("aria-label")||void 0}getInputIdentifier($){return $.getAttribute("name")||$.getAttribute("id")||$.getAttribute("placeholder")||null}findFormElementLabel($){let X=$.getAttribute("aria-label");if(X)return X;if($.id){let H=Z().querySelector(`label[for="${$.id}"]`);if(H&&H.textContent)return H.textContent.trim()}let Y=$.closest("label");if(Y&&Y.textContent){let H=Y.textContent.trim(),Q=$ instanceof HTMLSelectElement?$.selectedOptions[0]?.text:$.value;return Q?H.replace(Q,"").trim():H}return null}handleFormChange($){let X=$.target;if(!X||!(X instanceof HTMLSelectElement||X instanceof HTMLInputElement))return;if(X instanceof HTMLSelectElement)this.trackSelectChange(X);else if(X instanceof HTMLInputElement){if(X.type==="radio")this.trackRadioChange(X);else if(X.type==="checkbox")this.trackCheckboxChange(X);else if(X.type==="range")this.trackRangeChange(X)}}trackSelectChange($){let X=this.findFormElementLabel($)||this.getInputIdentifier($);if(!X)return;let Y=$.selectedOptions[0];this.trackCustomEvent("input_select",{input_type:"select",label:X,option_label:Y?.text||"",form_name:this.getFormName($)})}trackRadioChange($){let X=this.findFormElementLabel($)||this.getInputIdentifier($);if(!X)return;let Y=$.name||X;this.trackCustomEvent("input_radio",{input_type:"radio",group:Y,label:X,form_name:this.getFormName($)})}trackCheckboxChange($){let X=this.findFormElementLabel($)||this.getInputIdentifier($);if(!X)return;this.trackCustomEvent("input_checkbox",{input_type:"checkbox",label:X,checked:$.checked,form_name:this.getFormName($)})}trackRangeChange($){let X=this.findFormElementLabel($)||this.getInputIdentifier($);if(!X)return;this.trackCustomEvent("input_range",{input_type:"range",label:X,form_name:this.getFormName($)})}handleFormSubmit($){let X=$.target;if(!X||!(X instanceof HTMLFormElement))return;let Y=this.#j.get(X)||Date.now(),H=Date.now()-Y,Q=this.getFormName(X)||"unknown";this.trackCustomEvent("form_submit",{form_name:Q,time_to_complete:H}),this.#j.delete(X)}setupVideoTracking(){L().addEventListener("play",this.#v,!0),L().addEventListener("pause",this.#E,!0),L().addEventListener("ended",this.#P,!0)}getVideoMetadata($){let X={duration:Math.round($.duration),current_time:Math.round($.currentTime),src:$.currentSrc||$.src||void 0,title:$.title||void 0,video_id:$.id||void 0};for(let Q of $.attributes)if(Q.name.startsWith("data-")){let q=Q.name.replace("data-","").replace(/-/g,"_");X[q]=Q.value}if($.getAttribute("aria-label"))X.aria_label=$.getAttribute("aria-label");if($.getAttribute("aria-describedby"))X.aria_describedby=$.getAttribute("aria-describedby");let Y=$.parentElement;if(Y){if(Y.id)X.parent_id=Y.id;for(let B of Y.attributes)if(B.name.startsWith("data-")&&B.value){let V=`parent_${B.name.replace("data-","").replace(/-/g,"_")}`;X[V]=B.value}let Q=Y,q=0;while(Q&&q<3){if(Q.tagName==="SECTION"||Q.tagName==="ARTICLE"){if(Q.id)X.section_id=Q.id;if(Q.className)X.section_class=Q.className.trim();break}Q=Q.parentElement,q++}}let H=this.getNearbyVideoDescription($);if(H)X.nearby_text=H;if(X.src){let Q=new URL(X.src,window.location.href);X.video_domain=Q.hostname;let B=Q.pathname.split("/").pop();if(B&&B.includes("."))X.video_filename=B;if(Q.hostname.includes("youtube"))X.video_platform="youtube";else if(Q.hostname.includes("vimeo"))X.video_platform="vimeo";else if(Q.hostname.includes("wistia"))X.video_platform="wistia"}return Object.keys(X).forEach((Q)=>{if(X[Q]===void 0||X[Q]===null||X[Q]==="")delete X[Q]}),X}getNearbyVideoDescription($){let X=["h1, h2, h3, h4, h5, h6",'[role="heading"]',".video-title, .title","figcaption","caption"],Y=$.parentElement,H=0;while(Y&&H<2){for(let Q of X){let q=Y.querySelector(Q);if(q){let B=q.textContent?.trim();if(B&&B.length>0&&B.length<200)return B}}Y=Y.parentElement,H++}return}handleVideoPlay($){let X=$.target;if(!X||!(X instanceof HTMLVideoElement))return;this.#J.set(X,Date.now()),this.trackCustomEvent("video_play",this.getVideoMetadata(X))}handleVideoPause($){let X=$.target;if(!X||!(X instanceof HTMLVideoElement))return;let Y=this.#J.get(X),H=this.getVideoMetadata(X);if(Y)H.watch_time=Math.round((Date.now()-Y)/1000),this.#J.delete(X);this.trackCustomEvent("video_pause",H)}handleVideoEnd($){let X=$.target;if(!X||!(X instanceof HTMLVideoElement))return;let Y=this.#J.get(X),H=this.getVideoMetadata(X);if(Y)H.watch_time=Math.round((Date.now()-Y)/1000),this.#J.delete(X);this.trackCustomEvent("video_complete",H)}setupPageTimeTracking(){L().addEventListener("visibilitychange",this.#S),L().addEventListener("beforeunload",this.#I)}handleVisibilityChange(){let $=this.#k.autoTrack??y.autoTrack;if(!(typeof $==="boolean"?$:$.pageVisibility!==!1))return;let Y=Date.now(),H=this.#D;if(this.#D=!Z().hidden,H)this.#L+=Y-this.#F;this.#F=Y,this.trackCustomEvent("page_visibility",{visible:this.#D,total_time:Math.round((Y-this.#M)/1000),visible_time:Math.round(this.#L/1000)})}handleBeforeUnload(){let $=this.#k.autoTrack??y.autoTrack;if(!(typeof $==="boolean"?$:$.pageVisibility!==!1))return;let Y=Date.now();if(this.#D)this.#L+=Y-this.#F;this.trackCustomEvent("page_exit",{total_time:Math.round((Y-this.#M)/1000),visible_time:Math.round(this.#L/1000)},{immediate:!0})}setupInactivityTracking(){["mousemove","mousedown","keydown","touchstart","scroll"].forEach(($)=>{L().addEventListener($,this.#U,!0)}),this.checkInactivity()}handleUserActivity(){if(this.#Z=Date.now(),this.#N&&this.#G)this.#N=!1,this.trackCustomEvent("user_active",{inactive_duration:Math.round((Date.now()-this.#G)/1000),url:L().location.href,title:Z().title}),this.#G=null;this.checkInactivity()}checkInactivity(){if(this.#K)L().clearTimeout(this.#K);this.#K=L().setTimeout(()=>{let $=Date.now();if($-this.#Z>=this.#z&&!this.#N)this.#N=!0,this.#G=$,this.trackCustomEvent("user_inactive")},this.#z)}installErrorHandler(){if(this.#A||typeof window>"u")return;L().addEventListener("error",this.#C),L().addEventListener("unhandledrejection",this.#R),this.#A=!0}uninstallErrorHandler(){if(!this.#A||typeof window>"u")return;L().removeEventListener("error",this.#C),L().removeEventListener("unhandledrejection",this.#R),this.#A=!1}isErrorHandlerInstalled(){return this.#A}handleError($){if($ instanceof ErrorEvent)this.trackError(Error($.message),{filename:$.filename,lineno:$.lineno,colno:$.colno,source:"getWindow().onerror"})}handleRejection($){let X=$.reason instanceof Error?$.reason:Error(String($.reason||"Unhandled Promise rejection"));this.trackError(X,{source:"unhandledrejection"})}trackError($,X={},Y={immediate:!1}){let{filename:H,lineno:Q,colno:q,source:B,url:V,referrer:J,userAgent:A,...I}=X,F$={name:"error",message:$.message,stack:$.stack,source:B||"client",lineno:Q,colno:q,filename:H,properties:I,timestamp:new Date().toISOString(),url:V||L().location.href,referrer:J||Z$(),title:Z().title};if(Y.immediate)this.#X.publish([F$]);else this.#X.track(F$)}setupPerformanceTracking(){if(Z().readyState==="complete")this.trackPageLoadPerformance();else L().addEventListener("load",()=>{L().setTimeout(()=>{this.trackPageLoadPerformance()},100)});this.setupCoreWebVitals()}trackPageLoadPerformance(){if(typeof window>"u"||!window.performance?.timing)return;let $=window.performance.timing,X=window.performance.navigation,Y=$.loadEventEnd-$.navigationStart,H=$.domContentLoadedEventEnd-$.navigationStart,Q=$.responseStart-$.navigationStart,q=$.domInteractive-$.navigationStart,B=$.connectEnd-$.connectStart,V=$.domainLookupEnd-$.domainLookupStart;if(Y>0&&Y<60000)this.trackCustomEvent("page_load",{page_load_time:Y,dom_content_loaded_time:H,time_to_first_byte:Q,dom_interactive_time:q,connect_time:B,dns_lookup_time:V,navigation_type:X?X.type:void 0,redirect_count:X?X.redirectCount:void 0})}setupCoreWebVitals(){if(typeof window>"u"||!window.PerformanceObserver)return;try{this.observeWebVital("largest-contentful-paint",($)=>{let X=$[$.length-1];this.trackCustomEvent("core_web_vitals",{metric:"LCP",value:Math.round(X.startTime),rating:this.getCWVRating("LCP",X.startTime)})}),this.observeWebVital("first-input",($)=>{let X=$[0],Y=X.processingStart-X.startTime;this.trackCustomEvent("core_web_vitals",{metric:"FID",value:Math.round(Y),rating:this.getCWVRating("FID",Y)})}),this.observeWebVital("layout-shift",($)=>{let X=0;for(let Y of $)if(!Y.hadRecentInput)X+=Y.value;if(X>0)this.trackCustomEvent("core_web_vitals",{metric:"CLS",value:Math.round(X*1000)/1000,rating:this.getCWVRating("CLS",X)})})}catch($){}}observeWebVital($,X){try{if(typeof window>"u"||!window.PerformanceObserver)return;let Y=new window.PerformanceObserver((H)=>{X(H.getEntries())});Y.observe({type:$,buffered:!0}),this.#b.push(Y)}catch(Y){}}getCWVRating($,X){switch($){case"LCP":return X<=2500?"good":X<=4000?"needs-improvement":"poor";case"FID":return X<=100?"good":X<=300?"needs-improvement":"poor";case"CLS":return X<=0.1?"good":X<=0.25?"needs-improvement":"poor";default:return"unknown"}}}class V_{#X;#$=[];#_=null;#Q;#W;#q="";#B=null;#Y=null;#V=5000;#H;constructor($,X){this.#X=$,this.#H=X,this.#Q=X?.userId,this.#W=X?.appId||"",this.#V=X?.flushIntervalMs||y.flushIntervalMs||5000}init($){this.#_=$,this.setup()}destroy(){if(this.#B)L().clearInterval(this.#B);if(this.#Y)L().clearTimeout(this.#Y);if(this.#$.length>0)this.flush()}shouldEnableAutoFlush(){if(this.#H?.autoTrack===!1)return!1;return!0}setup(){if(typeof window>"u")return;if(this.getSessionId(),this.#q=L().location.href,this.#_.trackPageView(),this.setupHistoryChange(),this.shouldEnableAutoFlush())this.#B=L().setInterval(()=>this.flush(),this.#V)}setupHistoryChange(){if(!this.#_)return;let{pushState:$,replaceState:X}=history;history.pushState=(...Y)=>{$.apply(history,Y),this.trackPageViewIfUrlChanged()},history.replaceState=(...Y)=>{X.apply(history,Y),this.trackPageViewIfUrlChanged()},L().addEventListener("popstate",()=>{this.trackPageViewIfUrlChanged()})}trackPageViewIfUrlChanged(){let $=L().location.href;if($!==this.#q)this.#q=$,this.#_.trackPageView()}getUserId(){return this.#Q}setUserId($){this.#Q=$}getAppId(){return this.#W}getApiKey(){return this.#H?.apiKey||""}setAppId($){this.#W=$}async track($){if(z())return await new Promise((X)=>setTimeout(X,1000)),this.publish([$]);if(this.#$.push($),this.#$.length>=20)return this.flush(),Promise.resolve();if(this.shouldEnableAutoFlush()){if(!this.#Y)this.#Y=L().setTimeout(()=>{this.flush(),this.#Y=null},this.#V)}return Promise.resolve()}async identify($){if(this.setUserId($.id),this.#H?.debug)return console.log(`[UserPath] Identify user: ${$.id}`),Promise.resolve();await fetch(this.#X.buildUrl("identify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($),keepalive:!0,credentials:"include"})}deduplicateEvents($){let X=new Set;return $.filter((Y)=>{let H=`${Y.name}-${Y.timestamp}`;if(X.has(H))return!1;return X.add(H),!0})}flush(){if(this.#$.length===0)return;if(this.#Y)L().clearTimeout(this.#Y),this.#Y=null;let $=[...this.#$];this.#$=[];let X=this.deduplicateEvents($);this.publish(X).catch((Y)=>{this.#$=[...X,...this.#$].slice(0,100),console.error("Error sending analytics data:",Y)})}async publish($){if(!$||$.length===0)return Promise.resolve({success:!0,skipped:!0});let X={userAgent:$[0]?.userAgent||navigator.userAgent,screenWidth:L().screen.width,screenHeight:L().screen.height,language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,events:$.map((Q)=>{if(!Q.timestamp)Q.timestamp=new Date().toISOString();return{...Q,name:Q.name,properties:Q.properties||{}}})};if(this.#H?.debug){let Q=X.events.map((q)=>q.name).join(", ");return console.log(`[UserPath] ${X.events.length} event(s): ${Q}`),Promise.resolve({success:!0,debug:!0})}let Y={"Content-Type":"application/json","X-Userpath-App":this.getAppId(),"X-Userpath-Sid":this.getSessionId()};if(z())Y.Cookie=`_up.app=${this.getAppId()};_up.sid=${this.getSessionId()}`,Y["X-Userpath-Key"]=this.getApiKey();let H=await fetch(this.#X.buildUrl("log"),{method:"POST",headers:Y,body:JSON.stringify(X),credentials:"include",keepalive:!0});try{let Q=await H.json();if(!H.ok)return Promise.reject(Q);return Q}catch(Q){return Promise.reject(Q)}}getSessionId(){let $=j_("_up.sid");if(!$)$=this.generateId(),this.setSessionId($);return $}setSessionId($){C$("_up.sid",$,{days:365,sameSite:"lax",domain:U$(this.#X.serverUrl)}),R$.setItem("sid",$)}generateId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function($){let X=Math.random()*16|0;return($==="x"?X:X&3|8).toString(16)})}}class p6{#X;#$;#_;#Q=y.version;constructor($){this.#X=new n$($),this.#$=new V_(this.#X,$),this.#_=new B_(this.#$,$),this.#Q=$.version||this.#Q,this.#$.init(this.#_),this.#$.setAppId($.appId);let X=(()=>{if($.autoTrack===void 0)return!0;if(typeof $.autoTrack==="boolean")return $.autoTrack;return $.autoTrack.errors!==!1})();if(!z()&&X)this.installErrorHandler();let Y=$.debug?" [DEBUG MODE - events will be logged only]":"";console.debug(`UserPath v${O_.version} initialized${Y}`)}getAppId(){return this.#$.getAppId()}setAppId($){this.#$.setAppId($)}installErrorHandler(){this.#_.installErrorHandler()}uninstallErrorHandler(){this.#_.uninstallErrorHandler()}trackError($,X={}){if(!this.#_.isErrorHandlerInstalled()&&X.source!=="manual")return;this.#_.trackError($,X)}setUserId($){this.#$.setUserId($)}getUserId(){return this.#$.getUserId()}async identify($){await this.#$.identify($)}track($,X){if(X.sid)this.#$.setSessionId(X.sid);if($==="page_view")return this.#_.trackPageView();else if($==="event")return this.#_.trackCustomEvent(X.name,X.properties,{immediate:!1,url:X.url,userAgent:X.ua});else if($==="purchase")return this.#_.trackPurchase({price:X.price,currency:X.currency,amount:X.amount,properties:X.properties},{url:X.url,userAgent:X.ua})}}export{p6 as UserPath,y as DEFAULT_CONFIG};
|
|
10
|
+
*/class N{static FOLD_CASE=1;static LITERAL=2;static CLASS_NL=4;static DOT_NL=8;static ONE_LINE=16;static NON_GREEDY=32;static PERL_X=64;static UNICODE_GROUPS=128;static WAS_DOLLAR=256;static MATCH_NL=(()=>N.CLASS_NL|N.DOT_NL)();static PERL=(()=>N.CLASS_NL|N.ONE_LINE|N.PERL_X|N.UNICODE_GROUPS)();static POSIX=0;static UNANCHORED=0;static ANCHOR_START=1;static ANCHOR_BOTH=2}class S{static CODES=(()=>new Map([["\x07",7],["\b",8],["\t",9],[`
|
|
11
|
+
`,10],["\v",11],["\f",12],["\r",13],[" ",32],['"',34],["$",36],["&",38],["(",40],[")",41],["*",42],["+",43],["-",45],[".",46],["0",48],["1",49],["2",50],["3",51],["4",52],["5",53],["6",54],["7",55],["8",56],["9",57],[":",58],["<",60],[">",62],["?",63],["A",65],["B",66],["C",67],["F",70],["P",80],["Q",81],["U",85],["Z",90],["[",91],["\\",92],["]",93],["^",94],["_",95],["a",97],["b",98],["f",102],["i",105],["m",109],["n",110],["r",114],["s",115],["t",116],["v",118],["x",120],["z",122],["{",123],["|",124],["}",125]]))();static toUpperCase(e){let r=String.fromCodePoint(e).toUpperCase();if(r.length>1)return e;let n=String.fromCodePoint(r.codePointAt(0)).toLowerCase();if(n.length>1||n.codePointAt(0)!==e)return e;return r.codePointAt(0)}static toLowerCase(e){let r=String.fromCodePoint(e).toLowerCase();if(r.length>1)return e;let n=String.fromCodePoint(r.codePointAt(0)).toUpperCase();if(n.length>1||n.codePointAt(0)!==e)return e;return r.codePointAt(0)}}class a{static CASE_ORBIT=(()=>new Map([[75,107],[107,8490],[8490,75],[83,115],[115,383],[383,83],[181,924],[924,956],[956,181],[197,229],[229,8491],[8491,197],[452,453],[453,454],[454,452],[455,456],[456,457],[457,455],[458,459],[459,460],[460,458],[497,498],[498,499],[499,497],[837,921],[921,953],[953,8126],[8126,837],[914,946],[946,976],[976,914],[917,949],[949,1013],[1013,917],[920,952],[952,977],[977,1012],[1012,920],[922,954],[954,1008],[1008,922],[928,960],[960,982],[982,928],[929,961],[961,1009],[1009,929],[931,962],[962,963],[963,931],[934,966],[966,981],[981,934],[937,969],[969,8486],[8486,937],[1042,1074],[1074,7296],[7296,1042],[1044,1076],[1076,7297],[7297,1044],[1054,1086],[1086,7298],[7298,1054],[1057,1089],[1089,7299],[7299,1057],[1058,1090],[1090,7300],[7300,7301],[7301,1058],[1066,1098],[1098,7302],[7302,1066],[1122,1123],[1123,7303],[7303,1122],[7304,42570],[42570,42571],[42571,7304],[7305,7306],[7306,7305],[7776,7777],[7777,7835],[7835,7776],[223,7838],[7838,223],[8064,8072],[8072,8064],[8065,8073],[8073,8065],[8066,8074],[8074,8066],[8067,8075],[8075,8067],[8068,8076],[8076,8068],[8069,8077],[8077,8069],[8070,8078],[8078,8070],[8071,8079],[8079,8071],[8080,8088],[8088,8080],[8081,8089],[8089,8081],[8082,8090],[8090,8082],[8083,8091],[8091,8083],[8084,8092],[8092,8084],[8085,8093],[8093,8085],[8086,8094],[8094,8086],[8087,8095],[8095,8087],[8096,8104],[8104,8096],[8097,8105],[8105,8097],[8098,8106],[8106,8098],[8099,8107],[8107,8099],[8100,8108],[8108,8100],[8101,8109],[8109,8101],[8102,8110],[8110,8102],[8103,8111],[8111,8103],[8115,8124],[8124,8115],[8131,8140],[8140,8131],[912,8147],[8147,912],[944,8163],[8163,944],[8179,8188],[8188,8179],[612,42955],[42955,612],[42956,42957],[42957,42956],[42970,42971],[42971,42970],[411,42972],[42972,411],[64261,64262],[64262,64261],[66560,66600],[66600,66560],[66561,66601],[66601,66561],[66562,66602],[66602,66562],[66563,66603],[66603,66563],[66564,66604],[66604,66564],[66565,66605],[66605,66565],[66566,66606],[66606,66566],[66567,66607],[66607,66567],[66568,66608],[66608,66568],[66569,66609],[66609,66569],[66570,66610],[66610,66570],[66571,66611],[66611,66571],[66572,66612],[66612,66572],[66573,66613],[66613,66573],[66574,66614],[66614,66574],[66575,66615],[66615,66575],[66576,66616],[66616,66576],[66577,66617],[66617,66577],[66578,66618],[66618,66578],[66579,66619],[66619,66579],[66580,66620],[66620,66580],[66581,66621],[66621,66581],[66582,66622],[66622,66582],[66583,66623],[66623,66583],[66584,66624],[66624,66584],[66585,66625],[66625,66585],[66586,66626],[66626,66586],[66587,66627],[66627,66587],[66588,66628],[66628,66588],[66589,66629],[66629,66589],[66590,66630],[66630,66590],[66591,66631],[66631,66591],[66592,66632],[66632,66592],[66593,66633],[66633,66593],[66594,66634],[66634,66594],[66595,66635],[66635,66595],[66596,66636],[66636,66596],[66597,66637],[66637,66597],[66598,66638],[66638,66598],[66599,66639],[66639,66599],[66736,66776],[66776,66736],[66737,66777],[66777,66737],[66738,66778],[66778,66738],[66739,66779],[66779,66739],[66740,66780],[66780,66740],[66741,66781],[66781,66741],[66742,66782],[66782,66742],[66743,66783],[66783,66743],[66744,66784],[66784,66744],[66745,66785],[66785,66745],[66746,66786],[66786,66746],[66747,66787],[66787,66747],[66748,66788],[66788,66748],[66749,66789],[66789,66749],[66750,66790],[66790,66750],[66751,66791],[66791,66751],[66752,66792],[66792,66752],[66753,66793],[66793,66753],[66754,66794],[66794,66754],[66755,66795],[66795,66755],[66756,66796],[66796,66756],[66757,66797],[66797,66757],[66758,66798],[66798,66758],[66759,66799],[66799,66759],[66760,66800],[66800,66760],[66761,66801],[66801,66761],[66762,66802],[66802,66762],[66763,66803],[66803,66763],[66764,66804],[66804,66764],[66765,66805],[66805,66765],[66766,66806],[66806,66766],[66767,66807],[66807,66767],[66768,66808],[66808,66768],[66769,66809],[66809,66769],[66770,66810],[66810,66770],[66771,66811],[66811,66771],[66928,66967],[66967,66928],[66929,66968],[66968,66929],[66930,66969],[66969,66930],[66931,66970],[66970,66931],[66932,66971],[66971,66932],[66933,66972],[66972,66933],[66934,66973],[66973,66934],[66935,66974],[66974,66935],[66936,66975],[66975,66936],[66937,66976],[66976,66937],[66938,66977],[66977,66938],[66940,66979],[66979,66940],[66941,66980],[66980,66941],[66942,66981],[66981,66942],[66943,66982],[66982,66943],[66944,66983],[66983,66944],[66945,66984],[66984,66945],[66946,66985],[66985,66946],[66947,66986],[66986,66947],[66948,66987],[66987,66948],[66949,66988],[66988,66949],[66950,66989],[66989,66950],[66951,66990],[66990,66951],[66952,66991],[66991,66952],[66953,66992],[66992,66953],[66954,66993],[66993,66954],[66956,66995],[66995,66956],[66957,66996],[66996,66957],[66958,66997],[66997,66958],[66959,66998],[66998,66959],[66960,66999],[66999,66960],[66961,67000],[67000,66961],[66962,67001],[67001,66962],[66964,67003],[67003,66964],[66965,67004],[67004,66965],[68736,68800],[68800,68736],[68737,68801],[68801,68737],[68738,68802],[68802,68738],[68739,68803],[68803,68739],[68740,68804],[68804,68740],[68741,68805],[68805,68741],[68742,68806],[68806,68742],[68743,68807],[68807,68743],[68744,68808],[68808,68744],[68745,68809],[68809,68745],[68746,68810],[68810,68746],[68747,68811],[68811,68747],[68748,68812],[68812,68748],[68749,68813],[68813,68749],[68750,68814],[68814,68750],[68751,68815],[68815,68751],[68752,68816],[68816,68752],[68753,68817],[68817,68753],[68754,68818],[68818,68754],[68755,68819],[68819,68755],[68756,68820],[68820,68756],[68757,68821],[68821,68757],[68758,68822],[68822,68758],[68759,68823],[68823,68759],[68760,68824],[68824,68760],[68761,68825],[68825,68761],[68762,68826],[68826,68762],[68763,68827],[68827,68763],[68764,68828],[68828,68764],[68765,68829],[68829,68765],[68766,68830],[68830,68766],[68767,68831],[68831,68767],[68768,68832],[68832,68768],[68769,68833],[68833,68769],[68770,68834],[68834,68770],[68771,68835],[68835,68771],[68772,68836],[68836,68772],[68773,68837],[68837,68773],[68774,68838],[68838,68774],[68775,68839],[68839,68775],[68776,68840],[68840,68776],[68777,68841],[68841,68777],[68778,68842],[68842,68778],[68779,68843],[68843,68779],[68780,68844],[68844,68780],[68781,68845],[68845,68781],[68782,68846],[68846,68782],[68783,68847],[68847,68783],[68784,68848],[68848,68784],[68785,68849],[68849,68785],[68786,68850],[68850,68786],[68944,68976],[68976,68944],[68945,68977],[68977,68945],[68946,68978],[68978,68946],[68947,68979],[68979,68947],[68948,68980],[68980,68948],[68949,68981],[68981,68949],[68950,68982],[68982,68950],[68951,68983],[68983,68951],[68952,68984],[68984,68952],[68953,68985],[68985,68953],[68954,68986],[68986,68954],[68955,68987],[68987,68955],[68956,68988],[68988,68956],[68957,68989],[68989,68957],[68958,68990],[68990,68958],[68959,68991],[68991,68959],[68960,68992],[68992,68960],[68961,68993],[68993,68961],[68962,68994],[68994,68962],[68963,68995],[68995,68963],[68964,68996],[68996,68964],[68965,68997],[68997,68965],[71840,71872],[71872,71840],[71841,71873],[71873,71841],[71842,71874],[71874,71842],[71843,71875],[71875,71843],[71844,71876],[71876,71844],[71845,71877],[71877,71845],[71846,71878],[71878,71846],[71847,71879],[71879,71847],[71848,71880],[71880,71848],[71849,71881],[71881,71849],[71850,71882],[71882,71850],[71851,71883],[71883,71851],[71852,71884],[71884,71852],[71853,71885],[71885,71853],[71854,71886],[71886,71854],[71855,71887],[71887,71855],[71856,71888],[71888,71856],[71857,71889],[71889,71857],[71858,71890],[71890,71858],[71859,71891],[71891,71859],[71860,71892],[71892,71860],[71861,71893],[71893,71861],[71862,71894],[71894,71862],[71863,71895],[71895,71863],[71864,71896],[71896,71864],[71865,71897],[71897,71865],[71866,71898],[71898,71866],[71867,71899],[71899,71867],[71868,71900],[71900,71868],[71869,71901],[71901,71869],[71870,71902],[71902,71870],[71871,71903],[71903,71871],[93760,93792],[93792,93760],[93761,93793],[93793,93761],[93762,93794],[93794,93762],[93763,93795],[93795,93763],[93764,93796],[93796,93764],[93765,93797],[93797,93765],[93766,93798],[93798,93766],[93767,93799],[93799,93767],[93768,93800],[93800,93768],[93769,93801],[93801,93769],[93770,93802],[93802,93770],[93771,93803],[93803,93771],[93772,93804],[93804,93772],[93773,93805],[93805,93773],[93774,93806],[93806,93774],[93775,93807],[93807,93775],[93776,93808],[93808,93776],[93777,93809],[93809,93777],[93778,93810],[93810,93778],[93779,93811],[93811,93779],[93780,93812],[93812,93780],[93781,93813],[93813,93781],[93782,93814],[93814,93782],[93783,93815],[93815,93783],[93784,93816],[93816,93784],[93785,93817],[93817,93785],[93786,93818],[93818,93786],[93787,93819],[93819,93787],[93788,93820],[93820,93788],[93789,93821],[93821,93789],[93790,93822],[93822,93790],[93791,93823],[93823,93791],[125184,125218],[125218,125184],[125185,125219],[125219,125185],[125186,125220],[125220,125186],[125187,125221],[125221,125187],[125188,125222],[125222,125188],[125189,125223],[125223,125189],[125190,125224],[125224,125190],[125191,125225],[125225,125191],[125192,125226],[125226,125192],[125193,125227],[125227,125193],[125194,125228],[125228,125194],[125195,125229],[125229,125195],[125196,125230],[125230,125196],[125197,125231],[125231,125197],[125198,125232],[125232,125198],[125199,125233],[125233,125199],[125200,125234],[125234,125200],[125201,125235],[125235,125201],[125202,125236],[125236,125202],[125203,125237],[125237,125203],[125204,125238],[125238,125204],[125205,125239],[125239,125205],[125206,125240],[125240,125206],[125207,125241],[125241,125207],[125208,125242],[125242,125208],[125209,125243],[125243,125209],[125210,125244],[125244,125210],[125211,125245],[125245,125211],[125212,125246],[125246,125212],[125213,125247],[125247,125213],[125214,125248],[125248,125214],[125215,125249],[125249,125215],[125216,125250],[125250,125216],[125217,125251],[125251,125217]]))();static C=[[0,31,1],[127,159,1],[173,888,715],[889,896,7],[897,899,1],[907,909,2],[930,1328,398],[1367,1368,1],[1419,1420,1],[1424,1480,56],[1481,1487,1],[1515,1518,1],[1525,1541,1],[1564,1757,193],[1806,1807,1],[1867,1868,1],[1970,1983,1],[2043,2044,1],[2094,2095,1],[2111,2140,29],[2141,2143,2],[2155,2159,1],[2191,2198,1],[2274,2436,162],[2445,2446,1],[2449,2450,1],[2473,2481,8],[2483,2485,1],[2490,2491,1],[2501,2502,1],[2505,2506,1],[2511,2518,1],[2520,2523,1],[2526,2532,6],[2533,2559,26],[2560,2564,4],[2571,2574,1],[2577,2578,1],[2601,2609,8],[2612,2618,3],[2619,2621,2],[2627,2630,1],[2633,2634,1],[2638,2640,1],[2642,2648,1],[2653,2655,2],[2656,2661,1],[2679,2688,1],[2692,2702,10],[2706,2729,23],[2737,2740,3],[2746,2747,1],[2758,2766,4],[2767,2769,2],[2770,2783,1],[2788,2789,1],[2802,2808,1],[2816,2820,4],[2829,2830,1],[2833,2834,1],[2857,2865,8],[2868,2874,6],[2875,2885,10],[2886,2889,3],[2890,2894,4],[2895,2900,1],[2904,2907,1],[2910,2916,6],[2917,2936,19],[2937,2945,1],[2948,2955,7],[2956,2957,1],[2961,2966,5],[2967,2968,1],[2971,2973,2],[2976,2978,1],[2981,2983,1],[2987,2989,1],[3002,3005,1],[3011,3013,1],[3017,3022,5],[3023,3025,2],[3026,3030,1],[3032,3045,1],[3067,3071,1],[3085,3089,4],[3113,3130,17],[3131,3141,10],[3145,3150,5],[3151,3156,1],[3159,3163,4],[3164,3166,2],[3167,3172,5],[3173,3184,11],[3185,3190,1],[3213,3217,4],[3241,3252,11],[3258,3259,1],[3269,3273,4],[3278,3284,1],[3287,3292,1],[3295,3300,5],[3301,3312,11],[3316,3327,1],[3341,3345,4],[3397,3401,4],[3408,3411,1],[3428,3429,1],[3456,3460,4],[3479,3481,1],[3506,3516,10],[3518,3519,1],[3527,3529,1],[3531,3534,1],[3541,3543,2],[3552,3557,1],[3568,3569,1],[3573,3584,1],[3643,3646,1],[3676,3712,1],[3715,3717,2],[3723,3748,25],[3750,3774,24],[3775,3781,6],[3783,3791,8],[3802,3803,1],[3808,3839,1],[3912,3949,37],[3950,3952,1],[3992,4029,37],[4045,4059,14],[4060,4095,1],[4294,4296,2],[4297,4300,1],[4302,4303,1],[4681,4686,5],[4687,4695,8],[4697,4702,5],[4703,4745,42],[4750,4751,1],[4785,4790,5],[4791,4799,8],[4801,4806,5],[4807,4823,16],[4881,4886,5],[4887,4955,68],[4956,4989,33],[4990,4991,1],[5018,5023,1],[5110,5111,1],[5118,5119,1],[5789,5791,1],[5881,5887,1],[5910,5918,1],[5943,5951,1],[5972,5983,1],[5997,6001,4],[6004,6015,1],[6110,6111,1],[6122,6127,1],[6138,6143,1],[6158,6170,12],[6171,6175,1],[6265,6271,1],[6315,6319,1],[6390,6399,1],[6431,6444,13],[6445,6447,1],[6460,6463,1],[6465,6467,1],[6510,6511,1],[6517,6527,1],[6572,6575,1],[6602,6607,1],[6619,6621,1],[6684,6685,1],[6751,6781,30],[6782,6794,12],[6795,6799,1],[6810,6815,1],[6830,6831,1],[6863,6911,1],[6989,7156,167],[7157,7163,1],[7224,7226,1],[7242,7244,1],[7307,7311,1],[7355,7356,1],[7368,7375,1],[7419,7423,1],[7958,7959,1],[7966,7967,1],[8006,8007,1],[8014,8015,1],[8024,8030,2],[8062,8063,1],[8117,8133,16],[8148,8149,1],[8156,8176,20],[8177,8181,4],[8191,8203,12],[8204,8207,1],[8234,8238,1],[8288,8303,1],[8306,8307,1],[8335,8349,14],[8350,8351,1],[8385,8399,1],[8433,8447,1],[8588,8591,1],[9258,9279,1],[9291,9311,1],[11124,11125,1],[11158,11508,350],[11509,11512,1],[11558,11560,2],[11561,11564,1],[11566,11567,1],[11624,11630,1],[11633,11646,1],[11671,11679,1],[11687,11743,8],[11870,11903,1],[11930,12020,90],[12021,12031,1],[12246,12271,1],[12352,12439,87],[12440,12544,104],[12545,12548,1],[12592,12687,95],[12774,12782,1],[12831,42125,29294],[42126,42127,1],[42183,42191,1],[42540,42559,1],[42744,42751,1],[42958,42959,1],[42962,42964,2],[42973,42993,1],[43053,43055,1],[43066,43071,1],[43128,43135,1],[43206,43213,1],[43226,43231,1],[43348,43358,1],[43389,43391,1],[43470,43482,12],[43483,43485,1],[43519,43575,56],[43576,43583,1],[43598,43599,1],[43610,43611,1],[43715,43738,1],[43767,43776,1],[43783,43784,1],[43791,43792,1],[43799,43807,1],[43815,43823,8],[43884,43887,1],[44014,44015,1],[44026,44031,1],[55204,55215,1],[55239,55242,1],[55292,63743,1],[64110,64111,1],[64218,64255,1],[64263,64274,1],[64280,64284,1],[64311,64317,6],[64319,64325,3],[64451,64466,1],[64912,64913,1],[64968,64974,1],[64976,65007,1],[65050,65055,1],[65107,65127,20],[65132,65135,1],[65141,65277,136],[65278,65280,1],[65471,65473,1],[65480,65481,1],[65488,65489,1],[65496,65497,1],[65501,65503,1],[65511,65519,8],[65520,65531,1],[65534,65535,1],[65548,65575,27],[65595,65598,3],[65614,65615,1],[65630,65663,1],[65787,65791,1],[65795,65798,1],[65844,65846,1],[65935,65949,14],[65950,65951,1],[65953,65999,1],[66046,66175,1],[66205,66207,1],[66257,66271,1],[66300,66303,1],[66340,66348,1],[66379,66383,1],[66427,66431,1],[66462,66500,38],[66501,66503,1],[66518,66559,1],[66718,66719,1],[66730,66735,1],[66772,66775,1],[66812,66815,1],[66856,66863,1],[66916,66926,1],[66939,66955,16],[66963,66966,3],[66978,66994,16],[67002,67005,3],[67006,67007,1],[67060,67071,1],[67383,67391,1],[67414,67423,1],[67432,67455,1],[67462,67505,43],[67515,67583,1],[67590,67591,1],[67593,67638,45],[67641,67643,1],[67645,67646,1],[67670,67743,73],[67744,67750,1],[67760,67807,1],[67827,67830,3],[67831,67834,1],[67868,67870,1],[67898,67902,1],[67904,67967,1],[68024,68027,1],[68048,68049,1],[68100,68103,3],[68104,68107,1],[68116,68120,4],[68150,68151,1],[68155,68158,1],[68169,68175,1],[68185,68191,1],[68256,68287,1],[68327,68330,1],[68343,68351,1],[68406,68408,1],[68438,68439,1],[68467,68471,1],[68498,68504,1],[68509,68520,1],[68528,68607,1],[68681,68735,1],[68787,68799,1],[68851,68857,1],[68904,68911,1],[68922,68927,1],[68966,68968,1],[68998,69005,1],[69008,69215,1],[69247,69290,43],[69294,69295,1],[69298,69313,1],[69317,69371,1],[69416,69423,1],[69466,69487,1],[69514,69551,1],[69580,69599,1],[69623,69631,1],[69710,69713,1],[69750,69758,1],[69821,69827,6],[69828,69839,1],[69865,69871,1],[69882,69887,1],[69941,69960,19],[69961,69967,1],[70007,70015,1],[70112,70133,21],[70134,70143,1],[70162,70210,48],[70211,70271,1],[70279,70281,2],[70286,70302,16],[70314,70319,1],[70379,70383,1],[70394,70399,1],[70404,70413,9],[70414,70417,3],[70418,70441,23],[70449,70452,3],[70458,70469,11],[70470,70473,3],[70474,70478,4],[70479,70481,2],[70482,70486,1],[70488,70492,1],[70500,70501,1],[70509,70511,1],[70517,70527,1],[70538,70540,2],[70541,70543,2],[70582,70593,11],[70595,70596,1],[70598,70603,5],[70614,70617,3],[70618,70624,1],[70627,70655,1],[70748,70754,6],[70755,70783,1],[70856,70863,1],[70874,71039,1],[71094,71095,1],[71134,71167,1],[71237,71247,1],[71258,71263,1],[71277,71295,1],[71354,71359,1],[71370,71375,1],[71396,71423,1],[71451,71452,1],[71468,71471,1],[71495,71679,1],[71740,71839,1],[71923,71934,1],[71943,71944,1],[71946,71947,1],[71956,71959,3],[71990,71993,3],[71994,72007,13],[72008,72015,1],[72026,72095,1],[72104,72105,1],[72152,72153,1],[72165,72191,1],[72264,72271,1],[72355,72367,1],[72441,72447,1],[72458,72639,1],[72674,72687,1],[72698,72703,1],[72713,72759,46],[72774,72783,1],[72813,72815,1],[72848,72849,1],[72872,72887,15],[72888,72959,1],[72967,72970,3],[73015,73017,1],[73019,73022,3],[73032,73039,1],[73050,73055,1],[73062,73065,3],[73103,73106,3],[73113,73119,1],[73130,73439,1],[73465,73471,1],[73489,73531,42],[73532,73533,1],[73563,73647,1],[73649,73663,1],[73714,73726,1],[74650,74751,1],[74863,74869,6],[74870,74879,1],[75076,77711,1],[77811,77823,1],[78896,78911,1],[78934,78943,1],[82939,82943,1],[83527,90367,1],[90426,92159,1],[92729,92735,1],[92767,92778,11],[92779,92781,1],[92863,92874,11],[92875,92879,1],[92910,92911,1],[92918,92927,1],[92998,93007,1],[93018,93026,8],[93048,93052,1],[93072,93503,1],[93562,93759,1],[93851,93951,1],[94027,94030,1],[94088,94094,1],[94112,94175,1],[94181,94191,1],[94194,94207,1],[100344,100351,1],[101590,101630,1],[101641,110575,1],[110580,110588,8],[110591,110883,292],[110884,110897,1],[110899,110927,1],[110931,110932,1],[110934,110947,1],[110952,110959,1],[111356,113663,1],[113771,113775,1],[113789,113791,1],[113801,113807,1],[113818,113819,1],[113824,117759,1],[118010,118015,1],[118452,118527,1],[118574,118575,1],[118599,118607,1],[118724,118783,1],[119030,119039,1],[119079,119080,1],[119155,119162,1],[119275,119295,1],[119366,119487,1],[119508,119519,1],[119540,119551,1],[119639,119647,1],[119673,119807,1],[119893,119965,72],[119968,119969,1],[119971,119972,1],[119975,119976,1],[119981,119994,13],[119996,120004,8],[120070,120075,5],[120076,120085,9],[120093,120122,29],[120127,120133,6],[120135,120137,1],[120145,120486,341],[120487,120780,293],[120781,121484,703],[121485,121498,1],[121504,121520,16],[121521,122623,1],[122655,122660,1],[122667,122879,1],[122887,122905,18],[122906,122914,8],[122917,122923,6],[122924,122927,1],[122990,123022,1],[123024,123135,1],[123181,123183,1],[123198,123199,1],[123210,123213,1],[123216,123535,1],[123567,123583,1],[123642,123646,1],[123648,124111,1],[124154,124367,1],[124411,124414,1],[124416,124895,1],[124903,124908,5],[124911,124927,16],[125125,125126,1],[125143,125183,1],[125260,125263,1],[125274,125277,1],[125280,126064,1],[126133,126208,1],[126270,126463,1],[126468,126496,28],[126499,126501,2],[126502,126504,2],[126515,126520,5],[126522,126524,2],[126525,126529,1],[126531,126534,1],[126536,126540,2],[126544,126547,3],[126549,126550,1],[126552,126560,2],[126563,126565,2],[126566,126571,5],[126579,126589,5],[126591,126602,11],[126620,126624,1],[126628,126634,6],[126652,126703,1],[126706,126975,1],[127020,127023,1],[127124,127135,1],[127151,127152,1],[127168,127184,16],[127222,127231,1],[127406,127461,1],[127491,127503,1],[127548,127551,1],[127561,127567,1],[127570,127583,1],[127590,127743,1],[128728,128731,1],[128749,128751,1],[128765,128767,1],[128887,128890,1],[128986,128991,1],[129004,129007,1],[129009,129023,1],[129036,129039,1],[129096,129103,1],[129114,129119,1],[129160,129167,1],[129198,129199,1],[129212,129215,1],[129218,129279,1],[129620,129631,1],[129646,129647,1],[129661,129663,1],[129674,129678,1],[129735,129741,1],[129757,129758,1],[129770,129775,1],[129785,129791,1],[129939,130042,103],[130043,131071,1],[173792,173823,1],[177978,177983,1],[178206,178207,1],[183970,183983,1],[191457,191471,1],[192094,194559,1],[195102,196607,1],[201547,201551,1],[205744,917759,1],[918000,1114111,1]];static Cc=[[0,31,1],[127,159,1]];static Cf=[[173,1536,1363],[1537,1541,1],[1564,1757,193],[1807,2192,385],[2193,2274,81],[6158,8203,2045],[8204,8207,1],[8234,8238,1],[8288,8292,1],[8294,8303,1],[65279,65529,250],[65530,65531,1],[69821,69837,16],[78896,78911,1],[113824,113827,1],[119155,119162,1],[917505,917536,31],[917537,917631,1]];static Co=[[57344,63743,1],[983040,1048573,1],[1048576,1114109,1]];static Cs=[[55296,57343,1]];static L=[[65,90,1],[97,122,1],[170,181,11],[186,192,6],[193,214,1],[216,246,1],[248,705,1],[710,721,1],[736,740,1],[748,750,2],[880,884,1],[886,887,1],[890,893,1],[895,902,7],[904,906,1],[908,910,2],[911,929,1],[931,1013,1],[1015,1153,1],[1162,1327,1],[1329,1366,1],[1369,1376,7],[1377,1416,1],[1488,1514,1],[1519,1522,1],[1568,1610,1],[1646,1647,1],[1649,1747,1],[1749,1765,16],[1766,1774,8],[1775,1786,11],[1787,1788,1],[1791,1808,17],[1810,1839,1],[1869,1957,1],[1969,1994,25],[1995,2026,1],[2036,2037,1],[2042,2048,6],[2049,2069,1],[2074,2084,10],[2088,2112,24],[2113,2136,1],[2144,2154,1],[2160,2183,1],[2185,2190,1],[2208,2249,1],[2308,2361,1],[2365,2384,19],[2392,2401,1],[2417,2432,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2493,2510,17],[2524,2525,1],[2527,2529,1],[2544,2545,1],[2556,2565,9],[2566,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2649,2652,1],[2654,2674,20],[2675,2676,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2749,2768,19],[2784,2785,1],[2809,2821,12],[2822,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2877,2908,31],[2909,2911,2],[2912,2913,1],[2929,2947,18],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3024,3077,53],[3078,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3133,3160,27],[3161,3162,1],[3165,3168,3],[3169,3200,31],[3205,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3261,3293,32],[3294,3296,2],[3297,3313,16],[3314,3332,18],[3333,3340,1],[3342,3344,1],[3346,3386,1],[3389,3406,17],[3412,3414,1],[3423,3425,1],[3450,3455,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3585,3632,1],[3634,3635,1],[3648,3654,1],[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3760,1],[3762,3763,1],[3773,3776,3],[3777,3780,1],[3782,3804,22],[3805,3807,1],[3840,3904,64],[3905,3911,1],[3913,3948,1],[3976,3980,1],[4096,4138,1],[4159,4176,17],[4177,4181,1],[4186,4189,1],[4193,4197,4],[4198,4206,8],[4207,4208,1],[4213,4225,1],[4238,4256,18],[4257,4293,1],[4295,4301,6],[4304,4346,1],[4348,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4992,5007,1],[5024,5109,1],[5112,5117,1],[5121,5740,1],[5743,5759,1],[5761,5786,1],[5792,5866,1],[5873,5880,1],[5888,5905,1],[5919,5937,1],[5952,5969,1],[5984,5996,1],[5998,6000,1],[6016,6067,1],[6103,6108,5],[6176,6264,1],[6272,6276,1],[6279,6312,1],[6314,6320,6],[6321,6389,1],[6400,6430,1],[6480,6509,1],[6512,6516,1],[6528,6571,1],[6576,6601,1],[6656,6678,1],[6688,6740,1],[6823,6917,94],[6918,6963,1],[6981,6988,1],[7043,7072,1],[7086,7087,1],[7098,7141,1],[7168,7203,1],[7245,7247,1],[7258,7293,1],[7296,7306,1],[7312,7354,1],[7357,7359,1],[7401,7404,1],[7406,7411,1],[7413,7414,1],[7418,7424,6],[7425,7615,1],[7680,7957,1],[7960,7965,1],[7968,8005,1],[8008,8013,1],[8016,8023,1],[8025,8031,2],[8032,8061,1],[8064,8116,1],[8118,8124,1],[8126,8130,4],[8131,8132,1],[8134,8140,1],[8144,8147,1],[8150,8155,1],[8160,8172,1],[8178,8180,1],[8182,8188,1],[8305,8319,14],[8336,8348,1],[8450,8455,5],[8458,8467,1],[8469,8473,4],[8474,8477,1],[8484,8490,2],[8491,8493,1],[8495,8505,1],[8508,8511,1],[8517,8521,1],[8526,8579,53],[8580,11264,2684],[11265,11492,1],[11499,11502,1],[11506,11507,1],[11520,11557,1],[11559,11565,6],[11568,11623,1],[11631,11648,17],[11649,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[11823,12293,470],[12294,12337,43],[12338,12341,1],[12347,12348,1],[12353,12438,1],[12445,12447,1],[12449,12538,1],[12540,12543,1],[12549,12591,1],[12593,12686,1],[12704,12735,1],[12784,12799,1],[13312,19903,1],[19968,42124,1],[42192,42237,1],[42240,42508,1],[42512,42527,1],[42538,42539,1],[42560,42606,1],[42623,42653,1],[42656,42725,1],[42775,42783,1],[42786,42888,1],[42891,42957,1],[42960,42961,1],[42963,42965,2],[42966,42972,1],[42994,43009,1],[43011,43013,1],[43015,43018,1],[43020,43042,1],[43072,43123,1],[43138,43187,1],[43250,43255,1],[43259,43261,2],[43262,43274,12],[43275,43301,1],[43312,43334,1],[43360,43388,1],[43396,43442,1],[43471,43488,17],[43489,43492,1],[43494,43503,1],[43514,43518,1],[43520,43560,1],[43584,43586,1],[43588,43595,1],[43616,43638,1],[43642,43646,4],[43647,43695,1],[43697,43701,4],[43702,43705,3],[43706,43709,1],[43712,43714,2],[43739,43741,1],[43744,43754,1],[43762,43764,1],[43777,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[43824,43866,1],[43868,43881,1],[43888,44002,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[63744,64109,1],[64112,64217,1],[64256,64262,1],[64275,64279,1],[64285,64287,2],[64288,64296,1],[64298,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64433,1],[64467,64829,1],[64848,64911,1],[64914,64967,1],[65008,65019,1],[65136,65140,1],[65142,65276,1],[65313,65338,1],[65345,65370,1],[65382,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1],[66176,66204,1],[66208,66256,1],[66304,66335,1],[66349,66368,1],[66370,66377,1],[66384,66421,1],[66432,66461,1],[66464,66499,1],[66504,66511,1],[66560,66717,1],[66736,66771,1],[66776,66811,1],[66816,66855,1],[66864,66915,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[67008,67059,1],[67072,67382,1],[67392,67413,1],[67424,67431,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3],[67648,67669,1],[67680,67702,1],[67712,67742,1],[67808,67826,1],[67828,67829,1],[67840,67861,1],[67872,67897,1],[67968,68023,1],[68030,68031,1],[68096,68112,16],[68113,68115,1],[68117,68119,1],[68121,68149,1],[68192,68220,1],[68224,68252,1],[68288,68295,1],[68297,68324,1],[68352,68405,1],[68416,68437,1],[68448,68466,1],[68480,68497,1],[68608,68680,1],[68736,68786,1],[68800,68850,1],[68864,68899,1],[68938,68965,1],[68975,68997,1],[69248,69289,1],[69296,69297,1],[69314,69316,1],[69376,69404,1],[69415,69424,9],[69425,69445,1],[69488,69505,1],[69552,69572,1],[69600,69622,1],[69635,69687,1],[69745,69746,1],[69749,69763,14],[69764,69807,1],[69840,69864,1],[69891,69926,1],[69956,69959,3],[69968,70002,1],[70006,70019,13],[70020,70066,1],[70081,70084,1],[70106,70108,2],[70144,70161,1],[70163,70187,1],[70207,70208,1],[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70312,1],[70320,70366,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70461,70480,19],[70493,70497,1],[70528,70537,1],[70539,70542,3],[70544,70581,1],[70583,70609,26],[70611,70656,45],[70657,70708,1],[70727,70730,1],[70751,70753,1],[70784,70831,1],[70852,70853,1],[70855,71040,185],[71041,71086,1],[71128,71131,1],[71168,71215,1],[71236,71296,60],[71297,71338,1],[71352,71424,72],[71425,71450,1],[71488,71494,1],[71680,71723,1],[71840,71903,1],[71935,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71983,1],[71999,72001,2],[72096,72103,1],[72106,72144,1],[72161,72163,2],[72192,72203,11],[72204,72242,1],[72250,72272,22],[72284,72329,1],[72349,72368,19],[72369,72440,1],[72640,72672,1],[72704,72712,1],[72714,72750,1],[72768,72818,50],[72819,72847,1],[72960,72966,1],[72968,72969,1],[72971,73008,1],[73030,73056,26],[73057,73061,1],[73063,73064,1],[73066,73097,1],[73112,73440,328],[73441,73458,1],[73474,73476,2],[73477,73488,1],[73490,73523,1],[73648,73728,80],[73729,74649,1],[74880,75075,1],[77712,77808,1],[77824,78895,1],[78913,78918,1],[78944,82938,1],[82944,83526,1],[90368,90397,1],[92160,92728,1],[92736,92766,1],[92784,92862,1],[92880,92909,1],[92928,92975,1],[92992,92995,1],[93027,93047,1],[93053,93071,1],[93504,93548,1],[93760,93823,1],[93952,94026,1],[94032,94099,67],[94100,94111,1],[94176,94177,1],[94179,94208,29],[94209,100343,1],[100352,101589,1],[101631,101640,1],[110576,110579,1],[110581,110587,1],[110589,110590,1],[110592,110882,1],[110898,110928,30],[110929,110930,1],[110933,110948,15],[110949,110951,1],[110960,111355,1],[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119973,3],[119974,119977,3],[119978,119980,1],[119982,119993,1],[119995,119997,2],[119998,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120146,120485,1],[120488,120512,1],[120514,120538,1],[120540,120570,1],[120572,120596,1],[120598,120628,1],[120630,120654,1],[120656,120686,1],[120688,120712,1],[120714,120744,1],[120746,120770,1],[120772,120779,1],[122624,122654,1],[122661,122666,1],[122928,122989,1],[123136,123180,1],[123191,123197,1],[123214,123536,322],[123537,123565,1],[123584,123627,1],[124112,124139,1],[124368,124397,1],[124400,124896,496],[124897,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1],[124928,125124,1],[125184,125251,1],[125259,126464,1205],[126465,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static foldL=[[837,837,1]];static Ll=[[97,122,1],[181,223,42],[224,246,1],[248,255,1],[257,311,2],[312,328,2],[329,375,2],[378,382,2],[383,384,1],[387,389,2],[392,396,4],[397,402,5],[405,409,4],[410,411,1],[414,417,3],[419,421,2],[424,426,2],[427,429,2],[432,436,4],[438,441,3],[442,445,3],[446,447,1],[454,460,3],[462,476,2],[477,495,2],[496,499,3],[501,505,4],[507,563,2],[564,569,1],[572,575,3],[576,578,2],[583,591,2],[592,659,1],[661,687,1],[881,883,2],[887,891,4],[892,893,1],[912,940,28],[941,974,1],[976,977,1],[981,983,1],[985,1007,2],[1008,1011,1],[1013,1019,3],[1020,1072,52],[1073,1119,1],[1121,1153,2],[1163,1215,2],[1218,1230,2],[1231,1327,2],[1376,1416,1],[4304,4346,1],[4349,4351,1],[5112,5117,1],[7296,7304,1],[7306,7424,118],[7425,7467,1],[7531,7543,1],[7545,7578,1],[7681,7829,2],[7830,7837,1],[7839,7935,2],[7936,7943,1],[7952,7957,1],[7968,7975,1],[7984,7991,1],[8000,8005,1],[8016,8023,1],[8032,8039,1],[8048,8061,1],[8064,8071,1],[8080,8087,1],[8096,8103,1],[8112,8116,1],[8118,8119,1],[8126,8130,4],[8131,8132,1],[8134,8135,1],[8144,8147,1],[8150,8151,1],[8160,8167,1],[8178,8180,1],[8182,8183,1],[8458,8462,4],[8463,8467,4],[8495,8505,5],[8508,8509,1],[8518,8521,1],[8526,8580,54],[11312,11359,1],[11361,11365,4],[11366,11372,2],[11377,11379,2],[11380,11382,2],[11383,11387,1],[11393,11491,2],[11492,11500,8],[11502,11507,5],[11520,11557,1],[11559,11565,6],[42561,42605,2],[42625,42651,2],[42787,42799,2],[42800,42801,1],[42803,42865,2],[42866,42872,1],[42874,42876,2],[42879,42887,2],[42892,42894,2],[42897,42899,2],[42900,42901,1],[42903,42921,2],[42927,42933,6],[42935,42947,2],[42952,42954,2],[42957,42961,4],[42963,42971,2],[42998,43002,4],[43824,43866,1],[43872,43880,1],[43888,43967,1],[64256,64262,1],[64275,64279,1],[65345,65370,1],[66600,66639,1],[66776,66811,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[68800,68850,1],[68976,68997,1],[71872,71903,1],[93792,93823,1],[119834,119859,1],[119886,119892,1],[119894,119911,1],[119938,119963,1],[119990,119993,1],[119995,119997,2],[119998,120003,1],[120005,120015,1],[120042,120067,1],[120094,120119,1],[120146,120171,1],[120198,120223,1],[120250,120275,1],[120302,120327,1],[120354,120379,1],[120406,120431,1],[120458,120485,1],[120514,120538,1],[120540,120545,1],[120572,120596,1],[120598,120603,1],[120630,120654,1],[120656,120661,1],[120688,120712,1],[120714,120719,1],[120746,120770,1],[120772,120777,1],[120779,122624,1845],[122625,122633,1],[122635,122654,1],[122661,122666,1],[125218,125251,1]];static foldLl=[[65,90,1],[192,214,1],[216,222,1],[256,302,2],[306,310,2],[313,327,2],[330,376,2],[377,381,2],[385,386,1],[388,390,2],[391,393,2],[394,395,1],[398,401,1],[403,404,1],[406,408,1],[412,413,1],[415,416,1],[418,422,2],[423,425,2],[428,430,2],[431,433,2],[434,435,1],[437,439,2],[440,444,4],[452,453,1],[455,456,1],[458,459,1],[461,475,2],[478,494,2],[497,498,1],[500,502,2],[503,504,1],[506,562,2],[570,571,1],[573,574,1],[577,579,2],[580,582,1],[584,590,2],[837,880,43],[882,886,4],[895,902,7],[904,906,1],[908,910,2],[911,913,2],[914,929,1],[931,939,1],[975,984,9],[986,1006,2],[1012,1015,3],[1017,1018,1],[1021,1071,1],[1120,1152,2],[1162,1216,2],[1217,1229,2],[1232,1326,2],[1329,1366,1],[4256,4293,1],[4295,4301,6],[5024,5109,1],[7305,7312,7],[7313,7354,1],[7357,7359,1],[7680,7828,2],[7838,7934,2],[7944,7951,1],[7960,7965,1],[7976,7983,1],[7992,7999,1],[8008,8013,1],[8025,8031,2],[8040,8047,1],[8072,8079,1],[8088,8095,1],[8104,8111,1],[8120,8124,1],[8136,8140,1],[8152,8155,1],[8168,8172,1],[8184,8188,1],[8486,8490,4],[8491,8498,7],[8579,11264,2685],[11265,11311,1],[11360,11362,2],[11363,11364,1],[11367,11373,2],[11374,11376,1],[11378,11381,3],[11390,11392,1],[11394,11490,2],[11499,11501,2],[11506,42560,31054],[42562,42604,2],[42624,42650,2],[42786,42798,2],[42802,42862,2],[42873,42877,2],[42878,42886,2],[42891,42893,2],[42896,42898,2],[42902,42922,2],[42923,42926,1],[42928,42932,1],[42934,42948,2],[42949,42951,1],[42953,42955,2],[42956,42960,4],[42966,42972,2],[42997,65313,22316],[65314,65338,1],[66560,66599,1],[66736,66771,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[68736,68786,1],[68944,68965,1],[71840,71871,1],[93760,93791,1],[125184,125217,1]];static Lm=[[688,705,1],[710,721,1],[736,740,1],[748,750,2],[884,890,6],[1369,1600,231],[1765,1766,1],[2036,2037,1],[2042,2074,32],[2084,2088,4],[2249,2417,168],[3654,3782,128],[4348,6103,1755],[6211,6823,612],[7288,7293,1],[7468,7530,1],[7544,7579,35],[7580,7615,1],[8305,8319,14],[8336,8348,1],[11388,11389,1],[11631,11823,192],[12293,12337,44],[12338,12341,1],[12347,12445,98],[12446,12540,94],[12541,12542,1],[40981,42232,1251],[42233,42237,1],[42508,42623,115],[42652,42653,1],[42775,42783,1],[42864,42888,24],[42994,42996,1],[43000,43001,1],[43471,43494,23],[43632,43741,109],[43763,43764,1],[43868,43871,1],[43881,65392,21511],[65438,65439,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[68942,68975,33],[92992,92995,1],[93504,93506,1],[93547,93548,1],[94099,94111,1],[94176,94177,1],[94179,110576,16397],[110577,110579,1],[110581,110587,1],[110589,110590,1],[122928,122989,1],[123191,123197,1],[124139,125259,1120]];static Lo=[[170,186,16],[443,448,5],[449,451,1],[660,1488,828],[1489,1514,1],[1519,1522,1],[1568,1599,1],[1601,1610,1],[1646,1647,1],[1649,1747,1],[1749,1774,25],[1775,1786,11],[1787,1788,1],[1791,1808,17],[1810,1839,1],[1869,1957,1],[1969,1994,25],[1995,2026,1],[2048,2069,1],[2112,2136,1],[2144,2154,1],[2160,2183,1],[2185,2190,1],[2208,2248,1],[2308,2361,1],[2365,2384,19],[2392,2401,1],[2418,2432,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2493,2510,17],[2524,2525,1],[2527,2529,1],[2544,2545,1],[2556,2565,9],[2566,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2649,2652,1],[2654,2674,20],[2675,2676,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2749,2768,19],[2784,2785,1],[2809,2821,12],[2822,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2877,2908,31],[2909,2911,2],[2912,2913,1],[2929,2947,18],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3024,3077,53],[3078,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3133,3160,27],[3161,3162,1],[3165,3168,3],[3169,3200,31],[3205,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3261,3293,32],[3294,3296,2],[3297,3313,16],[3314,3332,18],[3333,3340,1],[3342,3344,1],[3346,3386,1],[3389,3406,17],[3412,3414,1],[3423,3425,1],[3450,3455,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3585,3632,1],[3634,3635,1],[3648,3653,1],[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3760,1],[3762,3763,1],[3773,3776,3],[3777,3780,1],[3804,3807,1],[3840,3904,64],[3905,3911,1],[3913,3948,1],[3976,3980,1],[4096,4138,1],[4159,4176,17],[4177,4181,1],[4186,4189,1],[4193,4197,4],[4198,4206,8],[4207,4208,1],[4213,4225,1],[4238,4352,114],[4353,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4992,5007,1],[5121,5740,1],[5743,5759,1],[5761,5786,1],[5792,5866,1],[5873,5880,1],[5888,5905,1],[5919,5937,1],[5952,5969,1],[5984,5996,1],[5998,6000,1],[6016,6067,1],[6108,6176,68],[6177,6210,1],[6212,6264,1],[6272,6276,1],[6279,6312,1],[6314,6320,6],[6321,6389,1],[6400,6430,1],[6480,6509,1],[6512,6516,1],[6528,6571,1],[6576,6601,1],[6656,6678,1],[6688,6740,1],[6917,6963,1],[6981,6988,1],[7043,7072,1],[7086,7087,1],[7098,7141,1],[7168,7203,1],[7245,7247,1],[7258,7287,1],[7401,7404,1],[7406,7411,1],[7413,7414,1],[7418,8501,1083],[8502,8504,1],[11568,11623,1],[11648,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[12294,12348,54],[12353,12438,1],[12447,12449,2],[12450,12538,1],[12543,12549,6],[12550,12591,1],[12593,12686,1],[12704,12735,1],[12784,12799,1],[13312,19903,1],[19968,40980,1],[40982,42124,1],[42192,42231,1],[42240,42507,1],[42512,42527,1],[42538,42539,1],[42606,42656,50],[42657,42725,1],[42895,42999,104],[43003,43009,1],[43011,43013,1],[43015,43018,1],[43020,43042,1],[43072,43123,1],[43138,43187,1],[43250,43255,1],[43259,43261,2],[43262,43274,12],[43275,43301,1],[43312,43334,1],[43360,43388,1],[43396,43442,1],[43488,43492,1],[43495,43503,1],[43514,43518,1],[43520,43560,1],[43584,43586,1],[43588,43595,1],[43616,43631,1],[43633,43638,1],[43642,43646,4],[43647,43695,1],[43697,43701,4],[43702,43705,3],[43706,43709,1],[43712,43714,2],[43739,43740,1],[43744,43754,1],[43762,43777,15],[43778,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[43968,44002,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[63744,64109,1],[64112,64217,1],[64285,64287,2],[64288,64296,1],[64298,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64433,1],[64467,64829,1],[64848,64911,1],[64914,64967,1],[65008,65019,1],[65136,65140,1],[65142,65276,1],[65382,65391,1],[65393,65437,1],[65440,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1],[66176,66204,1],[66208,66256,1],[66304,66335,1],[66349,66368,1],[66370,66377,1],[66384,66421,1],[66432,66461,1],[66464,66499,1],[66504,66511,1],[66640,66717,1],[66816,66855,1],[66864,66915,1],[67008,67059,1],[67072,67382,1],[67392,67413,1],[67424,67431,1],[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3],[67648,67669,1],[67680,67702,1],[67712,67742,1],[67808,67826,1],[67828,67829,1],[67840,67861,1],[67872,67897,1],[67968,68023,1],[68030,68031,1],[68096,68112,16],[68113,68115,1],[68117,68119,1],[68121,68149,1],[68192,68220,1],[68224,68252,1],[68288,68295,1],[68297,68324,1],[68352,68405,1],[68416,68437,1],[68448,68466,1],[68480,68497,1],[68608,68680,1],[68864,68899,1],[68938,68941,1],[68943,69248,305],[69249,69289,1],[69296,69297,1],[69314,69316,1],[69376,69404,1],[69415,69424,9],[69425,69445,1],[69488,69505,1],[69552,69572,1],[69600,69622,1],[69635,69687,1],[69745,69746,1],[69749,69763,14],[69764,69807,1],[69840,69864,1],[69891,69926,1],[69956,69959,3],[69968,70002,1],[70006,70019,13],[70020,70066,1],[70081,70084,1],[70106,70108,2],[70144,70161,1],[70163,70187,1],[70207,70208,1],[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70312,1],[70320,70366,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70461,70480,19],[70493,70497,1],[70528,70537,1],[70539,70542,3],[70544,70581,1],[70583,70609,26],[70611,70656,45],[70657,70708,1],[70727,70730,1],[70751,70753,1],[70784,70831,1],[70852,70853,1],[70855,71040,185],[71041,71086,1],[71128,71131,1],[71168,71215,1],[71236,71296,60],[71297,71338,1],[71352,71424,72],[71425,71450,1],[71488,71494,1],[71680,71723,1],[71935,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71983,1],[71999,72001,2],[72096,72103,1],[72106,72144,1],[72161,72163,2],[72192,72203,11],[72204,72242,1],[72250,72272,22],[72284,72329,1],[72349,72368,19],[72369,72440,1],[72640,72672,1],[72704,72712,1],[72714,72750,1],[72768,72818,50],[72819,72847,1],[72960,72966,1],[72968,72969,1],[72971,73008,1],[73030,73056,26],[73057,73061,1],[73063,73064,1],[73066,73097,1],[73112,73440,328],[73441,73458,1],[73474,73476,2],[73477,73488,1],[73490,73523,1],[73648,73728,80],[73729,74649,1],[74880,75075,1],[77712,77808,1],[77824,78895,1],[78913,78918,1],[78944,82938,1],[82944,83526,1],[90368,90397,1],[92160,92728,1],[92736,92766,1],[92784,92862,1],[92880,92909,1],[92928,92975,1],[93027,93047,1],[93053,93071,1],[93507,93546,1],[93952,94026,1],[94032,94208,176],[94209,100343,1],[100352,101589,1],[101631,101640,1],[110592,110882,1],[110898,110928,30],[110929,110930,1],[110933,110948,15],[110949,110951,1],[110960,111355,1],[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[122634,123136,502],[123137,123180,1],[123214,123536,322],[123537,123565,1],[123584,123627,1],[124112,124138,1],[124368,124397,1],[124400,124896,496],[124897,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1],[124928,125124,1],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static Lt=[[453,459,3],[498,8072,7574],[8073,8079,1],[8088,8095,1],[8104,8111,1],[8124,8140,16],[8188,8188,1]];static foldLt=[[452,454,2],[455,457,2],[458,460,2],[497,499,2],[8064,8071,1],[8080,8087,1],[8096,8103,1],[8115,8131,16],[8179,8179,1]];static Lu=[[65,90,1],[192,214,1],[216,222,1],[256,310,2],[313,327,2],[330,376,2],[377,381,2],[385,386,1],[388,390,2],[391,393,2],[394,395,1],[398,401,1],[403,404,1],[406,408,1],[412,413,1],[415,416,1],[418,422,2],[423,425,2],[428,430,2],[431,433,2],[434,435,1],[437,439,2],[440,444,4],[452,461,3],[463,475,2],[478,494,2],[497,500,3],[502,504,1],[506,562,2],[570,571,1],[573,574,1],[577,579,2],[580,582,1],[584,590,2],[880,882,2],[886,895,9],[902,904,2],[905,906,1],[908,910,2],[911,913,2],[914,929,1],[931,939,1],[975,978,3],[979,980,1],[984,1006,2],[1012,1015,3],[1017,1018,1],[1021,1071,1],[1120,1152,2],[1162,1216,2],[1217,1229,2],[1232,1326,2],[1329,1366,1],[4256,4293,1],[4295,4301,6],[5024,5109,1],[7305,7312,7],[7313,7354,1],[7357,7359,1],[7680,7828,2],[7838,7934,2],[7944,7951,1],[7960,7965,1],[7976,7983,1],[7992,7999,1],[8008,8013,1],[8025,8031,2],[8040,8047,1],[8120,8123,1],[8136,8139,1],[8152,8155,1],[8168,8172,1],[8184,8187,1],[8450,8455,5],[8459,8461,1],[8464,8466,1],[8469,8473,4],[8474,8477,1],[8484,8490,2],[8491,8493,1],[8496,8499,1],[8510,8511,1],[8517,8579,62],[11264,11311,1],[11360,11362,2],[11363,11364,1],[11367,11373,2],[11374,11376,1],[11378,11381,3],[11390,11392,1],[11394,11490,2],[11499,11501,2],[11506,42560,31054],[42562,42604,2],[42624,42650,2],[42786,42798,2],[42802,42862,2],[42873,42877,2],[42878,42886,2],[42891,42893,2],[42896,42898,2],[42902,42922,2],[42923,42926,1],[42928,42932,1],[42934,42948,2],[42949,42951,1],[42953,42955,2],[42956,42960,4],[42966,42972,2],[42997,65313,22316],[65314,65338,1],[66560,66599,1],[66736,66771,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[68736,68786,1],[68944,68965,1],[71840,71871,1],[93760,93791,1],[119808,119833,1],[119860,119885,1],[119912,119937,1],[119964,119966,2],[119967,119973,3],[119974,119977,3],[119978,119980,1],[119982,119989,1],[120016,120041,1],[120068,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120120,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120172,120197,1],[120224,120249,1],[120276,120301,1],[120328,120353,1],[120380,120405,1],[120432,120457,1],[120488,120512,1],[120546,120570,1],[120604,120628,1],[120662,120686,1],[120720,120744,1],[120778,125184,4406],[125185,125217,1]];static Upper=this.Lu;static foldLu=[[97,122,1],[181,223,42],[224,246,1],[248,255,1],[257,303,2],[307,311,2],[314,328,2],[331,375,2],[378,382,2],[383,384,1],[387,389,2],[392,396,4],[402,405,3],[409,411,1],[414,417,3],[419,421,2],[424,429,5],[432,436,4],[438,441,3],[445,447,2],[453,454,1],[456,457,1],[459,460,1],[462,476,2],[477,495,2],[498,499,1],[501,505,4],[507,543,2],[547,563,2],[572,575,3],[576,578,2],[583,591,2],[592,596,1],[598,599,1],[601,603,2],[604,608,4],[609,611,2],[612,614,1],[616,620,1],[623,625,2],[626,629,3],[637,640,3],[642,643,1],[647,652,1],[658,669,11],[670,837,167],[881,883,2],[887,891,4],[892,893,1],[940,943,1],[945,974,1],[976,977,1],[981,983,1],[985,1007,2],[1008,1011,1],[1013,1019,3],[1072,1119,1],[1121,1153,2],[1163,1215,2],[1218,1230,2],[1231,1327,2],[1377,1414,1],[4304,4346,1],[4349,4351,1],[5112,5117,1],[7296,7304,1],[7306,7545,239],[7549,7566,17],[7681,7829,2],[7835,7841,6],[7843,7935,2],[7936,7943,1],[7952,7957,1],[7968,7975,1],[7984,7991,1],[8000,8005,1],[8017,8023,2],[8032,8039,1],[8048,8061,1],[8112,8113,1],[8126,8144,18],[8145,8160,15],[8161,8165,4],[8526,8580,54],[11312,11359,1],[11361,11365,4],[11366,11372,2],[11379,11382,3],[11393,11491,2],[11500,11502,2],[11507,11520,13],[11521,11557,1],[11559,11565,6],[42561,42605,2],[42625,42651,2],[42787,42799,2],[42803,42863,2],[42874,42876,2],[42879,42887,2],[42892,42897,5],[42899,42900,1],[42903,42921,2],[42933,42947,2],[42952,42954,2],[42957,42961,4],[42967,42971,2],[42998,43859,861],[43888,43967,1],[65345,65370,1],[66600,66639,1],[66776,66811,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[68800,68850,1],[68976,68997,1],[71872,71903,1],[93792,93823,1],[125218,125251,1]];static M=[[768,879,1],[1155,1161,1],[1425,1469,1],[1471,1473,2],[1474,1476,2],[1477,1479,2],[1552,1562,1],[1611,1631,1],[1648,1750,102],[1751,1756,1],[1759,1764,1],[1767,1768,1],[1770,1773,1],[1809,1840,31],[1841,1866,1],[1958,1968,1],[2027,2035,1],[2045,2070,25],[2071,2073,1],[2075,2083,1],[2085,2087,1],[2089,2093,1],[2137,2139,1],[2199,2207,1],[2250,2273,1],[2275,2307,1],[2362,2364,1],[2366,2383,1],[2385,2391,1],[2402,2403,1],[2433,2435,1],[2492,2494,2],[2495,2500,1],[2503,2504,1],[2507,2509,1],[2519,2530,11],[2531,2558,27],[2561,2563,1],[2620,2622,2],[2623,2626,1],[2631,2632,1],[2635,2637,1],[2641,2672,31],[2673,2677,4],[2689,2691,1],[2748,2750,2],[2751,2757,1],[2759,2761,1],[2763,2765,1],[2786,2787,1],[2810,2815,1],[2817,2819,1],[2876,2878,2],[2879,2884,1],[2887,2888,1],[2891,2893,1],[2901,2903,1],[2914,2915,1],[2946,3006,60],[3007,3010,1],[3014,3016,1],[3018,3021,1],[3031,3072,41],[3073,3076,1],[3132,3134,2],[3135,3140,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3170,3171,1],[3201,3203,1],[3260,3262,2],[3263,3268,1],[3270,3272,1],[3274,3277,1],[3285,3286,1],[3298,3299,1],[3315,3328,13],[3329,3331,1],[3387,3388,1],[3390,3396,1],[3398,3400,1],[3402,3405,1],[3415,3426,11],[3427,3457,30],[3458,3459,1],[3530,3535,5],[3536,3540,1],[3542,3544,2],[3545,3551,1],[3570,3571,1],[3633,3636,3],[3637,3642,1],[3655,3662,1],[3761,3764,3],[3765,3772,1],[3784,3790,1],[3864,3865,1],[3893,3897,2],[3902,3903,1],[3953,3972,1],[3974,3975,1],[3981,3991,1],[3993,4028,1],[4038,4139,101],[4140,4158,1],[4182,4185,1],[4190,4192,1],[4194,4196,1],[4199,4205,1],[4209,4212,1],[4226,4237,1],[4239,4250,11],[4251,4253,1],[4957,4959,1],[5906,5909,1],[5938,5940,1],[5970,5971,1],[6002,6003,1],[6068,6099,1],[6109,6155,46],[6156,6157,1],[6159,6277,118],[6278,6313,35],[6432,6443,1],[6448,6459,1],[6679,6683,1],[6741,6750,1],[6752,6780,1],[6783,6832,49],[6833,6862,1],[6912,6916,1],[6964,6980,1],[7019,7027,1],[7040,7042,1],[7073,7085,1],[7142,7155,1],[7204,7223,1],[7376,7378,1],[7380,7400,1],[7405,7412,7],[7415,7417,1],[7616,7679,1],[8400,8432,1],[11503,11505,1],[11647,11744,97],[11745,11775,1],[12330,12335,1],[12441,12442,1],[42607,42610,1],[42612,42621,1],[42654,42655,1],[42736,42737,1],[43010,43014,4],[43019,43043,24],[43044,43047,1],[43052,43136,84],[43137,43188,51],[43189,43205,1],[43232,43249,1],[43263,43302,39],[43303,43309,1],[43335,43347,1],[43392,43395,1],[43443,43456,1],[43493,43561,68],[43562,43574,1],[43587,43596,9],[43597,43643,46],[43644,43645,1],[43696,43698,2],[43699,43700,1],[43703,43704,1],[43710,43711,1],[43713,43755,42],[43756,43759,1],[43765,43766,1],[44003,44010,1],[44012,44013,1],[64286,65024,738],[65025,65039,1],[65056,65071,1],[66045,66272,227],[66422,66426,1],[68097,68099,1],[68101,68102,1],[68108,68111,1],[68152,68154,1],[68159,68325,166],[68326,68900,574],[68901,68903,1],[68969,68973,1],[69291,69292,1],[69372,69375,1],[69446,69456,1],[69506,69509,1],[69632,69634,1],[69688,69702,1],[69744,69747,3],[69748,69759,11],[69760,69762,1],[69808,69818,1],[69826,69888,62],[69889,69890,1],[69927,69940,1],[69957,69958,1],[70003,70016,13],[70017,70018,1],[70067,70080,1],[70089,70092,1],[70094,70095,1],[70188,70199,1],[70206,70209,3],[70367,70378,1],[70400,70403,1],[70459,70460,1],[70462,70468,1],[70471,70472,1],[70475,70477,1],[70487,70498,11],[70499,70502,3],[70503,70508,1],[70512,70516,1],[70584,70592,1],[70594,70597,3],[70599,70602,1],[70604,70608,1],[70610,70625,15],[70626,70709,83],[70710,70726,1],[70750,70832,82],[70833,70851,1],[71087,71093,1],[71096,71104,1],[71132,71133,1],[71216,71232,1],[71339,71351,1],[71453,71467,1],[71724,71738,1],[71984,71989,1],[71991,71992,1],[71995,71998,1],[72000,72002,2],[72003,72145,142],[72146,72151,1],[72154,72160,1],[72164,72193,29],[72194,72202,1],[72243,72249,1],[72251,72254,1],[72263,72273,10],[72274,72283,1],[72330,72345,1],[72751,72758,1],[72760,72767,1],[72850,72871,1],[72873,72886,1],[73009,73014,1],[73018,73020,2],[73021,73023,2],[73024,73029,1],[73031,73098,67],[73099,73102,1],[73104,73105,1],[73107,73111,1],[73459,73462,1],[73472,73473,1],[73475,73524,49],[73525,73530,1],[73534,73538,1],[73562,78912,5350],[78919,78933,1],[90398,90415,1],[92912,92916,1],[92976,92982,1],[94031,94033,2],[94034,94087,1],[94095,94098,1],[94180,94192,12],[94193,113821,19628],[113822,118528,4706],[118529,118573,1],[118576,118598,1],[119141,119145,1],[119149,119154,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[119362,119364,1],[121344,121398,1],[121403,121452,1],[121461,121476,15],[121499,121503,1],[121505,121519,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1],[123023,123184,161],[123185,123190,1],[123566,123628,62],[123629,123631,1],[124140,124143,1],[124398,124399,1],[125136,125142,1],[125252,125258,1],[917760,917999,1]];static foldM=[[921,953,32],[8126,8126,1]];static Mc=[[2307,2363,56],[2366,2368,1],[2377,2380,1],[2382,2383,1],[2434,2435,1],[2494,2496,1],[2503,2504,1],[2507,2508,1],[2519,2563,44],[2622,2624,1],[2691,2750,59],[2751,2752,1],[2761,2763,2],[2764,2818,54],[2819,2878,59],[2880,2887,7],[2888,2891,3],[2892,2903,11],[3006,3007,1],[3009,3010,1],[3014,3016,1],[3018,3020,1],[3031,3073,42],[3074,3075,1],[3137,3140,1],[3202,3203,1],[3262,3264,2],[3265,3268,1],[3271,3272,1],[3274,3275,1],[3285,3286,1],[3315,3330,15],[3331,3390,59],[3391,3392,1],[3398,3400,1],[3402,3404,1],[3415,3458,43],[3459,3535,76],[3536,3537,1],[3544,3551,1],[3570,3571,1],[3902,3903,1],[3967,4139,172],[4140,4145,5],[4152,4155,3],[4156,4182,26],[4183,4194,11],[4195,4196,1],[4199,4205,1],[4227,4228,1],[4231,4236,1],[4239,4250,11],[4251,4252,1],[5909,5940,31],[6070,6078,8],[6079,6085,1],[6087,6088,1],[6435,6438,1],[6441,6443,1],[6448,6449,1],[6451,6456,1],[6681,6682,1],[6741,6743,2],[6753,6755,2],[6756,6765,9],[6766,6770,1],[6916,6965,49],[6971,6973,2],[6974,6977,1],[6979,6980,1],[7042,7073,31],[7078,7079,1],[7082,7143,61],[7146,7148,1],[7150,7154,4],[7155,7204,49],[7205,7211,1],[7220,7221,1],[7393,7415,22],[12334,12335,1],[43043,43044,1],[43047,43136,89],[43137,43188,51],[43189,43203,1],[43346,43347,1],[43395,43444,49],[43445,43450,5],[43451,43454,3],[43455,43456,1],[43567,43568,1],[43571,43572,1],[43597,43643,46],[43645,43755,110],[43758,43759,1],[43765,44003,238],[44004,44006,2],[44007,44009,2],[44010,44012,2],[69632,69634,2],[69762,69808,46],[69809,69810,1],[69815,69816,1],[69932,69957,25],[69958,70018,60],[70067,70069,1],[70079,70080,1],[70094,70188,94],[70189,70190,1],[70194,70195,1],[70197,70368,171],[70369,70370,1],[70402,70403,1],[70462,70463,1],[70465,70468,1],[70471,70472,1],[70475,70477,1],[70487,70498,11],[70499,70584,85],[70585,70586,1],[70594,70597,3],[70599,70602,1],[70604,70605,1],[70607,70709,102],[70710,70711,1],[70720,70721,1],[70725,70832,107],[70833,70834,1],[70841,70843,2],[70844,70846,1],[70849,71087,238],[71088,71089,1],[71096,71099,1],[71102,71216,114],[71217,71218,1],[71227,71228,1],[71230,71340,110],[71342,71343,1],[71350,71454,104],[71456,71457,1],[71462,71724,262],[71725,71726,1],[71736,71984,248],[71985,71989,1],[71991,71992,1],[71997,72000,3],[72002,72145,143],[72146,72147,1],[72156,72159,1],[72164,72249,85],[72279,72280,1],[72343,72751,408],[72766,72873,107],[72881,72884,3],[73098,73102,1],[73107,73108,1],[73110,73461,351],[73462,73475,13],[73524,73525,1],[73534,73535,1],[73537,90410,16873],[90411,90412,1],[94033,94087,1],[94192,94193,1],[119141,119142,1],[119149,119154,1]];static Me=[[1160,1161,1],[6846,8413,1567],[8414,8416,1],[8418,8420,1],[42608,42610,1]];static Mn=[[768,879,1],[1155,1159,1],[1425,1469,1],[1471,1473,2],[1474,1476,2],[1477,1479,2],[1552,1562,1],[1611,1631,1],[1648,1750,102],[1751,1756,1],[1759,1764,1],[1767,1768,1],[1770,1773,1],[1809,1840,31],[1841,1866,1],[1958,1968,1],[2027,2035,1],[2045,2070,25],[2071,2073,1],[2075,2083,1],[2085,2087,1],[2089,2093,1],[2137,2139,1],[2199,2207,1],[2250,2273,1],[2275,2306,1],[2362,2364,2],[2369,2376,1],[2381,2385,4],[2386,2391,1],[2402,2403,1],[2433,2492,59],[2497,2500,1],[2509,2530,21],[2531,2558,27],[2561,2562,1],[2620,2625,5],[2626,2631,5],[2632,2635,3],[2636,2637,1],[2641,2672,31],[2673,2677,4],[2689,2690,1],[2748,2753,5],[2754,2757,1],[2759,2760,1],[2765,2786,21],[2787,2810,23],[2811,2815,1],[2817,2876,59],[2879,2881,2],[2882,2884,1],[2893,2901,8],[2902,2914,12],[2915,2946,31],[3008,3021,13],[3072,3076,4],[3132,3134,2],[3135,3136,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3170,3171,1],[3201,3260,59],[3263,3270,7],[3276,3277,1],[3298,3299,1],[3328,3329,1],[3387,3388,1],[3393,3396,1],[3405,3426,21],[3427,3457,30],[3530,3538,8],[3539,3540,1],[3542,3633,91],[3636,3642,1],[3655,3662,1],[3761,3764,3],[3765,3772,1],[3784,3790,1],[3864,3865,1],[3893,3897,2],[3953,3966,1],[3968,3972,1],[3974,3975,1],[3981,3991,1],[3993,4028,1],[4038,4141,103],[4142,4144,1],[4146,4151,1],[4153,4154,1],[4157,4158,1],[4184,4185,1],[4190,4192,1],[4209,4212,1],[4226,4229,3],[4230,4237,7],[4253,4957,704],[4958,4959,1],[5906,5908,1],[5938,5939,1],[5970,5971,1],[6002,6003,1],[6068,6069,1],[6071,6077,1],[6086,6089,3],[6090,6099,1],[6109,6155,46],[6156,6157,1],[6159,6277,118],[6278,6313,35],[6432,6434,1],[6439,6440,1],[6450,6457,7],[6458,6459,1],[6679,6680,1],[6683,6742,59],[6744,6750,1],[6752,6754,2],[6757,6764,1],[6771,6780,1],[6783,6832,49],[6833,6845,1],[6847,6862,1],[6912,6915,1],[6964,6966,2],[6967,6970,1],[6972,6978,6],[7019,7027,1],[7040,7041,1],[7074,7077,1],[7080,7081,1],[7083,7085,1],[7142,7144,2],[7145,7149,4],[7151,7153,1],[7212,7219,1],[7222,7223,1],[7376,7378,1],[7380,7392,1],[7394,7400,1],[7405,7412,7],[7416,7417,1],[7616,7679,1],[8400,8412,1],[8417,8421,4],[8422,8432,1],[11503,11505,1],[11647,11744,97],[11745,11775,1],[12330,12333,1],[12441,12442,1],[42607,42612,5],[42613,42621,1],[42654,42655,1],[42736,42737,1],[43010,43014,4],[43019,43045,26],[43046,43052,6],[43204,43205,1],[43232,43249,1],[43263,43302,39],[43303,43309,1],[43335,43345,1],[43392,43394,1],[43443,43446,3],[43447,43449,1],[43452,43453,1],[43493,43561,68],[43562,43566,1],[43569,43570,1],[43573,43574,1],[43587,43596,9],[43644,43696,52],[43698,43700,1],[43703,43704,1],[43710,43711,1],[43713,43756,43],[43757,43766,9],[44005,44008,3],[44013,64286,20273],[65024,65039,1],[65056,65071,1],[66045,66272,227],[66422,66426,1],[68097,68099,1],[68101,68102,1],[68108,68111,1],[68152,68154,1],[68159,68325,166],[68326,68900,574],[68901,68903,1],[68969,68973,1],[69291,69292,1],[69372,69375,1],[69446,69456,1],[69506,69509,1],[69633,69688,55],[69689,69702,1],[69744,69747,3],[69748,69759,11],[69760,69761,1],[69811,69814,1],[69817,69818,1],[69826,69888,62],[69889,69890,1],[69927,69931,1],[69933,69940,1],[70003,70016,13],[70017,70070,53],[70071,70078,1],[70089,70092,1],[70095,70191,96],[70192,70193,1],[70196,70198,2],[70199,70206,7],[70209,70367,158],[70371,70378,1],[70400,70401,1],[70459,70460,1],[70464,70502,38],[70503,70508,1],[70512,70516,1],[70587,70592,1],[70606,70610,2],[70625,70626,1],[70712,70719,1],[70722,70724,1],[70726,70750,24],[70835,70840,1],[70842,70847,5],[70848,70850,2],[70851,71090,239],[71091,71093,1],[71100,71101,1],[71103,71104,1],[71132,71133,1],[71219,71226,1],[71229,71231,2],[71232,71339,107],[71341,71344,3],[71345,71349,1],[71351,71453,102],[71455,71458,3],[71459,71461,1],[71463,71467,1],[71727,71735,1],[71737,71738,1],[71995,71996,1],[71998,72003,5],[72148,72151,1],[72154,72155,1],[72160,72193,33],[72194,72202,1],[72243,72248,1],[72251,72254,1],[72263,72273,10],[72274,72278,1],[72281,72283,1],[72330,72342,1],[72344,72345,1],[72752,72758,1],[72760,72765,1],[72767,72850,83],[72851,72871,1],[72874,72880,1],[72882,72883,1],[72885,72886,1],[73009,73014,1],[73018,73020,2],[73021,73023,2],[73024,73029,1],[73031,73104,73],[73105,73109,4],[73111,73459,348],[73460,73472,12],[73473,73526,53],[73527,73530,1],[73536,73538,2],[73562,78912,5350],[78919,78933,1],[90398,90409,1],[90413,90415,1],[92912,92916,1],[92976,92982,1],[94031,94095,64],[94096,94098,1],[94180,113821,19641],[113822,118528,4706],[118529,118573,1],[118576,118598,1],[119143,119145,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[119362,119364,1],[121344,121398,1],[121403,121452,1],[121461,121476,15],[121499,121503,1],[121505,121519,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1],[123023,123184,161],[123185,123190,1],[123566,123628,62],[123629,123631,1],[124140,124143,1],[124398,124399,1],[125136,125142,1],[125252,125258,1],[917760,917999,1]];static foldMn=[[921,953,32],[8126,8126,1]];static N=[[48,57,1],[178,179,1],[185,188,3],[189,190,1],[1632,1641,1],[1776,1785,1],[1984,1993,1],[2406,2415,1],[2534,2543,1],[2548,2553,1],[2662,2671,1],[2790,2799,1],[2918,2927,1],[2930,2935,1],[3046,3058,1],[3174,3183,1],[3192,3198,1],[3302,3311,1],[3416,3422,1],[3430,3448,1],[3558,3567,1],[3664,3673,1],[3792,3801,1],[3872,3891,1],[4160,4169,1],[4240,4249,1],[4969,4988,1],[5870,5872,1],[6112,6121,1],[6128,6137,1],[6160,6169,1],[6470,6479,1],[6608,6618,1],[6784,6793,1],[6800,6809,1],[6992,7001,1],[7088,7097,1],[7232,7241,1],[7248,7257,1],[8304,8308,4],[8309,8313,1],[8320,8329,1],[8528,8578,1],[8581,8585,1],[9312,9371,1],[9450,9471,1],[10102,10131,1],[11517,12295,778],[12321,12329,1],[12344,12346,1],[12690,12693,1],[12832,12841,1],[12872,12879,1],[12881,12895,1],[12928,12937,1],[12977,12991,1],[42528,42537,1],[42726,42735,1],[43056,43061,1],[43216,43225,1],[43264,43273,1],[43472,43481,1],[43504,43513,1],[43600,43609,1],[44016,44025,1],[65296,65305,1],[65799,65843,1],[65856,65912,1],[65930,65931,1],[66273,66299,1],[66336,66339,1],[66369,66378,9],[66513,66517,1],[66720,66729,1],[67672,67679,1],[67705,67711,1],[67751,67759,1],[67835,67839,1],[67862,67867,1],[68028,68029,1],[68032,68047,1],[68050,68095,1],[68160,68168,1],[68221,68222,1],[68253,68255,1],[68331,68335,1],[68440,68447,1],[68472,68479,1],[68521,68527,1],[68858,68863,1],[68912,68921,1],[68928,68937,1],[69216,69246,1],[69405,69414,1],[69457,69460,1],[69573,69579,1],[69714,69743,1],[69872,69881,1],[69942,69951,1],[70096,70105,1],[70113,70132,1],[70384,70393,1],[70736,70745,1],[70864,70873,1],[71248,71257,1],[71360,71369,1],[71376,71395,1],[71472,71483,1],[71904,71922,1],[72016,72025,1],[72688,72697,1],[72784,72812,1],[73040,73049,1],[73120,73129,1],[73552,73561,1],[73664,73684,1],[74752,74862,1],[90416,90425,1],[92768,92777,1],[92864,92873,1],[93008,93017,1],[93019,93025,1],[93552,93561,1],[93824,93846,1],[118000,118009,1],[119488,119507,1],[119520,119539,1],[119648,119672,1],[120782,120831,1],[123200,123209,1],[123632,123641,1],[124144,124153,1],[124401,124410,1],[125127,125135,1],[125264,125273,1],[126065,126123,1],[126125,126127,1],[126129,126132,1],[126209,126253,1],[126255,126269,1],[127232,127244,1],[130032,130041,1]];static Nd=[[48,57,1],[1632,1641,1],[1776,1785,1],[1984,1993,1],[2406,2415,1],[2534,2543,1],[2662,2671,1],[2790,2799,1],[2918,2927,1],[3046,3055,1],[3174,3183,1],[3302,3311,1],[3430,3439,1],[3558,3567,1],[3664,3673,1],[3792,3801,1],[3872,3881,1],[4160,4169,1],[4240,4249,1],[6112,6121,1],[6160,6169,1],[6470,6479,1],[6608,6617,1],[6784,6793,1],[6800,6809,1],[6992,7001,1],[7088,7097,1],[7232,7241,1],[7248,7257,1],[42528,42537,1],[43216,43225,1],[43264,43273,1],[43472,43481,1],[43504,43513,1],[43600,43609,1],[44016,44025,1],[65296,65305,1],[66720,66729,1],[68912,68921,1],[68928,68937,1],[69734,69743,1],[69872,69881,1],[69942,69951,1],[70096,70105,1],[70384,70393,1],[70736,70745,1],[70864,70873,1],[71248,71257,1],[71360,71369,1],[71376,71395,1],[71472,71481,1],[71904,71913,1],[72016,72025,1],[72688,72697,1],[72784,72793,1],[73040,73049,1],[73120,73129,1],[73552,73561,1],[90416,90425,1],[92768,92777,1],[92864,92873,1],[93008,93017,1],[93552,93561,1],[118000,118009,1],[120782,120831,1],[123200,123209,1],[123632,123641,1],[124144,124153,1],[124401,124410,1],[125264,125273,1],[130032,130041,1]];static Nl=[[5870,5872,1],[8544,8578,1],[8581,8584,1],[12295,12321,26],[12322,12329,1],[12344,12346,1],[42726,42735,1],[65856,65908,1],[66369,66378,9],[66513,66517,1],[74752,74862,1]];static No=[[178,179,1],[185,188,3],[189,190,1],[2548,2553,1],[2930,2935,1],[3056,3058,1],[3192,3198,1],[3416,3422,1],[3440,3448,1],[3882,3891,1],[4969,4988,1],[6128,6137,1],[6618,8304,1686],[8308,8313,1],[8320,8329,1],[8528,8543,1],[8585,9312,727],[9313,9371,1],[9450,9471,1],[10102,10131,1],[11517,12690,1173],[12691,12693,1],[12832,12841,1],[12872,12879,1],[12881,12895,1],[12928,12937,1],[12977,12991,1],[43056,43061,1],[65799,65843,1],[65909,65912,1],[65930,65931,1],[66273,66299,1],[66336,66339,1],[67672,67679,1],[67705,67711,1],[67751,67759,1],[67835,67839,1],[67862,67867,1],[68028,68029,1],[68032,68047,1],[68050,68095,1],[68160,68168,1],[68221,68222,1],[68253,68255,1],[68331,68335,1],[68440,68447,1],[68472,68479,1],[68521,68527,1],[68858,68863,1],[69216,69246,1],[69405,69414,1],[69457,69460,1],[69573,69579,1],[69714,69733,1],[70113,70132,1],[71482,71483,1],[71914,71922,1],[72794,72812,1],[73664,73684,1],[93019,93025,1],[93824,93846,1],[119488,119507,1],[119520,119539,1],[119648,119672,1],[125127,125135,1],[126065,126123,1],[126125,126127,1],[126129,126132,1],[126209,126253,1],[126255,126269,1],[127232,127244,1]];static P=[[33,35,1],[37,42,1],[44,47,1],[58,59,1],[63,64,1],[91,93,1],[95,123,28],[125,161,36],[167,171,4],[182,183,1],[187,191,4],[894,903,9],[1370,1375,1],[1417,1418,1],[1470,1472,2],[1475,1478,3],[1523,1524,1],[1545,1546,1],[1548,1549,1],[1563,1565,2],[1566,1567,1],[1642,1645,1],[1748,1792,44],[1793,1805,1],[2039,2041,1],[2096,2110,1],[2142,2404,262],[2405,2416,11],[2557,2678,121],[2800,3191,391],[3204,3572,368],[3663,3674,11],[3675,3844,169],[3845,3858,1],[3860,3898,38],[3899,3901,1],[3973,4048,75],[4049,4052,1],[4057,4058,1],[4170,4175,1],[4347,4960,613],[4961,4968,1],[5120,5742,622],[5787,5788,1],[5867,5869,1],[5941,5942,1],[6100,6102,1],[6104,6106,1],[6144,6154,1],[6468,6469,1],[6686,6687,1],[6816,6822,1],[6824,6829,1],[6990,6991,1],[7002,7008,1],[7037,7039,1],[7164,7167,1],[7227,7231,1],[7294,7295,1],[7360,7367,1],[7379,8208,829],[8209,8231,1],[8240,8259,1],[8261,8273,1],[8275,8286,1],[8317,8318,1],[8333,8334,1],[8968,8971,1],[9001,9002,1],[10088,10101,1],[10181,10182,1],[10214,10223,1],[10627,10648,1],[10712,10715,1],[10748,10749,1],[11513,11516,1],[11518,11519,1],[11632,11776,144],[11777,11822,1],[11824,11855,1],[11858,11869,1],[12289,12291,1],[12296,12305,1],[12308,12319,1],[12336,12349,13],[12448,12539,91],[42238,42239,1],[42509,42511,1],[42611,42622,11],[42738,42743,1],[43124,43127,1],[43214,43215,1],[43256,43258,1],[43260,43310,50],[43311,43359,48],[43457,43469,1],[43486,43487,1],[43612,43615,1],[43742,43743,1],[43760,43761,1],[44011,64830,20819],[64831,65040,209],[65041,65049,1],[65072,65106,1],[65108,65121,1],[65123,65128,5],[65130,65131,1],[65281,65283,1],[65285,65290,1],[65292,65295,1],[65306,65307,1],[65311,65312,1],[65339,65341,1],[65343,65371,28],[65373,65375,2],[65376,65381,1],[65792,65794,1],[66463,66512,49],[66927,67671,744],[67871,67903,32],[68176,68184,1],[68223,68336,113],[68337,68342,1],[68409,68415,1],[68505,68508,1],[68974,69293,319],[69461,69465,1],[69510,69513,1],[69703,69709,1],[69819,69820,1],[69822,69825,1],[69952,69955,1],[70004,70005,1],[70085,70088,1],[70093,70107,14],[70109,70111,1],[70200,70205,1],[70313,70612,299],[70613,70615,2],[70616,70731,115],[70732,70735,1],[70746,70747,1],[70749,70854,105],[71105,71127,1],[71233,71235,1],[71264,71276,1],[71353,71484,131],[71485,71486,1],[71739,72004,265],[72005,72006,1],[72162,72255,93],[72256,72262,1],[72346,72348,1],[72350,72354,1],[72448,72457,1],[72673,72769,96],[72770,72773,1],[72816,72817,1],[73463,73464,1],[73539,73551,1],[73727,74864,1137],[74865,74868,1],[77809,77810,1],[92782,92783,1],[92917,92983,66],[92984,92987,1],[92996,93549,553],[93550,93551,1],[93847,93850,1],[94178,113823,19645],[121479,121483,1],[124415,125278,863],[125279,125279,1]];static Pc=[[95,8255,8160],[8256,8276,20],[65075,65076,1],[65101,65103,1],[65343,65343,1]];static Pd=[[45,1418,1373],[1470,5120,3650],[6150,8208,2058],[8209,8213,1],[11799,11802,3],[11834,11835,1],[11840,11869,29],[12316,12336,20],[12448,65073,52625],[65074,65112,38],[65123,65293,170],[68974,69293,319]];static Pe=[[41,93,52],[125,3899,3774],[3901,5788,1887],[8262,8318,56],[8334,8969,635],[8971,9002,31],[10089,10101,2],[10182,10215,33],[10217,10223,2],[10628,10648,2],[10713,10715,2],[10749,11811,1062],[11813,11817,2],[11862,11868,2],[12297,12305,2],[12309,12315,2],[12318,12319,1],[64830,65048,218],[65078,65092,2],[65096,65114,18],[65116,65118,2],[65289,65341,52],[65373,65379,3]];static Pf=[[187,8217,8030],[8221,8250,29],[11779,11781,2],[11786,11789,3],[11805,11809,4]];static Pi=[[171,8216,8045],[8219,8220,1],[8223,8249,26],[11778,11780,2],[11785,11788,3],[11804,11808,4]];static Po=[[33,35,1],[37,39,1],[42,46,2],[47,58,11],[59,63,4],[64,92,28],[161,167,6],[182,183,1],[191,894,703],[903,1370,467],[1371,1375,1],[1417,1472,55],[1475,1478,3],[1523,1524,1],[1545,1546,1],[1548,1549,1],[1563,1565,2],[1566,1567,1],[1642,1645,1],[1748,1792,44],[1793,1805,1],[2039,2041,1],[2096,2110,1],[2142,2404,262],[2405,2416,11],[2557,2678,121],[2800,3191,391],[3204,3572,368],[3663,3674,11],[3675,3844,169],[3845,3858,1],[3860,3973,113],[4048,4052,1],[4057,4058,1],[4170,4175,1],[4347,4960,613],[4961,4968,1],[5742,5867,125],[5868,5869,1],[5941,5942,1],[6100,6102,1],[6104,6106,1],[6144,6149,1],[6151,6154,1],[6468,6469,1],[6686,6687,1],[6816,6822,1],[6824,6829,1],[6990,6991,1],[7002,7008,1],[7037,7039,1],[7164,7167,1],[7227,7231,1],[7294,7295,1],[7360,7367,1],[7379,8214,835],[8215,8224,9],[8225,8231,1],[8240,8248,1],[8251,8254,1],[8257,8259,1],[8263,8273,1],[8275,8277,2],[8278,8286,1],[11513,11516,1],[11518,11519,1],[11632,11776,144],[11777,11782,5],[11783,11784,1],[11787,11790,3],[11791,11798,1],[11800,11801,1],[11803,11806,3],[11807,11818,11],[11819,11822,1],[11824,11833,1],[11836,11839,1],[11841,11843,2],[11844,11855,1],[11858,11860,1],[12289,12291,1],[12349,12539,190],[42238,42239,1],[42509,42511,1],[42611,42622,11],[42738,42743,1],[43124,43127,1],[43214,43215,1],[43256,43258,1],[43260,43310,50],[43311,43359,48],[43457,43469,1],[43486,43487,1],[43612,43615,1],[43742,43743,1],[43760,43761,1],[44011,65040,21029],[65041,65046,1],[65049,65072,23],[65093,65094,1],[65097,65100,1],[65104,65106,1],[65108,65111,1],[65119,65121,1],[65128,65130,2],[65131,65281,150],[65282,65283,1],[65285,65287,1],[65290,65294,2],[65295,65306,11],[65307,65311,4],[65312,65340,28],[65377,65380,3],[65381,65792,411],[65793,65794,1],[66463,66512,49],[66927,67671,744],[67871,67903,32],[68176,68184,1],[68223,68336,113],[68337,68342,1],[68409,68415,1],[68505,68508,1],[69461,69465,1],[69510,69513,1],[69703,69709,1],[69819,69820,1],[69822,69825,1],[69952,69955,1],[70004,70005,1],[70085,70088,1],[70093,70107,14],[70109,70111,1],[70200,70205,1],[70313,70612,299],[70613,70615,2],[70616,70731,115],[70732,70735,1],[70746,70747,1],[70749,70854,105],[71105,71127,1],[71233,71235,1],[71264,71276,1],[71353,71484,131],[71485,71486,1],[71739,72004,265],[72005,72006,1],[72162,72255,93],[72256,72262,1],[72346,72348,1],[72350,72354,1],[72448,72457,1],[72673,72769,96],[72770,72773,1],[72816,72817,1],[73463,73464,1],[73539,73551,1],[73727,74864,1137],[74865,74868,1],[77809,77810,1],[92782,92783,1],[92917,92983,66],[92984,92987,1],[92996,93549,553],[93550,93551,1],[93847,93850,1],[94178,113823,19645],[121479,121483,1],[124415,125278,863],[125279,125279,1]];static Ps=[[40,91,51],[123,3898,3775],[3900,5787,1887],[8218,8222,4],[8261,8317,56],[8333,8968,635],[8970,9001,31],[10088,10100,2],[10181,10214,33],[10216,10222,2],[10627,10647,2],[10712,10714,2],[10748,11810,1062],[11812,11816,2],[11842,11861,19],[11863,11867,2],[12296,12304,2],[12308,12314,2],[12317,64831,52514],[65047,65077,30],[65079,65091,2],[65095,65113,18],[65115,65117,2],[65288,65339,51],[65371,65375,4],[65378,65378,1]];static S=[[36,43,7],[60,62,1],[94,96,2],[124,126,2],[162,166,1],[168,169,1],[172,174,2],[175,177,1],[180,184,4],[215,247,32],[706,709,1],[722,735,1],[741,747,1],[749,751,2],[752,767,1],[885,900,15],[901,1014,113],[1154,1421,267],[1422,1423,1],[1542,1544,1],[1547,1550,3],[1551,1758,207],[1769,1789,20],[1790,2038,248],[2046,2047,1],[2184,2546,362],[2547,2554,7],[2555,2801,246],[2928,3059,131],[3060,3066,1],[3199,3407,208],[3449,3647,198],[3841,3843,1],[3859,3861,2],[3862,3863,1],[3866,3871,1],[3892,3896,2],[4030,4037,1],[4039,4044,1],[4046,4047,1],[4053,4056,1],[4254,4255,1],[5008,5017,1],[5741,6107,366],[6464,6622,158],[6623,6655,1],[7009,7018,1],[7028,7036,1],[8125,8127,2],[8128,8129,1],[8141,8143,1],[8157,8159,1],[8173,8175,1],[8189,8190,1],[8260,8274,14],[8314,8316,1],[8330,8332,1],[8352,8384,1],[8448,8449,1],[8451,8454,1],[8456,8457,1],[8468,8470,2],[8471,8472,1],[8478,8483,1],[8485,8489,2],[8494,8506,12],[8507,8512,5],[8513,8516,1],[8522,8525,1],[8527,8586,59],[8587,8592,5],[8593,8967,1],[8972,9000,1],[9003,9257,1],[9280,9290,1],[9372,9449,1],[9472,10087,1],[10132,10180,1],[10183,10213,1],[10224,10626,1],[10649,10711,1],[10716,10747,1],[10750,11123,1],[11126,11157,1],[11159,11263,1],[11493,11498,1],[11856,11857,1],[11904,11929,1],[11931,12019,1],[12032,12245,1],[12272,12287,1],[12292,12306,14],[12307,12320,13],[12342,12343,1],[12350,12351,1],[12443,12444,1],[12688,12689,1],[12694,12703,1],[12736,12773,1],[12783,12800,17],[12801,12830,1],[12842,12871,1],[12880,12896,16],[12897,12927,1],[12938,12976,1],[12992,13311,1],[19904,19967,1],[42128,42182,1],[42752,42774,1],[42784,42785,1],[42889,42890,1],[43048,43051,1],[43062,43065,1],[43639,43641,1],[43867,43882,15],[43883,64297,20414],[64434,64450,1],[64832,64847,1],[64975,65020,45],[65021,65023,1],[65122,65124,2],[65125,65126,1],[65129,65284,155],[65291,65308,17],[65309,65310,1],[65342,65344,2],[65372,65374,2],[65504,65510,1],[65512,65518,1],[65532,65533,1],[65847,65855,1],[65913,65929,1],[65932,65934,1],[65936,65948,1],[65952,66000,48],[66001,66044,1],[67703,67704,1],[68296,69006,710],[69007,71487,2480],[73685,73713,1],[92988,92991,1],[92997,113820,20823],[117760,117999,1],[118016,118451,1],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119140,1],[119146,119148,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119296,119361,1],[119365,119552,187],[119553,119638,1],[120513,120539,26],[120571,120597,26],[120629,120655,26],[120687,120713,26],[120745,120771,26],[120832,121343,1],[121399,121402,1],[121453,121460,1],[121462,121475,1],[121477,121478,1],[123215,123647,432],[126124,126128,4],[126254,126704,450],[126705,126976,271],[126977,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127245,127405,1],[127462,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129211,1],[129216,129217,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129673,1],[129679,129734,1],[129742,129756,1],[129759,129769,1],[129776,129784,1],[129792,129938,1],[129940,130031,1]];static Sc=[[36,162,126],[163,165,1],[1423,1547,124],[2046,2047,1],[2546,2547,1],[2555,2801,246],[3065,3647,582],[6107,8352,2245],[8353,8384,1],[43064,65020,21956],[65129,65284,155],[65504,65505,1],[65509,65510,1],[73693,73696,1],[123647,126128,2481]];static Sk=[[94,96,2],[168,175,7],[180,184,4],[706,709,1],[722,735,1],[741,747,1],[749,751,2],[752,767,1],[885,900,15],[901,2184,1283],[8125,8127,2],[8128,8129,1],[8141,8143,1],[8157,8159,1],[8173,8175,1],[8189,8190,1],[12443,12444,1],[42752,42774,1],[42784,42785,1],[42889,42890,1],[43867,43882,15],[43883,64434,20551],[64435,64450,1],[65342,65344,2],[65507,127995,62488],[127996,127999,1]];static Sm=[[43,60,17],[61,62,1],[124,126,2],[172,177,5],[215,247,32],[1014,1542,528],[1543,1544,1],[8260,8274,14],[8314,8316,1],[8330,8332,1],[8472,8512,40],[8513,8516,1],[8523,8592,69],[8593,8596,1],[8602,8603,1],[8608,8614,3],[8622,8654,32],[8655,8658,3],[8660,8692,32],[8693,8959,1],[8992,8993,1],[9084,9115,31],[9116,9139,1],[9180,9185,1],[9655,9665,10],[9720,9727,1],[9839,10176,337],[10177,10180,1],[10183,10213,1],[10224,10239,1],[10496,10626,1],[10649,10711,1],[10716,10747,1],[10750,11007,1],[11056,11076,1],[11079,11084,1],[64297,65122,825],[65124,65126,1],[65291,65308,17],[65309,65310,1],[65372,65374,2],[65506,65513,7],[65514,65516,1],[69006,69007,1],[120513,120539,26],[120571,120597,26],[120629,120655,26],[120687,120713,26],[120745,120771,26],[126704,126705,1]];static So=[[166,169,3],[174,176,2],[1154,1421,267],[1422,1550,128],[1551,1758,207],[1769,1789,20],[1790,2038,248],[2554,2928,374],[3059,3064,1],[3066,3199,133],[3407,3449,42],[3841,3843,1],[3859,3861,2],[3862,3863,1],[3866,3871,1],[3892,3896,2],[4030,4037,1],[4039,4044,1],[4046,4047,1],[4053,4056,1],[4254,4255,1],[5008,5017,1],[5741,6464,723],[6622,6655,1],[7009,7018,1],[7028,7036,1],[8448,8449,1],[8451,8454,1],[8456,8457,1],[8468,8470,2],[8471,8478,7],[8479,8483,1],[8485,8489,2],[8494,8506,12],[8507,8522,15],[8524,8525,1],[8527,8586,59],[8587,8597,10],[8598,8601,1],[8604,8607,1],[8609,8610,1],[8612,8613,1],[8615,8621,1],[8623,8653,1],[8656,8657,1],[8659,8661,2],[8662,8691,1],[8960,8967,1],[8972,8991,1],[8994,9000,1],[9003,9083,1],[9085,9114,1],[9140,9179,1],[9186,9257,1],[9280,9290,1],[9372,9449,1],[9472,9654,1],[9656,9664,1],[9666,9719,1],[9728,9838,1],[9840,10087,1],[10132,10175,1],[10240,10495,1],[11008,11055,1],[11077,11078,1],[11085,11123,1],[11126,11157,1],[11159,11263,1],[11493,11498,1],[11856,11857,1],[11904,11929,1],[11931,12019,1],[12032,12245,1],[12272,12287,1],[12292,12306,14],[12307,12320,13],[12342,12343,1],[12350,12351,1],[12688,12689,1],[12694,12703,1],[12736,12773,1],[12783,12800,17],[12801,12830,1],[12842,12871,1],[12880,12896,16],[12897,12927,1],[12938,12976,1],[12992,13311,1],[19904,19967,1],[42128,42182,1],[43048,43051,1],[43062,43063,1],[43065,43639,574],[43640,43641,1],[64832,64847,1],[64975,65021,46],[65022,65023,1],[65508,65512,4],[65517,65518,1],[65532,65533,1],[65847,65855,1],[65913,65929,1],[65932,65934,1],[65936,65948,1],[65952,66000,48],[66001,66044,1],[67703,67704,1],[68296,71487,3191],[73685,73692,1],[73697,73713,1],[92988,92991,1],[92997,113820,20823],[117760,117999,1],[118016,118451,1],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119140,1],[119146,119148,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119296,119361,1],[119365,119552,187],[119553,119638,1],[120832,121343,1],[121399,121402,1],[121453,121460,1],[121462,121475,1],[121477,121478,1],[123215,126124,2909],[126254,126976,722],[126977,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127245,127405,1],[127462,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,127994,1],[128000,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129211,1],[129216,129217,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129673,1],[129679,129734,1],[129742,129756,1],[129759,129769,1],[129776,129784,1],[129792,129938,1],[129940,130031,1]];static Z=[[32,160,128],[5760,8192,2432],[8193,8202,1],[8232,8233,1],[8239,8287,48],[12288,12288,1]];static Zl=[[8232,8232,1]];static Zp=[[8233,8233,1]];static Zs=[[32,160,128],[5760,8192,2432],[8193,8202,1],[8239,8287,48],[12288,12288,1]];static Adlam=[[125184,125259,1],[125264,125273,1],[125278,125279,1]];static Ahom=[[71424,71450,1],[71453,71467,1],[71472,71494,1]];static Anatolian_Hieroglyphs=[[82944,83526,1]];static Arabic=[[1536,1540,1],[1542,1547,1],[1549,1562,1],[1564,1566,1],[1568,1599,1],[1601,1610,1],[1622,1647,1],[1649,1756,1],[1758,1791,1],[1872,1919,1],[2160,2190,1],[2192,2193,1],[2199,2273,1],[2275,2303,1],[64336,64450,1],[64467,64829,1],[64832,64911,1],[64914,64967,1],[64975,65008,33],[65009,65023,1],[65136,65140,1],[65142,65276,1],[69216,69246,1],[69314,69316,1],[69372,69375,1],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[126704,126705,1]];static Armenian=[[1329,1366,1],[1369,1418,1],[1421,1423,1],[64275,64279,1]];static Avestan=[[68352,68405,1],[68409,68415,1]];static Balinese=[[6912,6988,1],[6990,7039,1]];static Bamum=[[42656,42743,1],[92160,92728,1]];static Bassa_Vah=[[92880,92909,1],[92912,92917,1]];static Batak=[[7104,7155,1],[7164,7167,1]];static Bengali=[[2432,2435,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2492,2500,1],[2503,2504,1],[2507,2510,1],[2519,2524,5],[2525,2527,2],[2528,2531,1],[2534,2558,1]];static Bhaiksuki=[[72704,72712,1],[72714,72758,1],[72760,72773,1],[72784,72812,1]];static Bopomofo=[[746,747,1],[12549,12591,1],[12704,12735,1]];static Brahmi=[[69632,69709,1],[69714,69749,1],[69759,69759,1]];static Braille=[[10240,10495,1]];static Buginese=[[6656,6683,1],[6686,6687,1]];static Buhid=[[5952,5971,1]];static Canadian_Aboriginal=[[5120,5759,1],[6320,6389,1],[72368,72383,1]];static Carian=[[66208,66256,1]];static Caucasian_Albanian=[[66864,66915,1],[66927,66927,1]];static Chakma=[[69888,69940,1],[69942,69959,1]];static Cham=[[43520,43574,1],[43584,43597,1],[43600,43609,1],[43612,43615,1]];static Cherokee=[[5024,5109,1],[5112,5117,1],[43888,43967,1]];static Chorasmian=[[69552,69579,1]];static Common=[[0,64,1],[91,96,1],[123,169,1],[171,185,1],[187,191,1],[215,247,32],[697,735,1],[741,745,1],[748,767,1],[884,894,10],[901,903,2],[1541,1548,7],[1563,1567,4],[1600,1757,157],[2274,2404,130],[2405,3647,1242],[4053,4056,1],[4347,5867,1520],[5868,5869,1],[5941,5942,1],[6146,6147,1],[6149,7379,1230],[7393,7401,8],[7402,7404,1],[7406,7411,1],[7413,7415,1],[7418,8192,774],[8193,8203,1],[8206,8292,1],[8294,8304,1],[8308,8318,1],[8320,8334,1],[8352,8384,1],[8448,8485,1],[8487,8489,1],[8492,8497,1],[8499,8525,1],[8527,8543,1],[8585,8587,1],[8592,9257,1],[9280,9290,1],[9312,10239,1],[10496,11123,1],[11126,11157,1],[11159,11263,1],[11776,11869,1],[12272,12292,1],[12294,12296,2],[12297,12320,1],[12336,12343,1],[12348,12351,1],[12443,12444,1],[12448,12539,91],[12540,12688,148],[12689,12703,1],[12736,12773,1],[12783,12832,49],[12833,12895,1],[12927,13007,1],[13055,13144,89],[13145,13311,1],[19904,19967,1],[42752,42785,1],[42888,42890,1],[43056,43065,1],[43310,43471,161],[43867,43882,15],[43883,64830,20947],[64831,65040,209],[65041,65049,1],[65072,65106,1],[65108,65126,1],[65128,65131,1],[65279,65281,2],[65282,65312,1],[65339,65344,1],[65371,65381,1],[65392,65438,46],[65439,65504,65],[65505,65510,1],[65512,65518,1],[65529,65533,1],[65792,65794,1],[65799,65843,1],[65847,65855,1],[65936,65948,1],[66000,66044,1],[66273,66299,1],[113824,113827,1],[117760,118009,1],[118016,118451,1],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119142,1],[119146,119162,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119488,119507,1],[119520,119539,1],[119552,119638,1],[119648,119672,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119973,3],[119974,119977,3],[119978,119980,1],[119982,119993,1],[119995,119997,2],[119998,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120146,120485,1],[120488,120779,1],[120782,120831,1],[126065,126132,1],[126209,126269,1],[126976,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127232,127405,1],[127462,127487,1],[127489,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129211,1],[129216,129217,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129673,1],[129679,129734,1],[129742,129756,1],[129759,129769,1],[129776,129784,1],[129792,129938,1],[129940,130041,1],[917505,917536,31],[917537,917631,1]];static foldCommon=[[924,956,32]];static Coptic=[[994,1007,1],[11392,11507,1],[11513,11519,1]];static Cuneiform=[[73728,74649,1],[74752,74862,1],[74864,74868,1],[74880,75075,1]];static Cypriot=[[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3]];static Cypro_Minoan=[[77712,77810,1]];static Cyrillic=[[1024,1156,1],[1159,1327,1],[7296,7306,1],[7467,7544,77],[11744,11775,1],[42560,42655,1],[65070,65071,1],[122928,122989,1],[123023,123023,1]];static Deseret=[[66560,66639,1]];static Devanagari=[[2304,2384,1],[2389,2403,1],[2406,2431,1],[43232,43263,1],[72448,72457,1]];static Dives_Akuru=[[71936,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71989,1],[71991,71992,1],[71995,72006,1],[72016,72025,1]];static Dogra=[[71680,71739,1]];static Duployan=[[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[113820,113823,1]];static Egyptian_Hieroglyphs=[[77824,78933,1],[78944,82938,1]];static Elbasan=[[66816,66855,1]];static Elymaic=[[69600,69622,1]];static Ethiopic=[[4608,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4957,4988,1],[4992,5017,1],[11648,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[43777,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[124896,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1]];static Garay=[[68928,68965,1],[68969,68997,1],[69006,69007,1]];static Georgian=[[4256,4293,1],[4295,4301,6],[4304,4346,1],[4348,4351,1],[7312,7354,1],[7357,7359,1],[11520,11557,1],[11559,11565,6]];static Glagolitic=[[11264,11359,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1]];static Gothic=[[66352,66378,1]];static Grantha=[[70400,70403,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70460,70468,1],[70471,70472,1],[70475,70477,1],[70480,70487,7],[70493,70499,1],[70502,70508,1],[70512,70516,1]];static Greek=[[880,883,1],[885,887,1],[890,893,1],[895,900,5],[902,904,2],[905,906,1],[908,910,2],[911,929,1],[931,993,1],[1008,1023,1],[7462,7466,1],[7517,7521,1],[7526,7530,1],[7615,7936,321],[7937,7957,1],[7960,7965,1],[7968,8005,1],[8008,8013,1],[8016,8023,1],[8025,8031,2],[8032,8061,1],[8064,8116,1],[8118,8132,1],[8134,8147,1],[8150,8155,1],[8157,8175,1],[8178,8180,1],[8182,8190,1],[8486,43877,35391],[65856,65934,1],[65952,119296,53344],[119297,119365,1]];static foldGreek=[[181,837,656]];static Gujarati=[[2689,2691,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2748,2757,1],[2759,2761,1],[2763,2765,1],[2768,2784,16],[2785,2787,1],[2790,2801,1],[2809,2815,1]];static Gunjala_Gondi=[[73056,73061,1],[73063,73064,1],[73066,73102,1],[73104,73105,1],[73107,73112,1],[73120,73129,1]];static Gurmukhi=[[2561,2563,1],[2565,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2620,2622,2],[2623,2626,1],[2631,2632,1],[2635,2637,1],[2641,2649,8],[2650,2652,1],[2654,2662,8],[2663,2678,1]];static Gurung_Khema=[[90368,90425,1]];static Han=[[11904,11929,1],[11931,12019,1],[12032,12245,1],[12293,12295,2],[12321,12329,1],[12344,12347,1],[13312,19903,1],[19968,40959,1],[63744,64109,1],[64112,64217,1],[94178,94179,1],[94192,94193,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static Hangul=[[4352,4607,1],[12334,12335,1],[12593,12686,1],[12800,12830,1],[12896,12926,1],[43360,43388,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[65440,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1]];static Hanifi_Rohingya=[[68864,68903,1],[68912,68921,1]];static Hanunoo=[[5920,5940,1]];static Hatran=[[67808,67826,1],[67828,67829,1],[67835,67839,1]];static Hebrew=[[1425,1479,1],[1488,1514,1],[1519,1524,1],[64285,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64335,1]];static Hiragana=[[12353,12438,1],[12445,12447,1],[110593,110879,1],[110898,110928,30],[110929,110930,1],[127488,127488,1]];static Imperial_Aramaic=[[67648,67669,1],[67671,67679,1]];static Inherited=[[768,879,1],[1157,1158,1],[1611,1621,1],[1648,2385,737],[2386,2388,1],[6832,6862,1],[7376,7378,1],[7380,7392,1],[7394,7400,1],[7405,7412,7],[7416,7417,1],[7616,7679,1],[8204,8205,1],[8400,8432,1],[12330,12333,1],[12441,12442,1],[65024,65039,1],[65056,65069,1],[66045,66272,227],[70459,118528,48069],[118529,118573,1],[118576,118598,1],[119143,119145,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[917760,917999,1]];static foldInherited=[[921,953,32],[8126,8126,1]];static Inscriptional_Pahlavi=[[68448,68466,1],[68472,68479,1]];static Inscriptional_Parthian=[[68416,68437,1],[68440,68447,1]];static Javanese=[[43392,43469,1],[43472,43481,1],[43486,43487,1]];static Kaithi=[[69760,69826,1],[69837,69837,1]];static Kannada=[[3200,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3260,3268,1],[3270,3272,1],[3274,3277,1],[3285,3286,1],[3293,3294,1],[3296,3299,1],[3302,3311,1],[3313,3315,1]];static Katakana=[[12449,12538,1],[12541,12543,1],[12784,12799,1],[13008,13054,1],[13056,13143,1],[65382,65391,1],[65393,65437,1],[110576,110579,1],[110581,110587,1],[110589,110590,1],[110592,110880,288],[110881,110882,1],[110933,110948,15],[110949,110951,1]];static Kawi=[[73472,73488,1],[73490,73530,1],[73534,73562,1]];static Kayah_Li=[[43264,43309,1],[43311,43311,1]];static Kharoshthi=[[68096,68099,1],[68101,68102,1],[68108,68115,1],[68117,68119,1],[68121,68149,1],[68152,68154,1],[68159,68168,1],[68176,68184,1]];static Khitan_Small_Script=[[94180,101120,6940],[101121,101589,1],[101631,101631,1]];static Khmer=[[6016,6109,1],[6112,6121,1],[6128,6137,1],[6624,6655,1]];static Khojki=[[70144,70161,1],[70163,70209,1]];static Khudawadi=[[70320,70378,1],[70384,70393,1]];static Kirat_Rai=[[93504,93561,1]];static Lao=[[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3773,1],[3776,3780,1],[3782,3784,2],[3785,3790,1],[3792,3801,1],[3804,3807,1]];static Latin=[[65,90,1],[97,122,1],[170,186,16],[192,214,1],[216,246,1],[248,696,1],[736,740,1],[7424,7461,1],[7468,7516,1],[7522,7525,1],[7531,7543,1],[7545,7614,1],[7680,7935,1],[8305,8319,14],[8336,8348,1],[8490,8491,1],[8498,8526,28],[8544,8584,1],[11360,11391,1],[42786,42887,1],[42891,42957,1],[42960,42961,1],[42963,42965,2],[42966,42972,1],[42994,43007,1],[43824,43866,1],[43868,43876,1],[43878,43881,1],[64256,64262,1],[65313,65338,1],[65345,65370,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[122624,122654,1],[122661,122666,1]];static Lepcha=[[7168,7223,1],[7227,7241,1],[7245,7247,1]];static Limbu=[[6400,6430,1],[6432,6443,1],[6448,6459,1],[6464,6468,4],[6469,6479,1]];static Linear_A=[[67072,67382,1],[67392,67413,1],[67424,67431,1]];static Linear_B=[[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1]];static Lisu=[[42192,42239,1],[73648,73648,1]];static Lycian=[[66176,66204,1]];static Lydian=[[67872,67897,1],[67903,67903,1]];static Mahajani=[[69968,70006,1]];static Makasar=[[73440,73464,1]];static Malayalam=[[3328,3340,1],[3342,3344,1],[3346,3396,1],[3398,3400,1],[3402,3407,1],[3412,3427,1],[3430,3455,1]];static Mandaic=[[2112,2139,1],[2142,2142,1]];static Manichaean=[[68288,68326,1],[68331,68342,1]];static Marchen=[[72816,72847,1],[72850,72871,1],[72873,72886,1]];static Masaram_Gondi=[[72960,72966,1],[72968,72969,1],[72971,73014,1],[73018,73020,2],[73021,73023,2],[73024,73031,1],[73040,73049,1]];static Medefaidrin=[[93760,93850,1]];static Meetei_Mayek=[[43744,43766,1],[43968,44013,1],[44016,44025,1]];static Mende_Kikakui=[[124928,125124,1],[125127,125142,1]];static Meroitic_Cursive=[[68000,68023,1],[68028,68047,1],[68050,68095,1]];static Meroitic_Hieroglyphs=[[67968,67999,1]];static Miao=[[93952,94026,1],[94031,94087,1],[94095,94111,1]];static Modi=[[71168,71236,1],[71248,71257,1]];static Mongolian=[[6144,6145,1],[6148,6150,2],[6151,6169,1],[6176,6264,1],[6272,6314,1],[71264,71276,1]];static Mro=[[92736,92766,1],[92768,92777,1],[92782,92783,1]];static Multani=[[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70313,1]];static Myanmar=[[4096,4255,1],[43488,43518,1],[43616,43647,1],[71376,71395,1]];static Nabataean=[[67712,67742,1],[67751,67759,1]];static Nag_Mundari=[[124112,124153,1]];static Nandinagari=[[72096,72103,1],[72106,72151,1],[72154,72164,1]];static New_Tai_Lue=[[6528,6571,1],[6576,6601,1],[6608,6618,1],[6622,6623,1]];static Newa=[[70656,70747,1],[70749,70753,1]];static Nko=[[1984,2042,1],[2045,2047,1]];static Nushu=[[94177,110960,16783],[110961,111355,1]];static Nyiakeng_Puachue_Hmong=[[123136,123180,1],[123184,123197,1],[123200,123209,1],[123214,123215,1]];static Ogham=[[5760,5788,1]];static Ol_Chiki=[[7248,7295,1]];static Ol_Onal=[[124368,124410,1],[124415,124415,1]];static Old_Hungarian=[[68736,68786,1],[68800,68850,1],[68858,68863,1]];static Old_Italic=[[66304,66339,1],[66349,66351,1]];static Old_North_Arabian=[[68224,68255,1]];static Old_Permic=[[66384,66426,1]];static Old_Persian=[[66464,66499,1],[66504,66517,1]];static Old_Sogdian=[[69376,69415,1]];static Old_South_Arabian=[[68192,68223,1]];static Old_Turkic=[[68608,68680,1]];static Old_Uyghur=[[69488,69513,1]];static Oriya=[[2817,2819,1],[2821,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2876,2884,1],[2887,2888,1],[2891,2893,1],[2901,2903,1],[2908,2909,1],[2911,2915,1],[2918,2935,1]];static Osage=[[66736,66771,1],[66776,66811,1]];static Osmanya=[[66688,66717,1],[66720,66729,1]];static Pahawh_Hmong=[[92928,92997,1],[93008,93017,1],[93019,93025,1],[93027,93047,1],[93053,93071,1]];static Palmyrene=[[67680,67711,1]];static Pau_Cin_Hau=[[72384,72440,1]];static Phags_Pa=[[43072,43127,1]];static Phoenician=[[67840,67867,1],[67871,67871,1]];static Psalter_Pahlavi=[[68480,68497,1],[68505,68508,1],[68521,68527,1]];static Rejang=[[43312,43347,1],[43359,43359,1]];static Runic=[[5792,5866,1],[5870,5880,1]];static Samaritan=[[2048,2093,1],[2096,2110,1]];static Saurashtra=[[43136,43205,1],[43214,43225,1]];static Sharada=[[70016,70111,1]];static Shavian=[[66640,66687,1]];static Siddham=[[71040,71093,1],[71096,71133,1]];static SignWriting=[[120832,121483,1],[121499,121503,1],[121505,121519,1]];static Sinhala=[[3457,3459,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3530,3535,5],[3536,3540,1],[3542,3544,2],[3545,3551,1],[3558,3567,1],[3570,3572,1],[70113,70132,1]];static Sogdian=[[69424,69465,1]];static Sora_Sompeng=[[69840,69864,1],[69872,69881,1]];static Soyombo=[[72272,72354,1]];static Sundanese=[[7040,7103,1],[7360,7367,1]];static Sunuwar=[[72640,72673,1],[72688,72697,1]];static Syloti_Nagri=[[43008,43052,1]];static Syriac=[[1792,1805,1],[1807,1866,1],[1869,1871,1],[2144,2154,1]];static Tagalog=[[5888,5909,1],[5919,5919,1]];static Tagbanwa=[[5984,5996,1],[5998,6000,1],[6002,6003,1]];static Tai_Le=[[6480,6509,1],[6512,6516,1]];static Tai_Tham=[[6688,6750,1],[6752,6780,1],[6783,6793,1],[6800,6809,1],[6816,6829,1]];static Tai_Viet=[[43648,43714,1],[43739,43743,1]];static Takri=[[71296,71353,1],[71360,71369,1]];static Tamil=[[2946,2947,1],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3006,3010,1],[3014,3016,1],[3018,3021,1],[3024,3031,7],[3046,3066,1],[73664,73713,1],[73727,73727,1]];static Tangsa=[[92784,92862,1],[92864,92873,1]];static Tangut=[[94176,94208,32],[94209,100343,1],[100352,101119,1],[101632,101640,1]];static Telugu=[[3072,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3132,3140,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3160,3162,1],[3165,3168,3],[3169,3171,1],[3174,3183,1],[3191,3199,1]];static Thaana=[[1920,1969,1]];static Thai=[[3585,3642,1],[3648,3675,1]];static Tibetan=[[3840,3911,1],[3913,3948,1],[3953,3991,1],[3993,4028,1],[4030,4044,1],[4046,4052,1],[4057,4058,1]];static Tifinagh=[[11568,11623,1],[11631,11632,1],[11647,11647,1]];static Tirhuta=[[70784,70855,1],[70864,70873,1]];static Todhri=[[67008,67059,1]];static Toto=[[123536,123566,1]];static Tulu_Tigalari=[[70528,70537,1],[70539,70542,3],[70544,70581,1],[70583,70592,1],[70594,70597,3],[70599,70602,1],[70604,70613,1],[70615,70616,1],[70625,70626,1]];static Ugaritic=[[66432,66461,1],[66463,66463,1]];static Vai=[[42240,42539,1]];static Vithkuqi=[[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1]];static Wancho=[[123584,123641,1],[123647,123647,1]];static Warang_Citi=[[71840,71922,1],[71935,71935,1]];static Yezidi=[[69248,69289,1],[69291,69293,1],[69296,69297,1]];static Yi=[[40960,42124,1],[42128,42182,1]];static Zanabazar_Square=[[72192,72263,1]];static CATEGORIES=(()=>new Map([["C",a.C],["Cc",a.Cc],["Cf",a.Cf],["Co",a.Co],["Cs",a.Cs],["L",a.L],["Ll",a.Ll],["Lm",a.Lm],["Lo",a.Lo],["Lt",a.Lt],["Lu",a.Lu],["M",a.M],["Mc",a.Mc],["Me",a.Me],["Mn",a.Mn],["N",a.N],["Nd",a.Nd],["Nl",a.Nl],["No",a.No],["P",a.P],["Pc",a.Pc],["Pd",a.Pd],["Pe",a.Pe],["Pf",a.Pf],["Pi",a.Pi],["Po",a.Po],["Ps",a.Ps],["S",a.S],["Sc",a.Sc],["Sk",a.Sk],["Sm",a.Sm],["So",a.So],["Z",a.Z],["Zl",a.Zl],["Zp",a.Zp],["Zs",a.Zs]]))();static SCRIPTS=(()=>new Map([["Adlam",a.Adlam],["Ahom",a.Ahom],["Anatolian_Hieroglyphs",a.Anatolian_Hieroglyphs],["Arabic",a.Arabic],["Armenian",a.Armenian],["Avestan",a.Avestan],["Balinese",a.Balinese],["Bamum",a.Bamum],["Bassa_Vah",a.Bassa_Vah],["Batak",a.Batak],["Bengali",a.Bengali],["Bhaiksuki",a.Bhaiksuki],["Bopomofo",a.Bopomofo],["Brahmi",a.Brahmi],["Braille",a.Braille],["Buginese",a.Buginese],["Buhid",a.Buhid],["Canadian_Aboriginal",a.Canadian_Aboriginal],["Carian",a.Carian],["Caucasian_Albanian",a.Caucasian_Albanian],["Chakma",a.Chakma],["Cham",a.Cham],["Cherokee",a.Cherokee],["Chorasmian",a.Chorasmian],["Common",a.Common],["Coptic",a.Coptic],["Cuneiform",a.Cuneiform],["Cypriot",a.Cypriot],["Cypro_Minoan",a.Cypro_Minoan],["Cyrillic",a.Cyrillic],["Deseret",a.Deseret],["Devanagari",a.Devanagari],["Dives_Akuru",a.Dives_Akuru],["Dogra",a.Dogra],["Duployan",a.Duployan],["Egyptian_Hieroglyphs",a.Egyptian_Hieroglyphs],["Elbasan",a.Elbasan],["Elymaic",a.Elymaic],["Ethiopic",a.Ethiopic],["Garay",a.Garay],["Georgian",a.Georgian],["Glagolitic",a.Glagolitic],["Gothic",a.Gothic],["Grantha",a.Grantha],["Greek",a.Greek],["Gujarati",a.Gujarati],["Gunjala_Gondi",a.Gunjala_Gondi],["Gurmukhi",a.Gurmukhi],["Gurung_Khema",a.Gurung_Khema],["Han",a.Han],["Hangul",a.Hangul],["Hanifi_Rohingya",a.Hanifi_Rohingya],["Hanunoo",a.Hanunoo],["Hatran",a.Hatran],["Hebrew",a.Hebrew],["Hiragana",a.Hiragana],["Imperial_Aramaic",a.Imperial_Aramaic],["Inherited",a.Inherited],["Inscriptional_Pahlavi",a.Inscriptional_Pahlavi],["Inscriptional_Parthian",a.Inscriptional_Parthian],["Javanese",a.Javanese],["Kaithi",a.Kaithi],["Kannada",a.Kannada],["Katakana",a.Katakana],["Kawi",a.Kawi],["Kayah_Li",a.Kayah_Li],["Kharoshthi",a.Kharoshthi],["Khitan_Small_Script",a.Khitan_Small_Script],["Khmer",a.Khmer],["Khojki",a.Khojki],["Khudawadi",a.Khudawadi],["Kirat_Rai",a.Kirat_Rai],["Lao",a.Lao],["Latin",a.Latin],["Lepcha",a.Lepcha],["Limbu",a.Limbu],["Linear_A",a.Linear_A],["Linear_B",a.Linear_B],["Lisu",a.Lisu],["Lycian",a.Lycian],["Lydian",a.Lydian],["Mahajani",a.Mahajani],["Makasar",a.Makasar],["Malayalam",a.Malayalam],["Mandaic",a.Mandaic],["Manichaean",a.Manichaean],["Marchen",a.Marchen],["Masaram_Gondi",a.Masaram_Gondi],["Medefaidrin",a.Medefaidrin],["Meetei_Mayek",a.Meetei_Mayek],["Mende_Kikakui",a.Mende_Kikakui],["Meroitic_Cursive",a.Meroitic_Cursive],["Meroitic_Hieroglyphs",a.Meroitic_Hieroglyphs],["Miao",a.Miao],["Modi",a.Modi],["Mongolian",a.Mongolian],["Mro",a.Mro],["Multani",a.Multani],["Myanmar",a.Myanmar],["Nabataean",a.Nabataean],["Nag_Mundari",a.Nag_Mundari],["Nandinagari",a.Nandinagari],["New_Tai_Lue",a.New_Tai_Lue],["Newa",a.Newa],["Nko",a.Nko],["Nushu",a.Nushu],["Nyiakeng_Puachue_Hmong",a.Nyiakeng_Puachue_Hmong],["Ogham",a.Ogham],["Ol_Chiki",a.Ol_Chiki],["Ol_Onal",a.Ol_Onal],["Old_Hungarian",a.Old_Hungarian],["Old_Italic",a.Old_Italic],["Old_North_Arabian",a.Old_North_Arabian],["Old_Permic",a.Old_Permic],["Old_Persian",a.Old_Persian],["Old_Sogdian",a.Old_Sogdian],["Old_South_Arabian",a.Old_South_Arabian],["Old_Turkic",a.Old_Turkic],["Old_Uyghur",a.Old_Uyghur],["Oriya",a.Oriya],["Osage",a.Osage],["Osmanya",a.Osmanya],["Pahawh_Hmong",a.Pahawh_Hmong],["Palmyrene",a.Palmyrene],["Pau_Cin_Hau",a.Pau_Cin_Hau],["Phags_Pa",a.Phags_Pa],["Phoenician",a.Phoenician],["Psalter_Pahlavi",a.Psalter_Pahlavi],["Rejang",a.Rejang],["Runic",a.Runic],["Samaritan",a.Samaritan],["Saurashtra",a.Saurashtra],["Sharada",a.Sharada],["Shavian",a.Shavian],["Siddham",a.Siddham],["SignWriting",a.SignWriting],["Sinhala",a.Sinhala],["Sogdian",a.Sogdian],["Sora_Sompeng",a.Sora_Sompeng],["Soyombo",a.Soyombo],["Sundanese",a.Sundanese],["Sunuwar",a.Sunuwar],["Syloti_Nagri",a.Syloti_Nagri],["Syriac",a.Syriac],["Tagalog",a.Tagalog],["Tagbanwa",a.Tagbanwa],["Tai_Le",a.Tai_Le],["Tai_Tham",a.Tai_Tham],["Tai_Viet",a.Tai_Viet],["Takri",a.Takri],["Tamil",a.Tamil],["Tangsa",a.Tangsa],["Tangut",a.Tangut],["Telugu",a.Telugu],["Thaana",a.Thaana],["Thai",a.Thai],["Tibetan",a.Tibetan],["Tifinagh",a.Tifinagh],["Tirhuta",a.Tirhuta],["Todhri",a.Todhri],["Toto",a.Toto],["Tulu_Tigalari",a.Tulu_Tigalari],["Ugaritic",a.Ugaritic],["Vai",a.Vai],["Vithkuqi",a.Vithkuqi],["Wancho",a.Wancho],["Warang_Citi",a.Warang_Citi],["Yezidi",a.Yezidi],["Yi",a.Yi],["Zanabazar_Square",a.Zanabazar_Square]]))();static FOLD_CATEGORIES=(()=>new Map([["L",a.foldL],["Ll",a.foldLl],["Lt",a.foldLt],["Lu",a.foldLu],["M",a.foldM],["Mn",a.foldMn]]))();static FOLD_SCRIPT=(()=>new Map([["Common",a.foldCommon],["Greek",a.foldGreek],["Inherited",a.foldInherited]]))()}class Fe{static MAX_RUNE=1114111;static MAX_ASCII=127;static MAX_LATIN1=255;static MAX_BMP=65535;static MIN_FOLD=65;static MAX_FOLD=125251;static is32(e,r){let n=0,s=e.length;while(n<s){let i=n+Math.floor((s-n)/2),o=e[i];if(o[0]<=r&&r<=o[1])return(r-o[0])%o[2]===0;if(r<o[0])s=i;else n=i+1}return!1}static is(e,r){if(r<=this.MAX_LATIN1){for(let n of e){if(r>n[1])continue;if(r<n[0])return!1;return(r-n[0])%n[2]===0}return!1}return e.length>0&&r>=e[0][0]&&this.is32(e,r)}static isUpper(e){if(e<=this.MAX_LATIN1){let r=String.fromCodePoint(e);return r.toUpperCase()===r&&r.toLowerCase()!==r}return this.is(a.Upper,e)}static isPrint(e){if(e<=this.MAX_LATIN1)return e>=32&&e<127||e>=161&&e!==173;return this.is(a.L,e)||this.is(a.M,e)||this.is(a.N,e)||this.is(a.P,e)||this.is(a.S,e)}static simpleFold(e){if(a.CASE_ORBIT.has(e))return a.CASE_ORBIT.get(e);let r=S.toLowerCase(e);if(r!==e)return r;return S.toUpperCase(e)}static equalsIgnoreCase(e,r){if(e<0||r<0||e===r)return!0;if(e<=this.MAX_ASCII&&r<=this.MAX_ASCII){if(S.CODES.get("A")<=e&&e<=S.CODES.get("Z"))e|=32;if(S.CODES.get("A")<=r&&r<=S.CODES.get("Z"))r|=32;return e===r}for(let n=this.simpleFold(e);n!==e;n=this.simpleFold(n))if(n===r)return!0;return!1}}class Se{static METACHARACTERS="\\.+*?()|[]{}^$";static EMPTY_BEGIN_LINE=1;static EMPTY_END_LINE=2;static EMPTY_BEGIN_TEXT=4;static EMPTY_END_TEXT=8;static EMPTY_WORD_BOUNDARY=16;static EMPTY_NO_WORD_BOUNDARY=32;static EMPTY_ALL=(()=>-1)();static emptyInts(){return[]}static isalnum(e){return S.CODES.get("0")<=e&&e<=S.CODES.get("9")||S.CODES.get("a")<=e&&e<=S.CODES.get("z")||S.CODES.get("A")<=e&&e<=S.CODES.get("Z")}static unhex(e){if(S.CODES.get("0")<=e&&e<=S.CODES.get("9"))return e-S.CODES.get("0");if(S.CODES.get("a")<=e&&e<=S.CODES.get("f"))return e-S.CODES.get("a")+10;if(S.CODES.get("A")<=e&&e<=S.CODES.get("F"))return e-S.CODES.get("A")+10;return-1}static escapeRune(e){let r="";if(Fe.isPrint(e)){if(this.METACHARACTERS.indexOf(String.fromCodePoint(e))>=0)r+="\\";r+=String.fromCodePoint(e)}else switch(e){case S.CODES.get('"'):r+="\\\"";break;case S.CODES.get("\\"):r+="\\\\";break;case S.CODES.get("\t"):r+="\\t";break;case S.CODES.get(`
|
|
12
|
+
`):r+="\\n";break;case S.CODES.get("\r"):r+="\\r";break;case S.CODES.get("\b"):r+="\\b";break;case S.CODES.get("\f"):r+="\\f";break;default:{let n=e.toString(16);if(e<256){if(r+="\\x",n.length===1)r+="0";r+=n}else r+=`\\x{${n}}`;break}}return r}static stringToRunes(e){return String(e).split("").map((r)=>r.codePointAt(0))}static runeToString(e){return String.fromCodePoint(e)}static isWordRune(e){return S.CODES.get("a")<=e&&e<=S.CODES.get("z")||S.CODES.get("A")<=e&&e<=S.CODES.get("Z")||S.CODES.get("0")<=e&&e<=S.CODES.get("9")||e===S.CODES.get("_")}static emptyOpContext(e,r){let n=0;if(e<0)n|=this.EMPTY_BEGIN_TEXT|this.EMPTY_BEGIN_LINE;if(e===S.CODES.get(`
|
|
13
|
+
`))n|=this.EMPTY_BEGIN_LINE;if(r<0)n|=this.EMPTY_END_TEXT|this.EMPTY_END_LINE;if(r===S.CODES.get(`
|
|
14
|
+
`))n|=this.EMPTY_END_LINE;if(this.isWordRune(e)!==this.isWordRune(r))n|=this.EMPTY_WORD_BOUNDARY;else n|=this.EMPTY_NO_WORD_BOUNDARY;return n}static quoteMeta(e){return e.split("").map((r)=>{if(this.METACHARACTERS.indexOf(r)>=0)return`\\${r}`;return r}).join("")}static charCount(e){return e>Fe.MAX_BMP?2:1}static stringToUtf8ByteArray(e){if(globalThis.TextEncoder)return Array.from(new TextEncoder().encode(e));else{let r=[],n=0;for(let s=0;s<e.length;s++){let i=e.charCodeAt(s);if(i<128)r[n++]=i;else if(i<2048)r[n++]=i>>6|192,r[n++]=i&63|128;else if((i&64512)===55296&&s+1<e.length&&(e.charCodeAt(s+1)&64512)===56320)i=65536+((i&1023)<<10)+(e.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128;else r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128}return r}}static utf8ByteArrayToString(e){if(globalThis.TextDecoder)return new TextDecoder("utf-8").decode(new Uint8Array(e));else{let r=[],n=0,s=0;while(n<e.length){let i=e[n++];if(i<128)r[s++]=String.fromCharCode(i);else if(i>191&&i<224){let o=e[n++];r[s++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){let o=e[n++],c=e[n++],u=e[n++],p=((i&7)<<18|(o&63)<<12|(c&63)<<6|u&63)-65536;r[s++]=String.fromCharCode(55296+(p>>10)),r[s++]=String.fromCharCode(56320+(p&1023))}else{let o=e[n++],c=e[n++];r[s++]=String.fromCharCode((i&15)<<12|(o&63)<<6|c&63)}}return r.join("")}}}var r1=(e=[],r=0)=>{let n={};for(let s=0;s<e.length;s++){let i=e[s],o=r+s;n[i]=o,n[o]=i}return Object.freeze(n)};class at{static Encoding=(()=>r1(["UTF_16","UTF_8"]))();getEncoding(){throw Error("not implemented")}isUTF8Encoding(){return this.getEncoding()===at.Encoding.UTF_8}isUTF16Encoding(){return this.getEncoding()===at.Encoding.UTF_16}}class y{static Op=(()=>r1(["NO_MATCH","EMPTY_MATCH","LITERAL","CHAR_CLASS","ANY_CHAR_NOT_NL","ANY_CHAR","BEGIN_LINE","END_LINE","BEGIN_TEXT","END_TEXT","WORD_BOUNDARY","NO_WORD_BOUNDARY","CAPTURE","STAR","PLUS","QUEST","REPEAT","CONCAT","ALTERNATE","LEFT_PAREN","VERTICAL_BAR"]))();static isPseudoOp(e){return e>=y.Op.LEFT_PAREN}static emptySubs(){return[]}static quoteIfHyphen(e){if(e===S.CODES.get("-"))return"\\";return""}static fromRegexp(e){let r=new y(e.op);return r.flags=e.flags,r.subs=e.subs,r.runes=e.runes,r.cap=e.cap,r.min=e.min,r.max=e.max,r.name=e.name,r.namedGroups=e.namedGroups,r}constructor(e){this.op=e,this.flags=0,this.subs=y.emptySubs(),this.runes=[],this.min=0,this.max=0,this.cap=0,this.name=null,this.namedGroups={}}reinit(){this.flags=0,this.subs=y.emptySubs(),this.runes=[],this.cap=0,this.min=0,this.max=0,this.name=null,this.namedGroups={}}toString(){return this.appendTo()}appendTo(){let e="";switch(this.op){case y.Op.NO_MATCH:e+="[^\\x00-\\x{10FFFF}]";break;case y.Op.EMPTY_MATCH:e+="(?:)";break;case y.Op.STAR:case y.Op.PLUS:case y.Op.QUEST:case y.Op.REPEAT:{let r=this.subs[0];if(r.op>y.Op.CAPTURE||r.op===y.Op.LITERAL&&r.runes.length>1)e+=`(?:${r.appendTo()})`;else e+=r.appendTo();switch(this.op){case y.Op.STAR:e+="*";break;case y.Op.PLUS:e+="+";break;case y.Op.QUEST:e+="?";break;case y.Op.REPEAT:if(e+=`{${this.min}`,this.min!==this.max){if(e+=",",this.max>=0)e+=this.max}e+="}";break}if((this.flags&N.NON_GREEDY)!==0)e+="?";break}case y.Op.CONCAT:{for(let r of this.subs)if(r.op===y.Op.ALTERNATE)e+=`(?:${r.appendTo()})`;else e+=r.appendTo();break}case y.Op.ALTERNATE:{let r="";for(let n of this.subs)e+=r,r="|",e+=n.appendTo();break}case y.Op.LITERAL:if((this.flags&N.FOLD_CASE)!==0)e+="(?i:";for(let r of this.runes)e+=Se.escapeRune(r);if((this.flags&N.FOLD_CASE)!==0)e+=")";break;case y.Op.ANY_CHAR_NOT_NL:e+="(?-s:.)";break;case y.Op.ANY_CHAR:e+="(?s:.)";break;case y.Op.CAPTURE:if(this.name===null||this.name.length===0)e+="(";else e+=`(?P<${this.name}>`;if(this.subs[0].op!==y.Op.EMPTY_MATCH)e+=this.subs[0].appendTo();e+=")";break;case y.Op.BEGIN_TEXT:e+="\\A";break;case y.Op.END_TEXT:if((this.flags&N.WAS_DOLLAR)!==0)e+="(?-m:$)";else e+="\\z";break;case y.Op.BEGIN_LINE:e+="^";break;case y.Op.END_LINE:e+="$";break;case y.Op.WORD_BOUNDARY:e+="\\b";break;case y.Op.NO_WORD_BOUNDARY:e+="\\B";break;case y.Op.CHAR_CLASS:if(this.runes.length%2!==0){e+="[invalid char class]";break}if(e+="[",this.runes.length===0)e+="^\\x00-\\x{10FFFF}";else if(this.runes[0]===0&&this.runes[this.runes.length-1]===Fe.MAX_RUNE){e+="^";for(let r=1;r<this.runes.length-1;r+=2){let n=this.runes[r]+1,s=this.runes[r+1]-1;if(e+=y.quoteIfHyphen(n),e+=Se.escapeRune(n),n!==s)e+="-",e+=y.quoteIfHyphen(s),e+=Se.escapeRune(s)}}else for(let r=0;r<this.runes.length;r+=2){let n=this.runes[r],s=this.runes[r+1];if(e+=y.quoteIfHyphen(n),e+=Se.escapeRune(n),n!==s)e+="-",e+=y.quoteIfHyphen(s),e+=Se.escapeRune(s)}e+="]";break;default:e+=this.op;break}return e}maxCap(){let e=0;if(this.op===y.Op.CAPTURE)e=this.cap;if(this.subs!==null)for(let r of this.subs){let n=r.maxCap();if(e<n)e=n}return e}equals(e){if(!(e!==null&&e instanceof y))return!1;if(this.op!==e.op)return!1;switch(this.op){case y.Op.END_TEXT:{if((this.flags&N.WAS_DOLLAR)!==(e.flags&N.WAS_DOLLAR))return!1;break}case y.Op.LITERAL:case y.Op.CHAR_CLASS:{if(this.runes===null&&e.runes===null)break;if(this.runes===null||e.runes===null)return!1;if(this.runes.length!==e.runes.length)return!1;for(let r=0;r<this.runes.length;r++)if(this.runes[r]!==e.runes[r])return!1;break}case y.Op.ALTERNATE:case y.Op.CONCAT:{if(this.subs.length!==e.subs.length)return!1;for(let r=0;r<this.subs.length;++r)if(!this.subs[r].equals(e.subs[r]))return!1;break}case y.Op.STAR:case y.Op.PLUS:case y.Op.QUEST:{if((this.flags&N.NON_GREEDY)!==(e.flags&N.NON_GREEDY)||!this.subs[0].equals(e.subs[0]))return!1;break}case y.Op.REPEAT:{if((this.flags&N.NON_GREEDY)!==(e.flags&N.NON_GREEDY)||this.min!==e.min||this.max!==e.max||!this.subs[0].equals(e.subs[0]))return!1;break}case y.Op.CAPTURE:{if(this.cap!==e.cap||(this.name===null?e.name!==null:this.name!==e.name)||!this.subs[0].equals(e.subs[0]))return!1;break}}return!0}}class C{constructor(e,r){this.sign=e,this.cls=r}}var Gt=[48,57],$t=[9,10,12,13,32,32],zt=[48,57,65,90,95,95,97,122],Ao=new Map([["\\d",new C(1,Gt)],["\\D",new C(-1,Gt)],["\\s",new C(1,$t)],["\\S",new C(-1,$t)],["\\w",new C(1,zt)],["\\W",new C(-1,zt)]]),Ft=[48,57,65,90,97,122],Vt=[65,90,97,122],Bt=[0,127],Yt=[9,9,32,32],Ut=[0,31,127,127],Wt=[48,57],qt=[33,126],Xt=[97,122],Kt=[32,126],Qt=[33,47,58,64,91,96,123,126],Jt=[9,13,32,32],Zt=[65,90],e1=[48,57,65,90,95,95,97,122],t1=[48,57,65,70,97,102],xo=new Map([["[:alnum:]",new C(1,Ft)],["[:^alnum:]",new C(-1,Ft)],["[:alpha:]",new C(1,Vt)],["[:^alpha:]",new C(-1,Vt)],["[:ascii:]",new C(1,Bt)],["[:^ascii:]",new C(-1,Bt)],["[:blank:]",new C(1,Yt)],["[:^blank:]",new C(-1,Yt)],["[:cntrl:]",new C(1,Ut)],["[:^cntrl:]",new C(-1,Ut)],["[:digit:]",new C(1,Wt)],["[:^digit:]",new C(-1,Wt)],["[:graph:]",new C(1,qt)],["[:^graph:]",new C(-1,qt)],["[:lower:]",new C(1,Xt)],["[:^lower:]",new C(-1,Xt)],["[:print:]",new C(1,Kt)],["[:^print:]",new C(-1,Kt)],["[:punct:]",new C(1,Qt)],["[:^punct:]",new C(-1,Qt)],["[:space:]",new C(1,Jt)],["[:^space:]",new C(-1,Jt)],["[:upper:]",new C(1,Zt)],["[:^upper:]",new C(-1,Zt)],["[:word:]",new C(1,e1)],["[:^word:]",new C(-1,e1)],["[:xdigit:]",new C(1,t1)],["[:^xdigit:]",new C(-1,t1)]]);class ot extends Error{constructor(e,r){super(e);this.name="BetterAuthError",this.message=e,this.cause=r,this.stack=""}}function Fn(e){return{authorize(r,n="AND"){let s=!1;for(let[i,o]of Object.entries(r)){let c=e[i];if(!c)return{success:!1,error:`You are not allowed to access resource: ${i}`};if(Array.isArray(o))s=o.every((u)=>c.includes(u));else if(typeof o==="object"){let u=o;if(u.connector==="OR")s=u.actions.some((p)=>c.includes(p));else s=u.actions.every((p)=>c.includes(p))}else throw new ot("Invalid access control request");if(s&&n==="OR")return{success:s};if(!s&&n==="AND")return{success:!1,error:`unauthorized to access resource "${i}"`}}if(s)return{success:s};return{success:!1,error:"Not authorized"}},statements:e}}function Ve(e){return{newRole(r){return Fn(r)},statements:e}}var ct={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"]},ut=Ve(ct),n1=ut.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"]}),s1=ut.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"]}),i1=ut.newRole({organization:[],member:[],invitation:[],team:[]});var Vn={...ct,project:["create","read","update","delete"]},Be=Ve(Vn),Ho=Be.newRole({project:["create","read","update","delete"],...s1.statements}),Go=Be.newRole({project:["create","read","update","delete"],...n1.statements}),$o=Be.newRole({project:["create","read","update"],...i1.statements}),zo=Be.newRole({project:["read"]});function Bn(e){switch(e.toLowerCase()){case"google":return"https://www.google.com";case"bing":return"https://www.bing.com";case"yahoo":return"https://www.yahoo.com";case"facebook":return"https://www.facebook.com";case"twitter":case"x":return"https://twitter.com";case"instagram":return"https://www.instagram.com";case"linkedin":return"https://www.linkedin.com";case"youtube":return"https://www.youtube.com";case"pinterest":return"https://www.pinterest.com";case"reddit":return"https://www.reddit.com";case"tiktok":return"https://www.tiktok.com";case"snapchat":return"https://www.snapchat.com";default:return null}}function a1(e){if(!e||e.trim()==="")return null;let r=e.trim();if(r==="/"||r==="direct")return null;try{return new URL(r),r}catch(n){if(r.includes(".")){if(r.startsWith("http"))return r;else if(r.match(/^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(\/.*)?$/))return`https://${r}`}let s=Bn(r);if(s)return s;return r}}var Yn;((I)=>(I.User=tt,I.Users=It,I.Organization=et,I.Organizations=$e,I.Member=Ze,I.Members=Ge,I.Event=kt,I.Events=wt,I.Workspace=Tt))(Yn||={});function Un(){if(R())return{};let e={},r=h().location,n="";if("search"in r)n=r.search;else if("href"in r&&r.href)n=new URL(r.href).search;if(n){let s=new URLSearchParams(n);for(let[i,o]of s.entries())e[i]=o}return e}function Le(){let e=T().referrer,r=Un(),n=r.utm_source||r.source||r.ref||r.utm_medium||r.utm_campaign||r.utm_content,s="";if(e&&e.trim()!=="")s=e;else if(n){let i=a1(n);if(i)s=i}return s}class lt{#r;#e;#t;#s;#a;#o;#c;#n;#u;#i;#A;#x;#C;#k;#w;#l;#I;#m;#y;#p;#v;#h;#E;#f;#T;#d;#g;#O;#R=60000;#_;#b=!1;#N;#P;#L=[];#S;constructor(e,r=M){this.#r=e,this.#S=r,this.#e=new Set,this.#t=0,this.#l=null,this.#I=h().location.href,this.#m=new Map,this.#y=new WeakMap,this.#p=new WeakMap,this.#v=Date.now(),this.#h=0,this.#E=this.#v,this.#f=T().hidden,this.#T=Date.now(),this.#d=null,this.#g=!1,this.#_=null,this.#s=this.handleClick.bind(this),this.#a=this.handleScroll.bind(this),this.#o=this.handleScroll.bind(this),this.#c=this.handleInputFocus.bind(this),this.#n=this.handleInputBlur.bind(this),this.#u=this.handleFormChange.bind(this),this.#i=this.handleFormSubmit.bind(this),this.#A=this.handleVideoPlay.bind(this),this.#x=this.handleVideoPause.bind(this),this.#C=this.handleVideoEnd.bind(this),this.#k=this.handleVisibilityChange.bind(this),this.#w=this.handleBeforeUnload.bind(this),this.#O=this.handleUserActivity.bind(this),this.#N=this.handleError.bind(this),this.#P=this.handleRejection.bind(this);let n=this.#S.autoTrack??M.autoTrack;if(typeof n==="boolean"){if(n)this.setupClickTracking(),this.setupScrollTracking(),this.setupFormTracking(),this.setupVideoTracking(),this.setupPageTimeTracking(),this.setupInactivityTracking(),this.setupPerformanceTracking()}else{if(n.clicks!==!1)this.setupClickTracking();if(n.scrolling!==!1)this.setupScrollTracking();if(n.forms!==!1)this.setupFormTracking();if(n.videos!==!1)this.setupVideoTracking();if(n.pageVisibility!==!1)this.setupPageTimeTracking();if(n.pageInactivity!==!1)this.setupInactivityTracking();if(n.performance!==!1)this.setupPerformanceTracking()}}destroy(){if(h().removeEventListener("click",this.#s),h().removeEventListener("scroll",this.#a),h().removeEventListener("resize",this.#o),h().removeEventListener("focus",this.#c,!0),h().removeEventListener("blur",this.#n,!0),h().removeEventListener("change",this.#u,!0),h().removeEventListener("submit",this.#i,!0),h().removeEventListener("play",this.#A,!0),h().removeEventListener("pause",this.#x,!0),h().removeEventListener("ended",this.#C,!0),h().removeEventListener("visibilitychange",this.#k),h().removeEventListener("beforeunload",this.#w),this.#l)h().clearTimeout(this.#l);if(["mousemove","mousedown","keydown","touchstart","scroll"].forEach((e)=>{h().removeEventListener(e,this.#O,!0)}),this.#d)h().clearTimeout(this.#d);this.uninstallErrorHandler(),this.#L.forEach((e)=>{try{e.disconnect()}catch(r){}}),this.#L=[]}setupClickTracking(){h().addEventListener("click",this.#s)}handleClick(e){let r=e.target;if(!r)return;let n=this.extractClickLabel(r);if(!n)return;this.trackCustomEvent("click",{label:n,element:r.tagName.toLowerCase(),id:r.id||void 0})}handleScroll(){let e=h().location.href;if(e!==this.#I)this.#I=e,this.#t=0,this.#e.clear();if(this.#l)h().clearTimeout(this.#l);this.#l=h().setTimeout(()=>{let r=this.calculateScrollDepth();if(r>this.#t)this.#t=r,this.checkAndTrackScrollDepth(r)},100)}setupScrollTracking(){h().addEventListener("scroll",this.#a),h().addEventListener("resize",this.#o)}calculateScrollDepth(){let e=h().innerHeight,r=Math.max(T().documentElement.scrollHeight,T().documentElement.offsetHeight,T().documentElement.clientHeight),n=h().pageYOffset||T().documentElement.scrollTop;return Math.round((n+e)/r*100)}checkAndTrackScrollDepth(e){let r=h().location.href;if(e>50&&!this.#e.has(r))this.#e.add(r),this.trackCustomEvent("scroll")}extractClickLabel(e){if(e instanceof HTMLInputElement){if(e.type==="submit"&&e.value)return`${e.value}`;if(e.type==="checkbox"){let s=this.findInputLabel(e),i=e.checked?"Checked":"Unchecked";return s?`${i} ${s}`:null}}let r=e.closest("label");if(r){let s=r.textContent?.trim();if(s)return s}let n=e;while(n){let s=n.getAttribute("aria-label")?.trim();if(s)return s;if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement){let o=n.textContent?.trim();if(o)return o}let i=n.parentElement;if(!i)break;n=i}return null}findInputLabel(e){let r=e.getAttribute("aria-label");if(r)return r;if(e.id){let s=T().querySelector(`label[for="${e.id}"]`);if(s&&s.textContent)return s.textContent.trim()}let n=e.closest("label");if(n&&n.textContent)return n.textContent.trim().replace(e.value,"").trim();return null}withAccountId(e){let r=this.#r.getUserId();if(r&&!e.user_id)e.user_id=r;return e}trackPageView(){let e=this.withAccountId({name:"page_view",url:h().location.href,referrer:Le(),title:T().title,timestamp:new Date().toISOString()});return this.#r.track(e)}trackCustomEvent(e,r={},n={immediate:!1,userAgent:void 0,url:void 0}){let{referrer:s}=r||{},i=this.withAccountId({name:e,url:n.url||h().location.href,referrer:s||Le(),title:T().title,properties:mt(r,["url"]),timestamp:new Date().toISOString(),userAgent:n.userAgent});if(n.immediate)return this.#r.publish([i]);else return this.#r.track(i)}trackPurchase(e,r={userAgent:void 0,url:void 0}){let{referrer:n}=e.properties||{},s=this.withAccountId({name:"purchase",url:r.url||h().location.href,userAgent:r.userAgent,referrer:n||Le(),title:T().title,price:e.price,currency:e.currency,amount:e.amount,properties:{...e.properties},timestamp:new Date().toISOString()});return this.#r.track(s)}setupFormTracking(){h().addEventListener("focus",this.#c,!0),h().addEventListener("blur",this.#n,!0),h().addEventListener("change",this.#u,!0),h().addEventListener("submit",this.#i,!0)}handleInputFocus(e){let r=e.target;if(!r||!(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement))return;if(r instanceof HTMLInputElement&&r.type==="password")return;this.#y.set(r,this.getElementValue(r));let n=r.closest("form");if(n&&!this.#m.has(n))this.#m.set(n,Date.now())}getElementValue(e){if(e instanceof HTMLSelectElement)return e.value;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e.value;return""}handleInputBlur(e){let r=e.target;if(!r||!(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement))return;if(r instanceof HTMLInputElement&&r.type==="password")return;let n=this.#y.get(r)||"",s=this.getElementValue(r);if(s!==n&&s.trim()!==""){let i=r instanceof HTMLSelectElement?"select":r.type,o=this.findFormElementLabel(r)||this.getInputIdentifier(r);if(!o)return;this.trackCustomEvent("input_fill",{input_type:i,label:o,form_name:this.getFormName(r)})}this.#y.delete(r)}getFormName(e){let r=e.closest("form");if(!r)return;return r.getAttribute("name")||r.getAttribute("id")||r.getAttribute("aria-label")||void 0}getInputIdentifier(e){return e.getAttribute("name")||e.getAttribute("id")||e.getAttribute("placeholder")||null}findFormElementLabel(e){let r=e.getAttribute("aria-label");if(r)return r;if(e.id){let s=T().querySelector(`label[for="${e.id}"]`);if(s&&s.textContent)return s.textContent.trim()}let n=e.closest("label");if(n&&n.textContent){let s=n.textContent.trim(),i=e instanceof HTMLSelectElement?e.selectedOptions[0]?.text:e.value;return i?s.replace(i,"").trim():s}return null}handleFormChange(e){let r=e.target;if(!r||!(r instanceof HTMLSelectElement||r instanceof HTMLInputElement))return;if(r instanceof HTMLSelectElement)this.trackSelectChange(r);else if(r instanceof HTMLInputElement){if(r.type==="radio")this.trackRadioChange(r);else if(r.type==="checkbox")this.trackCheckboxChange(r);else if(r.type==="range")this.trackRangeChange(r)}}trackSelectChange(e){let r=this.findFormElementLabel(e)||this.getInputIdentifier(e);if(!r)return;let n=e.selectedOptions[0];this.trackCustomEvent("input_select",{input_type:"select",label:r,option_label:n?.text||"",form_name:this.getFormName(e)})}trackRadioChange(e){let r=this.findFormElementLabel(e)||this.getInputIdentifier(e);if(!r)return;let n=e.name||r;this.trackCustomEvent("input_radio",{input_type:"radio",group:n,label:r,form_name:this.getFormName(e)})}trackCheckboxChange(e){let r=this.findFormElementLabel(e)||this.getInputIdentifier(e);if(!r)return;this.trackCustomEvent("input_checkbox",{input_type:"checkbox",label:r,checked:e.checked,form_name:this.getFormName(e)})}trackRangeChange(e){let r=this.findFormElementLabel(e)||this.getInputIdentifier(e);if(!r)return;this.trackCustomEvent("input_range",{input_type:"range",label:r,form_name:this.getFormName(e)})}handleFormSubmit(e){let r=e.target;if(!r||!(r instanceof HTMLFormElement))return;let n=this.#m.get(r)||Date.now(),s=Date.now()-n,i=this.getFormName(r)||"unknown";this.trackCustomEvent("form_submit",{form_name:i,time_to_complete:s}),this.#m.delete(r)}setupVideoTracking(){h().addEventListener("play",this.#A,!0),h().addEventListener("pause",this.#x,!0),h().addEventListener("ended",this.#C,!0)}getVideoMetadata(e){let r={duration:Math.round(e.duration),current_time:Math.round(e.currentTime),src:e.currentSrc||e.src||void 0,title:e.title||void 0,video_id:e.id||void 0};for(let i of e.attributes)if(i.name.startsWith("data-")){let o=i.name.replace("data-","").replace(/-/g,"_");r[o]=i.value}if(e.getAttribute("aria-label"))r.aria_label=e.getAttribute("aria-label");if(e.getAttribute("aria-describedby"))r.aria_describedby=e.getAttribute("aria-describedby");let n=e.parentElement;if(n){if(n.id)r.parent_id=n.id;for(let c of n.attributes)if(c.name.startsWith("data-")&&c.value){let u=`parent_${c.name.replace("data-","").replace(/-/g,"_")}`;r[u]=c.value}let i=n,o=0;while(i&&o<3){if(i.tagName==="SECTION"||i.tagName==="ARTICLE"){if(i.id)r.section_id=i.id;if(i.className)r.section_class=i.className.trim();break}i=i.parentElement,o++}}let s=this.getNearbyVideoDescription(e);if(s)r.nearby_text=s;if(r.src){let i=new URL(r.src,window.location.href);r.video_domain=i.hostname;let c=i.pathname.split("/").pop();if(c&&c.includes("."))r.video_filename=c;if(i.hostname.includes("youtube"))r.video_platform="youtube";else if(i.hostname.includes("vimeo"))r.video_platform="vimeo";else if(i.hostname.includes("wistia"))r.video_platform="wistia"}return Object.keys(r).forEach((i)=>{if(r[i]===void 0||r[i]===null||r[i]==="")delete r[i]}),r}getNearbyVideoDescription(e){let r=["h1, h2, h3, h4, h5, h6",'[role="heading"]',".video-title, .title","figcaption","caption"],n=e.parentElement,s=0;while(n&&s<2){for(let i of r){let o=n.querySelector(i);if(o){let c=o.textContent?.trim();if(c&&c.length>0&&c.length<200)return c}}n=n.parentElement,s++}return}handleVideoPlay(e){let r=e.target;if(!r||!(r instanceof HTMLVideoElement))return;this.#p.set(r,Date.now()),this.trackCustomEvent("video_play",this.getVideoMetadata(r))}handleVideoPause(e){let r=e.target;if(!r||!(r instanceof HTMLVideoElement))return;let n=this.#p.get(r),s=this.getVideoMetadata(r);if(n)s.watch_time=Math.round((Date.now()-n)/1000),this.#p.delete(r);this.trackCustomEvent("video_pause",s)}handleVideoEnd(e){let r=e.target;if(!r||!(r instanceof HTMLVideoElement))return;let n=this.#p.get(r),s=this.getVideoMetadata(r);if(n)s.watch_time=Math.round((Date.now()-n)/1000),this.#p.delete(r);this.trackCustomEvent("video_complete",s)}setupPageTimeTracking(){h().addEventListener("visibilitychange",this.#k),h().addEventListener("beforeunload",this.#w)}handleVisibilityChange(){let e=this.#S.autoTrack??M.autoTrack;if(!(typeof e==="boolean"?e:e.pageVisibility!==!1))return;let n=Date.now(),s=this.#f;if(this.#f=!T().hidden,s)this.#h+=n-this.#E;this.#E=n,this.trackCustomEvent("page_visibility",{visible:this.#f,total_time:Math.round((n-this.#v)/1000),visible_time:Math.round(this.#h/1000)})}handleBeforeUnload(){let e=this.#S.autoTrack??M.autoTrack;if(!(typeof e==="boolean"?e:e.pageVisibility!==!1))return;let n=Date.now();if(this.#f)this.#h+=n-this.#E;this.trackCustomEvent("page_exit",{total_time:Math.round((n-this.#v)/1000),visible_time:Math.round(this.#h/1000)},{immediate:!0})}setupInactivityTracking(){["mousemove","mousedown","keydown","touchstart","scroll"].forEach((e)=>{h().addEventListener(e,this.#O,!0)}),this.checkInactivity()}handleUserActivity(){if(this.#T=Date.now(),this.#g&&this.#_)this.#g=!1,this.trackCustomEvent("user_active",{inactive_duration:Math.round((Date.now()-this.#_)/1000),url:h().location.href,title:T().title}),this.#_=null;this.checkInactivity()}checkInactivity(){if(this.#d)h().clearTimeout(this.#d);this.#d=h().setTimeout(()=>{let e=Date.now();if(e-this.#T>=this.#R&&!this.#g)this.#g=!0,this.#_=e,this.trackCustomEvent("user_inactive")},this.#R)}installErrorHandler(){if(this.#b||typeof window>"u")return;h().addEventListener("error",this.#N),h().addEventListener("unhandledrejection",this.#P),this.#b=!0}uninstallErrorHandler(){if(!this.#b||typeof window>"u")return;h().removeEventListener("error",this.#N),h().removeEventListener("unhandledrejection",this.#P),this.#b=!1}isErrorHandlerInstalled(){return this.#b}handleError(e){if(e instanceof ErrorEvent)this.trackError(Error(e.message),{filename:e.filename,lineno:e.lineno,colno:e.colno,source:"getWindow().onerror"})}handleRejection(e){let r=e.reason instanceof Error?e.reason:Error(String(e.reason||"Unhandled Promise rejection"));this.trackError(r,{source:"unhandledrejection"})}trackError(e,r={},n={immediate:!1}){let{filename:s,lineno:i,colno:o,source:c,url:u,referrer:p,userAgent:b,...w}=r,Ae=this.withAccountId({name:"error",message:e.message,stack:e.stack,source:c||"client",lineno:i,colno:o,filename:s,properties:w,timestamp:new Date().toISOString(),url:u||h().location.href,referrer:p||Le(),title:T().title});if(n.immediate)this.#r.publish([Ae]);else this.#r.track(Ae)}setupPerformanceTracking(){if(T().readyState==="complete")this.trackPageLoadPerformance();else h().addEventListener("load",()=>{h().setTimeout(()=>{this.trackPageLoadPerformance()},100)});this.setupCoreWebVitals()}trackPageLoadPerformance(){if(typeof window>"u"||!window.performance?.timing)return;let e=window.performance.timing,r=window.performance.navigation,n=e.loadEventEnd-e.navigationStart,s=e.domContentLoadedEventEnd-e.navigationStart,i=e.responseStart-e.navigationStart,o=e.domInteractive-e.navigationStart,c=e.connectEnd-e.connectStart,u=e.domainLookupEnd-e.domainLookupStart;if(n>0&&n<60000)this.trackCustomEvent("page_load",{page_load_time:n,dom_content_loaded_time:s,time_to_first_byte:i,dom_interactive_time:o,connect_time:c,dns_lookup_time:u,navigation_type:r?r.type:void 0,redirect_count:r?r.redirectCount:void 0})}setupCoreWebVitals(){if(typeof window>"u"||!window.PerformanceObserver)return;try{this.observeWebVital("largest-contentful-paint",(e)=>{let r=e[e.length-1];this.trackCustomEvent("core_web_vitals",{metric:"LCP",value:Math.round(r.startTime),rating:this.getCWVRating("LCP",r.startTime)})}),this.observeWebVital("first-input",(e)=>{let r=e[0],n=r.processingStart-r.startTime;this.trackCustomEvent("core_web_vitals",{metric:"FID",value:Math.round(n),rating:this.getCWVRating("FID",n)})}),this.observeWebVital("layout-shift",(e)=>{let r=0;for(let n of e)if(!n.hadRecentInput)r+=n.value;if(r>0)this.trackCustomEvent("core_web_vitals",{metric:"CLS",value:Math.round(r*1000)/1000,rating:this.getCWVRating("CLS",r)})})}catch(e){}}observeWebVital(e,r){try{if(typeof window>"u"||!window.PerformanceObserver)return;let n=new window.PerformanceObserver((s)=>{r(s.getEntries())});n.observe({type:e,buffered:!0}),this.#L.push(n)}catch(n){}}getCWVRating(e,r){switch(e){case"LCP":return r<=2500?"good":r<=4000?"needs-improvement":"poor";case"FID":return r<=100?"good":r<=300?"needs-improvement":"poor";case"CLS":return r<=0.1?"good":r<=0.25?"needs-improvement":"poor";default:return"unknown"}}}class pt{#r;#e=[];#t=null;#s;#a;#o="";#c=null;#n=null;#u=5000;#i;constructor(e,r){if(this.#r=e,this.#i=r,this.#a=r?.appId||"",r?.userId)this.setAccountId(r.userId);this.#u=r?.flushIntervalMs||M.flushIntervalMs||5000}init(e){this.#t=e,this.setup()}destroy(){if(this.#c)h().clearInterval(this.#c);if(this.#n)h().clearTimeout(this.#n);if(this.#e.length>0)this.flush()}shouldEnableAutoFlush(){if(this.#i?.autoTrack===!1)return!1;return!0}setup(){if(typeof window>"u")return;if(this.getSessionId(),this.restoreAccountId(),this.#o=h().location.href,this.#t.trackPageView(),this.setupHistoryChange(),this.shouldEnableAutoFlush())this.#c=h().setInterval(()=>this.flush(),this.#u)}setupHistoryChange(){if(!this.#t)return;let{pushState:e,replaceState:r}=history;history.pushState=(...n)=>{e.apply(history,n),this.trackPageViewIfUrlChanged()},history.replaceState=(...n)=>{r.apply(history,n),this.trackPageViewIfUrlChanged()},h().addEventListener("popstate",()=>{this.trackPageViewIfUrlChanged()})}trackPageViewIfUrlChanged(){let e=h().location.href;if(e!==this.#o)this.#o=e,this.#t.trackPageView()}restoreAccountId(){if(this.#s)return;let e=Ue("_up.aid"),r=ae.getItem("aid"),n=e||r;if(typeof n==="string"&&n.length>0)this.setAccountId(n)}getAccountId(){if(!this.#s)this.restoreAccountId();return this.#s}setAccountId(e){this.#s=e,Ce("_up.aid",e,{days:365,sameSite:"lax",domain:xe(this.#r.serverUrl)}),ae.setItem("aid",e)}getUserId(){return this.getAccountId()}setUserId(e){this.setAccountId(e)}getAppId(){return this.#a}getApiKey(){return this.#i?.apiKey||""}setAppId(e){this.#a=e}async track(e){if(R())return await new Promise((r)=>setTimeout(r,1000)),this.publish([e]);if(this.#e.push(e),this.#e.length>=20)return this.flush(),Promise.resolve();if(this.shouldEnableAutoFlush()){if(!this.#n)this.#n=h().setTimeout(()=>{this.flush(),this.#n=null},this.#u)}return Promise.resolve()}async identify(e){if(this.setAccountId(e.id),this.#i?.debug)return console.log(`[UserPath] Identify user: ${e.id}`),Promise.resolve();await fetch(this.#r.buildUrl("identify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0,credentials:"include"})}deduplicateEvents(e){let r=new Set;return e.filter((n)=>{let s=`${n.name}-${n.timestamp}`;if(r.has(s))return!1;return r.add(s),!0})}flush(){if(this.#e.length===0)return;if(this.#n)h().clearTimeout(this.#n),this.#n=null;let e=[...this.#e];this.#e=[];let r=this.deduplicateEvents(e);this.publish(r).catch((n)=>{this.#e=[...r,...this.#e].slice(0,100),console.error("Error sending analytics data:",n)})}async publish(e){if(!e||e.length===0)return Promise.resolve({success:!0,skipped:!0});let r=this.getAccountId(),n={userAgent:e[0]?.userAgent||navigator.userAgent,screenWidth:h().screen.width,screenHeight:h().screen.height,language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,events:e.map((o)=>{if(!o.timestamp)o.timestamp=new Date().toISOString();return{...o,name:o.name,properties:o.properties||{},...o.user_id||r?{user_id:o.user_id||r}:{}}})};if(this.#i?.debug){let o=n.events.map((c)=>c.name).join(", ");return console.log(`[UserPath] ${n.events.length} event(s): ${o}`),Promise.resolve({success:!0,debug:!0})}let s={"Content-Type":"application/json","X-Userpath-App":this.getAppId(),"X-Userpath-Sid":this.getSessionId()};if(r)s["X-Userpath-Aid"]=r;if(R())s.Cookie=[`_up.app=${this.getAppId()}`,`_up.sid=${this.getSessionId()}`,...r?[`_up.aid=${r}`]:[]].join(";"),s["X-Userpath-Key"]=this.getApiKey();let i=await fetch(this.#r.buildUrl("log"),{method:"POST",headers:s,body:JSON.stringify(n),credentials:"include",keepalive:!0});try{let o=await i.json();if(!i.ok)return Promise.reject(o);return o}catch(o){return Promise.reject(o)}}getSessionId(){let e=Ue("_up.sid");if(!e)e=this.generateId(),this.setSessionId(e);return e}setSessionId(e){Ce("_up.sid",e,{days:365,sameSite:"lax",domain:xe(this.#r.serverUrl)}),ae.setItem("sid",e)}generateId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}}class Wn{#r;#e;#t;#s=M.version;constructor(e){this.#r=new Xe(e),this.#e=new pt(this.#r,e),this.#t=new lt(this.#e,e),this.#s=e.version||this.#s,this.#e.init(this.#t),this.#e.setAppId(e.appId);let r=(()=>{if(e.autoTrack===void 0)return!0;if(typeof e.autoTrack==="boolean")return e.autoTrack;return e.autoTrack.errors!==!1})();if(!R()&&r)this.installErrorHandler();let n=e.debug?" [DEBUG MODE - events will be logged only]":"";console.debug(`UserPath v${dt.version} initialized${n}`)}getAppId(){return this.#e.getAppId()}setAppId(e){this.#e.setAppId(e)}installErrorHandler(){this.#t.installErrorHandler()}uninstallErrorHandler(){this.#t.uninstallErrorHandler()}trackError(e,r={}){if(!this.#t.isErrorHandlerInstalled()&&r.source!=="manual")return;this.#t.trackError(e,r)}setUserId(e){this.#e.setUserId(e)}getUserId(){return this.#e.getUserId()}async identify(e){await this.#e.identify(e)}track(e,r){if(r.sid)this.#e.setSessionId(r.sid);if(e==="page_view")return this.#t.trackPageView();else if(e==="event")return this.#t.trackCustomEvent(r.name,r.properties,{immediate:!1,url:r.url,userAgent:r.ua});else if(e==="purchase")return this.#t.trackPurchase({price:r.price,currency:r.currency,amount:r.amount,properties:r.properties},{url:r.url,userAgent:r.ua})}}export{M as DEFAULT_CONFIG,Wn as UserPath};
|