1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,678546,458074,549228,e=>{"use strict";let t;var r=e.i(911263),n=e.i(426114);let o=["token","oobCode","id_token","access_token","code","state","interaction","email","password","i","return_to","claimId","claim_id"],i=[[/(\/oauth\/(?:interaction|auth)\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/friends\/groups\/join\/member\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/friends\/groups\/join\/)(?!member(?:\/|$))[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/family-group\/member-invite\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/family-group\/invite\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/family-group\/join-member\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/family-group\/join\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/api\/og\/group\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/(?:gift)?exchange\/invite\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/cohost-invite\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/upload-receipt\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"],[/(\/contributions\/)[^/?#&"'\s\\]+/gi,"$1[REDACTED]"]],a=/\/(?:gift)?exchange\//i,l=/([?&]p=)[^&#"'\s\\]*/gi;function s(e){if(!e)return e;try{let t=e;for(let e of(t=t.replace(/([#?&](?:handoff|preview|code)=|\bgl_handoff=)[^&#"'\s\\]*/gi,"$1[REDACTED]"),o))t=t.replace(RegExp("([?&]".concat(e,"=)[^&#\"'\\s\\\\]*"),"gi"),"$1[REDACTED]");for(let[e,r]of i)t=t.replace(e,r);return a.test(t)&&(t=t.replace(l,"$1[REDACTED]")),t}catch(t){return e}}e.s(["redactUrlSecrets",0,s],458074);let c="x-session-id",u="x-session-id-ts";function d(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substring(2,11))}let f=null,g=0;function p(){var e;let t=Date.now(),n=null!=(e=r.safeLocalStorage.getItem(c))?e:f,o=Number(r.safeLocalStorage.getItem(u)||0),i=o>0?o:g,a=!n||i>0&&t-i>18e5?d():n;return a!==n&&r.safeLocalStorage.setItem(c,a),f=a,g=t,r.safeLocalStorage.setItem(u,String(t)),a}e.s(["getSessionId",0,p,"regenerateSessionId",0,function(){let e=d();return f=e,g=Date.now(),r.safeLocalStorage.setItem(c,e),r.safeLocalStorage.setItem(u,String(g)),e}],549228);let m=null,h=null,y=null;function v(e){try{return e()}catch(e){return{}}}let w=[],b=!1,E=new Map,S="error-log-queue-v1",x=0;function k(){return"u">typeof navigator&&!1===navigator.onLine}function L(e,t){if(null!=e&&"object"==typeof e)return e[t]}function I(e,t){let r=L(e,t);return"string"==typeof r?r:""}function C(e){return e.split("?")[0].split("#")[0].replace(/\/+$/,"").split("/").map(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^\d{4,}$/.test(e)||e.length>=16&&/\d/.test(e)&&/[a-z]/i.test(e)?":id":e).join("/")}function T(e){var t,r,n;let o=(null==(t=e.message)?void 0:t.toLowerCase())||"",i=("string"==typeof(null==(r=e.errorInfo)?void 0:r.name)?e.errorInfo.name:"").toLowerCase(),a=null==(n=e.errorInfo)?void 0:n.code;return o.includes("indexed database")||o.includes("indexeddb")||o.includes("unable to open database")||o.includes("database file on disk")||o.includes("database server lost")||o.includes("connection to indexed database")||o.includes("storage quota")||o.includes("quota exceeded")||o.includes("quotaexceedederror")||i.includes("quotaexceedederror")||i.includes("quota_exceeded_err")||i.includes("unknownerror")&&0===a||i.includes("unknownerror")&&o.includes("database")}function D(e){var t,r;let n=(null==(t=e.message)?void 0:t.toLowerCase())||"",o=(null==(r=e.stack)?void 0:r.toLowerCase())||"";return n.includes("chunkloaderror")||n.includes("loading chunk")||n.includes("loading css chunk")||n.includes("failed to load chunk")||n.includes("failed to fetch dynamically imported module")||o.includes("chunkloaderror")||o.includes("failed to fetch dynamically imported module")}function j(){try{let e="chunk-load-recovery-attempted";if("true"===sessionStorage.getItem(e))return!1;sessionStorage.setItem(e,"true");let t=window.__glGuard;if(t)return t.reload("chunk-error");return window.location.reload(),!0}catch(e){return!1}}t=r.safeSessionStorage.getItem("error-session-id")||"session_".concat(Date.now(),"_").concat(Math.random().toString(36).substring(2,11)),r.safeSessionStorage.setItem("error-session-id",t);let A=["criteo.com","doubleclick.net","googletagmanager.com","google-analytics.com","facebook.net","connect.facebook.net","googlesyndication.com","adservice.google.com","taboola.com","segment.com","intercom.io","zendesk.com"],_=["bat.bing.net"],O=["chrome-extension:","moz-extension:","safari-extension:","webkit-masked-url:"];function R(e){let t;if(O.some(t=>e.startsWith(t)))return!0;try{t=new URL(e).hostname.toLowerCase()}catch(e){return!1}return[...A,..._].some(e=>t===e||t.endsWith(".".concat(e)))}let N=new Set(["/user"]),$=["the goguardian app"],q=["iabjs://","navigation_performance_logger"];function U(e){let t=e.toLowerCase();return q.some(e=>t.includes(e))}function P(e){for(let t of e.split("\n")){let e=t.trim();if(e&&(/^at\s/.test(e)||/@\S+:\d+:\d+$/.test(e)||/@\S+$/.test(e)))return e}return null}let M=/^(?:Uncaught )?(?:Error: )?Object Not Found Matching Id/,W=["dispatchToBridge","logLoginFieldDetected"],z=["__firefox__","window.ethereum","SCDynimacBridge","_AutofillCallbackHandler"],F=["fban","fb_iab","instagram"],X=/maximum call stack size exceeded/i;function J(e){if(/^at\s/.test(e)){let t=/\(([^()]*)\)\s*$/.exec(e);return t?t[1]:e.replace(/^at\s+/,"")}let t=e.lastIndexOf("@");return -1===t?null:e.slice(t+1)}let B=["appendchild","insertbefore","removechild","replacechild"],H=new Set(["google.translate","cr.googleTranslate","html.translated"]);function G(e){let t=e.replace(/(?::\d+){1,2}$/,"");if(!t)return!1;if(/^(?:blob|data):/i.test(t)||/\beval\b/i.test(t)||/\.[cm]?js\b/i.test(t))return!0;let r=t;try{r=new URL(t).pathname}catch(e){}return/\.[cm]?js$/i.test(r)||r.includes("/_next/")}function V(){try{let e=globalThis.__glGuardReentry;if(!e||"object"!=typeof e)return null;
1let t="string"==typeof e.op?e.op:"?",r="number"==typeof e.depth?e.depth:-1;return"guard-reentry=".concat(t,":").concat(r)}catch(e){return null}}function K(){let e=[],t=V();t&&e.push(t);let r=e=>{let t=globalThis;for(let r of e.split("."))if(null===t||"object"!=typeof t&&"function"!=typeof t||null==(t=t[r]))return!1;return!0};try{r("google.translate")&&e.push("google.translate"),r("cr.googleTranslate")&&e.push("cr.googleTranslate"),r("__gCrWeb")&&e.push("__gCrWeb"),r("__firefox__")&&e.push("__firefox__");let t="u">typeof document?document.documentElement:null;if(t){/\btranslated-(?:ltr|rtl)\b/.test(String(t.className||""))&&e.push("html.translated");let r=t.getAttribute("lang");r&&e.push("lang=".concat(r))}}catch(e){}return e}function Q(e){let t=(null!=e?e:"").trim(),r="";if(t.startsWith("/"))r=t;else if(/^https?:\/\//i.test(t))try{let e=new URL(t);/(^|\.)googletagmanager\.com$/i.test(e.hostname)||(r=e.pathname)}catch(e){r=""}return(r=r.replace(/\/+$/,""))&&"/"!==r?"".concat(r,"/"):"/i36f/"}let Y=Q(function(){try{return"/i36f"}catch(e){return}}());function Z(e){return e.includes(Y)}let ee=/(?:Minified React error #|react\.dev\/errors\/)(?:418|423|425)\b/;function et(e){var t;return ee.test(null!=(t=e.message)?t:"")}let er=new Set(["lang","class","style","dir","data-font-profile","data-theme","data-gl-session","data-gl-hydrated"]),en=new Set(["class","style","data-open-dialogs","data-scroll-locked"]),eo=new Set(["a","div","main","section","script","noscript","template","style","link","next-route-announcer","title","meta"]);function ei(e,t){let r=[];for(let n of Array.from(e.attributes))if(t.has(n.name)||r.push(n.name.slice(0,60)),r.length>=10)break;return r}function ea(){let e={};try{let t="u">typeof document?document:null,r=null==t?void 0:t.documentElement;if(!t||!r)return e;let n=String(r.className||""),o=/\btranslated-(?:ltr|rtl)\b/.test(n),i=t.getElementsByTagName("font").length,a=i?t.querySelectorAll('font[style*="vertical-align"]').length:0;e.htmlClass=n.slice(0,200),e.htmlLang=r.getAttribute("lang"),e.translatedClass=o,e.fontNodes=i,e.translatorFontNodes=a,e.translated=o||a>0,e.htmlForeignAttributes=ei(r,er),t.body&&(e.bodyForeignAttributes=ei(t.body,en),e.unknownBodyChildren=function(e){let t=[];for(let n of Array.from(e.children)){var r;let e=n.localName;if(eo.has(e))continue;let o=n.id?"#".concat(n.id):"",i=(null==(r=n.classList)?void 0:r[0])?".".concat(n.classList[0]):"";if(t.push("".concat(e).concat(o).concat(i).slice(0,60)),t.length>=5)break}return t}(t.body))}catch(e){}return e}let el=/bot\b|crawler|spider|bingbot|googlebot|applebot|facebookexternalhit|meta-externalagent|gptbot|claudebot|perplexitybot/i,es=new Set(["Username cannot be empty as it is required for profile URLs.","First name cannot be empty.","Last name cannot be empty."]),ec=new Set([1,10,100,1e3]),eu=new Map;function ed(e){var t,r,n,o,i,a,l;et(e)&&(e.context={...e.context||{},hydration:ea()});let s=function(e){var t,r,n,o,i,a,l,s,c,u,d,f,g,p;let m,h,y,v,w,b,E,S,x,k,L;if(function(){try{return"u">typeof navigator&&el.test(navigator.userAgent||"")}catch(e){return!1}}())return"crawler";if(T(e))return"indexeddb";if(D(e))return"chunk-load";if(function(e){var t,r;let n=(null==(t=e.message)?void 0:t.toLowerCase())||"",o=("string"==typeof(null==(r=e.errorInfo)?void 0:r.name)?e.errorInfo.name:"").toLowerCase();for(let e of["failed to execute 'insertbefore' on 'node'","failed to execute 'removechild' on 'node'","the node before which the new node is to be inserted is not a child","the node to be removed is not a child of this node","notfounderror"])if(n.includes(e))return!0;return"notfounderror"===o||"hierarchyrequesterror"===o}(e))return"react-dom-race";if(function(e){var t;if(!et(e))return!1;let r=null==(t=e.context)?void 0:t.hydration;return(null==r?void 0:r.translated)===!0}(e))return"hydration-translated";if(function(e){var t,r;if(!et(e))return!1;let n=null==(t=null==(r=e.context)?void 0:r.hydration)?void 0:t.htmlForeignAttributes;return Array.isArray(n)&&n.some(e=>"string"==typeof e&&e.startsWith("data-darkreader"))}(e))return"hydration-darkreader";if(function(e){var t,r;let n=(null==(t=e.message)?void 0:t.toLowerCase())||"",o=e.stack||"";
1if("UNIMPLEMENTED"===("string"==typeof(null==(r=e.errorInfo)?void 0:r.code)?e.errorInfo.code:""))return!0;for(let e of["event capacitor","capacitorjs.com/docs","capacitordidregisterforremotenotifications","capacitor plugin","not called. visit https://capacitorjs.com"])if(n.includes(e)||o.includes(e))return!0;return!!(n.includes("plugin")&&(n.includes("not available")||n.includes("not implemented")||n.includes("not supported")))}(e))return"capacitor-plugin-warning";if(function(e){var t,r,n;let o=null!=(t=null==(r=e.errorInfo)?void 0:r.filename)?t:null==(n=e.context)?void 0:n.filename;if("string"==typeof o&&o.length>0)return U(o);let i=e.stack;if("string"!=typeof i||0===i.length)return!1;let a=P(i);return null!==a&&U(a)}(e))return"third-party-iab";let I=function(e){var t,r,n;let o=null!=(t=e.message)?t:"",i=null!=(r=e.stack)?r:"",a="string"==typeof(null==(n=e.errorInfo)?void 0:n.name)?e.errorInfo.name:"";if(M.test(o))return"third-party-safelinks";if("InvalidAccessError"===a||o.startsWith("InvalidAccessError")||o.includes("The object does not support the operation or argument.")){let e=P(i);if(null!==e&&W.some(t=>e.includes(t)))return"third-party-password-manager"}return z.some(e=>o.includes(e))||o.includes("webkit.messageHandlers")&&function(e){var t,r,n,o;if("mobile"===em())return!1;let i=null!=(t=null==(n=e.errorInfo)?void 0:n.filename)?t:null==(o=e.context)?void 0:o.filename;if("string"==typeof i&&U(i)||U(null!=(r=e.stack)?r:""))return!0;let a=("string"==typeof e.userAgent&&e.userAgent||("u">typeof navigator?navigator.userAgent:"")).toLowerCase();return F.some(e=>a.includes(e))}(e)?"third-party-browser-injected":!function(e){var t,r;if(!X.test(null!=(t=e.message)?t:"")||"mobile"===em()||null!==V())return!1;let n=null!=(r=e.stack)?r:"";if(!n)return!1;let o=[];for(let e of n.split("\n")){let t=e.trim();if(!t)continue;let r=J(t);if(null!==r){if(B.includes(function(e){let t;if(/^at\s/.test(e)){if(t=e.replace(/^at\s+/,"").replace(/\s*\(.*$/,""),/[:/\\]/.test(t))return""}else{let r=e.lastIndexOf("@");if(-1===r)return"";t=e.slice(0,r)}return t.replace(/^async\s+/,"").split(".").pop().trim().toLowerCase()}(t)))return!1;o.push(r)}}return!(o.length<8||o.some(G))&&K().some(e=>H.has(e))}(e)?null:"third-party-injected-recursion"}(e);if(I)return I;let C=function(e){var t,r,n;let o=null!=(t=null==(r=e.errorInfo)?void 0:r.filename)?t:null==(n=e.context)?void 0:n.filename;if("string"==typeof o&&Z(o))return"third-party-gtm-gateway";let i=e.stack;if("string"!=typeof i||0===i.length)return null;let a=P(i);return null!==a&&Z(a)?"third-party-gtm-gateway":null}(e);return C?C:function(e){var t,r,n;let o=e.stack||"",i=e.message||"",a=null!=(t=null==(r=e.errorInfo)?void 0:r.filename)?t:null==(n=e.context)?void 0:n.filename;if("string"==typeof a&&a.length>0){if(R(a))return!0}else{let e=P(o),t=null===e?null:J(e);if(null!==t&&R(t))return!0}for(let e of[...A,...O])if(o.includes(e)||i.includes(e))return!0;for(let e of["CONFIG_JS_CALLBACK","ResizeObserver loop completed","ResizeObserver loop limit exceeded","adsbygoogle","googletag","_gaq","fbq","gtag"])if(i.includes(e))return!0;return!!(/^script:\s*https?:/i.test(i)||/^could not create user after \d+ tries$/i.test(i)&&null===P(o)&&!a)}(e)?"third-party":function(e){var t,r;let n=null==(t=e.errorInfo)?void 0:t.statusCode;if("number"!=typeof n||n<400)return!1;let o=null==(r=e.errorInfo)?void 0:r.responseData;if("string"!=typeof o||0===o.length)return!1;let i=o.toLowerCase();return $.some(e=>i.includes(e))}(e)?"network-filter":(m=(null==(t=e.message)?void 0:t.toLowerCase())||"",h=("string"==typeof(null==(r=e.errorInfo)?void 0:r.name)?e.errorInfo.name:"").toLowerCase(),m.includes("share canceled")||m.includes("share cancelled")||m.includes("canceled the sign-in")||m.includes("cancelled the sign-in")||m.includes("canceled the authorization attempt")||m.includes("cancelled the authorization attempt")||m.includes("canceledlogin")||m.includes("no credentials available")||m.includes("cancelled by user")||m.includes("canceled by user")||m.includes("from one tap")&&m.includes(": 16:")||"aborterror"===h||m.includes("the operation was aborted"))?"user-cancellation":(y=(null==(n=e.message)?void 0:n.toLowerCase())||"",v="string"==typeof(null==(o=e.errorInfo)?void 0:o.code)?e.errorInfo.code:"",new Set(["auth/popup-blocked","auth/popup-closed-by-user","auth/cancelled-popup-request","auth/user-cancelled","auth/wrong-password","auth/invalid-credential","auth/invalid-login-credentials","auth/user-not-found"]).has(v)||y.startsWith("popup was blocked")||"sign-in was cancelled."===y||"sign-in was canceled."===y||"another sign-in is already in progress."===y||0)?"expected-auth-flow":(w=(null==(i=e.message)?void 0:i.toLowerCase())||"","auth/network-request-failed"===(b="string"==typeof(null==(a=e.errorInfo)?void 0:a.code)?e.errorInfo.code:"")||w.includes("a network error")&&w.includes("firebase")||"installations/app-offline"===b||w.includes("installations/app-offline"))?"firebase-network":(e.message||"").includes("Firebase auth initialization timed out")?"firebase-auth-init-timeout":(E=(null==(l=e.message)?void 0:l.toLowerCase())||"").includes("access is denied for this document")&&(E.includes("sessionstorage")||E.includes("localstorage")||E.includes("cookie"))?"storage-access-denied":(S=(null==(s=e.message)?void 0:s.toLowerCase())||"",x=("string"==typeof(null==(c=e.errorInfo)?void 0:c.name)?e.errorInfo.name:"").toLowerCase(),k="string"==typeof(null==(u=e.errorInfo)?void 0:u.code)?e.errorInfo.code:"",L=(null==(d=e.errorInfo)?void 0:d.statusCode)===void 0||(null==(f=e.errorInfo)?void 0:f.statusCode)===null,"axioserror"===x&&"ERR_NETWORK"===k||"axioserror"===x&&"ECONNABORTED"===k||"axioserror"===x&&"network error"===S||"axioserror"===x&&""===k&&L&&S.includes("network")||"failed to fetch"===S||S.startsWith("networkerror when attempting to fetch resource")||"typeerror"===x&&"load failed"===S||S.includes("network error (such as timeout")||"axioserror"===x&&S.includes("timeout exceeded")||"axioserror"===x&&S.includes("timeout of")||0)?"client-network":(null==(g=e.errorInfo)?void 0:g.name)==="NonRetriableError"?"intermediary-stub":function(e){var t,r,n,o;if(404!==(null==(t=e.context)?void 0:t.statusCode))return!1;let i=null==(r=e.context)?void 0:r.method;if("string"!=typeof i||"GET"!==i.toUpperCase())return!1;let a=(null==(n=e.context)?void 0:n.path)||(null==(o=e.context)?void 0:o.endpoint);if("string"==typeof a){let e=a.split("?")[0].replace(/\/+$/,"");if(N.has(e))return!1}return!0}(e)?"expected-not-found":es.has(null!=(p=e.message)?p:"")?"expected-profile-validation":null}(e);if(s){let t=null==(r=e.context)?void 0:r.severity;if(e.severity="low",e.context={...e.context||{},severity:"low",downgradeReason:s},"string"==typeof t&&"low"!==t&&(e.context.severityBeforeDowngrade=t),"client-network"===s){let t,r,s,c,u=(r="string"==typeof(t=null!=(n=null==(a=e.context)?void 0:a.path)?n:null==(l=e.context)?void 0:l.endpoint)?C(t):"(no-endpoint)|".concat((null!=(o=e.message)?o:"").slice(0,80)),s="".concat(r,"|client-network"),eu.size>=300&&!eu.has(s)&&eu.clear(),c=(null!=(i=eu.get(s))?i:0)+1,eu.set(s,c),c);return!!ec.has(u)&&(e.context={...e.context,occurrence:u},!0)}}X.test(null!=(t=e.message)?t:"")&&(e.context={...e.context||{},injectedEngines:K()});let c=function(e){let t=function(e){var t,r,n,o;let i=null==(r=e.context)?void 0:r.statusCode,a=null!=(t=null==(n=e.context)?void 0:n.path)?t:null==(o=e.context)?void 0:o.endpoint;if("number"==typeof i||"string"==typeof a){let t="string"==typeof a?C(a):"";return"".concat(e.message,"_").concat(e.errorType,"_").concat("number"==typeof i?i:"","_").concat(t)}return"".concat(e.message,"_").concat(e.errorType,"_").concat(e.url)}(e),r=Date.now(),n=E.get(t);if(!n)return E.set(t,{count:1,firstSeen:r,lastSeen:r,lastLogged:r}),function(e){if(E.size<=100)return;let t=e-1e4;for(let[e,r]of E.entries())r.lastSeen<t&&E.delete(e)}(r),{shouldLog:!0};if(r-n.lastLogged<5e3)return n.count+=1,n.lastSeen=r,{shouldLog:!1};let o=n.count;return E.set(t,{count:1,firstSeen:r,lastSeen:r,lastLogged:r}),{shouldLog:!0,supersedeCount:o>1?o:void 0}}(e);return!!c.shouldLog&&(c.supersedeCount&&(e.context={...e.context||{},previousBurstCount:c.supersedeCount}),!0)}function ef(e){try{return JSON.stringify(e,null,2)}catch(t){try{let t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r},2)}catch(t){if(null!=e&&"object"==typeof e)return"Object: ".concat(Object.keys(e).join(", "));return"Value: ".concat(String(e))}}}function eg(e){return Object.keys(e).filter(t=>void 0!==e[t]&&null!==e[t])}function ep(e,t,n){let o,i;if(null==e)o="Unknown error (no error details provided)";else if("string"==typeof e)o=e.trim()||"Unknown error";else if(e instanceof Error)o=e.message;else if("object"==typeof e)if(e.message&&"string"==typeof e.message)o=e.message;else{let t=eg(e);if(0===t.length)o="Empty error object (no error details provided)";else if(e.error||e.reason||e.data){let t=e.error||e.reason||e.data;o=("object"==typeof t&&null!==t?I(t,"message"):"")||ef(t)}else if(e.status||e.statusText)o="HTTP Error: ".concat(e.status||""," ").concat(e.statusText||ef(e));else if(e.code)o="Error Code: ".concat(e.code," - ").concat(ef(e));else{let r=ef(e);o="[object Object]"===r?"Object error with keys: ".concat(t.join(", ")):r}}else o=String(e)||"Unknown error";let a=I(e,"stack");try{let e=r.safeLocalStorage.getItem("user");if(e){let t=JSON.parse(e),r=L(t,"state"),n=L(r,"user"),o=L(r,"userProfile"),a=L(n,"uid"),l=L(o,"user_id");"string"==typeof a?i=a:"string"==typeof l&&(i=l)}}catch(e){}return{message:o,stack:a,errorInfo:{name:"object"==typeof e&&null!==e?e.name:void 0,code:"object"==typeof e&&null!==e?e.code:void 0,...n},userAgent:"u">typeof navigator?navigator.userAgent:"unknown",url:s(window.location.href),timestamp:Date.now(),errorType:t,userId:i,sessionId:p(),severity:function(e,t,r){let n=null==r?void 0:r.severity;if("low"===n||"medium"===n||"high"===n||"critical"===n)return n;let o=I(e,"message").toLowerCase();return"unhandledrejection"===t||o.includes("network error")||o.includes("auth")||o.includes("firebase")||o.includes("database")?"critical":o.includes("failed")||o.includes("error")||o.includes("cannot")||X.test(o)?"high":o.includes("warning")||o.includes("deprecated")?"medium":"low"}(e,t,n),context:n}}function em(){var e,t;return(null==(t=globalThis.chrome)||null==(e=t.runtime)?void 0:e.id)?"extension":(0,n.isPlatform)("capacitor")?"mobile":"web"}let eh=0;function ey(e){let t;do{var r,n;let e=null==(n=globalThis.crypto)||null==(r=n.randomUUID)?void 0:r.call(n);t=e?"log_".concat(e):"log_".concat(Date.now(),"_").concat(eh++,"_").concat(Math.random().toString(36).slice(2))}while(null==e?void 0:e.has(t))return null==e||e.add(t),t}function ev(){if(!("localStorage"in window))return{entries:[],changed:!1};try{let e=r.safeLocalStorage.getItem(S);if(!e)return{entries:[],changed:!1};let t=JSON.parse(e);if(!Array.isArray(t))return{entries:[],changed:!0};let n=new Set,o=[],i=!1;for(let e of t){if("object"!=typeof e||null===e||"string"!=typeof e.url||"string"!=typeof e.body||"number"!=typeof e.ts||!Number.isFinite(e.ts)){i=!0;continue}let t=e.url,r=e.body,a=e.ts,l=e.id;"string"!=typeof l||0===l.length||n.has(l)?(l=ey(n),i=!0):n.add(l);let s=e.attempts,c="number"==typeof s&&Number.isFinite(s)&&s>=0?Math.floor(s):1;c!==s&&(i=!0),o.push({id:l,url:t,body:r,ts:a,attempts:c})}return{entries:o,changed:i}}catch(e){return{entries:[],changed:!0}}}function ew(e){if("localStorage"in window)try{0===e.length?r.safeLocalStorage.removeItem(S):r.safeLocalStorage.setItem(S,JSON.stringify(e))}catch(e){try{r.safeLocalStorage.removeItem(S)}catch(e){}}}async function eb(e){try{if("function"!=typeof e.text)return!1;let t=await e.text(),r=JSON.parse(t);return!!r&&"object"==typeof r&&400===r.statusCode}catch(e){return!1}}async function eE(e,t,r){let n={"Content-Type":"application/json"};r&&(n["x-access-token"]=r);let o=p();if(o&&(n["X-Session-Id"]=o),h){let e=v(h);e["X-Platform"]&&(n["X-Platform"]=e["X-Platform"]),e["X-Device-Id"]&&(n["X-Device-Id"]=e["X-Device-Id"]),e["X-App-Version"]&&(n["X-App-Version"]=e["X-App-Version"])}let i=new AbortController,a=setTimeout(()=>i.abort(),5e3);try{let r=await fetch(e,{method:"POST",headers:n,body:t,keepalive:!0,signal:i.signal});if(r.ok)return"sent";let o="number"==typeof r.status?r.status:0;if(400===o&&await eb(r))return"rejected";return"retry"}catch(e){return"retry"}finally{clearTimeout(a)}}let eS=null,ex=Promise.resolve();function ek(){return"u"<typeof navigator?void 0:navigator.locks}function eL(e){let t=ex.then(e,e);return ex=t.then(()=>void 0,()=>void 0),t}async function eI(e){let t=ek();if(!t)return eL(e);let r=!1;try{return await t.request("giftlist-error-log-queue-mutation",async()=>(r=!0,e()))}catch(t){if(r)throw t;return eL(e)}}async function eC(e,t){await eI(()=>{let{entries:r}=ev();if(r.some(t=>t.id===e.id))return void console.warn("[ErrorLogger] Duplicate queue id; entry already pending");for(r.push({...e,attempts:t});r.length>20;)r.shift(),x++;ew(r)})}function eT(){return eS||("localStorage"in window?eS=(async()=>{try{let e=ek();e?await e.request("giftlist-error-log-queue-flush",{ifAvailable:!0},async e=>{e&&await eD()}):await eD()}finally{eS=null}})():Promise.resolve())}async function eD(){let e=await eI(()=>{let{entries:e,changed:t}=ev(),r=Date.now(),n=e.filter(e=>r-e.ts<=6048e5);return(t||n.length!==e.length)&&ew(n),n});if(0===e.length||k())return;let t=new Set,r=new Set;for(let n of e){r.add(n.id);let e=await eE(n.url,function(e,t){try{let r=JSON.parse(e);if(!r||"object"!=typeof r||Array.isArray(r))return e;return JSON.stringify({...r,clientLogAttempt:t})}catch(t){return e}}(n.body,Math.max(n.attempts+1,2)),null);"rejected"===e&&x++,"retry"!==e&&t.add(n.id)}await eI(()=>{let{entries:e}=ev(),n=[];for(let o of e){if(t.has(o.id))continue;if(!r.has(o.id)){n.push(o);continue}let e=o.attempts+1;if(e>=8){x++,console.warn("[ErrorLogger] Giving up on a queued log after ".concat(e," attempts"));continue}n.push({...o,attempts:e})}ew(n.slice(-20))})}async function ej(e){var t,n,o,i;let a="string"==typeof(null==(t=e.context)?void 0:t.endpoint)?e.context.endpoint:"string"==typeof(null==(n=e.context)?void 0:n.path)?e.context.path:void 0,l="number"==typeof(null==(o=e.context)?void 0:o.statusCode)?e.context.statusCode:void 0,c="string"==typeof(null==(i=e.context)?void 0:i.method)?e.context.method.toUpperCase():void 0,u=h?v(h):{},d={...e.context||{}};for(let e of["path","endpoint","url"])"string"==typeof d[e]&&(d[e]=s(d[e]));let f=ey(),g=x;x=0;let p={type:function(e){switch(e){case"critical":case"high":return"error";
1case"medium":return"warning";case"low":return"info"}}(e.severity),source:em(),context:JSON.stringify({message:s(e.message),stack:e.stack,errorInfo:e.errorInfo,errorType:e.errorType,userId:e.userId,sessionId:e.sessionId,timestamp:e.timestamp,userAgent:e.userAgent,...g>0?{abandonedLogs:g}:{},...d}),path:s(a||e.url),code:l,method:c,platform:u["X-Platform"],deviceId:u["X-Device-Id"],appVersion:u["X-App-Version"],buildSha:"3819bb45f6ecd21ff80c6191e4784ac8c1c359fb",clientLogId:f},w=m||"/api",b="".concat(w,"/settings/log"),E=JSON.stringify(p),S=function(){if(y)try{let e=y();if("string"==typeof e&&e.length>0)return e}catch(e){}if(!("localStorage"in window))return null;try{for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t&&t.startsWith("firebase:authUser:")){let e=r.safeLocalStorage.getItem(t);if(e){let t=JSON.parse(e),r=L(t,"stsTokenManager"),n=L(r,"accessToken");if("string"==typeof n)return n}}}}catch(e){}return null}(),I=await eE(b,E,S);if("sent"===I)return void console.debug("[ErrorLogger] Error logged successfully");if("rejected"===I){x+=g+1,console.warn("[ErrorLogger] Send rejected by server; not queued");return}await eC({id:f,url:b,body:E,ts:Date.now()},+!k()),console.warn("[ErrorLogger] Send failed; queued for retry")}async function eA(e){for(let t of w)try{await t(e)}catch(t){console.error("[ErrorLogger] Subscriber error:",t),b||(b=!0,ej({message:"Error subscriber threw: ".concat(t instanceof Error?t.message:String(t)),stack:t instanceof Error?t.stack:void 0,userAgent:e.userAgent,url:e.url,timestamp:Date.now(),errorType:"telemetry-subscriber-failure",severity:"high",context:{component:"errorLogger",operation:"notifySubscribers",subscriberCount:w.length,triggeringErrorType:e.errorType}}).catch(()=>{}))}}async function e_(e,t){try{if("object"==typeof e&&null!==e&&!(e instanceof Error)&&"string"!=typeof e&&0===eg(e).length)return void console.debug("[ErrorLogger] Skipping empty error object");let r=ep(e,"manual",t);if(!ed(r))return;await eA(r),await ej(r)}catch(e){}}let eO=new Set(["AbortError","TimeoutError","NotAllowedError"]);function eR(e){return"u">typeof DOMException&&e instanceof DOMException}function eN(e){var t;let r,n={},o="string"==typeof e.type&&e.type?e.type:"unknown";n.eventType=o,"boolean"==typeof e.isTrusted&&(n.isTrusted=e.isTrusted);try{r=e.target}catch(e){r=void 0}if(r&&"object"==typeof r){let e,t=r,o="string"==typeof t.tagName?t.tagName:void 0;if(o)n.targetTagName=o;else if(r===window)n.targetTagName="window";else{let e=r.constructor;e&&"string"==typeof e.name&&e.name&&(n.targetType=e.name)}let i="string"==typeof t.src&&t.src?t.src:"string"==typeof t.href&&t.href?t.href:void 0,a=function(e){if("string"==typeof e&&e)try{let t=window.location.href;return new URL(e,t).host||void 0}catch(e){return}}(i);if(a&&(n.targetHost=a),a&&!("firebasestorage.googleapis.com"===(e=a.toLowerCase())||"storage.googleapis.com"===e||e.endsWith(".storage.googleapis.com")||e.endsWith(".firebasestorage.app")||e.endsWith(".appspot.com")))try{let e=window.location.href,t=new URL(i,e);n.targetPath=s(t.pathname).slice(0,160)}catch(e){}}let i=[null!=(t=n.targetTagName)?t:n.targetType,n.targetHost].filter(Boolean).join(" ");return{message:"Promise rejected with a DOM Event (type=".concat(o).concat(i?", target=".concat(i):"",")"),detail:n}}e.s(["clearErrorTracking",0,function(){E.clear()},"configureErrorLogging",0,function(e){e.apiUrl&&(m=e.apiUrl),e.getIdentityHeaders&&(h=e.getIdentityHeaders)},"describeDomEventReason",0,eN,"describeHydrationEnvironment",0,ea,"describeInjectedEngines",0,K,"flushQueuedLogs",0,function(){return eT()},"getErrorStats",0,function(){let e=Date.now(),r=0;for(let t of E.values())e-t.lastSeen<5e3&&r++;return{totalErrors:E.size,recentErrors:r,sessionId:t}},"logError",0,e_,"resolveGtmGatewayPath",0,Q,"setupErrorLogging",0,function(e){if((null==e?void 0:e.apiUrl)&&(m=e.apiUrl),(null==e?void 0:e.getIdentityHeaders)&&(h=e.getIdentityHeaders),(null==e?void 0:e.getAuthToken)&&(y=e.getAuthToken),!window.__errorLoggingInitialized){if(window.__errorLoggingInitialized=!0,eT().catch(()=>{}),window.addEventListener("online",()=>{eT().catch(()=>{})}),window.addEventListener("unhandledrejection",async e=>{var t;if(void 0===e.reason||null===e.reason)return void console.warn("[ErrorLogger] Skipping unhandled rejection with undefined/null reason");let r=function(e){if("object"!=typeof e||null===e)return!1;try{return Object.values(e).every(e=>null==e)}catch(e){return!1}}(e.reason);if("object"==typeof(t=e.reason)&&null!==t&&!(t instanceof Error)&&("u">typeof Event&&t instanceof Event||"string"==typeof t.type&&"boolean"==typeof t.isTrusted&&"target"in t)){let{message:t,detail
1:n}=eN(e.reason),o=ep(t,"unhandledrejection",{severity:"medium",domEventReason:!0,...n,...r?{formerlySkipped:!0}:{}});if(!ed(o))return;console.warn("[ErrorLogger] Unhandled rejection (DOM Event):",o),await eA(o),await ej(o);return}if(r&&!(e.reason instanceof Error)&&!eR(e.reason))return void console.warn("[ErrorLogger] Skipping unhandled rejection with empty object reason");let n=ep(e.reason,"unhandledrejection",{promise:e.promise?String(e.promise):"unknown promise",...function(e){if(eR(e)){let t=e.name||"DOMException";return{severity:eO.has(t)?"low":"medium",domExceptionName:t}}if(!(e instanceof Error))return{};if(function(e){if(!(e instanceof Error))return!1;let t=globalThis.Capacitor;return"function"==typeof(null==t?void 0:t.Exception)&&e instanceof t.Exception||Object.prototype.hasOwnProperty.call(e,"code")&&Object.prototype.hasOwnProperty.call(e,"data")}(e)){let t=e.code;if(null==t||""===t)return{severity:"medium",capacitorException:!0}}return{}}(e.reason),...r?{formerlySkipped:!0}:{}});if(T(n)){ed(n)&&(eA(n).catch(()=>{}),ej(n).catch(()=>{})),e.preventDefault();return}if(D(n)){ed(n)&&(eA(n).catch(()=>{}),ej(n).catch(()=>{})),j()&&e.preventDefault();return}ed(n)&&(console.error("[ErrorLogger] Unhandled rejection:",n),await eA(n),await ej(n))}),window.addEventListener("error",async e=>{let t=ep(e.error||e.message,"error",{filename:e.filename,lineno:e.lineno,colno:e.colno});if(function(e){var t,r,n;let o,i;if(o=(null==(r=e.message)?void 0:r.toLowerCase())||"",i=("string"==typeof(null==(n=e.errorInfo)?void 0:n.name)?e.errorInfo.name:"").toLowerCase(),!(o.includes("quota exceeded")||o.includes("quotaexceedederror")||i.includes("quotaexceedederror")||i.includes("quota_exceeded_err")||o.includes("storage quota")))return!1;let a=(null==(t=e.message)?void 0:t.toLowerCase())||"",l=e.stack||"";return a.includes("on 'storage'")||a.includes("setitem")||/\bsetItem\b/.test(l)||/localStorage|sessionStorage/.test(l)}(t)&&(console.debug("[ErrorLogger] QuotaExceededError detected, cleaning localStorage"),"localStorage"in window))try{let e=["user","error-session-id",S,"firebase:","ally-supports-cache"],t=[];for(let r=0;r<window.localStorage.length;r++){let n=window.localStorage.key(r);n&&(e.some(e=>n.startsWith(e))||t.push(n))}console.log("[ErrorLogger] Cleaning localStorage: removing ".concat(t.length," items")),t.forEach(e=>{try{r.safeLocalStorage.removeItem(e)}catch(t){console.warn("[ErrorLogger] Failed to remove localStorage key: ".concat(e))}}),console.log("[ErrorLogger] localStorage cleaned successfully")}catch(e){console.error("[ErrorLogger] Failed to clean localStorage:",e)}if(T(t)){ed(t)&&(eA(t).catch(()=>{}),ej(t).catch(()=>{})),e.preventDefault();return}if(D(t)){ed(t)&&(eA(t).catch(()=>{}),ej(t).catch(()=>{})),j()&&e.preventDefault();return}ed(t)&&(console.warn("[ErrorLogger] Error:",t),await eA(t),await ej(t))}),window.React){let e=console.error;console.error=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let o=r[0];if("string"==typeof o&&(o.includes("React")||o.includes("component"))){let e=ep(Error(o),"react-error",{args:r.slice(1)});ed(e)&&(eA(e).catch(()=>{}),ej(e).catch(()=>{}))}e.apply(console,r)}}console.log("[ErrorLogger] Error logging initialized")}},"subscribeToErrors",0,function(e){return w.push(e),()=>{let t=w.indexOf(e);t>-1&&w.splice(t,1)}}],678546)},426114,e=>{"use strict";function t(e){let t=window.navigator.userAgent.toLowerCase();switch(e){case"capacitor":var r,n;return!!(null==(n=window.Capacitor)||null==(r=n.isNativePlatform)?void 0:r.call(n));case"mobile":return/android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(t);case"ios":return/ipad|iphone|ipod/.test(t)&&!window.MSStream;case"android":return/android/.test(t);case"desktop":return!/android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(t);default:return!1}}e.s(["getScrollContainerId",0,function(){return t("capacitor")?"page-content":"main-content"},"isPlatform",0,t])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.