LavaPack.loadBundle([[996,{_process:7415},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.Sha1=r.RANDOM_FACTOR=r.MAX_VALUE_MILLIS=r.FirebaseError=r.ErrorFactory=r.Deferred=r.DecodeBase64StringError=r.CONSTANTS=void 0,r.areCookiesEnabled=function(){if("undefined"==typeof navigator||!navigator.cookieEnabled)return!1;return!0}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,r.assertionError=r.assert=void 0,r.async=function(e,t){return(...r)=>{Promise.resolve(!0).then(()=>{e(...r)}).catch(e=>{t&&t(e)})}},r.base64urlEncodeWithoutPadding=r.base64Encode=r.base64Decode=r.base64=void 0,r.calculateBackoffMillis=function(e,t=N,r=I){const n=t*Math.pow(r,e),a=Math.round(k*n*(Math.random()-.5)*2);return Math.min(P,n+a)}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,r.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.createMockUserToken=function(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const r=t||"demo-project",n=e.iat||0,a=e.sub||e.user_id;if(!a)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:n,exp:n+3600,auth_time:n,sub:a,user_id:a,firebase:{sign_in_provider:"custom",identities:{}}},e);return[l(JSON.stringify({alg:"none",type:"JWT"})),l(JSON.stringify(o)),""].join(".")}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,r.createSubscribe=function(e,t){const r=new w(e,t);return r.subscribe.bind(r)},r.decode=void 0,r.deepCopy=function(e){return u(undefined,e)},r.deepEqual=function e(t,r){if(t===r)return!0;const n=Object.keys(t),a=Object.keys(r);for(const o of n){if(!a.includes(o))return!1;const n=t[o],i=r[o];if(v(n)&&v(i)){if(!e(n,i))return!1}else if(n!==i)return!1}for(const e of a)if(!n.includes(e))return!1;return!0},r.deepExtend=u,r.errorPrefix=O,r.extractQuerystring=function(e){const t=e.indexOf("?");if(!t)return"";const r=e.indexOf("#",t);return e.substring(t,r>0?r:undefined)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,r.getExperimentalSetting=r.getDefaults=r.getDefaultEmulatorHostnameAndPort=r.getDefaultEmulatorHost=r.getDefaultAppConfig=void 0,r.getGlobal=p,r.getModularInstance=
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function(e){return e&&e._delegate?e._delegate:e},r.getUA=m,r.isAdmin=void 0,r.isBrowser=function(){return"undefined"!=typeof window||S()},r.isBrowserExtension=function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:undefined;return"object"==typeof e&&e.id!==undefined},r.isCloudflareWorker=function(){return"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent},r.isElectron=function(){return m().indexOf("Electron/")>=0},r.isEmpty=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},r.isIE=function(){const e=m();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0},r.isIndexedDBAvailable=function(){try{return"object"==typeof indexedDB}catch(e){return!1}},r.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(m())},r.isNode=E,r.isNodeSdk=function(){return!0===t.NODE_CLIENT||!0===t.NODE_ADMIN},r.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},r.isSafari=function(){return!E()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")},r.isUWP=function(){return m().indexOf("MSAppHost/")>=0},r.isValidTimestamp=r.isValidFormat=void 0,r.isWebWorker=S,r.issuedAtTime=void 0,r.jsonEval=T,r.map=function(e,t,r){const n={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=t.call(r,e[a],a,e));return n},r.ordinal=function(e){if(!Number.isFinite(e))return`${e}`;return e+function(e){e=Math.abs(e);const t=e%100;if(t>=10&&t<=20)return"th";const r=e%10;if(1===r)return"st";if(2===r)return"nd";if(3===r)return"rd";return"th"}(e)},r.promiseWithTimeout=
/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function(e,t=2e3){const r=new b;return setTimeout(()=>r.reject("timeout!"),t),e.then(r.resolve,r.reject),r.promise}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,r.querystring=function(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach(e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""},r.querystringDecode=function(e){const t={},r=e.replace(/^\?/,"").split("&");return r.forEach(e=>{if(e){const[r,n]=e.split("=");t[decodeURIComponent(r)]=decodeURIComponent(n)}}),t},r.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:undefined},r.stringToByteArray=r.stringLength=void 0,r.stringify=function(e){return JSON.stringify(e)}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,r.validateArgCount=void 0,r.validateCallback=function(e,t,r,n){if(n&&!r)return;if("function"!=typeof r)throw new Error(O(e,t)+"must be a valid function.")},r.validateContextObject=function(e,t,r,n){if(n&&!r)return;if("object"!=typeof r||null===r)throw new Error(O(e,t)+"must be a valid context object.")}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */,r.validateIndexedDBOpenable=function(){return new Promise((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(n);a.onsuccess=()=>{a.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},a.onupgradeneeded=()=>{r=!1},a.onerror=()=>{var e;t((null===(e=a.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})},r.validateNamespace=function(e,t,r){if(r&&!t)return;if("string"!=typeof t)throw new Error(O(e,"namespace")+"must be a valid firebase namespace.")};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const t=r.CONSTANTS={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},n=function(e,t){if(!e)throw a(t)};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */r.assert=n;const a=function(e){return new Error("Firebase Database ("+t.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */r.assertionError=a;const o=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);a<128?t[r++]=a:a<2048?(t[r++]=a>>6|192,t[r++]=63&a|128):55296==(64512&a)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++n)),t[r++]=a>>18|240,t[r++]=a>>12&63|128,t[r++]=a>>6&63|128,t[r++]=63&a|128):(t[r++]=a>>12|224,t[r++]=a>>6&63|128,t[r++]=63&a|128)}return t},i=r.base64={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t<e.length;t+=3){const a=e[t],o=t+1<e.length,i=o?e[t+1]:0,s=t+2<e.length,c=s?e[t+2]:0,l=a>>2,d=(3&a)<<4|i>>4;let u=(15&i)<<2|c>>6,f=63&c;s||(f=64,o||(u=64)),n.push(r[l],r[d],r[u],r[f])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(o(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const a=e[r++];if(a<128)t[n++]=String.fromCharCode(a);else if(a>191&&a<224){const o=e[r++];t[n++]=String.fromCharCode((31&a)<<6|63&o)}else if(a>239&&a<365){const o=((7&a)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{const o=e[r++],i=e[r++];t[n++]=String.fromCharCode((15&a)<<12|(63&o)<<6|63&i)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t<e.length;){const a=r[e.charAt(t++)],o=t<e.length?r[e.charAt(t)]:0;++t;const i=t<e.length?r[e.charAt(t)]:64;++t;const c=t<e.length?r[e.charAt(t)]:64;if(++t,null==a||null==o||null==i||null==c)throw new s;const l=a<<2|o>>4;if(n.push(l),64!==i){const e=o<<4&240|i>>2;if(n.push(e),64!==c){const e=i<<6&192|c;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class s extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}r.DecodeBase64StringError=s;const c=function(e){const t=o(e);return i.encodeByteArray(t,!0)};r.base64Encode=c;const l=function(e){return c(e).replace(/\./g,"")};r.base64urlEncodeWithoutPadding=l;const d=function(e){try{return i.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function u(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:e===undefined&&(e={});break;case Array:e=[];break;default:return t}for(const r in t)t.hasOwnProperty(r)&&f(r)&&(e[r]=u(e[r],t[r]));return e}function f(e){return"__proto__"!==e}
/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function p(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}
/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */r.base64Decode=d;const h=()=>{try{return p().__FIREBASE_DEFAULTS__||(()=>{if(void 0===e||void 0===e.env)return})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&d(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}};r.getDefaults=h;const g=e=>{var t,r;return null===(r=null===(t=h())||void 0===t?void 0:t.emulatorHosts)||void 0===r?void 0:r[e]};r.getDefaultEmulatorHost=g;r.getDefaultEmulatorHostnameAndPort=e=>{const t=g(e);if(!t)return undefined;const r=t.lastIndexOf(":");if(r<=0||r+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const n=parseInt(t.substring(r+1),10);return"["===t[0]?[t.substring(1,r-1),n]:[t.substring(0,r),n]};r.getDefaultAppConfig=()=>{var e;return null===(e=h())||void 0===e?void 0:e.config};
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
r.getExperimentalSetting=e=>{var t;return null===(t=h())||void 0===t?void 0:t[`_${e}`]};class b{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,r))}}}
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function m(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function E(){var e;const t=null===(e=h())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(e){return!1}}function S(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}r.Deferred=b;class y extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,y.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,_.prototype.create)}}r.FirebaseError=y;class _{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},n=`${this.service}/${e}`,a=this.errors[e],o=a?function(e,t){return e.replace(M,(e,r)=>{const n=t[r];return null!=n?String(n):`<${r}?>`})}(a,r):"Error",i=`${this.serviceName}: ${o} (${n}).`;return new y(n,i,r)}}r.ErrorFactory=_;const M=/\{\$([^}]+)}/g;
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function T(e){return JSON.parse(e)}const A=function(e){let t={},r={},n={},a="";try{const o=e.split(".");t=T(d(o[0])||""),r=T(d(o[1])||""),a=o[2],n=r.d||{},delete r.d}catch(e){}return{header:t,claims:r,data:n,signature:a}};r.decode=A;r.isValidTimestamp=function(e){const t=A(e).claims,r=Math.floor((new Date).getTime()/1e3);let n=0,a=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?n=t.nbf:t.hasOwnProperty("iat")&&(n=t.iat),a=t.hasOwnProperty("exp")?t.exp:n+86400),!!r&&!!n&&!!a&&r>=n&&r<=a};r.issuedAtTime=function(e){const t=A(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null};r.isValidFormat=function(e){const t=A(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")};function v(e){return null!==e&&"object"==typeof e}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
r.isAdmin=function(e){const t=A(e).claims;return"object"==typeof t&&!0===t.admin};r.Sha1=class{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,t){t||(t=0);const r=this.W_;if("string"==typeof e)for(let n=0;n<16;n++)r[n]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let n=0;n<16;n++)r[n]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let e=16;e<80;e++){const t=r[e-3]^r[e-8]^r[e-14]^r[e-16];r[e]=4294967295&(t<<1|t>>>31)}let n,a,o=this.chain_[0],i=this.chain_[1],s=this.chain_[2],c=this.chain_[3],l=this.chain_[4];for(let e=0;e<80;e++){e<40?e<20?(n=c^i&(s^c),a=1518500249):(n=i^s^c,a=1859775393):e<60?(n=i&s|c&(i|s),a=2400959708):(n=i^s^c,a=3395469782);const t=(o<<5|o>>>27)+n+l+a+r[e]&4294967295;l=c,c=s,s=4294967295&(i<<30|i>>>2),i=o,o=t}this.chain_[0]=this.chain_[0]+o&4294967295,this.chain_[1]=this.chain_[1]+i&4294967295,this.chain_[2]=this.chain_[2]+s&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+l&4294967295}update(e,t){if(null==e)return;t===undefined&&(t=e.length);const r=t-this.blockSize;let n=0;const a=this.buf_;let o=this.inbuf_;for(;n<t;){if(0===o)for(;n<=r;)this.compress_(e,n),n+=this.blockSize;if("string"==typeof e){for(;n<t;)if(a[o]=e.charCodeAt(n),++o,++n,o===this.blockSize){this.compress_(a),o=0;break}}else for(;n<t;)if(a[o]=e[n],++o,++n,o===this.blockSize){this.compress_(a),o=0;break}}this.inbuf_=o,this.total_+=t}digest(){const e=[];let t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let e=this.blockSize-1;e>=56;e--)this.buf_[e]=255&t,t/=256;this.compress_(this.buf_);let r=0;for(let t=0;t<5;t++)for(let n=24;n>=0;n-=8)e[r]=this.chain_[t]>>n&255,++r;return e}};class w{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,r){let n;if(e===undefined&&t===undefined&&r===undefined)throw new Error("Missing Observer.");n=function(e,t){if("object"!=typeof e||null===e)return!1;for(const r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r},n.next===undefined&&(n.next=C),n.error===undefined&&(n.error=C),n.complete===undefined&&(n.complete=C);const a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(e){}}),this.observers.push(n),a}unsubscribeOne(e){this.observers!==undefined&&this.observers[e]!==undefined&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&this.onNoObservers!==undefined&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==undefined&&this.observers[e]!==undefined)try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,e!==undefined&&(this.finalError=e),this.task.then(()=>{this.observers=undefined,this.onNoObservers=undefined}))}}function C(){}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function O(e,t){return`${e} failed: ${t} argument `}r.validateArgCount=function(e,t,r,n){let a;if(n<t?a="at least "+t:n>r&&(a=0===r?"none":"no more than "+r),a){throw new Error(e+" failed: Was called with "+n+(1===n?" argument.":" arguments.")+" Expects "+a+".")}};r.stringToByteArray=function(e){const t=[];let r=0;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=55296&&o<=56319){const t=o-55296;a++,n(a<e.length,"Surrogate pair missing trail surrogate.");o=65536+(t<<10)+(e.charCodeAt(a)-56320)}o<128?t[r++]=o:o<2048?(t[r++]=o>>6|192,t[r++]=63&o|128):o<65536?(t[r++]=o>>12|224,t[r++]=o>>6&63|128,t[r++]=63&o|128):(t[r++]=o>>18|240,t[r++]=o>>12&63|128,t[r++]=o>>6&63|128,t[r++]=63&o|128)}return t};
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
r.stringLength=function(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n<128?t++:n<2048?t+=2:n>=55296&&n<=56319?(t+=4,r++):t+=3}return t};const N=1e3,I=2,P=r.MAX_VALUE_MILLIS=144e5,k=r.RANDOM_FACTOR=.5}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/notification-services-controller>firebase>@firebase/util",file:"node_modules/@firebase/util/dist/index.esm2017.js"}],[5,{"../../shared/constants/app":8442,"../../shared/constants/app-state":8441,"../../shared/constants/defi-referrals":8452,"../../shared/constants/errors":8453,"../../shared/constants/infura-project-id":8458,"../../shared/constants/messages":8463,"../../shared/constants/metametrics":8464,"../../shared/constants/offscreen-communication":8470,"../../shared/constants/onboarding":8471,"../../shared/constants/start-up-errors":8484,"../../shared/constants/ui-initialization":8492,"../../shared/lib/active-tab-domain-metrics":8509,"../../shared/lib/browser-runtime.utils":8526,"../../shared/lib/caip-stream":8529,"../../shared/lib/fetch-with-timeout":8582,"../../shared/lib/get-first-preferred-lang-code":8602,"../../shared/lib/install-attribution":8606,"../../shared/lib/manifestFlags":8608,"../../shared/lib/mv3.utils":8620,"../../shared/lib/object.utils":8623,"../../shared/lib/promise-with-resolvers":8633,"../../shared/lib/selectors/networks":8643,"../../shared/lib/sentry":8649,"../../shared/lib/stores/persistence-manager":8663,"./constants/background":6,"./constants/marketing-site-whitelist":7,"./constants/sentry-state":8,"./constants/snaps":9,"./constants/stream":10,"./controllers/analytics":14,"./first-time-state":58,"./lib/CronjobControllerStorageManager":62,"./lib/approval/utils":69,"./lib/critical-error/critical-error-recovery":84,"./lib/critical-error/critical-error-tab-handoff":85,"./lib/deep-links/deep-link-router":89,"./lib/deep-links/metrics":90,"./lib/defi-referrals/createDefiReferralMiddleware":91,"./lib/ens-ipfs/setup":99,"./lib/extension-lazy-listener/extension-lazy-listener":100,"./lib/getIframeProperties":102,"./lib/getObjStructure":103,"./lib/migrator":109,"./lib/notification-manager":112,"./lib/repair":126,"./lib/safe-reload":143,"./lib/setup-initial-state-hooks":147,"./lib/start-up-errors/start-up-errors":160,"./lib/state-corruption/state-corruption-recovery":161,"./lib/stream-utils":164,"./lib/update-remote-feature-flags":201,"./lib/use-split-state-storage":202,"./lib/util":203,"./metamask-controller":426,"./migrations":675,"./offscreen":676,"./on-update":677,"./platforms/extension":678,"@metamask/base-controller":1424,"@metamask/design-tokens":2098,"@metamask/utils":3970,"extension-port-stream":6530,loglevel:7131,"readable-stream":7610,"webextension-polyfill":8429},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loadStateFromPersistence=ot,r.setupController=ut;var n=e("./lib/setup-initial-state-hooks");e("../../shared/constants/infura-project-id");var a=e("@metamask/design-tokens"),o=e("readable-stream"),i=fe(e("loglevel")),s=fe(e("webextension-polyfill")),c=e("@metamask/utils"),l=e("@metamask/base-controller"),d=e("extension-port-stream"),u=e("../../shared/lib/promise-with-resolvers"),f=e("../../shared/constants/onboarding"),p=e("../../shared/constants/app"),h=e("../../shared/constants/app-state"),g=e("../../shared/constants/messages"),b=e("../../shared/constants/ui-initialization"),m=e("../../shared/constants/metametrics"),E=e("../../shared/lib/active-tab-domain-metrics"),S=e("../../shared/lib/browser-runtime.utils"),y=e("../../shared/lib/mv3.utils"),_=e("../../shared/lib/object.utils"),M=(e("../../shared/constants/offscreen-communication"),e("../../shared/lib/sentry")),T=e("../../shared/lib/selectors/networks"),A=e("../../shared/lib/caip-stream"),v=fe(e("../../shared/lib/fetch-with-timeout")),w=e("../../shared/constants/errors"),C=fe(e("../../shared/lib/get-first-preferred-lang-code")),O=(e("../../shared/lib/manifestFlags"),e("../../shared/constants/start-up-errors")),N=e("../../shared/constants/defi-referrals"),I=e("../../shared/lib/install-attribution"),P=e("../../shared/lib/stores/persistence-manager"),k=e("./lib/critical-error/critical-error-recovery"),R=e("./lib/state-corruption/state-corruption-recovery"),L=e("./lib/approval/utils"),D=e("./lib/use-split-state-storage"),U=fe(e("./migrations")),j=fe(e("./lib/migrator")),B=e("./lib/update-remote-feature-flags"),x=fe(e("./platforms/extension")),V=e("./constants/sentry-state"),F=ue(e("./lib/notification-manager")),K=ue(e("./metamask-controller")),W=e("./controllers/analytics"),z=fe(e("./lib/getObjStructure")),$=fe(e("./lib/ens-ipfs/setup")),H=e("./lib/util"),G=e("./offscreen"),Y=e("./lib/stream-utils"),q=fe(e("./first-time-state")),J=e("./on-update"),X=e("./constants/marketing-site-whitelist"),Q=e("./constants/stream"),Z=e("./constants/snaps"),ee=e("./lib/extension-lazy-listener/extension-lazy-listener"),te=e("./lib/deep-links/deep-link-router"),re=e("./lib/deep-links/metrics"),ne=e("./lib/safe-reload"),ae=e("./lib/critical-error/critical-error-tab-handoff"),oe=e("./lib/repair"),ie=e("./lib/start-up-errors/start-up-errors"),se=e("./lib/CronjobControllerStorageManager"),ce=e("./lib/defi-referrals/createDefiReferralMiddleware"),le=e("./lib/getIframeProperties"),de=e("./constants/background");function ue(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(ue=function(e,t){if(!t&&e&&e.__esModule)return e;var a,o,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(a=t?n:r){if(a.has(e))return a.get(e);a.set(e,i)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?a(i,t,o):i[t]=e[t]);return i})(e,t)}function fe(e){return e&&e.__esModule?e:{default:e}}const pe=globalThis.stateHooks.lazyListener??new ee.ExtensionLazyListener(s.default),he="#0376C9",ge=a.lightTheme.colors.error.default,be=9,me=99,Ee=!1;const Se=null,{safePersist:ye,requestSafeReload:_e,evacuate:Me}=(0,ne.getRequestSafeReload)(n.persistenceManager);global.stateHooks.getMostRecentPersistedState=()=>n.persistenceManager.mostRecentRetrievedState,global.stateHooks.getStorageKind=()=>n.persistenceManager.storageKind,global.logEncryptedVault=()=>{n.persistenceManager.logEncryptedVault()};const{sentry:Te}=global;let Ae={...q.default};const ve={[p.ENVIRONMENT_TYPE_POPUP]:!0,[p.ENVIRONMENT_TYPE_NOTIFICATION]:!0,[p.ENVIRONMENT_TYPE_FULLSCREEN]:!0};i.default.setLevel("info",!1);const we=new x.default,Ce=new F.default,Oe=(0,H.getPlatform)()===p.PLATFORM_FIREFOX;function Ne(e){const t=e.name,r=e.sender?.url?new URL(e.sender.url):null;let n;return n=Oe?Boolean(ve[t]):r?.origin===`chrome-extension://${s.default.runtime.id}`,{processName:t,senderUrl:r,isMetaMaskUIPort:n}}let Ie=0,Pe=!1,ke=!1,Re=0,Le=0;const De=new Set,Ue={},je={};let Be;const xe={},Ve={},Fe={};const Ke=new URL("https://metamask.github.io/phishing-warning/v5.1.0/"),We=Ke.toString();let ze,$e,He;function Ge(){const e=(0,u.withResolvers)();ze=e.promise,$e=e.resolve,He=e.reject}pe.once("runtime","onInstalled").then(e=>{!async function([e]){if("install"===e.reason)await async function(){i.default.debug("First install detected");const e=(0,I.getInstallAttribution)();we.openExtensionInBrowser();await ze,await pt(e)}();else if("update"===e.reason){const{previousVersion:t}=e;if(!t||t===we.getVersion())return;await ze,(0,J.onUpdate)(Be,we,t,_e)}}(e)}),Ge(),s.default?.sidePanel?.setPanelBehavior&&s.default.sidePanel.setPanelBehavior({openPanelOnActionClick:!0}).catch(()=>{});let Ye,qe,Je,Xe;const Qe=new R.CorruptionHandler,Ze=new k.CriticalErrorHandler,et=async e=>{const{isMetaMaskUIPort:t}=Ne(e);try{e.postMessage({data:{method:b.BACKGROUND_LIVENESS_METHOD},name:"background-liveness"})}catch(e){return void i.default.error("MetaMask - background-liveness check: Failed to message to port",e)}let r;t&&(Ze.registerPortForCriticalError({port:e,repairCallback:()=>(0,oe.requestRepair)(()=>(0,ae.openRestoringTabAndReload)(_e))}),r=()=>Ze.removeListenersForPort(e));try{if(await ze,t&&!(0,ie.tryPostMessage)(e,b.BACKGROUND_INITIALIZED_METHOD))return;Ee,Ye(e,r)}catch(a){try{if(Te?.captureException(a),t)if((0,w.isStateCorruptionError)(a))await Qe.handleStateCorruptionError({port:e,error:a,database:n.persistenceManager,repairCallback:async e=>{Ge(),(0,P.hasVault)(e)?(await ht(e),Be.onboardingController.setFirstTimeFlowType(f.FirstTimeFlowType.restore)):(await n.persistenceManager.reset(),await ht(null))}});else{const t=(0,c.isObject)(a)?{message:a.message??"Unknown error",name:a.name??"UnknownError",stack:a.stack,...a.sentryTags&&{sentryTags:a.sentryTags}}:{message:String(a),name:"UnknownError",stack:""};(0,ie.tryPostMessage)(e,O.DISPLAY_GENERAL_STARTUP_ERROR,{error:t,currentLocale:Be?.preferencesController?.state?.currentLocale})}}finally{r?.()}}},tt=()=>{pe.addListener("runtime","onConnect",et)};function rt(){const e=(new Date).toISOString();s.default.storage.session.set({timestamp:e})}async function nt(e){(0,H.initInstallType)();const t=y.isManifestV3?(0,G.createOffscreen)():null;let r=null,a=!1;y.isManifestV3&&(0,G.addOffscreenConnectivityListener)(e=>{if(a&&Be.connectivityAdapter){const t=e?"online":"offline";Be.connectivityAdapter.setStatus(t)}else r=e});const o=await ot(e),i=o.data,c=await(0,C.default)();let l;if(y.isManifestV3){if(!1!==i.PreferencesController?.enableMV3TimestampSave){const e=2e3;rt(),setInterval(rt,e)}const e=await s.default.storage.session.get(["isFirstMetaMaskControllerSetup"]);l=e?.isFirstMetaMaskControllerSetup===undefined,await s.default.storage.session.set({isFirstMetaMaskControllerSetup:l})}const d=await async function(){const e=(0,v.default)(),t=Z.PREINSTALLED_SNAPS_URLS.map(async t=>{const r=await e(t);if(t.pathname.endsWith(".json.gz")){const e=new DecompressionStream("gzip"),t=r.body.pipeThrough(e);return await new Response(t).json()}return await r.json()});return Promise.all(t)}(),u=new se.CronjobControllerStorageManager;if(await u.init(),ut(i,c,l,o.meta,t,d,u),Be.metaMetricsController.updateTraits({[m.MetaMetricsUserTrait.StorageKind]:n.persistenceManager.storageKind}),function(e){async function t(e,t){try{const r=await s.default.tabs.get(e);return!(r.url&&r.url.startsWith("https://www.google.com/search")||(await s.default.tabs.update(e,{url:t}),0))}catch(e){return Te?.captureException(e),!1}}const r=!y.isManifestV3;s.default.webRequest.onBeforeRequest.addListener(n=>{if(n.tabId===s.default.tabs.TAB_ID_NONE)return{};const{completedOnboarding:a}=e.onboardingController.state;if(!a)return{};if(!e.preferencesController.state.usePhishDetect)return{};if(n.initiator&&"null"!==n.initiator&&new URL(n.initiator).host===Ke.host)return{};const{hostname:o,href:i,searchParams:c}=new URL(n.url);e.phishingController.maybeUpdateState();const l=e.phishingController.isBlockedRequest(n.url);let d,u;if("main_frame"!==n.type&&"sub_frame"!==n.type||(d=e.phishingController.test(n.url)),!d?.result&&!l.result)return{};let f,p=i;d?.result&&l.result?u=`${d.type} and ${l.type}`:d?.result?u=d.type:(u=l.type,p=n.initiator);try{f=new URL(p).hostname}catch{f=o,p=i}const h=new URLSearchParams({hostname:f,href:p}),g=new URL(We);g.hash=h.toString();const b=g.toString(),E=()=>{Oe||(0,W.trackEvent)((0,W.createEventBuilder)(m.MetaMetricsEventName.PhishingPageDisplayed).addCategory(m.MetaMetricsEventCategory.Phishing).addProperties({url:p,referrer:{url:p},reason:u,requestDomain:l.result?o:undefined}).build({excludeMetaMetricsId:!0}))};return r?"main_frame"===n.type?(E(),{redirectUrl:b}):(t(n.tabId,b).then(e=>{e&&E()}),{cancel:!0}):(t(n.tabId,b).then(e=>{e&&E()}),{})},{urls:["http://*/*","https://*/*","ws://*/*","wss://*/*"]},r?["blocking"]:[])}(Be),y.isManifestV3){if(a=!0,null!==r){const e=r?"online":"offline";Be.connectivityAdapter.setStatus(e)}}else{const e=e=>{const t=e?"online":"offline";Be.connectivityAdapter.setStatus(t)};e(globalThis.navigator.onLine),globalThis.addEventListener("online",()=>e(!0)),globalThis.addEventListener("offline",()=>e(!1))}y.isManifestV3||await async function(){let e;try{const t=new URL(We);let r,n;t.hash="#extensionStartup",e=window.document.createElement("iframe"),e.setAttribute("src",t.href),e.setAttribute("sandbox","allow-scripts allow-same-origin");const a=new Promise((e,t)=>{r=e,n=t});e.addEventListener("load",r),window.document.body.appendChild(e),setTimeout(()=>n(new at),1e3),await a}catch(e){e instanceof at?console.warn("Phishing warning page timeout; page not guaranteed to work offline."):console.error("Failed to initialize phishing warning page",e)}finally{e&&e.remove()}}(),await(async()=>{const e=await s.default.tabs.query({url:"<all_urls>",windowType:"normal"}).then(e=>((0,S.checkForLastErrorAndLog)(),e)).catch(()=>{(0,S.checkForLastErrorAndLog)()});for(const t of e)s.default.tabs.sendMessage(t.id,{name:g.EXTENSION_MESSAGES.READY}).then(()=>{(0,S.checkForLastErrorAndLog)()}).catch(()=>{(0,S.checkForLastErrorAndLog)()})})(),new te.DeepLinkRouter({getExtensionURL:we.getExtensionURL,getState:Be.getState.bind(Be)}).on("navigate",async({url:e,parsed:t})=>{"redirectTo"in t||(0,W.trackEvent)((0,re.createEvent)({signature:t.signature,url:e}))}).on("error",e=>Te?.captureException(e)).install()}tt(),s.default.runtime.onConnectExternal.addListener(async(...e)=>{await ze,qe(...e)});class at extends Error{constructor(){super("Timeout failed")}}async function ot(e){let t;if(e){t={data:{},meta:{}};for(const r of P.backedUpStateKeys)(0,c.hasProperty)(e,r)&&(t.data[r]=e[r]);(0,c.hasProperty)(e,"meta")&&(0,c.isObject)(e.meta)&&(t.meta=e.meta,"split"===e.meta.storageKind||"data"===e.meta.storageKind?n.persistenceManager.storageKind=e.meta.storageKind:n.persistenceManager.storageKind="data"),"number"!=typeof t.meta.version&&(i.default.error("The `backup`'s `meta.version` property was missing during backup restore."),t.meta.version=155)}else{const e=!0;t=await n.persistenceManager.get({validateVault:e})}const r=new j.default({migrations:U.default,defaultVersion:null});r.on("error",e=>{console.warn(e);const r=(0,z.default)(t);Te?.captureException(e,{extra:{vaultStructure:r}})});let a=!1;t?.data||t?.meta||(a=!0,t=r.generateInitialState(Ae));const{state:o,changedKeys:s}=await r.migrateData(t),l=async r=>{const a=t?.meta?.version,i="number"==typeof a&&a>=157;let s=e?.AppMetadataController?.firstTimeInfo??o?.data?.AppMetadataController?.firstTimeInfo??o?.data?.firstTimeInfo??t?.data?.AppMetadataController?.firstTimeInfo??t?.data?.firstTimeInfo;if(!s)try{const e=await n.persistenceManager.getBackup();s=e?.AppMetadataController?.firstTimeInfo}catch{}const c=new Error(r);return c.sentryTags={"corruption.preMigrationVersion":String(a??"unknown"),"corruption.backupShouldExist":String(i),"corruption.installVersion":String(s?.version??"unknown"),"corruption.installDate":String(s?.date??"unknown")},c};if(!o)throw await l("MetaMask - migrator returned undefined");if(!(0,c.isObject)(o.meta))throw await l(`MetaMask - migrator metadata has invalid type '${typeof o.meta}'`);if("number"!=typeof o.meta.version)throw await l(`MetaMask - migrator metadata version has invalid type '${typeof o.meta.version}'`);if(!["data","split",undefined].includes(o.meta.storageKind))throw await l(`MetaMask - migrator metadata storageKind has invalid value '${o.meta.storageKind}'`);if(!(0,c.isObject)(o.data))throw await l(`MetaMask - migrator data has invalid type '${typeof o.data}'`);if(n.persistenceManager.setMetadata(o.meta),i.default.debug("[Split State]: Loaded data from persistence with storageKind '%s'",n.persistenceManager.storageKind),"data"===n.persistenceManager.storageKind){const e=!0===o.meta.platformSplitStateGradualRolloutAttempted,t=!e&&await(0,D.useSplitStateStorage)(o.data);i.default.debug("[Split State]: shouldUseSplitStateStorage: %s (alreadyTried: %s)",t,e),t&&(o.meta.platformSplitStateGradualRolloutAttempted=!0,n.persistenceManager.setMetadata(o.meta)),i.default.debug("[Split State]: Writing data to persistence with storageKind 'data'"),await n.persistenceManager.set(o.data),t&&(await n.persistenceManager.migrateToSplitState(o.data),o.meta=n.persistenceManager.getMetaData(),o.meta!==undefined&&(delete o.meta.platformSplitStateGradualRolloutAttempted,n.persistenceManager.setMetadata(o.meta)),await n.persistenceManager.persist())}else{if("split"!==n.persistenceManager.storageKind)throw new Error(`MetaMask - persistenceManager has invalid storageKind '${n.persistenceManager.storageKind}'`);if(a)for(const[e,t]of Object.entries(o.data))n.persistenceManager.update(e,t);else for(const e of s)n.persistenceManager.update(e,o.data[e]);await n.persistenceManager.persist()}return i.default.debug("[Split State]: Load complete."),o}function it(e,t,r){const{analyticsId:n}=Be.getState();if(!(0,H.shouldEmitDappViewedEvent)(n))return;const a=Be.getPermittedAccounts(e).length;if(0===a)return;const o=Be.controllerMessenger.call("AccountsController:getState"),i=Object.keys(o.internalAccounts.accounts).length,s=(0,le.getIframeProperties)({frameId:r,origin:e,mainFrameOrigin:t});(0,W.trackEvent)((0,W.createEventBuilder)(m.MetaMetricsEventName.DappViewed).addCategory(m.MetaMetricsEventCategory.InpageProvider).addProperties({is_first_visit:!1,number_of_accounts:i,number_of_accounts_connected:a,...s}).build({referrer:{url:e},excludeMetaMetricsId:!0}))}function st(e){if(!e.sender?.tab||!e.sender?.url||!e.sender?.tab?.url)return;const t=e.sender.tab.id,r=new URL(e.sender.url),{origin:n}=r,a=new URL(e.sender.tab.url),{origin:o}=a,{frameId:i}=e.sender;Object.keys(xe).includes(t)||(xe[t]=n),t in Ve||(Ve[t]=o),t in Fe||(Fe[t]=i);const s=Be.controllerMessenger.call("PermissionController:hasPermissions",n),c="New Tab"!==e.sender.tab.title;s&&c&&it(n,o,i)}function ct(e){const{completedMetaMetricsOnboarding:t,optedIn:r}=Be.getState();if(!t||!r)return;const n=Be.appStateController.state.appActiveTab?.origin,a=(0,E.getActiveTabDomainAllowlist)(Be.remoteFeatureFlagController.state),o=(0,E.getActiveTabDomainForMetrics)(n,a);(0,W.trackEvent)((0,W.createEventBuilder)(m.MetaMetricsEventName.AppOpened).addCategory(m.MetaMetricsEventCategory.App).addProperties(o?{active_tab_domain:o}:{}).build({environmentType:e}))}function lt(e){const t=[p.ENVIRONMENT_TYPE_POPUP,p.ENVIRONMENT_TYPE_NOTIFICATION,p.ENVIRONMENT_TYPE_FULLSCREEN,p.ENVIRONMENT_TYPE_SIDEPANEL];return!(Object.values(Ue).some(Boolean)||Pe||Ie>0||Re>0)&&t.includes(e)}const dt=async e=>{if(await ze,Be)try{const t=e?{active:!0,windowId:e}:{active:!0,currentWindow:!0},r=await s.default.tabs.query(t);if(!r||0===r.length)return;const n=r[0],{id:a,title:o,url:i,favIconUrl:c}=n;if(!i)return void Be.appStateController.clearAppActiveTab();const{origin:l,protocol:d,host:u,href:f}=new URL(i);if(!(0,H.isWebOrigin)(l))return void Be.appStateController.clearAppActiveTab();Be.appStateController.setAppActiveTab({id:a,title:o,origin:l,protocol:d,url:i,host:u,href:f,favIconUrl:c}),Be.subjectMetadataController.addSubjectMetadata({origin:l,name:o||u||l,iconUrl:c||null,subjectType:"website"})}catch(e){console.log("Error refreshing appActiveTab:",e.message)}};function ut(e,t,r,a,c,u,f){Be=new K.default({infuraProjectId:globalThis.INFURA_PROJECT_ID,showUserConfirmation:ft,initState:e,initLangCode:t,platform:we,notificationManager:Ce,browser:s.default,getRequestAccountTabIds:()=>je,getOpenMetamaskTabsIds:()=>Ue,isFirstMetaMaskControllerSetup:r,currentMigrationVersion:a.version,featureFlags:{},offscreenPromise:c,preinstalledSnaps:u,requestSafeReload:_e,cronjobControllerStorageManager:f}),n.persistenceManager.setOnSetFailed(e=>{Be.appStateController.setStorageWriteErrorType(e)});const g=[],b=Be.store.getState();for(const t of Object.keys(b)){const r=e[t]||{},n=b[t];if(null===n||"object"!=typeof n){(0,M.captureException)(new Error(`Invalid controller state for '${t}' of type '${null===n?"null":typeof n}'`));continue}const a=Object.keys(n);if(a.length===Object.keys(r).length){for(const e of a)if(n[e]!==r[e]){g.push(t);break}}else g.push(t)}var E;"split"===n.persistenceManager.storageKind?(g.length>0&&(i.default.info(`MetaMaskController state changed during configuration for controllers: ${g.join(", ")}. Persisting updated state.`),g.forEach(e=>{n.persistenceManager.update(e,b[e])}),ye().catch(e=>{i.default.error("Error persisting updated state:",e),Te?.captureException(e)})),Be.store.on("stateChange",async({controllerKey:e,newState:t,_oldState:r,_patches:a})=>{n.persistenceManager.update(e,t),P.backedUpStateKeys.includes(e)&&P.backedUpStateKeys.forEach(t=>{if(t===e)return;const r=Be.store.config[t];if(!r?.metadata)throw new Error(`Cannot backup ${t}: controller metadata is required but not found. All controllers in backedUpStateKeys must extend BaseController and define metadata.`);const a=Be.controllerMessenger.call(`${t}:getState`),o=(0,l.deriveStateFromMetadata)(a,r.metadata,"persist");n.persistenceManager.update(t,o)});try{await ye()}catch(e){i.default.error("Error persisting state change:",e),Te?.captureException(e)}})):(g.length>0&&(i.default.info(`MetaMaskController state changed during configuration for controllers: ${g.join(", ")}. Persisting updated state.`),ye(b).catch(e=>{i.default.error("Error persisting updated controller state:",e),Te?.captureException(e)})),Be.store.on("update",ye)),Be.store.on("error",e=>{i.default.error("MetaMask controller.store error:",e),Te?.captureException(e)}),(0,$.default)({getCurrentChainId:()=>(0,T.getCurrentChainId)({metamask:Be.networkController.state}),getIpfsGateway:Be.preferencesController.getIpfsGateway.bind(Be.preferencesController),getUseAddressBarEnsResolution:()=>Be.preferencesController.state.useAddressBarEnsResolution,provider:Be.provider}),E=Be,global.stateHooks.getSentryAppState=function(){const e=E.memStore.getState();return(0,_.maskObject)(e,V.SENTRY_BACKGROUND_STATE)};const S=()=>Ie>0||Boolean(Object.keys(Ue).length)||Pe||Re>0||!1,v=()=>Ie>0||Re>0,w=()=>Pe&&!v(),C=(e,t)=>{if(!1===e)Be.onClientClosed();else{if(t===p.ENVIRONMENT_TYPE_FULLSCREEN&&Boolean(Object.keys(Ue).length)||t===p.ENVIRONMENT_TYPE_SIDEPANEL&&Re>0)return;Be.onEnvironmentTypeClosed(t)}};function O(e){try{Be.appStateController.setDefaultHomeActiveTabName(e??null)}catch(e){console.error("Error setting landing tab:",e)}}function N(){De.clear(),Le=0,k()}function I(e,t){return e>t?`${t}+`:String(e)}function k(){const e=R();let t="",r=he;Le>0&&!w()?(t=I(Le,be),r=ge):e>0&&(t=I(e,be));try{const e={text:t},n={color:r};y.isManifestV3?(s.default.action.setBadgeText(e),s.default.action.setBadgeBackgroundColor(n)):(s.default.browserAction.setBadgeText(e),s.default.browserAction.setBadgeBackgroundColor(n))}catch(e){console.error("Error updating browser badge:",e)}}function R(){try{return(0,L.getAttentionRequiredApprovalCount)({approvalController:Be.approvalController})}catch(e){return console.error("Failed to get pending approval count:",e),0}}Ye=(e,t)=>{if(de.BLOCKED_PORTS.includes(e.name))return;const{processName:r,senderUrl:n,isMetaMaskUIPort:a}=Ne(e);if(a){const n=new d.ExtensionPortStream(e),a=function({chunkSize:e}){(0,W.trackEvent)((0,W.createEventBuilder)(m.MetaMetricsEventName.PortStreamChunked).addCategory(m.MetaMetricsEventCategory.PortStream).addProperties({chunkSize:e}).build())};e.onDisconnect.addListener(()=>n.off("message-too-large",a)),n.on("message-too-large",a),Be.isClientOpen=!0,Be.setupTrustedCommunication(n,e.sender).finally(()=>{t?.()});const s=r===p.ENVIRONMENT_TYPE_SIDEPANEL&&lt(p.ENVIRONMENT_TYPE_SIDEPANEL);if(r!==p.ENVIRONMENT_TYPE_SIDEPANEL&&lt(i=r)&&ct(i),(0,B.updateRemoteFeatureFlags)(Be),r===p.ENVIRONMENT_TYPE_POPUP&&(N(),Ie+=1,(0,o.finished)(n,()=>{Ie-=1;const e=S();Be.isClientOpen=e,C(e,p.ENVIRONMENT_TYPE_POPUP)})),r===p.ENVIRONMENT_TYPE_SIDEPANEL&&(N(),Re+=1,dt().then(()=>{s&&ct(p.ENVIRONMENT_TYPE_SIDEPANEL)}),(0,o.finished)(n,()=>{Re=Math.max(Re-1,0);const e=S();Be.isClientOpen=e,C(e,p.ENVIRONMENT_TYPE_SIDEPANEL)})),r===p.ENVIRONMENT_TYPE_NOTIFICATION&&(Pe=!0,(0,o.finished)(n,()=>{Pe=!1,Le>0&&O(h.AccountOverviewTabKey.Activity),k();const e=S();Be.isClientOpen=e,C(e,p.ENVIRONMENT_TYPE_NOTIFICATION)})),r===p.ENVIRONMENT_TYPE_FULLSCREEN){N();const t=e.sender.tab.id;Ue[t]=!0,(0,o.finished)(n,()=>{delete Ue[t];const e=S();Be.isClientOpen=e,C(e,p.ENVIRONMENT_TYPE_FULLSCREEN)})}}else if(n&&n.origin===Ke.origin&&n.pathname===Ke.pathname){const t=new d.ExtensionPortStream(e,{chunkSize:0});Be.setupPhishingCommunication({connectionStream:t})}else{if(e.sender&&e.sender.tab&&e.sender.url){const t=e.sender.tab.id,r=new URL(e.sender.url),{origin:n}=r;st(e),e.onMessage.addListener(e=>{e.data&&e.data.method===p.MESSAGE_TYPE.ETH_REQUEST_ACCOUNTS&&(je[n]=t)})}if(n&&X.COOKIE_ID_MARKETING_WHITELIST_ORIGINS.some(e=>e===n.origin)){const t=new d.ExtensionPortStream(e,{chunkSize:0});Be.setUpCookieHandlerCommunication({connectionStream:t})}const t=new d.ExtensionPortStream(e,{chunkSize:0});if(Je(t,e.sender),Oe||!y.isManifestV3){const r=(0,Y.setupMultiplex)(t);r.ignoreStream(Q.METAMASK_EIP_1193_PROVIDER),Xe(r.createStream(Q.METAMASK_CAIP_MULTICHAIN_PROVIDER),e.sender)}}var i},qe=e=>{const t=e.sender?.url;if(t){const{hostname:r}=new URL(t);if(de.BLOCKED_HOSTNAMES.includes(r))return void e.disconnect()}const r=new d.ExtensionPortStream(e,{chunkSize:0});if(!e.sender.id){if(de.BLOCKED_PORTS.includes(e.name))return;st(e),Xe((0,A.createCaipStream)(r),e.sender)}else Je(r,e.sender)},Je=(e,t)=>{Be.setupUntrustedCommunicationEip1193({connectionStream:e,sender:t})},Xe=(e,t)=>{Be.setupUntrustedCommunicationCaip({connectionStream:e,sender:t})},k(),Be.controllerMessenger.subscribe(K.METAMASK_CONTROLLER_EVENTS.DECRYPT_MESSAGE_MANAGER_UPDATE_BADGE,k),Be.controllerMessenger.subscribe(K.METAMASK_CONTROLLER_EVENTS.ENCRYPTION_PUBLIC_KEY_MANAGER_UPDATE_BADGE,k),Be.signatureController.hub.on(K.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,k),Be.controllerMessenger.subscribe(K.METAMASK_CONTROLLER_EVENTS.APP_STATE_UNLOCK_CHANGE,k),Be.controllerMessenger.subscribe(K.METAMASK_CONTROLLER_EVENTS.APPROVAL_STATE_CHANGE,k),Be.controllerMessenger.subscribe(K.METAMASK_CONTROLLER_EVENTS.METAMASK_NOTIFICATIONS_LIST_UPDATED,k),Be.controllerMessenger.subscribe(K.METAMASK_CONTROLLER_EVENTS.METAMASK_NOTIFICATIONS_MARK_AS_READ,k),Be.controllerMessenger.subscribe("TransactionController:transactionStatusUpdated",function({transactionMeta:e}){const{status:t,txParams:r,chainId:n}=e??{};if("failed"!==t&&"dropped"!==t)return;const{from:a,nonce:o}=r??{},i=a&&o!==undefined&&n?`${n}:${a.toLowerCase()}:${o}`:undefined;if(i&&De.has(i))return;if(v())return;i&&(De.size>=me&&De.clear(),De.add(i));Le+=1,w()||O(h.AccountOverviewTabKey.Activity);k()}),Ce.on(F.NOTIFICATION_MANAGER_EVENTS.POPUP_CLOSED,({automaticallyClosed:e})=>{e?R()>0&&ft():(Be.signatureController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE_SIG),Be.decryptMessageController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE),Be.encryptionPublicKeyController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE),Be.legacyBackgroundApiService.rejectAllPendingApprovals()),k()})}async function ft(){const e=await we.getActiveTabs(),t=Boolean(e.find(e=>Ue[e.id])),r=e.length>0&&e[0].extData&&e[0].extData.indexOf("vivaldi_tab")>-1;if(!ke&&(r||0===Ie)&&!t&&0===Re){ke=!0;try{const e=Be.appStateController.getCurrentPopupId();await Ce.showPopup(e=>Be.appStateController.setCurrentPopupId(e),e)}finally{ke=!1}}}const pt=async e=>{const{deferredDeepLink:t,traits:r}=await e;Be.metaMetricsController.updateTraits({[m.MetaMetricsUserTrait.InstallDateExt]:(new Date).toISOString().split("T")[0],...r});const n={};t&&(Be.appStateController.setDeferredDeepLink(t),n.install_source="deeplink",n.deeplink_path=t.referringLink);const a={category:m.MetaMetricsEventCategory.App,event:m.MetaMetricsEventName.AppInstalled,properties:n},{completedMetaMetricsOnboarding:o,optedIn:i,analyticsId:s}=Be.getState();!0===o&&!1===i||(!0===o&&!0===i&&s?(0,W.trackEvent)((0,W.createEventBuilder)(m.MetaMetricsEventName.AppInstalled).addCategory(m.MetaMetricsEventCategory.App).addProperties(n).build()):Be.metaMetricsController.addEventBeforeMetricsOptIn(a))};s.default.runtime.onUpdateAvailable.addListener(async function(e){await ze,i.default.info("An update is available",e?.version),Be.appStateController.setPendingExtensionVersion(e?.version??null)});(async()=>{if(s.default?.sidePanel)try{await ze,await async function(){if(!s.default?.sidePanel?.setPanelBehavior)return;const e=Be?.preferencesController?.state?.preferences?.useSidePanelAsDefault??!0;await s.default.sidePanel.setPanelBehavior({openPanelOnActionClick:e})}(),Be?.controllerMessenger?.subscribe("PreferencesController:stateChange",e=>{s.default?.sidePanel?.setPanelBehavior&&s.default.sidePanel.setPanelBehavior({openPanelOnActionClick:e}).catch(e=>console.error("Error updating panel behavior:",e))},e=>e?.preferences?.useSidePanelAsDefault??!0)}catch(e){console.error("Error setting side panel toolbar behavior:",e)}})();async function ht(e){s.default.tabs.onActivated.addListener(e=>{if(Be){const{tabId:t}=e,r=xe[t],n=Ve[t];r&&Be.permissionController.state.subjects[r]!==undefined&&it(r,n,Fe[t]);const a=(0,N.getPartnerByOrigin)(n);a&&Be.permissionController.state.subjects[n]!==undefined&&Be.handleDefiReferral(a,t,ce.ReferralTriggerType.OnNavigateConnectedTab).catch(e=>{i.default.error(`Failed to handle ${a.name} referral after navigation to connected tab: `,e)})}});try{await nt(e),n.persistenceManager.cleanUpMostRecentRetrievedState(),i.default.info("MetaMask initialization complete."),$e()}catch(e){i.default.error(e),He(e)}}(async()=>{await dt()})(),s.default.tabs.onActivated.addListener(async({tabId:e})=>{if(await ze,!Be)return{};try{const t=await s.default.tabs.get(e),{id:r,title:n,url:a,favIconUrl:o}=t;if(!a)return Be.appStateController.clearAppActiveTab(),{};const{origin:i,protocol:c,host:l,href:d}=new URL(a);if(!(0,H.isWebOrigin)(i))return Be.appStateController.clearAppActiveTab(),{};Be.appStateController.setAppActiveTab({id:r,title:n,origin:i,protocol:c,url:a,host:l,href:d,favIconUrl:o}),Be.subjectMetadataController.addSubjectMetadata({origin:i,name:n||l||i,iconUrl:o||null,subjectType:"website"})}catch(e){console.log("Error in tabs.onActivated listener:",e.message)}return{}}),s.default.tabs.onUpdated.addListener(async(e,t,r)=>{if(await ze,!Be)return{};const n=t.url!==undefined,a="complete"===t.status;if(!n&&!a)return{};try{const t=r||await s.default.tabs.get(e),{id:o,title:i,url:c,favIconUrl:l}=t,d=Be.appStateController.state.appActiveTab,u=d?.id===o;if(!c)return u&&Be.appStateController.clearAppActiveTab(),{};const{origin:f,protocol:p,host:h,href:g}=new URL(c);if(!f||"null"===f||f.startsWith("chrome-extension://")||f.startsWith("moz-extension://"))return u&&Be.appStateController.clearAppActiveTab(),{};let b=!1;try{b=(await s.default.tabs.query({active:!0,currentWindow:!0})).some(e=>e.id===o)}catch(e){b=u}(n||a)&&b&&(Be.appStateController.setAppActiveTab({id:o,title:i,origin:f,protocol:p,url:c,host:h,href:g,favIconUrl:l}),Be.subjectMetadataController.addSubjectMetadata({origin:f,name:i||h||f,iconUrl:l||null,subjectType:"website"}))}catch(e){console.log("Error in tabs.onUpdated listener:",e.message)}return{}}),s.default.windows.onFocusChanged.addListener(async e=>{e!==s.default.windows.WINDOW_ID_NONE&&await dt(e)}),async function(){const e=await(0,ae.readCriticalErrorRestoreSession)(s.default),t=undefined;let r=null;(e||t?.simulateBackgroundStateSyncHang||t?.simulateBackgroundInitializationHang)&&(r=await n.persistenceManager.getBackup().catch(()=>null));const a=(0,P.hasVault)(r);if((t?.simulateBackgroundStateSyncHang||t?.simulateBackgroundInitializationHang)&&Se&&(Se.hasVaultAtStartup=a?Date.now():null),e&&(await(0,ae.clearCriticalErrorRestoreSession)(s.default),a)){Se&&(Se.restoreInProgress=!0);const t={tabId:e.tabId,tabUrl:e.tabUrl};ht(r);try{await ze}catch(e){return void i.default.error("critical-error-restore: initialization failed",e)}return Be.onboardingController.setFirstTimeFlowType(f.FirstTimeFlowType.restore),void await(0,ae.handoffRestoringTabToExtension)(we,t)}ht(null)}().catch(e=>{i.default.error("initOrRestoreBackground failed",e)})}}},{package:"$root$",file:"app/scripts/background.js"}]],[5],{});