Local-first X/Twitter research archive, search, bookmark capture, and portable bundle export by Kyle McCleary.
As of
// ==UserScript==
// @name Scrollmark
// @name:zh-CN Scrollmark
// @name:zh-TW Scrollmark
// @name:ja Scrollmark
// @namespace https://github.com/kmccleary3301/scrollmark
// @version 1.5.0
// @author Kyle McCleary
// @description Local-first X/Twitter research archive, search, bookmark capture, and portable bundle export by Kyle McCleary.
// @description:zh-CN 本地优先的 X/Twitter 研究归档、搜索、书签采集与可移植 Bundle 导出工具。
// @description:zh-TW 本地優先的 X/Twitter 研究歸檔、搜尋、書籤擷取與可攜式 Bundle 匯出工具。
// @description:ja ローカルファーストの X/Twitter 研究アーカイブ、検索、ブックマーク取得、ポータブル Bundle 出力ツール。
// @license MIT
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABmklEQVR4Ae3XA4wcARSA4dq2bUQ1g9pRbVtBzai2otpug9pxUttn2753/3m9Ozq/5NsdvvfGM6VKoshE8/ORFbAMbxCGWHzDHjS2sXxPlM0eKYclGoq3w1eIHVGYikaYg6e4ZppgAgQrVBSvDw+IEylIhSAATUyTHIYgFdsUNnAGosAfDMccLMtOchli4g7quFC8FhIhCsRD8Bk1sxMdgVjwxRyUdtDABIgKH9DQNNEkiB1fMB9VbDSwEKLQJ1S1TFQRXhAHYnADy9ETdTEeotAze7tzNJIhCiRBFLpnq/hmzMR65UkVO2WrgaOQPLLW3u6XPDLAVgOl8R5isEhUtHcSdkEoxEBXnN3ZuuMbxCDDnTVQF52xBcEQHX1BaWcNtDLwMpzg6tNtN0RnD5U8XsviGkQnYWih9CWjNBbDHaJBMsZqec8rjV54B1EoFXO0Fh+DrxCFEjBTTdFy6IvNGu4Hf9FXSdGheAUvjZdgLPajqtp3+jl4jVSIAgHYjRZ6fWC0wSpcwScEQZCMUPzEfezEYJQrVRKFOdIAZGq1QBG8EiYAAAAASUVORK5CYII=
// @homepage https://github.com/kmccleary3301/scrollmark
// @homepageURL https://github.com/kmccleary3301/scrollmark
// @supportURL https://github.com/kmccleary3301/scrollmark/issues
// @match *://twitter.com/*
// @match *://x.com/*
// @match *://mobile.x.com/*
// @connect cdn.syndication.twimg.com
// @grant GM_addStyle
// @grant GM_getValue
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @inject-into page
// @run-at document-start
// ==/UserScript==
(t=>{if(typeof GM_addStyle=="function"){GM_addStyle(t);return}const o=document.createElement("style");o.textContent=t,document.head.append(o)})(` #twe-root *,#twe-root :before,#twe-root :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#twe-root ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#twe-root *,#twe-root :before,#twe-root :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}#twe-root :before,#twe-root :after{--tw-content: ""}#twe-root,#twe-root :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}#twe-root{margin:0;line-height:inherit}#twe-root hr{height:0;color:inherit;border-top-width:1px}#twe-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}#twe-root h1,#twe-root h2,#twe-root h3,#twe-root h4,#twe-root h5,#twe-root h6{font-size:inherit;font-weight:inherit}#twe-root a{color:inherit;text-decoration:inherit}#twe-root b,#twe-root strong{font-weight:bolder}#twe-root code,#twe-root kbd,#twe-root samp,#twe-root pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}#twe-root small{font-size:80%}#twe-root sub,#twe-root sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}#twe-root sub{bottom:-.25em}#twe-root sup{top:-.5em}#twe-root table{text-indent:0;border-color:inherit;border-collapse:collapse}#twe-root button,#twe-root input,#twe-root optgroup,#twe-root select,#twe-root textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}#twe-root button,#twe-root select{text-transform:none}#twe-root button,#twe-root input:where([type=button]),#twe-root input:where([type=reset]),#twe-root input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}#twe-root :-moz-focusring{outline:auto}#twe-root :-moz-ui-invalid{box-shadow:none}#twe-root progress{vertical-align:baseline}#twe-root ::-webkit-inner-spin-button,#twe-root ::-webkit-outer-spin-button{height:auto}#twe-root [type=search]{-webkit-appearance:textfield;outline-offset:-2px}#twe-root ::-webkit-search-decoration{-webkit-appearance:none}#twe-root ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}#twe-root summary{display:list-item}#twe-root blockquote,#twe-root dl,#twe-root dd,#twe-root h1,#twe-root h2,#twe-root h3,#twe-root h4,#twe-root h5,#twe-root h6,#twe-root hr,#twe-root figure,#twe-root p,#twe-root pre{margin:0}#twe-root fieldset{margin:0;padding:0}#twe-root legend{padding:0}#twe-root ol,#twe-root ul,#twe-root menu{list-style:none;margin:0;padding:0}#twe-root dialog{padding:0}#twe-root textarea{resize:vertical}#twe-root input::-moz-placeholder,#twe-root textarea::-moz-placeholder{opacity:1;color:#9ca3af}#twe-root input::placeholder,#twe-root textarea::placeholder{opacity:1;color:#9ca3af}#twe-root button,#twe-root [role=button]{cursor:pointer}#twe-root :disabled{cursor:default}#twe-root img,#twe-root svg,#twe-root video,#twe-root canvas,#twe-root audio,#twe-root iframe,#twe-root embed,#twe-root object{display:block;vertical-align:middle}#twe-root img,#twe-root video{max-width:100%;height:auto}#twe-root [hidden]:where(:not([hidden=until-found])){display:none}#twe-root,#twe-root [data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){#twe-root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media(prefers-color-scheme:dark){#twe-root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}#twe-root{-webkit-tap-highlight-color:transparent}#twe-root *{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}#twe-root *:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}#twe-root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 15.2344% .017892 200.026556;--sc: 15.787% .020249 356.29965;--ac: 15.8762% .029206 78.618794;--nc: 84.7148% .013247 313.189598;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--p: 76.172% .089459 200.026556;--s: 78.9351% .101246 356.29965;--a: 79.3811% .146032 78.618794;--n: 23.5742% .066235 313.189598;--b1: 97.7882% .00418 56.375637;--b2: 93.9822% .007638 61.449292;--b3: 91.5861% .006811 53.440502;--bc: 23.5742% .066235 313.189598;--rounded-btn: 30.4px;--tab-border: 2px;--tab-radius: 11.2px}@media(prefers-color-scheme:dark){#twe-root{color-scheme:dark;--b2: 26.8053% .020556 277.508664;--b3: 24.7877% .019009 277.508664;--pc: 15.0922% .036614 346.812432;--sc: 14.8405% .029709 301.883095;--ac: 16.6785% .024826 66.558491;--nc: 87.8891% .006515 275.524078;--inc: 17.6526% .018676 212.846491;--suc: 17.4199% .043903 148.024881;--wac: 19.1068% .026849 112.757109;--erc: 13.6441% .041266 24.430965;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 75.4611% .18307 346.812432;--s: 74.2023% .148546 301.883095;--a: 83.3927% .124132 66.558491;--n: 39.4456% .032576 275.524078;--b1: 28.8229% .022103 277.508664;--bc: 97.7477% .007913 106.545019;--in: 88.263% .09338 212.846491;--su: 87.0995% .219516 148.024881;--wa: 95.5338% .134246 112.757109;--er: 68.2204% .206328 24.430965}}#twe-root [data-theme=cupcake]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 15.2344% .017892 200.026556;--sc: 15.787% .020249 356.29965;--ac: 15.8762% .029206 78.618794;--nc: 84.7148% .013247 313.189598;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--p: 76.172% .089459 200.026556;--s: 78.9351% .101246 356.29965;--a: 79.3811% .146032 78.618794;--n: 23.5742% .066235 313.189598;--b1: 97.7882% .00418 56.375637;--b2: 93.9822% .007638 61.449292;--b3: 91.5861% .006811 53.440502;--bc: 23.5742% .066235 313.189598;--rounded-btn: 30.4px;--tab-border: 2px;--tab-radius: 11.2px}#twe-root [data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}#twe-root [data-theme=emerald]{color-scheme:light;--b2: 93% 0 0;--b3: 86% 0 0;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 76.6626% .135433 153.450024;--pc: 33.3872% .040618 162.240129;--s: 61.3028% .202368 261.294233;--sc: 100% 0 0;--a: 72.7725% .149783 33.200363;--ac: 0% 0 0;--n: 35.5192% .032071 262.988584;--nc: 98.4625% .001706 247.838921;--b1: 100% 0 0;--bc: 35.5192% .032071 262.988584;--animation-btn: 0;--animation-input: 0;--btn-focus-scale: 1}#twe-root [data-theme=cyberpunk]{color-scheme:light;--b2: 87.8943% .16647 104.32;--b3: 81.2786% .15394 104.32;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--bc: 18.902% .0358 104.32;--pc: 14.844% .0418 6.35;--sc: 16.666% .0368 204.72;--ac: 14.372% .04352 310.43;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--p: 74.22% .209 6.35;--s: 83.33% .184 204.72;--a: 71.86% .2176 310.43;--n: 23.04% .065 269.31;--nc: 94.51% .179 104.32;--b1: 94.51% .179 104.32;--rounded-box: 0;--rounded-btn: 0;--rounded-badge: 0;--tab-radius: 0}#twe-root [data-theme=valentine]{color-scheme:light;--b2: 88.0567% .024834 337.06289;--b3: 81.4288% .022964 337.06289;--pc: 13.7239% .030755 15.066527;--sc: 14.3942% .029258 293.189609;--ac: 14.2537% .014961 197.828857;--inc: 90.923% .043042 262.880917;--suc: 12.541% .033982 149.213788;--wac: 13.3168% .031484 58.31834;--erc: 14.614% .0414 27.33;--rounded-box: 16px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--p: 68.6197% .153774 15.066527;--s: 71.971% .14629 293.189609;--a: 71.2685% .074804 197.828857;--n: 54.6053% .143342 358.004839;--nc: 90.2701% .037202 336.955191;--b1: 94.6846% .026703 337.06289;--bc: 37.3085% .081131 4.606426;--in: 54.615% .215208 262.880917;--su: 62.7052% .169912 149.213788;--wa: 66.584% .157422 58.31834;--er: 73.07% .207 27.33;--rounded-btn: 30.4px;--tab-radius: 11.2px}#twe-root [data-theme=lofi]{color-scheme:light;--inc: 15.908% .0206 205.9;--suc: 18.026% .0306 164.14;--wac: 17.674% .027 79.94;--erc: 15.732% .03 28.47;--border-btn: 1px;--tab-border: 1px;--p: 15.9066% 0 0;--pc: 100% 0 0;--s: 21.455% .001566 17.278957;--sc: 100% 0 0;--a: 26.8618% 0 0;--ac: 100% 0 0;--n: 0% 0 0;--nc: 100% 0 0;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.268% .001082 17.17934;--bc: 0% 0 0;--in: 79.54% .103 205.9;--su: 90.13% .153 164.14;--wa: 88.37% .135 79.94;--er: 78.66% .15 28.47;--rounded-box: 4px;--rounded-btn: 2px;--rounded-badge: 2px;--tab-radius: 2px;--animation-btn: 0;--animation-input: 0;--btn-focus-scale: 1}#twe-root [data-theme=dracula]{color-scheme:dark;--b2: 26.8053% .020556 277.508664;--b3: 24.7877% .019009 277.508664;--pc: 15.0922% .036614 346.812432;--sc: 14.8405% .029709 301.883095;--ac: 16.6785% .024826 66.558491;--nc: 87.8891% .006515 275.524078;--inc: 17.6526% .018676 212.846491;--suc: 17.4199% .043903 148.024881;--wac: 19.1068% .026849 112.757109;--erc: 13.6441% .041266 24.430965;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 75.4611% .18307 346.812432;--s: 74.2023% .148546 301.883095;--a: 83.3927% .124132 66.558491;--n: 39.4456% .032576 275.524078;--b1: 28.8229% .022103 277.508664;--bc: 97.7477% .007913 106.545019;--in: 88.263% .09338 212.846491;--su: 87.0995% .219516 148.024881;--wa: 95.5338% .134246 112.757109;--er: 68.2204% .206328 24.430965}#twe-root [data-theme=cmyk]{color-scheme:light;--b2: 93% 0 0;--b3: 86% 0 0;--bc: 20% 0 0;--pc: 14.3544% .02666 239.443325;--sc: 12.8953% .040552 359.339283;--ac: 18.8458% .037948 105.306968;--nc: 84.3557% 0 0;--inc: 13.6952% .0189 217.284104;--suc: 89.3898% .032505 321.406278;--wac: 14.2473% .031969 52.023412;--erc: 12.4027% .041677 28.717543;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 71.7722% .133298 239.443325;--s: 64.4766% .202758 359.339283;--a: 94.2289% .189741 105.306968;--n: 21.7787% 0 0;--b1: 100% 0 0;--in: 68.4759% .094499 217.284104;--su: 46.949% .162524 321.406278;--wa: 71.2364% .159843 52.023412;--er: 62.0133% .208385 28.717543}#twe-root [data-theme=business]{color-scheme:dark;--b2: 22.6487% 0 0;--b3: 20.944% 0 0;--bc: 84.8707% 0 0;--pc: 88.3407% .019811 251.473931;--sc: 12.8185% .005481 229.389418;--ac: 13.4542% .033545 35.791525;--nc: 85.4882% .00265 253.041249;--inc: 12.5233% .028702 240.033697;--suc: 14.0454% .018919 156.59611;--wac: 15.4965% .023141 81.519177;--erc: 90.3221% .029356 29.674507;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 41.7036% .099057 251.473931;--s: 64.0924% .027405 229.389418;--a: 67.271% .167726 35.791525;--n: 27.441% .01325 253.041249;--b1: 24.3535% 0 0;--in: 62.6163% .143511 240.033697;--su: 70.2268% .094594 156.59611;--wa: 77.4824% .115704 81.519177;--er: 51.6105% .14678 29.674507;--rounded-box: 4px;--rounded-btn: 2px;--rounded-badge: 2px}#twe-root [data-theme=winter]{color-scheme:light;--pc: 91.372% .051 257.57;--sc: 88.5103% .03222 282.339433;--ac: 11.988% .038303 335.171434;--nc: 83.9233% .012704 257.651965;--inc: 17.6255% .017178 214.515264;--suc: 16.0988% .015404 197.823719;--wac: 17.8345% .009167 71.47031;--erc: 14.6185% .022037 20.076293;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 56.86% .255 257.57;--s: 42.5516% .161098 282.339433;--a: 59.9398% .191515 335.171434;--n: 19.6166% .063518 257.651965;--b1: 100% 0 0;--b2: 97.4663% .011947 259.822565;--b3: 93.2686% .016223 262.751375;--bc: 41.8869% .053885 255.824911;--in: 88.1275% .085888 214.515264;--su: 80.4941% .077019 197.823719;--wa: 89.1725% .045833 71.47031;--er: 73.0926% .110185 20.076293}#twe-root .alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:16px;text-align:center;border-radius:var(--rounded-box, 16px);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:16px;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media(min-width:640px){#twe-root .alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}#twe-root .avatar{position:relative;display:inline-flex}#twe-root .avatar>div{display:block;aspect-ratio:1 / 1;overflow:hidden}#twe-root .avatar img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover}#twe-root .avatar.placeholder>div{display:flex;align-items:center;justify-content:center}#twe-root .badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:20px;font-size:14px;line-height:20px;width:-moz-fit-content;width:fit-content;padding-left:9.008px;padding-right:9.008px;border-radius:var(--rounded-badge, 30.4px);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}@media(hover:hover){#twe-root .checkbox-accent:hover{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)))}#twe-root .label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root .menu li>*:not(ul,.menu-title,details,.btn):active,#twe-root .menu li>*:not(ul,.menu-title,details,.btn).active,#twe-root .menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}#twe-root .menu li>*:not(ul,.menu-title,details,.btn).\\!active{--tw-bg-opacity: 1 !important;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)))!important;--tw-text-opacity: 1 !important;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))!important}#twe-root .tab:hover{--tw-text-opacity: 1}#twe-root .table tr.hover:hover,#twe-root .table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}#twe-root .\\!table tr.hover:hover,#twe-root .\\!table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1 !important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important}#twe-root .table-zebra tr.hover:hover,#twe-root .table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}#twe-root .btn{display:inline-flex;height:48px;min-height:48px;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, 8px);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:16px;padding-right:16px;text-align:center;font-size:14px;line-height:1em;gap:8px;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}#twe-root .btn-disabled,#twe-root .btn[disabled],#twe-root .btn:disabled{pointer-events:none}#twe-root :where(.btn:is(input[type=checkbox])),#twe-root :where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}#twe-root .btn:is(input[type=checkbox]):after,#twe-root .btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}#twe-root .card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 16px)}#twe-root .card:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 32px);gap:8px}#twe-root .card-body :where(p){flex-grow:1}#twe-root .card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px}#twe-root .card figure{display:flex;align-items:center;justify-content:center}#twe-root .card.image-full{display:grid}#twe-root .card.image-full:before{position:relative;content:"";z-index:10;border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}#twe-root .card.image-full:before,#twe-root .card.image-full>*{grid-column-start:1;grid-row-start:1}#twe-root .card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}#twe-root .card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}#twe-root .checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:24px;width:24px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}#twe-root .divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:16px;margin-bottom:16px;height:16px;white-space:nowrap}#twe-root .divider:before,#twe-root .divider:after{height:2px;width:100%;flex-grow:1;--tw-content: "";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}#twe-root .dropdown{position:relative;display:inline-block}#twe-root .dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}#twe-root .dropdown .dropdown-content{position:absolute}#twe-root .dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}#twe-root .dropdown-end .dropdown-content{inset-inline-end:0px}#twe-root .dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}#twe-root .dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}#twe-root .dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}#twe-root .dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}#twe-root .dropdown-end.dropdown-right .dropdown-content,#twe-root .dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}#twe-root .dropdown.dropdown-open .dropdown-content,#twe-root .dropdown:not(.dropdown-hover):focus .dropdown-content,#twe-root .dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media(hover:hover){#twe-root .dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}#twe-root .btm-nav>*.disabled:hover,#twe-root .btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){#twe-root .btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}#twe-root .btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}#twe-root .btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){#twe-root .btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}#twe-root .btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}#twe-root .btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}#twe-root .btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}#twe-root .btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}#twe-root .btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}#twe-root .btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}#twe-root .btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}#twe-root .btn-disabled:hover,#twe-root .btn[disabled]:hover,#twe-root .btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn:is(input[type=checkbox]:checked):hover,#twe-root .btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}#twe-root .dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}#twe-root .tab[disabled],#twe-root .tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}}#twe-root .dropdown:is(details) summary::-webkit-details-marker{display:none}#twe-root .file-input{height:48px;flex-shrink:1;padding-inline-end:16px;font-size:16px;line-height:2;line-height:24px;overflow:hidden;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .file-input::file-selector-button{margin-inline-end:16px;display:inline-flex;height:100%;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;padding-left:16px;padding-right:16px;text-align:center;font-size:14px;line-height:20px;line-height:1em;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;border-style:solid;--tw-border-opacity: 1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));font-weight:600;text-transform:uppercase;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));text-decoration-line:none;border-width:var(--border-btn, 1px);animation:button-pop var(--animation-btn, .25s) ease-out}#twe-root .footer{display:grid;width:100%;grid-auto-flow:row;place-items:start;-moz-column-gap:16px;column-gap:16px;row-gap:40px;font-size:14px;line-height:20px}#twe-root .footer>*{display:grid;place-items:start;gap:8px}@media(min-width:48rem){#twe-root .footer{grid-auto-flow:column}#twe-root .footer-center{grid-auto-flow:row dense}}#twe-root .form-control{display:flex;flex-direction:column}#twe-root .label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:8px 4px}#twe-root .input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:48px;padding-left:16px;padding-right:16px;font-size:16px;line-height:2;line-height:24px;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .input[type=number]::-webkit-inner-spin-button,#twe-root .input-md[type=number]::-webkit-inner-spin-button{margin-top:-16px;margin-bottom:-16px;margin-inline-end:-16px}#twe-root .input-xs[type=number]::-webkit-inner-spin-button{margin-top:-4px;margin-bottom:-4px;margin-inline-end:-0px}#twe-root .input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}#twe-root .join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, 8px)}#twe-root .join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}#twe-root .join .join-item:not(:first-child):not(:last-child),#twe-root .join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}#twe-root .join .join-item:first-child:not(:last-child),#twe-root .join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}#twe-root .join .dropdown .join-item:first-child:not(:last-child),#twe-root .join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}#twe-root .join :where(.join-item:first-child:not(:last-child)),#twe-root .join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}#twe-root .join .join-item:last-child:not(:first-child),#twe-root .join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}#twe-root .join :where(.join-item:last-child:not(:first-child)),#twe-root .join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){#twe-root :where(.join *){border-radius:inherit}}@supports selector(:has(*)){#twe-root :where(.join *:has(.join-item)){border-radius:inherit}}#twe-root .link{cursor:pointer;text-decoration-line:underline}#twe-root .menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:14px;line-height:20px;padding:8px}#twe-root .menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:16px;padding-inline-start:8px}#twe-root .menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),#twe-root .menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:8px;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}#twe-root .menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}#twe-root .menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}#twe-root :where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}#twe-root :where(.menu li) .badge{justify-self:end}#twe-root .modal{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}#twe-root :where(.modal){align-items:center}#twe-root .modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:512px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 16px);border-bottom-left-radius:var(--rounded-box, 16px);border-top-left-radius:var(--rounded-box, 16px);border-top-right-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:24px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}#twe-root .modal-open,#twe-root .modal:target,#twe-root .modal-toggle:checked+.modal,#twe-root .modal[open]{pointer-events:auto;visibility:visible;opacity:1}#twe-root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}#twe-root .progress{position:relative;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;height:8px;border-radius:var(--rounded-box, 16px);background-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .radio{flex-shrink:0;--chkbg: var(--bc);height:24px;width:24px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}#twe-root .range{height:24px;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 16px);background-color:transparent}#twe-root .range:focus{outline:none}#twe-root .select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:48px;min-height:48px;padding-inline-start:16px;padding-inline-end:40px;font-size:14px;line-height:20px;line-height:2;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}#twe-root .select[multiple]{height:auto}#twe-root .stack{display:inline-grid;place-items:center;align-items:flex-end}#twe-root .stack>*{grid-column-start:1;grid-row-start:1;transform:translateY(10%) scale(.9);z-index:1;width:100%;opacity:.6}#twe-root .stack>*:nth-child(2){transform:translateY(5%) scale(.95);z-index:2;opacity:.8}#twe-root .stack>*:nth-child(1){transform:translateY(0) scale(1);z-index:3;opacity:1}#twe-root .stats{display:inline-grid;border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root :where(.stats){grid-auto-flow:column;overflow-x:auto}#twe-root .tabs{display:grid;align-items:flex-end}#twe-root .tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),#twe-root .tabs-lifted:has(.tab-content[class*=" rounded-"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}#twe-root .tab{position:relative;grid-row-start:1;display:inline-flex;height:32px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:14px;line-height:20px;line-height:2;--tab-padding: 16px;--tw-text-opacity: .5;--tab-color: var(--fallback-bc,oklch(var(--bc)/1));--tab-bg: var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color: var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding, 16px);padding-inline-end:var(--tab-padding, 16px)}#twe-root .tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}#twe-root .tab:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}#twe-root .tab:not(input):empty{cursor:default;grid-column-start:span 9999}#twe-root input.tab:checked+.tab-content,#twe-root :is(.tab-active,[aria-selected=true])+.tab-content{display:block}#twe-root .\\!table{position:relative!important;width:100%!important;border-radius:var(--rounded-box, 16px)!important;text-align:left!important;font-size:14px!important;line-height:20px!important}#twe-root .table{position:relative;width:100%;border-radius:var(--rounded-box, 16px);text-align:left;font-size:14px;line-height:20px}#twe-root .\\!table :where(.table-pin-rows thead tr){position:sticky!important;top:0!important;z-index:1!important;--tw-bg-opacity: 1 !important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}#twe-root .table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .\\!table :where(.table-pin-rows tfoot tr){position:sticky!important;bottom:0!important;z-index:1!important;--tw-bg-opacity: 1 !important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}#twe-root .table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .\\!table :where(.table-pin-cols tr th){position:sticky!important;left:0!important;right:0!important;--tw-bg-opacity: 1 !important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}#twe-root .table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}#twe-root .textarea{min-height:48px;flex-shrink:1;padding:8px 16px;font-size:14px;line-height:20px;line-height:2;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .\\!timeline{position:relative!important;display:flex!important}#twe-root .timeline{position:relative;display:flex}#twe-root :where(.\\!timeline>li){position:relative!important;display:grid!important;flex-shrink:0!important;align-items:center!important;grid-template-rows:var(--timeline-row-start, minmax(0, 1fr)) auto var( --timeline-row-end, minmax(0, 1fr) )!important;grid-template-columns:var(--timeline-col-start, minmax(0, 1fr)) auto var( --timeline-col-end, minmax(0, 1fr) )!important}#twe-root :where(.timeline>li){position:relative;display:grid;flex-shrink:0;align-items:center;grid-template-rows:var(--timeline-row-start, minmax(0, 1fr)) auto var( --timeline-row-end, minmax(0, 1fr) );grid-template-columns:var(--timeline-col-start, minmax(0, 1fr)) auto var( --timeline-col-end, minmax(0, 1fr) )}#twe-root .\\!timeline>li>hr{width:100%!important;border-width:0px!important}#twe-root .timeline>li>hr{width:100%;border-width:0px}#twe-root :where(.\\!timeline>li>hr):first-child{grid-column-start:1!important;grid-row-start:2!important}#twe-root :where(.timeline>li>hr):first-child{grid-column-start:1;grid-row-start:2}#twe-root :where(.\\!timeline>li>hr):last-child{grid-column-start:3!important;grid-column-end:none!important;grid-row-start:2!important;grid-row-end:auto!important}#twe-root :where(.timeline>li>hr):last-child{grid-column-start:3;grid-column-end:none;grid-row-start:2;grid-row-end:auto}#twe-root .toggle{flex-shrink:0;--tglbg: var(--fallback-b1,oklch(var(--b1)/1));--handleoffset: 24px;--handleoffsetcalculator: calc(var(--handleoffset) * -1);--togglehandleborder: 0 0;height:24px;width:48px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge, 30.4px);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input, .2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}#twe-root .alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}#twe-root .avatar-group :where(.avatar){overflow:hidden;border-radius:9999px;border-width:4px;--tw-border-opacity: 1;border-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-border-opacity)))}#twe-root .badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}#twe-root .badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}#twe-root .btm-nav>*:where(.\\!active){border-top-width:2px!important;--tw-bg-opacity: 1 !important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}#twe-root .btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .btm-nav>*.disabled,#twe-root .btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .btm-nav>* .label{font-size:16px;line-height:24px}@media(prefers-reduced-motion:no-preference){#twe-root .btn{animation:button-pop var(--animation-btn, .25s) ease-out}}#twe-root .btn:active:hover,#twe-root .btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){#twe-root .btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}#twe-root .btn-primary{--btn-color: var(--fallback-p)}#twe-root .btn-secondary{--btn-color: var(--fallback-s)}#twe-root .btn-accent{--btn-color: var(--fallback-a)}#twe-root .btn-neutral{--btn-color: var(--fallback-n)}#twe-root .btn-info{--btn-color: var(--fallback-in)}#twe-root .btn-success{--btn-color: var(--fallback-su)}#twe-root .btn-warning{--btn-color: var(--fallback-wa)}#twe-root .btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}#twe-root .btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}#twe-root .btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}#twe-root .btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}#twe-root .btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}#twe-root .btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}#twe-root .btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}#twe-root .btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}#twe-root .btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){#twe-root .btn-primary{--btn-color: var(--p)}#twe-root .btn-secondary{--btn-color: var(--s)}#twe-root .btn-accent{--btn-color: var(--a)}#twe-root .btn-neutral{--btn-color: var(--n)}#twe-root .btn-info{--btn-color: var(--in)}#twe-root .btn-success{--btn-color: var(--su)}#twe-root .btn-warning{--btn-color: var(--wa)}#twe-root .btn-error{--btn-color: var(--er)}}#twe-root .btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}#twe-root .btn-accent{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)));outline-color:var(--fallback-a,oklch(var(--a)/1))}#twe-root .btn-neutral{--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));outline-color:var(--fallback-n,oklch(var(--n)/1))}#twe-root .btn-info{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));outline-color:var(--fallback-in,oklch(var(--in)/1))}#twe-root .btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}#twe-root .btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}#twe-root .btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}#twe-root .btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}#twe-root .btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}#twe-root .btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}#twe-root .btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}#twe-root .btn.btn-disabled,#twe-root .btn[disabled],#twe-root .btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .btn:is(input[type=checkbox]:checked),#twe-root .btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}#twe-root .btn:is(input[type=checkbox]:checked):focus-visible,#twe-root .btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}#twe-root .card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}#twe-root .card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}#twe-root .card:focus-visible{outline:2px solid currentColor;outline-offset:2px}#twe-root .card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}#twe-root .card.compact .card-body{padding:16px;font-size:14px;line-height:20px}#twe-root .card-title{display:flex;align-items:center;gap:8px;font-size:20px;line-height:28px;font-weight:600}#twe-root .card.image-full :where(figure){overflow:hidden;border-radius:inherit}#twe-root .checkbox:focus{box-shadow:none}#twe-root .checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}#twe-root .checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}#twe-root .checkbox:checked,#twe-root .checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}#twe-root .checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}#twe-root .checkbox-accent{--chkbg: var(--fallback-a,oklch(var(--a)/1));--chkfg: var(--fallback-ac,oklch(var(--ac)/1));--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)))}#twe-root .checkbox-accent:focus-visible{outline-color:var(--fallback-a,oklch(var(--a)/1))}#twe-root .checkbox-accent:checked,#twe-root .checkbox-accent[aria-checked=true]{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}#twe-root .divider:not(:empty){gap:16px}#twe-root .dropdown.dropdown-open .dropdown-content,#twe-root .dropdown:focus .dropdown-content,#twe-root .dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .file-input-bordered{--tw-border-opacity: .2}#twe-root .file-input:focus{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .file-input-disabled,#twe-root .file-input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: .2}#twe-root .file-input-disabled::-moz-placeholder,#twe-root .file-input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .file-input-disabled::placeholder,#twe-root .file-input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .file-input-disabled::file-selector-button,#twe-root .file-input[disabled]::file-selector-button{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .label-text{font-size:14px;line-height:20px;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root .input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}#twe-root .input input:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .input[list]::-webkit-calendar-picker-indicator{line-height:1em}#twe-root .input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .input:focus,#twe-root .input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .input:has(>input[disabled]),#twe-root .input-disabled,#twe-root .input:disabled,#twe-root .input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}#twe-root .input:has(>input[disabled])::-moz-placeholder,#twe-root .input-disabled::-moz-placeholder,#twe-root .input:disabled::-moz-placeholder,#twe-root .input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .input:has(>input[disabled])::placeholder,#twe-root .input-disabled::placeholder,#twe-root .input:disabled::placeholder,#twe-root .input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .input:has(>input[disabled])>input[disabled]{cursor:not-allowed}#twe-root .input::-webkit-date-and-time-value{text-align:inherit}#twe-root .join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}#twe-root .join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}#twe-root .join-item:focus{isolation:isolate}#twe-root .link-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){@media(hover:hover){#twe-root .link-primary:hover{color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 80%,black)}}}#twe-root .link:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .link:focus-visible{outline:2px solid currentColor;outline-offset:2px}#twe-root .loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:24px;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}#twe-root .loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}#twe-root .loading-xs{width:16px}#twe-root .loading-sm{width:20px}#twe-root :where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:8px 16px;height:1px}#twe-root .menu :where(li ul):before{position:absolute;bottom:12px;inset-inline-start:0px;top:12px;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:""}#twe-root .menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),#twe-root .menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, 8px);padding:8px 16px;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}#twe-root .menu li>*:not(ul,.menu-title,details,.btn):active,#twe-root .menu li>*:not(ul,.menu-title,details,.btn).active,#twe-root .menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}#twe-root .menu li>*:not(ul,.menu-title,details,.btn).\\!active{--tw-bg-opacity: 1 !important;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)))!important;--tw-text-opacity: 1 !important;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))!important}#twe-root .menu :where(li>details>summary)::-webkit-details-marker{display:none}#twe-root .menu :where(li>details>summary):after,#twe-root .menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-8px;height:8px;width:8px;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:"";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}#twe-root .menu :where(li>details[open]>summary):after,#twe-root .menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}#twe-root .mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}#twe-root .mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:28px;width:384px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:32px;direction:ltr}#twe-root .mockup-browser .mockup-browser-toolbar .input:before{content:"";position:absolute;left:8px;top:50%;aspect-ratio:1 / 1;height:12px;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}#twe-root .mockup-browser .mockup-browser-toolbar .input:after{content:"";position:absolute;left:20px;top:50%;height:8px;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}#twe-root .modal:not(dialog:not(.modal-open)),#twe-root .modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}#twe-root .modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}#twe-root .modal-open .modal-box,#twe-root .modal-toggle:checked+.modal .modal-box,#twe-root .modal:target .modal-box,#twe-root .modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes modal-pop{0%{opacity:0}}#twe-root .progress::-moz-progress-bar{border-radius:var(--rounded-box, 16px);background-color:currentColor}#twe-root .progress-primary::-moz-progress-bar{border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}#twe-root .progress-secondary::-moz-progress-bar{border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)))}#twe-root .progress:indeterminate{--progress-color: var(--fallback-bc,oklch(var(--bc)/1));background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}#twe-root .progress-primary:indeterminate{--progress-color: var(--fallback-p,oklch(var(--p)/1))}#twe-root .progress-secondary:indeterminate{--progress-color: var(--fallback-s,oklch(var(--s)/1))}#twe-root .progress::-webkit-progress-bar{border-radius:var(--rounded-box, 16px);background-color:transparent}#twe-root .progress::-webkit-progress-value{border-radius:var(--rounded-box, 16px);background-color:currentColor}#twe-root .progress-primary::-webkit-progress-value{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}#twe-root .progress-secondary::-webkit-progress-value{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)))}#twe-root .progress:indeterminate::-moz-progress-bar{background-color:transparent;background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}@keyframes progress-loading{50%{background-position-x:-115%}}#twe-root .radio:focus{box-shadow:none}#twe-root .radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}#twe-root .radio:checked,#twe-root .radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}#twe-root .radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}#twe-root .range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 32px var(--range-shdw) inset}#twe-root .range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 32px var(--range-shdw) inset}#twe-root .range::-webkit-slider-runnable-track{height:8px;width:100%;border-radius:var(--rounded-box, 16px);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}#twe-root .range::-moz-range-track{height:8px;width:100%;border-radius:var(--rounded-box, 16px);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}#twe-root .range::-webkit-slider-thumb{position:relative;height:24px;width:24px;border-radius:var(--rounded-box, 16px);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));-moz-appearance:none;appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 1600px;--filler-offset: 9.6px;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}#twe-root .range::-moz-range-thumb{position:relative;height:24px;width:24px;border-radius:var(--rounded-box, 16px);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 1600px;--filler-offset: 8px;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}#twe-root .select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .select-disabled,#twe-root .select:disabled,#twe-root .select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}#twe-root .select-disabled::-moz-placeholder,#twe-root .select:disabled::-moz-placeholder,#twe-root .select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .select-disabled::placeholder,#twe-root .select:disabled::placeholder,#twe-root .select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .select-multiple,#twe-root .select[multiple],#twe-root .select[size].select:not([size="1"]){background-image:none;padding-right:16px}#twe-root [dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}#twe-root :where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}#twe-root [dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}#twe-root .tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}#twe-root .tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),#twe-root .tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 1;--tw-text-opacity: 1}#twe-root .tab:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}#twe-root .tab-disabled,#twe-root .tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}#twe-root .tabs-lifted>.tab{border:var(--tab-border, 1px) solid transparent;border-width:0 0 var(--tab-border, 1px) 0;border-start-start-radius:var(--tab-radius, 8px);border-start-end-radius:var(--tab-radius, 8px);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding, 16px);padding-inline-end:var(--tab-padding, 16px);padding-top:var(--tab-border, 1px)}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),#twe-root .tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 16px) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 16px) - var(--tab-border, 1px));padding-bottom:var(--tab-border, 1px);padding-top:0}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,#twe-root .tabs-lifted>.tab:is(input:checked):before{z-index:1;content:"";display:block;position:absolute;width:calc(100% + var(--tab-radius, 8px) * 2);height:var(--tab-radius, 8px);bottom:0;background-size:var(--tab-radius, 8px);background-position:top left,top right;background-repeat:no-repeat;--tab-grad: calc(69% - var(--tab-border, 1px));--radius-start: radial-gradient( circle at top left, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );--radius-end: radial-gradient( circle at top right, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );background-image:var(--radius-start),var(--radius-end)}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,#twe-root .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:top right}#twe-root [dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,#twe-root [dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:top left}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,#twe-root .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:top left}#twe-root [dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,#twe-root [dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:top right}#twe-root .tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,#twe-root .tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before{background-image:var(--radius-end);background-position:top right}#twe-root .tabs-boxed .tab{border-radius:var(--rounded-btn, 8px)}#twe-root .\\!table:where([dir=rtl],[dir=rtl] *){text-align:right!important}#twe-root .table:where([dir=rtl],[dir=rtl] *){text-align:right}#twe-root .\\!table :where(th,td){padding:12px 16px!important;vertical-align:middle!important}#twe-root .table :where(th,td){padding:12px 16px;vertical-align:middle}#twe-root .table tr.active,#twe-root .table tr.active:nth-child(2n),#twe-root .table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}#twe-root .\\!table tr.active,#twe-root .\\!table tr.active:nth-child(2n){--tw-bg-opacity: 1 !important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important}#twe-root .table tr.\\!active,#twe-root .table tr.\\!active:nth-child(2n){--tw-bg-opacity: 1 !important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important}#twe-root .table-zebra tr.active,#twe-root .table-zebra tr.active:nth-child(2n),#twe-root .table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}#twe-root .table-zebra tr.\\!active,#twe-root .table-zebra tr.\\!active:nth-child(2n){--tw-bg-opacity: 1 !important;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))!important}#twe-root .\\!table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px!important;--tw-border-opacity: 1 !important;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))!important}#twe-root .table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}#twe-root .\\!table :where(thead,tfoot){white-space:nowrap!important;font-size:12px!important;line-height:16px!important;font-weight:700!important;color:var(--fallback-bc,oklch(var(--bc)/.6))!important}#twe-root .table :where(thead,tfoot){white-space:nowrap;font-size:12px;line-height:16px;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}#twe-root .\\!table :where(tfoot){border-top-width:1px!important;--tw-border-opacity: 1 !important;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))!important}#twe-root .table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}#twe-root .textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .textarea-disabled,#twe-root .textarea:disabled,#twe-root .textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}#twe-root .textarea-disabled::-moz-placeholder,#twe-root .textarea:disabled::-moz-placeholder,#twe-root .textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .textarea-disabled::placeholder,#twe-root .textarea:disabled::placeholder,#twe-root .textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .\\!timeline hr{height:4px!important}#twe-root .timeline hr{height:4px}#twe-root :where(.\\!timeline hr){--tw-bg-opacity: 1 !important;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))!important}#twe-root :where(.timeline hr){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}#twe-root :where(.\\!timeline:has(.timeline-middle) hr):first-child{border-start-end-radius:var(--rounded-badge, 30.4px)!important;border-end-end-radius:var(--rounded-badge, 30.4px)!important;border-start-start-radius:0px!important;border-end-start-radius:0px!important}#twe-root :where(.timeline:has(.timeline-middle) hr):first-child{border-start-end-radius:var(--rounded-badge, 30.4px);border-end-end-radius:var(--rounded-badge, 30.4px);border-start-start-radius:0px;border-end-start-radius:0px}#twe-root :where(.\\!timeline:has(.timeline-middle) hr):last-child{border-start-start-radius:var(--rounded-badge, 30.4px)!important;border-end-start-radius:var(--rounded-badge, 30.4px)!important;border-start-end-radius:0px!important;border-end-end-radius:0px!important}#twe-root :where(.timeline:has(.timeline-middle) hr):last-child{border-start-start-radius:var(--rounded-badge, 30.4px);border-end-start-radius:var(--rounded-badge, 30.4px);border-start-end-radius:0px;border-end-end-radius:0px}#twe-root :where(.\\!timeline:not(:has(.timeline-middle)) :first-child hr:last-child){border-start-start-radius:var(--rounded-badge, 30.4px)!important;border-end-start-radius:var(--rounded-badge, 30.4px)!important;border-start-end-radius:0px!important;border-end-end-radius:0px!important}#twe-root :where(.timeline:not(:has(.timeline-middle)) :first-child hr:last-child){border-start-start-radius:var(--rounded-badge, 30.4px);border-end-start-radius:var(--rounded-badge, 30.4px);border-start-end-radius:0px;border-end-end-radius:0px}#twe-root :where(.\\!timeline:not(:has(.timeline-middle)) :last-child hr:first-child){border-start-end-radius:var(--rounded-badge, 30.4px)!important;border-end-end-radius:var(--rounded-badge, 30.4px)!important;border-start-start-radius:0px!important;border-end-start-radius:0px!important}#twe-root :where(.timeline:not(:has(.timeline-middle)) :last-child hr:first-child){border-start-end-radius:var(--rounded-badge, 30.4px);border-end-end-radius:var(--rounded-badge, 30.4px);border-start-start-radius:0px;border-end-start-radius:0px}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}#twe-root [dir=rtl] .toggle{--handleoffsetcalculator: calc(var(--handleoffset) * 1)}#twe-root .toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .toggle:hover{background-color:currentColor}#twe-root .toggle:checked,#twe-root .toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator: var(--handleoffset);--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root [dir=rtl] .toggle:checked,#twe-root [dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator: calc(var(--handleoffset) * -1)}#twe-root .toggle:indeterminate{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}#twe-root [dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}#twe-root .toggle-primary:focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}#twe-root .toggle-primary:checked,#twe-root .toggle-primary[aria-checked=true]{border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}#twe-root .toggle-secondary:focus-visible{outline-color:var(--fallback-s,oklch(var(--s)/1))}#twe-root .toggle-secondary:checked,#twe-root .toggle-secondary[aria-checked=true]{border-color:var(--fallback-s,oklch(var(--s)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}#twe-root .toggle-warning:focus-visible{outline-color:var(--fallback-wa,oklch(var(--wa)/1))}#twe-root .toggle-warning:checked,#twe-root .toggle-warning[aria-checked=true]{border-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}#twe-root .toggle:disabled{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset, var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}#twe-root .badge-xs{height:12px;font-size:12px;line-height:12px;padding-left:5.008px;padding-right:5.008px}#twe-root .badge-sm{height:16px;font-size:12px;line-height:16px;padding-left:7.008px;padding-right:7.008px}#twe-root .btm-nav-xs>*:where(.\\!active){border-top-width:1px!important}#twe-root .btm-nav-xs>*:where(.active){border-top-width:1px}#twe-root .btm-nav-sm>*:where(.\\!active){border-top-width:2px!important}#twe-root .btm-nav-sm>*:where(.active){border-top-width:2px}#twe-root .btm-nav-md>*:where(.\\!active){border-top-width:2px!important}#twe-root .btm-nav-md>*:where(.active){border-top-width:2px}#twe-root .btm-nav-lg>*:where(.\\!active){border-top-width:4px!important}#twe-root .btm-nav-lg>*:where(.active){border-top-width:4px}#twe-root .btn-xs{height:24px;min-height:24px;padding-left:8px;padding-right:8px;font-size:12px}#twe-root .btn-sm{height:32px;min-height:32px;padding-left:12px;padding-right:12px;font-size:14px}#twe-root .btn-square:where(.btn-xs){height:24px;width:24px;padding:0}#twe-root .btn-square:where(.btn-sm){height:32px;width:32px;padding:0}#twe-root .btn-circle:where(.btn-xs){height:24px;width:24px;border-radius:9999px;padding:0}#twe-root .btn-circle:where(.btn-sm){height:32px;width:32px;border-radius:9999px;padding:0}#twe-root [type=checkbox].checkbox-xs{height:16px;width:16px}#twe-root [type=checkbox].checkbox-sm{height:20px;width:20px}#twe-root .file-input-sm{height:32px;padding-inline-end:12px;font-size:14px;line-height:20px;line-height:2}#twe-root .file-input-sm::file-selector-button{margin-right:12px;font-size:14px}#twe-root .input-xs{height:24px;padding-left:8px;padding-right:8px;font-size:12px;line-height:16px;line-height:1.625}#twe-root .input-sm{height:32px;padding-left:12px;padding-right:12px;font-size:14px;line-height:32px}#twe-root .join.join-vertical{flex-direction:column}#twe-root .join.join-vertical .join-item:first-child:not(:last-child),#twe-root .join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}#twe-root .join.join-vertical .join-item:last-child:not(:first-child),#twe-root .join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}#twe-root .join.join-horizontal{flex-direction:row}#twe-root .join.join-horizontal .join-item:first-child:not(:last-child),#twe-root .join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}#twe-root .join.join-horizontal .join-item:last-child:not(:first-child),#twe-root .join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}#twe-root [type=radio].radio-sm{height:20px;width:20px}#twe-root .select-sm{height:32px;min-height:32px;padding-left:12px;padding-right:32px;font-size:14px;line-height:32px}#twe-root [dir=rtl] .select-sm{padding-left:32px;padding-right:12px}#twe-root .select-xs{height:24px;min-height:24px;padding-left:8px;padding-right:32px;font-size:12px;line-height:16px;line-height:1.625}#twe-root [dir=rtl] .select-xs{padding-left:32px;padding-right:8px}#twe-root .tabs-md :where(.tab){height:32px;font-size:14px;line-height:20px;line-height:2;--tab-padding: 16px}#twe-root .tabs-lg :where(.tab){height:48px;font-size:18px;line-height:28px;line-height:2;--tab-padding: 20px}#twe-root .tabs-sm :where(.tab){height:24px;font-size:14px;line-height:12px;--tab-padding: 12px}#twe-root .tabs-xs :where(.tab){height:20px;font-size:12px;line-height:12px;--tab-padding: 8px}#twe-root .textarea-sm{padding:4px 12px;font-size:14px;line-height:32px}#twe-root [type=checkbox].toggle-xs{--handleoffset: 8px;height:16px;width:24px}#twe-root [type=checkbox].toggle-sm{--handleoffset: 12px;height:20px;width:32px}#twe-root .tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}#twe-root .tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}#twe-root .tooltip:before,#twe-root .tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}#twe-root .tooltip-bottom:before{transform:translate(-50%);top:var(--tooltip-offset);left:50%;right:auto;bottom:auto}#twe-root .avatar.online:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}#twe-root .avatar.offline:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}#twe-root .card-compact .card-body{padding:16px;font-size:14px;line-height:20px}#twe-root .card-compact .card-title{margin-bottom:4px}#twe-root .card-normal .card-body{padding:var(--padding-card, 32px);font-size:16px;line-height:24px}#twe-root .card-normal .card-title{margin-bottom:12px}#twe-root .join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}#twe-root .join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}#twe-root .join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}#twe-root .join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}#twe-root .menu-sm :where(li:not(.menu-title)>*:not(ul,details,.menu-title)),#twe-root .menu-sm :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, 8px);padding:4px 12px;font-size:14px;line-height:20px}#twe-root .menu-sm .menu-title{padding:8px 12px}#twe-root .modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -40px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 16px);border-bottom-left-radius:var(--rounded-box, 16px);border-top-left-radius:0;border-top-right-radius:0}#twe-root .modal-middle :where(.modal-box){width:91.666667%;max-width:512px;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 16px);border-top-right-radius:var(--rounded-box, 16px);border-bottom-right-radius:var(--rounded-box, 16px);border-bottom-left-radius:var(--rounded-box, 16px)}#twe-root .modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 40px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 16px);border-top-right-radius:var(--rounded-box, 16px);border-bottom-right-radius:0;border-bottom-left-radius:0}#twe-root .table-xs :not(thead):not(tfoot) tr{font-size:12px;line-height:16px}#twe-root .table-xs :where(th,td){padding:4px 8px}#twe-root .table-sm :not(thead):not(tfoot) tr{font-size:14px;line-height:20px}#twe-root .table-sm :where(th,td){padding:8px 12px}#twe-root .tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: 3px;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + 1px - var(--tooltip-tail))}#twe-root .tooltip:before,#twe-root .tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}#twe-root .tooltip:after{position:absolute;content:"";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}#twe-root .tooltip:before{max-width:320px;white-space:normal;border-radius:4px;padding:4px 8px;font-size:14px;line-height:20px;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}#twe-root .tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}#twe-root .tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}#twe-root .tooltip:hover:before{opacity:1;transition-delay:75ms}#twe-root .tooltip:hover:after{opacity:1;transition-delay:75ms}#twe-root .tooltip:has(:focus-visible):after,#twe-root .tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}#twe-root .tooltip:not([data-tip]):hover:before,#twe-root .tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}#twe-root .tooltip:after,#twe-root .tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}#twe-root .tooltip-bottom:after{transform:translate(-50%);border-color:transparent transparent var(--tooltip-color) transparent;top:var(--tooltip-tail-offset);left:50%;right:auto;bottom:auto}#twe-root .pointer-events-none{pointer-events:none}#twe-root .visible{visibility:visible}#twe-root .static{position:static}#twe-root .fixed{position:fixed}#twe-root .absolute{position:absolute}#twe-root .relative{position:relative}#twe-root .sticky{position:sticky}#twe-root .inset-0{top:0;right:0;bottom:0;left:0}#twe-root .inset-x-0{left:0;right:0}#twe-root .bottom-0{bottom:0}#twe-root .bottom-0\\.5{bottom:2px}#twe-root .bottom-14{bottom:56px}#twe-root .left-0\\.5{left:2px}#twe-root .left-8{left:32px}#twe-root .left-\\[-20px\\]{left:-20px}#twe-root .right-2{right:8px}#twe-root .right-3{right:12px}#twe-root .top-0{top:0}#twe-root .top-3{top:12px}#twe-root .top-8{top:32px}#twe-root .top-\\[60\\%\\]{top:60%}#twe-root .z-10{z-index:10}#twe-root .z-20{z-index:20}#twe-root .z-\\[2147483647\\]{z-index:2147483647}#twe-root .z-\\[2\\]{z-index:2}#twe-root .z-\\[6000\\]{z-index:6000}#twe-root .col-span-1{grid-column:span 1 / span 1}#twe-root .col-span-2{grid-column:span 2 / span 2}#twe-root .col-span-3{grid-column:span 3 / span 3}#twe-root .m-0{margin:0}#twe-root .mx-4{margin-left:16px;margin-right:16px}#twe-root .my-1{margin-top:4px;margin-bottom:4px}#twe-root .my-3{margin-top:12px;margin-bottom:12px}#twe-root .my-\\[2px\\]{margin-top:2px;margin-bottom:2px}#twe-root .-ml-2{margin-left:-8px}#twe-root .mb-0{margin-bottom:0}#twe-root .mb-0\\.5{margin-bottom:2px}#twe-root .mb-1{margin-bottom:4px}#twe-root .mb-1\\.5{margin-bottom:6px}#twe-root .mb-2{margin-bottom:8px}#twe-root .mb-3{margin-bottom:12px}#twe-root .mb-4{margin-bottom:16px}#twe-root .ml-0\\.5{margin-left:2px}#twe-root .ml-1{margin-left:4px}#twe-root .ml-2{margin-left:8px}#twe-root .ml-4{margin-left:16px}#twe-root .ml-auto{margin-left:auto}#twe-root .mr-1{margin-right:4px}#twe-root .mr-2{margin-right:8px}#twe-root .mr-3{margin-right:12px}#twe-root .mt-0{margin-top:0}#twe-root .mt-0\\.5{margin-top:2px}#twe-root .mt-1{margin-top:4px}#twe-root .mt-1\\.5{margin-top:6px}#twe-root .mt-2{margin-top:8px}#twe-root .mt-3{margin-top:12px}#twe-root .mt-6{margin-top:24px}#twe-root .line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}#twe-root .line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}#twe-root .block{display:block}#twe-root .inline-block{display:inline-block}#twe-root .\\!inline{display:inline!important}#twe-root .inline{display:inline}#twe-root .flex{display:flex}#twe-root .inline-flex{display:inline-flex}#twe-root .\\!table{display:table!important}#twe-root .table{display:table}#twe-root .grid{display:grid}#twe-root .contents{display:contents}#twe-root .hidden{display:none}#twe-root .h-11{height:44px}#twe-root .h-12{height:48px}#twe-root .h-20{height:80px}#twe-root .h-28{height:112px}#twe-root .h-36{height:144px}#twe-root .h-4{height:16px}#twe-root .h-5{height:20px}#twe-root .h-6{height:24px}#twe-root .h-8{height:32px}#twe-root .h-9{height:36px}#twe-root .h-\\[320px\\]{height:320px}#twe-root .h-\\[82vh\\]{height:82vh}#twe-root .h-\\[min\\(88vh\\,860px\\)\\]{height:min(88vh,860px)}#twe-root .h-\\[min\\(92vh\\,980px\\)\\]{height:min(92vh,980px)}#twe-root .h-auto{height:auto}#twe-root .h-full{height:100%}#twe-root .h-screen{height:100vh}#twe-root .max-h-44{max-height:176px}#twe-root .max-h-48{max-height:192px}#twe-root .max-h-52{max-height:208px}#twe-root .max-h-56{max-height:224px}#twe-root .max-h-72{max-height:288px}#twe-root .max-h-80{max-height:320px}#twe-root .max-h-\\[460px\\]{max-height:460px}#twe-root .max-h-\\[500px\\]{max-height:500px}#twe-root .max-h-\\[88vh\\]{max-height:88vh}#twe-root .max-h-\\[92vh\\]{max-height:92vh}#twe-root .max-h-\\[calc\\(100vh-4rem\\)\\]{max-height:calc(100vh - 64px)}#twe-root .max-h-full{max-height:100%}#twe-root .max-h-screen{max-height:100vh}#twe-root .min-h-0{min-height:0px}#twe-root .min-h-16{min-height:64px}#twe-root .min-h-6{min-height:24px}#twe-root .min-h-9{min-height:36px}#twe-root .min-h-\\[512px\\]{min-height:512px}#twe-root .min-h-\\[560px\\]{min-height:560px}#twe-root .w-12{width:48px}#twe-root .w-20{width:80px}#twe-root .w-24{width:96px}#twe-root .w-28{width:112px}#twe-root .w-32{width:128px}#twe-root .w-36{width:144px}#twe-root .w-4{width:16px}#twe-root .w-40{width:160px}#twe-root .w-44{width:176px}#twe-root .w-48{width:192px}#twe-root .w-52{width:208px}#twe-root .w-56{width:224px}#twe-root .w-60{width:240px}#twe-root .w-8{width:32px}#twe-root .w-80{width:320px}#twe-root .w-9{width:36px}#twe-root .w-\\[min\\(92vw\\,1040px\\)\\]{width:min(92vw,1040px)}#twe-root .w-\\[min\\(96vw\\,1480px\\)\\]{width:min(96vw,1480px)}#twe-root .w-auto{width:auto}#twe-root .w-full{width:100%}#twe-root .w-max{width:-moz-max-content;width:max-content}#twe-root .w-screen{width:100vw}#twe-root .min-w-0{min-width:0px}#twe-root .min-w-44{min-width:176px}#twe-root .min-w-56{min-width:224px}#twe-root .max-w-2xl{max-width:672px}#twe-root .max-w-3xl{max-width:768px}#twe-root .max-w-4xl{max-width:896px}#twe-root .max-w-\\[50\\%\\]{max-width:50%}#twe-root .max-w-\\[92vw\\]{max-width:92vw}#twe-root .max-w-\\[96vw\\]{max-width:96vw}#twe-root .max-w-\\[calc\\(100\\%-46px\\)\\]{max-width:calc(100% - 46px)}#twe-root .max-w-full{max-width:100%}#twe-root .max-w-lg{max-width:512px}#twe-root .max-w-md{max-width:448px}#twe-root .max-w-none{max-width:none}#twe-root .max-w-sm{max-width:384px}#twe-root .max-w-xl{max-width:576px}#twe-root .max-w-xs{max-width:320px}#twe-root .flex-1{flex:1 1 0%}#twe-root .flex-shrink-0,#twe-root .shrink-0{flex-shrink:0}#twe-root .flex-grow,#twe-root .grow{flex-grow:1}#twe-root .table-fixed{table-layout:fixed}#twe-root .origin-\\[bottom_center\\]{transform-origin:bottom center}#twe-root .translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .translate-x-\\[-500px\\]{--tw-translate-x: -500px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .transform-none{transform:none}@keyframes ping{75%,to{transform:scale(2);opacity:0}}#twe-root .animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}#twe-root .cursor-grab{cursor:grab}#twe-root .cursor-pointer{cursor:pointer}#twe-root .cursor-zoom-in{cursor:zoom-in}#twe-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#twe-root .resize{resize:both}#twe-root .list-decimal{list-style-type:decimal}#twe-root .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}#twe-root .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}#twe-root .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}#twe-root .grid-cols-\\[auto_minmax\\(auto\\,1fr\\)\\]{grid-template-columns:auto minmax(auto,1fr)}#twe-root .flex-row{flex-direction:row}#twe-root .flex-col{flex-direction:column}#twe-root .flex-wrap{flex-wrap:wrap}#twe-root .items-start{align-items:flex-start}#twe-root .items-end{align-items:flex-end}#twe-root .items-center{align-items:center}#twe-root .items-baseline{align-items:baseline}#twe-root .justify-start{justify-content:flex-start}#twe-root .justify-end{justify-content:flex-end}#twe-root .justify-center{justify-content:center}#twe-root .justify-between{justify-content:space-between}#twe-root .gap-1{gap:4px}#twe-root .gap-2{gap:8px}#twe-root .gap-3{gap:12px}#twe-root .gap-4{gap:16px}#twe-root .gap-x-3{-moz-column-gap:12px;column-gap:12px}#twe-root .gap-y-1{row-gap:4px}#twe-root .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}#twe-root .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(8px * var(--tw-space-x-reverse));margin-left:calc(8px * calc(1 - var(--tw-space-x-reverse)))}#twe-root .space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2px * var(--tw-space-y-reverse))}#twe-root .space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}#twe-root .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}#twe-root .overflow-auto{overflow:auto}#twe-root .overflow-hidden{overflow:hidden}#twe-root .overflow-visible{overflow:visible}#twe-root .overflow-scroll{overflow:scroll}#twe-root .overflow-x-auto{overflow-x:auto}#twe-root .overflow-y-auto{overflow-y:auto}#twe-root .overflow-x-scroll{overflow-x:scroll}#twe-root .overflow-y-scroll{overflow-y:scroll}#twe-root .overscroll-contain{overscroll-behavior:contain}#twe-root .overscroll-none{overscroll-behavior:none}#twe-root .scroll-smooth{scroll-behavior:smooth}#twe-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#twe-root .whitespace-normal{white-space:normal}#twe-root .whitespace-nowrap{white-space:nowrap}#twe-root .whitespace-pre{white-space:pre}#twe-root .whitespace-pre-line{white-space:pre-line}#twe-root .whitespace-pre-wrap{white-space:pre-wrap}#twe-root .break-words{overflow-wrap:break-word}#twe-root .break-all{word-break:break-all}#twe-root .rounded{border-radius:4px}#twe-root .rounded-\\[20px\\]{border-radius:20px}#twe-root .rounded-\\[2px\\]{border-radius:2px}#twe-root .rounded-box{border-radius:var(--rounded-box, 16px)}#twe-root .rounded-full{border-radius:9999px}#twe-root .rounded-md{border-radius:6px}#twe-root .rounded-none{border-radius:0}#twe-root .border{border-width:1px}#twe-root .border-0{border-width:0px}#twe-root .border-b{border-bottom-width:1px}#twe-root .border-l-2{border-left-width:2px}#twe-root .border-t{border-top-width:1px}#twe-root .border-solid{border-style:solid}#twe-root .border-accent\\/40{border-color:var(--fallback-a,oklch(var(--a)/.4))}#twe-root .border-accent\\/50{border-color:var(--fallback-a,oklch(var(--a)/.5))}#twe-root .border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}#twe-root .border-info\\/50{border-color:var(--fallback-in,oklch(var(--in)/.5))}#twe-root .border-neutral-content{--tw-border-opacity: 1;border-color:var(--fallback-nc,oklch(var(--nc)/var(--tw-border-opacity, 1)))}#twe-root .border-success\\/50{border-color:var(--fallback-su,oklch(var(--su)/.5))}#twe-root .border-warning{--tw-border-opacity: 1;border-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-border-opacity, 1)))}#twe-root .border-warning\\/40{border-color:var(--fallback-wa,oklch(var(--wa)/.4))}#twe-root .border-warning\\/60{border-color:var(--fallback-wa,oklch(var(--wa)/.6))}#twe-root .border-opacity-50{--tw-border-opacity: .5}#twe-root .bg-accent{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity, 1)))}#twe-root .bg-accent\\/10{background-color:var(--fallback-a,oklch(var(--a)/.1))}#twe-root .bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}#twe-root .bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}#twe-root .bg-base-200\\/50{background-color:var(--fallback-b2,oklch(var(--b2)/.5))}#twe-root .bg-base-200\\/60{background-color:var(--fallback-b2,oklch(var(--b2)/.6))}#twe-root .bg-base-200\\/70{background-color:var(--fallback-b2,oklch(var(--b2)/.7))}#twe-root .bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}#twe-root .bg-base-300\\/90{background-color:var(--fallback-b3,oklch(var(--b3)/.9))}#twe-root .bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}#twe-root .bg-black\\/40{background-color:#0006}#twe-root .bg-info{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity, 1)))}#twe-root .bg-neutral{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity, 1)))}#twe-root .bg-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity, 1)))}#twe-root .bg-secondary{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity, 1)))}#twe-root .bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}#twe-root .bg-transparent{background-color:transparent}#twe-root .bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}#twe-root .bg-warning\\/10{background-color:var(--fallback-wa,oklch(var(--wa)/.1))}#twe-root .bg-warning\\/30{background-color:var(--fallback-wa,oklch(var(--wa)/.3))}#twe-root .bg-opacity-30{--tw-bg-opacity: .3}#twe-root .bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}#twe-root .bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}#twe-root .from-base-100{--tw-gradient-from: var(--fallback-b1,oklch(var(--b1)/1)) var(--tw-gradient-from-position);--tw-gradient-to: var(--fallback-b1,oklch(var(--b1)/0)) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}#twe-root .from-black\\/70{--tw-gradient-from: rgb(0 0 0 / .7) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}#twe-root .via-black\\/20{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(0 0 0 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}#twe-root .to-base-200\\/80{--tw-gradient-to: var(--fallback-b2,oklch(var(--b2)/.8)) var(--tw-gradient-to-position)}#twe-root .to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}#twe-root .object-contain{-o-object-fit:contain;object-fit:contain}#twe-root .object-cover{-o-object-fit:cover;object-fit:cover}#twe-root .\\!p-0{padding:0!important}#twe-root .p-0{padding:0}#twe-root .p-2{padding:8px}#twe-root .p-3{padding:12px}#twe-root .p-4{padding:16px}#twe-root .p-6{padding:24px}#twe-root .px-0\\.5{padding-left:2px;padding-right:2px}#twe-root .px-1{padding-left:4px;padding-right:4px}#twe-root .px-1\\.5{padding-left:6px;padding-right:6px}#twe-root .px-2{padding-left:8px;padding-right:8px}#twe-root .px-3{padding-left:12px;padding-right:12px}#twe-root .px-4{padding-left:16px;padding-right:16px}#twe-root .px-\\[1px\\]{padding-left:1px;padding-right:1px}#twe-root .py-0{padding-top:0;padding-bottom:0}#twe-root .py-1{padding-top:4px;padding-bottom:4px}#twe-root .py-1\\.5{padding-top:6px;padding-bottom:6px}#twe-root .py-2{padding-top:8px;padding-bottom:8px}#twe-root .py-2\\.5{padding-top:10px;padding-bottom:10px}#twe-root .py-3{padding-top:12px;padding-bottom:12px}#twe-root .pb-2{padding-bottom:8px}#twe-root .pb-3{padding-bottom:12px}#twe-root .pl-2{padding-left:8px}#twe-root .pl-4{padding-left:16px}#twe-root .pl-5{padding-left:20px}#twe-root .pr-1{padding-right:4px}#twe-root .pr-2{padding-right:8px}#twe-root .pt-1{padding-top:4px}#twe-root .pt-8{padding-top:32px}#twe-root .text-left{text-align:left}#twe-root .text-center{text-align:center}#twe-root .align-top{vertical-align:top}#twe-root .align-middle{vertical-align:middle}#twe-root .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}#twe-root .text-\\[10px\\]{font-size:10px}#twe-root .text-\\[11px\\]{font-size:11px}#twe-root .text-base{font-size:16px;line-height:24px}#twe-root .text-lg{font-size:18px;line-height:28px}#twe-root .text-sm{font-size:14px;line-height:20px}#twe-root .text-xl{font-size:20px;line-height:28px}#twe-root .text-xs{font-size:12px;line-height:16px}#twe-root .font-bold{font-weight:700}#twe-root .font-medium{font-weight:500}#twe-root .font-normal{font-weight:400}#twe-root .font-semibold{font-weight:600}#twe-root .uppercase{text-transform:uppercase}#twe-root .leading-4{line-height:16px}#twe-root .leading-5{line-height:20px}#twe-root .leading-6{line-height:24px}#twe-root .leading-8{line-height:32px}#twe-root .leading-\\[48px\\]{line-height:48px}#twe-root .leading-loose{line-height:2}#twe-root .leading-none{line-height:1}#twe-root .leading-normal{line-height:1.5}#twe-root .leading-tight{line-height:1.25}#twe-root .tracking-\\[0\\.01em\\]{letter-spacing:.01em}#twe-root .tracking-\\[0\\.08em\\]{letter-spacing:.08em}#twe-root .text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}#twe-root .text-base-content\\/50{color:var(--fallback-bc,oklch(var(--bc)/.5))}#twe-root .text-base-content\\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}#twe-root .text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity, 1)))}#twe-root .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}#twe-root .text-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity, 1)))}#twe-root .text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}#twe-root .text-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity, 1)))}#twe-root .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}#twe-root .text-opacity-50{--tw-text-opacity: .5}#twe-root .text-opacity-60{--tw-text-opacity: .6}#twe-root .text-opacity-70{--tw-text-opacity: .7}#twe-root .opacity-50{opacity:.5}#twe-root .opacity-60{opacity:.6}#twe-root .opacity-65{opacity:.65}#twe-root .opacity-70{opacity:.7}#twe-root .opacity-75{opacity:.75}#twe-root .opacity-80{opacity:.8}#twe-root .opacity-90{opacity:.9}#twe-root .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}#twe-root .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#twe-root .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .duration-150{transition-duration:.15s}#twe-root .duration-200{transition-duration:.2s}#twe-root .duration-300{transition-duration:.3s}#twe-root .duration-500{transition-duration:.5s}#twe-root .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}#twe-root .rounded-box-half{border-radius:calc(var(--rounded-box) / 2)}#twe-root .table-border-bc :where(thead,tbody) :where(tr:not(:last-child)),#twe-root .table-border-bc :where(thead,tbody) :where(tr:first-child:last-child){--tw-border-opacity: 20%;border-bottom-width:1px;border-bottom-color:var(--fallback-bc, oklch(var(--bc) / var(--tw-border-opacity)))}#twe-root .table-padding-sm :where(th,td){padding:8px 12px}#twe-root .scrollmark-table-cell{min-width:0;max-width:0;overflow-wrap:anywhere;word-break:break-word;vertical-align:top}#twe-root .scrollmark-table-cell-content{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}#twe-root .scrollmark-table-cell-content :where(a,p,span,div,code,pre){max-width:100%;overflow-wrap:anywhere;word-break:break-word}#twe-root .scrollmark-table-cell-content :where(.whitespace-pre,.whitespace-pre-wrap){white-space:pre-wrap}#twe-root .no-scrollbar::-webkit-scrollbar{display:none}#twe-root .no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}#twe-root .before\\:max-w-40:before{content:var(--tw-content);max-width:160px}#twe-root .before\\:max-w-max:before{content:var(--tw-content);max-width:-moz-max-content;max-width:max-content}#twe-root .before\\:whitespace-pre-line:before{content:var(--tw-content);white-space:pre-line}#twe-root .hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}#twe-root .active\\:cursor-grabbing:active{cursor:grabbing}#twe-root .group:hover .group-hover\\:translate-x-\\[5px\\]{--tw-translate-x: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .group:hover .group-hover\\:rotate-\\[20deg\\]{--tw-rotate: 20deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .group:hover .group-hover\\:scale-\\[1\\.02\\]{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .group:hover .group-hover\\:opacity-90{opacity:.9}@media(min-width:640px){#twe-root .sm\\:inline{display:inline}#twe-root .sm\\:grid{display:grid}#twe-root .sm\\:h-9{height:36px}#twe-root .sm\\:max-w-screen-sm{max-width:640px}#twe-root .sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}#twe-root .sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}#twe-root .sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}#twe-root .sm\\:gap-2{gap:8px}#twe-root .sm\\:pl-2{padding-left:8px}}@media(min-width:768px){#twe-root .md\\:inline{display:inline}#twe-root .md\\:max-w-screen-md{max-width:768px}#twe-root .md\\:max-w-screen-sm{max-width:640px}#twe-root .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1024px){#twe-root .lg\\:inline{display:inline}}@media(min-width:1280px){#twe-root .xl\\:inline{display:inline}}#twe-root .\\[\\&\\>path\\]\\:stroke-0>path{stroke-width:0} `);
(function () {
'use strict';
var lk=Object.defineProperty;var ck=(e,t,n)=>t in e?lk(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var be=(e,t,n)=>ck(e,typeof t!="symbol"?t+"":t,n);var Hc,Ht,U_,Ud,Ua,Qh,j_,H_,q_,zf,jd,Hd,Us={},V_=[],uk=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,el=Array.isArray;function Ro(e,t){for(var n in t)e[n]=t[n];return e}function Kf(e){e&&e.parentNode&&e.parentNode.removeChild(e);}function ia(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?Hc.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return Jl(e,i,r,o,null)}function Jl(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++U_,__i:-1,__u:0};return o==null&&Ht.vnode!=null&&Ht.vnode(a),a}function sr(e){return e.children}function Zr(e,t){this.props=e,this.context=t;}function Oi(e,t){if(t==null)return e.__?Oi(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Oi(e):null}function z_(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return z_(e)}}function ep(e){(!e.__d&&(e.__d=true)&&Ua.push(e)&&!cc.__r++||Qh!==Ht.debounceRendering)&&((Qh=Ht.debounceRendering)||j_)(cc);}function cc(){for(var e,t,n,r,o,a,i,s=1;Ua.length;)Ua.length>s&&Ua.sort(H_),e=Ua.shift(),s=Ua.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=Ro({},r)).__v=r.__v+1,Ht.vnode&&Ht.vnode(n),Gf(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??Oi(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,W_(a,n,i),n.__e!=o&&z_(n)));cc.__r=0;}function K_(e,t,n,r,o,a,i,s,l,c,h){var u,m,g,y,b,k,S=r&&r.__k||V_,M=t.length;for(l=dk(n,t,S,l,M),u=0;u<M;u++)(g=n.__k[u])!=null&&(m=g.__i===-1?Us:S[g.__i]||Us,g.__i=u,k=Gf(e,g,m,o,a,i,s,l,c,h),y=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&Wf(m.ref,null,g),h.push(g.ref,g.__c||y,g)),b==null&&y!=null&&(b=y),4&g.__u||m.__k===g.__k?l=G_(g,l,e):typeof g.type=="function"&&k!==void 0?l=k:y&&(l=y.nextSibling),g.__u&=-7);return n.__e=b,l}function dk(e,t,n,r,o){var a,i,s,l,c,h=n.length,u=h,m=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(l=a+m,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Jl(null,i,null,null,null):el(i)?Jl(sr,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Jl(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(c=i.__i=fk(i,n,l,u))!==-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v===null?(c==-1&&(o>h?m--:o<h&&m++),typeof i.type!="function"&&(i.__u|=4)):c!=l&&(c==l-1?m--:c==l+1?m++:(c>l?m--:m++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<h;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=Oi(s)),J_(s,s));return r}function G_(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=G_(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Oi(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function js(e,t){return t=t||[],e==null||typeof e=="boolean"||(el(e)?e.some(function(n){js(n,t);}):t.push(e)),t}function fk(e,t,n,r){var o,a,i=e.key,s=e.type,l=t[n];if(l===null&&e.key==null||l&&i==l.key&&s===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((l=t[o])&&(2&l.__u)==0&&i==l.key&&s===l.type)return o;o--;}if(a<t.length){if((l=t[a])&&(2&l.__u)==0&&i==l.key&&s===l.type)return a;a++;}}return -1}function tp(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||uk.test(t)?n:n+"px";}function xl(e,t,n,r,o){var a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else {if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||tp(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||tp(e.style,t,n[t]);}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(q_,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.t=r.t:(n.t=zf,e.addEventListener(t,a?Hd:jd,a)):e.removeEventListener(t,a?Hd:jd,a);else {if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===false&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n));}}function np(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.u==null)t.u=zf++;else if(t.u<n.t)return;return n(Ht.event?Ht.event(t):t)}}}function Gf(e,t,n,r,o,a,i,s,l,c){var h,u,m,g,y,b,k,S,M,T,P,N,I,O,U,E,v,L=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),a=[s=t.__e=n.__e]),(h=Ht.__b)&&h(t);e:if(typeof L=="function")try{if(S=t.props,M="prototype"in L&&L.prototype.render,T=(h=L.contextType)&&r[h.__c],P=h?T?T.props.value:h.__:r,n.__c?k=(u=t.__c=n.__c).__=u.__E:(M?t.__c=u=new L(S,P):(t.__c=u=new Zr(S,P),u.constructor=L,u.render=pk),T&&T.sub(u),u.props=S,u.state||(u.state={}),u.context=P,u.__n=r,m=u.__d=!0,u.__h=[],u._sb=[]),M&&u.__s==null&&(u.__s=u.state),M&&L.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Ro({},u.__s)),Ro(u.__s,L.getDerivedStateFromProps(S,u.__s))),g=u.props,y=u.state,u.__v=t,m)M&&L.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),M&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else {if(M&&L.getDerivedStateFromProps==null&&S!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,P),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,P)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function($){$&&($.__=t);}),N=0;N<u._sb.length;N++)u.__h.push(u._sb[N]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,P),M&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,y,b);});}if(u.context=P,u.props=S,u.__P=e,u.__e=!1,I=Ht.__r,O=0,M){for(u.state=u.__s,u.__d=!1,I&&I(t),h=u.render(u.props,u.state,u.context),U=0;U<u._sb.length;U++)u.__h.push(u._sb[U]);u._sb=[];}else do u.__d=!1,I&&I(t),h=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++O<25);u.state=u.__s,u.getChildContext!=null&&(r=Ro(Ro({},r),u.getChildContext())),M&&!m&&u.getSnapshotBeforeUpdate!=null&&(b=u.getSnapshotBeforeUpdate(g,y)),E=h,h!=null&&h.type===sr&&h.key==null&&(E=Y_(h.props.children)),s=K_(e,el(E)?E:[E],t,n,r,o,a,i,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),k&&(u.__E=u.__=null);}catch($){if(t.__v=null,l||a!=null)if($.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s;}else for(v=a.length;v--;)Kf(a[v]);else t.__e=n.__e,t.__k=n.__k;Ht.__e($,t,n);}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=hk(n.__e,t,n,r,o,a,i,l,c);return (h=Ht.diffed)&&h(t),128&t.__u?void 0:s}function W_(e,t,n){for(var r=0;r<n.length;r++)Wf(n[r],n[++r],n[++r]);Ht.__c&&Ht.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o);});}catch(a){Ht.__e(a,o.__v);}});}function Y_(e){return typeof e!="object"||e==null?e:el(e)?e.map(Y_):Ro({},e)}function hk(e,t,n,r,o,a,i,s,l){var c,h,u,m,g,y,b,k=n.props,S=t.props,M=t.type;if(M=="svg"?o="http://www.w3.org/2000/svg":M=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((g=a[c])&&"setAttribute"in g==!!M&&(M?g.localName==M:g.nodeType==3)){e=g,a[c]=null;break}}if(e==null){if(M==null)return document.createTextNode(S);e=document.createElementNS(o,M,S.is&&S),s&&(Ht.__m&&Ht.__m(t,a),s=false),a=null;}if(M===null)k===S||s&&e.data===S||(e.data=S);else {if(a=a&&Hc.call(e.childNodes),k=n.props||Us,!s&&a!=null)for(k={},c=0;c<e.attributes.length;c++)k[(g=e.attributes[c]).name]=g.value;for(c in k)if(g=k[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=g;else if(!(c in S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;xl(e,c,null,g,o);}}for(c in S)g=S[c],c=="children"?m=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?y=g:c=="checked"?b=g:s&&typeof g!="function"||k[c]===g||xl(e,c,g,k[c],o);if(h)s||u&&(h.__html===u.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(u&&(e.innerHTML=""),K_(t.type==="template"?e.content:e,el(m)?m:[m],t,n,r,M=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&Oi(n,0),s,l),a!=null)for(c=a.length;c--;)Kf(a[c]);s||(c="value",M=="progress"&&y==null?e.removeAttribute("value"):y!==void 0&&(y!==e[c]||M=="progress"&&!y||M=="option"&&y!==k[c])&&xl(e,c,y,k[c],o),c="checked",b!==void 0&&b!==e[c]&&xl(e,c,b,k[c],o));}return e}function Wf(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t));}else e.current=t;}catch(o){Ht.__e(o,n);}}function J_(e,t,n){var r,o;if(Ht.unmount&&Ht.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Wf(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount();}catch(a){Ht.__e(a,t);}r.base=r.__P=null;}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&J_(r[o],t,n||typeof e.type!="function");n||Kf(e.__e),e.__c=e.__=e.__e=void 0;}function pk(e,t,n){return this.constructor(e,n)}function qd(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),Ht.__&&Ht.__(e,t),o=(r=false)?null:t.__k,a=[],i=[],Gf(t,e=t.__k=ia(sr,null,[e]),o||Us,Us,t.namespaceURI,o?null:t.firstChild?Hc.call(t.childNodes):null,a,o?o.__e:t.firstChild,r,i),W_(a,e,i);}Hc=V_.slice,Ht={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s;}throw e}},U_=0,Ud=function(e){return e!=null&&e.constructor==null},Zr.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ro({},this.state),typeof e=="function"&&(e=e(Ro({},n),this.props)),e&&Ro(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ep(this));},Zr.prototype.forceUpdate=function(e){this.__v&&(this.__e=true,e&&this.__h.push(e),ep(this));},Zr.prototype.render=sr,Ua=[],j_=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,H_=function(e,t){return e.__v.__b-t.__v.__b},cc.__r=0,q_=/(PointerCapture)$|Capture$/i,zf=0,jd=np(false),Hd=np(true);var mk=0;function f(e,t,n,r,o,a){t||(t={});var i,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?i=t[s]:l[s]=t[s];var c={type:e,props:l,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--mk,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)l[s]===void 0&&(l[s]=i[s]);return Ht.vnode&&Ht.vnode(c),c}/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var gk={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const en=(e,t,n,r)=>{const o=({color:a="currentColor",size:i=24,stroke:s=2,title:l,children:c,className:h="",class:u="",style:m,...g})=>ia("svg",{...gk[e],width:String(i),height:String(i),class:["tabler-icon",`tabler-icon-${t}`,u,h].join(" "),...e==="filled"?{fill:a}:{"stroke-width":s,stroke:a},style:m,...g},[l&&ia("title",{},l),...r.map(([y,b])=>ia(y,b)),...js(c)]);return o.displayName=`${n}`,o};/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var _k=en("outline","arrow-up-right","IconArrowUpRight",[["path",{d:"M17 7l-10 10",key:"svg-0"}],["path",{d:"M8 7l9 0l0 9",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var yk=en("outline","arrows-maximize","IconArrowsMaximize",[["path",{d:"M16 4l4 0l0 4",key:"svg-0"}],["path",{d:"M14 10l6 -6",key:"svg-1"}],["path",{d:"M8 20l-4 0l0 -4",key:"svg-2"}],["path",{d:"M4 20l6 -6",key:"svg-3"}],["path",{d:"M16 20l4 0l0 -4",key:"svg-4"}],["path",{d:"M14 14l6 6",key:"svg-5"}],["path",{d:"M8 4l-4 0l0 4",key:"svg-6"}],["path",{d:"M4 4l6 6",key:"svg-7"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var bk=en("outline","arrows-minimize","IconArrowsMinimize",[["path",{d:"M5 9l4 0l0 -4",key:"svg-0"}],["path",{d:"M3 3l6 6",key:"svg-1"}],["path",{d:"M5 15l4 0l0 4",key:"svg-2"}],["path",{d:"M3 21l6 -6",key:"svg-3"}],["path",{d:"M19 9l-4 0l0 -4",key:"svg-4"}],["path",{d:"M15 9l6 -6",key:"svg-5"}],["path",{d:"M19 15l-4 0l0 4",key:"svg-6"}],["path",{d:"M15 15l6 6",key:"svg-7"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var wk=en("outline","bookmark","IconBookmark",[["path",{d:"M18 7v14l-6 -4l-6 4v-14a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4z",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var vk=en("outline","circle-check","IconCircleCheck",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var kk=en("outline","circle-dashed","IconCircleDashed",[["path",{d:"M8.56 3.69a9 9 0 0 0 -2.92 1.95",key:"svg-0"}],["path",{d:"M3.69 8.56a9 9 0 0 0 -.69 3.44",key:"svg-1"}],["path",{d:"M3.69 15.44a9 9 0 0 0 1.95 2.92",key:"svg-2"}],["path",{d:"M8.56 20.31a9 9 0 0 0 3.44 .69",key:"svg-3"}],["path",{d:"M15.44 20.31a9 9 0 0 0 2.92 -1.95",key:"svg-4"}],["path",{d:"M20.31 15.44a9 9 0 0 0 .69 -3.44",key:"svg-5"}],["path",{d:"M20.31 8.56a9 9 0 0 0 -1.95 -2.92",key:"svg-6"}],["path",{d:"M15.44 3.69a9 9 0 0 0 -3.44 -.69",key:"svg-7"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Iu=en("outline","database-export","IconDatabaseExport",[["path",{d:"M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c1.118 0 2.183 -.086 3.15 -.241",key:"svg-1"}],["path",{d:"M20 12v-6",key:"svg-2"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c.157 0 .312 -.002 .466 -.005",key:"svg-3"}],["path",{d:"M16 19h6",key:"svg-4"}],["path",{d:"M19 16l3 3l-3 3",key:"svg-5"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var xk=en("outline","database-import","IconDatabaseImport",[["path",{d:"M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.856 0 1.68 -.05 2.454 -.144m5.546 -2.856v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c.171 0 .341 -.002 .51 -.006",key:"svg-2"}],["path",{d:"M19 22v-6",key:"svg-3"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Sk=en("outline","exclamation-circle","IconExclamationCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var X_=en("outline","external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ck=en("outline","file-download","IconFileDownload",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 17v-6",key:"svg-2"}],["path",{d:"M9.5 14.5l2.5 2.5l2.5 -2.5",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Tk=en("outline","heart","IconHeart",[["path",{d:"M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var vi=en("outline","help","IconHelp",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 17l0 .01",key:"svg-1"}],["path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Z_=en("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Mk=en("outline","layout-columns","IconLayoutColumns",[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 4l0 16",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ik=en("outline","layout-grid","IconLayoutGrid",[["path",{d:"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Q_=en("outline","link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Rk=en("outline","photo","IconPhoto",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var ey=en("outline","refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ek=en("outline","repeat","IconRepeat",[["path",{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3",key:"svg-0"}],["path",{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ru=en("outline","report-analytics","IconReportAnalytics",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M9 17v-5",key:"svg-2"}],["path",{d:"M12 17v-1",key:"svg-3"}],["path",{d:"M15 17v-3",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ak=en("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Dk=en("outline","settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Pk=en("outline","sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ok=en("outline","sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Xl=en("outline","table","IconTable",[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var rp=en("outline","trash-x","IconTrashX",[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Lk=en("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var uc=en("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Nk=en("outline","zoom-in","IconZoomIn",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M7 10l6 0",key:"svg-1"}],["path",{d:"M10 7l0 6",key:"svg-2"}],["path",{d:"M21 21l-6 -6",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Fk=en("outline","zoom-out","IconZoomOut",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M7 10l6 0",key:"svg-1"}],["path",{d:"M21 21l-6 -6",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var $k=en("filled","brand-github-filled","IconBrandGithubFilled",[["path",{d:"M5.315 2.1c.791 -.113 1.9 .145 3.333 .966l.272 .161l.16 .1l.397 -.083a13.3 13.3 0 0 1 4.59 -.08l.456 .08l.396 .083l.161 -.1c1.385 -.84 2.487 -1.17 3.322 -1.148l.164 .008l.147 .017l.076 .014l.05 .011l.144 .047a1 1 0 0 1 .53 .514a5.2 5.2 0 0 1 .397 2.91l-.047 .267l-.046 .196l.123 .163c.574 .795 .93 1.728 1.03 2.707l.023 .295l.007 .272c0 3.855 -1.659 5.883 -4.644 6.68l-.245 .061l-.132 .029l.014 .161l.008 .157l.004 .365l-.002 .213l-.003 3.834a1 1 0 0 1 -.883 .993l-.117 .007h-6a1 1 0 0 1 -.993 -.883l-.007 -.117v-.734c-1.818 .26 -3.03 -.424 -4.11 -1.878l-.535 -.766c-.28 -.396 -.455 -.579 -.589 -.644l-.048 -.019a1 1 0 0 1 .564 -1.918c.642 .188 1.074 .568 1.57 1.239l.538 .769c.76 1.079 1.36 1.459 2.609 1.191l.001 -.678l-.018 -.168a5.03 5.03 0 0 1 -.021 -.824l.017 -.185l.019 -.12l-.108 -.024c-2.976 -.71 -4.703 -2.573 -4.875 -6.139l-.01 -.31l-.004 -.292a5.6 5.6 0 0 1 .908 -3.051l.152 -.222l.122 -.163l-.045 -.196a5.2 5.2 0 0 1 .145 -2.642l.1 -.282l.106 -.253a1 1 0 0 1 .529 -.514l.144 -.047l.154 -.03z",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Bk=en("filled","brand-twitter-filled","IconBrandTwitterFilled",[["path",{d:"M14.058 3.41c-1.807 .767 -2.995 2.453 -3.056 4.38l-.002 .182l-.243 -.023c-2.392 -.269 -4.498 -1.512 -5.944 -3.531a1 1 0 0 0 -1.685 .092l-.097 .186l-.049 .099c-.719 1.485 -1.19 3.29 -1.017 5.203l.03 .273c.283 2.263 1.5 4.215 3.779 5.679l.173 .107l-.081 .043c-1.315 .663 -2.518 .952 -3.827 .9c-1.056 -.04 -1.446 1.372 -.518 1.878c3.598 1.961 7.461 2.566 10.792 1.6c4.06 -1.18 7.152 -4.223 8.335 -8.433l.127 -.495c.238 -.993 .372 -2.006 .401 -3.024l.003 -.332l.393 -.779l.44 -.862l.214 -.434l.118 -.247c.265 -.565 .456 -1.033 .574 -1.43l.014 -.056l.008 -.018c.22 -.593 -.166 -1.358 -.941 -1.358l-.122 .007a.997 .997 0 0 0 -.231 .057l-.086 .038a7.46 7.46 0 0 1 -.88 .36l-.356 .115l-.271 .08l-.772 .214c-1.336 -1.118 -3.144 -1.254 -5.012 -.554l-.211 .084z",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Uk=en("filled","player-play-filled","IconPlayerPlayFilled",[["path",{d:"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z",key:"svg-0"}]]),Li,En,Eu,op,Hs=0,ty=[],On=Ht,ap=On.__b,ip=On.__r,sp=On.diffed,lp=On.__c,cp=On.unmount,up=On.__;function qc(e,t){On.__h&&On.__h(En,e,Hs||t),Hs=0;var n=En.__H||(En.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function $e(e){return Hs=1,ny(ry,e)}function ny(e,t,n){var r=qc(Li++,2);if(r.t=e,!r.__c&&(r.__=[ry(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}));}],r.__c=En,!En.__f)){var o=function(s,l,c){if(!r.__c.__H)return true;var h=r.__c.__H.__.filter(function(m){return !!m.__c});if(h.every(function(m){return !m.__N}))return !a||a.call(this,s,l,c);var u=r.__c.props!==s;return h.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(u=true);}}),a&&a.call(this,s,l,c)||u};En.__f=true;var a=En.shouldComponentUpdate,i=En.componentWillUpdate;En.componentWillUpdate=function(s,l,c){if(this.__e){var h=a;a=void 0,o(s,l,c),a=h;}i&&i.call(this,s,l,c);},En.shouldComponentUpdate=o;}return r.__N||r.__}function ot(e,t){var n=qc(Li++,3);!On.__s&&Yf(n.__H,t)&&(n.__=e,n.u=t,En.__H.__h.push(n));}function jk(e,t){var n=qc(Li++,4);!On.__s&&Yf(n.__H,t)&&(n.__=e,n.u=t,En.__h.push(n));}function bt(e){return Hs=5,St(function(){return {current:e}},[])}function St(e,t){var n=qc(Li++,7);return Yf(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function qn(e,t){return Hs=8,St(function(){return e},t)}function Hk(){for(var e;e=ty.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zl),e.__H.__h.forEach(Vd),e.__H.__h=[];}catch(t){e.__H.__h=[],On.__e(t,e.__v);}}On.__b=function(e){En=null,ap&&ap(e);},On.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),up&&up(e,t);},On.__r=function(e){ip&&ip(e),Li=0;var t=(En=e.__c).__H;t&&(Eu===En?(t.__h=[],En.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0;})):(t.__h.forEach(Zl),t.__h.forEach(Vd),t.__h=[],Li=0)),Eu=En;},On.diffed=function(e){sp&&sp(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ty.push(t)!==1&&op===On.requestAnimationFrame||((op=On.requestAnimationFrame)||qk)(Hk)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0;})),Eu=En=null;},On.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Zl),n.__h=n.__h.filter(function(r){return !r.__||Vd(r)});}catch(r){t.some(function(o){o.__h&&(o.__h=[]);}),t=[],On.__e(r,n.__v);}}),lp&&lp(e,t);},On.unmount=function(e){cp&&cp(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Zl(r);}catch(o){t=o;}}),n.__H=void 0,t&&On.__e(t,n.__v));};var dp=typeof requestAnimationFrame=="function";function qk(e){var t,n=function(){clearTimeout(r),dp&&cancelAnimationFrame(t),setTimeout(e);},r=setTimeout(n,100);dp&&(t=requestAnimationFrame(n));}function Zl(e){var t=En,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),En=t;}function Vd(e){var t=En;e.__c=e.__(),En=t;}function Yf(e,t){return !e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ry(e,t){return typeof t=="function"?t(e):t}const Ut=e=>typeof e=="string",is=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n},fp=e=>e==null?"":""+e,Vk=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r]);});},zk=/###/g,hp=e=>e&&e.indexOf("###")>-1?e.replace(zk,"."):e,pp=e=>!e||Ut(e),Ss=(e,t,n)=>{const r=Ut(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(pp(e))return {};const a=hp(r[o]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o;}return pp(e)?{}:{obj:e,k:hp(r[o])}},mp=(e,t,n)=>{const{obj:r,k:o}=Ss(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),s=Ss(e,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=Ss(e,i,Object),s!=null&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n;},Kk=(e,t,n,r)=>{const{obj:o,k:a}=Ss(e,t,Object);o[a]=o[a]||[],o[a].push(n);},dc=(e,t)=>{const{obj:n,k:r}=Ss(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Gk=(e,t,n)=>{const r=dc(e,n);return r!==void 0?r:dc(t,n)},oy=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Ut(e[r])||e[r]instanceof String||Ut(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):oy(e[r],t[r],n):e[r]=t[r]);return e},si=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Wk={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Yk=e=>Ut(e)?e.replace(/[&<>"'\/]/g,t=>Wk[t]):e;class Jk{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[];}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Xk=[" ",",","?","!",";"],Zk=new Jk(20),Qk=(e,t,n)=>{t=t||"",n=n||"";const r=Xk.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return true;const o=Zk.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=true);}return a},zd=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i;}return o},fc=e=>e==null?void 0:e.replace("_","-"),ex={type:"logger",log(e){this.output("log",e);},warn(e){this.output("warn",e);},error(e){this.output("error",e);},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t);}};let tx=class Kd{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n);}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||ex,this.options=n,this.debug=n.debug;}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",true)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",true)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",true)}forward(t,n,r,o){return o&&!this.debug?null:(Ut(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Kd(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Kd(this.logger,t)}};var mo=new tx;class Vc{constructor(){this.observers={};}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1);}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n);}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[s,l]=i;for(let c=0;c<l;c++)s(...r);}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[s,l]=i;for(let c=0;c<l;c++)s.apply(s,[t,...r]);});}}class gp extends Vc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=true);}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t);}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1);}getResource(t,n,r){var c,h;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):Ut(r)&&a?s.push(...r.split(a)):s.push(r)));const l=dc(this.data,s);return !l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!Ut(r)?l:zd((h=(c=this.data)==null?void 0:c[t])==null?void 0:h[n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:false};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),mp(this.data,s,o),a.silent||this.emit("added",t,n,r,o);}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:false};for(const a in r)(Ut(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:true});o.silent||this.emit("added",t,n,r);}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:false,skipCopy:false},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=dc(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?oy(l,r,a):l={...l,...r},mp(this.data,s,l),i.silent||this.emit("added",t,n,r);}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n);}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return !!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var ay={processors:{},addPostProcessor(e){this.processors[e.name]=e;},handle(e,t,n,r,o){return e.forEach(a=>{var i;t=((i=this.processors[a])==null?void 0:i.process(t,n,r,o))??t;}),t}};const _p={},yp=e=>!Ut(e)&&typeof e!="boolean"&&typeof e!="number";class hc extends Vc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Vk(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=mo.create("translator");}changeLanguage(t){t&&(this.language=t);}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return false;const r=this.resolve(t,n);return (r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Qk(t,r,o);if(i&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return {key:t,namespaces:Ut(a)?[a]:a};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),t=c.join(o);}return {key:t,namespaces:Ut(a)?[a]:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return "";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(h){const L=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${L}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${L}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const u=this.resolve(t,n);let m=u==null?void 0:u.res;const g=(u==null?void 0:u.usedKey)||i,y=(u==null?void 0:u.exactUsedKey)||i,b=["[object Number]","[object Function]","[object RegExp]"],k=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,M=n.count!==void 0&&!Ut(n.count),T=hc.hasDefaultValue(n),P=M?this.pluralResolver.getSuffix(c,n.count,n):"",N=n.ordinal&&M?this.pluralResolver.getSuffix(c,n.count,{ordinal:false}):"",I=M&&!n.ordinal&&n.count===0,O=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${N}`]||n.defaultValue;let U=m;S&&!m&&T&&(U=O);const E=yp(U),v=Object.prototype.toString.apply(U);if(S&&U&&E&&b.indexOf(v)<0&&!(Ut(k)&&Array.isArray(U))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,U,{...n,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(u.res=L,u.usedParams=this.getUsedParamsDetails(n),u):L}if(a){const L=Array.isArray(U),$=L?[]:{},xe=L?y:g;for(const G in U)if(Object.prototype.hasOwnProperty.call(U,G)){const le=`${xe}${a}${G}`;T&&!m?$[G]=this.translate(le,{...n,defaultValue:yp(O)?O[G]:void 0,joinArrays:false,ns:s}):$[G]=this.translate(le,{...n,joinArrays:false,ns:s}),$[G]===le&&($[G]=U[G]);}m=$;}}else if(S&&Ut(k)&&Array.isArray(m))m=m.join(k),m&&(m=this.extendTranslation(m,t,n,r));else {let L=false,$=false;!this.isValidLookup(m)&&T&&(L=true,m=O),this.isValidLookup(m)||($=true,m=i);const G=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:m,le=T&&O!==m&&this.options.updateMissing;if($||L||le){if(this.logger.log(le?"updateKey":"missingKey",c,l,i,le?O:m),a){const pe=this.resolve(i,{...n,keySeparator:false});pe&&pe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");}let Q=[];const ce=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ce&&ce[0])for(let pe=0;pe<ce.length;pe++)Q.push(ce[pe]);else this.options.saveMissingTo==="all"?Q=this.languageUtils.toResolveHierarchy(n.lng||this.language):Q.push(n.lng||this.language);const me=(pe,we,z)=>{var Le;const ae=T&&z!==m?z:G;this.options.missingKeyHandler?this.options.missingKeyHandler(pe,l,we,ae,le,n):(Le=this.backendConnector)!=null&&Le.saveMissing&&this.backendConnector.saveMissing(pe,l,we,ae,le,n),this.emit("missingKey",pe,l,we,m);};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?Q.forEach(pe=>{const we=this.pluralResolver.getSuffixes(pe,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&we.indexOf(`${this.options.pluralSeparator}zero`)<0&&we.push(`${this.options.pluralSeparator}zero`),we.forEach(z=>{me([pe],i+z,n[`defaultValue${z}`]||O);});}):me(Q,i,O));}m=this.extendTranslation(m,t,n,u,r),$&&m===i&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${i}`),($||L)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,L?m:void 0));}return o?(u.res=m,u.usedParams=this.getUsedParamsDetails(n),u):m}extendTranslation(t,n,r,o,a){var c,h;var i=this;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=Ut(t)&&(((h=r==null?void 0:r.interpolation)==null?void 0:h.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(u){const y=t.match(this.interpolator.nestingRegexp);m=y&&y.length;}let g=r.replace&&!Ut(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),t=this.interpolator.interpolate(t,g,r.lng||this.language||o.usedLng,r),u){const y=t.match(this.interpolator.nestingRegexp),b=y&&y.length;m<b&&(r.nest=false);}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==false&&(t=this.interpolator.nest(t,function(){for(var y=arguments.length,b=new Array(y),k=0;k<y;k++)b[k]=arguments[k];return (a==null?void 0:a[0])===b[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${n[0]}`),null):i.translate(...b,n)},r)),r.interpolation&&this.interpolator.reset();}const s=r.postProcess||this.options.postProcess,l=Ut(s)?[s]:s;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==false&&(t=ay.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,s;return Ut(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),h=c.key;o=h;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const m=n.count!==void 0&&!Ut(n.count),g=m&&!n.ordinal&&n.count===0,y=n.context!==void 0&&(Ut(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);u.forEach(k=>{var S,M;this.isValidLookup(r)||(s=k,!_p[`${b[0]}-${k}`]&&((S=this.utils)!=null&&S.hasLoadedNamespace)&&!((M=this.utils)!=null&&M.hasLoadedNamespace(s))&&(_p[`${b[0]}-${k}`]=true,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(T=>{var I;if(this.isValidLookup(r))return;i=T;const P=[h];if((I=this.i18nFormat)!=null&&I.addLookupKeys)this.i18nFormat.addLookupKeys(P,h,T,k,n);else {let O;m&&(O=this.pluralResolver.getSuffix(T,n.count,n));const U=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(P.push(h+O),n.ordinal&&O.indexOf(E)===0&&P.push(h+O.replace(E,this.options.pluralSeparator)),g&&P.push(h+U)),y){const v=`${h}${this.options.contextSeparator}${n.context}`;P.push(v),m&&(P.push(v+O),n.ordinal&&O.indexOf(E)===0&&P.push(v+O.replace(E,this.options.pluralSeparator)),g&&P.push(v+U));}}let N;for(;N=P.pop();)this.isValidLookup(r)||(a=N,r=this.getResource(T,k,N,n));}));});}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var a;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return (a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Ut(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a];}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return true;return false}}class bp{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||false,this.logger=mo.create("languageUtils");}getScriptPartFromCode(t){if(t=fc(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=fc(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ut(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0];}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return (this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o);}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a});}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return [];if(typeof t=="function"&&(t=t(n)),Ut(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`));};return Ut(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ut(t)&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i));}),o}}const wp={zero:0,one:1,two:2,few:3,many:4,other:5},vp={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class nx{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=mo.create("pluralResolver"),this.pluralRulesCache={};}addRule(t,n){this.rules[t]=n;}clearCache(){this.pluralRulesCache={};}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=fc(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o});}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vp;if(!t.match(/-|_/))return vp;const l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,n);}return this.pluralRulesCache[a]=i,i}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>wp[o]-wp[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const kp=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:true,a=Gk(e,t,n);return !a&&o&&Ut(n)&&(a=zd(e,n,r),a===void 0&&(a=zd(t,n,r))),a},Au=e=>e.replace(/\$/g,"$$$$");class rx{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=mo.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t);}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:true});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:h,unescapePrefix:u,nestingPrefix:m,nestingPrefixEscaped:g,nestingSuffix:y,nestingSuffixEscaped:b,nestingOptionsSeparator:k,maxReplaces:S,alwaysFormat:M}=t.interpolation;this.escape=n!==void 0?n:Yk,this.escapeValue=r!==void 0?r:true,this.useRawValueToEscape=o!==void 0?o:false,this.prefix=a?si(a):i||"{{",this.suffix=s?si(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=h?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=m?si(m):g||si("$t("),this.nestingSuffix=y?si(y):b||si(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=S||1e3,this.alwaysFormat=M!==void 0?M:false,this.resetRegExp();}reset(){this.options&&this.init(this.options);}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`);}interpolate(t,n,r,o){var g;let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=y=>{if(y.indexOf(this.formatSeparator)<0){const M=kp(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,r,{...o,...n,interpolationkey:y}):M}const b=y.split(this.formatSeparator),k=b.shift().trim(),S=b.join(this.formatSeparator).trim();return this.format(kp(n,l,k,this.options.keySeparator,this.options.ignoreJSONStructure),S,r,{...o,...n,interpolationkey:k})};this.resetRegExp();const h=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((g=o==null?void 0:o.interpolation)==null?void 0:g.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return [{regex:this.regexpUnescape,safeValue:y=>Au(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?Au(this.escape(y)):Au(y)}].forEach(y=>{for(s=0;a=y.regex.exec(t);){const b=a[1].trim();if(i=c(b),i===void 0)if(typeof h=="function"){const S=h(t,a,o);i=Ut(S)?S:"";}else if(o&&Object.prototype.hasOwnProperty.call(o,b))i="";else if(u){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),i="";else !Ut(i)&&!this.useRawValueToEscape&&(i=fp(i));const k=y.safeValue(i);if(t=t.replace(a[0],k),u?(y.regex.lastIndex+=i.length,y.regex.lastIndex-=a[0].length):y.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;const s=(l,c)=>{const h=this.nestingOptionsSeparator;if(l.indexOf(h)<0)return l;const u=l.split(new RegExp(`${h}[ ]*{`));let m=`{${u[1]}`;l=u[0],m=this.interpolate(m,i);const g=m.match(/'/g),y=m.match(/"/g);(((g==null?void 0:g.length)??0)%2===0&&!y||y.length%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),c&&(i={...c,...i});}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,b),`${l}${h}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];i={...r},i=i.replace&&!Ut(i.replace)?i.replace:i,i.applyPostProcessor=false,delete i.defaultValue;let c=false;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const h=o[1].split(this.formatSeparator).map(u=>u.trim());o[1]=h.shift(),l=h,c=true;}if(a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===t&&!Ut(a))return a;Ut(a)||(a=fp(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),c&&(a=l.reduce((h,u)=>this.format(h,u,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0;}return t}}const ox=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),h=s.trim();n[h]||(n[h]=c),c==="false"&&(n[h]=false),c==="true"&&(n[h]=true),isNaN(c)||(n[h]=parseInt(c,10));}});}return {formatName:t,formatOptions:n}},li=e=>{const t={};return (n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=t[i];return s||(s=e(fc(r),o),t[i]=s),s(n)}};class ax{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=mo.create("formatter"),this.options=t,this.formats={number:li((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:li((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:li((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:li((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:li((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t);}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||",";}add(t,n){this.formats[t.toLowerCase().trim()]=n;}addCached(t,n){this.formats[t.toLowerCase().trim()]=li(n);}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator);}return a.reduce((s,l)=>{var u;const{formatName:c,formatOptions:h}=ox(l);if(this.formats[c]){let m=s;try{const g=((u=o==null?void 0:o.formatParams)==null?void 0:u[o.interpolationkey])||{},y=g.locale||g.lng||o.locale||o.lng||r;m=this.formats[c](s,y,{...h,...o,...g});}catch(g){this.logger.warn(g);}return m}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const ix=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--);};class sx extends Vc{constructor(t,n,r){var a,i;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=mo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,o.backend,o);}queueLoad(t,n,r,o){const a={},i={},s={},l={};return t.forEach(c=>{let h=true;n.forEach(u=>{const m=`${c}|${u}`;!r.reload&&this.store.hasResourceBundle(c,u)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=true):(this.state[m]=1,h=false,i[m]===void 0&&(i[m]=true),a[m]===void 0&&(a[m]=true),l[u]===void 0&&(l[u]=true)));}),h||(s[c]=true);}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:true}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{Kk(l.loaded,[a],i),ix(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const h=l.loaded[c];h.length&&h.forEach(u=>{s[c][u]===void 0&&(s[c][u]=true);});}),l.done=true,l.errors.length?l.callback(l.errors):l.callback());}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done);}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(c,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback);}if(c&&h&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,i);},a);return}i(c,h);},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(h=>s(null,h)).catch(s):s(null,c);}catch(c){s(c);}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Ut(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ut(n)&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i);});}load(t,n,r){this.prepareLoading(t,n,{},r);}reload(t,n,r){this.prepareLoading(t,n,{reload:true},r);}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(t,i,s);});}saveMissing(t,n,r,o,a){var l,c,h,u,m;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(h=this.services)==null?void 0:h.utils)!=null&&u.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((m=this.backend)!=null&&m.create){const g={...i,isUpdate:a},y=this.backend.create.bind(this.backend);if(y.length<6)try{let b;y.length===5?b=y(t,n,r,o,g):b=y(t,n,r,o),b&&typeof b.then=="function"?b.then(k=>s(null,k)).catch(s):s(null,b);}catch(b){s(b);}else y(t,n,r,o,s,g);}!t||!t[0]||this.store.addResource(t[0],n,r,o);}}}const xp=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ut(e[1])&&(t.defaultValue=e[1]),Ut(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r];});}return t},interpolation:{escapeValue:true,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}}),Sp=e=>{var t,n;return Ut(e.ns)&&(e.ns=[e.ns]),Ut(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ut(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Sl=()=>{},lx=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e));});};class qs extends Vc{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Sp(t),this.services={},this.logger=mo,this.modules={external:[]},lx(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n);},0);}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=true,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(Ut(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=xp();this.options={...o,...this.options,...Sp(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?mo.init(a(this.modules.logger),this.options):mo.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=ax;const u=new bp(this.options);this.store=new gp(this.options.resources,this.options);const m=this.services;m.logger=mo,m.resourceStore=this.store,m.languageUtils=u,m.pluralResolver=new nx(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(m.formatter=a(h),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new rx(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new sx(a(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(g){for(var y=arguments.length,b=new Array(y>1?y-1:0),k=1;k<y;k++)b[k-1]=arguments[k];t.emit(g,...b);}),this.modules.languageDetector&&(m.languageDetector=a(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=a(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new hc(this.services,this.options),this.translator.on("*",function(g){for(var y=arguments.length,b=new Array(y>1?y-1:0),k=1;k<y;k++)b[k-1]=arguments[k];t.emit(g,...b);}),this.modules.external.forEach(g=>{g.init&&g.init(this);});}if(this.format=this.options.interpolation.format,r||(r=Sl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0]);}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=function(){return t.store[h](...arguments)};}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return t.store[h](...arguments),t};});const l=is(),c=()=>{const h=(u,m)=>{this.isInitializing=false,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=true,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(m),r(u,m);};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h);};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sl;const o=Ut(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u);});};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>l(h)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,c=>l(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c);});}else r(null);}reloadResources(t,n,r){const o=is();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Sl),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a);}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&ay.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=is();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l);},i=(l,c)=>{c?(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)});},s=l=>{var h,u;!t&&!l&&this.services.languageDetector&&(l=[]);const c=Ut(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(u=(h=this.services.languageDetector)==null?void 0:h.cacheUserLanguage)==null||u.call(h,c)),this.loadResources(c,m=>{i(m,c);});};return !t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const a=function(i,s){let l;if(typeof s!="object"){for(var c=arguments.length,h=new Array(c>2?c-2:0),u=2;u<c;u++)h[u-2]=arguments[u];l=o.options.overloadTranslationOptionHandler([i,s].concat(h));}else l={...s};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||a.keyPrefix);const m=o.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(i)?g=i.map(y=>`${l.keyPrefix}${m}${y}`):g=l.keyPrefix?`${l.keyPrefix}${m}${i}`:i,o.t(g,l)};return Ut(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return (o=this.translator)==null?void 0:o.translate(...n)}exists(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return (o=this.translator)==null?void 0:o.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t;}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),false;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),false;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:false,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return true;const i=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return !!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=is();return this.options.ns?(Ut(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o);}),this.loadResources(o=>{r.resolve(),n&&n(o);}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=is();Ut(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i);}),r):(n&&n(),Promise.resolve())}dir(t){var o,a;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return "rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new bp(xp());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new qs(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sl;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:true},a=new qs(o);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s];}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},Object.keys(l[c]).reduce((h,u)=>(h[u]={...l[c][u]},h),{})),{});a.store=new gp(s,o),a.services.resourceStore=a.store;}return a.translator=new hc(a.services,o),a.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),h=1;h<l;h++)c[h-1]=arguments[h];a.emit(s,...c);}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return {options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const $n=qs.createInstance();$n.createInstance=qs.createInstance;$n.createInstance;$n.dir;$n.init;$n.loadResources;$n.reloadResources;$n.use;$n.changeLanguage;$n.getFixedT;$n.t;$n.exists;$n.setDefaultNamespace;$n.hasLoadedNamespace;$n.loadNamespaces;$n.loadLanguages;const cx={exporter:{ID:"ID",Date:"التاريخ",Content:"المحتوى","Show Full Text":"عرض النص الكامل",Media:"الوسائط","Screen Name":"اسم المستخدم","Profile Name":"اسم الملف الشخصي","Profile Image":"صورة الملف الشخصي","User ID":"معرّف المستخدم","Replying To":"ردًا على","RT Source":"مصدر إعادة التغريد","Quote Source":"مصدر الاقتباس","Media Tags":"وسوم الوسائط",Favorites:"المفضلات",Retweets:"إعادات التغريد",Bookmarks:"العلامات المرجعية",Quotes:"الاقتباسات",Replies:"الردود",Views:"المشاهدات",Favorited:"مضاف إلى المفضلة",Retweeted:"أُعيد تغريده",Bookmarked:"مضاف إلى العلامات المرجعية","Bookmark Folder":"مجلد العلامات المرجعية",URL:"URL",Actions:"الإجراءات",Details:"التفاصيل",Description:"الوصف","Profile Banner":"لافتة الملف الشخصي",Followers:"المتابعون",FollowingCount:"عدد المتابَعين",Statuses:"المنشورات",Favourites:"المفضلات",Listed:"مدرج في القوائم",Location:"الموقع",Website:"الموقع الإلكتروني",Birthdate:"تاريخ الميلاد","Verified Type":"نوع التوثيق","Blue Verified":"موثّق Blue",Following:"يتابع","Follows You":"يتابعك","Can DM":"يمكن مراسلته خاصًا",Protected:"محمي","Created At":"تاريخ الإنشاء",Sender:"المرسل",Recipient:"المستلم","Conversation ID":"معرّف المحادثة","Conversation Type":"نوع المحادثة",Data:"البيانات","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"صدّر البيانات الملتقطة كملف JSON/HTML/CSV. قد يستغرق ذلك وقتًا حسب حجم البيانات. لا يتضمن الملف المصدّر ملفات وسائط مثل الصور والفيديو، بل يتضمن عناوين URL فقط.","Data length:":"طول البيانات:","Export scope:":"نطاق التصدير:","All current results":"كل النتائج الحالية","Selected rows":"الصفوف المحددة","Pinned result set":"مجموعة نتائج مثبتة",Query:"الاستعلام",Sort:"الترتيب","Include all metadata:":"تضمين كل البيانات الوصفية:","Include original record metadata in bundle:":"تضمين بيانات السجل الأصلية في الحزمة:","Export columns":"أعمدة التصدير","Custom columns":"أعمدة مخصصة","Select all":"تحديد الكل",Clear:"مسح","columns selected":"أعمدة محددة",Metadata:"البيانات الوصفية",None:"بدون",All:"الكل","Custom fields":"حقول مخصصة","Additional metadata paths":"مسارات بيانات وصفية إضافية","metadata fields selected":"حقول بيانات وصفية محددة","Export as:":"تصدير كـ:","No data selected.":"لم يتم تحديد بيانات.",Cancel:"إلغاء","Start Export":"بدء التصدير","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"تنزيل وحفظ ملفات الوسائط من البيانات الملتقطة. قد يستغرق ذلك وقتًا حسب حجم البيانات. تشمل الوسائط التي سيتم تنزيلها صور الملفات الشخصية ولافتاتها (للمستخدمين) والصور والفيديوهات (للتغريدات).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"لأكثر من 100 عنصر وسائط أو للملفات الكبيرة، يُوصى بنسخ عناوين URL وتنزيلها بمدير تنزيل خارجي مثل aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"يستخدم تصدير ZIP في المتصفح الآن تنزيلات متوازية محدودة. للأعمال الكبيرة جدًا وكثيرة الفيديو، يبقى تصدير URL أو aria2 المسار الأكثر أمانًا والأقل استهلاكًا للذاكرة.","Filename template:":"قالب اسم الملف:","Download scheduler":"مجدول التنزيل","Faster defaults are intended for bulk CDN transfer.":"القيم الافتراضية الأسرع مخصصة للنقل الجماعي من CDN.","Start delay (ms)":"تأخير البدء (ms)","Global parallel":"التوازي العام","Per host":"لكل مضيف",Videos:"الفيديوهات",Retries:"إعادة المحاولة","Use aria2 format:":"استخدام تنسيق aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"انقر لمزيد من المعلومات. سيكون كل URL في سطر جديد، واسم ملفه في السطر التالي. هذا التنسيق متوافق مع aria2.","Rate limit (ms):":"حد المعدّل (ms):","Media Filter:":"مرشح الوسائط:","File Name":"اسم الملف","Media Type":"نوع الوسائط","Download URL":"رابط التنزيل","No media selected.":"لم يتم تحديد وسائط.","Preview limited to first 250 media items.":"المعاينة محدودة بأول 250 عنصر وسائط.",Zipping:"جارٍ الضغط","Copied!":"تم النسخ!","Copy URLs":"نسخ الروابط","The tweet ID":"معرّف التغريدة","The username of tweet author":"اسم مستخدم كاتب التغريدة","The profile name of tweet author":"اسم ملف كاتب التغريدة الشخصي","The media index in tweet (start from 0)":"فهرس الوسيط في التغريدة (يبدأ من 0)","The order of media in tweet (1/2/3/4)":"ترتيب الوسيط في التغريدة (1/2/3/4)","The post date in YYYYMMDD format":"تاريخ النشر بتنسيق YYYYMMDD","The post time in HHmmss format":"وقت النشر بتنسيق HHmmss","The media type (photo/video/animated_gif)":"نوع الوسيط (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"امتداد ملف الوسيط (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"فشل تصدير الوسائط. افتح DevTools لمزيد من التفاصيل.","Failed to copy media URLs. Open DevTools for more details.":"فشل نسخ روابط الوسائط. افتح DevTools لمزيد من التفاصيل.","filter.photo":"صورة","filter.video":"فيديو","filter.animated_gif":"GIF","filter.retweet":"تضمين إعادة التغريد","loading remaining rows":"جارٍ تحميل الصفوف المتبقية","Bundle ZIP compression:":"ضغط حزمة ZIP:","Fastest / store":"الأسرع / تخزين","Balanced / fast":"متوازن / سريع","Smaller / slower":"أصغر / أبطأ","Cancel Export":"إلغاء التصدير","Export a canonical portable ZIP bundle for sharing/importing.":"تصدير حزمة ZIP قياسية محمولة للمشاركة/الاستيراد.","Export Bundle ZIP":"تصدير حزمة ZIP","Source-backed media":"وسائط مدعومة من المصدر","rows scanned:":"الصفوف المفحوصة:","media URLs:":"عناوين URL للوسائط:",loading:"جارٍ التحميل","Loading media...":"جارٍ تحميل الوسائط..."},common:{"Open Control Panel":"فتح لوحة التحكم","Browse around to capture more data.":"تصفّح لالتقاط مزيد من البيانات.",Settings:"الإعدادات",General:"عام",Theme:"السمة",Language:"اللغة",Debug:"تصحيح الأخطاء","Date Time Format":"تنسيق التاريخ والوقت","Click for more information. This will take effect on both previewer and exported files.":"انقر لمزيد من المعلومات. سيؤثر هذا في المعاينة والملفات المصدّرة.","Use dedicated DB for accounts":"استخدام قاعدة بيانات مخصصة لكل حساب","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"سينشئ هذا قاعدة بيانات منفصلة لكل حساب Twitter، مما يساعد على تقليل احتمال اختلاط البيانات عند استخدام عدة حسابات.","Local Database":"قاعدة البيانات المحلية","Analyze DB":"تحليل","Export DB":"تصدير","Clear DB":"مسح","Bundle Export":"تصدير حزمة","Bundle Library":"مكتبة الحزم","QC Session":"جلسة فحص الجودة","Diagnostic capture":"التقاط تشخيصي","Diagnostic buffers cleared.":"تم مسح مخازن التشخيص المؤقتة.","Clear Buffers":"مسح المخازن","Preparing...":"جارٍ التحضير...","Preparing diagnostics...":"جارٍ تحضير التشخيصات...","Export QC Diagnostics":"تصدير تشخيصات فحص الجودة","Export Diagnostics Bundle":"تصدير حزمة التشخيص","QC idle.":"فحص الجودة خامل.","Are you sure to clear all data in the database?":"هل أنت متأكد من مسح كل البيانات في قاعدة البيانات؟","Database cleared.":"تم مسح قاعدة البيانات.",Module:"وحدة","Modules (Scroll to see more)":"الوحدات (مرّر لرؤية المزيد)",About:"حول",Version:"الإصدار","Search...":"بحث...","Something went wrong.":"حدث خطأ ما.","Error:":"خطأ:","Captured:":"تم الالتقاط:","Rows per page:":"الصفوف لكل صفحة:","Relation Types":"أنواع العلاقات","Subject Accounts":"الحسابات محلّ العلاقة","Subject User IDs":"معرّفات المستخدمين محلّ العلاقة","Last Observed At":"آخر رصد","A - B of N items":"{{from}} - {{to}} من {{total}} عنصرًا","No data available.":"لا توجد بيانات متاحة.","No media available.":"لا توجد وسائط متاحة.",Clear:"مسح","Bookmark folders":"مجلدات العلامات المرجعية","1 folder selected":"تم اختيار مجلد واحد","{{count}} folders selected":"تم اختيار {{count}} مجلدات","Export Media":"تصدير الوسائط","Export Data":"تصدير البيانات","Export Search History":"تصدير سجل البحث","JSON View":"عرض JSON","Media View":"عرض الوسائط",Bookmarks:"العلامات المرجعية",Tweets:"التغريدات",Users:"المستخدمون","User Tweets":"تغريدات المستخدم","User Media":"وسائط المستخدم","Tweet Details":"تفاصيل التغريدة","Search Timeline":"خطّ البحث الزمني","Home Timeline":"خطّ الصفحة الرئيسية الزمني","List Timeline":"خطّ القائمة الزمني","Community Timeline":"خطّ المجتمع الزمني","Community Members":"أعضاء المجتمع","List Members":"أعضاء القائمة","List Subscribers":"مشتركو القائمة","Direct Messages":"الرسائل الخاصة","Interaction Events":"أحداث التفاعل","Local Search":"بحث محلي","Runtime Logs":"سجلات التشغيل","Bundle Viewer":"عارض الحزم","{{count}} imported bundles":"{{count}} حزم مستوردة","Search indexed tweets with Twitter-style operators":"ابحث في التغريدات المفهرسة باستخدام معاملات شبيهة بـ Twitter","Local Recorder Search":"بحث المسجّل المحلي",Quotes:"الاقتباسات",CommunityMembers:"أعضاء المجتمع",CommunityTimeline:"خطّ المجتمع الزمني",DirectMessages:"الرسائل الخاصة",Followers:"المتابعون",Following:"يتابع",HomeTimeline:"خطّ الصفحة الرئيسية",Likes:"الإعجابات",ListMembers:"أعضاء القائمة",ListSubscribers:"مشتركو القائمة",ListTimeline:"خطّ القائمة",InteractionEvents:"أحداث التفاعل",LocalSearch:"بحث محلي",RawCapture:"التقاط خام",Retweeters:"معيدو التغريد",RetweetersModule:"معيدو التغريد",RuntimeLogs:"سجلات التشغيل",SearchTimeline:"خطّ البحث",TweetIndex:"فهرس التغريدات",TweetDetail:"تفاصيل التغريدة",UserDetail:"تفاصيل المستخدم",UserMedia:"وسائط المستخدم",UserTweets:"تغريدات المستخدم",on:"تشغيل",off:"إيقاف",unknown:"غير معروف",online:"متصل",offline:"غير متصل",leader:"قائد",follower:"تابع",tab:"تبويب",both:"كلاهما",xhr:"xhr",fetch:"fetch",watchdog:"المراقب",all:"الكل",explicit:"صريح",loading:"جارٍ التحميل",complete:"مكتمل",idle:"خامل","api-name":"اسم API","id-only":"ID فقط","theme.system":"النظام","theme.cupcake":"فاتح","theme.dark":"داكن","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"الأعمال","theme.winter":"الشتاء","Safe mode":"الوضع الآمن","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"يعطل الالتقاط المعتمد على hooks عند تفعيله. أوقفه للتصفح العادي والالتقاط التشخيصي.","Hook mode":"وضع hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"يتحكم بما إذا كان userscript يربط XHR أو fetch أو كليهما أو لا شيء.","Repair mode":"وضع الإصلاح","Controls whether hook repair watchdog behavior is active.":"يتحكم فيما إذا كان watchdog إصلاح hooks نشطاً.","{{seconds}}s ago":"قبل {{seconds}} ث","Hooks: {{status}}":"الخطافات:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"الخطافات:xhr {{xhr}}, fetch {{fetch}}, آخر {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"الخطافات:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"الوضع: آمن {{safe}}, hook {{hook}}, إصلاح {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"الوضع: آمن {{safe}}, hook {{hook}}, إصلاح {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"أحداث raw: {{total}} | مُسقطة: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} جارٍ التحميل / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"إسقاطات تجاوز spool: {{drops}} | غير متاح: {{unavailable}} | أقدم معلّق: {{age}}ms","daemon: {{status}}":"الخادم:{{status}}","daemon: {{status}} | last error: {{error}}":"الخادم:{{status}} | آخر خطأ:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"المراقب:{{role}} | قائد:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"نبضات monitor route/viewport: {{route}}/{{viewport}} | المكبوت route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"قاعدة البيانات متصلة: {{name}}","App options loaded":"تم تحميل خيارات التطبيق",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"يتوسع النص غير المنظم إلى مطابقات مصطلحات المحتوى مع تعزيز نوافذ العبارات المتجاورة؛ ويتم خفض أولوية الكلمات الشائعة ما لم تكن بين علامتي اقتباس.","Phrase search with optional slop.":"بحث عن عبارة مع سماحية اختيارية.","Boolean operators with standard precedence and parentheses.":"عوامل منطقية بأولوية قياسية وأقواس.","Match the author handle or author id.":"مطابقة اسم المستخدم أو معرّف المؤلف.","Shorthand for an enforced author constraint, equivalent to from:user.":"اختصار لقيد مؤلف إلزامي، مكافئ لـ from:user.","Match reply targets, entity ids, or conversation ids.":"مطابقة أهداف الرد أو معرّفات الكيانات أو معرّفات المحادثات.","Match bookmark folder id or folder name.":"مطابقة معرّف مجلد الإشارات المرجعية أو اسمه.","Match language, route surface, source text, or card name.":"مطابقة اللغة أو سطح المسار أو نص المصدر أو اسم البطاقة.","Match domains or URLs found in tweets.":"مطابقة النطاقات أو عناوين URL الموجودة في التغريدات.","Boolean state filters.":"مرشحات حالة منطقية.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"مرشحات وجود للوسائط والروابط والإشارات والوسوم ورموز الأسهم والتفاعل والاستطلاعات.","Compatibility aliases retained for Twitter-style queries.":"أسماء توافقية محفوظة لاستعلامات بأسلوب Twitter.","Numeric threshold filters.":"مرشحات عتبات رقمية.","Date, timestamp, and Snowflake-style boundary filters.":"مرشحات حدود للتاريخ والطابع الزمني ونمط Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"مرشح إشارة صريح مع اختصارات وسم ورمز سهم.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"بحث لفظي محدود بالحقل عبر مسارات متداخلة خام، بما في ذلك مسارات الكائنات المنقطة والمصفوفات.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"تم ترحيل خيارات التطبيق من v{{oldVersion}} إلى v{{newVersion}}","Hooked into fetch":"Hook في fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook في XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"تم تفعيل الوضع الآمن للـ hook ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"فشل إصلاح hook ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"فشل تثبيت تتبع سياق الإشارات؛ المتابعة بدون متتبع ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: تم استلام {{count}} عنصر","Exporting to ZIP file: {{filename}}":"تصدير إلى ملف ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"تصدير إلى ملف {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"تصدير تدفقي إلى ملف {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"اكتمل الترحيل: تم تحديث {{users}} مستخدمين و {{tweets}} تغريدات.","TweetTombstone received (Reason: {{reason}})":"تم استلام TweetTombstone (السبب: {{reason}})","Failed to hook into XMLHttpRequest":"فشل hook في XMLHttpRequest","Fetch API not found, skipping fetch hooks":"لم يتم العثور على Fetch API، يتم تخطي hooks الخاصة بـ fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"دالة Fetch API الأساسية غير متاحة أو غير آمنة؛ تفعيل الوضع الآمن","Fetch hook base invocation failed; enabling safe mode":"فشل استدعاء hook fetch الأساسي؛ تفعيل الوضع الآمن","XHR send hook base invocation failed; enabling safe mode":"فشل استدعاء hook XHR send الأساسي؛ تفعيل الوضع الآمن","XHR open hook base invocation failed; enabling safe mode":"فشل استدعاء hook XHR open الأساسي؛ تفعيل الوضع الآمن","Fetch hook already installed":"hook الخاص بـ fetch مثبت بالفعل","Debug mode enabled":"تم تفعيل وضع التصحيح","Database cleared":"تم مسح قاعدة البيانات","Upgrading database schema...":"جارٍ ترقية مخطط قاعدة البيانات...","Database upgraded":"تمت ترقية قاعدة البيانات","Zip stream closed.":"تم إغلاق تدفق ZIP.","Running migration_20250609: Migrating legacy user data format":"تشغيل migration_20250609: ترحيل تنسيق بيانات المستخدم القديم","TweetUnavailable received (Reason: unknown)":"تم استلام TweetUnavailable (السبب: غير معروف)","Empty tweet received":"تم استلام تغريدة فارغة","Unknown tweet type received":"تم استلام نوع تغريدة غير معروف","Failed to extract tweet":"فشل استخراج التغريدة","Failed to export file":"فشل تصدير الملف","Failed to stream export file":"فشل تصدير الملف بالتدفق"}},ux={exporter:{ID:"ID",Date:"তারিখ",Content:"বিষয়বস্তু","Show Full Text":"সম্পূর্ণ লেখা দেখান",Media:"মিডিয়া","Screen Name":"ব্যবহারকারীর নাম","Profile Name":"প্রোফাইল নাম","Profile Image":"প্রোফাইল ছবি","User ID":"ব্যবহারকারী ID","Replying To":"যার উত্তরে","RT Source":"RT উৎস","Quote Source":"কোট উৎস","Media Tags":"মিডিয়া ট্যাগ",Favorites:"প্রিয়",Retweets:"রিটুইট",Bookmarks:"বুকমার্ক",Quotes:"কোট",Replies:"উত্তর",Views:"দেখা",Favorited:"প্রিয় করা হয়েছে",Retweeted:"রিটুইট করা হয়েছে",Bookmarked:"বুকমার্ক করা হয়েছে","Bookmark Folder":"বুকমার্ক ফোল্ডার",URL:"URL",Actions:"ক্রিয়া",Details:"বিস্তারিত",Description:"বিবরণ","Profile Banner":"প্রোফাইল ব্যানার",Followers:"ফলোয়ার",FollowingCount:"ফলো করা সংখ্যা",Statuses:"পোস্ট",Favourites:"প্রিয়",Listed:"লিস্টে আছে",Location:"অবস্থান",Website:"ওয়েবসাইট",Birthdate:"জন্মতারিখ","Verified Type":"যাচাইকরণ ধরন","Blue Verified":"Blue যাচাইকৃত",Following:"ফলো করছে","Follows You":"আপনাকে ফলো করে","Can DM":"DM করা যায়",Protected:"সুরক্ষিত","Created At":"তৈরি হয়েছে",Sender:"প্রেরক",Recipient:"প্রাপক","Conversation ID":"কথোপকথন ID","Conversation Type":"কথোপকথনের ধরন",Data:"ডেটা","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"ক্যাপচার করা ডেটা JSON/HTML/CSV ফাইল হিসেবে এক্সপোর্ট করুন। ডেটার পরিমাণ অনুযায়ী সময় লাগতে পারে। এক্সপোর্ট করা ফাইলে ছবি বা ভিডিওর মতো মিডিয়া ফাইল থাকবে না, শুধু URL থাকবে।","Data length:":"ডেটার দৈর্ঘ্য:","Export scope:":"এক্সপোর্ট পরিসর:","All current results":"বর্তমান সব ফলাফল","Selected rows":"নির্বাচিত সারি","Pinned result set":"পিন করা ফলাফল সেট",Query:"কোয়েরি",Sort:"সাজানো","Include all metadata:":"সব মেটাডেটা অন্তর্ভুক্ত করুন:","Include original record metadata in bundle:":"বান্ডেলে মূল রেকর্ডের মেটাডেটা অন্তর্ভুক্ত করুন:","Export columns":"এক্সপোর্ট কলাম","Custom columns":"কাস্টম কলাম","Select all":"সব নির্বাচন করুন",Clear:"সাফ করুন","columns selected":"টি কলাম নির্বাচিত",Metadata:"মেটাডেটা",None:"কিছু নয়",All:"সব","Custom fields":"কাস্টম ক্ষেত্র","Additional metadata paths":"অতিরিক্ত মেটাডেটা পাথ","metadata fields selected":"টি মেটাডেটা ক্ষেত্র নির্বাচিত","Export as:":"যে রূপে এক্সপোর্ট:","No data selected.":"কোনো ডেটা নির্বাচিত নয়।",Cancel:"বাতিল","Start Export":"এক্সপোর্ট শুরু করুন","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"ক্যাপচার করা ডেটা থেকে মিডিয়া ফাইল ডাউনলোড ও সংরক্ষণ করুন। ডেটার পরিমাণ অনুযায়ী সময় লাগতে পারে। ডাউনলোড হবে: প্রোফাইল ছবি, প্রোফাইল ব্যানার (ব্যবহারকারীর জন্য), ছবি ও ভিডিও (টুইটের জন্য)।","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"১০০টির বেশি মিডিয়া বা বড় ফাইলের জন্য URL কপি করে aria2-এর মতো বাহ্যিক ডাউনলোড ম্যানেজার দিয়ে ডাউনলোড করার পরামর্শ দেওয়া হয়।","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ব্রাউজার ZIP এক্সপোর্ট এখন সীমিত সমান্তরাল ডাউনলোড ব্যবহার করে। খুব বড় ভিডিও-ভিত্তিক কাজের জন্য URL বা aria2 এক্সপোর্ট এখনও কম-মেমরির সবচেয়ে নিরাপদ পথ।","Filename template:":"ফাইলনাম টেমপ্লেট:","Download scheduler":"ডাউনলোড শিডিউলার","Faster defaults are intended for bulk CDN transfer.":"দ্রুততর ডিফল্টগুলো বড় CDN ট্রান্সফারের জন্য।","Start delay (ms)":"শুরুর বিলম্ব (ms)","Global parallel":"গ্লোবাল সমান্তরাল","Per host":"প্রতি হোস্ট",Videos:"ভিডিও",Retries:"পুনঃচেষ্টা","Use aria2 format:":"aria2 ফরম্যাট ব্যবহার করুন:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"আরও তথ্যের জন্য ক্লিক করুন। প্রতিটি URL নতুন লাইনে থাকবে, আর পরের লাইনে তার ফাইলনাম থাকবে। এই ফরম্যাট aria2-এর সঙ্গে সামঞ্জস্যপূর্ণ।","Rate limit (ms):":"রেট সীমা (ms):","Media Filter:":"মিডিয়া ফিল্টার:","File Name":"ফাইলনাম","Media Type":"মিডিয়ার ধরন","Download URL":"ডাউনলোড URL","No media selected.":"কোনো মিডিয়া নির্বাচিত নয়।","Preview limited to first 250 media items.":"প্রিভিউ প্রথম ২৫০টি মিডিয়া আইটেমে সীমিত।",Zipping:"ZIP করা হচ্ছে","Copied!":"কপি হয়েছে!","Copy URLs":"URL কপি করুন","The tweet ID":"টুইট ID","The username of tweet author":"টুইট লেখকের ব্যবহারকারীর নাম","The profile name of tweet author":"টুইট লেখকের প্রোফাইল নাম","The media index in tweet (start from 0)":"টুইটে মিডিয়ার ইনডেক্স (০ থেকে শুরু)","The order of media in tweet (1/2/3/4)":"টুইটে মিডিয়ার ক্রম (1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD ফরম্যাটে পোস্টের তারিখ","The post time in HHmmss format":"HHmmss ফরম্যাটে পোস্টের সময়","The media type (photo/video/animated_gif)":"মিডিয়ার ধরন (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"মিডিয়া ফাইল এক্সটেনশন (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"মিডিয়া এক্সপোর্ট ব্যর্থ। আরও জানতে DevTools খুলুন।","Failed to copy media URLs. Open DevTools for more details.":"মিডিয়া URL কপি ব্যর্থ। আরও জানতে DevTools খুলুন।","filter.photo":"ছবি","filter.video":"ভিডিও","filter.animated_gif":"GIF","filter.retweet":"রিটুইট অন্তর্ভুক্ত করুন","loading remaining rows":"বাকি সারি লোড হচ্ছে","Bundle ZIP compression:":"Bundle ZIP কমপ্রেশন:","Fastest / store":"সবচেয়ে দ্রুত / store","Balanced / fast":"সামঞ্জস্যপূর্ণ / দ্রুত","Smaller / slower":"ছোট / ধীর","Cancel Export":"রপ্তানি বাতিল","Export a canonical portable ZIP bundle for sharing/importing.":"শেয়ার/ইমপোর্টের জন্য canonical portable ZIP bundle রপ্তানি করুন।","Export Bundle ZIP":"Bundle ZIP রপ্তানি","Source-backed media":"Source-backed মিডিয়া","rows scanned:":"স্ক্যান করা সারি:","media URLs:":"মিডিয়া URL:",loading:"লোড হচ্ছে","Loading media...":"মিডিয়া লোড হচ্ছে..."},common:{"Open Control Panel":"কন্ট্রোল প্যানেল খুলুন","Browse around to capture more data.":"আরও ডেটা ক্যাপচার করতে ব্রাউজ করুন।",Settings:"সেটিংস",General:"সাধারণ",Theme:"থিম",Language:"ভাষা",Debug:"ডিবাগ","Date Time Format":"তারিখ-সময় বিন্যাস","Click for more information. This will take effect on both previewer and exported files.":"আরও তথ্যের জন্য ক্লিক করুন। এটি প্রিভিউয়ার এবং এক্সপোর্ট করা ফাইল—দুটিতেই প্রযোজ্য হবে।","Use dedicated DB for accounts":"প্রতিটি অ্যাকাউন্টের জন্য আলাদা DB ব্যবহার করুন","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"এটি প্রতিটি Twitter অ্যাকাউন্টের জন্য আলাদা ডেটাবেস তৈরি করবে, ফলে একাধিক অ্যাকাউন্ট ব্যবহার করার সময় ডেটা মিশে যাওয়ার ঝুঁকি কমে।","Local Database":"স্থানীয় ডেটাবেস","Analyze DB":"বিশ্লেষণ","Export DB":"এক্সপোর্ট","Clear DB":"মুছুন","Bundle Export":"বান্ডল এক্সপোর্ট","Bundle Library":"বান্ডল লাইব্রেরি","QC Session":"QC সেশন","Diagnostic capture":"ডায়াগনস্টিক ক্যাপচার","Diagnostic buffers cleared.":"ডায়াগনস্টিক বাফার মুছে ফেলা হয়েছে।","Clear Buffers":"বাফার মুছুন","Preparing...":"প্রস্তুত হচ্ছে...","Preparing diagnostics...":"ডায়াগনস্টিক প্রস্তুত হচ্ছে...","Export QC Diagnostics":"QC ডায়াগনস্টিক এক্সপোর্ট","Export Diagnostics Bundle":"ডায়াগনস্টিক বান্ডল এক্সপোর্ট","QC idle.":"QC নিষ্ক্রিয়।","Are you sure to clear all data in the database?":"আপনি কি নিশ্চিত যে ডেটাবেসের সব ডেটা মুছে ফেলতে চান?","Database cleared.":"ডেটাবেস মুছে ফেলা হয়েছে।",Module:"মডিউল","Modules (Scroll to see more)":"মডিউল (আরও দেখতে স্ক্রল করুন)",About:"সম্পর্কে",Version:"সংস্করণ","Search...":"খুঁজুন...","Something went wrong.":"কিছু ভুল হয়েছে।","Error:":"ত্রুটি:","Captured:":"ক্যাপচার করা হয়েছে:","Rows per page:":"প্রতি পৃষ্ঠায় সারি:","Relation Types":"সম্পর্কের ধরন","Subject Accounts":"বিষয় অ্যাকাউন্ট","Subject User IDs":"বিষয় ব্যবহারকারী ID","Last Observed At":"শেষ পর্যবেক্ষণ","A - B of N items":"{{total}}টির মধ্যে {{from}} - {{to}}","No data available.":"কোনো ডেটা নেই।","No media available.":"কোনো মিডিয়া নেই।",Clear:"সাফ করুন","Bookmark folders":"বুকমার্ক ফোল্ডার","1 folder selected":"১টি ফোল্ডার নির্বাচিত","{{count}} folders selected":"{{count}}টি ফোল্ডার নির্বাচিত","Export Media":"মিডিয়া এক্সপোর্ট","Export Data":"ডেটা এক্সপোর্ট","Export Search History":"সার্চ ইতিহাস এক্সপোর্ট","JSON View":"JSON ভিউ","Media View":"মিডিয়া ভিউ",Bookmarks:"বুকমার্ক",Tweets:"টুইট",Users:"ব্যবহারকারী","User Tweets":"ব্যবহারকারীর টুইট","User Media":"ব্যবহারকারীর মিডিয়া","Tweet Details":"টুইটের বিবরণ","Search Timeline":"সার্চ টাইমলাইন","Home Timeline":"হোম টাইমলাইন","List Timeline":"লিস্ট টাইমলাইন","Community Timeline":"কমিউনিটি টাইমলাইন","Community Members":"কমিউনিটি সদস্য","List Members":"লিস্ট সদস্য","List Subscribers":"লিস্ট সাবস্ক্রাইবার","Direct Messages":"ডাইরেক্ট মেসেজ","Interaction Events":"ইন্টারঅ্যাকশন ইভেন্ট","Local Search":"স্থানীয় সার্চ","Runtime Logs":"রানটাইম লগ","Bundle Viewer":"বান্ডল ভিউয়ার","{{count}} imported bundles":"{{count}}টি আমদানি করা বান্ডল","Search indexed tweets with Twitter-style operators":"Twitter-ধাঁচের অপারেটর দিয়ে ইনডেক্স করা টুইট খুঁজুন","Local Recorder Search":"লোকাল রেকর্ডার সার্চ",Quotes:"কোট",CommunityMembers:"কমিউনিটি সদস্য",CommunityTimeline:"কমিউনিটি টাইমলাইন",DirectMessages:"ডাইরেক্ট মেসেজ",Followers:"ফলোয়ার",Following:"ফলো করছে",HomeTimeline:"হোম টাইমলাইন",Likes:"লাইক",ListMembers:"লিস্ট সদস্য",ListSubscribers:"লিস্ট সাবস্ক্রাইবার",ListTimeline:"লিস্ট টাইমলাইন",InteractionEvents:"ইন্টারঅ্যাকশন ইভেন্ট",LocalSearch:"স্থানীয় সার্চ",RawCapture:"কাঁচা ক্যাপচার",Retweeters:"রিটুইটকারী",RetweetersModule:"রিটুইটকারী",RuntimeLogs:"রানটাইম লগ",SearchTimeline:"সার্চ টাইমলাইন",TweetIndex:"টুইট ইনডেক্স",TweetDetail:"টুইট বিবরণ",UserDetail:"ব্যবহারকারী বিবরণ",UserMedia:"ব্যবহারকারীর মিডিয়া",UserTweets:"ব্যবহারকারীর টুইট",on:"চালু",off:"বন্ধ",unknown:"অজানা",online:"অনলাইন",offline:"অফলাইন",leader:"লিডার",follower:"ফলোয়ার",tab:"ট্যাব",both:"উভয়",xhr:"xhr",fetch:"fetch",watchdog:"ওয়াচডগ",all:"সব",explicit:"স্পষ্ট",loading:"লোড হচ্ছে",complete:"সম্পূর্ণ",idle:"নিষ্ক্রিয়","api-name":"API নাম","id-only":"শুধু ID","theme.system":"সিস্টেম","theme.cupcake":"হালকা","theme.dark":"গাঢ়","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"ব্যবসা","theme.winter":"শীত","Safe mode":"সেফ মোড","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"সক্রিয় থাকলে hook-ভিত্তিক ক্যাপচার বন্ধ করে। স্বাভাবিক ব্রাউজিং ও ডায়াগনস্টিক ক্যাপচারের জন্য এটি বন্ধ করুন।","Hook mode":"Hook মোড","Controls whether the userscript hooks XHR, fetch, both, or neither.":"userscript XHR, fetch, দুটোই বা কোনোটাই hook করবে কি না তা নিয়ন্ত্রণ করে।","Repair mode":"মেরামত মোড","Controls whether hook repair watchdog behavior is active.":"hook repair watchdog সক্রিয় থাকবে কি না তা নিয়ন্ত্রণ করে।","{{seconds}}s ago":"{{seconds}} সেকেন্ড আগে","Hooks: {{status}}":"হুকসমূহ:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"হুকসমূহ:xhr {{xhr}}, fetch {{fetch}}, শেষ {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"হুকসমূহ:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"মোড: সেফ {{safe}}, hook {{hook}}, মেরামত {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"মোড: সেফ {{safe}}, hook {{hook}}, মেরামত {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw ইভেন্ট: {{total}} | বাদ: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} লোড হচ্ছে / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow বাদ: {{drops}} | অনুপলব্ধ: {{unavailable}} | সবচেয়ে পুরনো pending: {{age}}ms","daemon: {{status}}":"ডেমন:{{status}}","daemon: {{status}} | last error: {{error}}":"ডেমন:{{status}} | শেষ ত্রুটি:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"মনিটর:{{role}} | লিডার:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | দমন করা route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"ডাটাবেস সংযুক্ত: {{name}}","App options loaded":"অ্যাপ অপশন লোড হয়েছে",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"অগঠিত টেক্সট কনটেন্ট-টার্ম মিল এবং উন্নত সংলগ্ন বাক্যাংশ উইন্ডোতে প্রসারিত হয়; উদ্ধৃত না থাকলে সাধারণ ফিলার শব্দের অগ্রাধিকার কমানো হয়।","Phrase search with optional slop.":"ঐচ্ছিক স্লপসহ বাক্যাংশ অনুসন্ধান।","Boolean operators with standard precedence and parentheses.":"স্ট্যান্ডার্ড অগ্রাধিকার ও বন্ধনীসহ বুলিয়ান অপারেটর।","Match the author handle or author id.":"লেখকের হ্যান্ডেল বা লেখক ID মিলান।","Shorthand for an enforced author constraint, equivalent to from:user.":"বাধ্যতামূলক লেখক সীমাবদ্ধতার সংক্ষিপ্ত রূপ, from:user-এর সমতুল্য।","Match reply targets, entity ids, or conversation ids.":"রিপ্লাই টার্গেট, এন্টিটি ID বা কথোপকথন ID মিলান।","Match bookmark folder id or folder name.":"বুকমার্ক ফোল্ডার ID বা নাম মিলান।","Match language, route surface, source text, or card name.":"ভাষা, রুট সারফেস, সোর্স টেক্সট বা কার্ড নাম মিলান।","Match domains or URLs found in tweets.":"টুইটে থাকা ডোমেইন বা URL মিলান।","Boolean state filters.":"বুলিয়ান অবস্থা ফিল্টার।","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"মিডিয়া, লিংক, মেনশন, হ্যাশট্যাগ, ক্যাশট্যাগ, এনগেজমেন্ট ও পোলের উপস্থিতি ফিল্টার।","Compatibility aliases retained for Twitter-style queries.":"Twitter-ধাঁচের কোয়েরির জন্য রাখা সামঞ্জস্যপূর্ণ alias।","Numeric threshold filters.":"সংখ্যাগত থ্রেশহোল্ড ফিল্টার।","Date, timestamp, and Snowflake-style boundary filters.":"তারিখ, টাইমস্ট্যাম্প ও Snowflake-ধাঁচের সীমা ফিল্টার।","Explicit mention filter plus shorthand hashtag and cashtag filters.":"স্পষ্ট মেনশন ফিল্টার এবং সংক্ষিপ্ত হ্যাশট্যাগ ও ক্যাশট্যাগ ফিল্টার।","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"ডটেড অবজেক্ট পাথ ও অ্যারে সহ কাঁচা নেস্টেড পাথে ফিল্ড-স্কোপড শব্দভিত্তিক অনুসন্ধান।","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"অ্যাপ অপশন v{{oldVersion}} থেকে v{{newVersion}}-এ মাইগ্রেট হয়েছে","Hooked into fetch":"fetch-এ hook করা হয়েছে","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest-এ hook করা হয়েছে (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook safe mode সক্রিয় ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook মেরামত ব্যর্থ ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking ইনস্টল ব্যর্থ; tracker ছাড়া চলবে ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} আইটেম পাওয়া গেছে","Exporting to ZIP file: {{filename}}":"ZIP ফাইলে রপ্তানি: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} ফাইলে রপ্তানি: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} ফাইলে streaming রপ্তানি: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"মাইগ্রেশন সম্পন্ন: {{users}} ব্যবহারকারী ও {{tweets}} টুইট আপডেট হয়েছে।","TweetTombstone received (Reason: {{reason}})":"TweetTombstone পাওয়া গেছে (কারণ: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest hook করতে ব্যর্থ","Fetch API not found, skipping fetch hooks":"Fetch API পাওয়া যায়নি, fetch hooks এড়িয়ে যাওয়া হচ্ছে","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function অনুপলব্ধ বা অনিরাপদ; safe mode চালু হচ্ছে","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation ব্যর্থ; safe mode চালু হচ্ছে","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation ব্যর্থ; safe mode চালু হচ্ছে","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation ব্যর্থ; safe mode চালু হচ্ছে","Fetch hook already installed":"Fetch hook ইতিমধ্যে ইনস্টল করা","Debug mode enabled":"Debug mode সক্রিয়","Database cleared":"ডাটাবেস পরিষ্কার হয়েছে","Upgrading database schema...":"ডাটাবেস schema আপগ্রেড হচ্ছে...","Database upgraded":"ডাটাবেস আপগ্রেড হয়েছে","Zip stream closed.":"ZIP stream বন্ধ হয়েছে।","Running migration_20250609: Migrating legacy user data format":"migration_20250609 চলছে: legacy user data format মাইগ্রেট হচ্ছে","TweetUnavailable received (Reason: unknown)":"TweetUnavailable পাওয়া গেছে (কারণ: অজানা)","Empty tweet received":"খালি টুইট পাওয়া গেছে","Unknown tweet type received":"অজানা টুইট টাইপ পাওয়া গেছে","Failed to extract tweet":"টুইট বের করতে ব্যর্থ","Failed to export file":"ফাইল রপ্তানি ব্যর্থ","Failed to stream export file":"stream export ফাইল ব্যর্থ"}},dx={exporter:{ID:"ID",Date:"Date",Content:"Content","Show Full Text":"Show Full Text",Media:"Media","Screen Name":"Screen Name","Profile Name":"Profile Name","Profile Image":"Profile Image","User ID":"User ID","Replying To":"Replying To","RT Source":"RT Source","Quote Source":"Quote Source","Media Tags":"Media Tags",Favorites:"Favorites",Retweets:"Retweets",Bookmarks:"Bookmarks",Quotes:"Quotes",Replies:"Replies",Views:"Views",Favorited:"Favorited",Retweeted:"Retweeted",Bookmarked:"Bookmarked","Bookmark Folder":"Bookmark Folder",URL:"URL",Actions:"Actions",Details:"Details",Description:"Description","Profile Banner":"Profile Banner",Followers:"Followers",FollowingCount:"Following Count",Statuses:"Statuses",Favourites:"Favourites",Listed:"Listed",Location:"Location",Website:"Website",Birthdate:"Birthdate","Verified Type":"Verified Type","Blue Verified":"Blue Verified",Following:"Following","Follows You":"Follows You","Can DM":"Can DM",Protected:"Protected","Created At":"Created At",Sender:"Sender",Recipient:"Recipient","Conversation ID":"Conversation ID","Conversation Type":"Conversation Type",Data:"Data","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.","Data length:":"Data length:","Export scope:":"Export scope:","All current results":"All current results","Selected rows":"Selected rows","Pinned result set":"Pinned result set",Query:"Query",Sort:"Sort","Include all metadata:":"Include all metadata:","Include original record metadata in bundle:":"Include original record metadata in bundle:","Export columns":"Export columns","Custom columns":"Custom columns","Select all":"Select all",Clear:"Clear","columns selected":"columns selected",Metadata:"Metadata",None:"None",All:"All","Custom fields":"Custom fields","Additional metadata paths":"Additional metadata paths","metadata fields selected":"metadata fields selected","Export as:":"Export as:","No data selected.":"No data selected.",Cancel:"Cancel","Start Export":"Start Export","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.","Filename template:":"Filename template:","Download scheduler":"Download scheduler","Faster defaults are intended for bulk CDN transfer.":"Faster defaults are intended for bulk CDN transfer.","Start delay (ms)":"Start delay (ms)","Global parallel":"Global parallel","Per host":"Per host",Videos:"Videos",Retries:"Retries","Use aria2 format:":"Use aria2 format:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.","Rate limit (ms):":"Rate limit (ms):","Media Filter:":"Media Filter:","File Name":"File Name","Media Type":"Media Type","Download URL":"Download URL","No media selected.":"No media selected.","Preview limited to first 250 media items.":"Preview limited to first 250 media items.",Zipping:"Zipping","Copied!":"Copied!","Copy URLs":"Copy URLs","The tweet ID":"The tweet ID","The username of tweet author":"The username of tweet author","The profile name of tweet author":"The profile name of tweet author","The media index in tweet (start from 0)":"The media index in tweet (start from 0)","The order of media in tweet (1/2/3/4)":"The order of media in tweet (1/2/3/4)","The post date in YYYYMMDD format":"The post date in YYYYMMDD format","The post time in HHmmss format":"The post time in HHmmss format","The media type (photo/video/animated_gif)":"The media type (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"The file extension of media (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Failed to export media. Open DevTools for more details.","Failed to copy media URLs. Open DevTools for more details.":"Failed to copy media URLs. Open DevTools for more details.","filter.photo":"Photo","filter.video":"Video","filter.animated_gif":"GIF","filter.retweet":"Include retweets","loading remaining rows":"loading remaining rows","Bundle ZIP compression:":"Bundle ZIP compression:","Fastest / store":"Fastest / store","Balanced / fast":"Balanced / fast","Smaller / slower":"Smaller / slower","Cancel Export":"Cancel Export","Export a canonical portable ZIP bundle for sharing/importing.":"Export a canonical portable ZIP bundle for sharing/importing.","Export Bundle ZIP":"Export Bundle ZIP","Source-backed media":"Source-backed media","rows scanned:":"rows scanned:","media URLs:":"media URLs:",loading:"loading","Loading media...":"Loading media...","Export the paired canonical namespace as a verified shared-safe bundle.":"Export the paired canonical namespace as a verified shared-safe bundle.","Pair a local companion to export its canonical namespace.":"Pair a local companion to export its canonical namespace.","Export Companion Namespace":"Export Companion Namespace"},common:{"Open Control Panel":"Open Control Panel","Browse around to capture more data.":"Browse around to capture more data.",Settings:"Settings",General:"General",Theme:"Theme",Language:"Language",Debug:"Debug","Date Time Format":"Date Time Format","Click for more information. This will take effect on both previewer and exported files.":"Click for more information. This will take effect on both previewer and exported files.","Use dedicated DB for accounts":"Use dedicated DB for accounts","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.","Local Database":"Local Database","Analyze DB":"Analyze","Export DB":"Export","Clear DB":"Clear","Bundle Export":"Bundle Export","Bundle Library":"Bundle Library","QC Session":"QC Session","Diagnostic capture":"Diagnostic capture","Diagnostic buffers cleared.":"Diagnostic buffers cleared.","Clear Buffers":"Clear Buffers","Preparing...":"Preparing...","Preparing diagnostics...":"Preparing diagnostics...","Export QC Diagnostics":"Export QC Diagnostics","Export Diagnostics Bundle":"Export Diagnostics Bundle","QC idle.":"QC idle.","Are you sure to clear all data in the database?":"Are you sure to clear all data in the database?","Database cleared.":"Database cleared.",Module:"Module","Modules (Scroll to see more)":"Modules (Scroll to see more)",About:"About",Version:"Version","Search...":"Search...","Something went wrong.":"Something went wrong.","Error:":"Error:","Captured:":"Captured:","Rows per page:":"Rows per page:","Relation Types":"Relation Types","Subject Accounts":"Subject Accounts","Subject User IDs":"Subject User IDs","Last Observed At":"Last Observed At","A - B of N items":"{{from}} - {{to}} of {{total}} items","No data available.":"No data available.","No media available.":"No media available.",Clear:"Clear","Bookmark folders":"Bookmark folders","1 folder selected":"1 folder selected","{{count}} folders selected":"{{count}} folders selected","Export Media":"Export Media","Export Data":"Export Data","Export Search History":"Export Search History","JSON View":"JSON View","Media View":"Media View",Bookmarks:"Bookmarks",Tweets:"Tweets",Users:"Users","User Tweets":"User Tweets","User Media":"User Media","Tweet Details":"Tweet Details","Search Timeline":"Search Timeline","Home Timeline":"Home Timeline","List Timeline":"List Timeline","Community Timeline":"Community Timeline","Community Members":"Community Members","List Members":"List Members","List Subscribers":"List Subscribers","Direct Messages":"Direct Messages","Interaction Events":"Interaction Events","Local Search":"Local Search","Runtime Logs":"Runtime Logs","Bundle Viewer":"Bundle Viewer","{{count}} imported bundles":"{{count}} imported bundles","Search indexed tweets with Twitter-style operators":"Search indexed tweets with Twitter-style operators","Local Recorder Search":"Local Recorder Search",Quotes:"Quotes",CommunityMembers:"CommunityMembers",CommunityTimeline:"CommunityTimeline",DirectMessages:"DirectMessages",Followers:"Followers",Following:"Following",HomeTimeline:"HomeTimeline",Likes:"Likes",ListMembers:"ListMembers",ListSubscribers:"ListSubscribers",ListTimeline:"ListTimeline",InteractionEvents:"InteractionEvents",LocalSearch:"LocalSearch",RawCapture:"RawCapture",Retweeters:"Retweeters",RetweetersModule:"RetweetersModule",RuntimeLogs:"RuntimeLogs",SearchTimeline:"SearchTimeline",TweetIndex:"TweetIndex",TweetDetail:"TweetDetail",UserDetail:"UserDetail",UserMedia:"UserMedia",UserTweets:"UserTweets",on:"on",off:"off",unknown:"unknown",online:"online",offline:"offline",leader:"leader",follower:"follower",tab:"tab",both:"both",xhr:"xhr",fetch:"fetch",watchdog:"watchdog",all:"all",explicit:"explicit",loading:"loading",complete:"complete",idle:"idle","api-name":"api-name","id-only":"id-only","theme.system":"System","theme.cupcake":"Cupcake","theme.dark":"Dark","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Business","theme.winter":"Winter","Safe mode":"Safe mode","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.","Hook mode":"Hook mode","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Controls whether the userscript hooks XHR, fetch, both, or neither.","Repair mode":"Repair mode","Controls whether hook repair watchdog behavior is active.":"Controls whether hook repair watchdog behavior is active.","{{seconds}}s ago":"{{seconds}}s ago","Hooks: {{status}}":"Hooks: {{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks: xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw events: {{total}} | dropped: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms","daemon: {{status}}":"daemon: {{status}}","daemon: {{status}} | last error: {{error}}":"daemon: {{status}} | last error: {{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor: {{role}} | leader: {{leader}} | lease: {{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Database connected: {{name}}","App options loaded":"App options loaded",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.","Phrase search with optional slop.":"Phrase search with optional slop.","Boolean operators with standard precedence and parentheses.":"Boolean operators with standard precedence and parentheses.","Match the author handle or author id.":"Match the author handle or author id.","Shorthand for an enforced author constraint, equivalent to from:user.":"Shorthand for an enforced author constraint, equivalent to from:user.","Match reply targets, entity ids, or conversation ids.":"Match reply targets, entity ids, or conversation ids.","Match bookmark folder id or folder name.":"Match bookmark folder id or folder name.","Match language, route surface, source text, or card name.":"Match language, route surface, source text, or card name.","Match domains or URLs found in tweets.":"Match domains or URLs found in tweets.","Boolean state filters.":"Boolean state filters.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.","Compatibility aliases retained for Twitter-style queries.":"Compatibility aliases retained for Twitter-style queries.","Numeric threshold filters.":"Numeric threshold filters.","Date, timestamp, and Snowflake-style boundary filters.":"Date, timestamp, and Snowflake-style boundary filters.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Explicit mention filter plus shorthand hashtag and cashtag filters.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"App options migrated from v{{oldVersion}} to v{{newVersion}}","Hooked into fetch":"Hooked into fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hooked into XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook safe mode enabled ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook repair failed ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking install failed; continuing without tracker ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} items received","Exporting to ZIP file: {{filename}}":"Exporting to ZIP file: {{filename}}","Exporting to {{format}} file: {{filename}}":"Exporting to {{format}} file: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Streaming export to {{format}} file: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migration completed: {{users}} users and {{tweets}} tweets updated.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone received (Reason: {{reason}})","Failed to hook into XMLHttpRequest":"Failed to hook into XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API not found, skipping fetch hooks","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function unavailable or unsafe; enabling safe mode","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation failed; enabling safe mode","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation failed; enabling safe mode","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation failed; enabling safe mode","Fetch hook already installed":"Fetch hook already installed","Debug mode enabled":"Debug mode enabled","Database cleared":"Database cleared","Upgrading database schema...":"Upgrading database schema...","Database upgraded":"Database upgraded","Zip stream closed.":"Zip stream closed.","Running migration_20250609: Migrating legacy user data format":"Running migration_20250609: Migrating legacy user data format","TweetUnavailable received (Reason: unknown)":"TweetUnavailable received (Reason: unknown)","Empty tweet received":"Empty tweet received","Unknown tweet type received":"Unknown tweet type received","Failed to extract tweet":"Failed to extract tweet","Failed to export file":"Failed to export file","Failed to stream export file":"Failed to stream export file"}},fx={exporter:{ID:"ID",Date:"Fecha",Content:"Contenido","Show Full Text":"Mostrar texto completo",Media:"Medios","Screen Name":"Nombre de usuario","Profile Name":"Nombre del perfil","Profile Image":"Imagen de perfil","User ID":"ID de usuario","Replying To":"Responde a","RT Source":"Fuente del RT","Quote Source":"Fuente de la cita","Media Tags":"Etiquetas de medios",Favorites:"Favoritos",Retweets:"Retweets",Bookmarks:"Marcadores",Quotes:"Citas",Replies:"Respuestas",Views:"Visualizaciones",Favorited:"Marcado como favorito",Retweeted:"Retuiteado",Bookmarked:"Guardado en marcadores","Bookmark Folder":"Carpeta de marcadores",URL:"URL",Actions:"Acciones",Details:"Detalles",Description:"Descripción","Profile Banner":"Banner del perfil",Followers:"Seguidores",FollowingCount:"Número de seguidos",Statuses:"Publicaciones",Favourites:"Favoritos",Listed:"En listas",Location:"Ubicación",Website:"Sitio web",Birthdate:"Fecha de nacimiento","Verified Type":"Tipo de verificación","Blue Verified":"Verificación Blue",Following:"Siguiendo","Follows You":"Te sigue","Can DM":"Puede recibir DM",Protected:"Protegido","Created At":"Creado el",Sender:"Remitente",Recipient:"Destinatario","Conversation ID":"ID de conversación","Conversation Type":"Tipo de conversación",Data:"Datos","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Exporta los datos capturados como archivo JSON/HTML/CSV. Puede tardar según la cantidad de datos. El archivo exportado no incluye archivos multimedia como imágenes o videos, solo sus URL.","Data length:":"Longitud de datos:","Export scope:":"Alcance de exportación:","All current results":"Todos los resultados actuales","Selected rows":"Filas seleccionadas","Pinned result set":"Conjunto de resultados fijado",Query:"Consulta",Sort:"Orden","Include all metadata:":"Incluir todos los metadatos:","Include original record metadata in bundle:":"Incluir metadatos del registro original en el bundle:","Export columns":"Columnas de exportación","Custom columns":"Columnas personalizadas","Select all":"Seleccionar todo",Clear:"Borrar","columns selected":"columnas seleccionadas",Metadata:"Metadatos",None:"Ninguno",All:"Todos","Custom fields":"Campos personalizados","Additional metadata paths":"Rutas de metadatos adicionales","metadata fields selected":"campos de metadatos seleccionados","Export as:":"Exportar como:","No data selected.":"No hay datos seleccionados.",Cancel:"Cancelar","Start Export":"Iniciar exportación","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Descarga y guarda archivos multimedia desde los datos capturados. Puede tardar según la cantidad de datos. Se descargarán imágenes de perfil, banners de perfil (para usuarios), imágenes y videos (para tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Para más de 100 medios o archivos grandes, se recomienda copiar las URL y descargarlas con un gestor externo como aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"La exportación ZIP del navegador ahora usa descargas paralelas limitadas. Para trabajos muy grandes con muchos videos, exportar URL o aria2 sigue siendo la ruta más segura y de baja memoria.","Filename template:":"Plantilla de nombre de archivo:","Download scheduler":"Planificador de descargas","Faster defaults are intended for bulk CDN transfer.":"Los valores predeterminados más rápidos están pensados para transferencias masivas desde CDN.","Start delay (ms)":"Retraso inicial (ms)","Global parallel":"Paralelismo global","Per host":"Por host",Videos:"Videos",Retries:"Reintentos","Use aria2 format:":"Usar formato aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Haz clic para más información. Cada URL irá en una línea nueva, con su nombre de archivo en la línea siguiente. Este formato es compatible con aria2.","Rate limit (ms):":"Límite de tasa (ms):","Media Filter:":"Filtro de medios:","File Name":"Nombre de archivo","Media Type":"Tipo de medio","Download URL":"URL de descarga","No media selected.":"No hay medios seleccionados.","Preview limited to first 250 media items.":"La vista previa se limita a los primeros 250 elementos multimedia.",Zipping:"Comprimiendo","Copied!":"Copiado","Copy URLs":"Copiar URL","The tweet ID":"El ID del tweet","The username of tweet author":"El nombre de usuario del autor del tweet","The profile name of tweet author":"El nombre de perfil del autor del tweet","The media index in tweet (start from 0)":"El índice del medio en el tweet (empieza en 0)","The order of media in tweet (1/2/3/4)":"El orden del medio en el tweet (1/2/3/4)","The post date in YYYYMMDD format":"La fecha de publicación en formato YYYYMMDD","The post time in HHmmss format":"La hora de publicación en formato HHmmss","The media type (photo/video/animated_gif)":"El tipo de medio (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"La extensión del archivo multimedia (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"No se pudieron exportar los medios. Abre DevTools para más detalles.","Failed to copy media URLs. Open DevTools for more details.":"No se pudieron copiar las URL de medios. Abre DevTools para más detalles.","filter.photo":"Foto","filter.video":"Video","filter.animated_gif":"GIF","filter.retweet":"Incluir retweets","loading remaining rows":"cargando filas restantes","Bundle ZIP compression:":"Compresión del ZIP bundle:","Fastest / store":"Más rápido / almacenar","Balanced / fast":"Equilibrado / rápido","Smaller / slower":"Más pequeño / más lento","Cancel Export":"Cancelar exportación","Export a canonical portable ZIP bundle for sharing/importing.":"Exporta un ZIP bundle portátil canónico para compartir/importar.","Export Bundle ZIP":"Exportar ZIP bundle","Source-backed media":"Medios respaldados por fuente","rows scanned:":"filas escaneadas:","media URLs:":"URLs de medios:",loading:"cargando","Loading media...":"Cargando medios..."},common:{"Open Control Panel":"Abrir panel de control","Browse around to capture more data.":"Navega para capturar más datos.",Settings:"Configuración",General:"General",Theme:"Tema",Language:"Idioma",Debug:"Depuración","Date Time Format":"Formato de fecha y hora","Click for more information. This will take effect on both previewer and exported files.":"Haz clic para ver más información. Esto se aplicará tanto al visor previo como a los archivos exportados.","Use dedicated DB for accounts":"Usar una base de datos dedicada por cuenta","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Esto creará una base de datos separada para cada cuenta de Twitter, lo que ayuda a reducir la mezcla de datos al usar varias cuentas.","Local Database":"Base de datos local","Analyze DB":"Analizar","Export DB":"Exportar","Clear DB":"Borrar","Bundle Export":"Exportar paquete","Bundle Library":"Biblioteca de paquetes","QC Session":"Sesión de QC","Diagnostic capture":"Captura diagnóstica","Diagnostic buffers cleared.":"Búferes de diagnóstico borrados.","Clear Buffers":"Borrar búferes","Preparing...":"Preparando...","Preparing diagnostics...":"Preparando diagnósticos...","Export QC Diagnostics":"Exportar diagnósticos de QC","Export Diagnostics Bundle":"Exportar paquete de diagnósticos","QC idle.":"QC inactivo.","Are you sure to clear all data in the database?":"¿Seguro que quieres borrar todos los datos de la base de datos?","Database cleared.":"Base de datos borrada.",Module:"Módulo","Modules (Scroll to see more)":"Módulos (desplázate para ver más)",About:"Acerca de",Version:"Versión","Search...":"Buscar...","Something went wrong.":"Algo salió mal.","Error:":"Error:","Captured:":"Capturado:","Rows per page:":"Filas por página:","Relation Types":"Tipos de relación","Subject Accounts":"Cuentas sujeto","Subject User IDs":"ID de usuario sujeto","Last Observed At":"Última observación","A - B of N items":"{{from}} - {{to}} de {{total}} elementos","No data available.":"No hay datos disponibles.","No media available.":"No hay medios disponibles.",Clear:"Limpiar","Bookmark folders":"Carpetas de marcadores","1 folder selected":"1 carpeta seleccionada","{{count}} folders selected":"{{count}} carpetas seleccionadas","Export Media":"Exportar medios","Export Data":"Exportar datos","Export Search History":"Exportar historial de búsqueda","JSON View":"Vista JSON","Media View":"Vista de medios",Bookmarks:"Marcadores",Tweets:"Tweets",Users:"Usuarios","User Tweets":"Tweets de usuario","User Media":"Medios de usuario","Tweet Details":"Detalles del tweet","Search Timeline":"Cronología de búsqueda","Home Timeline":"Cronología de inicio","List Timeline":"Cronología de lista","Community Timeline":"Cronología de comunidad","Community Members":"Miembros de comunidad","List Members":"Miembros de lista","List Subscribers":"Suscriptores de lista","Direct Messages":"Mensajes directos","Interaction Events":"Eventos de interacción","Local Search":"Búsqueda local","Runtime Logs":"Registros de ejecución","Bundle Viewer":"Visor de paquetes","{{count}} imported bundles":"{{count}} paquetes importados","Search indexed tweets with Twitter-style operators":"Busca tweets indexados con operadores estilo Twitter","Local Recorder Search":"Búsqueda del registrador local",Quotes:"Citas",CommunityMembers:"Miembros de comunidad",CommunityTimeline:"Cronología de comunidad",DirectMessages:"Mensajes directos",Followers:"Seguidores",Following:"Siguiendo",HomeTimeline:"Cronología de inicio",Likes:"Me gusta",ListMembers:"Miembros de lista",ListSubscribers:"Suscriptores de lista",ListTimeline:"Cronología de lista",InteractionEvents:"Eventos de interacción",LocalSearch:"Búsqueda local",RawCapture:"Captura sin procesar",Retweeters:"Retuiteadores",RetweetersModule:"Retuiteadores",RuntimeLogs:"Registros de ejecución",SearchTimeline:"Búsqueda",TweetIndex:"Índice de tweets",TweetDetail:"Detalle del tweet",UserDetail:"Detalle de usuario",UserMedia:"Medios de usuario",UserTweets:"Tweets de usuario",on:"activado",off:"desactivado",unknown:"desconocido",online:"en línea",offline:"sin conexión",leader:"líder",follower:"seguidor",tab:"pestaña",both:"ambos",xhr:"xhr",fetch:"fetch",watchdog:"vigilante",all:"todo",explicit:"explícito",loading:"cargando",complete:"completo",idle:"inactivo","api-name":"nombre de API","id-only":"solo ID","theme.system":"Sistema","theme.cupcake":"Claro","theme.dark":"Oscuro","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Negocios","theme.winter":"Invierno","Safe mode":"Modo seguro","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Desactiva la captura basada en hooks cuando está habilitado. Desactívalo para navegación normal y captura diagnóstica.","Hook mode":"Modo de hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Controla si el userscript engancha XHR, fetch, ambos o ninguno.","Repair mode":"Modo de reparación","Controls whether hook repair watchdog behavior is active.":"Controla si el watchdog de reparación de hooks está activo.","{{seconds}}s ago":"hace {{seconds}} s","Hooks: {{status}}":"Hooks:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks:xhr {{xhr}}, fetch {{fetch}}, último {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Modo: seguro {{safe}}, hook {{hook}}, reparación {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Modo: seguro {{safe}}, hook {{hook}}, reparación {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"eventos raw: {{total}} | descartados: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} en cola / {{enqueued}} enq / {{flushed}} volcados / {{failed}} fallidos","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"descartes por desborde de spool: {{drops}} | no disponible: {{unavailable}} | pendiente más antiguo: {{age}}ms","daemon: {{status}}":"servicio:{{status}}","daemon: {{status}} | last error: {{error}}":"servicio:{{status}} | último error:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor:{{role}} | líder:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"ticks monitor ruta/viewport: {{route}}/{{viewport}} | suprimidos ruta/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Base de datos conectada: {{name}}","App options loaded":"Opciones de la app cargadas",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Busca con operadores, frases y lógica booleana: from:alice ("design system"~2 OR reliability)',"Search help":"Ayuda de búsqueda","Clear search":"Limpiar búsqueda","Table view":"Vista de tabla","Exit fullscreen":"Salir de pantalla completa",Fullscreen:"Pantalla completa","{{view}} is disabled for large source-backed result sets.":"{{view}} está deshabilitada para conjuntos grandes respaldados por fuente.","{{view}} view - {{status}}":"Vista {{view}} - {{status}}","{{view}} view":"Vista {{view}}","loading {{loaded}}/{{total}}":"cargando {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"cargando más {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"buscando {{matches}}/{{total}}","matches {{matches}}/{{total}}":"coincidencias {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"filas {{loaded}}/{{total}}","rows {{count}}":"filas {{count}}","buffering...":"almacenando...","history {{count}}":"historial {{count}}","selected {{count}} ({{mode}})":"seleccionados {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"renderizado {{rendered}}/{{total}} (ventana {{start}}-{{end}})","Search Operators":"Operadores de búsqueda","Query semantics now follow recorder-style precedence:":"La semántica de consulta ahora sigue precedencia estilo recorder:","with implicit":"con","between adjacent terms.":"implícito entre términos adyacentes.","search.category.lexical":"Léxico","search.category.identity":"Identidad","search.category.metadata":"Metadatos","search.category.presence":"Presencia","search.category.numeric_date":"Numérico/fecha","search.category.compatibility":"Compatibilidad","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"El texto no estructurado se expande en coincidencias de términos de contenido y ventanas de frases adyacentes con mayor peso; las palabras comunes pierden prioridad salvo que estén entre comillas.","Phrase search with optional slop.":"Búsqueda de frases con holgura opcional.","Boolean operators with standard precedence and parentheses.":"Operadores booleanos con precedencia estándar y paréntesis.","Match the author handle or author id.":"Coincide con el usuario o ID del autor.","Shorthand for an enforced author constraint, equivalent to from:user.":"Atajo para una restricción de autor obligatoria, equivalente a from:user.","Match reply targets, entity ids, or conversation ids.":"Coincide con destinos de respuesta, IDs de entidad o IDs de conversación.","Match bookmark folder id or folder name.":"Coincide con el ID o nombre de la carpeta de marcadores.","Match language, route surface, source text, or card name.":"Coincide con idioma, superficie de ruta, texto de origen o nombre de tarjeta.","Match domains or URLs found in tweets.":"Coincide con dominios o URLs encontrados en tweets.","Boolean state filters.":"Filtros de estado booleanos.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filtros de presencia para medios, enlaces, menciones, hashtags, cashtags, interacción y encuestas.","Compatibility aliases retained for Twitter-style queries.":"Alias de compatibilidad conservados para consultas estilo Twitter.","Numeric threshold filters.":"Filtros de umbral numérico.","Date, timestamp, and Snowflake-style boundary filters.":"Filtros de límite por fecha, marca temporal y estilo Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filtro explícito de mención más filtros abreviados de hashtag y cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Búsqueda léxica limitada a campos sobre rutas anidadas sin procesar, incluidas rutas con puntos y arrays.","loading source {{scanned}}/{{total}}":"cargando fuente {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"fuente {{status}} {{scanned}}/{{total}}","media {{count}}":"medios {{count}}","loaded media {{count}}":"medios cargados {{count}}","source rows {{scanned}}/{{total}} {{status}}":"filas fuente {{scanned}}/{{total}} {{status}}","source rows {{count}}":"filas fuente {{count}}","layout {{columns}} cols @ {{width}}px":"diseño {{columns}} cols @ {{width}}px","original tweet attachments only":"solo adjuntos del tweet original","Loading media.":"Cargando medios.","Comfortable density":"Densidad cómoda","Compact density":"Densidad compacta",Photo:"Foto",Video:"Video","Open tweet":"Abrir tweet","Export menu is open while remaining rows load in the background.":"El menú de exportación está abierto mientras las filas restantes cargan en segundo plano.","Wait for records to finish loading before exporting.":"Espera a que los registros terminen de cargar antes de exportar.","Exports stream from the active source without loading all rows into the table.":"Exporta en streaming desde la fuente activa sin cargar todas las filas en la tabla.","Opens immediately and loads remaining rows in the background.":"Se abre de inmediato y carga las filas restantes en segundo plano.","Export persisted bookmark search history":"Exportar historial de búsqueda de marcadores guardado","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`último: {{latest}}
nombre-api: {{apiName}}
solo-id: {{idOnly}}
ninguno: {{none}}`,"folder metadata: {{status}}":"metadatos de carpeta: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"La exportación de medios está deshabilitada para resultados grandes hasta que tenga stream respaldado por fuente.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Opciones migradas de v{{oldVersion}} a v{{newVersion}}","Hooked into fetch":"Hook instalado en fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook instalado en XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Modo seguro de hooks activado ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Reparación de hook fallida ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Falló la instalación del rastreador de contexto de marcadores; continúa sin rastreador ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} elementos recibidos","Exporting to ZIP file: {{filename}}":"Exportando a archivo ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"Exportando a archivo {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Exportación streaming a archivo {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migración completada: {{users}} usuarios y {{tweets}} tweets actualizados.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone recibido (Razón: {{reason}})","Failed to hook into XMLHttpRequest":"Error al enganchar XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API no encontrada, omitiendo hooks de fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"Función base de Fetch API no disponible o insegura; activando modo seguro","Fetch hook base invocation failed; enabling safe mode":"Invocación base del hook fetch fallida; activando modo seguro","XHR send hook base invocation failed; enabling safe mode":"Invocación base del hook XHR send fallida; activando modo seguro","XHR open hook base invocation failed; enabling safe mode":"Invocación base del hook XHR open fallida; activando modo seguro","Fetch hook already installed":"Hook de fetch ya instalado","Debug mode enabled":"Modo debug activado","Database cleared":"Base de datos borrada","Upgrading database schema...":"Actualizando esquema de base de datos...","Database upgraded":"Base de datos actualizada","Zip stream closed.":"Stream ZIP cerrado.","Running migration_20250609: Migrating legacy user data format":"Ejecutando migration_20250609: migrando formato heredado de datos de usuario","TweetUnavailable received (Reason: unknown)":"TweetUnavailable recibido (Razón: desconocida)","Empty tweet received":"Tweet vacío recibido","Unknown tweet type received":"Tipo de tweet desconocido recibido","Failed to extract tweet":"No se pudo extraer el tweet","Failed to export file":"No se pudo exportar el archivo","Failed to stream export file":"No se pudo exportar archivo en streaming"}},hx={exporter:{ID:"ID",Date:"Date",Content:"Contenu","Show Full Text":"Afficher le texte complet",Media:"Médias","Screen Name":"Nom d’utilisateur","Profile Name":"Nom du profil","Profile Image":"Image de profil","User ID":"ID utilisateur","Replying To":"Répond à","RT Source":"Source du RT","Quote Source":"Source de la citation","Media Tags":"Tags média",Favorites:"Favoris",Retweets:"Retweets",Bookmarks:"Signets",Quotes:"Citations",Replies:"Réponses",Views:"Vues",Favorited:"Ajouté aux favoris",Retweeted:"Retweeté",Bookmarked:"Ajouté aux signets","Bookmark Folder":"Dossier de signets",URL:"URL",Actions:"Actions",Details:"Détails",Description:"Description","Profile Banner":"Bannière du profil",Followers:"Abonnés",FollowingCount:"Nombre d’abonnements",Statuses:"Publications",Favourites:"Favoris",Listed:"Listé",Location:"Lieu",Website:"Site web",Birthdate:"Date de naissance","Verified Type":"Type de vérification","Blue Verified":"Vérifié Blue",Following:"Abonnements","Follows You":"Vous suit","Can DM":"DM possible",Protected:"Protégé","Created At":"Créé le",Sender:"Expéditeur",Recipient:"Destinataire","Conversation ID":"ID de conversation","Conversation Type":"Type de conversation",Data:"Données","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Exportez les données capturées en fichier JSON/HTML/CSV. Cela peut prendre du temps selon la quantité de données. Le fichier exporté n’inclut pas les médias comme les images et vidéos, seulement leurs URL.","Data length:":"Longueur des données :","Export scope:":"Portée de l’export :","All current results":"Tous les résultats actuels","Selected rows":"Lignes sélectionnées","Pinned result set":"Ensemble de résultats épinglé",Query:"Requête",Sort:"Tri","Include all metadata:":"Inclure toutes les métadonnées :","Include original record metadata in bundle:":"Inclure les métadonnées de l’enregistrement original dans le bundle :","Export columns":"Colonnes d’export","Custom columns":"Colonnes personnalisées","Select all":"Tout sélectionner",Clear:"Effacer","columns selected":"colonnes sélectionnées",Metadata:"Métadonnées",None:"Aucun",All:"Tous","Custom fields":"Champs personnalisés","Additional metadata paths":"Chemins de métadonnées supplémentaires","metadata fields selected":"champs de métadonnées sélectionnés","Export as:":"Exporter en :","No data selected.":"Aucune donnée sélectionnée.",Cancel:"Annuler","Start Export":"Démarrer l’export","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Télécharge et enregistre les médias à partir des données capturées. Cela peut prendre du temps selon la quantité de données. Les médias téléchargés incluent les images de profil, les bannières de profil (pour les utilisateurs), les images et les vidéos (pour les tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Pour plus de 100 médias ou de gros fichiers, il est recommandé de copier les URL et de les télécharger avec un gestionnaire externe comme aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"L’export ZIP du navigateur utilise maintenant des téléchargements parallèles bornés. Pour les très gros travaux riches en vidéos, l’export URL ou aria2 reste la voie la plus sûre et la moins gourmande en mémoire.","Filename template:":"Modèle de nom de fichier :","Download scheduler":"Planificateur de téléchargement","Faster defaults are intended for bulk CDN transfer.":"Les valeurs par défaut plus rapides sont prévues pour les transferts CDN en masse.","Start delay (ms)":"Délai de départ (ms)","Global parallel":"Parallélisme global","Per host":"Par hôte",Videos:"Vidéos",Retries:"Tentatives","Use aria2 format:":"Utiliser le format aria2 :","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Cliquez pour plus d’informations. Chaque URL sera sur une nouvelle ligne, avec le nom de fichier sur la ligne suivante. Ce format est compatible avec aria2.","Rate limit (ms):":"Limite de débit (ms) :","Media Filter:":"Filtre média :","File Name":"Nom de fichier","Media Type":"Type de média","Download URL":"URL de téléchargement","No media selected.":"Aucun média sélectionné.","Preview limited to first 250 media items.":"Aperçu limité aux 250 premiers médias.",Zipping:"Compression ZIP","Copied!":"Copié !","Copy URLs":"Copier les URL","The tweet ID":"L’ID du tweet","The username of tweet author":"Le nom d’utilisateur de l’auteur du tweet","The profile name of tweet author":"Le nom de profil de l’auteur du tweet","The media index in tweet (start from 0)":"L’index du média dans le tweet (commence à 0)","The order of media in tweet (1/2/3/4)":"L’ordre du média dans le tweet (1/2/3/4)","The post date in YYYYMMDD format":"La date de publication au format YYYYMMDD","The post time in HHmmss format":"L’heure de publication au format HHmmss","The media type (photo/video/animated_gif)":"Le type de média (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"L’extension du fichier média (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Échec de l’export des médias. Ouvrez DevTools pour plus de détails.","Failed to copy media URLs. Open DevTools for more details.":"Échec de la copie des URL média. Ouvrez DevTools pour plus de détails.","filter.photo":"Photo","filter.video":"Vidéo","filter.animated_gif":"GIF","filter.retweet":"Inclure les retweets","loading remaining rows":"chargement des lignes restantes","Bundle ZIP compression:":"Compression du bundle ZIP :","Fastest / store":"Plus rapide / stocker","Balanced / fast":"Équilibré / rapide","Smaller / slower":"Plus petit / plus lent","Cancel Export":"Annuler l’export","Export a canonical portable ZIP bundle for sharing/importing.":"Exporte un bundle ZIP portable canonique pour partage/import.","Export Bundle ZIP":"Exporter le bundle ZIP","Source-backed media":"Médias basés sur source","rows scanned:":"lignes analysées :","media URLs:":"URL médias :",loading:"chargement","Loading media...":"Chargement des médias..."},common:{"Open Control Panel":"Ouvrir le panneau de contrôle","Browse around to capture more data.":"Parcourez les pages pour capturer plus de données.",Settings:"Paramètres",General:"Général",Theme:"Thème",Language:"Langue",Debug:"Débogage","Date Time Format":"Format de date et d’heure","Click for more information. This will take effect on both previewer and exported files.":"Cliquez pour plus d’informations. Cela s’appliquera à la prévisualisation et aux fichiers exportés.","Use dedicated DB for accounts":"Utiliser une base dédiée par compte","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Cela créera une base de données séparée pour chaque compte Twitter, ce qui réduit le risque de mélange des données lorsque vous utilisez plusieurs comptes.","Local Database":"Base de données locale","Analyze DB":"Analyser","Export DB":"Exporter","Clear DB":"Effacer","Bundle Export":"Exporter un paquet","Bundle Library":"Bibliothèque de paquets","QC Session":"Session QC","Diagnostic capture":"Capture diagnostique","Diagnostic buffers cleared.":"Tampons de diagnostic effacés.","Clear Buffers":"Effacer les tampons","Preparing...":"Préparation...","Preparing diagnostics...":"Préparation des diagnostics...","Export QC Diagnostics":"Exporter les diagnostics QC","Export Diagnostics Bundle":"Exporter le paquet de diagnostics","QC idle.":"QC inactif.","Are you sure to clear all data in the database?":"Voulez-vous vraiment effacer toutes les données de la base ?","Database cleared.":"Base de données effacée.",Module:"Module","Modules (Scroll to see more)":"Modules (faites défiler pour en voir plus)",About:"À propos",Version:"Version","Search...":"Rechercher...","Something went wrong.":"Une erreur est survenue.","Error:":"Erreur :","Captured:":"Capturé :","Rows per page:":"Lignes par page :","Relation Types":"Types de relation","Subject Accounts":"Comptes sujets","Subject User IDs":"ID utilisateur sujets","Last Observed At":"Dernière observation","A - B of N items":"{{from}} - {{to}} sur {{total}} éléments","No data available.":"Aucune donnée disponible.","No media available.":"Aucun média disponible.",Clear:"Effacer","Bookmark folders":"Dossiers de signets","1 folder selected":"1 dossier sélectionné","{{count}} folders selected":"{{count}} dossiers sélectionnés","Export Media":"Exporter les médias","Export Data":"Exporter les données","Export Search History":"Exporter l’historique de recherche","JSON View":"Vue JSON","Media View":"Vue média",Bookmarks:"Signets",Tweets:"Tweets",Users:"Utilisateurs","User Tweets":"Tweets utilisateur","User Media":"Médias utilisateur","Tweet Details":"Détails du tweet","Search Timeline":"Fil de recherche","Home Timeline":"Fil d’accueil","List Timeline":"Fil de liste","Community Timeline":"Fil de communauté","Community Members":"Membres de communauté","List Members":"Membres de liste","List Subscribers":"Abonnés de liste","Direct Messages":"Messages directs","Interaction Events":"Événements d’interaction","Local Search":"Recherche locale","Runtime Logs":"Journaux d’exécution","Bundle Viewer":"Visionneuse de paquets","{{count}} imported bundles":"{{count}} paquets importés","Search indexed tweets with Twitter-style operators":"Rechercher des tweets indexés avec des opérateurs de type Twitter","Local Recorder Search":"Recherche de l’enregistreur local",Quotes:"Citations",CommunityMembers:"Membres de communauté",CommunityTimeline:"Fil de communauté",DirectMessages:"Messages directs",Followers:"Abonnés",Following:"Abonnements",HomeTimeline:"Fil d’accueil",Likes:"J’aime",ListMembers:"Membres de liste",ListSubscribers:"Abonnés de liste",ListTimeline:"Fil de liste",InteractionEvents:"Événements d’interaction",LocalSearch:"Recherche locale",RawCapture:"Capture brute",Retweeters:"Retweeteurs",RetweetersModule:"Retweeteurs",RuntimeLogs:"Journaux d’exécution",SearchTimeline:"Fil de recherche",TweetIndex:"Index des tweets",TweetDetail:"Détail du tweet",UserDetail:"Détail utilisateur",UserMedia:"Médias utilisateur",UserTweets:"Tweets utilisateur",on:"activé",off:"désactivé",unknown:"inconnu",online:"en ligne",offline:"hors ligne",leader:"leader",follower:"suiveur",tab:"onglet",both:"les deux",xhr:"xhr",fetch:"fetch",watchdog:"watchdog",all:"tout",explicit:"explicite",loading:"chargement",complete:"terminé",idle:"inactif","api-name":"nom API","id-only":"ID seul","theme.system":"Système","theme.cupcake":"Clair","theme.dark":"Sombre","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Business","theme.winter":"Hiver","Safe mode":"Mode sûr","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Désactive la capture par hooks lorsqu’il est activé. Désactivez-le pour la navigation normale et la capture diagnostique.","Hook mode":"Mode hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Contrôle si le userscript hook XHR, fetch, les deux ou aucun.","Repair mode":"Mode réparation","Controls whether hook repair watchdog behavior is active.":"Contrôle si le watchdog de réparation des hooks est actif.","{{seconds}}s ago":"il y a {{seconds}} s","Hooks: {{status}}":"Hooks : {{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks : xhr {{xhr}}, fetch {{fetch}}, dernier {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks : xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Mode : sûr {{safe}}, hook {{hook}}, réparation {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Mode : sûr {{safe}}, hook {{hook}}, réparation {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"événements raw : {{total}} | abandonnés : {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool : {{queued}} en file / {{enqueued}} enq / {{flushed}} vidés / {{failed}} échoués","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"abandons par débordement spool : {{drops}} | indisponible : {{unavailable}} | plus ancien en attente : {{age}}ms","daemon: {{status}}":"daemon : {{status}}","daemon: {{status}} | last error: {{error}}":"daemon : {{status}} | dernière erreur : {{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor : {{role}} | leader : {{leader}} | bail : {{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"ticks monitor route/viewport : {{route}}/{{viewport}} | supprimés route/viewport : {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Base de données connectée : {{name}}","App options loaded":"Options de l’app chargées",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Rechercher avec opérateurs, phrases et logique booléenne : from:alice ("design system"~2 OR reliability)',"Search help":"Aide recherche","Clear search":"Effacer la recherche","Table view":"Vue tableau","Exit fullscreen":"Quitter le plein écran",Fullscreen:"Plein écran","{{view}} is disabled for large source-backed result sets.":"{{view}} est désactivé pour les grands ensembles basés sur source.","{{view}} view - {{status}}":"Vue {{view}} - {{status}}","{{view}} view":"Vue {{view}}","loading {{loaded}}/{{total}}":"chargement {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"chargement supplémentaire {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"recherche {{matches}}/{{total}}","matches {{matches}}/{{total}}":"résultats {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"lignes {{loaded}}/{{total}}","rows {{count}}":"lignes {{count}}","buffering...":"mise en mémoire...","history {{count}}":"historique {{count}}","selected {{count}} ({{mode}})":"sélectionnés {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendus {{rendered}}/{{total}} (fenêtre {{start}}-{{end}})","Search Operators":"Opérateurs de recherche","Query semantics now follow recorder-style precedence:":"La sémantique suit désormais la priorité style recorder :","with implicit":"avec","between adjacent terms.":"implicite entre termes adjacents.","search.category.lexical":"Lexical","search.category.identity":"Identité","search.category.metadata":"Métadonnées","search.category.presence":"Présence","search.category.numeric_date":"Numérique/date","search.category.compatibility":"Compatibilité","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Le texte non structuré est développé en correspondances de termes et en fenêtres de phrases adjacentes renforcées ; les mots de remplissage courants sont dépriorisés sauf s’ils sont entre guillemets.","Phrase search with optional slop.":"Recherche d’expression avec marge facultative.","Boolean operators with standard precedence and parentheses.":"Opérateurs booléens avec priorité standard et parenthèses.","Match the author handle or author id.":"Correspond au nom d’utilisateur ou à l’ID de l’auteur.","Shorthand for an enforced author constraint, equivalent to from:user.":"Raccourci pour une contrainte d’auteur obligatoire, équivalent à from:user.","Match reply targets, entity ids, or conversation ids.":"Correspond aux cibles de réponse, IDs d’entité ou IDs de conversation.","Match bookmark folder id or folder name.":"Correspond à l’ID ou au nom du dossier de signets.","Match language, route surface, source text, or card name.":"Correspond à la langue, à la surface de route, au texte source ou au nom de carte.","Match domains or URLs found in tweets.":"Correspond aux domaines ou URL trouvés dans les tweets.","Boolean state filters.":"Filtres d’état booléens.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filtres de présence pour médias, liens, mentions, hashtags, cashtags, engagement et sondages.","Compatibility aliases retained for Twitter-style queries.":"Alias de compatibilité conservés pour les requêtes de style Twitter.","Numeric threshold filters.":"Filtres de seuil numérique.","Date, timestamp, and Snowflake-style boundary filters.":"Filtres de limites par date, horodatage et style Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filtre de mention explicite avec raccourcis de hashtag et de cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Recherche lexicale limitée à un champ sur des chemins imbriqués bruts, y compris chemins pointés et tableaux.","loading source {{scanned}}/{{total}}":"chargement source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"médias {{count}}","loaded media {{count}}":"médias chargés {{count}}","source rows {{scanned}}/{{total}} {{status}}":"lignes source {{scanned}}/{{total}} {{status}}","source rows {{count}}":"lignes source {{count}}","layout {{columns}} cols @ {{width}}px":"disposition {{columns}} cols @ {{width}}px","original tweet attachments only":"pièces jointes du tweet original uniquement","Loading media.":"Chargement des médias.","Comfortable density":"Densité confortable","Compact density":"Densité compacte",Photo:"Photo",Video:"Vidéo","Open tweet":"Ouvrir le tweet","Export menu is open while remaining rows load in the background.":"Le menu d’export est ouvert pendant le chargement en arrière-plan des lignes restantes.","Wait for records to finish loading before exporting.":"Attendez la fin du chargement des enregistrements avant d’exporter.","Exports stream from the active source without loading all rows into the table.":"Exporte en flux depuis la source active sans charger toutes les lignes dans le tableau.","Opens immediately and loads remaining rows in the background.":"S’ouvre immédiatement et charge les lignes restantes en arrière-plan.","Export persisted bookmark search history":"Exporter l’historique de recherche de signets persistant","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`dernier : {{latest}}
nom-api : {{apiName}}
id-seul : {{idOnly}}
aucun : {{none}}`,"folder metadata: {{status}}":"métadonnées du dossier : {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"L’export média est désactivé pour les grands résultats tant qu’un flux source n’est pas disponible.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Options migrées de v{{oldVersion}} vers v{{newVersion}}","Hooked into fetch":"Hook installé dans fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook installé dans XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Mode sûr des hooks activé ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Réparation du hook échouée ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Installation du suivi de contexte des signets échouée ; poursuite sans tracker ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}} : {{count}} éléments reçus","Exporting to ZIP file: {{filename}}":"Export vers fichier ZIP : {{filename}}","Exporting to {{format}} file: {{filename}}":"Export vers fichier {{format}} : {{filename}}","Streaming export to {{format}} file: {{filename}}":"Export en flux vers fichier {{format}} : {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migration terminée : {{users}} utilisateurs et {{tweets}} tweets mis à jour.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone reçu (Raison : {{reason}})","Failed to hook into XMLHttpRequest":"Échec du hook XMLHttpRequest","Fetch API not found, skipping fetch hooks":"API Fetch introuvable, hooks fetch ignorés","Fetch API base function unavailable or unsafe; enabling safe mode":"Fonction de base Fetch API indisponible ou dangereuse ; activation du mode sûr","Fetch hook base invocation failed; enabling safe mode":"Invocation de base du hook fetch échouée ; activation du mode sûr","XHR send hook base invocation failed; enabling safe mode":"Invocation de base du hook XHR send échouée ; activation du mode sûr","XHR open hook base invocation failed; enabling safe mode":"Invocation de base du hook XHR open échouée ; activation du mode sûr","Fetch hook already installed":"Hook fetch déjà installé","Debug mode enabled":"Mode debug activé","Database cleared":"Base de données effacée","Upgrading database schema...":"Mise à niveau du schéma de base de données...","Database upgraded":"Base de données mise à niveau","Zip stream closed.":"Flux ZIP fermé.","Running migration_20250609: Migrating legacy user data format":"Exécution de migration_20250609 : migration du format utilisateur hérité","TweetUnavailable received (Reason: unknown)":"TweetUnavailable reçu (Raison : inconnue)","Empty tweet received":"Tweet vide reçu","Unknown tweet type received":"Type de tweet inconnu reçu","Failed to extract tweet":"Échec de l’extraction du tweet","Failed to export file":"Échec de l’export du fichier","Failed to stream export file":"Échec de l’export du fichier en flux"}},px={exporter:{ID:"ID",Date:"दिनांक",Content:"सामग्री","Show Full Text":"पूरा पाठ दिखाएँ",Media:"मीडिया","Screen Name":"यूज़रनेम","Profile Name":"प्रोफ़ाइल नाम","Profile Image":"प्रोफ़ाइल छवि","User ID":"उपयोगकर्ता ID","Replying To":"जिसे उत्तर दे रहा है","RT Source":"RT स्रोत","Quote Source":"कोट स्रोत","Media Tags":"मीडिया टैग",Favorites:"पसंदीदा",Retweets:"रीट्वीट",Bookmarks:"बुकमार्क",Quotes:"कोट्स",Replies:"उत्तर",Views:"दृश्य",Favorited:"पसंदीदा किया गया",Retweeted:"रीट्वीट किया गया",Bookmarked:"बुकमार्क किया गया","Bookmark Folder":"बुकमार्क फ़ोल्डर",URL:"URL",Actions:"क्रियाएँ",Details:"विवरण",Description:"विवरण","Profile Banner":"प्रोफ़ाइल बैनर",Followers:"फ़ॉलोअर",FollowingCount:"फ़ॉलोइंग संख्या",Statuses:"पोस्ट",Favourites:"पसंदीदा",Listed:"सूचियों में",Location:"स्थान",Website:"वेबसाइट",Birthdate:"जन्म तिथि","Verified Type":"सत्यापन प्रकार","Blue Verified":"Blue सत्यापित",Following:"फ़ॉलो कर रहे हैं","Follows You":"आपको फ़ॉलो करता है","Can DM":"DM कर सकते हैं",Protected:"संरक्षित","Created At":"बनाया गया",Sender:"प्रेषक",Recipient:"प्राप्तकर्ता","Conversation ID":"वार्तालाप ID","Conversation Type":"वार्तालाप प्रकार",Data:"डेटा","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"कैप्चर किए गए डेटा को JSON/HTML/CSV फ़ाइल के रूप में निर्यात करें। डेटा की मात्रा के अनुसार इसमें समय लग सकता है। निर्यात फ़ाइल में चित्र और वीडियो जैसी मीडिया फ़ाइलें शामिल नहीं होंगी, केवल उनके URL होंगे।","Data length:":"डेटा लंबाई:","Export scope:":"निर्यात दायरा:","All current results":"सभी मौजूदा परिणाम","Selected rows":"चयनित पंक्तियाँ","Pinned result set":"पिन किया गया परिणाम सेट",Query:"क्वेरी",Sort:"क्रम","Include all metadata:":"सारा मेटाडेटा शामिल करें:","Include original record metadata in bundle:":"बंडल में मूल रिकॉर्ड मेटाडेटा शामिल करें:","Export columns":"निर्यात कॉलम","Custom columns":"कस्टम कॉलम","Select all":"सभी चुनें",Clear:"साफ़ करें","columns selected":"कॉलम चयनित",Metadata:"मेटाडेटा",None:"कोई नहीं",All:"सभी","Custom fields":"कस्टम फ़ील्ड","Additional metadata paths":"अतिरिक्त मेटाडेटा पाथ","metadata fields selected":"मेटाडेटा फ़ील्ड चयनित","Export as:":"इस रूप में निर्यात करें:","No data selected.":"कोई डेटा चयनित नहीं है।",Cancel:"रद्द करें","Start Export":"निर्यात शुरू करें","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"कैप्चर किए गए डेटा से मीडिया फ़ाइलें डाउनलोड और सेव करें। डेटा की मात्रा के अनुसार इसमें समय लग सकता है। डाउनलोड में प्रोफ़ाइल छवियाँ, प्रोफ़ाइल बैनर (उपयोगकर्ताओं के लिए), छवियाँ और वीडियो (ट्वीट के लिए) शामिल होंगे।","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"100 से अधिक मीडिया या बड़ी फ़ाइलों के लिए URL कॉपी करके aria2 जैसे बाहरी डाउनलोड मैनेजर से डाउनलोड करना बेहतर है।","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ब्राउज़र ZIP निर्यात अब सीमित समानांतर डाउनलोड का उपयोग करता है। बहुत बड़े, वीडियो-भारी कार्यों के लिए URL या aria2 निर्यात अभी भी कम-मेमोरी वाला सबसे सुरक्षित रास्ता है।","Filename template:":"फ़ाइल नाम टेम्पलेट:","Download scheduler":"डाउनलोड शेड्यूलर","Faster defaults are intended for bulk CDN transfer.":"तेज़ डिफ़ॉल्ट बड़े CDN ट्रांसफ़र के लिए हैं।","Start delay (ms)":"आरंभ विलंब (ms)","Global parallel":"वैश्विक समानांतर","Per host":"प्रति होस्ट",Videos:"वीडियो",Retries:"पुनः प्रयास","Use aria2 format:":"aria2 प्रारूप इस्तेमाल करें:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"अधिक जानकारी के लिए क्लिक करें। हर URL नई पंक्ति में होगा, और अगली पंक्ति में उसका फ़ाइल नाम होगा। यह प्रारूप aria2 के साथ संगत है।","Rate limit (ms):":"दर सीमा (ms):","Media Filter:":"मीडिया फ़िल्टर:","File Name":"फ़ाइल नाम","Media Type":"मीडिया प्रकार","Download URL":"डाउनलोड URL","No media selected.":"कोई मीडिया चयनित नहीं है।","Preview limited to first 250 media items.":"पूर्वावलोकन पहले 250 मीडिया आइटम तक सीमित है।",Zipping:"ZIP बनाया जा रहा है","Copied!":"कॉपी किया गया!","Copy URLs":"URL कॉपी करें","The tweet ID":"ट्वीट ID","The username of tweet author":"ट्वीट लेखक का यूज़रनेम","The profile name of tweet author":"ट्वीट लेखक का प्रोफ़ाइल नाम","The media index in tweet (start from 0)":"ट्वीट में मीडिया इंडेक्स (0 से शुरू)","The order of media in tweet (1/2/3/4)":"ट्वीट में मीडिया का क्रम (1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD प्रारूप में पोस्ट दिनांक","The post time in HHmmss format":"HHmmss प्रारूप में पोस्ट समय","The media type (photo/video/animated_gif)":"मीडिया प्रकार (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"मीडिया फ़ाइल एक्सटेंशन (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"मीडिया निर्यात विफल। अधिक जानकारी के लिए DevTools खोलें।","Failed to copy media URLs. Open DevTools for more details.":"मीडिया URL कॉपी करने में विफल। अधिक जानकारी के लिए DevTools खोलें।","filter.photo":"फ़ोटो","filter.video":"वीडियो","filter.animated_gif":"GIF","filter.retweet":"रीट्वीट शामिल करें","loading remaining rows":"बाकी पंक्तियाँ लोड हो रही हैं","Bundle ZIP compression:":"बंडल ZIP compression:","Fastest / store":"सबसे तेज़ / store","Balanced / fast":"संतुलित / तेज़","Smaller / slower":"छोटा / धीमा","Cancel Export":"निर्यात रद्द करें","Export a canonical portable ZIP bundle for sharing/importing.":"साझा/आयात करने के लिए canonical portable ZIP bundle निर्यात करें।","Export Bundle ZIP":"Bundle ZIP निर्यात करें","Source-backed media":"Source-backed मीडिया","rows scanned:":"स्कैन की गई पंक्तियाँ:","media URLs:":"मीडिया URL:",loading:"लोड हो रहा है","Loading media...":"मीडिया लोड हो रहा है..."},common:{"Open Control Panel":"कंट्रोल पैनल खोलें","Browse around to capture more data.":"अधिक डेटा कैप्चर करने के लिए ब्राउज़ करें।",Settings:"सेटिंग्स",General:"सामान्य",Theme:"थीम",Language:"भाषा",Debug:"डीबग","Date Time Format":"दिनांक और समय प्रारूप","Click for more information. This will take effect on both previewer and exported files.":"अधिक जानकारी के लिए क्लिक करें। यह प्रीव्यूअर और निर्यात की गई फ़ाइलों दोनों पर लागू होगा।","Use dedicated DB for accounts":"खातों के लिए अलग डेटाबेस इस्तेमाल करें","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"यह हर Twitter खाते के लिए अलग डेटाबेस बनाएगा, जिससे कई खाते इस्तेमाल करते समय डेटा मिल जाने की संभावना घटती है।","Local Database":"स्थानीय डेटाबेस","Analyze DB":"विश्लेषण","Export DB":"निर्यात","Clear DB":"साफ़ करें","Bundle Export":"बंडल निर्यात","Bundle Library":"बंडल लाइब्रेरी","QC Session":"QC सत्र","Diagnostic capture":"नैदानिक कैप्चर","Diagnostic buffers cleared.":"नैदानिक बफ़र साफ़ किए गए।","Clear Buffers":"बफ़र साफ़ करें","Preparing...":"तैयार हो रहा है...","Preparing diagnostics...":"डायग्नॉस्टिक्स तैयार हो रहे हैं...","Export QC Diagnostics":"QC डायग्नॉस्टिक्स निर्यात करें","Export Diagnostics Bundle":"डायग्नॉस्टिक्स बंडल निर्यात करें","QC idle.":"QC निष्क्रिय है।","Are you sure to clear all data in the database?":"क्या आप डेटाबेस का सारा डेटा साफ़ करना चाहते हैं?","Database cleared.":"डेटाबेस साफ़ कर दिया गया।",Module:"मॉड्यूल","Modules (Scroll to see more)":"मॉड्यूल (और देखने के लिए स्क्रॉल करें)",About:"परिचय",Version:"संस्करण","Search...":"खोजें...","Something went wrong.":"कुछ गलत हो गया।","Error:":"त्रुटि:","Captured:":"कैप्चर किया गया:","Rows per page:":"प्रति पृष्ठ पंक्तियाँ:","Relation Types":"संबंध प्रकार","Subject Accounts":"विषय खाते","Subject User IDs":"विषय उपयोगकर्ता ID","Last Observed At":"अंतिम बार देखा गया","A - B of N items":"{{total}} में से {{from}} - {{to}} आइटम","No data available.":"कोई डेटा उपलब्ध नहीं है।","No media available.":"कोई मीडिया उपलब्ध नहीं है।",Clear:"साफ़ करें","Bookmark folders":"बुकमार्क फ़ोल्डर","1 folder selected":"1 फ़ोल्डर चयनित","{{count}} folders selected":"{{count}} फ़ोल्डर चयनित","Export Media":"मीडिया निर्यात करें","Export Data":"डेटा निर्यात करें","Export Search History":"खोज इतिहास निर्यात करें","JSON View":"JSON दृश्य","Media View":"मीडिया दृश्य",Bookmarks:"बुकमार्क",Tweets:"ट्वीट",Users:"उपयोगकर्ता","User Tweets":"उपयोगकर्ता ट्वीट","User Media":"उपयोगकर्ता मीडिया","Tweet Details":"ट्वीट विवरण","Search Timeline":"खोज टाइमलाइन","Home Timeline":"होम टाइमलाइन","List Timeline":"सूची टाइमलाइन","Community Timeline":"समुदाय टाइमलाइन","Community Members":"समुदाय सदस्य","List Members":"सूची सदस्य","List Subscribers":"सूची सदस्यता लेने वाले","Direct Messages":"डायरेक्ट संदेश","Interaction Events":"इंटरैक्शन घटनाएँ","Local Search":"स्थानीय खोज","Runtime Logs":"रनटाइम लॉग","Bundle Viewer":"बंडल दर्शक","{{count}} imported bundles":"{{count}} आयातित बंडल","Search indexed tweets with Twitter-style operators":"Twitter-शैली ऑपरेटरों से इंडेक्स किए गए ट्वीट खोजें","Local Recorder Search":"स्थानीय रिकॉर्डर खोज",Quotes:"कोट्स",CommunityMembers:"समुदाय सदस्य",CommunityTimeline:"समुदाय टाइमलाइन",DirectMessages:"डायरेक्ट संदेश",Followers:"फ़ॉलोअर",Following:"फ़ॉलो कर रहे हैं",HomeTimeline:"होम टाइमलाइन",Likes:"लाइक",ListMembers:"सूची सदस्य",ListSubscribers:"सूची सदस्यता लेने वाले",ListTimeline:"सूची टाइमलाइन",InteractionEvents:"इंटरैक्शन घटनाएँ",LocalSearch:"स्थानीय खोज",RawCapture:"कच्चा कैप्चर",Retweeters:"रीट्वीट करने वाले",RetweetersModule:"रीट्वीट करने वाले",RuntimeLogs:"रनटाइम लॉग",SearchTimeline:"खोज टाइमलाइन",TweetIndex:"ट्वीट इंडेक्स",TweetDetail:"ट्वीट विवरण",UserDetail:"उपयोगकर्ता विवरण",UserMedia:"उपयोगकर्ता मीडिया",UserTweets:"उपयोगकर्ता ट्वीट",on:"चालू",off:"बंद",unknown:"अज्ञात",online:"ऑनलाइन",offline:"ऑफ़लाइन",leader:"लीडर",follower:"फ़ॉलोअर",tab:"टैब",both:"दोनों",xhr:"XHR",fetch:"fetch",watchdog:"वॉचडॉग",all:"सभी",explicit:"स्पष्ट",loading:"लोड हो रहा है",complete:"पूर्ण",idle:"निष्क्रिय","api-name":"API नाम","id-only":"केवल ID","theme.system":"सिस्टम","theme.cupcake":"हल्का","theme.dark":"गहरा","theme.emerald":"एमराल्ड","theme.cyberpunk":"साइबरपंक","theme.valentine":"वैलेंटाइन","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"व्यावसायिक","theme.winter":"सर्दी","Safe mode":"सुरक्षित मोड","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"सक्षम होने पर hook-आधारित कैप्चर बंद करता है। सामान्य ब्राउज़िंग और डायग्नॉस्टिक कैप्चर के लिए इसे बंद करें।","Hook mode":"Hook मोड","Controls whether the userscript hooks XHR, fetch, both, or neither.":"यह नियंत्रित करता है कि userscript XHR, fetch, दोनों या किसी को hook करे।","Repair mode":"मरम्मत मोड","Controls whether hook repair watchdog behavior is active.":"यह नियंत्रित करता है कि hook repair watchdog सक्रिय रहे या नहीं।","{{seconds}}s ago":"{{seconds}} सेकंड पहले","Hooks: {{status}}":"हुक:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"हुक:xhr {{xhr}}, fetch {{fetch}}, अंतिम {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"हुक:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"मोड: सुरक्षित {{safe}}, hook {{hook}}, मरम्मत {{repair}} | raw {{raw}}, spool {{spool}}, daemon: {{status}} {{daemon}}, monitor: {{role}} | लीडर: {{leader}} | lease: {{lease}} {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"मोड: सुरक्षित {{safe}}, hook {{hook}}, मरम्मत {{repair}} | raw {{raw}}, spool {{spool}}, daemon: {{status}} {{daemon}}, monitor: {{role}} | लीडर: {{leader}} | lease: {{lease}} {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw घटनाएँ: {{total}} | छोड़ी गई: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} कतार में / {{enqueued}} जोड़े गए / {{flushed}} फ्लश / {{failed}} विफल","daemon: {{status}}":"डेमन:{{status}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"मॉनिटर:{{role}} | लीडर:{{leader}} | lease:{{lease}}","Database connected: {{name}}":"डेटाबेस जुड़ा: {{name}}","App options loaded":"ऐप विकल्प लोड हुए",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'ऑपरेटर, वाक्यांश और बूलियन लॉजिक से खोजें: from:alice ("design system"~2 OR reliability)',"Search help":"खोज सहायता","Clear search":"खोज साफ़ करें","Table view":"तालिका दृश्य","Exit fullscreen":"पूर्ण स्क्रीन से बाहर निकलें",Fullscreen:"पूर्ण स्क्रीन","{{view}} is disabled for large source-backed result sets.":"बड़े source-backed परिणाम सेट के लिए {{view}} अक्षम है।","{{view}} view - {{status}}":"{{view}} दृश्य - {{status}}","{{view}} view":"{{view}} दृश्य","loading {{loaded}}/{{total}}":"लोड हो रहा है {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"और लोड हो रहा है {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"खोज रहा है {{matches}}/{{total}}","matches {{matches}}/{{total}}":"मिलान {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"पंक्तियाँ {{loaded}}/{{total}}","rows {{count}}":"पंक्तियाँ {{count}}","buffering...":"बफ़र हो रहा है...","history {{count}}":"इतिहास {{count}}","selected {{count}} ({{mode}})":"चयनित {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"रेंडर {{rendered}}/{{total}} (विंडो {{start}}-{{end}})","Search Operators":"खोज ऑपरेटर","Query semantics now follow recorder-style precedence:":"क्वेरी semantics अब recorder-style precedence का पालन करती है:","with implicit":"निहित","between adjacent terms.":"आस-पास के शब्दों के बीच।","search.category.lexical":"शाब्दिक","search.category.identity":"पहचान","search.category.metadata":"मेटाडेटा","search.category.presence":"उपस्थिति","search.category.numeric_date":"संख्या/दिनांक","search.category.compatibility":"संगतता","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"असंरचित पाठ सामग्री-शब्द मिलानों और बढ़े हुए आस-पास के वाक्यांश विंडो में फैलता है; उद्धरण न होने पर सामान्य भराव शब्दों की प्राथमिकता घटती है।","Phrase search with optional slop.":"वैकल्पिक slop के साथ वाक्यांश खोज।","Boolean operators with standard precedence and parentheses.":"मानक प्राथमिकता और कोष्ठकों वाले बूलियन ऑपरेटर।","Match the author handle or author id.":"लेखक हैंडल या लेखक ID मिलाएँ।","Shorthand for an enforced author constraint, equivalent to from:user.":"अनिवार्य लेखक बाधा का संक्षिप्त रूप, from:user के बराबर।","Match reply targets, entity ids, or conversation ids.":"उत्तर लक्ष्य, एंटिटी ID या बातचीत ID मिलाएँ।","Match bookmark folder id or folder name.":"बुकमार्क फ़ोल्डर ID या फ़ोल्डर नाम मिलाएँ।","Match language, route surface, source text, or card name.":"भाषा, रूट सतह, स्रोत पाठ या कार्ड नाम मिलाएँ।","Match domains or URLs found in tweets.":"ट्वीट में मिले डोमेन या URL मिलाएँ।","Boolean state filters.":"बूलियन स्थिति फ़िल्टर।","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"मीडिया, लिंक, उल्लेख, हैशटैग, कैशटैग, एंगेजमेंट और पोल की उपस्थिति के फ़िल्टर।","Compatibility aliases retained for Twitter-style queries.":"Twitter-शैली क्वेरी के लिए रखे गए संगत alias।","Numeric threshold filters.":"संख्यात्मक सीमा फ़िल्टर।","Date, timestamp, and Snowflake-style boundary filters.":"दिनांक, टाइमस्टैम्प और Snowflake-शैली सीमा फ़िल्टर।","Explicit mention filter plus shorthand hashtag and cashtag filters.":"स्पष्ट mention फ़िल्टर और संक्षिप्त hashtag/cashtag फ़िल्टर।","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"डॉटेड ऑब्जेक्ट पाथ और arrays सहित raw nested paths पर field-scoped lexical खोज।","loading source {{scanned}}/{{total}}":"source लोड हो रहा है {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"मीडिया {{count}}","loaded media {{count}}":"लोड मीडिया {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source पंक्तियाँ {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source पंक्तियाँ {{count}}","layout {{columns}} cols @ {{width}}px":"लेआउट {{columns}} कॉलम @ {{width}}px","original tweet attachments only":"केवल मूल ट्वीट attachments","Loading media.":"मीडिया लोड हो रहा है।","Comfortable density":"आरामदायक घनत्व","Compact density":"सघन घनत्व",Photo:"फ़ोटो",Video:"वीडियो","Open tweet":"ट्वीट खोलें","Export menu is open while remaining rows load in the background.":"निर्यात मेनू खुला है जबकि बाकी पंक्तियाँ पृष्ठभूमि में लोड हो रही हैं।","Wait for records to finish loading before exporting.":"निर्यात से पहले रिकॉर्ड लोड होने दें।","Exports stream from the active source without loading all rows into the table.":"सभी पंक्तियाँ तालिका में लोड किए बिना सक्रिय स्रोत से stream निर्यात करता है।","Opens immediately and loads remaining rows in the background.":"तुरंत खुलता है और बाकी पंक्तियाँ पृष्ठभूमि में लोड करता है।","Export persisted bookmark search history":"सहेजा गया बुकमार्क खोज इतिहास निर्यात करें","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`नवीनतम: {{latest}}
API नाम: {{apiName}}
केवल ID: {{idOnly}}
कोई नहीं: {{none}}`,"folder metadata: {{status}}":"फ़ोल्डर मेटाडेटा: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"बड़े परिणाम सेट के लिए मीडिया निर्यात तब तक अक्षम है जब तक source-backed stream उपलब्ध न हो।","Hooked into fetch":"fetch में hook किया गया","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest में hook किया गया (installed={{installed}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","Hook safe mode enabled ({{reason}})":"Hook safe mode सक्षम हुआ ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook मरम्मत विफल ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking इंस्टॉल विफल; tracker के बिना जारी ({{details}})","{{module}}: {{count}} items received":"{{module}}: {{count}} आइटम प्राप्त हुए","Exporting to ZIP file: {{filename}}":"ZIP फ़ाइल में निर्यात: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} फ़ाइल में निर्यात: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} फ़ाइल में streaming निर्यात: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"माइग्रेशन पूर्ण: {{users}} उपयोगकर्ता और {{tweets}} ट्वीट अपडेट हुए।","TweetTombstone received (Reason: {{reason}})":"TweetTombstone प्राप्त हुआ (कारण: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest में hook करने में विफल","Fetch API not found, skipping fetch hooks":"Fetch API नहीं मिला, fetch hooks छोड़े जा रहे हैं","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function अनुपलब्ध या असुरक्षित है; safe mode सक्षम हो रहा है","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation विफल; safe mode सक्षम हो रहा है","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation विफल; safe mode सक्षम हो रहा है","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation विफल; safe mode सक्षम हो रहा है","Fetch hook already installed":"Fetch hook पहले से इंस्टॉल है","Debug mode enabled":"Debug mode सक्षम","Database cleared":"डेटाबेस साफ़ किया गया","Upgrading database schema...":"डेटाबेस schema अपग्रेड हो रहा है...","Database upgraded":"डेटाबेस अपग्रेड हुआ","Zip stream closed.":"Zip stream बंद हुआ।","Running migration_20250609: Migrating legacy user data format":"migration_20250609 चल रहा है: legacy user data format माइग्रेट हो रहा है","TweetUnavailable received (Reason: unknown)":"TweetUnavailable प्राप्त हुआ (कारण: अज्ञात)","Empty tweet received":"खाली ट्वीट प्राप्त हुआ","Unknown tweet type received":"अज्ञात ट्वीट प्रकार प्राप्त हुआ","Failed to extract tweet":"ट्वीट निकालने में विफल","Failed to export file":"फ़ाइल निर्यात विफल","Failed to stream export file":"stream export फ़ाइल विफल","daemon: {{status}} | last error: {{error}}":"डेमन:{{status}} | अंतिम त्रुटि:{{error}}","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow drops: {{drops}} | अनुपलब्ध: {{unavailable}} | सबसे पुराना pending: {{age}}ms","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | दबाए गए route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","App options migrated from v{{oldVersion}} to v{{newVersion}}":"ऐप विकल्प v{{oldVersion}} से v{{newVersion}} में माइग्रेट हुए"}},mx={exporter:{ID:"ID",Date:"Tanggal",Content:"Konten","Show Full Text":"Tampilkan teks lengkap",Media:"Media","Screen Name":"Nama pengguna","Profile Name":"Nama profil","Profile Image":"Gambar profil","User ID":"ID pengguna","Replying To":"Membalas ke","RT Source":"Sumber RT","Quote Source":"Sumber kutipan","Media Tags":"Tag media",Favorites:"Favorit",Retweets:"Retweet",Bookmarks:"Bookmark",Quotes:"Kutipan",Replies:"Balasan",Views:"Tayangan",Favorited:"Difavoritkan",Retweeted:"Di-retweet",Bookmarked:"Di-bookmark","Bookmark Folder":"Folder bookmark",URL:"URL",Actions:"Tindakan",Details:"Detail",Description:"Deskripsi","Profile Banner":"Banner profil",Followers:"Pengikut",FollowingCount:"Jumlah mengikuti",Statuses:"Postingan",Favourites:"Favorit",Listed:"Masuk daftar",Location:"Lokasi",Website:"Situs web",Birthdate:"Tanggal lahir","Verified Type":"Jenis verifikasi","Blue Verified":"Terverifikasi Blue",Following:"Mengikuti","Follows You":"Mengikuti Anda","Can DM":"Bisa DM",Protected:"Dilindungi","Created At":"Dibuat pada",Sender:"Pengirim",Recipient:"Penerima","Conversation ID":"ID percakapan","Conversation Type":"Jenis percakapan",Data:"Data","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Ekspor data yang ditangkap sebagai file JSON/HTML/CSV. Ini mungkin memerlukan waktu tergantung jumlah data. File ekspor tidak menyertakan file media seperti gambar dan video, hanya URL-nya.","Data length:":"Panjang data:","Export scope:":"Cakupan ekspor:","All current results":"Semua hasil saat ini","Selected rows":"Baris dipilih","Pinned result set":"Set hasil yang dipin",Query:"Kueri",Sort:"Urutkan","Include all metadata:":"Sertakan semua metadata:","Include original record metadata in bundle:":"Sertakan metadata rekaman asli dalam bundle:","Export columns":"Kolom ekspor","Custom columns":"Kolom kustom","Select all":"Pilih semua",Clear:"Hapus","columns selected":"kolom dipilih",Metadata:"Metadata",None:"Tidak ada",All:"Semua","Custom fields":"Bidang kustom","Additional metadata paths":"Path metadata tambahan","metadata fields selected":"kolom metadata dipilih","Export as:":"Ekspor sebagai:","No data selected.":"Tidak ada data dipilih.",Cancel:"Batal","Start Export":"Mulai ekspor","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Unduh dan simpan file media dari data yang ditangkap. Ini mungkin memerlukan waktu tergantung jumlah data. Media yang diunduh mencakup gambar profil, banner profil (untuk pengguna), gambar, dan video (untuk tweet).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Untuk lebih dari 100 media atau file besar, disarankan menyalin URL dan mengunduhnya dengan pengelola unduhan eksternal seperti aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"Ekspor ZIP browser sekarang menggunakan unduhan paralel terbatas. Untuk pekerjaan sangat besar dan banyak video, ekspor URL atau aria2 tetap jalur paling aman dengan memori rendah.","Filename template:":"Templat nama file:","Download scheduler":"Penjadwal unduhan","Faster defaults are intended for bulk CDN transfer.":"Default yang lebih cepat ditujukan untuk transfer massal CDN.","Start delay (ms)":"Jeda awal (ms)","Global parallel":"Paralel global","Per host":"Per host",Videos:"Video",Retries:"Coba lagi","Use aria2 format:":"Gunakan format aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Klik untuk informasi lebih lanjut. Setiap URL akan berada di baris baru, dengan nama file di baris berikutnya. Format ini kompatibel dengan aria2.","Rate limit (ms):":"Batas laju (ms):","Media Filter:":"Filter media:","File Name":"Nama file","Media Type":"Jenis media","Download URL":"URL unduhan","No media selected.":"Tidak ada media dipilih.","Preview limited to first 250 media items.":"Pratinjau dibatasi pada 250 item media pertama.",Zipping:"Membuat ZIP","Copied!":"Disalin!","Copy URLs":"Salin URL","The tweet ID":"ID tweet","The username of tweet author":"Nama pengguna penulis tweet","The profile name of tweet author":"Nama profil penulis tweet","The media index in tweet (start from 0)":"Indeks media dalam tweet (mulai dari 0)","The order of media in tweet (1/2/3/4)":"Urutan media dalam tweet (1/2/3/4)","The post date in YYYYMMDD format":"Tanggal posting dalam format YYYYMMDD","The post time in HHmmss format":"Waktu posting dalam format HHmmss","The media type (photo/video/animated_gif)":"Jenis media (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"Ekstensi file media (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Gagal mengekspor media. Buka DevTools untuk detail.","Failed to copy media URLs. Open DevTools for more details.":"Gagal menyalin URL media. Buka DevTools untuk detail.","filter.photo":"Foto","filter.video":"Video","filter.animated_gif":"GIF","filter.retweet":"Sertakan retweet","loading remaining rows":"memuat baris tersisa","Bundle ZIP compression:":"Kompresi ZIP bundle:","Fastest / store":"Tercepat / simpan","Balanced / fast":"Seimbang / cepat","Smaller / slower":"Lebih kecil / lebih lambat","Cancel Export":"Batalkan ekspor","Export a canonical portable ZIP bundle for sharing/importing.":"Ekspor ZIP bundle portabel kanonis untuk berbagi/impor.","Export Bundle ZIP":"Ekspor ZIP bundle","Source-backed media":"Media berbasis sumber","rows scanned:":"baris dipindai:","media URLs:":"URL media:",loading:"memuat","Loading media...":"Memuat media..."},common:{"Open Control Panel":"Buka Panel Kontrol","Browse around to capture more data.":"Jelajahi halaman untuk menangkap lebih banyak data.",Settings:"Pengaturan",General:"Umum",Theme:"Tema",Language:"Bahasa",Debug:"Debug","Date Time Format":"Format Tanggal dan Waktu","Click for more information. This will take effect on both previewer and exported files.":"Klik untuk informasi lebih lanjut. Ini akan berlaku pada pratinjau dan file yang diekspor.","Use dedicated DB for accounts":"Gunakan DB khusus untuk akun","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Ini akan membuat database terpisah untuk setiap akun Twitter, sehingga mengurangi kemungkinan data tercampur saat memakai beberapa akun.","Local Database":"Database lokal","Analyze DB":"Analisis","Export DB":"Ekspor","Clear DB":"Hapus","Bundle Export":"Ekspor bundel","Bundle Library":"Pustaka bundel","QC Session":"Sesi QC","Diagnostic capture":"Tangkapan diagnostik","Diagnostic buffers cleared.":"Buffer diagnostik dihapus.","Clear Buffers":"Hapus buffer","Preparing...":"Menyiapkan...","Preparing diagnostics...":"Menyiapkan diagnostik...","Export QC Diagnostics":"Ekspor diagnostik QC","Export Diagnostics Bundle":"Ekspor bundel diagnostik","QC idle.":"QC diam.","Are you sure to clear all data in the database?":"Yakin ingin menghapus semua data di database?","Database cleared.":"Database dihapus.",Module:"Modul","Modules (Scroll to see more)":"Modul (gulir untuk melihat lainnya)",About:"Tentang",Version:"Versi","Search...":"Cari...","Something went wrong.":"Terjadi kesalahan.","Error:":"Kesalahan:","Captured:":"Ditangkap:","Rows per page:":"Baris per halaman:","Relation Types":"Jenis relasi","Subject Accounts":"Akun subjek","Subject User IDs":"ID pengguna subjek","Last Observed At":"Terakhir diamati","A - B of N items":"{{from}} - {{to}} dari {{total}} item","No data available.":"Tidak ada data.","No media available.":"Tidak ada media.",Clear:"Bersihkan","Bookmark folders":"Folder bookmark","1 folder selected":"1 folder dipilih","{{count}} folders selected":"{{count}} folder dipilih","Export Media":"Ekspor media","Export Data":"Ekspor data","Export Search History":"Ekspor riwayat pencarian","JSON View":"Tampilan JSON","Media View":"Tampilan media",Bookmarks:"Bookmark",Tweets:"Tweet",Users:"Pengguna","User Tweets":"Tweet pengguna","User Media":"Media pengguna","Tweet Details":"Detail tweet","Search Timeline":"Linimasa pencarian","Home Timeline":"Linimasa beranda","List Timeline":"Linimasa daftar","Community Timeline":"Linimasa komunitas","Community Members":"Anggota komunitas","List Members":"Anggota daftar","List Subscribers":"Pelanggan daftar","Direct Messages":"Pesan langsung","Interaction Events":"Peristiwa interaksi","Local Search":"Pencarian lokal","Runtime Logs":"Log runtime","Bundle Viewer":"Penampil bundel","{{count}} imported bundles":"{{count}} bundel diimpor","Search indexed tweets with Twitter-style operators":"Cari tweet terindeks dengan operator gaya Twitter","Local Recorder Search":"Pencarian perekam lokal",Quotes:"Kutipan",CommunityMembers:"Anggota komunitas",CommunityTimeline:"Linimasa komunitas",DirectMessages:"Pesan langsung",Followers:"Pengikut",Following:"Mengikuti",HomeTimeline:"Linimasa beranda",Likes:"Suka",ListMembers:"Anggota daftar",ListSubscribers:"Pelanggan daftar",ListTimeline:"Linimasa daftar",InteractionEvents:"Peristiwa interaksi",LocalSearch:"Pencarian lokal",RawCapture:"Tangkapan mentah",Retweeters:"Pengguna yang me-retweet",RetweetersModule:"Pengguna yang me-retweet",RuntimeLogs:"Log runtime",SearchTimeline:"Pencarian",TweetIndex:"Indeks tweet",TweetDetail:"Detail tweet",UserDetail:"Detail pengguna",UserMedia:"Media pengguna",UserTweets:"Tweet pengguna",on:"aktif",off:"nonaktif",unknown:"tidak diketahui",online:"daring",offline:"luring",leader:"pemimpin",follower:"pengikut",tab:"tab",both:"keduanya",xhr:"xhr",fetch:"fetch",watchdog:"pengawas",all:"semua",explicit:"eksplisit",loading:"memuat",complete:"selesai",idle:"diam","api-name":"nama API","id-only":"hanya ID","theme.system":"Sistem","theme.cupcake":"Terang","theme.dark":"Gelap","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Bisnis","theme.winter":"Musim dingin","Safe mode":"Mode aman","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Menonaktifkan capture berbasis hook saat aktif. Matikan untuk browsing normal dan capture diagnostik.","Hook mode":"Mode hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Mengontrol apakah userscript memasang hook XHR, fetch, keduanya, atau tidak sama sekali.","Repair mode":"Mode perbaikan","Controls whether hook repair watchdog behavior is active.":"Mengontrol apakah watchdog perbaikan hook aktif.","{{seconds}}s ago":"{{seconds}} dtk lalu","Hooks: {{status}}":"Hook:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hook:xhr {{xhr}}, fetch {{fetch}}, terakhir {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hook:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Mode: aman {{safe}}, hook {{hook}}, perbaikan {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Mode: aman {{safe}}, hook {{hook}}, perbaikan {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"event raw: {{total}} | dibuang: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} memuat / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"drop overflow spool: {{drops}} | tidak tersedia: {{unavailable}} | pending tertua: {{age}}ms","daemon: {{status}}":"daemon:{{status}}","daemon: {{status}} | last error: {{error}}":"daemon:{{status}} | error terakhir:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor:{{role}} | pemimpin:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"tick monitor route/viewport: {{route}}/{{viewport}} | ditekan route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Database terhubung: {{name}}","App options loaded":"Opsi aplikasi dimuat",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Teks tidak terstruktur diperluas menjadi kecocokan istilah konten dan jendela frasa berdekatan yang diberi bobot lebih; kata pengisi umum diturunkan prioritasnya kecuali diberi kutip.","Phrase search with optional slop.":"Pencarian frasa dengan slop opsional.","Boolean operators with standard precedence and parentheses.":"Operator boolean dengan prioritas standar dan tanda kurung.","Match the author handle or author id.":"Cocokkan handle penulis atau ID penulis.","Shorthand for an enforced author constraint, equivalent to from:user.":"Singkatan untuk batasan penulis wajib, setara dengan from:user.","Match reply targets, entity ids, or conversation ids.":"Cocokkan target balasan, ID entitas, atau ID percakapan.","Match bookmark folder id or folder name.":"Cocokkan ID folder bookmark atau nama folder.","Match language, route surface, source text, or card name.":"Cocokkan bahasa, permukaan rute, teks sumber, atau nama kartu.","Match domains or URLs found in tweets.":"Cocokkan domain atau URL yang ditemukan di tweet.","Boolean state filters.":"Filter status boolean.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filter keberadaan untuk media, tautan, mention, hashtag, cashtag, engagement, dan polling.","Compatibility aliases retained for Twitter-style queries.":"Alias kompatibilitas dipertahankan untuk kueri bergaya Twitter.","Numeric threshold filters.":"Filter ambang numerik.","Date, timestamp, and Snowflake-style boundary filters.":"Filter batas tanggal, timestamp, dan gaya Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filter mention eksplisit serta filter singkat hashtag dan cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Pencarian leksikal berbatas field pada path bertingkat mentah, termasuk path objek bertitik dan array.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Opsi aplikasi dimigrasi dari v{{oldVersion}} ke v{{newVersion}}","Hooked into fetch":"Hook terpasang ke fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook terpasang ke XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Mode aman hook diaktifkan ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Perbaikan hook gagal ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Instalasi pelacak konteks bookmark gagal; lanjut tanpa pelacak ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} item diterima","Exporting to ZIP file: {{filename}}":"Mengekspor ke file ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"Mengekspor ke file {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Ekspor streaming ke file {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migrasi selesai: {{users}} pengguna dan {{tweets}} tweet diperbarui.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone diterima (Alasan: {{reason}})","Failed to hook into XMLHttpRequest":"Gagal memasang hook ke XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API tidak ditemukan, melewati hook fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"Fungsi dasar Fetch API tidak tersedia atau tidak aman; mengaktifkan mode aman","Fetch hook base invocation failed; enabling safe mode":"Invokasi dasar hook fetch gagal; mengaktifkan mode aman","XHR send hook base invocation failed; enabling safe mode":"Invokasi dasar hook XHR send gagal; mengaktifkan mode aman","XHR open hook base invocation failed; enabling safe mode":"Invokasi dasar hook XHR open gagal; mengaktifkan mode aman","Fetch hook already installed":"Hook fetch sudah terpasang","Debug mode enabled":"Mode debug aktif","Database cleared":"Database dibersihkan","Upgrading database schema...":"Memutakhirkan skema database...","Database upgraded":"Database dimutakhirkan","Zip stream closed.":"Stream ZIP ditutup.","Running migration_20250609: Migrating legacy user data format":"Menjalankan migration_20250609: migrasi format data pengguna lama","TweetUnavailable received (Reason: unknown)":"TweetUnavailable diterima (Alasan: tidak diketahui)","Empty tweet received":"Tweet kosong diterima","Unknown tweet type received":"Jenis tweet tidak dikenal diterima","Failed to extract tweet":"Gagal mengekstrak tweet","Failed to export file":"Gagal mengekspor file","Failed to stream export file":"Gagal mengekspor file streaming"}},gx={exporter:{ID:"ID",Date:"日付",Content:"内容","Show Full Text":"全文を表示",Media:"メディア","Screen Name":"ユーザー名","Profile Name":"プロフィール名","Profile Image":"プロフィール画像","User ID":"ユーザーID","Replying To":"返信先","RT Source":"RT元","Quote Source":"引用元","Media Tags":"メディアタグ",Favorites:"お気に入り",Retweets:"リツイート",Bookmarks:"ブックマーク",Quotes:"引用",Replies:"返信",Views:"表示回数",Favorited:"お気に入り済み",Retweeted:"リツイート済み",Bookmarked:"ブックマーク済み","Bookmark Folder":"ブックマークフォルダ",URL:"URL",Actions:"操作",Details:"詳細",Description:"説明","Profile Banner":"プロフィールバナー",Followers:"フォロワー",FollowingCount:"フォロー数",Statuses:"投稿数",Favourites:"お気に入り",Listed:"リスト登録数",Location:"場所",Website:"Webサイト",Birthdate:"生年月日","Verified Type":"認証タイプ","Blue Verified":"Blue認証",Following:"フォロー中","Follows You":"あなたをフォロー","Can DM":"DM可能",Protected:"非公開","Created At":"作成日時",Sender:"送信者",Recipient:"受信者","Conversation ID":"会話ID","Conversation Type":"会話タイプ",Data:"データ","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"取得したデータをJSON/HTML/CSVファイルとしてエクスポートします。データ量によって時間がかかる場合があります。エクスポートファイルには画像や動画などのメディアファイルは含まれず、URLのみが含まれます。","Data length:":"データ件数:","Export scope:":"エクスポート範囲:","All current results":"現在の全結果","Selected rows":"選択した行","Pinned result set":"固定された結果セット",Query:"クエリ",Sort:"並び順","Include all metadata:":"すべてのメタデータを含める:","Include original record metadata in bundle:":"元のレコードメタデータをバンドルに含める:","Export columns":"エクスポート列","Custom columns":"カスタム列","Select all":"すべて選択",Clear:"クリア","columns selected":"個の列が選択されています",Metadata:"メタデータ",None:"なし",All:"すべて","Custom fields":"カスタムフィールド","Additional metadata paths":"追加のメタデータパス","metadata fields selected":"個のメタデータフィールドが選択されています","Export as:":"形式:","No data selected.":"データが選択されていません。",Cancel:"キャンセル","Start Export":"エクスポート開始","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"取得データからメディアファイルをダウンロードして保存します。データ量によって時間がかかる場合があります。ダウンロード対象にはプロフィール画像、プロフィールバナー(ユーザー)、画像、動画(ツイート)が含まれます。","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"100件を超えるメディアや大きなファイルでは、URLをコピーし、aria2などの外部ダウンロードマネージャーでダウンロードすることを推奨します。","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ブラウザのZIPエクスポートは、制限付き並列ダウンロードを使用するようになりました。非常に大きく動画の多い処理では、URLまたはaria2エクスポートが引き続き最も安全で低メモリな方法です。","Filename template:":"ファイル名テンプレート:","Download scheduler":"ダウンロードスケジューラ","Faster defaults are intended for bulk CDN transfer.":"高速な初期値はCDNからの一括転送向けです。","Start delay (ms)":"開始遅延 (ms)","Global parallel":"全体並列数","Per host":"ホストごと",Videos:"動画",Retries:"再試行","Use aria2 format:":"aria2形式を使用:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"詳細を確認するにはクリックしてください。各URLは新しい行に、その次の行にファイル名が出力されます。この形式はaria2と互換性があります。","Rate limit (ms):":"レート制限 (ms):","Media Filter:":"メディアフィルター:","File Name":"ファイル名","Media Type":"メディアタイプ","Download URL":"ダウンロードURL","No media selected.":"メディアが選択されていません。","Preview limited to first 250 media items.":"プレビューは最初の250件のメディアに制限されています。",Zipping:"ZIP作成中","Copied!":"コピーしました!","Copy URLs":"URLをコピー","The tweet ID":"ツイートID","The username of tweet author":"ツイート投稿者のユーザー名","The profile name of tweet author":"ツイート投稿者のプロフィール名","The media index in tweet (start from 0)":"ツイート内のメディアインデックス(0から開始)","The order of media in tweet (1/2/3/4)":"ツイート内のメディア順序(1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD形式の投稿日","The post time in HHmmss format":"HHmmss形式の投稿時刻","The media type (photo/video/animated_gif)":"メディアタイプ(photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"メディアファイル拡張子(jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"メディアのエクスポートに失敗しました。詳細はDevToolsを開いてください。","Failed to copy media URLs. Open DevTools for more details.":"メディアURLのコピーに失敗しました。詳細はDevToolsを開いてください。","filter.photo":"写真","filter.video":"動画","filter.animated_gif":"GIF","filter.retweet":"リツイートを含める","loading remaining rows":"残りの行を読み込み中","Bundle ZIP compression:":"バンドル ZIP 圧縮:","Fastest / store":"最速 / store","Balanced / fast":"バランス / 高速","Smaller / slower":"小さめ / 低速","Cancel Export":"エクスポートをキャンセル","Export a canonical portable ZIP bundle for sharing/importing.":"共有/インポート用の正規ポータブル ZIP バンドルをエクスポートします。","Export Bundle ZIP":"バンドル ZIP をエクスポート","Source-backed media":"ソース対応メディア","rows scanned:":"スキャン済み行:","media URLs:":"メディア URL:",loading:"読み込み中","Loading media...":"メディアを読み込み中..."},common:{"Open Control Panel":"コントロールパネルを開く","Browse around to capture more data.":"ページを閲覧して、さらにデータを取得します。",Settings:"設定",General:"一般",Theme:"テーマ",Language:"言語",Debug:"デバッグ","Date Time Format":"日時形式","Click for more information. This will take effect on both previewer and exported files.":"詳細を確認するにはクリックしてください。これはプレビューとエクスポートファイルの両方に適用されます。","Use dedicated DB for accounts":"アカウントごとに専用DBを使用","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Twitterアカウントごとに別々のデータベースを作成します。複数アカウント使用時のデータ混在を減らせます。","Local Database":"ローカルデータベース","Analyze DB":"分析","Export DB":"エクスポート","Clear DB":"削除","Bundle Export":"バンドルをエクスポート","Bundle Library":"バンドルライブラリ","QC Session":"QCセッション","Diagnostic capture":"診断キャプチャ","Diagnostic buffers cleared.":"診断バッファをクリアしました。","Clear Buffers":"バッファをクリア","Preparing...":"準備中...","Preparing diagnostics...":"診断を準備中...","Export QC Diagnostics":"QC診断をエクスポート","Export Diagnostics Bundle":"診断バンドルをエクスポート","QC idle.":"QCは待機中です。","Are you sure to clear all data in the database?":"データベース内のすべてのデータを削除しますか?","Database cleared.":"データベースを削除しました。",Module:"モジュール","Modules (Scroll to see more)":"モジュール(スクロールしてさらに表示)",About:"情報",Version:"バージョン","Search...":"検索...","Something went wrong.":"問題が発生しました。","Error:":"エラー:","Captured:":"取得済み:","Rows per page:":"ページあたりの行数:","Relation Types":"関係タイプ","Subject Accounts":"対象アカウント","Subject User IDs":"対象ユーザーID","Last Observed At":"最終観測日時","A - B of N items":"{{total}}件中 {{from}} - {{to}} 件","No data available.":"データがありません。","No media available.":"メディアがありません。",Clear:"クリア","Bookmark folders":"ブックマークフォルダ","1 folder selected":"1個のフォルダを選択中","{{count}} folders selected":"{{count}}個のフォルダを選択中","Export Media":"メディアをエクスポート","Export Data":"データをエクスポート","Export Search History":"検索履歴をエクスポート","JSON View":"JSON表示","Media View":"メディア表示",Bookmarks:"ブックマーク",Tweets:"ツイート",Users:"ユーザー","User Tweets":"ユーザーのツイート","User Media":"ユーザーメディア","Tweet Details":"ツイート詳細","Search Timeline":"検索タイムライン","Home Timeline":"ホームタイムライン","List Timeline":"リストタイムライン","Community Timeline":"コミュニティタイムライン","Community Members":"コミュニティメンバー","List Members":"リストメンバー","List Subscribers":"リスト購読者","Direct Messages":"ダイレクトメッセージ","Interaction Events":"インタラクションイベント","Local Search":"ローカル検索","Runtime Logs":"ランタイムログ","Bundle Viewer":"バンドルビューア","{{count}} imported bundles":"{{count}}個のバンドルをインポート済み","Search indexed tweets with Twitter-style operators":"Twitter風の演算子でインデックス済みツイートを検索","Local Recorder Search":"ローカルレコーダー検索",Quotes:"引用",CommunityMembers:"コミュニティメンバー",CommunityTimeline:"コミュニティタイムライン",DirectMessages:"ダイレクトメッセージ",Followers:"フォロワー",Following:"フォロー中",HomeTimeline:"ホームタイムライン",Likes:"いいね",ListMembers:"リストメンバー",ListSubscribers:"リスト購読者",ListTimeline:"リストタイムライン",InteractionEvents:"インタラクションイベント",LocalSearch:"ローカル検索",RawCapture:"生キャプチャ",Retweeters:"リツイートしたユーザー",RetweetersModule:"リツイートしたユーザー",RuntimeLogs:"ランタイムログ",SearchTimeline:"検索",TweetIndex:"ツイートインデックス",TweetDetail:"ツイート詳細",UserDetail:"ユーザー詳細",UserMedia:"ユーザーメディア",UserTweets:"ユーザーのツイート",on:"オン",off:"オフ",unknown:"不明",online:"オンライン",offline:"オフライン",leader:"リーダー",follower:"フォロワー",tab:"タブ",both:"両方",xhr:"xhr",fetch:"fetch",watchdog:"ウォッチドッグ",all:"すべて",explicit:"明示",loading:"読み込み中",complete:"完了",idle:"アイドル","api-name":"API 名","id-only":"ID のみ","theme.system":"システム","theme.cupcake":"ライト","theme.dark":"ダーク","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"ビジネス","theme.winter":"冬","Safe mode":"セーフモード","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"有効時は hook ベースのキャプチャを無効にします。通常の閲覧と診断キャプチャではオフにしてください。","Hook mode":"Hook モード","Controls whether the userscript hooks XHR, fetch, both, or neither.":"userscript が XHR、fetch、両方、またはどちらも hook しないかを制御します。","Repair mode":"修復モード","Controls whether hook repair watchdog behavior is active.":"hook 修復 watchdog の有効/無効を制御します。","{{seconds}}s ago":"{{seconds}} 秒前","Hooks: {{status}}":"フック:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"フック:xhr {{xhr}}, fetch {{fetch}}, 最後 {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"フック:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"モード: 安全 {{safe}}, hook {{hook}}, 修復 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"モード: 安全 {{safe}}, hook {{hook}}, 修復 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw イベント: {{total}} | 破棄: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} 読み込み中 / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool オーバーフロー破棄: {{drops}} | 利用不可: {{unavailable}} | 最古 pending: {{age}}ms","daemon: {{status}}":"デーモン:{{status}}","daemon: {{status}} | last error: {{error}}":"デーモン:{{status}} | 最後のエラー:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"モニター:{{role}} | リーダー:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor tick route/viewport: {{route}}/{{viewport}} | 抑制 route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"データベース接続済み: {{name}}","App options loaded":"アプリオプションを読み込みました",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"非構造テキストはコンテンツ語の一致と強化された隣接フレーズ窓に展開されます。引用符で囲まれていない一般的な埋め草語は優先度が下がります。","Phrase search with optional slop.":"任意の slop を指定できるフレーズ検索。","Boolean operators with standard precedence and parentheses.":"標準の優先順位と括弧に対応したブール演算子。","Match the author handle or author id.":"作者のハンドルまたは作者 ID に一致します。","Shorthand for an enforced author constraint, equivalent to from:user.":"必須の作者条件の短縮形で、from:user と同等です。","Match reply targets, entity ids, or conversation ids.":"返信先、エンティティ ID、会話 ID に一致します。","Match bookmark folder id or folder name.":"ブックマークフォルダ ID またはフォルダ名に一致します。","Match language, route surface, source text, or card name.":"言語、ルート面、ソーステキスト、カード名に一致します。","Match domains or URLs found in tweets.":"ツイート内のドメインまたは URL に一致します。","Boolean state filters.":"ブール状態フィルター。","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"メディア、リンク、メンション、ハッシュタグ、キャッシュタグ、エンゲージメント、投票の有無フィルター。","Compatibility aliases retained for Twitter-style queries.":"Twitter 形式のクエリ向けに保持された互換エイリアス。","Numeric threshold filters.":"数値しきい値フィルター。","Date, timestamp, and Snowflake-style boundary filters.":"日付、タイムスタンプ、Snowflake 形式の境界フィルター。","Explicit mention filter plus shorthand hashtag and cashtag filters.":"明示的なメンションフィルターと、ハッシュタグ/キャッシュタグの短縮フィルター。","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"ドット区切りのオブジェクトパスや配列を含む raw のネストパスに対するフィールド限定の語彙検索。","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"アプリオプションを v{{oldVersion}} から v{{newVersion}} に移行しました","Hooked into fetch":"fetch に hook しました","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest に hook しました (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook セーフモードを有効化しました ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook 修復に失敗しました ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"ブックマークコンテキスト追跡のインストールに失敗しました。トラッカーなしで続行します ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} 件を受信","Exporting to ZIP file: {{filename}}":"ZIP ファイルへエクスポート: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} ファイルへエクスポート: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} ファイルへストリーミングエクスポート: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"移行完了: {{users}} ユーザーと {{tweets}} ツイートを更新しました。","TweetTombstone received (Reason: {{reason}})":"TweetTombstone を受信しました (理由: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest への hook に失敗しました","Fetch API not found, skipping fetch hooks":"Fetch API が見つからないため fetch hooks をスキップします","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API のベース関数が利用不可または安全でないためセーフモードを有効化します","Fetch hook base invocation failed; enabling safe mode":"fetch hook のベース呼び出しに失敗したためセーフモードを有効化します","XHR send hook base invocation failed; enabling safe mode":"XHR send hook のベース呼び出しに失敗したためセーフモードを有効化します","XHR open hook base invocation failed; enabling safe mode":"XHR open hook のベース呼び出しに失敗したためセーフモードを有効化します","Fetch hook already installed":"fetch hook は既にインストール済みです","Debug mode enabled":"デバッグモード有効","Database cleared":"データベースを消去しました","Upgrading database schema...":"データベーススキーマをアップグレード中...","Database upgraded":"データベースをアップグレードしました","Zip stream closed.":"ZIP ストリームを閉じました。","Running migration_20250609: Migrating legacy user data format":"migration_20250609 実行中: レガシーユーザーデータ形式を移行しています","TweetUnavailable received (Reason: unknown)":"TweetUnavailable を受信しました (理由: 不明)","Empty tweet received":"空のツイートを受信しました","Unknown tweet type received":"不明なツイートタイプを受信しました","Failed to extract tweet":"ツイート抽出に失敗しました","Failed to export file":"ファイルのエクスポートに失敗しました","Failed to stream export file":"ストリームエクスポートファイルに失敗しました"}},_x={exporter:{ID:"ID",Date:"Data",Content:"Conteúdo","Show Full Text":"Mostrar texto completo",Media:"Mídia","Screen Name":"Nome de usuário","Profile Name":"Nome do perfil","Profile Image":"Imagem do perfil","User ID":"ID do usuário","Replying To":"Respondendo a","RT Source":"Fonte do RT","Quote Source":"Fonte da citação","Media Tags":"Tags de mídia",Favorites:"Favoritos",Retweets:"Retweets",Bookmarks:"Favoritos",Quotes:"Citações",Replies:"Respostas",Views:"Visualizações",Favorited:"Favoritado",Retweeted:"Retweetado",Bookmarked:"Salvo nos favoritos","Bookmark Folder":"Pasta de favoritos",URL:"URL",Actions:"Ações",Details:"Detalhes",Description:"Descrição","Profile Banner":"Banner do perfil",Followers:"Seguidores",FollowingCount:"Contagem de seguindo",Statuses:"Publicações",Favourites:"Favoritos",Listed:"Em listas",Location:"Localização",Website:"Site",Birthdate:"Data de nascimento","Verified Type":"Tipo de verificação","Blue Verified":"Verificado Blue",Following:"Seguindo","Follows You":"Segue você","Can DM":"Pode receber DM",Protected:"Protegido","Created At":"Criado em",Sender:"Remetente",Recipient:"Destinatário","Conversation ID":"ID da conversa","Conversation Type":"Tipo de conversa",Data:"Dados","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Exporte os dados capturados como arquivo JSON/HTML/CSV. Isso pode demorar conforme a quantidade de dados. O arquivo exportado não inclui arquivos de mídia, como imagens e vídeos, apenas as URLs.","Data length:":"Tamanho dos dados:","Export scope:":"Escopo da exportação:","All current results":"Todos os resultados atuais","Selected rows":"Linhas selecionadas","Pinned result set":"Conjunto de resultados fixado",Query:"Consulta",Sort:"Ordenação","Include all metadata:":"Incluir todos os metadados:","Include original record metadata in bundle:":"Incluir metadados do registro original no bundle:","Export columns":"Colunas de exportação","Custom columns":"Colunas personalizadas","Select all":"Selecionar tudo",Clear:"Limpar","columns selected":"colunas selecionadas",Metadata:"Metadados",None:"Nenhum",All:"Todos","Custom fields":"Campos personalizados","Additional metadata paths":"Caminhos de metadados adicionais","metadata fields selected":"campos de metadados selecionados","Export as:":"Exportar como:","No data selected.":"Nenhum dado selecionado.",Cancel:"Cancelar","Start Export":"Iniciar exportação","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Baixe e salve arquivos de mídia dos dados capturados. Isso pode demorar conforme a quantidade de dados. A mídia baixada inclui imagens de perfil, banners de perfil (para usuários), imagens e vídeos (para tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Para mais de 100 mídias ou arquivos grandes, recomenda-se copiar as URLs e baixar com um gerenciador externo como aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"A exportação ZIP no navegador agora usa downloads paralelos limitados. Para tarefas muito grandes com muitos vídeos, exportar URLs ou usar aria2 ainda é o caminho mais seguro e com menor uso de memória.","Filename template:":"Modelo de nome de arquivo:","Download scheduler":"Agendador de downloads","Faster defaults are intended for bulk CDN transfer.":"Os padrões mais rápidos são pensados para transferência em massa via CDN.","Start delay (ms)":"Atraso inicial (ms)","Global parallel":"Paralelo global","Per host":"Por host",Videos:"Vídeos",Retries:"Tentativas","Use aria2 format:":"Usar formato aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Clique para mais informações. Cada URL ficará em uma nova linha, com o nome do arquivo na linha seguinte. Esse formato é compatível com aria2.","Rate limit (ms):":"Limite de taxa (ms):","Media Filter:":"Filtro de mídia:","File Name":"Nome do arquivo","Media Type":"Tipo de mídia","Download URL":"URL de download","No media selected.":"Nenhuma mídia selecionada.","Preview limited to first 250 media items.":"Prévia limitada aos primeiros 250 itens de mídia.",Zipping:"Compactando","Copied!":"Copiado!","Copy URLs":"Copiar URLs","The tweet ID":"O ID do tweet","The username of tweet author":"O nome de usuário do autor do tweet","The profile name of tweet author":"O nome de perfil do autor do tweet","The media index in tweet (start from 0)":"O índice da mídia no tweet (começa em 0)","The order of media in tweet (1/2/3/4)":"A ordem da mídia no tweet (1/2/3/4)","The post date in YYYYMMDD format":"A data da publicação no formato YYYYMMDD","The post time in HHmmss format":"A hora da publicação no formato HHmmss","The media type (photo/video/animated_gif)":"O tipo de mídia (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"A extensão do arquivo de mídia (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Falha ao exportar mídia. Abra o DevTools para mais detalhes.","Failed to copy media URLs. Open DevTools for more details.":"Falha ao copiar URLs de mídia. Abra o DevTools para mais detalhes.","filter.photo":"Foto","filter.video":"Vídeo","filter.animated_gif":"GIF","filter.retweet":"Incluir retweets","loading remaining rows":"carregando linhas restantes","Bundle ZIP compression:":"Compressão do ZIP bundle:","Fastest / store":"Mais rápido / armazenar","Balanced / fast":"Equilibrado / rápido","Smaller / slower":"Menor / mais lento","Cancel Export":"Cancelar exportação","Export a canonical portable ZIP bundle for sharing/importing.":"Exporta um ZIP bundle portátil canônico para compartilhar/importar.","Export Bundle ZIP":"Exportar ZIP bundle","Source-backed media":"Mídia com suporte de origem","rows scanned:":"linhas escaneadas:","media URLs:":"URLs de mídia:",loading:"carregando","Loading media...":"Carregando mídia..."},common:{"Open Control Panel":"Abrir painel de controle","Browse around to capture more data.":"Navegue para capturar mais dados.",Settings:"Configurações",General:"Geral",Theme:"Tema",Language:"Idioma",Debug:"Depuração","Date Time Format":"Formato de data e hora","Click for more information. This will take effect on both previewer and exported files.":"Clique para mais informações. Isso terá efeito no visualizador e nos arquivos exportados.","Use dedicated DB for accounts":"Usar DB dedicado para contas","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Isso criará um banco de dados separado para cada conta do Twitter, ajudando a reduzir a chance de mistura de dados ao usar várias contas.","Local Database":"Banco de dados local","Analyze DB":"Analisar","Export DB":"Exportar","Clear DB":"Limpar","Bundle Export":"Exportar pacote","Bundle Library":"Biblioteca de pacotes","QC Session":"Sessão de QC","Diagnostic capture":"Captura diagnóstica","Diagnostic buffers cleared.":"Buffers de diagnóstico limpos.","Clear Buffers":"Limpar buffers","Preparing...":"Preparando...","Preparing diagnostics...":"Preparando diagnósticos...","Export QC Diagnostics":"Exportar diagnósticos de QC","Export Diagnostics Bundle":"Exportar pacote de diagnósticos","QC idle.":"QC ocioso.","Are you sure to clear all data in the database?":"Tem certeza de que deseja limpar todos os dados do banco?","Database cleared.":"Banco de dados limpo.",Module:"Módulo","Modules (Scroll to see more)":"Módulos (role para ver mais)",About:"Sobre",Version:"Versão","Search...":"Pesquisar...","Something went wrong.":"Algo deu errado.","Error:":"Erro:","Captured:":"Capturado:","Rows per page:":"Linhas por página:","Relation Types":"Tipos de relação","Subject Accounts":"Contas sujeitas","Subject User IDs":"IDs de usuário sujeitos","Last Observed At":"Última observação","A - B of N items":"{{from}} - {{to}} de {{total}} itens","No data available.":"Nenhum dado disponível.","No media available.":"Nenhuma mídia disponível.",Clear:"Limpar","Bookmark folders":"Pastas de favoritos","1 folder selected":"1 pasta selecionada","{{count}} folders selected":"{{count}} pastas selecionadas","Export Media":"Exportar mídia","Export Data":"Exportar dados","Export Search History":"Exportar histórico de pesquisa","JSON View":"Visualização JSON","Media View":"Visualização de mídia",Bookmarks:"Favoritos",Tweets:"Tweets",Users:"Usuários","User Tweets":"Tweets do usuário","User Media":"Mídia do usuário","Tweet Details":"Detalhes do tweet","Search Timeline":"Linha do tempo de pesquisa","Home Timeline":"Linha do tempo inicial","List Timeline":"Linha do tempo da lista","Community Timeline":"Linha do tempo da comunidade","Community Members":"Membros da comunidade","List Members":"Membros da lista","List Subscribers":"Assinantes da lista","Direct Messages":"Mensagens diretas","Interaction Events":"Eventos de interação","Local Search":"Pesquisa local","Runtime Logs":"Logs de execução","Bundle Viewer":"Visualizador de pacotes","{{count}} imported bundles":"{{count}} pacotes importados","Search indexed tweets with Twitter-style operators":"Pesquise tweets indexados com operadores no estilo Twitter","Local Recorder Search":"Pesquisa do gravador local",Quotes:"Citações",CommunityMembers:"Membros da comunidade",CommunityTimeline:"Linha do tempo da comunidade",DirectMessages:"Mensagens diretas",Followers:"Seguidores",Following:"Seguindo",HomeTimeline:"Linha do tempo inicial",Likes:"Curtidas",ListMembers:"Membros da lista",ListSubscribers:"Assinantes da lista",ListTimeline:"Linha do tempo da lista",InteractionEvents:"Eventos de interação",LocalSearch:"Pesquisa local",RawCapture:"Captura bruta",Retweeters:"Retuitadores",RetweetersModule:"Retuitadores",RuntimeLogs:"Logs de execução",SearchTimeline:"Pesquisa",TweetIndex:"Índice de tweets",TweetDetail:"Detalhe do tweet",UserDetail:"Detalhe do usuário",UserMedia:"Mídia do usuário",UserTweets:"Tweets do usuário",on:"ligado",off:"desligado",unknown:"desconhecido",online:"conectado",offline:"desconectado",leader:"líder",follower:"seguidor",tab:"aba",both:"ambos",xhr:"xhr",fetch:"fetch",watchdog:"vigia",all:"todos",explicit:"explícito",loading:"carregando",complete:"concluído",idle:"ocioso","api-name":"nome da API","id-only":"somente ID","theme.system":"Sistema","theme.cupcake":"Claro","theme.dark":"Escuro","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Negócios","theme.winter":"Inverno","Safe mode":"Modo seguro","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Desativa a captura baseada em hooks quando ativado. Desative para navegação normal e captura diagnóstica.","Hook mode":"Modo de hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Controla se o userscript aplica hook em XHR, fetch, ambos ou nenhum.","Repair mode":"Modo de reparo","Controls whether hook repair watchdog behavior is active.":"Controla se o watchdog de reparo de hooks está ativo.","{{seconds}}s ago":"há {{seconds}} s","Hooks: {{status}}":"Hooks:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks:xhr {{xhr}}, fetch {{fetch}}, último {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Modo: seguro {{safe}}, hook {{hook}}, reparo {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Modo: seguro {{safe}}, hook {{hook}}, reparo {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"eventos raw: {{total}} | descartados: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} carregando / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"descartes por overflow do spool: {{drops}} | indisponível: {{unavailable}} | pendente mais antigo: {{age}}ms","daemon: {{status}}":"serviço:{{status}}","daemon: {{status}} | last error: {{error}}":"serviço:{{status}} | último erro:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor:{{role}} | líder:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"ticks monitor rota/viewport: {{route}}/{{viewport}} | suprimidos rota/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Banco de dados conectado: {{name}}","App options loaded":"Opções do app carregadas",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Texto não estruturado é expandido em correspondências de termos de conteúdo e janelas de frases adjacentes reforçadas; palavras comuns perdem prioridade salvo se estiverem entre aspas.","Phrase search with optional slop.":"Busca por frase com folga opcional.","Boolean operators with standard precedence and parentheses.":"Operadores booleanos com precedência padrão e parênteses.","Match the author handle or author id.":"Corresponde ao usuário ou ID do autor.","Shorthand for an enforced author constraint, equivalent to from:user.":"Atalho para uma restrição obrigatória de autor, equivalente a from:user.","Match reply targets, entity ids, or conversation ids.":"Corresponde a alvos de resposta, IDs de entidade ou IDs de conversa.","Match bookmark folder id or folder name.":"Corresponde ao ID ou nome da pasta de favoritos.","Match language, route surface, source text, or card name.":"Corresponde a idioma, superfície de rota, texto de origem ou nome do card.","Match domains or URLs found in tweets.":"Corresponde a domínios ou URLs encontrados em tweets.","Boolean state filters.":"Filtros de estado booleanos.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filtros de presença para mídia, links, menções, hashtags, cashtags, engajamento e enquetes.","Compatibility aliases retained for Twitter-style queries.":"Aliases de compatibilidade preservados para consultas no estilo Twitter.","Numeric threshold filters.":"Filtros de limite numérico.","Date, timestamp, and Snowflake-style boundary filters.":"Filtros de limite por data, timestamp e estilo Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filtro explícito de menção mais filtros abreviados de hashtag e cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Busca lexical com escopo de campo em caminhos aninhados brutos, incluindo caminhos pontilhados e arrays.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Opções do app migradas de v{{oldVersion}} para v{{newVersion}}","Hooked into fetch":"Hook instalado em fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook instalado em XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Modo seguro de hooks ativado ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Reparo de hook falhou ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Instalação do rastreador de contexto de favoritos falhou; continuando sem rastreador ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} itens recebidos","Exporting to ZIP file: {{filename}}":"Exportando para arquivo ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"Exportando para arquivo {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Exportação em stream para arquivo {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migração concluída: {{users}} usuários e {{tweets}} tweets atualizados.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone recebido (Motivo: {{reason}})","Failed to hook into XMLHttpRequest":"Falha ao aplicar hook em XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API não encontrada, pulando hooks de fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"Função base da Fetch API indisponível ou insegura; ativando modo seguro","Fetch hook base invocation failed; enabling safe mode":"Invocação base do hook fetch falhou; ativando modo seguro","XHR send hook base invocation failed; enabling safe mode":"Invocação base do hook XHR send falhou; ativando modo seguro","XHR open hook base invocation failed; enabling safe mode":"Invocação base do hook XHR open falhou; ativando modo seguro","Fetch hook already installed":"Hook de fetch já instalado","Debug mode enabled":"Modo debug ativado","Database cleared":"Banco de dados limpo","Upgrading database schema...":"Atualizando esquema do banco de dados...","Database upgraded":"Banco de dados atualizado","Zip stream closed.":"Stream ZIP fechado.","Running migration_20250609: Migrating legacy user data format":"Executando migration_20250609: migrando formato legado de dados de usuário","TweetUnavailable received (Reason: unknown)":"TweetUnavailable recebido (Motivo: desconhecido)","Empty tweet received":"Tweet vazio recebido","Unknown tweet type received":"Tipo de tweet desconhecido recebido","Failed to extract tweet":"Falha ao extrair tweet","Failed to export file":"Falha ao exportar arquivo","Failed to stream export file":"Falha ao exportar arquivo em stream"}},yx={exporter:{ID:"ID",Date:"Дата",Content:"Содержимое","Show Full Text":"Показать полный текст",Media:"Медиа","Screen Name":"Имя пользователя","Profile Name":"Имя профиля","Profile Image":"Изображение профиля","User ID":"ID пользователя","Replying To":"Ответ на","RT Source":"Источник RT","Quote Source":"Источник цитаты","Media Tags":"Медиа-теги",Favorites:"Избранное",Retweets:"Ретвиты",Bookmarks:"Закладки",Quotes:"Цитаты",Replies:"Ответы",Views:"Просмотры",Favorited:"В избранном",Retweeted:"Ретвитнуто",Bookmarked:"В закладках","Bookmark Folder":"Папка закладок",URL:"URL",Actions:"Действия",Details:"Детали",Description:"Описание","Profile Banner":"Баннер профиля",Followers:"Подписчики",FollowingCount:"Количество подписок",Statuses:"Публикации",Favourites:"Избранное",Listed:"В списках",Location:"Местоположение",Website:"Сайт",Birthdate:"Дата рождения","Verified Type":"Тип верификации","Blue Verified":"Blue верифицирован",Following:"Подписки","Follows You":"Подписан на вас","Can DM":"Можно написать в DM",Protected:"Защищён","Created At":"Создано",Sender:"Отправитель",Recipient:"Получатель","Conversation ID":"ID беседы","Conversation Type":"Тип беседы",Data:"Данные","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Экспортируйте захваченные данные в JSON/HTML/CSV. Это может занять время в зависимости от объёма данных. Экспортируемый файл не содержит медиафайлы, такие как изображения и видео, а только URL.","Data length:":"Длина данных:","Export scope:":"Область экспорта:","All current results":"Все текущие результаты","Selected rows":"Выбранные строки","Pinned result set":"Закреплённый набор результатов",Query:"Запрос",Sort:"Сортировка","Include all metadata:":"Включить все метаданные:","Include original record metadata in bundle:":"Включить исходные метаданные записей в бандл:","Export columns":"Столбцы экспорта","Custom columns":"Пользовательские столбцы","Select all":"Выбрать все",Clear:"Очистить","columns selected":"выбрано столбцов",Metadata:"Метаданные",None:"Нет",All:"Все","Custom fields":"Пользовательские поля","Additional metadata paths":"Дополнительные пути метаданных","metadata fields selected":"выбрано полей метаданных","Export as:":"Экспортировать как:","No data selected.":"Данные не выбраны.",Cancel:"Отмена","Start Export":"Начать экспорт","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Скачать и сохранить медиафайлы из захваченных данных. Это может занять время в зависимости от объёма данных. Будут скачаны изображения профиля, баннеры профиля (для пользователей), изображения и видео (для твитов).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Для более чем 100 медиа или крупных файлов рекомендуется скопировать URL и скачать их внешним менеджером, например aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ZIP-экспорт в браузере теперь использует ограниченные параллельные загрузки. Для очень больших задач с множеством видео экспорт URL или aria2 остаётся самым безопасным вариантом с низким потреблением памяти.","Filename template:":"Шаблон имени файла:","Download scheduler":"Планировщик загрузок","Faster defaults are intended for bulk CDN transfer.":"Более быстрые значения по умолчанию предназначены для массовой передачи через CDN.","Start delay (ms)":"Начальная задержка (мс)","Global parallel":"Общий параллелизм","Per host":"На хост",Videos:"Видео",Retries:"Повторы","Use aria2 format:":"Использовать формат aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Нажмите для подробностей. Каждый URL будет на новой строке, а имя файла — на следующей. Формат совместим с aria2.","Rate limit (ms):":"Ограничение скорости (мс):","Media Filter:":"Фильтр медиа:","File Name":"Имя файла","Media Type":"Тип медиа","Download URL":"URL загрузки","No media selected.":"Медиа не выбраны.","Preview limited to first 250 media items.":"Предпросмотр ограничен первыми 250 медиаэлементами.",Zipping:"Упаковка ZIP","Copied!":"Скопировано!","Copy URLs":"Копировать URL","The tweet ID":"ID твита","The username of tweet author":"Имя пользователя автора твита","The profile name of tweet author":"Имя профиля автора твита","The media index in tweet (start from 0)":"Индекс медиа в твите (начинается с 0)","The order of media in tweet (1/2/3/4)":"Порядок медиа в твите (1/2/3/4)","The post date in YYYYMMDD format":"Дата публикации в формате YYYYMMDD","The post time in HHmmss format":"Время публикации в формате HHmmss","The media type (photo/video/animated_gif)":"Тип медиа (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"Расширение медиафайла (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Не удалось экспортировать медиа. Откройте DevTools для подробностей.","Failed to copy media URLs. Open DevTools for more details.":"Не удалось скопировать URL медиа. Откройте DevTools для подробностей.","filter.photo":"Фото","filter.video":"Видео","filter.animated_gif":"GIF","filter.retweet":"Включить ретвиты","loading remaining rows":"загрузка оставшихся строк","Bundle ZIP compression:":"Сжатие ZIP-бандла:","Fastest / store":"Самое быстрое / store","Balanced / fast":"Сбалансировано / быстро","Smaller / slower":"Меньше / медленнее","Cancel Export":"Отменить экспорт","Export a canonical portable ZIP bundle for sharing/importing.":"Экспортировать канонический переносимый ZIP-бандл для передачи/импорта.","Export Bundle ZIP":"Экспортировать ZIP-бандл","Source-backed media":"Медиа с поддержкой источника","rows scanned:":"просканировано строк:","media URLs:":"URL медиа:",loading:"загрузка","Loading media...":"Загрузка медиа..."},common:{"Open Control Panel":"Открыть панель управления","Browse around to capture more data.":"Просматривайте страницы, чтобы захватывать больше данных.",Settings:"Настройки",General:"Общие",Theme:"Тема",Language:"Язык",Debug:"Отладка","Date Time Format":"Формат даты и времени","Click for more information. This will take effect on both previewer and exported files.":"Нажмите, чтобы узнать подробнее. Это повлияет и на предпросмотр, и на экспортируемые файлы.","Use dedicated DB for accounts":"Использовать отдельную БД для аккаунтов","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Это создаст отдельную базу данных для каждого аккаунта Twitter и снизит риск смешивания данных при использовании нескольких аккаунтов.","Local Database":"Локальная база данных","Analyze DB":"Анализ","Export DB":"Экспорт","Clear DB":"Очистить","Bundle Export":"Экспорт пакета","Bundle Library":"Библиотека пакетов","QC Session":"Сессия QC","Diagnostic capture":"Диагностический захват","Diagnostic buffers cleared.":"Диагностические буферы очищены.","Clear Buffers":"Очистить буферы","Preparing...":"Подготовка...","Preparing diagnostics...":"Подготовка диагностики...","Export QC Diagnostics":"Экспорт диагностики QC","Export Diagnostics Bundle":"Экспорт диагностического пакета","QC idle.":"QC бездействует.","Are you sure to clear all data in the database?":"Вы уверены, что хотите удалить все данные из базы?","Database cleared.":"База данных очищена.",Module:"Модуль","Modules (Scroll to see more)":"Модули (прокрутите, чтобы увидеть больше)",About:"О программе",Version:"Версия","Search...":"Поиск...","Something went wrong.":"Что-то пошло не так.","Error:":"Ошибка:","Captured:":"Захвачено:","Rows per page:":"Строк на странице:","Relation Types":"Типы связей","Subject Accounts":"Целевые аккаунты","Subject User IDs":"ID целевых пользователей","Last Observed At":"Последнее наблюдение","A - B of N items":"{{from}} - {{to}} из {{total}} элементов","No data available.":"Нет доступных данных.","No media available.":"Нет доступных медиа.",Clear:"Очистить","Bookmark folders":"Папки закладок","1 folder selected":"Выбрана 1 папка","{{count}} folders selected":"Выбрано папок: {{count}}","Export Media":"Экспорт медиа","Export Data":"Экспорт данных","Export Search History":"Экспорт истории поиска","JSON View":"JSON-представление","Media View":"Медиа-представление",Bookmarks:"Закладки",Tweets:"Твиты",Users:"Пользователи","User Tweets":"Твиты пользователя","User Media":"Медиа пользователя","Tweet Details":"Детали твита","Search Timeline":"Лента поиска","Home Timeline":"Домашняя лента","List Timeline":"Лента списка","Community Timeline":"Лента сообщества","Community Members":"Участники сообщества","List Members":"Участники списка","List Subscribers":"Подписчики списка","Direct Messages":"Личные сообщения","Interaction Events":"События взаимодействия","Local Search":"Локальный поиск","Runtime Logs":"Журналы выполнения","Bundle Viewer":"Просмотр пакетов","{{count}} imported bundles":"Импортировано пакетов: {{count}}","Search indexed tweets with Twitter-style operators":"Поиск индексированных твитов с операторами в стиле Twitter","Local Recorder Search":"Поиск локального регистратора",Quotes:"Цитаты",CommunityMembers:"Участники сообщества",CommunityTimeline:"Лента сообщества",DirectMessages:"Личные сообщения",Followers:"Подписчики",Following:"Подписки",HomeTimeline:"Домашняя лента",Likes:"Лайки",ListMembers:"Участники списка",ListSubscribers:"Подписчики списка",ListTimeline:"Лента списка",InteractionEvents:"События взаимодействия",LocalSearch:"Локальный поиск",RawCapture:"Сырой захват",Retweeters:"Ретвитнувшие",RetweetersModule:"Ретвитнувшие",RuntimeLogs:"Журналы выполнения",SearchTimeline:"Поиск",TweetIndex:"Индекс твитов",TweetDetail:"Детали твита",UserDetail:"Детали пользователя",UserMedia:"Медиа пользователя",UserTweets:"Твиты пользователя",on:"вкл.",off:"выкл.",unknown:"неизвестно",online:"онлайн",offline:"офлайн",leader:"лидер",follower:"подписчик",tab:"вкладка",both:"оба",xhr:"xhr",fetch:"fetch",watchdog:"сторож",all:"все",explicit:"явно",loading:"загрузка",complete:"готово",idle:"ожидание","api-name":"имя API","id-only":"только ID","theme.system":"Система","theme.cupcake":"Светлая","theme.dark":"Тёмная","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Бизнес","theme.winter":"Зима","Safe mode":"Безопасный режим","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"При включении отключает захват через hooks. Отключите для обычного просмотра и диагностики.","Hook mode":"Режим hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Управляет тем, будет ли userscript подключать XHR, fetch, оба или ничего.","Repair mode":"Режим восстановления","Controls whether hook repair watchdog behavior is active.":"Управляет активностью watchdog восстановления hooks.","{{seconds}}s ago":"{{seconds}} с назад","Hooks: {{status}}":"Хуки:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Хуки:xhr {{xhr}}, fetch {{fetch}}, последний {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Хуки:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Режим: безопасный {{safe}}, hook {{hook}}, восстановление {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Режим: безопасный {{safe}}, hook {{hook}}, восстановление {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw события: {{total}} | отброшено: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} загрузка / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"сбросы переполнения spool: {{drops}} | недоступно: {{unavailable}} | самый старый pending: {{age}}ms","daemon: {{status}}":"демон:{{status}}","daemon: {{status}} | last error: {{error}}":"демон:{{status}} | последняя ошибка:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"монитор:{{role}} | лидер:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"тики monitor route/viewport: {{route}}/{{viewport}} | подавлено route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"База данных подключена: {{name}}","App options loaded":"Параметры приложения загружены",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Неструктурированный текст расширяется до совпадений терминов содержимого и усиленных окон соседних фраз; распространённые служебные слова имеют меньший приоритет, если не взяты в кавычки.","Phrase search with optional slop.":"Поиск фразы с необязательным допуском.","Boolean operators with standard precedence and parentheses.":"Булевы операторы со стандартным приоритетом и скобками.","Match the author handle or author id.":"Совпадение с именем пользователя или ID автора.","Shorthand for an enforced author constraint, equivalent to from:user.":"Краткая форма обязательного ограничения автора, эквивалент from:user.","Match reply targets, entity ids, or conversation ids.":"Совпадение с целями ответа, ID сущностей или ID бесед.","Match bookmark folder id or folder name.":"Совпадение с ID или названием папки закладок.","Match language, route surface, source text, or card name.":"Совпадение с языком, поверхностью маршрута, исходным текстом или названием карточки.","Match domains or URLs found in tweets.":"Совпадение с доменами или URL в твитах.","Boolean state filters.":"Булевы фильтры состояния.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Фильтры наличия медиа, ссылок, упоминаний, хэштегов, кэштегов, вовлечённости и опросов.","Compatibility aliases retained for Twitter-style queries.":"Совместимые псевдонимы, сохранённые для запросов в стиле Twitter.","Numeric threshold filters.":"Фильтры числовых порогов.","Date, timestamp, and Snowflake-style boundary filters.":"Граничные фильтры даты, timestamp и в стиле Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Явный фильтр упоминания плюс краткие фильтры хэштега и кэштега.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Лексический поиск по полю в сырых вложенных путях, включая точечные пути объектов и массивы.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Параметры приложения перенесены с v{{oldVersion}} на v{{newVersion}}","Hooked into fetch":"Hook установлен в fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook установлен в XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Безопасный режим hooks включён ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Восстановление hook не удалось ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Установка отслеживания контекста закладок не удалась; продолжаем без трекера ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: получено {{count}} элементов","Exporting to ZIP file: {{filename}}":"Экспорт в ZIP-файл: {{filename}}","Exporting to {{format}} file: {{filename}}":"Экспорт в файл {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Потоковый экспорт в файл {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Миграция завершена: обновлено пользователей {{users}} и твитов {{tweets}}.","TweetTombstone received (Reason: {{reason}})":"Получен TweetTombstone (Причина: {{reason}})","Failed to hook into XMLHttpRequest":"Не удалось установить hook в XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API не найден, hooks fetch пропущены","Fetch API base function unavailable or unsafe; enabling safe mode":"Базовая функция Fetch API недоступна или небезопасна; включается безопасный режим","Fetch hook base invocation failed; enabling safe mode":"Базовый вызов hook fetch не удался; включается безопасный режим","XHR send hook base invocation failed; enabling safe mode":"Базовый вызов hook XHR send не удался; включается безопасный режим","XHR open hook base invocation failed; enabling safe mode":"Базовый вызов hook XHR open не удался; включается безопасный режим","Fetch hook already installed":"Hook fetch уже установлен","Debug mode enabled":"Режим отладки включён","Database cleared":"База данных очищена","Upgrading database schema...":"Обновление схемы базы данных...","Database upgraded":"База данных обновлена","Zip stream closed.":"ZIP-поток закрыт.","Running migration_20250609: Migrating legacy user data format":"Запуск migration_20250609: перенос устаревшего формата данных пользователей","TweetUnavailable received (Reason: unknown)":"Получен TweetUnavailable (Причина: неизвестна)","Empty tweet received":"Получен пустой твит","Unknown tweet type received":"Получен неизвестный тип твита","Failed to extract tweet":"Не удалось извлечь твит","Failed to export file":"Не удалось экспортировать файл","Failed to stream export file":"Не удалось выполнить потоковый экспорт файла"}},bx={exporter:{ID:"ID",Date:"تاریخ",Content:"مواد","Show Full Text":"مکمل متن دکھائیں",Media:"میڈیا","Screen Name":"صارف نام","Profile Name":"پروفائل نام","Profile Image":"پروفائل تصویر","User ID":"صارف ID","Replying To":"جواب برائے","RT Source":"RT ماخذ","Quote Source":"اقتباس ماخذ","Media Tags":"میڈیا ٹیگز",Favorites:"پسندیدہ",Retweets:"ری ٹویٹس",Bookmarks:"بک مارکس",Quotes:"اقتباسات",Replies:"جوابات",Views:"دیکھے جانے کی تعداد",Favorited:"پسندیدہ کیا گیا",Retweeted:"ری ٹویٹ کیا گیا",Bookmarked:"بک مارک کیا گیا","Bookmark Folder":"بک مارک فولڈر",URL:"URL",Actions:"اعمال",Details:"تفصیلات",Description:"تفصیل","Profile Banner":"پروفائل بینر",Followers:"فالوورز",FollowingCount:"فالوونگ تعداد",Statuses:"پوسٹس",Favourites:"پسندیدہ",Listed:"لسٹ میں شامل",Location:"مقام",Website:"ویب سائٹ",Birthdate:"تاریخ پیدائش","Verified Type":"تصدیق کی قسم","Blue Verified":"Blue تصدیق شدہ",Following:"فالو کر رہے ہیں","Follows You":"آپ کو فالو کرتا ہے","Can DM":"DM ہو سکتا ہے",Protected:"محفوظ","Created At":"بنایا گیا",Sender:"بھیجنے والا",Recipient:"وصول کنندہ","Conversation ID":"گفتگو ID","Conversation Type":"گفتگو کی قسم",Data:"ڈیٹا","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"محفوظ شدہ ڈیٹا کو JSON/HTML/CSV فائل کے طور پر برآمد کریں۔ ڈیٹا کی مقدار کے مطابق وقت لگ سکتا ہے۔ برآمد شدہ فائل میں تصاویر اور ویڈیوز جیسے میڈیا فائلز شامل نہیں ہوں گے، صرف URL ہوں گے۔","Data length:":"ڈیٹا لمبائی:","Export scope:":"برآمد کا دائرہ:","All current results":"تمام موجودہ نتائج","Selected rows":"منتخب قطاریں","Pinned result set":"پن کیا ہوا نتیجہ سیٹ",Query:"Query",Sort:"ترتیب","Include all metadata:":"تمام میٹا ڈیٹا شامل کریں:","Include original record metadata in bundle:":"بنڈل میں اصل ریکارڈ کا میٹا ڈیٹا شامل کریں:","Export columns":"برآمدی کالمز","Custom columns":"حسبِ ضرورت کالمز","Select all":"سب منتخب کریں",Clear:"صاف کریں","columns selected":"کالمز منتخب ہیں",Metadata:"میٹا ڈیٹا",None:"کوئی نہیں",All:"سب","Custom fields":"حسبِ ضرورت فیلڈز","Additional metadata paths":"اضافی میٹا ڈیٹا پاتھز","metadata fields selected":"میٹا ڈیٹا فیلڈز منتخب ہیں","Export as:":"اس طور پر برآمد کریں:","No data selected.":"کوئی ڈیٹا منتخب نہیں۔",Cancel:"منسوخ","Start Export":"برآمد شروع کریں","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"محفوظ شدہ ڈیٹا سے میڈیا فائلیں ڈاؤن لوڈ اور محفوظ کریں۔ ڈیٹا کی مقدار کے مطابق وقت لگ سکتا ہے۔ ڈاؤن لوڈ ہونے والے میڈیا میں پروفائل تصاویر، پروفائل بینرز (صارفین کے لیے)، تصاویر اور ویڈیوز (ٹویٹس کے لیے) شامل ہیں۔","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"100 سے زیادہ میڈیا یا بڑی فائلوں کے لیے URL کاپی کر کے aria2 جیسے بیرونی ڈاؤن لوڈ مینیجر سے ڈاؤن لوڈ کرنا بہتر ہے۔","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"براؤزر ZIP برآمد اب محدود متوازی ڈاؤن لوڈز استعمال کرتی ہے۔ بہت بڑے ویڈیو والے کاموں کے لیے URL یا aria2 برآمد اب بھی کم میموری والا محفوظ ترین راستہ ہے۔","Filename template:":"فائل نام ٹیمپلیٹ:","Download scheduler":"ڈاؤن لوڈ شیڈولر","Faster defaults are intended for bulk CDN transfer.":"تیز ڈیفالٹس بڑے CDN ٹرانسفر کے لیے ہیں۔","Start delay (ms)":"آغاز تاخیر (ms)","Global parallel":"عالمی متوازی","Per host":"فی ہوسٹ",Videos:"ویڈیوز",Retries:"دوبارہ کوششیں","Use aria2 format:":"aria2 فارمیٹ استعمال کریں:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"مزید معلومات کے لیے کلک کریں۔ ہر URL نئی لائن میں ہوگا، اور اس کا فائل نام اگلی لائن میں ہوگا۔ یہ فارمیٹ aria2 سے مطابقت رکھتا ہے۔","Rate limit (ms):":"رفتار حد (ms):","Media Filter:":"میڈیا فلٹر:","File Name":"فائل نام","Media Type":"میڈیا قسم","Download URL":"ڈاؤن لوڈ URL","No media selected.":"کوئی میڈیا منتخب نہیں۔","Preview limited to first 250 media items.":"پیش نظارہ پہلے 250 میڈیا آئٹمز تک محدود ہے۔",Zipping:"ZIP بن رہی ہے","Copied!":"کاپی ہو گیا!","Copy URLs":"URL کاپی کریں","The tweet ID":"ٹویٹ ID","The username of tweet author":"ٹویٹ مصنف کا صارف نام","The profile name of tweet author":"ٹویٹ مصنف کا پروفائل نام","The media index in tweet (start from 0)":"ٹویٹ میں میڈیا انڈیکس (0 سے شروع)","The order of media in tweet (1/2/3/4)":"ٹویٹ میں میڈیا ترتیب (1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD فارمیٹ میں پوسٹ تاریخ","The post time in HHmmss format":"HHmmss فارمیٹ میں پوسٹ وقت","The media type (photo/video/animated_gif)":"میڈیا قسم (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"میڈیا فائل ایکسٹینشن (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"میڈیا برآمد ناکام۔ مزید تفصیلات کے لیے DevTools کھولیں۔","Failed to copy media URLs. Open DevTools for more details.":"میڈیا URL کاپی ناکام۔ مزید تفصیلات کے لیے DevTools کھولیں۔","filter.photo":"تصویر","filter.video":"ویڈیو","filter.animated_gif":"GIF","filter.retweet":"ری ٹویٹس شامل کریں","loading remaining rows":"باقی قطاریں لوڈ ہو رہی ہیں","Bundle ZIP compression:":"Bundle ZIP کمپریشن:","Fastest / store":"تیز ترین / store","Balanced / fast":"متوازن / تیز","Smaller / slower":"چھوٹا / سست","Cancel Export":"Export منسوخ کریں","Export a canonical portable ZIP bundle for sharing/importing.":"share/import کے لیے canonical portable ZIP bundle export کریں۔","Export Bundle ZIP":"Bundle ZIP export کریں","Source-backed media":"Source-backed میڈیا","rows scanned:":"scan شدہ قطاریں:","media URLs:":"میڈیا URLs:",loading:"لوڈ ہو رہا ہے","Loading media...":"media لوڈ ہو رہا ہے..."},common:{"Open Control Panel":"کنٹرول پینل کھولیں","Browse around to capture more data.":"مزید ڈیٹا محفوظ کرنے کے لیے براؤز کریں۔",Settings:"ترتیبات",General:"عمومی",Theme:"تھیم",Language:"زبان",Debug:"ڈیبگ","Date Time Format":"تاریخ اور وقت کا فارمیٹ","Click for more information. This will take effect on both previewer and exported files.":"مزید معلومات کے لیے کلک کریں۔ یہ پیش نظارہ اور برآمد شدہ فائلوں دونوں پر لاگو ہوگا۔","Use dedicated DB for accounts":"اکاؤنٹس کے لیے الگ DB استعمال کریں","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"یہ ہر Twitter اکاؤنٹ کے لیے الگ ڈیٹابیس بنائے گا، جس سے متعدد اکاؤنٹس استعمال کرتے وقت ڈیٹا کے مل جانے کا امکان کم ہوتا ہے۔","Local Database":"مقامی ڈیٹابیس","Analyze DB":"تجزیہ","Export DB":"برآمد","Clear DB":"صاف کریں","Bundle Export":"بنڈل برآمد","Bundle Library":"بنڈل لائبریری","QC Session":"QC سیشن","Diagnostic capture":"تشخیصی کیپچر","Diagnostic buffers cleared.":"تشخیصی بفر صاف کر دیے گئے۔","Clear Buffers":"بفر صاف کریں","Preparing...":"تیاری ہو رہی ہے...","Preparing diagnostics...":"تشخیص تیار ہو رہی ہے...","Export QC Diagnostics":"QC تشخیص برآمد کریں","Export Diagnostics Bundle":"تشخیصی بنڈل برآمد کریں","QC idle.":"QC غیر فعال ہے۔","Are you sure to clear all data in the database?":"کیا آپ واقعی ڈیٹابیس کا تمام ڈیٹا صاف کرنا چاہتے ہیں؟","Database cleared.":"ڈیٹابیس صاف کر دی گئی۔",Module:"ماڈیول","Modules (Scroll to see more)":"ماڈیولز (مزید دیکھنے کے لیے اسکرول کریں)",About:"متعلق",Version:"ورژن","Search...":"تلاش...","Something went wrong.":"کچھ غلط ہو گیا۔","Error:":"خرابی:","Captured:":"محفوظ شدہ:","Rows per page:":"فی صفحہ قطاریں:","Relation Types":"رشتہ کی اقسام","Subject Accounts":"موضوع اکاؤنٹس","Subject User IDs":"موضوع صارف ID","Last Observed At":"آخری مشاہدہ","A - B of N items":"{{total}} میں سے {{from}} - {{to}} آئٹمز","No data available.":"کوئی ڈیٹا دستیاب نہیں۔","No media available.":"کوئی میڈیا دستیاب نہیں۔",Clear:"صاف کریں","Bookmark folders":"بک مارک فولڈرز","1 folder selected":"1 فولڈر منتخب","{{count}} folders selected":"{{count}} فولڈرز منتخب","Export Media":"میڈیا برآمد کریں","Export Data":"ڈیٹا برآمد کریں","Export Search History":"تلاش کی تاریخ برآمد کریں","JSON View":"JSON منظر","Media View":"میڈیا منظر",Bookmarks:"بک مارکس",Tweets:"ٹویٹس",Users:"صارفین","User Tweets":"صارف کی ٹویٹس","User Media":"صارف کا میڈیا","Tweet Details":"ٹویٹ کی تفصیلات","Search Timeline":"تلاش ٹائم لائن","Home Timeline":"ہوم ٹائم لائن","List Timeline":"لسٹ ٹائم لائن","Community Timeline":"کمیونٹی ٹائم لائن","Community Members":"کمیونٹی اراکین","List Members":"لسٹ اراکین","List Subscribers":"لسٹ سبسکرائبرز","Direct Messages":"براہ راست پیغامات","Interaction Events":"تعامل کے واقعات","Local Search":"مقامی تلاش","Runtime Logs":"رن ٹائم لاگز","Bundle Viewer":"بنڈل ویور","{{count}} imported bundles":"{{count}} درآمد شدہ بنڈلز","Search indexed tweets with Twitter-style operators":"Twitter طرز کے آپریٹرز سے انڈیکس شدہ ٹویٹس تلاش کریں","Local Recorder Search":"مقامی ریکارڈر تلاش",Quotes:"اقتباسات",CommunityMembers:"کمیونٹی اراکین",CommunityTimeline:"کمیونٹی ٹائم لائن",DirectMessages:"براہ راست پیغامات",Followers:"فالوورز",Following:"فالو کر رہے ہیں",HomeTimeline:"ہوم ٹائم لائن",Likes:"لائکس",ListMembers:"لسٹ اراکین",ListSubscribers:"لسٹ سبسکرائبرز",ListTimeline:"لسٹ ٹائم لائن",InteractionEvents:"تعامل کے واقعات",LocalSearch:"مقامی تلاش",RawCapture:"خام کیپچر",Retweeters:"ری ٹویٹ کرنے والے",RetweetersModule:"ری ٹویٹ کرنے والے",RuntimeLogs:"رن ٹائم لاگز",SearchTimeline:"تلاش",TweetIndex:"ٹویٹ انڈیکس",TweetDetail:"ٹویٹ تفصیل",UserDetail:"صارف تفصیل",UserMedia:"صارف میڈیا",UserTweets:"صارف ٹویٹس",on:"آن",off:"آف",unknown:"نامعلوم",online:"آن لائن",offline:"آف لائن",leader:"لیڈر",follower:"فالوور",tab:"ٹیب",both:"دونوں",xhr:"xhr",fetch:"fetch",watchdog:"واچ ڈاگ",all:"سب",explicit:"واضح",loading:"لوڈ ہو رہا ہے",complete:"مکمل",idle:"خالی","api-name":"API نام","id-only":"صرف ID","theme.system":"سسٹم","theme.cupcake":"ہلکا","theme.dark":"گہرا","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"بزنس","theme.winter":"سردی","Safe mode":"محفوظ موڈ","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"فعال ہونے پر hook-based capture بند کرتا ہے۔ عام browsing اور diagnostic capture کے لیے اسے بند کریں۔","Hook mode":"Hook موڈ","Controls whether the userscript hooks XHR, fetch, both, or neither.":"یہ کنٹرول کرتا ہے کہ userscript XHR، fetch، دونوں یا کوئی بھی hook کرے۔","Repair mode":"Repair موڈ","Controls whether hook repair watchdog behavior is active.":"یہ کنٹرول کرتا ہے کہ hook repair watchdog فعال ہے یا نہیں۔","{{seconds}}s ago":"{{seconds}} سیکنڈ پہلے","Hooks: {{status}}":"ہکس:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"ہکس:xhr {{xhr}}, fetch {{fetch}}, آخری {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"ہکس:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"موڈ: محفوظ {{safe}}, hook {{hook}}, مرمت {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"موڈ: محفوظ {{safe}}, hook {{hook}}, مرمت {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw واقعات: {{total}} | dropped: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} لوڈ ہو رہا ہے / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow drops: {{drops}} | unavailable: {{unavailable}} | سب سے پرانا pending: {{age}}ms","daemon: {{status}}":"ڈیمون:{{status}}","daemon: {{status}} | last error: {{error}}":"ڈیمون:{{status}} | آخری خرابی:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"مانیٹر:{{role}} | لیڈر:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | دبائے گئے route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"ڈیٹابیس منسلک: {{name}}","App options loaded":"App options لوڈ ہو گئے",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"غیر ساختہ متن مواد کے الفاظ کی مماثلت اور مضبوط قریبی فقرہ ونڈوز میں پھیلتا ہے؛ عام بھرائی الفاظ کو کم ترجیح دی جاتی ہے جب تک وہ اقتباس میں نہ ہوں۔","Phrase search with optional slop.":"اختیاری slop کے ساتھ فقرہ تلاش۔","Boolean operators with standard precedence and parentheses.":"معیاری ترجیح اور قوسین کے ساتھ بولین آپریٹرز۔","Match the author handle or author id.":"مصنف کا ہینڈل یا مصنف ID ملائیں۔","Shorthand for an enforced author constraint, equivalent to from:user.":"لازمی مصنف قید کا مختصر طریقہ، from:user کے برابر۔","Match reply targets, entity ids, or conversation ids.":"جواب کے اہداف، entity IDs یا conversation IDs ملائیں۔","Match bookmark folder id or folder name.":"بک مارک فولڈر ID یا نام ملائیں۔","Match language, route surface, source text, or card name.":"زبان، route surface، source text یا card name ملائیں۔","Match domains or URLs found in tweets.":"ٹویٹس میں موجود domains یا URLs ملائیں۔","Boolean state filters.":"بولین حالت فلٹرز۔","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"میڈیا، links، mentions، hashtags، cashtags، engagement اور polls کی موجودگی کے فلٹرز۔","Compatibility aliases retained for Twitter-style queries.":"Twitter طرز queries کے لیے compatibility aliases برقرار رکھے گئے۔","Numeric threshold filters.":"عددی حد فلٹرز۔","Date, timestamp, and Snowflake-style boundary filters.":"تاریخ، timestamp اور Snowflake طرز boundary فلٹرز۔","Explicit mention filter plus shorthand hashtag and cashtag filters.":"واضح mention فلٹر، نیز مختصر hashtag اور cashtag فلٹرز۔","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"dotted object paths اور arrays سمیت raw nested paths پر field-scoped lexical تلاش۔","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"App options v{{oldVersion}} سے v{{newVersion}} میں migrate ہو گئے","Hooked into fetch":"fetch میں hook کیا گیا","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest میں hook کیا گیا (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook safe mode فعال ہوا ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook repair ناکام ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking install ناکام؛ tracker کے بغیر جاری ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} items موصول ہوئے","Exporting to ZIP file: {{filename}}":"ZIP file میں export: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} file میں export: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} file میں streaming export: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migration مکمل: {{users}} users اور {{tweets}} tweets update ہوئے۔","TweetTombstone received (Reason: {{reason}})":"TweetTombstone موصول ہوا (Reason: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest میں hook ناکام","Fetch API not found, skipping fetch hooks":"Fetch API نہیں ملا، fetch hooks چھوڑے جا رہے ہیں","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function unavailable یا unsafe ہے؛ safe mode فعال ہو رہا ہے","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation ناکام؛ safe mode فعال ہو رہا ہے","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation ناکام؛ safe mode فعال ہو رہا ہے","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation ناکام؛ safe mode فعال ہو رہا ہے","Fetch hook already installed":"Fetch hook پہلے سے installed ہے","Debug mode enabled":"Debug mode فعال","Database cleared":"Database صاف کیا گیا","Upgrading database schema...":"Database schema upgrade ہو رہا ہے...","Database upgraded":"Database upgrade ہو گیا","Zip stream closed.":"ZIP stream بند ہو گیا۔","Running migration_20250609: Migrating legacy user data format":"migration_20250609 چل رہا ہے: legacy user data format migrate ہو رہا ہے","TweetUnavailable received (Reason: unknown)":"TweetUnavailable موصول ہوا (Reason: unknown)","Empty tweet received":"خالی tweet موصول ہوا","Unknown tweet type received":"Unknown tweet type موصول ہوا","Failed to extract tweet":"Tweet extract ناکام","Failed to export file":"File export ناکام","Failed to stream export file":"Stream export file ناکام"}},wx={exporter:{ID:"ID",Date:"日期",Content:"内容","Show Full Text":"显示全文",Media:"媒体","Screen Name":"用户名","Profile Name":"用户昵称","Profile Image":"用户头像","User ID":"用户 ID","Replying To":"回复推文","RT Source":"转推来源","Quote Source":"引用来源","Media Tags":"圈人",Favorites:"喜欢数量",Retweets:"转推数量",Bookmarks:"书签数量",Quotes:"引用数量",Replies:"回复数量",Views:"查看次数",Favorited:"已喜欢",Retweeted:"已转推",Bookmarked:"已加书签","Bookmark Folder":"书签文件夹",URL:"URL",Actions:"操作",Details:"查看详情",Description:"简介","Profile Banner":"个人资料头图",Followers:"关注者数量",FollowingCount:"正在关注数量",Statuses:"推文数量",Favourites:"喜欢数量",Listed:"被加入列表数",Location:"位置",Website:"网站",Birthdate:"出生日期","Verified Type":"认证类型","Blue Verified":"蓝标认证",Following:"正在关注","Follows You":"关注你","Can DM":"可私信",Protected:"受保护","Created At":"创建时间",Sender:"发送者",Recipient:"接收者","Conversation ID":"对话 ID","Conversation Type":"对话类型",Data:"数据","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"将捕获的数据导出为 JSON/HTML/CSV 文件。这可能需要一些时间,具体取决于数据量。导出的文件不包括图片和视频等媒体文件,只包括它们的 URL。","Data length:":"数据长度:","Export scope:":"导出范围:","All current results":"当前全部结果","Selected rows":"已选择行","Pinned result set":"已固定结果集",Query:"查询",Sort:"排序","Include all metadata:":"包括所有元数据:","Include original record metadata in bundle:":"在捆绑包中包含原始记录元数据:","Export columns":"导出列","Custom columns":"自定义列","Select all":"全选",Clear:"清除","columns selected":"列已选择",Metadata:"元数据",None:"无",All:"全部","Custom fields":"自定义字段","Additional metadata paths":"其他元数据路径","metadata fields selected":"个元数据字段已选择","Export as:":"导出为:","No data selected.":"未选择数据。",Cancel:"取消","Start Export":"开始导出","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"从捕获的数据中下载并保存媒体文件。这可能需要一些时间,具体取决于数据量。将下载的媒体包括:用户的个人资料图片、个人资料头图、图片、推文中的视频。","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"对于超过 100 个媒体或大文件,建议复制 URL 并使用外部下载管理器(如 aria2)下载。","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"浏览器 ZIP 导出现在使用有界并行下载。对于非常大的视频密集任务,URL 或 aria2 导出仍是内存占用最低的安全路径。","Filename template:":"文件名模板:","Download scheduler":"下载调度器","Faster defaults are intended for bulk CDN transfer.":"更快的默认值用于批量 CDN 传输。","Start delay (ms)":"启动间隔 (ms)","Global parallel":"全局并行","Per host":"每主机",Videos:"视频",Retries:"重试","Use aria2 format:":"使用 aria2 格式:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"点击获取更多信息。每个 URL 将在新行中显示,其文件名在下一行。此格式与 aria2 兼容。","Rate limit (ms):":"速率限制(毫秒):","Media Filter:":"媒体过滤器:","File Name":"文件名","Media Type":"媒体类型","Download URL":"下载地址","No media selected.":"未选择媒体。","Preview limited to first 250 media items.":"预览限制为前 250 个媒体项。",Zipping:"正在打包","Copied!":"已复制!","Copy URLs":"复制 URL","The tweet ID":"推文 ID","The username of tweet author":"推文作者的用户名","The profile name of tweet author":"推文作者的用户昵称","The media index in tweet (start from 0)":"推文中的媒体索引(从 0 开始)","The order of media in tweet (1/2/3/4)":"推文中的媒体顺序(1/2/3/4)","The post date in YYYYMMDD format":"发布日期(YYYYMMDD 格式)","The post time in HHmmss format":"发布时间(HHmmss 格式)","The media type (photo/video/animated_gif)":"媒体类型(photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"媒体文件扩展名(jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"导出媒体失败。打开 DevTools 以获取更多详细信息。","Failed to copy media URLs. Open DevTools for more details.":"复制媒体 URL 失败。打开 DevTools 以获取更多详细信息。","filter.photo":"图片","filter.video":"视频","filter.animated_gif":"GIF","filter.retweet":"包括转推","loading remaining rows":"正在加载剩余行","Bundle ZIP compression:":"捆绑 ZIP 压缩:","Fastest / store":"最快 / 仅存储","Balanced / fast":"平衡 / 快速","Smaller / slower":"更小 / 更慢","Cancel Export":"取消导出","Export a canonical portable ZIP bundle for sharing/importing.":"导出用于分享/导入的规范可移植 ZIP 捆绑包。","Export Bundle ZIP":"导出捆绑 ZIP","Source-backed media":"源支持媒体","rows scanned:":"已扫描行:","media URLs:":"媒体 URL:",loading:"加载中","Loading media...":"正在加载媒体..."},common:{"Open Control Panel":"打开控制面板","Browse around to capture more data.":"浏览页面以捕获更多数据。",Settings:"设置",General:"通用",Theme:"主题",Language:"语言",Debug:"调试开关","Date Time Format":"日期时间格式","Click for more information. This will take effect on both previewer and exported files.":"点击查看详细信息。此选项会影响预览和导出的文件。","Use dedicated DB for accounts":"为每个账户使用专用数据库","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"这将为每个 Twitter 账户创建单独的数据库,这有助于避免使用多个账户时数据混淆。","Local Database":"本地数据库","Analyze DB":"统计","Export DB":"导出","Clear DB":"清空","Bundle Export":"导出捆绑包","Bundle Library":"捆绑包库","QC Session":"质检会话","Diagnostic capture":"诊断捕获","Diagnostic buffers cleared.":"诊断缓冲区已清除。","Clear Buffers":"清除缓冲区","Preparing...":"准备中...","Preparing diagnostics...":"正在准备诊断...","Export QC Diagnostics":"导出质检诊断","Export Diagnostics Bundle":"导出诊断捆绑包","QC idle.":"质检空闲。","Are you sure to clear all data in the database?":"确定要清空数据库中的所有数据吗?","Database cleared.":"数据库已清空。",Module:"模块","Modules (Scroll to see more)":"模块列表(滑动以查看完整列表)",About:"关于",Version:"版本","Search...":"搜索...","Something went wrong.":"出错了。","Error:":"错误:","Captured:":"已捕获:","Rows per page:":"每页显示行数:","Relation Types":"关系类型","Subject Accounts":"主体账户","Subject User IDs":"主体用户 ID","Last Observed At":"最后观察时间","A - B of N items":"第 {{from}} - {{to}} 项,共 {{total}} 项","No data available.":"没有数据。","No media available.":"没有可用媒体。",Clear:"清除","Bookmark folders":"书签文件夹","1 folder selected":"已选择 1 个文件夹","{{count}} folders selected":"已选择 {{count}} 个文件夹","Export Media":"导出媒体文件","Export Data":"导出数据","Export Search History":"导出搜索历史","JSON View":"JSON 数据预览","Media View":"媒体预览",Bookmarks:"书签",Tweets:"推文",Users:"用户","User Tweets":"用户推文","User Media":"用户媒体","Tweet Details":"推文详情","Search Timeline":"搜索时间线","Home Timeline":"主页时间线","List Timeline":"列表时间线","Community Timeline":"社群时间线","Community Members":"社群成员","List Members":"列表成员","List Subscribers":"列表关注者","Direct Messages":"私信","Interaction Events":"交互事件","Local Search":"本地搜索","Runtime Logs":"运行时日志","Bundle Viewer":"捆绑包查看器","{{count}} imported bundles":"已导入 {{count}} 个捆绑包","Search indexed tweets with Twitter-style operators":"用 Twitter 风格运算符搜索已索引推文","Local Recorder Search":"本地记录器搜索",Quotes:"引用推文",CommunityMembers:"社群成员",CommunityTimeline:"社群时间线",DirectMessages:"私信",Followers:"关注者",Following:"正在关注",HomeTimeline:"主页时间线",Likes:"喜欢",ListMembers:"列表成员",ListSubscribers:"列表关注者",ListTimeline:"列表时间线",InteractionEvents:"交互事件",LocalSearch:"本地搜索",RawCapture:"原始捕获",Retweeters:"转推者",RetweetersModule:"转推者",RuntimeLogs:"运行时日志",SearchTimeline:"搜索结果",TweetIndex:"推文索引",TweetDetail:"推文详情",UserDetail:"用户详情",UserMedia:"用户媒体",UserTweets:"用户推文",on:"开",off:"关",unknown:"未知",online:"在线",offline:"离线",leader:"主控",follower:"跟随",tab:"标签页",both:"两者",xhr:"xhr",fetch:"fetch",watchdog:"看门狗",all:"全部",explicit:"显式",loading:"加载中",complete:"完成",idle:"空闲","api-name":"API 名称","id-only":"仅 ID","theme.system":"跟随 X/系统","theme.cupcake":"浅色","theme.dark":"深色","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"商务","theme.winter":"冬季","Safe mode":"安全模式","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"启用后会停用基于 hook 的捕获。正常浏览和诊断捕获时请关闭它。","Hook mode":"Hook 模式","Controls whether the userscript hooks XHR, fetch, both, or neither.":"控制用户脚本 hook XHR、fetch、两者,还是都不 hook。","Repair mode":"修复模式","Controls whether hook repair watchdog behavior is active.":"控制 hook 修复看门狗是否启用。","{{seconds}}s ago":"{{seconds}} 秒前","Hooks: {{status}}":"Hooks:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks:xhr {{xhr}}, fetch {{fetch}}, 上次 {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"模式: 安全 {{safe}}, hook {{hook}}, 修复 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"模式: 安全 {{safe}}, hook {{hook}}, 修复 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw 事件:{{total}} | 丢弃:{{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool:{{queued}} 排队 / {{enqueued}} 入队 / {{flushed}} 已刷新 / {{failed}} 失败","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool 溢出丢弃:{{drops}} | 不可用:{{unavailable}} | 最旧待处理:{{age}}ms","daemon: {{status}}":"守护进程:{{status}}","daemon: {{status}} | last error: {{error}}":"守护进程:{{status}} | 最近错误:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"监控器:{{role}} | 主控:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor tick 路由/视口:{{route}}/{{viewport}} | 抑制 路由/视口:{{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"数据库已连接:{{name}}","App options loaded":"应用选项已加载",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"非结构化文本会扩展为内容词匹配,并提升相邻短语窗口;除非加引号,常见填充词会降低权重。","Phrase search with optional slop.":"短语搜索,可选 slop。","Boolean operators with standard precedence and parentheses.":"布尔运算符,支持标准优先级和括号。","Match the author handle or author id.":"匹配作者用户名或作者 ID。","Shorthand for an enforced author constraint, equivalent to from:user.":"强制作者约束的简写,等同于 from:user。","Match reply targets, entity ids, or conversation ids.":"匹配回复目标、实体 ID 或会话 ID。","Match bookmark folder id or folder name.":"匹配书签文件夹 ID 或名称。","Match language, route surface, source text, or card name.":"匹配语言、路由页面、来源文本或卡片名称。","Match domains or URLs found in tweets.":"匹配推文中的域名或 URL。","Boolean state filters.":"布尔状态筛选器。","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"按媒体、链接、提及、话题标签、股票标签、互动和投票是否存在筛选。","Compatibility aliases retained for Twitter-style queries.":"为 Twitter 风格查询保留的兼容别名。","Numeric threshold filters.":"数值阈值筛选器。","Date, timestamp, and Snowflake-style boundary filters.":"日期、时间戳和 Snowflake 风格边界筛选器。","Explicit mention filter plus shorthand hashtag and cashtag filters.":"显式提及筛选,以及话题标签和股票标签简写筛选。","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"在原始嵌套路径上执行字段限定词法搜索,包括点分对象路径和数组。","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"应用选项已从 v{{oldVersion}} 迁移到 v{{newVersion}}","Hooked into fetch":"已 hook fetch","Hooked into XMLHttpRequest (installed={{installed}})":"已 hook XMLHttpRequest(installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook 安全模式已启用({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook 修复失败({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"书签上下文跟踪安装失败;将在没有跟踪器的情况下继续({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}:已收到 {{count}} 项","Exporting to ZIP file: {{filename}}":"正在导出到 ZIP 文件:{{filename}}","Exporting to {{format}} file: {{filename}}":"正在导出到 {{format}} 文件:{{filename}}","Streaming export to {{format}} file: {{filename}}":"正在流式导出到 {{format}} 文件:{{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"迁移完成:已更新 {{users}} 个用户和 {{tweets}} 条推文。","TweetTombstone received (Reason: {{reason}})":"收到 TweetTombstone(原因:{{reason}})","Failed to hook into XMLHttpRequest":"hook XMLHttpRequest 失败","Fetch API not found, skipping fetch hooks":"未找到 Fetch API,跳过 fetch hooks","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API 基础函数不可用或不安全;正在启用安全模式","Fetch hook base invocation failed; enabling safe mode":"Fetch hook 基础调用失败;正在启用安全模式","XHR send hook base invocation failed; enabling safe mode":"XHR send hook 基础调用失败;正在启用安全模式","XHR open hook base invocation failed; enabling safe mode":"XHR open hook 基础调用失败;正在启用安全模式","Fetch hook already installed":"Fetch hook 已安装","Debug mode enabled":"调试模式已启用","Database cleared":"数据库已清除","Upgrading database schema...":"正在升级数据库架构...","Database upgraded":"数据库已升级","Zip stream closed.":"ZIP 流已关闭。","Running migration_20250609: Migrating legacy user data format":"正在运行 migration_20250609:迁移旧版用户数据格式","TweetUnavailable received (Reason: unknown)":"收到 TweetUnavailable(原因:未知)","Empty tweet received":"收到空推文","Unknown tweet type received":"收到未知推文类型","Failed to extract tweet":"提取推文失败","Failed to export file":"导出文件失败","Failed to stream export file":"流式导出文件失败"}},vx={ar:cx,bn:ux,en:dx,es:fx,fr:hx,hi:px,id:mx,ja:gx,"pt-BR":_x,ru:yx,ur:bx,"zh-Hans":wx};var kx=Symbol.for("preact-signals");function zc(){if(sa>1)sa--;else {for(var e,t=false;Cs!==void 0;){var n=Cs;for(Cs=void 0,Gd++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&sy(n))try{n.c();}catch(o){t||(e=o,t=true);}n=r;}}if(Gd=0,sa--,t)throw e}}function xx(e){if(sa>0)return e();sa++;try{return e()}finally{zc();}}var pn=void 0,Cs=void 0,sa=0,Gd=0,pc=0;function iy(e){if(pn!==void 0){var t=e.n;if(t===void 0||t.t!==pn)return t={i:0,S:e,p:pn.s,n:void 0,t:pn,e:void 0,x:void 0,r:t},pn.s!==void 0&&(pn.s.n=t),pn.s=t,e.n=t,32&pn.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=pn.s,t.n=void 0,pn.s.n=t,pn.s=t),t}}function zn(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0;}zn.prototype.brand=kx;zn.prototype.h=function(){return true};zn.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e);};zn.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n);}};zn.prototype.subscribe=function(e){var t=this;return Kc(function(){var n=t.value,r=pn;pn=void 0;try{e(n);}finally{pn=r;}})};zn.prototype.valueOf=function(){return this.value};zn.prototype.toString=function(){return this.value+""};zn.prototype.toJSON=function(){return this.value};zn.prototype.peek=function(){var e=pn;pn=void 0;try{return this.value}finally{pn=e;}};Object.defineProperty(zn.prototype,"value",{get:function(){var e=iy(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Gd>100)throw new Error("Cycle detected");this.v=e,this.i++,pc++,sa++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N();}finally{zc();}}}});function Oo(e){return new zn(e)}function sy(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return true;return false}function ly(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function cy(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r;}e.s=n;}function qi(e){zn.call(this,void 0),this.x=e,this.s=void 0,this.g=pc-1,this.f=4;}(qi.prototype=new zn).h=function(){if(this.f&=-3,1&this.f)return false;if((36&this.f)==32||(this.f&=-5,this.g===pc))return true;if(this.g=pc,this.f|=1,this.i>0&&!sy(this))return this.f&=-2,true;var e=pn;try{ly(this),pn=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++);}catch(n){this.v=n,this.f|=16,this.i++;}return pn=e,cy(this),this.f&=-2,true};qi.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t);}zn.prototype.S.call(this,e);};qi.prototype.U=function(e){if(this.t!==void 0&&(zn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t);}};qi.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N();}};Object.defineProperty(qi.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=iy(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Cp(e){return new qi(e)}function uy(e){var t=e.u;if(e.u=void 0,typeof t=="function"){sa++;var n=pn;pn=void 0;try{t();}catch(r){throw e.f&=-2,e.f|=8,Jf(e),r}finally{pn=n,zc();}}}function Jf(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,uy(e);}function Sx(e){if(pn!==this)throw new Error("Out-of-order effect");cy(this),pn=e,this.f&=-2,8&this.f&&Jf(this),zc();}function tl(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32;}tl.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t);}finally{e();}};tl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,uy(this),ly(this),sa++;var e=pn;return pn=this,Sx.bind(this,e)};tl.prototype.N=function(){2&this.f||(this.f|=2,this.o=Cs,Cs=this);};tl.prototype.d=function(){this.f|=8,1&this.f||Jf(this);};function Kc(e){var t=new tl(e);try{t.c();}catch(n){throw t.d(),n}return t.d.bind(t)}var Du;function Vi(e,t){Ht[e]=t.bind(null,Ht[e]||function(){});}function mc(e){Du&&Du(),Du=e&&e.S();}function dy(e){var t=this,n=e.data,r=tn(n);r.value=n;var o=St(function(){for(var a=t,i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}var s=Cp(function(){var c=r.value.value;return c===0?0:c===true?"":c||""}),l=Cp(function(){var c;return Ud(s.value)||((c=t.base)==null?void 0:c.nodeType)!==3});return t.__$u.c=function(){var c;!Ud(o.peek())&&((c=t.base)==null?void 0:c.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}));},Kc(function(){Vs||(Vs=this.N),this.N=hy,l.value&&a.base&&(a.base.data=s.value);}),s},[]);return o.value}dy.displayName="_st";Object.defineProperties(zn.prototype,{constructor:{configurable:true,value:void 0},type:{configurable:true,value:dy},props:{configurable:true,get:function(){return {data:this}}},__b:{configurable:true,value:1}});Vi("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var o in r)if(o!=="children"){var a=r[o];a instanceof zn&&(n||(t.__np=n={}),n[o]=a,r[o]=a.peek());}}e(t);});Vi("__r",function(e,t){mc();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(o){var a;return Kc(function(){a=this;}),a.c=function(){r.__$f|=1,r.setState({});},a})())),mc(n),e(t);});Vi("__e",function(e,t,n,r){mc(),e(t,n,r);});Vi("diffed",function(e,t){mc();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var a=n.U;if(a)for(var i in a){var s=a[i];s!==void 0&&!(i in r)&&(s.d(),a[i]=void 0);}else n.U=a={};for(var l in r){var c=a[l],h=r[l];c===void 0?(c=Cx(n,l,h,o),a[l]=c):c.o(h,o);}}}e(t);});function Cx(e,t,n,r){var o=t in e&&e.ownerSVGElement===void 0,a=Oo(n);return {o:function(i,s){a.value=i,r=s;},d:Kc(function(){Vs||(Vs=this.N),this.N=hy;var i=a.value.value;r[t]!==i&&(r[t]=i,o?e[t]=i:i?e.setAttribute(t,i):e.removeAttribute(t));})}}Vi("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var o in r){var a=r[o];a&&a.d();}}}}else {var i=t.__c;if(i){var s=i.__$u;s&&(i.__$u=void 0,s.d());}}e(t);});Vi("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r);});Zr.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return true;for(var r in t)return true;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return true;for(var a in this.props)if(!(a in e))return true;return false};function tn(e){return St(function(){return Oo(e)},[])}var Vs,fy=[],Tx=function(e){queueMicrotask(function(){queueMicrotask(e);});};function Mx(){xx(function(){for(var e;e=fy.shift();)Vs.call(e);});}function hy(){fy.push(this)===1&&(Ht.requestAnimationFrame||Tx)(Mx);}var Ix=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ql={exports:{}},Rx=Ql.exports,Tp;function Ex(){return Tp||(Tp=1,(function(e,t){(function(n,r){e.exports=r();})(Rx,(function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="minute",l="hour",c="day",h="week",u="month",m="quarter",g="year",y="date",b="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var le=["th","st","nd","rd"],Q=G%100;return "["+G+(le[(Q-20)%10]||le[Q]||le[0])+"]"}},T=function(G,le,Q){var ce=String(G);return !ce||ce.length>=le?G:""+Array(le+1-ce.length).join(Q)+G},P={s:T,z:function(G){var le=-G.utcOffset(),Q=Math.abs(le),ce=Math.floor(Q/60),me=Q%60;return (le<=0?"+":"-")+T(ce,2,"0")+":"+T(me,2,"0")},m:function G(le,Q){if(le.date()<Q.date())return -G(Q,le);var ce=12*(Q.year()-le.year())+(Q.month()-le.month()),me=le.clone().add(ce,u),pe=Q-me<0,we=le.clone().add(ce+(pe?-1:1),u);return +(-(ce+(Q-me)/(pe?me-we:we-me))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return {M:u,y:g,w:h,d:c,D:y,h:l,m:s,s:i,ms:a,Q:m}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},N="en",I={};I[N]=M;var O="$isDayjsObject",U=function(G){return G instanceof $||!(!G||!G[O])},E=function G(le,Q,ce){var me;if(!le)return N;if(typeof le=="string"){var pe=le.toLowerCase();I[pe]&&(me=pe),Q&&(I[pe]=Q,me=pe);var we=le.split("-");if(!me&&we.length>1)return G(we[0])}else {var z=le.name;I[z]=le,me=z;}return !ce&&me&&(N=me),me||!ce&&N},v=function(G,le){if(U(G))return G.clone();var Q=typeof le=="object"?le:{};return Q.date=G,Q.args=arguments,new $(Q)},L=P;L.l=E,L.i=U,L.w=function(G,le){return v(G,{locale:le.$L,utc:le.$u,x:le.$x,$offset:le.$offset})};var $=(function(){function G(Q){this.$L=E(Q.locale,null,true),this.parse(Q),this.$x=this.$x||Q.x||{},this[O]=true;}var le=G.prototype;return le.parse=function(Q){this.$d=(function(ce){var me=ce.date,pe=ce.utc;if(me===null)return new Date(NaN);if(L.u(me))return new Date;if(me instanceof Date)return new Date(me);if(typeof me=="string"&&!/Z$/i.test(me)){var we=me.match(k);if(we){var z=we[2]-1||0,ae=(we[7]||"0").substring(0,3);return pe?new Date(Date.UTC(we[1],z,we[3]||1,we[4]||0,we[5]||0,we[6]||0,ae)):new Date(we[1],z,we[3]||1,we[4]||0,we[5]||0,we[6]||0,ae)}}return new Date(me)})(Q),this.init();},le.init=function(){var Q=this.$d;this.$y=Q.getFullYear(),this.$M=Q.getMonth(),this.$D=Q.getDate(),this.$W=Q.getDay(),this.$H=Q.getHours(),this.$m=Q.getMinutes(),this.$s=Q.getSeconds(),this.$ms=Q.getMilliseconds();},le.$utils=function(){return L},le.isValid=function(){return this.$d.toString()!==b},le.isSame=function(Q,ce){var me=v(Q);return this.startOf(ce)<=me&&me<=this.endOf(ce)},le.isAfter=function(Q,ce){return v(Q)<this.startOf(ce)},le.isBefore=function(Q,ce){return this.endOf(ce)<v(Q)},le.$g=function(Q,ce,me){return L.u(Q)?this[ce]:this.set(me,Q)},le.unix=function(){return Math.floor(this.valueOf()/1e3)},le.valueOf=function(){return this.$d.getTime()},le.startOf=function(Q,ce){var me=this,pe=!!L.u(ce)||ce,we=L.p(Q),z=function(H,se){var _e=L.w(me.$u?Date.UTC(me.$y,se,H):new Date(me.$y,se,H),me);return pe?_e:_e.endOf(c)},ae=function(H,se){return L.w(me.toDate()[H].apply(me.toDate("s"),(pe?[0,0,0,0]:[23,59,59,999]).slice(se)),me)},Le=this.$W,fe=this.$M,Pe=this.$D,it="set"+(this.$u?"UTC":"");switch(we){case g:return pe?z(1,0):z(31,11);case u:return pe?z(1,fe):z(0,fe+1);case h:var X=this.$locale().weekStart||0,ne=(Le<X?Le+7:Le)-X;return z(pe?Pe-ne:Pe+(6-ne),fe);case c:case y:return ae(it+"Hours",0);case l:return ae(it+"Minutes",1);case s:return ae(it+"Seconds",2);case i:return ae(it+"Milliseconds",3);default:return this.clone()}},le.endOf=function(Q){return this.startOf(Q,false)},le.$set=function(Q,ce){var me,pe=L.p(Q),we="set"+(this.$u?"UTC":""),z=(me={},me[c]=we+"Date",me[y]=we+"Date",me[u]=we+"Month",me[g]=we+"FullYear",me[l]=we+"Hours",me[s]=we+"Minutes",me[i]=we+"Seconds",me[a]=we+"Milliseconds",me)[pe],ae=pe===c?this.$D+(ce-this.$W):ce;if(pe===u||pe===g){var Le=this.clone().set(y,1);Le.$d[z](ae),Le.init(),this.$d=Le.set(y,Math.min(this.$D,Le.daysInMonth())).$d;}else z&&this.$d[z](ae);return this.init(),this},le.set=function(Q,ce){return this.clone().$set(Q,ce)},le.get=function(Q){return this[L.p(Q)]()},le.add=function(Q,ce){var me,pe=this;Q=Number(Q);var we=L.p(ce),z=function(fe){var Pe=v(pe);return L.w(Pe.date(Pe.date()+Math.round(fe*Q)),pe)};if(we===u)return this.set(u,this.$M+Q);if(we===g)return this.set(g,this.$y+Q);if(we===c)return z(1);if(we===h)return z(7);var ae=(me={},me[s]=r,me[l]=o,me[i]=n,me)[we]||1,Le=this.$d.getTime()+Q*ae;return L.w(Le,this)},le.subtract=function(Q,ce){return this.add(-1*Q,ce)},le.format=function(Q){var ce=this,me=this.$locale();if(!this.isValid())return me.invalidDate||b;var pe=Q||"YYYY-MM-DDTHH:mm:ssZ",we=L.z(this),z=this.$H,ae=this.$m,Le=this.$M,fe=me.weekdays,Pe=me.months,it=me.meridiem,X=function(se,_e,ve,Ye){return se&&(se[_e]||se(ce,pe))||ve[_e].slice(0,Ye)},ne=function(se){return L.s(z%12||12,se,"0")},H=it||function(se,_e,ve){var Ye=se<12?"AM":"PM";return ve?Ye.toLowerCase():Ye};return pe.replace(S,(function(se,_e){return _e||(function(ve){switch(ve){case "YY":return String(ce.$y).slice(-2);case "YYYY":return L.s(ce.$y,4,"0");case "M":return Le+1;case "MM":return L.s(Le+1,2,"0");case "MMM":return X(me.monthsShort,Le,Pe,3);case "MMMM":return X(Pe,Le);case "D":return ce.$D;case "DD":return L.s(ce.$D,2,"0");case "d":return String(ce.$W);case "dd":return X(me.weekdaysMin,ce.$W,fe,2);case "ddd":return X(me.weekdaysShort,ce.$W,fe,3);case "dddd":return fe[ce.$W];case "H":return String(z);case "HH":return L.s(z,2,"0");case "h":return ne(1);case "hh":return ne(2);case "a":return H(z,ae,true);case "A":return H(z,ae,false);case "m":return String(ae);case "mm":return L.s(ae,2,"0");case "s":return String(ce.$s);case "ss":return L.s(ce.$s,2,"0");case "SSS":return L.s(ce.$ms,3,"0");case "Z":return we}return null})(se)||we.replace(":","")}))},le.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},le.diff=function(Q,ce,me){var pe,we=this,z=L.p(ce),ae=v(Q),Le=(ae.utcOffset()-this.utcOffset())*r,fe=this-ae,Pe=function(){return L.m(we,ae)};switch(z){case g:pe=Pe()/12;break;case u:pe=Pe();break;case m:pe=Pe()/3;break;case h:pe=(fe-Le)/6048e5;break;case c:pe=(fe-Le)/864e5;break;case l:pe=fe/o;break;case s:pe=fe/r;break;case i:pe=fe/n;break;default:pe=fe;}return me?pe:L.a(pe)},le.daysInMonth=function(){return this.endOf(u).$D},le.$locale=function(){return I[this.$L]},le.locale=function(Q,ce){if(!Q)return this.$L;var me=this.clone(),pe=E(Q,ce,true);return pe&&(me.$L=pe),me},le.clone=function(){return L.w(this.$d,this)},le.toDate=function(){return new Date(this.valueOf())},le.toJSON=function(){return this.isValid()?this.toISOString():null},le.toISOString=function(){return this.$d.toISOString()},le.toString=function(){return this.$d.toUTCString()},G})(),xe=$.prototype;return v.prototype=xe,[["$ms",a],["$s",i],["$m",s],["$H",l],["$W",c],["$M",u],["$y",g],["$D",y]].forEach((function(G){xe[G[1]]=function(le){return this.$g(le,G[0],G[1])};})),v.extend=function(G,le){return G.$i||(G(le,$,v),G.$i=true),v},v.locale=E,v.isDayjs=U,v.unix=function(G){return v(1e3*G)},v.en=I[N],v.Ls=I,v.p={},v}));})(Ql)),Ql.exports}var Ax=Ex();const zs=py(Ax),Wd="twe_diagnostic_capture_enabled_v1",gc="__twe_diagnostic_parser_events_v1",_c="__twe_diagnostic_db_events_v1",yc="__twe_diagnostic_interaction_events_v1",Xf="twe:diagnostic-event-v1",Mp=500;function nl(){return globalThis}function Dx(e,t=false){try{if(typeof localStorage>"u")return t;const n=localStorage.getItem(e);return n===null?t:n==="1"||n==="true"}catch{return t}}function Px(e,t){try{if(typeof localStorage>"u")return;localStorage.setItem(e,t?"1":"0");}catch{}}function Zf(e,t){const n=nl(),r=Array.isArray(n[e])?n[e]:[];if(r.push(t),r.length>Mp&&r.splice(0,r.length-Mp),n[e]=r,typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(Xf,{detail:{key:e}}));}catch{}}function Ur(){const e=nl(),t=e.__twe_diagnostic_capture_enabled_v1;if(typeof t=="boolean")return t;const n=Dx(Wd,false);return e.__twe_diagnostic_capture_enabled_v1=n,n}function my(e){const t=nl();if(t.__twe_diagnostic_capture_enabled_v1=e,Px(Wd,e),typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(Xf,{detail:{key:Wd,enabled:e}}));}catch{}}function Pu(e){Ur()&&Zf(gc,e);}function Ox(e){Ur()&&Zf(_c,e);}function Lx(e){Ur()&&Zf(yc,e);}function Nx(){const e=nl();return {parser:Array.isArray(e[gc])?[...e[gc]]:[],db:Array.isArray(e[_c])?[...e[_c]]:[],interaction:Array.isArray(e[yc])?[...e[yc]]:[]}}function gy(){const e=nl();e[gc]=[],e[_c]=[],e[yc]=[];}const Ip={eventName:Xf},bc=Oo([]),Fx=200,$x=400,Bx="twe_console_info_v1",_y="twe_console_verbose_v1";function Yd(e){if(!e)return false;const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"||t==="on"}function Ux(){try{if(Yd(localStorage.getItem(_y)))return !0}catch{}try{if(Yd(localStorage.getItem(Bx)))return !0}catch{}return false}function yy(){try{return Yd(localStorage.getItem(_y))}catch{return false}}function jx(){return Ur()||yy()?$x:Fx}class Hx{constructor(){be(this,"index",0);be(this,"buffer",[]);be(this,"bufferTimer",null);}info(t,...n){Ux()&&console.info("[twitter-web-exporter]",t,...n),this.writeBuffer({type:"info",line:t,index:this.index++});}warn(t,...n){console.warn("[twitter-web-exporter]",t,...n),this.writeBuffer({type:"warn",line:t,index:this.index++});}error(t,...n){console.error("[twitter-web-exporter]",t,...n),this.writeBuffer({type:"error",line:t,index:this.index++});}errorWithBanner(t,n,...r){this.error(`${t} (Message: ${(n==null?void 0:n.message)??"none"})
This may be a problem caused by Twitter updates.
Please file an issue on GitHub:
https://github.com/kmccleary3301/scrollmark/issues`,...r);}debug(...t){yy()&&console.debug("[twitter-web-exporter]",...t);}writeBuffer(t){this.buffer.push(t),this.bufferTimer&&clearTimeout(this.bufferTimer),this.bufferTimer=window.setTimeout(()=>{this.bufferTimer=null,this.flushBuffer();},0);}flushBuffer(){const t=[...bc.value,...this.buffer],n=jx();bc.value=t.length>n?t.slice(t.length-n):t,this.buffer=[];}}const Ae=new Hx;function qx(e){try{return JSON.parse(e)}catch(t){return Ae.error(t.message),null}}function xn(e){const t=tn(e),n=r=>{t.value=r;};return [t.value,n,t]}function Tr(e=false){const t=tn(e),n=()=>{t.value=!t.value;};return [t.value,n,t]}function on(...e){return e.filter(Boolean).join(" ")}function Vx(e,t){return JSON.stringify(e)===JSON.stringify(t)}function ci(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function zx(e){if(!e)return null;try{const t=new URL(e);return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.href}catch{return null}}function wc(e,t){if(!(t!=null&&t.length))return ci(e);let n=0,r="";const o=[...t].filter(a=>Array.isArray(a.indices)&&a.indices.length>=2).map(a=>({...a,start:Math.max(0,Number(a.indices[0])||0),end:Math.max(0,Number(a.indices[1])||0)})).filter(a=>a.end>a.start&&a.start<e.length).sort((a,i)=>a.start-i.start);for(const a of o){const i=Math.max(n,a.start),s=Math.min(e.length,a.end);i>n&&(r+=ci(e.slice(n,i)));const l=e.slice(i,s),c=zx(a.expanded_url??a.url);c?r+=`<a class="link" target="_blank" rel="noopener noreferrer" href="${ci(c)}">${ci(a.display_url??l)}</a>`:r+=ci(l),n=s;}return n<e.length&&(r+=ci(e.slice(n))),r}function Ni(e){if(!e)return zs(0);const t=e.replace(/^\w+ (.*)$/,"$1");return zs(t,"MMM DD HH:mm:ss ZZ YYYY","en")}function Jr(e,t){return (typeof e=="number"||typeof e=="string")&&(e=zs(e)),e.format(t)}function Rp(e){if(!e)return null;const{day:t,month:n,year:r}=e,o=zs().set("year",r??0).set("month",n-1).set("date",t);return r?o.format("MMM DD, YYYY"):o.format("MMM DD")}function by(e){if(typeof e!="number"||Number.isNaN(e))return "N/A";const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return `${n}:${r.toString().padStart(2,"0")}`}const Kx="scrollmark",Gx="Scrollmark: local-first X/Twitter research archive, search, and portable bundle export.",Wx="1.5.0",Yx="Kyle McCleary",Jx="MIT",Xx="https://github.com/kmccleary3301/scrollmark",Zx="https://github.com/kmccleary3301/scrollmark/issues",Qx="module",e0={clean:"rm -rf dist",dev:"vite",build:"tsc && vite build","build:store":"tsc && SCROLLMARK_BUILD_TARGET=store vite build","build:e2e":"tsc && TWE_BUILD_VARIANT=e2e vite build","build:chrome-e2e":"tsc && TWE_BUILD_VARIANT=chrome-e2e vite build","sync:store-artifact":"mkdir -p store && cp dist/scrollmark.store.user.js store/scrollmark.user.js","build:all":"npm run clean && npm run build && npm run build:store && npm run sync:store-artifact && npm run build:e2e && npm run build:chrome-e2e",prepare:"husky",lint:"eslint .","check:metadata":"node scripts/check-userscript-metadata.mjs","perf:large-count-smoke":"node scripts/large-count-smoke.mjs","test:result-source-contract":"tsx e2e/perf/result_source_contract_harness.ts","test:export-stream-integrity":"tsx e2e/perf/export_stream_integrity_harness.ts","test:db-source-live":"tsx e2e/perf/db_source_live_harness.ts","test:db-migration-compat":"tsx e2e/perf/db_migration_compat_harness.ts","test:write-indexing-regression":"tsx e2e/perf/write_indexing_regression_harness.ts","test:synthetic-seed-matrix":"tsx e2e/perf/synthetic_seed_matrix_harness.ts","test:recovered-db-import":"tsx e2e/perf/recovered_db_import_harness.ts","test:recovered-db-browser":"node e2e/perf/recovered_db_browser_harness.mjs","test:bookmarks-strict-folder":"tsx e2e/perf/bookmarks_strict_folder_harness.ts","test:result-set-lookup":"tsx e2e/perf/result_set_lookup_harness.ts","test:search-phrase-quality":"tsx e2e/perf/search_phrase_quality_harness.ts","test:search-performance":"tsx e2e/perf/search_performance_harness.ts","test:app-diagnostics-smoke":"node e2e/perf/app_diagnostics_smoke.mjs","test:search-threshold-guard":"tsx e2e/perf/search_threshold_guard_harness.ts","test:search-threshold-app":"node e2e/perf/search_threshold_app_harness.mjs","test:search-cancellation-app":"node e2e/perf/search_cancellation_app_harness.mjs","test:folder-search-app":"node e2e/perf/folder_search_app_harness.mjs","test:deep-scroll-app":"node e2e/perf/deep_scroll_app_harness.mjs","test:variable-height-table":"node e2e/perf/variable_height_table_harness.mjs","test:small-dataset-workflow":"node e2e/perf/small_dataset_workflow_harness.mjs","test:folder-source-stress":"node e2e/perf/folder_source_stress_harness.mjs","test:media-masonry-app":"node e2e/perf/media_masonry_app_harness.mjs","test:export-memory-app":"node e2e/perf/export_memory_app_harness.mjs","test:export-modal-app":"node e2e/perf/export_modal_app_harness.mjs","test:export-metadata":"tsx e2e/export_metadata_harness.ts","test:twitter-article-markdown":"tsx e2e/twitter_article_markdown_harness.ts","test:twitter-article-dom":"node e2e/twitter_article_dom_harness.mjs",commitlint:"commitlint --edit",changelog:"git-cliff -o CHANGELOG.md",preview:"vite preview","test:browser-safety-shell":"tsx e2e/perf/browser_safety_shell_harness.ts","test:browser-safety-shell-smoke":"node e2e/perf/browser_safety_shell_smoke.mjs","test:neutral-contracts":"python3 contracts/scrollmark/v1/harness.py","test:durability-coordinator":"tsx e2e/perf/durability_coordinator_harness.ts","test:generation-rebuild":"tsx e2e/perf/generation_rebuild_harness.ts","test:companion-bundle-bridge":"tsx e2e/perf/companion_bundle_bridge_harness.ts","test:snapshot-recovery-browser":"tsx e2e/perf/snapshot_recovery_browser_harness.ts","test:durability-scale":"tsx e2e/perf/durability_scale_harness.ts","test:reconciliation-manifest":"tsx e2e/perf/reconciliation_manifest_harness.ts","test:persistent-profile-recovery":"tsx e2e/perf/persistent_profile_recovery_harness.ts","release:durability":"python3 scripts/durability_release.py"},t0={"@preact/signals":"2.0.0","@preact/signals-core":"1.8.0","@tabler/icons-preact":"3.31.0","@tanstack/table-core":"8.21.2",dayjs:"1.11.13",dexie:"4.0.11","dexie-export-import":"4.1.4",fflate:"^0.8.2","file-saver-es":"2.0.5",i18next:"24.2.3",preact:"10.26.4"},n0={"@commitlint/cli":"^19.8.0","@commitlint/config-conventional":"^19.8.0","@eslint/js":"^9.23.0","@preact/preset-vite":"^2.10.1","@types/file-saver-es":"^2.0.3","@types/node":"^22.14.0",autoprefixer:"^10.4.21",daisyui:"^4",eslint:"^9.23.0","eslint-config-prettier":"^10.1.1","eslint-plugin-prettier":"^5.2.6","fake-indexeddb":"^6.2.5","git-cliff":"^2.8.0",husky:"^9.1.7",playwright:"^1.60.0",postcss:"^8.5.3","postcss-prefix-selector":"^2.1.1","postcss-rem-to-pixel-next":"^5.0.3",tailwindcss:"^3",tsx:"^4.22.2",typescript:"^5.8.2","typescript-eslint":"^8.29.0",vite:"^6.2.5","vite-plugin-i18next-loader":"^3.1.2","vite-plugin-monkey":"^5.0.8"},Br={name:Kx,description:Gx,version:Wx,author:Yx,license:Jx,homepage:Xx,bugs:Zx,private:true,type:Qx,scripts:e0,dependencies:t0,devDependencies:n0},ec={theme:"system",debug:false,showControlPanel:true,disabledExtensions:["HomeTimelineModule"],dateTimeFormat:"YYYY-MM-DD HH:mm:ss Z",filenamePattern:"{screen_name}_{id}_{type}_{num}_{date}.{ext}",exportColumnMode:"all",exportColumnFields:[],exportColumnSignature:"",exportMetadataMode:"none",exportMetadataFields:[],bundleIncludeOriginalMetadata:false,language:"",dedicatedDbForAccounts:false,safeMode:false,hookMode:"both",repairMode:"watchdog",directMessagesCaptureEnabled:false,rawCaptureEncryptedStorageReady:false,rawCapturePolicyPublicEnabled:true,rawCapturePolicySensitiveEnabled:true,rawCapturePolicyDmEnabled:true,rawCaptureEnabled:true,rawCaptureStreamEnabled:false,rawCaptureDaemonUrl:"http://127.0.0.1:8754",version:Br.version},r0=["system","cupcake","dark","emerald","cyberpunk","valentine","lofi","dracula","cmyk","business","winter"],Ep=Br.name,o0=new Set(["RetweetersModule","ListTimelineModule","ListSubscribersModule","ListMembersModule","CommunityMembersModule","CommunityTimelineModule"]);function Ap(e){const n=(Array.isArray(e)?e.filter(r=>typeof r=="string"):[]).filter(r=>!o0.has(r));return Array.from(new Set(n))}class a0{constructor(){be(this,"appOptions",{...ec});be(this,"previous",{...ec});be(this,"signal",new zn(0));this.loadAppOptions();}get(t,n){return this.appOptions[t]??n}set(t,n){this.appOptions[t]=n,this.saveAppOptions();}loadAppOptions(){this.appOptions={...this.appOptions,...qx(localStorage.getItem(Ep)||"{}")},this.appOptions.disabledExtensions=Ap(this.appOptions.disabledExtensions);const t=this.appOptions.version??"",n=ec.version;n.startsWith("1.1")&&t.startsWith("1.0")&&(this.appOptions.disabledExtensions=[...Ap(this.appOptions.disabledExtensions),"HomeTimelineModule","ListTimelineModule"],Ae.info(`App options migrated from v${t} to v${n}`),setTimeout(()=>this.saveAppOptions(),0)),this.previous={...this.appOptions},Ae.info("App options loaded",this.appOptions),this.signal.value++;}saveAppOptions(){const t=this.previous,n={...this.appOptions,version:Br.version};Vx(t,n)||(this.appOptions=n,localStorage.setItem(Ep,JSON.stringify(this.appOptions)),this.previous={...this.appOptions},Ae.debug("App options saved",this.appOptions),this.signal.value++);}}const et=new a0,wy={en:{name:"English",nameEn:"English",test:e=>/^en/.test(e)},"zh-Hans":{name:"简体中文",nameEn:"Simplified Chinese",test:e=>/^zh/.test(e)},es:{name:"Español",nameEn:"Spanish",test:e=>/^es/.test(e)},hi:{name:"हिन्दी",nameEn:"Hindi",test:e=>/^hi/.test(e)},fr:{name:"Français",nameEn:"French",test:e=>/^fr/.test(e)},ar:{name:"العربية",nameEn:"Arabic",test:e=>/^ar/.test(e)},bn:{name:"বাংলা",nameEn:"Bengali",test:e=>/^bn/.test(e)},"pt-BR":{name:"Português (Brasil)",nameEn:"Portuguese",test:e=>/^pt/.test(e)},ru:{name:"Русский",nameEn:"Russian",test:e=>/^ru/.test(e)},ur:{name:"اردو",nameEn:"Urdu",test:e=>/^ur/.test(e)},id:{name:"Bahasa Indonesia",nameEn:"Indonesian",test:e=>/^id/.test(e)},ja:{name:"日本語",nameEn:"Japanese",test:e=>/^ja/.test(e)}};function vy(){const e=window.navigator.language||"en";for(const[t,n]of Object.entries(wy))if(n.test(e))return t;return e}const i0={type:"languageDetector",detect:function(){return et.get("language")||vy()}},s0="twe_i18n_debug_v1";function l0(e){if(!e)return false;const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"||t==="on"}function c0(){try{return l0(localStorage.getItem(s0))}catch{return false}}function u0(){return $n.isInitialized||($n.on("languageChanged",e=>{et.get("language")||et.set("language",e);}),$n.use(i0).init({initImmediate:true,defaultNS:"common",fallbackLng:"en",nsSeparator:"::",interpolation:{escapeValue:false},debug:c0(),resources:vx})),$n}function er(e){const t=u0(),[n,r]=$e(()=>t.getFixedT(null,e??null)),o=bt(true),a=bt(e);return ot(()=>{o.current=true,a.current!==e&&(a.current=e,r(()=>t.getFixedT(null,e??null)));function i(){o.current&&r(()=>t.getFixedT(null,e??null));}return t.on("languageChanged",i),()=>{o.current=false,t.off("languageChanged",i);}},[e]),{t:n,i18n:t}}function gt({i18nKey:e,ns:t="exporter"}){const{t:n}=er(t);return f("span",{children:n(e)})}class Ts extends Zr{constructor(){super(...arguments);be(this,"state",{error:null});}static getDerivedStateFromError(n){return {error:n.message}}componentDidCatch(n){Ae.error(n.message,n),this.setState({error:n.message});}render(){return this.state.error?f("div",{class:"alert alert-error p-2",children:[f(Sk,{}),f("div",{children:[f("h3",{class:"font-bold leading-normal",children:f(gt,{ns:"common",i18nKey:"Something went wrong."})}),f("p",{class:"text-xs",children:[f(gt,{ns:"common",i18nKey:"Error:"})," ",this.state.error]})]})]}):this.props.children}}var vc=typeof GM_registerMenuCommand<"u"?GM_registerMenuCommand:void 0,d0=typeof unsafeWindow<"u"?unsafeWindow:void 0;class f0{dispatch(t,n,r){t.filter(o=>o.enabled).forEach(o=>{try{const a=o.intercept();if(!a)return;const i=Date.now();Pu({ts:i,extension:o.name,phase:"claimed",request_id:n.requestId,method:n.method,url:n.url,status:r.status}),a(n,r,o),Pu({ts:Date.now(),extension:o.name,phase:"completed",request_id:n.requestId,method:n.method,url:n.url,status:r.status,duration_ms:Math.max(0,Date.now()-i)});}catch(a){Pu({ts:Date.now(),extension:o.name,phase:"error",request_id:n.requestId,method:n.method,url:n.url,status:r.status,error:a instanceof Error?a.message:String(a)}),Ae.error(`Interceptor error (${o.name}):`,a);}});}}const h0="twe_safe_mode_v1",p0="twe_hook_mode_v1",m0="twe_repair_mode_v1",g0="twe_debug_disable_xhr_open_wrap_v1",_0="twe_debug_disable_xhr_send_wrap_v1",y0="twe_debug_disable_xhr_load_listener_v1",b0="twe_debug_disable_fetch_wrap_v1",w0="twe_debug_disable_expando_meta_v1",v0="twe_debug_force_call_not_apply_v1",k0="twe_debug_hook_diag_v1",x0="twe_console_verbose_v1",S0=6,Dp=1100,C0=6e4,Pp=5;function T0(e){return e==="xhr"||e==="fetch"||e==="off"?e:"both"}function M0(e){return e==="off"?"off":"watchdog"}function Ko(e){try{return typeof localStorage>"u"?null:localStorage.getItem(e)}catch{return null}}function Ou(e,t){try{if(typeof localStorage>"u")return;localStorage.setItem(e,t);}catch{}}function Go(e){if(!e)return false;const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"||t==="on"}function Op(){const e=Go(Ko(k0)),t=Go(Ko(x0));return {disableXhrOpenWrap:Go(Ko(g0)),disableXhrSendWrap:Go(Ko(_0)),disableXhrLoadListener:Go(Ko(y0)),disableFetchWrap:Go(Ko(b0)),disableExpandoMeta:Go(Ko(w0)),forceCallNotApply:Go(Ko(v0)),hookDiag:e&&t}}function Lp(){const e=!!et.get("safeMode",false),t=T0(et.get("hookMode","both")),n=M0(et.get("repairMode","watchdog"));return {safeMode:e,hookMode:t,repairMode:n}}class I0{constructor(t){be(this,"runtimeModes",Lp());be(this,"hookDebugConfig",Op());be(this,"hookDiagCounters",Object.create(null));be(this,"runtimeModeReason","");be(this,"hookRepairInterval",null);be(this,"hookBootProbeTimeout",null);be(this,"hookRepairBackoffMs",Dp);be(this,"hookRepairFailures",0);this.host=t;}initialize(){if(this.refreshRuntimeModes(),this.runtimeModes.hookMode!=="off")try{this.host.installPageMessageBridge();}catch(t){this.enableSafeMode("install-page-message-bridge-failed",t);}if(!this.runtimeModes.safeMode&&this.runtimeModes.hookMode!=="off")try{this.host.installBookmarkContextTracking();}catch(t){const n=t instanceof Error?`${t.name}: ${t.message}`:`unknown error: ${String(t)}`;Ae.warn(`Bookmark context tracking install failed; continuing without tracker (${n})`);}try{this.isHookModeEnabled("xhr")&&this.host.installHttpHooks(),this.isHookModeEnabled("fetch")&&this.host.installFetchHooks();const t=this.host.runHookSelfTest();t.ok?!this.runtimeModes.safeMode&&this.runtimeModes.repairMode!=="off"&&this.startHookRepairLoop():this.enableSafeMode("hook-self-test-failed",t.error),this.runtimeModes.safeMode||this.startFetchHookBootProbe();}catch(t){this.enableSafeMode("hook-install-failed",t);}}dispose(){this.clearHookRepairLoop(),this.clearFetchHookBootProbe(),this.host.uninstallHooks();}applyRuntimeModesFromOptions(){const t={...this.runtimeModes};this.refreshRuntimeModes();const n=this.runtimeModes;if(!(t.safeMode===n.safeMode&&t.hookMode===n.hookMode&&t.repairMode===n.repairMode)){if(n.safeMode||(this.runtimeModeReason=""),n.hookMode==="off"){this.host.uninstallHooks(),this.clearHookRepairLoop(),this.clearFetchHookBootProbe();return}if(n.safeMode){this.host.uninstallHooks(),this.clearHookRepairLoop(),this.clearFetchHookBootProbe();try{this.host.installPageMessageBridge(),this.isHookModeEnabled("xhr")&&this.host.installHttpHooks(!0),this.isHookModeEnabled("fetch")&&this.host.installFetchHooks(!0);}catch(r){Ae.warn("Failed to reconfigure lightweight safe mode hooks",r??"");}return}try{this.host.installPageMessageBridge(),this.host.installBookmarkContextTracking(),this.isHookModeEnabled("xhr")&&this.host.installHttpHooks(!0),this.isHookModeEnabled("fetch")&&this.host.installFetchHooks(!0);const r=this.host.runHookSelfTest();if(!r.ok){this.runtimeModeReason="hook-self-test-failed",Ae.warn("Hook self-test failed after runtime reconfigure",r.error??""),this.publishRuntimeModes({enabledAt:Date.now(),error:r.error?String(r.error):void 0});return}this.runtimeModes.repairMode!=="off"?this.startHookRepairLoop():this.clearHookRepairLoop(),this.startFetchHookBootProbe();}catch(r){this.enableSafeMode("hook-reconfigure-failed",r);}}}getRuntimeModesSnapshot(){return {safeMode:this.runtimeModes.safeMode,hookMode:this.runtimeModes.hookMode,repairMode:this.runtimeModes.repairMode,reason:this.runtimeModeReason||void 0}}getHookStatsSnapshot(){return this.host.readHookStatsSnapshot()}getRuntimeModes(){return this.runtimeModes}getHookDebugConfig(){return this.hookDebugConfig}refreshHookDebugConfig(){this.hookDebugConfig=Op();}isHookModeEnabled(t){return this.runtimeModes.hookMode==="off"?false:this.runtimeModes.hookMode==="both"?true:this.runtimeModes.hookMode===t}emitHookDiag(t,n,r){const o=!!(r!=null&&r.force);if(!this.hookDebugConfig.hookDiag)return;const a=(this.hookDiagCounters[t]??0)+1;this.hookDiagCounters[t]=a,!(!o&&a>S0)&&Ae.info(`TWE_DIAG ${t}`,{...n,count:a,safeMode:this.runtimeModes.safeMode,hookMode:this.runtimeModes.hookMode,repairMode:this.runtimeModes.repairMode,forceCallNotApply:this.hookDebugConfig.forceCallNotApply,disableExpandoMeta:this.hookDebugConfig.disableExpandoMeta,ts:Date.now()});}enableSafeMode(t,n){this.clearFetchHookBootProbe(),this.runtimeModes.safeMode=true,this.runtimeModeReason=t,this.persistRuntimeModes(),this.publishRuntimeModes({enabledAt:Date.now(),error:n?String(n):void 0}),this.host.uninstallHooks(),this.clearHookRepairLoop(),Ae.error(`Hook safe mode enabled (${t})`,n??"");}startFetchHookBootProbe(t=1200){this.runtimeModes.safeMode||!this.isHookModeEnabled("fetch")||(this.clearFetchHookBootProbe(),this.hookBootProbeTimeout=setTimeout(()=>{this.hookBootProbeTimeout=null,!(this.runtimeModes.safeMode||!this.isHookModeEnabled("fetch"))&&this.host.runFetchHookBootProbePass();},t));}startHookRepairLoop(){if(this.runtimeModes.safeMode||this.runtimeModes.repairMode==="off"||this.hookRepairInterval!==null)return;const t=r=>{this.hookRepairInterval=setTimeout(()=>{this.hookRepairInterval=null,n();},r);},n=()=>{if(!(this.runtimeModes.safeMode||this.runtimeModes.repairMode==="off")){try{const r=this.host.runHookRepairPass();if(!r.ok){this.enableSafeMode("hook-repair-self-test-failed",r.error);return}this.hookRepairFailures=0,this.hookRepairBackoffMs=Dp;}catch(r){if(this.hookRepairFailures+=1,this.hookRepairBackoffMs=Math.min(this.hookRepairBackoffMs*2,C0),Ae.warn(`Hook repair failed (${this.hookRepairFailures}/${Pp})`,r),this.hookRepairFailures>=Pp){this.enableSafeMode("hook-repair-failure-limit",r);return}}t(this.hookRepairBackoffMs);}};t(0);}clearHookRepairLoop(){this.hookRepairInterval!==null&&(clearTimeout(this.hookRepairInterval),this.hookRepairInterval=null);}clearFetchHookBootProbe(){this.hookBootProbeTimeout!==null&&(clearTimeout(this.hookBootProbeTimeout),this.hookBootProbeTimeout=null);}persistRuntimeModes(){Ou(h0,this.runtimeModes.safeMode?"1":"0"),Ou(p0,this.runtimeModes.hookMode),Ou(m0,this.runtimeModes.repairMode);try{et.set("safeMode",this.runtimeModes.safeMode),et.set("hookMode",this.runtimeModes.hookMode),et.set("repairMode",this.runtimeModes.repairMode);}catch{}}publishRuntimeModes(t){}refreshRuntimeModes(){this.runtimeModes=Lp(),this.refreshHookDebugConfig(),this.persistRuntimeModes(),this.publishRuntimeModes();}}function ky(){try{return d0??null}catch{return null}}function xy(e){try{const t=e;return !(t!=null&&t.wrappedJSObject)||typeof t.wrappedJSObject!="object"?null:t.wrappedJSObject}catch{return null}}let Cl=null;function Ms(){if(Cl)return Cl;const e=ky();return Cl=xy(e)??e??(typeof window<"u"?window:null)??globalThis,Cl}const Fn=new Proxy({},{get(e,t){const n=Ms();return Reflect.get(n,t,n)},set(e,t,n){const r=Ms();return Reflect.set(r,t,n,r)}});function Sy(){try{return globalThis.exportFunction}catch{return}}const R0="__twe_mcp_hook_v1",ro="__twe_orig_xhr_open_v1",oo="__twe_orig_xhr_send_v1",ui="__twe_orig_fetch_v1",E0="__twe_bootstrap_error_v1",Is=45e3,A0=18e4,D0=6,P0=12,Cy=200,Do=3,O0="twitter-web-exporter-extension-manager-v1",L0=3,Ty=2600,N0=500,F0=120;function $0(){const e=ky();return {hasUnsafeWindow:!!e,hasWrappedJSObject:!!xy(e),hasExportFunction:!!Sy()}}function B0(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return (t>>>0).toString(16)}function U0(e,t,n,r){return `${e.toUpperCase()} ${t} ${n} ${B0(r)}`}function j0(e){const t=Date.now();if(e.size<=N0)return;const n=[...e.entries()].filter(([,r])=>t-r.at>Ty).sort((r,o)=>r[1].at-o[1].at);for(const[r]of n.slice(0,F0))e.delete(r);}function Lu(e){return {xhrMessages:0,fetchMessages:0,lastUrl:"",lastAt:0,loggedUrls:0,messagesTotal:0,messagesLegacyShape:0,messagesMissingContext:0,messagesRepairedAtBridge:0,messagesMissingBody:0,responsesProcessed:0,responsesSkippedDuplicate:0,lastMessageAt:0,activeInstanceId:e,rev:Do,repairCount:0,endpointStats:Object.create(null)}}let co={folderId:null,pageUrl:"",source:"startup",capturedAt:0},Qf=null,Np=[];const Jd=new WeakMap;function H0(){return {method:"GET",url:"",body:"",requestId:"",bookmarkContext:null,hooked:false}}function q0(e){const t=Jd.get(e);if(t)return t;const n=H0();return Jd.set(e,n),n}function Nu(e,t){if(t.disableExpandoMeta)return q0(e);const n=typeof e.__twe_req_method_v1=="string"?e.__twe_req_method_v1:"GET",r=typeof e.__twe_req_url_v1=="string"?e.__twe_req_url_v1:"",o=typeof e.__twe_req_body_v1=="string"?e.__twe_req_body_v1:"",a=typeof e.__twe_req_id_v1=="string"?e.__twe_req_id_v1:"",i=e.__twe_req_bookmark_context_v1&&typeof e.__twe_req_bookmark_context_v1=="object"?e.__twe_req_bookmark_context_v1:null,s=!!e.__twe_hooked_v1;return {method:n,url:r,body:o,requestId:a,bookmarkContext:i,hooked:s}}function Fu(e,t,n){if(t.disableExpandoMeta){Jd.set(e,n);return}e.__twe_req_method_v1=n.method,e.__twe_req_url_v1=n.url,e.__twe_req_body_v1=n.body,e.__twe_req_id_v1=n.requestId,e.__twe_req_bookmark_context_v1=n.bookmarkContext,e.__twe_hooked_v1=n.hooked;}function $u(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2]);case 4:return e.call(t,n[0],n[1],n[2],n[3]);default:return e.call(t,n[0],n[1],n[2],n[3],n[4])}}function V0(e,t,n){const r=n instanceof Error?`${n.name}: ${n.message}`:String(n),o=n instanceof Error?n.stack:void 0;return {message:r,stack:o,phase:e,instanceId:t,at:Date.now()}}function z0(){try{((t,n)=>{t&&typeof t=="object"&&delete t[n];})(globalThis,E0);}catch{}}function K0(e,t){if(!e||typeof e!="object")return t;const n=e;return {...n,xhrMessages:Number(n.xhrMessages)||0,fetchMessages:Number(n.fetchMessages)||0,lastUrl:typeof n.lastUrl=="string"?n.lastUrl:"",lastAt:Number(n.lastAt)||0,loggedUrls:Number(n.loggedUrls)||0,messagesTotal:Number(n.messagesTotal)||0,messagesLegacyShape:Number(n.messagesLegacyShape)||0,messagesMissingContext:Number(n.messagesMissingContext)||0,messagesRepairedAtBridge:Number(n.messagesRepairedAtBridge)||0,messagesMissingBody:Number(n.messagesMissingBody)||0,responsesProcessed:Number(n.responsesProcessed)||0,responsesSkippedDuplicate:Number(n.responsesSkippedDuplicate)||0,lastMessageAt:Number(n.lastMessageAt)||0,activeInstanceId:typeof n.activeInstanceId=="string"?n.activeInstanceId:t.activeInstanceId,rev:Number(n.rev)||Do,repairCount:Number(n.repairCount)||0,endpointStats:n.endpointStats||Object.create(null)}}function G0(e){if(typeof e!="function")return "";try{return Function.prototype.toString.call(e)}catch{return ""}}function di(e,t){if(!e||typeof e!="function")return false;const n=e;return n[t]?n.__twe_is_hook_revision_v1===Do:false}function kc(e,t){if(!e||typeof e!="function")return false;const n=e;if(n.__twe_is_hook_open_v1||n.__twe_is_hook_send_v1||n.__twe_is_hook_fetch_v1||n.__twe_orig_xhr_open_v1||n.__twe_orig_xhr_send_v1||n.__twe_orig_fetch_v1||t&&n[t])return true;const r=G0(e);return r?r.includes("__twe_mcp_hook_v1")||r.includes("__twe_is_hook_open_v1")||r.includes("__twe_is_hook_send_v1")||r.includes("__twe_is_hook_fetch_v1")||r.includes("__twe_is_hook_revision_v1")||r.includes("__twe_orig_xhr_open_v1")||r.includes("__twe_orig_xhr_send_v1")||r.includes("__twe_orig_fetch_v1")||r.includes("__twe_req_body_v1")||r.includes("__twe_req_url_v1")||r.includes("__twe_req_bookmark_context_v1"):false}const My=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;let Fp=0;function ki(){return Fp+=1,`${My}-${Fp}`}function W0(e){var n,r,o,a,i,s,l,c;if(!Array.isArray(e))return [];const t=[];for(const h of e){const u=h;u&&typeof u.requestId=="string"&&typeof u.ts=="number"&&typeof u.url=="string"&&t.push({requestId:u.requestId,ts:u.ts,method:typeof u.method=="string"?u.method:"GET",url:u.url,hasBody:!!u.hasBody,confidenceSource:typeof u.confidenceSource=="string"&&u.confidenceSource?u.confidenceSource:typeof((n=u.context)==null?void 0:n.source)=="string"?u.context.source:"unknown",context:{folderId:typeof((r=u.context)==null?void 0:r.folderId)=="string"?u.context.folderId:null,pageUrl:typeof((o=u.context)==null?void 0:o.pageUrl)=="string"?u.context.pageUrl:"",source:typeof((a=u.context)==null?void 0:a.source)=="string"?u.context.source:"unknown",capturedAt:typeof((i=u.context)==null?void 0:i.capturedAt)=="number"?u.context.capturedAt:Date.now(),requestId:typeof((s=u.context)==null?void 0:s.requestId)=="string"?u.context.requestId:void 0,routeSource:typeof((l=u.context)==null?void 0:l.routeSource)=="string"?u.context.routeSource:void 0,pageRouteUrl:typeof((c=u.context)==null?void 0:c.pageRouteUrl)=="string"?u.context.pageRouteUrl:void 0},normalizedRoute:typeof u.normalizedRoute=="string"?u.normalizedRoute:""});}return t.sort((h,u)=>u.ts-h.ts).slice(0,Cy)}function Y0(e){var s,l,c,h,u,m,g,y;const t=Date.now(),n={requestId:e.requestId||`${My}-${t}`,ts:Number.isFinite(e.ts)?e.ts:t,method:e.method||"GET",url:e.url||"",hasBody:!!e.hasBody,confidenceSource:typeof e.confidenceSource=="string"&&e.confidenceSource?e.confidenceSource:((s=e.context)==null?void 0:s.source)||"unknown",context:{folderId:((l=e.context)==null?void 0:l.folderId)??null,pageUrl:((c=e.context)==null?void 0:c.pageUrl)||"",source:((h=e.context)==null?void 0:h.source)||"unknown",capturedAt:Number.isFinite((u=e.context)==null?void 0:u.capturedAt)?e.context.capturedAt:t,requestId:(m=e.context)==null?void 0:m.requestId,routeSource:(g=e.context)==null?void 0:g.routeSource,pageRouteUrl:(y=e.context)==null?void 0:y.pageRouteUrl},normalizedRoute:e.normalizedRoute||""},r=W0(Np);r.unshift(n);const o=new Map;for(const b of r)o.has(b.requestId)||o.set(b.requestId,b);const a=Array.from(o.values()).slice(0,Cy).sort((b,k)=>k.ts-b.ts),i=Date.now()-Is*6;Np=a.filter(b=>!i||b.ts>=i);}function J0(e){const t={folderId:e.folderId,pageUrl:e.pageUrl||"",source:e.source||"lock",capturedAt:e.capturedAt||Date.now(),requestId:e.requestId,routeSource:e.routeSource,pageRouteUrl:e.pageRouteUrl};t.folderId&&(Qf=t);}function X0(e=Date.now()){const t=[Qf];for(const n of t){if(!n||typeof n!="object")continue;const r=n;if(typeof r.folderId!="string"||!r.folderId)continue;const o=typeof r.capturedAt=="number"&&Number.isFinite(r.capturedAt)?r.capturedAt:0;if(!(!o||e-o>A0))return {folderId:r.folderId,pageUrl:typeof r.pageUrl=="string"?r.pageUrl:"",source:typeof r.source=="string"?r.source:"lock",capturedAt:o,requestId:typeof r.requestId=="string"?r.requestId:void 0,routeSource:typeof r.routeSource=="string"?r.routeSource:void 0,pageRouteUrl:typeof r.pageRouteUrl=="string"?r.pageRouteUrl:void 0}}return null}function Z0(){Qf=null;}function Iy(e){return fa(e)||{folderId:null,pageUrl:e}}function Pa(e,t){if(typeof e=="function")try{const n=e;n[t]=!0,n.__twe_is_hook_revision_v1=Do;}catch{}}function Ry(e){const t=e,n={method:typeof t.method=="string"?t.method:"GET",url:typeof t.url=="string"?t.url:""};return typeof t.body=="string"&&(n.body=t.body),t.bookmarkContext!==void 0&&(n.bookmarkContext=t.bookmarkContext),n.bookmarkContext===void 0&&t.requestContext!==void 0&&(n.bookmarkContext=t.requestContext),typeof t.requestId=="string"&&t.requestId&&(n.requestId=t.requestId),typeof t.__twe_hook_revision_v1=="number"&&Number.isFinite(t.__twe_hook_revision_v1)&&(n.hookRevision=t.__twe_hook_revision_v1),n}function tc(e){const t=Ry(e),n=typeof t.requestId=="string"&&t.requestId.trim().length>0?t.requestId:ki(),r=typeof t.method=="string"&&t.method?t.method:"GET",o=typeof t.url=="string"?t.url:"",a=typeof t.body=="string"?t.body:"",i=Gc(t.bookmarkContext,{requestId:n,hasBody:a.length>0});return {method:r,url:o,body:a,bookmarkContext:i,requestId:n,hookRevision:Do,__twe_hook_revision_v1:Do}}function Q0(e){if(!e||typeof e!="object")return null;const t=e;return t.req&&typeof t.req=="object"?t.req:t}function eS(e){if(!e||typeof e!="object")return null;const t=e,n=t.req;return typeof t.__twe_msg_revision_v1=="number"?Number(t.__twe_msg_revision_v1):n&&typeof n=="object"&&typeof n.__twe_hook_revision_v1=="number"?Number(n.__twe_hook_revision_v1):null}function $p(){return {received:0,processed:0,skippedDuplicate:0,newUniqueTweets:0,legacyShape:0,missingContext:0,lastAt:0,lastStatus:0,lastUrl:""}}function tS(e){try{const n=new URL(e,"https://x.com").pathname.toLowerCase(),r=n.match(/\/graphql\/[^/]+\/([^/?#]+)/);if(r!=null&&r[1])return `graphql:${r[1]}`;const o=n.match(/\/i\/api\/1\.1\/([^/?#]+)/);if(o!=null&&o[1])return `api:${o[1]}`}catch{}return "other"}function nS(e){const t=new Set,n=/"rest_id"\s*:\s*"(\d{10,})"/g;for(;;){const r=n.exec(e);if(!r)break;r[1]&&t.add(r[1]);}return t.size}function Bp(e){try{if(!e)return;if(typeof e=="string")return e;if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams)return e.toString();if(typeof FormData<"u"&&e instanceof FormData)try{return [...e.entries()].map(([n,r])=>`${n}=${String(r).slice(0,200)}`).join("&")}catch{return}return typeof Blob<"u"&&e instanceof Blob?`blob:${e.type||"application/octet-stream"}:${e.size}`:void 0}catch{return}}function fa(e){try{const t=new URL(e,"https://x.com"),n=t.pathname.match(/\/bookmarks\/(\d+)/);return {folderId:(n==null?void 0:n[1])??null,pageUrl:t.href}}catch{return null}}function Ey(e){if(typeof e=="number"&&Number.isFinite(e)){const n=String(Math.trunc(e));return /^\d+$/.test(n)?n:null}if(typeof e!="string")return null;const t=e.trim();return /^\d+$/.test(t)?t:null}function rS(e){const t=e.toLowerCase().replace(/[^a-z0-9]/g,"");return /^(bookmarkcollectionid|bookmarkfolderid|bookmarkcollection|folderid|collectionid|bookmarkfolder|bookmarkcollectionid)/.test(t)}function Fi(e,t=0,n=new Set){if(!e||t>D0)return null;if(typeof e=="string"){const o=fa(e);if(o!=null&&o.folderId)return {folderId:o.folderId,pageUrl:o.pageUrl};const a=e.match(/(?:bookmark|folder|collection)[^\w]{0,20}(?:id|_id|Id|_Id)\W*[:=]\W*["']?(\d{5,})["']?/i);return a!=null&&a[1]?{folderId:a[1]}:null}if(typeof e!="object")return null;if(Array.isArray(e)){for(const o of e){const a=Fi(o,t+1,n);if(a!=null&&a.folderId)return a}return null}const r=e;if(n.has(r))return null;n.add(r);for(const[o,a]of Object.entries(r)){const i=rS(o)?Ey(a):null;if(i){const l=typeof a=="string"?a:"",c=l?fa(l):null;return c!=null&&c.folderId?{folderId:c.folderId,pageUrl:c.pageUrl}:{folderId:i}}const s=Fi(a,t+1,n);if(s!=null&&s.folderId)return s}return null}const Ay=["bookmark_collection_id","bookmarkcollectionid","bookmarkCollectionId","folder_id","folderid","folderId","collection_id","collectionid","collectionId"];function oS(e){if(!e)return null;let t;try{t=JSON.parse(decodeURIComponent(e));}catch{try{t=JSON.parse(e);}catch{return null}}const n=Fi(t);if(n!=null&&n.folderId)return n.folderId;if(t&&typeof t=="object"){const r=t;for(const o of Ay){const a=r[o],i=Ey(a);if(i)return i}}return null}function aS(e){try{const t=new URL(e,"https://x.com"),n=Ay.map(o=>t.searchParams.get(o)).find(o=>!!o&&/^\d+$/.test(o));if(n)return n;const r=oS(t.searchParams.get("variables"));return r||null}catch{return null}}function iS(e){if(!e)return null;let t;try{t=JSON.parse(e);}catch{try{const o=new URLSearchParams(e).get("variables");if(o)t=JSON.parse(o);else return null}catch{return null}}const n=Fi(t);return n!=null&&n.folderId?n.folderId:null}function sS(e){try{const n=new URL(e,location.href).pathname.match(/\/bookmarks\/(\d+)/);return (n==null?void 0:n[1])??null}catch{return null}}function lS(e){return e||"bookmark-tab"}function cS(){try{if(typeof performance>"u"||typeof performance.getEntriesByType!="function")return null;const e=performance.getEntriesByType("navigation"),t=e[e.length-1];if(!t||!t.name)return null;const n=fa(t.name);return n!=null&&n.folderId?{folderId:n.folderId,pageUrl:n.pageUrl,source:"performance",confidence:88}:null}catch{return null}}function uS(){if(typeof document>"u")return null;const e=['[role="tab"] a[href*="/i/bookmarks/"]','a[role="tab"][href*="/i/bookmarks/"]','[role="tablist"] a[href*="/i/bookmarks/"]','a[href*="/i/bookmarks/"]','nav a[href*="/bookmarks/"]','[data-testid="primaryColumn"] a[href*="/bookmarks/"]','a[href*="/bookmarks/"]'],t=[],n=[],r=new Set;for(const i of e){const s=Array.from(document.querySelectorAll(i));for(const l of s){if(!(l instanceof HTMLAnchorElement))continue;const c=l.getAttribute("href");if(!c)continue;const h=sS(c);if(!h)continue;const u=h;if(r.has(u))continue;r.add(u);const m=(()=>{try{return new URL(c,location.href).href}catch{return c}})(),g=l.closest("a[href]")||l,y=(O,U)=>O==null?void 0:O.getAttribute(U),b=(O,U)=>y(O,U)==="true",k=b(g,"aria-selected")||b(g,"aria-current")||b(g,"data-selected")||b(g,"data-state"),S=!!g.closest('[role="tablist"]'),M=g instanceof HTMLAnchorElement&&(g.role==="tab"||!!g.closest('[role="tab"]'));let T=null;try{T=window.getComputedStyle(g);}catch{}const P=T?T.display!=="none"&&T.visibility!=="hidden"&&T.opacity!=="0":true;let N=0;k&&(N+=20),S&&(N+=5),M&&(N+=3),P&&(N+=2);const I={folderId:u,pageUrl:m,source:lS(g.getAttribute("data-testid")??(M?"bookmark-tab":null)),score:N};n.push(I),k&&t.push(I);}}const o=t.length>0?t:n;if(!o.length)return null;o.sort((i,s)=>i.score!==s.score?s.score-i.score:i.folderId.localeCompare(s.folderId));const a=o[0];return a?{folderId:a.folderId,pageUrl:a.pageUrl,source:a.source,confidence:Math.max(t.length>0?45:25,a.score+(t.length>0?45:25))}:null}function dS(){var e;try{const t=(e=Fn.history)==null?void 0:e.state;if(!t)return null;const n=Fi(t);if(!(n!=null&&n.folderId))return null;const r=n.pageUrl||(typeof location<"u"?location.href:"");return {folderId:n.folderId,pageUrl:r,source:"history-state",confidence:86}}catch{return null}}function fS(){const e=["__INITIAL_STATE__","__NEXT_DATA__","__INITIAL_PROPS__","__NEXT_REDUX_STATE__","__META_DATA__"],t=[],n=Fn;for(const r of e){const o=n[r];o&&t.push({source:r,value:o});}for(const{source:r,value:o}of t){const a=Fi(o);if(a!=null&&a.folderId)return {folderId:a.folderId,pageUrl:a.pageUrl||(typeof location<"u"?location.href:""),source:r,confidence:82}}return null}function hS(e){var i;if(!e||typeof e!="object")return null;const t=[],n=new Set,r=s=>{s instanceof Element&&!n.has(s)&&(n.add(s),t.push(s));};r(e);const o=e;typeof o.composedPath=="function"&&(o.composedPath()||[]).forEach(l=>{r(l);});const a=e;r(a.target),r(a.currentTarget);for(const s of t){const l=(i=s.closest)==null?void 0:i.call(s,"a[href]"),c=s instanceof HTMLAnchorElement?s:l;if(!c)continue;const h=c.getAttribute("href");if(!h||!h.includes("/i/bookmarks/"))continue;const u=fa(h);if(u!=null&&u.folderId)return {folderId:u.folderId,pageUrl:u.pageUrl,source:"bookmark-click",confidence:92}}return null}function $a(e){try{const t=new URL(e,"https://x.com").pathname.toLowerCase();return /(bookmarks|bookmarkfolderslice|bookmarkfoldertimeline|bookmarkcollectiontimeline|bookmarkcollectionstimeline)/.test(t)}catch{return false}}function ss(e,t,n){const r=Date.now(),o=typeof location<"u"?location.href:"",a=Iy(o);if($a(e)){const i=aS(e);if(i)return {folderId:i,pageUrl:o,source:"request-url",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"request-url",pageRouteUrl:a==null?void 0:a.pageUrl};const s=iS(t);if(s)return {folderId:s,pageUrl:o,source:"request-body",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"request-body",pageRouteUrl:a==null?void 0:a.pageUrl};if(a!=null&&a.folderId)return {folderId:a.folderId,pageUrl:a.pageUrl||o,source:"page-route",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"location",pageRouteUrl:a.pageUrl||o};const l=X0(r);if(l!=null&&l.folderId&&Sc(o))return {folderId:l.folderId,pageUrl:l.pageUrl||o,source:l.source||"active-context-lock",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"active-context-lock",pageRouteUrl:l.pageUrl||o};const c=typeof location<"u"?location.href:o;if(co!=null&&co.folderId&&r-co.capturedAt<=Is)return {folderId:co.folderId,pageUrl:co.pageUrl||c,source:co.source||"active-context",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"active-context",pageRouteUrl:co.pageUrl||c};const h=xc();if(h!=null&&h.folderId)return {folderId:h.folderId,pageUrl:h.pageUrl,source:h.source,capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:h.source,pageRouteUrl:h.pageUrl}}return Gc(co,{method:(n==null?void 0:n.method)||"GET",requestId:n==null?void 0:n.requestId,hasBody:!!(n!=null&&n.body)})}function Gc(e,t){const r={folderId:null,pageUrl:typeof location<"u"?location.href:typeof document<"u"?document.URL:"",source:"fallback",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId};if(!e){const a=xc();return {folderId:(a==null?void 0:a.folderId)??null,pageUrl:(a==null?void 0:a.pageUrl)??r.pageUrl,source:(a==null?void 0:a.source)??r.source,requestId:t==null?void 0:t.requestId,routeSource:a==null?void 0:a.source,pageRouteUrl:a==null?void 0:a.pageUrl,capturedAt:Date.now()}}if(typeof e=="string"){const a=e.trim();if(!a)return r;if(/^\d+$/.test(a))return {folderId:a,pageUrl:r.pageUrl,source:"string-id",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId};const i=fa(a);return {folderId:(i==null?void 0:i.folderId)??null,pageUrl:(i==null?void 0:i.pageUrl)??r.pageUrl,source:"raw-string",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId,routeSource:i!=null&&i.folderId?"string-id":"fallback",pageRouteUrl:i==null?void 0:i.pageUrl}}if(typeof e=="object"){const a=e,i=[a.folderUrl,a.pageUrl,a.url,a.location,a.currentUrl,a.pageUrlBase64].map(u=>u).filter(u=>typeof u=="string"&&u.length>0),s=Date.now(),l=i.map(u=>fa(u)).find(u=>!!(u!=null&&u.folderId)),c=typeof a.folderId=="string"||typeof a.folderId=="number"?String(a.folderId):null,h=typeof a.pageUrl=="string"&&a.pageUrl.length>0?a.pageUrl:typeof a.url=="string"&&a.url.length>0?a.url:r.pageUrl;if(l!=null&&l.folderId)return {folderId:l.folderId,pageUrl:l.pageUrl,source:typeof a.source=="string"&&a.source.length>0?a.source:"object",capturedAt:typeof a.capturedAt=="number"?a.capturedAt:s,requestId:t==null?void 0:t.requestId,routeSource:typeof a.source=="string"&&a.source.length>0?a.source:"object",pageRouteUrl:h};if(c&&/^\d+$/.test(c))return {folderId:c,pageUrl:h,source:typeof a.source=="string"&&a.source.length>0?a.source:"object",capturedAt:typeof a.capturedAt=="number"?a.capturedAt:s,requestId:t==null?void 0:t.requestId,routeSource:typeof a.source=="string"&&a.source.length>0?a.source:"object",pageRouteUrl:h}}const o=xc();return {folderId:(o==null?void 0:o.folderId)??null,pageUrl:(o==null?void 0:o.pageUrl)??r.pageUrl,source:"fallback",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId,routeSource:o==null?void 0:o.source,pageRouteUrl:o==null?void 0:o.pageUrl}}function xc(){const e=[],t=uS();t&&e.push(t);const n=dS();n&&e.push(n);const r=cS();r&&e.push(r);const o=fS();o&&e.push(o);const a=e.filter(g=>!!g.folderId).sort((g,y)=>y.confidence-g.confidence)[0];if(a)return {folderId:a.folderId,pageUrl:a.pageUrl,source:a.source,confidence:a.confidence};const i=[],s=typeof location<"u"?location.href:"",l=typeof document<"u"?document.URL:"",c=typeof document<"u"?document.querySelector('link[rel="canonical"]'):null,h=typeof document<"u"?document.querySelector('meta[property="og:url"]'):null;s&&i.push({source:"location",url:s}),l&&l!==s&&i.push({source:"document",url:l}),c!=null&&c.href&&i.push({source:"canonical",url:c.href}),h!=null&&h.content&&i.push({source:"og",url:h.content});for(const g of i){const y=fa(g.url);if(y!=null&&y.folderId)return {...y,source:g.source,confidence:30}}const u=i[0];if(!u)return null;const m=u.url;return m?{folderId:null,pageUrl:m,source:u.source,confidence:14}:null}function Sc(e){try{return /\/i\/bookmarks(?:\/|$)/.test(new URL(e,"https://x.com").pathname)}catch{return false}}function Pr(e){const t=Gc(e);co=t,t.folderId?J0(t):Sc(t.pageUrl)||Z0();}function Bu(e,t,n){if(typeof n!="function")return false;const r=n,o=Sy();if(o)try{return o(r,e,{defineAs:t}),!0}catch(a){return Ae.error(`Failed to define ${t} hook`,a),false}if(e!==globalThis)return Ae.error(`Failed to define ${t} hook`,new Error("exportFunction unavailable for cross-realm target")),false;try{return e[t]=r,!0}catch(a){return Ae.error(`Failed to define ${t} hook`,a),false}}function Uu(e,t,n){if(!e||typeof e!="function")return;let r=e;if(!kc(e,t))return e;for(let o=0;o<10;o++){const a=r[n];if(!a||typeof a!="function")return;if(!kc(a,t))return a;r=a;}}function pS(e){return !(typeof e!="function"||kc(e,"__twe_is_hook_fetch_v1"))}function Dy(e,t){if(!e||typeof e!="object"&&typeof e!="function")return null;try{const n=e[t];return typeof n=="string"?n:null}catch{return null}}function mS(e,t){const n=typeof(t==null?void 0:t.method)=="string"&&t.method?t.method:null;if(n)return n;try{if(typeof Request<"u"&&e instanceof Request)return e.method||"GET"}catch{}const r=Dy(e,"method");return r&&r.length>0?r:"GET"}function gS(e){try{if(typeof e=="string")return e;if(typeof URL<"u"&&e instanceof URL)return e.toString();if(typeof Request<"u"&&e instanceof Request)return e.url||""}catch{}const t=Dy(e,"url");if(t&&t.length>0)return t;try{return String(e??"")}catch{return ""}}function ju(e){return e?/\/graphql\/|\/i\/api\/|\/api\/1\.1\/|\/api\/2\//.test(e):false}function uo(e){let t=typeof e,n="";if(e===null)return {name:"null",message:"null",summary:"null: null"};if(typeof e>"u")return {name:"undefined",message:"undefined",summary:"undefined: undefined"};if(typeof e=="string")return {name:"Error",message:e,summary:`Error: ${e}`};try{const r=e;typeof r.name=="string"&&r.name.length>0&&(t=r.name),typeof r.message=="string"&&r.message.length>0&&(n=r.message);}catch{}if(!n)try{n=String(e);}catch{n="[inaccessible error object]";}return {name:t,message:n,summary:`${t}: ${n}`}}function _S(e){const t=uo(e);return /permission denied to access (property|object|then|apply)/i.test(t.summary)}function Up(e){try{if(typeof e!="object"||e===null||e.__twe_mcp_hook_v1!==!0)return;const n=e;n.req&&typeof n.req=="object"&&(n.req=tc(n.req)),e={...e,__twe_msg_revision_v1:Do};const r=Fn.postMessage;r==null||r(e,"*");return}catch{}try{const n=globalThis.postMessage;n==null||n(e,"*");}catch{}}function Tl(e,t,n,r){if(!e||typeof e!="object"&&typeof e!="function")return false;const o=e.addEventListener;if(typeof o!="function")return false;try{return o.call(e,t,n,r),!0}catch{return false}}class yS{constructor(){be(this,"extensions",new Map);be(this,"disabledExtensions",new Set);be(this,"debugEnabled",false);be(this,"hookStats",null);be(this,"hookRuntime",null);be(this,"recentResponseSigs",new Map);be(this,"lastStickyBookmarkContext",null);be(this,"runtimeControlPlane");be(this,"interceptorDispatcher",new f0);be(this,"pageMessageHandler",null);be(this,"instanceId",`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`);be(this,"__twe_extension_manager_signature_v1",O0);be(this,"__twe_extension_manager_revision_v1",L0);be(this,"__twe_extension_manager_started_at_v1",Date.now());be(this,"disposed",false);be(this,"endpointMetricLimit",40);be(this,"signal",new zn(1));this.runtimeControlPlane=new I0({installPageMessageBridge:()=>this.installPageMessageBridge(),installBookmarkContextTracking:()=>this.installBookmarkContextTracking(),installHttpHooks:n=>this.installHttpHooks(n),installFetchHooks:n=>this.installFetchHooks(n),uninstallHooks:()=>this.uninstallHooks(),runHookSelfTest:()=>this.runHookSelfTest(),runFetchHookBootProbePass:()=>this.runFetchHookBootProbePass(),runHookRepairPass:()=>this.runHookRepairPass(),readHookStatsSnapshot:()=>this.readHookStatsSnapshot()}),this.disabledExtensions=new Set(et.get("disabledExtensions",[])),et.get("debug")&&(this.debugEnabled=true,Ae.info("Debug mode enabled")),z0();let t=null;try{this.hookStats=Lu(this.instanceId),this.hookRuntime=this.hookStats,this.syncRuntimeStats();}catch(n){t=V0("ExtensionManager.constructor",this.instanceId,n),Ae.error("ExtensionManager constructor bootstrap error",n);}try{const n=K0(this.hookStats,Lu(this.instanceId));(!this.hookStats||this.hookStats.activeInstanceId!==this.instanceId)&&(this.hookStats=n),this.hookStats.activeInstanceId=this.instanceId,this.hookStats.rev=Do,t&&(this.hookStats.repairCount=(this.hookStats.repairCount||0)+1),this.hookRuntime=this.hookStats,this.syncRuntimeStats();}catch{}(!this.hookRuntime||!this.hookStats)&&(this.hookStats=Lu(this.instanceId),this.hookRuntime=this.hookStats,this.syncRuntimeStats()),this.runtimeControlPlane.initialize();}get runtimeModes(){return this.runtimeControlPlane.getRuntimeModes()}get hookDebugConfig(){return this.runtimeControlPlane.getHookDebugConfig()}isHookModeEnabled(t){return this.runtimeControlPlane.isHookModeEnabled(t)}refreshHookDebugConfig(){this.runtimeControlPlane.refreshHookDebugConfig();}emitHookDiag(t,n,r){this.runtimeControlPlane.emitHookDiag(t,n,r);}enableSafeMode(t,n){this.runtimeControlPlane.enableSafeMode(t,n);}applyRuntimeModesFromOptions(){this.runtimeControlPlane.applyRuntimeModesFromOptions();}getRuntimeModesSnapshot(){return this.runtimeControlPlane.getRuntimeModesSnapshot()}getHookStatsSnapshot(){return this.runtimeControlPlane.getHookStatsSnapshot()}dispose(){if(!this.disposed){this.disposed=true;try{this.getExtensions().forEach(t=>{try{t.enabled&&(t.enabled=!1,t.dispose());}catch{}});}catch{}if(this.pageMessageHandler){try{window.removeEventListener("message",this.pageMessageHandler,!1);}catch{}this.pageMessageHandler=null;}this.runtimeControlPlane.dispose();}}runHookSelfTest(){try{if(this.runtimeModes.safeMode||this.runtimeModes.hookMode==="off")return {ok:!0};const t=Ms();if(this.isHookModeEnabled("xhr")){const n=t.XMLHttpRequest;if(!(n!=null&&n.prototype))return {ok:!1,error:"XMLHttpRequest.prototype unavailable"};if(typeof n.prototype.open!="function")return {ok:!1,error:"XMLHttpRequest.prototype.open unavailable"};if(typeof n.prototype.send!="function")return {ok:!1,error:"XMLHttpRequest.prototype.send unavailable"}}return this.isHookModeEnabled("fetch")&&typeof t.fetch!="function"?{ok:!1,error:"fetch unavailable"}:{ok:!0}}catch(t){return {ok:false,error:String(t)}}}syncRuntimeStats(){!this.hookStats||!this.hookRuntime||(this.hookRuntime.messagesTotal=this.hookStats.messagesTotal,this.hookRuntime.messagesLegacyShape=this.hookStats.messagesLegacyShape,this.hookRuntime.messagesMissingContext=this.hookStats.messagesMissingContext,this.hookRuntime.messagesRepairedAtBridge=this.hookStats.messagesRepairedAtBridge,this.hookRuntime.messagesMissingBody=this.hookStats.messagesMissingBody,this.hookRuntime.responsesProcessed=this.hookStats.responsesProcessed,this.hookRuntime.responsesSkippedDuplicate=this.hookStats.responsesSkippedDuplicate,this.hookRuntime.lastMessageAt=this.hookStats.lastMessageAt,this.hookRuntime.activeInstanceId=this.hookStats.activeInstanceId,this.hookRuntime.rev=this.hookStats.rev,this.hookRuntime.endpointStats=this.hookStats.endpointStats);}readHookStatsSnapshot(){return this.hookStats?{xhrMessages:Number(this.hookStats.xhrMessages||0),fetchMessages:Number(this.hookStats.fetchMessages||0),lastUrl:typeof this.hookStats.lastUrl=="string"?this.hookStats.lastUrl:"",lastAt:Number(this.hookStats.lastAt||0)}:null}getEndpointStats(t){if(!this.hookStats)return $p();const n=this.hookStats.endpointStats[t];if(n)return n;if(Object.keys(this.hookStats.endpointStats).length>=this.endpointMetricLimit){const a=Object.keys(this.hookStats.endpointStats)[0];a&&delete this.hookStats.endpointStats[a];}const r=$p();return this.hookStats.endpointStats[t]=r,r}uninstallHooks(){try{const t=Fn,n=t.XMLHttpRequest,r=n==null?void 0:n.prototype;if(r&&(typeof r[ro]=="function"&&(r.open=r[ro]),typeof r[oo]=="function"&&(r.send=r[oo]),delete r.__twe_is_hook_open_v1,delete r.__twe_is_hook_send_v1,delete r.__twe_is_hook_revision_v1),typeof t[ui]=="function"&&(t.fetch=t[ui]),typeof t.fetch=="object"&&t.fetch!==null){const o=t.fetch;delete o.__twe_is_hook_fetch_v1,delete o.__twe_is_hook_revision_v1;}}catch{}}applyBookmarkRouteCandidate(t){var l;const n=Date.now(),r=typeof location<"u"?location.href:"",o=Sc(r),a=t!=null&&t.pageUrl?Sc(t.pageUrl):o;if(!t){if(o&&((l=this.lastStickyBookmarkContext)!=null&&l.folderId)){const c=this.lastStickyBookmarkContext;if(n-c.capturedAt<=Is){Pr({folderId:c.folderId,pageUrl:c.pageUrl||r,source:c.source,capturedAt:n});return}}this.lastStickyBookmarkContext=null,Pr({folderId:null,pageUrl:r,source:"refresh",capturedAt:n});return}if(!a){this.lastStickyBookmarkContext=null,Pr({folderId:null,pageUrl:t.pageUrl,source:t.source,capturedAt:n});return}if(t.folderId){const c={folderId:t.folderId,pageUrl:t.pageUrl,source:t.source,capturedAt:n};this.lastStickyBookmarkContext=c,Pr(c);return}const i=this.lastStickyBookmarkContext,s=i&&!!i.folderId&&t.confidence<=P0&&n-i.capturedAt<=Is;if(!t.folderId&&s){Pr({folderId:i.folderId,pageUrl:t.pageUrl,source:i.source,capturedAt:n});return}if(!t.folderId&&o&&(i!=null&&i.folderId)&&n-i.capturedAt<=Is){Pr({folderId:i.folderId,pageUrl:t.pageUrl,source:i.source,capturedAt:n});return}this.lastStickyBookmarkContext=null,Pr({folderId:null,pageUrl:t.pageUrl,source:t.source,capturedAt:n});}updateBookmarkRouteContext(){try{const t=xc();this.applyBookmarkRouteCandidate(t??null);}catch{}}installBookmarkContextTracking(){if(this.runtimeModes.safeMode||this.runtimeModes.hookMode==="off"||(this.updateBookmarkRouteContext(),!Fn.history))return;const n=()=>this.updateBookmarkRouteContext(),r=o=>{this.applyBookmarkRouteCandidate(o);};if(!Fn.__twe_bookmark_context_listeners_v1){Fn.__twe_bookmark_context_listeners_v1=true;const o=[Fn,window,globalThis];for(const a of o)Tl(a,"popstate",n),Tl(a,"hashchange",n);}if(!Fn.__twe_bookmark_context_bookmark_click_v1&&(document!=null&&document.body)){const o=s=>{try{const l=s.target,c=hS(l);c&&r(c);}catch{}};Fn.__twe_bookmark_context_bookmark_click_v1=true;const a=[Fn,window,document,globalThis];let i=false;for(const s of a)i=Tl(s,"click",o,{capture:true})||i;!i&&(document!=null&&document.body)&&Tl(document.body,"click",o,{capture:true}),Fn.__twe_bookmark_context_bookmark_click_handler_v1=o;}if(Fn.__twe_bookmark_context_interval_v1||(Fn.__twe_bookmark_context_interval_v1=setInterval(()=>{try{this.updateBookmarkRouteContext();}catch{}},1200)),!Fn.__twe_bookmark_context_mutation_v1){const o=document,a=typeof MutationObserver<"u";if(o!=null&&o.body&&a){const i=new MutationObserver(()=>{this.updateBookmarkRouteContext();});i.observe(o.body,{subtree:true,childList:true,attributes:true,attributeFilter:["href","aria-selected","data-state","class"]}),Fn.__twe_bookmark_context_mutation_v1=i;}}}add(t){try{Ae.debug(`Register new extension: ${t.name}`);const n=new t(this),r=this.extensions.get(n.name);if(r&&r!==n)try{r.enabled&&r.dispose();}catch{}this.extensions.set(n.name,n);}catch(n){Ae.error(`Failed to register extension: ${t.name}`,n);}}start(){for(const t of this.extensions.values())this.disabledExtensions.has(t.name)?this.disable(t.name):this.enable(t.name);}enable(t){try{this.disabledExtensions.delete(t),et.set("disabledExtensions",[...this.disabledExtensions]);const n=this.extensions.get(t);if(n.enabled)return;n.enabled=!0,n.setup(),Ae.debug(`Enabled extension: ${t}`),this.signal.value++;}catch(n){Ae.error(`Failed to enable extension: ${t}`,n);}}disable(t){try{this.disabledExtensions.add(t),et.set("disabledExtensions",[...this.disabledExtensions]);const n=this.extensions.get(t);if(!n.enabled)return;n.enabled=!1,n.dispose(),Ae.debug(`Disabled extension: ${t}`),this.signal.value++;}catch(n){Ae.error(`Failed to disable extension: ${t}`,n);}}isDisposed(){return this.disposed}getExtensions(){return [...this.extensions.values()]}installPageMessageBridge(){this.runtimeModes.hookMode!=="off"&&(this.pageMessageHandler||(this.pageMessageHandler=t=>{var n,r,o;try{const a=t.origin||"";if(a&&!/^https:\/\/(x|twitter|mobile\.x)\.com$/.test(a))return;const i=t.data;if(!i||i[R0]!==!0)return;const s=eS(i),l=s===null||s!==Do,c=Q0(i),h=Ry(c),u=i.res;if(!u)return;const m=c&&typeof c=="object"?c:null,g=typeof h.requestId=="string"&&h.requestId.trim().length?h.requestId:typeof(m==null?void 0:m.requestId)=="string"&&((n=m.requestId)!=null&&n.trim().length)?m.requestId:ki(),y=typeof h.method=="string"&&h.method?h.method:typeof(m==null?void 0:m.method)=="string"?m.method:"GET",b=typeof h.url=="string"&&h.url.length?h.url:typeof(m==null?void 0:m.url)=="string"?m.url:"";if(!b)return;const k=typeof h.body=="string"?h.body:typeof(m==null?void 0:m.body)=="string"?m.body:void 0,S=m?m.bookmarkContext:void 0,M=m&&Object.prototype.hasOwnProperty.call(m,"requestContext")?m.requestContext:void 0,T=S!=null||M!=null||h.bookmarkContext!==void 0,P=typeof h.body=="string"||typeof(m==null?void 0:m.body)=="string",N=typeof h.requestId=="string"&&h.requestId.trim().length>0||typeof(m==null?void 0:m.requestId)=="string"&&(((r=m.requestId)==null?void 0:r.trim().length)||0)>0,I=tc({method:y,url:b,body:k,bookmarkContext:h.bookmarkContext??S??M,requestId:g}),O=l||!T||!P||!N,E=$a(I.url)?tS(I.url):null,v=E?this.getEndpointStats(E):null,L=Date.now(),$=typeof u.responseText=="string"?u.responseText:"";if(!this.hookStats)return;O&&this.hookStats.messagesRepairedAtBridge++,P||this.hookStats.messagesMissingBody++,l&&this.hookStats.messagesLegacyShape++,v&&(v.received+=1,v.lastAt=L,v.lastStatus=u.status??0,v.lastUrl=I.url),T||(this.hookStats.messagesLegacyShape++,v&&(v.legacyShape+=1)),!T||I.bookmarkContext===null?(this.hookStats.messagesMissingContext++,v&&(v.missingContext+=1),I.bookmarkContext=ss(I.url,I.body,{method:I.method,url:I.url,body:I.body,requestId:g})):I.bookmarkContext=Gc(I.bookmarkContext,{method:I.method,url:I.url,body:I.body,requestId:g,hasBody:!!I.body}),Pr(I.bookmarkContext),Y0({requestId:g,ts:Date.now(),method:I.method,url:I.url,hasBody:!!I.body,confidenceSource:typeof((o=I.bookmarkContext)==null?void 0:o.source)=="string"?I.bookmarkContext.source:"unknown",context:I.bookmarkContext,normalizedRoute:Iy(I.url).pageUrl});const xe=(I.method||"GET").toUpperCase();if(!$a(I.url)){const Q=U0(xe,I.url,u.status??0,$),ce=this.recentResponseSigs.get(Q);if(ce&&L-ce.at<Ty){this.hookStats.responsesSkippedDuplicate++,v&&(v.skippedDuplicate+=1),this.syncRuntimeStats();return}this.recentResponseSigs.set(Q,{sig:Q,at:L}),j0(this.recentResponseSigs);}this.hookStats.responsesProcessed++,v&&(v.processed+=1,v.newUniqueTweets+=nS($)),this.hookStats.messagesTotal++,this.hookStats.lastMessageAt=L,this.hookStats&&(this.hookStats.lastUrl=I.url,this.hookStats.lastAt=Date.now(),(I.method||"").toUpperCase()==="GET"?this.hookStats.xhrMessages++:this.hookStats.fetchMessages++,this.debugEnabled&&this.hookStats.loggedUrls<5&&(this.hookStats.loggedUrls++,Ae.debug("Hook saw request",{method:I.method,url:I.url,status:u.status})),this.syncRuntimeStats());const le={status:u.status,responseText:$};this.runInterceptors(I,le);}catch(a){Ae.debug("Failed to process hook message",a);}},window.addEventListener("message",this.pageMessageHandler,false)));}installHttpHooks(t=false){var a,i,s;if(!this.isHookModeEnabled("xhr"))return;this.refreshHookDebugConfig();const n=this.hookDebugConfig;this.emitHookDiag("xhr.install.begin",{force:t,...n}),n.disableXhrLoadListener&&this.emitHookDiag("xhr.load.listener.disabled",{},{force:true});let r=false,o;try{if(!((a=Fn.XMLHttpRequest)!=null&&a.prototype)||!((s=(i=Fn.XMLHttpRequest)==null?void 0:i.prototype)!=null&&s.open))throw new Error("XMLHttpRequest.prototype.open not available");const l=Fn.XMLHttpRequest.prototype,c=l.open,h=l.send;o=typeof l[ro]=="function"?l[ro]:c,!l[ro]&&typeof c=="function"&&(l[ro]=c),!l[oo]&&typeof h=="function"&&(l[oo]=h);const u=Uu(h,"__twe_is_hook_send_v1",oo),m=typeof u=="function"?u:typeof l[oo]=="function"?l[oo]:h;if(typeof m!="function")throw new Error("XMLHttpRequest.prototype.send not available");const g=!n.disableXhrSendWrap&&(t||!di(h,"__twe_is_hook_send_v1"));if(n.disableXhrSendWrap)typeof l[oo]=="function"&&(l.send=l[oo]),r=!0,this.emitHookDiag("xhr.send.wrap.disabled",{},{force:!0});else if(g){const y=this.emitHookDiag.bind(this),b=this.enableSafeMode.bind(this),k=function(M){let T="",P="GET",N="";try{const I=this,O=Nu(I,n);if(P=String(O.method||"GET"),N=O.requestId||ki(),O.requestId=N,O.body=Bp(M)??"",T=String(O.url||""),T){const U={method:P,url:T,body:O.body,requestId:N};$a(T)?(O.bookmarkContext=ss(T,O.body,U),Pr(O.bookmarkContext)):O.bookmarkContext=null;}Fu(I,n,O);}catch{}try{n.forceCallNotApply?m.call(this,M):m.apply(this,[M]),y("xhr.send.basecall.ok",{method:P,url:T});}catch{try{const I=n.forceCallNotApply?m.apply(this,[M]):m.call(this,M);return y("xhr.send.basecall.recovered",{method:P,url:T},{force:!0}),I}catch(I){y("xhr.send.basecall.error",{method:P,url:T,requestId:N,errName:I instanceof Error?I.name:typeof I,errMsg:I instanceof Error?I.message:String(I)},{force:!0}),Ae.error("XHR send hook base invocation failed; enabling safe mode",{method:P,url:T,err:I});try{b("xhr-send-basecall-failed",I);}catch{}throw I}}};if(Pa(k,"__twe_is_hook_send_v1"),!Bu(l,"send",k))throw new Error("Failed to define XMLHttpRequest.send hook safely");Pa(l.send,"__twe_is_hook_send_v1"),r=!0;}else r=!0;if(!t&&!n.disableXhrOpenWrap&&di(c,"__twe_is_hook_open_v1")&&(n.disableXhrSendWrap||di(h,"__twe_is_hook_send_v1")))r=!0;else {const y=Uu(c,"__twe_is_hook_open_v1",ro),b=typeof y=="function"?y:typeof l[ro]=="function"?l[ro]:c;if(typeof b!="function")throw new Error("XMLHttpRequest.prototype.open base function unavailable");if(n.disableXhrOpenWrap)l.open=b,this.emitHookDiag("xhr.open.wrap.disabled",{},{force:!0}),r=!0;else {const k=this.emitHookDiag.bind(this),S=this.enableSafeMode.bind(this),M=function(...P){let N="",I="",O="";try{N=typeof P[0]=="string"?P[0]:String(P[0]??"");const U=P[1];if(I=typeof U=="string"?U:String(U??""),ju(I)){const E=this,v=Nu(E,n);O=v.requestId||ki(),v.requestId=O,v.method=N,v.url=I,v.body="",$a(I)?(v.bookmarkContext=ss(I,void 0,{method:N,url:I,requestId:v.requestId}),Pr(v.bookmarkContext)):v.bookmarkContext=null,!n.disableXhrLoadListener&&!v.hooked&&(v.hooked=!0,this.addEventListener("load",function(){try{const L=this,$=Nu(L,n),xe=N||"GET",G=I,le=$.method||xe,Q=$.url||G;if(!ju(Q))return;const ce=String(this.responseText??""),me=$.body,pe=$.requestId||ki();$.requestId=pe;const we=$a(Q),z=$.bookmarkContext||(we?ss(Q,me,{method:le,url:Q,body:me,requestId:pe}):null);$.bookmarkContext||($.bookmarkContext=z),Fu(L,n,$),we&&z&&Pr(z);const ae=tc({method:le,url:Q,body:me||"",bookmarkContext:z??null,requestId:pe});Up({__twe_mcp_hook_v1:!0,req:ae,res:{status:this.status??0,responseText:ce}});}catch{}})),Fu(E,n,v);}}catch{}try{const U=n.forceCallNotApply?$u(b,this,P):b.apply(this,P);return k("xhr.open.basecall.ok",{method:N,url:I}),U}catch{try{const U=n.forceCallNotApply?b.apply(this,P):$u(b,this,P);return k("xhr.open.basecall.recovered",{method:N,url:I},{force:!0}),U}catch(U){k("xhr.open.basecall.error",{method:N,url:I,requestId:O,errName:U instanceof Error?U.name:typeof U,errMsg:U instanceof Error?U.message:String(U)},{force:!0}),Ae.error("XHR open hook base invocation failed; enabling safe mode",{method:N,url:I,err:U});try{S("xhr-open-basecall-failed",U);}catch{}throw U}}};if(Pa(M,"__twe_is_hook_open_v1"),!Bu(l,"open",M))throw new Error("Failed to define XMLHttpRequest.open hook safely");r=!0,Pa(l.open,"__twe_is_hook_open_v1"),Pa(l.send,"__twe_is_hook_send_v1");}l[ro]=b,l[oo]=m;}}catch(l){Ae.error("Failed to hook into XMLHttpRequest",l),this.enableSafeMode("xhr-hook-install-failed",l);}this.debugEnabled&&Ae.info(`Hooked into XMLHttpRequest (installed=${r})`),setTimeout(()=>{var l,c;try{const h=$0();((c=(l=Fn.XMLHttpRequest)==null?void 0:l.prototype)==null?void 0:c.open)!==(typeof o=="function"?o:void 0)?this.debugEnabled&&Ae.debug("XHR hook active",{unsafeWindow:h.hasUnsafeWindow,wrappedJSObject:h.hasWrappedJSObject,exportFunction:h.hasExportFunction}):Ae.error(`XHR hook not active (unsafeWindow=${h.hasUnsafeWindow}, wrappedJSObject=${h.hasWrappedJSObject}, exportFunction=${h.hasExportFunction}). Bookmark capture will not work.`);}catch(h){Ae.debug("XHR hook diagnostics failed",h);}},1e3);}installFetchHooks(t=false){if(!this.isHookModeEnabled("fetch"))return;this.refreshHookDebugConfig();const n=this.hookDebugConfig;this.emitHookDiag("fetch.install.begin",{force:t,...n});const r=Ms(),o=r.fetch;if(typeof o!="function"){Ae.warn("Fetch API not found, skipping fetch hooks");return}const a=r,i=r.fetch;if(!t&&di(i,"__twe_is_hook_fetch_v1")){Ae.debug("Fetch hook already installed");return}const s=a[ui],l=Uu(i,"__twe_is_hook_fetch_v1",ui),c=[s,l,o].find(pS)??null;if(!c){Ae.error("Fetch API base function unavailable or unsafe; enabling safe mode"),this.enableSafeMode("fetch-hook-base-unavailable");return}const h=c;if(n.disableFetchWrap){r.fetch=h,this.emitHookDiag("fetch.wrap.disabled",{},{force:true});return}a[ui]=h;const u=this.emitHookDiag.bind(this),m=this.enableSafeMode.bind(this);let g=false,y=r;const b=(T,P,N=2)=>{try{return N<=1?h(T):h(T,P)}catch(I){return Promise.reject(I)}},k=(T,P,N,I,O=2)=>{const U=O<=1?[N]:[N,I];let E=null;for(const v of P)if(v){try{const L=$u(T,v,U);return y=v,L}catch(L){E=L;}if(!n.forceCallNotApply)try{const L=Reflect.apply(T,v,U);return y=v,L}catch(L){E=L;}}try{return O<=1?T(N):T(N,I)}catch(v){E=v;}throw E instanceof Error?E:new Error(`fetch invocation failed (${uo(E).summary})`)},S=function(T,P){const N=arguments.length<=1?1:2;let I="GET",O="",U,E="",v;try{I=mS(T,P);}catch{I=(P==null?void 0:P.method)??"GET";}try{O=gS(T);}catch{O="";}try{U=Bp(P==null?void 0:P.body);}catch{U=void 0;}try{E=ki();}catch{E="";}u("fetch.wrapper.enter",{method:I,url:O,requestId:E});try{$a(O)?(v=ss(O,U,{method:I,url:O,body:U,requestId:E}),Pr(v)):v=void 0;}catch(xe){Ae.debug("fetch request context capture failed",{method:I,url:O,err:xe});}if(!ju(O))return b(T,P,N);let $;try{const xe=a[ui]??h;if(typeof xe!="function"||kc(xe,"__twe_is_hook_fetch_v1"))throw new Error("fetch base function unavailable");const G=[this,y,r];typeof window<"u"&&G.push(window),G.push(globalThis);const le=[],Q=new Set;for(const ce of G)!ce||Q.has(ce)||(Q.add(ce),le.push(ce));$=k(xe,le,T,P,N);}catch(xe){const G=uo(xe);if(u("fetch.basecall.error",{method:I,url:O,requestId:E,errName:G.name,errMsg:G.message}),!g){g=true,Ae.error("Fetch hook base invocation failed; enabling safe mode",{method:I,url:O,err:G.summary});try{m("fetch-hook-invocation-failed",G.summary);}catch{}}return b(T,P,N).catch(le=>{const Q=uo(le);throw u("fetch.fallback.error",{method:I,url:O,requestId:E,errName:Q.name,errMsg:Q.message},{force:true}),le??G.summary})}try{$.then(xe=>{try{u("fetch.basecall.ok",{method:I,url:O});const G=xe.headers.get("content-type")??"";if(!(!G||G.includes("json")||G.startsWith("text/")))return;xe.clone().text().then(Q=>{if(Q)try{const ce=tc({method:I,url:O,body:U||"",bookmarkContext:v??null,requestId:E});Up({__twe_mcp_hook_v1:!0,req:ce,res:{status:xe.status,responseText:Q}});}catch{}}).catch(Q=>{const ce=uo(Q);Ae.debug("fetch clone.text() failed",{method:I,url:O,err:ce.summary});});}catch(G){const le=uo(G);Ae.debug("fetch response hook observer callback failed",{method:I,url:O,err:le.summary});}},xe=>{const G=uo(xe);if(u("fetch.basecall.error",{method:I,url:O,requestId:E,errName:G.name,errMsg:G.message}),!g){g=!0,Ae.error("Fetch hook base invocation failed; enabling safe mode",{method:I,url:O,err:G.summary});try{m("fetch-hook-invocation-failed",G.summary);}catch{}}}).catch(xe=>{const G=uo(xe);Ae.debug("fetch response hook observer promise failed",{method:I,url:O,err:G.summary});});}catch(xe){const G=uo(xe);Ae.debug("fetch response hook observer setup failed",{method:I,url:O,err:G.summary});}return $};Pa(S,"__twe_is_hook_fetch_v1");const M=Bu(a,"fetch",S);if(!M){this.enableSafeMode("fetch-hook-define-failed");return}Pa(a.fetch,"__twe_is_hook_fetch_v1"),this.emitHookDiag("fetch.install.ok",{hasHookMarker:di(a.fetch,"__twe_is_hook_fetch_v1")},{force:true}),M&&this.debugEnabled&&Ae.info("Hooked into fetch"),M&&this.startFetchHookBootProbe(1200);}runFetchHookBootProbePass(){if(this.runtimeModes.safeMode||!this.isHookModeEnabled("fetch"))return;const t=Ms(),n=t.fetch;if(typeof n!="function"){this.enableSafeMode("fetch-hook-probe-missing-fetch");return}this.emitHookDiag("fetch.bootprobe.begin",{hasHookMarker:di(n,"__twe_is_hook_fetch_v1")},{force:true}),(async()=>{const o=[t];typeof window<"u"&&o.push(window),o.push(globalThis);const a=typeof location<"u"&&location.origin?`${location.origin}/favicon.ico?__twe_fetch_probe=1`:"https://x.com/favicon.ico?__twe_fetch_probe=1";let i=null;try{await(await n(a)).text().catch(()=>""),this.debugEnabled&&Ae.debug("Fetch hook boot probe passed"),this.emitHookDiag("fetch.bootprobe.ok",{});return}catch(l){i=l;}for(const l of o)try{await(this.hookDebugConfig.forceCallNotApply?await n.call(l,a):await Reflect.apply(n,l,[a])).text().catch(()=>""),this.debugEnabled&&Ae.debug("Fetch hook boot probe passed"),this.emitHookDiag("fetch.bootprobe.ok",{});return}catch(c){i=c;}const s=uo(i);if(this.emitHookDiag("fetch.bootprobe.error",{errName:s.name,errMsg:s.message},{force:true}),_S(i)){Ae.warn("Fetch boot probe hit cross-realm permission error; keeping fetch hook active",s.summary);return}this.enableSafeMode("fetch-hook-probe-failed",i);})();}startFetchHookBootProbe(t=1200){this.runtimeControlPlane.startFetchHookBootProbe(t);}runHookRepairPass(){return this.hookStats&&(this.hookStats.repairCount+=1,this.syncRuntimeStats()),this.isHookModeEnabled("xhr")&&this.installHttpHooks(true),this.isHookModeEnabled("fetch")&&this.installFetchHooks(true),this.runHookSelfTest()}runInterceptors(t,n){this.interceptorDispatcher.dispatch(this.getExtensions(),t,n);}}var mt=(e=>(e.TWEET="tweet",e.USER="user",e.CUSTOM="custom",e.NONE="none",e))(mt||{});class Cn{constructor(t){be(this,"name","");be(this,"enabled",true);be(this,"type","none");be(this,"manager");this.manager=t;}setup(){}dispose(){}intercept(){return null}render(){return null}}let ls=null;function Cc(){return ls&&!ls.isDisposed()||(ls=new yS),ls}const hr=new Proxy({},{get(e,t,n){const r=Cc(),o=Reflect.get(r,t,n);return typeof o=="function"?o.bind(r):o},set(e,t,n,r){const o=Cc();return Reflect.set(o,t,n,r)}}),bS="cupcake",wS="dracula";function vS(e){const t=e.match(/rgba?\(([^)]+)\)/i),n=t==null?void 0:t[1];if(!n)return null;const r=n.split(",").slice(0,3).map(s=>Number.parseFloat(s.trim()));if(r.length!==3||r.some(s=>!Number.isFinite(s)))return null;const[o,a,i]=r;return o===void 0||a===void 0||i===void 0?null:[o,a,i]}function kS([e,t,n]){const[r,o,a]=[e,t,n].map(i=>{const s=Math.max(0,Math.min(255,i))/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)});return r===void 0||o===void 0||a===void 0?0:.2126*r+.7152*o+.0722*a}function xS(){const e=[document.documentElement,document.body].filter(Boolean);for(const t of e){const n=[t.getAttribute("data-theme"),t.getAttribute("data-color-mode"),t.getAttribute("color-mode"),t.className,t.getAttribute("style")].join(" ").toLowerCase();if(/\b(dark|dim|night|lights-out|black)\b/.test(n))return "dark";if(/\b(light|default|white)\b/.test(n))return "light"}return null}function SS(){const e=getComputedStyle(document.documentElement).colorScheme.toLowerCase();if(e.includes("dark"))return "dark";if(e.includes("light"))return "light";const t=document.querySelector("main"),n=[document.body,t,document.documentElement].filter(r=>!!r);for(const r of n){const o=vS(getComputedStyle(r).backgroundColor);if(o)return kS(o)<.35?"dark":"light"}return null}function jp(){var e;return (e=globalThis.matchMedia)!=null&&e.call(globalThis,"(prefers-color-scheme: dark)").matches?"dark":"light"}function CS(){return typeof document>"u"?jp():xS()??SS()??jp()}function Hp(e){return e&&e!=="system"?e:CS()==="dark"?wS:bS}function TS(e){const t=tn(Hp(e));return ot(()=>{var a,i;const n=()=>{t.value=Hp(e);};if(n(),e&&e!=="system")return;const r=(a=globalThis.matchMedia)==null?void 0:a.call(globalThis,"(prefers-color-scheme: dark)");(i=r==null?void 0:r.addEventListener)==null||i.call(r,"change",n);const o=typeof MutationObserver<"u"?new MutationObserver(n):null;return o&&typeof document<"u"&&(o.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-color-mode","color-mode"]}),document.body&&o.observe(document.body,{attributes:true,attributeFilter:["class","style","data-theme","data-color-mode","color-mode"]})),()=>{var s;(s=r==null?void 0:r.removeEventListener)==null||s.call(r,"change",n),o==null||o.disconnect();}},[e,t]),t}function MS(e){const t=tn(hr.getExtensions()),n=tn(et.get("theme")),r=TS(n.value),o=tn(et.get("showControlPanel")),a=tn(null),i=tn(null),s=tn(null),l=()=>{o.value=!o.value,et.set("showControlPanel",o.value);};return ot(()=>{t.value=hr.getExtensions(),n.value=et.get("theme"),o.value=et.get("showControlPanel"),hr.signal.subscribe(()=>{t.value=hr.getExtensions();}),et.signal.subscribe(()=>{n.value=et.get("theme");try{hr.applyRuntimeModesFromOptions(),i.value=hr.getRuntimeModesSnapshot();}catch{i.value=null;}});try{hr.applyRuntimeModesFromOptions();}catch{}typeof vc=="function"&&vc(e,l);let c=null;const h=()=>{try{a.value=hr.getHookStatsSnapshot();}catch{a.value=null;}try{i.value=hr.getRuntimeModesSnapshot();}catch{i.value=null;}try{s.value=globalThis.__twe_raw_capture_stats_v1;}catch{s.value=null;}},u=()=>{const m=typeof document<"u"&&document.hidden?8e3:2e3;c=globalThis.setTimeout(()=>{h(),u();},m);};return h(),u(),Ae.debug("Workspace shell state effect executed"),()=>{c!==null&&globalThis.clearTimeout(c);}},[]),{extensions:t,currentTheme:n,resolvedTheme:r,showControlPanel:o,hookStats:a,runtimeModes:i,rawCaptureStats:s,toggleControlPanel:l}}function IS(e){return f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100","aria-hidden":"true",...e,children:f("path",{fill:"currentColor",d:"m82.7 88.4c1.8-2.2 4.1-5.4 4.1-9.9s-1.9-7.3-4.5-9.8c1.8-3.2 6.6-5.4 9.8-5.4 0.8 0 2.2-1 2.2-2.8 0-3.4-3.3-7.3-7.9-7.3-1.1 0-1.9-0.1-1.9-3.9 0-0.6 0.1-1.4 0.1-2.4 6 0 14.3-3.1 14.3-11.4 0-4.7-4.6-13.6-13.8-18.7l-0.1-0.1v-0.1c0.3-5.9-1.6-8.9-4-8.9-2.5 0-4.4 3-5 4.6-1.4-3-3.9-6.5-7.1-6.5-2.2 0-4.4 2.1-4.4 6.6 0 2.8 0.7 5.8 1.7 8.1-2.5 3.4-4.6 7.9-4.6 15.1 0 8.7-9.9 8.8-16.6 20.5-3.9 6.4-4 12.5-3.8 18.6-1.4-1.8-1.8-7.3-0.7-12.2 2.2-8.7 9.4-12.8 12-22.9 0.7-2.5 1-5.1 1-7.9 0-12.5-9.5-28.2-27.2-28.2-13.6 0-24.8 11.3-24.8 24.5 0 5.5 1.7 10.9 5 13.7 1 1.1 2.3 1.4 2.5 0 0.5-2.3 3-5.7 7.3-5.7 4 0 7.6 2.3 7.6 6.6 0 4.7-4.1 8.2-6.5 16.5-0.7 2.4-1.1 5-1.1 7.9 0 16.1 11.7 29.4 32.3 29.4h33c4.3 0 6.6-0.6 6.6-2.8 0-2.4-2.1-4.3-5.5-5.2zm1-59.5c1.2 0 2.2 1 2.2 2.2s-0.9 2.2-2.2 2.5c-1.2 0-2.3-1-2.4-2.4 0-1.2 1.1-2.3 2.4-2.3z"})})}function RS({currentTheme:e,onToggle:t}){return f("div",{onClick:t,"data-theme":e,class:"group w-12 h-12 fixed top-[60%] left-[-20px] cursor-pointer bg-transparent text-base-content",children:f("div",{class:"w-full h-full origin origin-[bottom_center] transition-all duration-200 group-hover:translate-x-[5px] group-hover:rotate-[20deg] opacity-50 group-hover:opacity-90",children:f(IS,{class:"h-full w-full"})})})}function ES(e,t){for(var n in t)e[n]=t[n];return e}function qp(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return true;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return true;return false}function Vp(e,t){this.props=e,this.context=t;}(Vp.prototype=new Zr).isPureReactComponent=true,Vp.prototype.shouldComponentUpdate=function(e,t){return qp(this.props,e)||qp(this.state,t)};var zp=Ht.__b;Ht.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),zp&&zp(e);};var AS=Ht.__e;Ht.__e=function(e,t,n,r){if(e.then){for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}AS(e,t,n,r);};var Kp=Ht.unmount;function Py(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c();}),e.__c.__H=null),(e=ES({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Py(r,t,n)})),e}function Oy(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Oy(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=true,e.__c.__P=n)),e}function Hu(){this.__u=0,this.o=null,this.__b=null;}function Ly(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ml(){this.i=null,this.l=null;}Ht.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Kp&&Kp(e);},(Hu.prototype=new Zr).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=Ly(r.__v),a=false,i=function(){a||(a=true,n.__R=null,o?o(s):s());};n.__R=i;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Oy(l,l.__c.__P,l.__c.__O);}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate();}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i);},Hu.prototype.componentWillUnmount=function(){this.o=[];},Hu.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Py(this.__b,n,r.__O=r.__P);}this.__b=null;}var o=t.__a&&ia(sr,null,e.fallback);return o&&(o.__u&=-33),[ia(sr,null,t.__a?null:e.children),o]};var Gp=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2];}};function DS(e){return this.getChildContext=function(){return e.context},e.children}function PS(e){var t=this,n=e.h;t.componentWillUnmount=function(){qd(null,t.v),t.v=null,t.h=null;},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return true},appendChild:function(r){this.childNodes.push(r),t.h.appendChild(r);},insertBefore:function(r,o){this.childNodes.push(r),t.h.insertBefore(r,o);},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r);}}),qd(ia(DS,{context:t.context},e.__v),t.v);}function OS(e,t){var n=ia(PS,{__v:e,h:t});return n.containerInfo=t,n}(Ml.prototype=new Zr).__a=function(e){var t=this,n=Ly(t.__v),r=t.l.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),Gp(t,e,r)):o();};n?n(a):a();}},Ml.prototype.render=function(e){this.i=null,this.l=new Map;var t=js(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ml.prototype.componentDidUpdate=Ml.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Gp(e,n,t);});};var LS=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,NS=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,FS=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$S=/[A-Z0-9]/g,BS=typeof document<"u",US=function(e){return (typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Zr.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Zr.prototype,e,{configurable:true,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:true,writable:true,value:t});}});});var Wp=Ht.event;function jS(){}function HS(){return this.cancelBubble}function qS(){return this.defaultPrevented}Ht.event=function(e){return Wp&&(e=Wp(e)),e.persist=jS,e.isPropagationStopped=HS,e.isDefaultPrevented=qS,e.nativeEvent=e};var VS={enumerable:false,configurable:true,get:function(){return this.class}},Yp=Ht.vnode;Ht.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,o={},a=r.indexOf("-")===-1;for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||BS&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===true?s="":l==="translate"&&s==="no"?s=false:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?i="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||US(n.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":FS.test(i)&&(i=l):l=i="oninput":a&&NS.test(i)?i=i.replace($S,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&o[i=l]&&(i="oninputCapture"),o[i]=s;}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=js(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1;})),r=="select"&&o.defaultValue!=null&&(o.value=js(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value;})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",VS)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o;})(e),e.$$typeof=LS,Yp&&Yp(e);};var Jp=Ht.__r;Ht.__r=function(e){Jp&&Jp(e),e.__c;};var Xp=Ht.diffed;Ht.diffed=function(e){Xp&&Xp(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value);};const eh=1;function Mr(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Bn(e){return typeof e=="string"?e:""}function qu(e){const t=Number(e);return Number.isFinite(t)?t:null}function la(e){var o,a,i,s;const t=e.replace(/\r\n?/g,`
`).split(`
`),n=[];let r=null;for(const l of t){const c=l.match(/^\s*(`{3,}|~{3,})/);if(r){n.push(l),c&&((o=c[1])!=null&&o.startsWith(r.character))&&c[1].length>=r.length&&(r=null);continue}const h=l.trimEnd();if(c!=null&&c[1]){r={character:c[1][0]||"`",length:c[1].length},n.push(h);continue}!h.trim()&&!((a=n.at(-1))!=null&&a.trim())||n.push(h);}for(;n.length&&!((i=n[0])!=null&&i.trim());)n.shift();for(;n.length&&!((s=n.at(-1))!=null&&s.trim());)n.pop();return n.join(`
`)}function br(e){return e.replace(/\s+/g," ").trim()}function Ka(e){return e.replace(/([\\`*_[\]<>])/g,"\\$1")}function zS(e){return br(e).replace(/\|/g,"\\|").replace(/\n/g,"<br>")}function Ri(e){return e.replace(/\\/g,"%5C").replace(/\)/g,"\\)")}function Ny(e){const t=Math.max(0,...Array.from(e.matchAll(/`+/g),o=>o[0].length)),n="`".repeat(t+1),r=e.startsWith("`")||e.endsWith("`")?" ":"";return `${n}${r}${e}${r}${n}`}function Vu(e,t){const n=br(e);return n?n.startsWith(t)&&n.endsWith(t)?n:`${t}${n}${t}`:""}function KS(e,t){if(!e)return "";switch(t.toUpperCase()){case "BOLD":return `**${e}**`;case "ITALIC":return `*${e}*`;case "STRIKETHROUGH":case "STRIKE":return `~~${e}~~`;case "UNDERLINE":return `<u>${e}</u>`;case "CODE":case "MONOSPACE":return Ny(e.replace(/\\([\\`*_[\]<>])/g,"$1"));default:return e}}function GS(e){const t=new Map,n=(r,o)=>{if(typeof r!="string"&&typeof r!="number"||!Mr(o))return;const a=Bn(o.type).toUpperCase();a&&t.set(String(r),{type:a,data:Mr(o.data)?o.data:{}});};if(Array.isArray(e)){for(const r of e)Mr(r)&&n(r.key,r.value);return t}if(Mr(e))for(const[r,o]of Object.entries(e))n(r,o);return t}function Zp(e,t){if(!Array.isArray(e))return [];const n=[];for(const r of e){if(!Mr(r))continue;const o=qu(r.offset??r.from_index),a=qu(r.length),i=qu(r.to_index),s=a??(o!==null&&i!==null?i-o:null);if(o===null||s===null||o<0||s<=0)continue;if(t==="entity"){const c=r.key;if(typeof c!="string"&&typeof c!="number")continue;n.push({offset:o,length:s,key:String(c)});continue}const l=Bn(r.style);l&&n.push({offset:o,length:s,style:l});}return n}function WS(e){if(!e||e.type!=="LINK")return "";for(const t of ["expanded_url","expandedUrl","original_url","originalUrl","url","display_url","displayUrl"]){const n=Bn(e.data[t]).trim();if(n)return n}return ""}function Fy(e){if(!e||!["MATH","LATEX","KATEX","FORMULA"].includes(e.type))return "";for(const t of ["latex","tex","expression","formula","value","text"]){const n=Bn(e.data[t]).trim();if(n)return n}return ""}function $y(e){return !e||e.type!=="MARKDOWN"?"":la(Bn(e.data.markdown))}function YS(e,t){const n=Bn(e.text);if(!n)return "";const r=Zp(e.entityRanges,"entity"),o=Zp(e.inlineStyleRanges,"style"),a=new Set([0,n.length]);for(const l of [...r,...o])a.add(Math.min(n.length,l.offset)),a.add(Math.min(n.length,l.offset+l.length));const i=[...a].filter(l=>l>=0).sort((l,c)=>l-c),s=[];for(let l=0;l<i.length-1;l+=1){const c=i[l]??0,h=i[l+1]??c;if(h<=c)continue;const u=n.slice(c,h),m=r.find(T=>T.offset<=c&&T.offset+T.length>=h),g=m!=null&&m.key?t.get(m.key):void 0,y=$y(g);if(y){s.push(y);continue}const b=Fy(g);if(b){s.push(`$${b.replace(/\$/g,"\\$")}$`);continue}let k=Ka(u);const S=o.filter(T=>T.offset<=c&&T.offset+T.length>=h).map(T=>T.style||"").filter(Boolean).sort();for(const T of S)k=KS(k,T);const M=WS(g);M&&(k=`[${k||Ka(M)}](${Ri(M)})`),s.push(k);}return s.join("").trim()}function JS(e){var n;return ((n=(Array.isArray(e.variants)?e.variants:[]).filter(r=>Mr(r)).filter(r=>Bn(r.content_type).toLowerCase()==="video/mp4").map(r=>({url:Bn(r.url).trim(),bitrate:Number(r.bit_rate??r.bitrate??0)||0})).filter(r=>!!r.url).sort((r,o)=>o.bitrate-r.bitrate)[0])==null?void 0:n.url)??""}function By(e){if(!Mr(e))return null;const t=Mr(e.media_info)?e.media_info:e,n=JS(t);if(n)return {kind:"video",url:n,altText:Bn(e.alt_text).trim()||void 0};const r=[t.original_img_url,t.url,e.media_url_https].map(o=>Bn(o).trim()).find(Boolean);return r?{kind:"image",url:r,altText:Bn(e.alt_text).trim()||Bn(e.ext_alt_text).trim()||void 0}:null}function Uy(e){const t=Ka(e.altText||"");return e.kind==="image"?`})`:`[${t||"video"}](${Ri(e.url)})`}function XS(e){const t=new Map,n=r=>{if(!Mr(r))return;const o=String(r.media_id??r.id??r.media_key??"").trim(),a=By(r);o&&a&&t.set(o,a);};for(const r of e.media_entities??[])n(r);return n(e.cover_media),t}function ZS(e,t){if(!e||e.type!=="MEDIA")return "";const n=Array.isArray(e.data.mediaItems)?e.data.mediaItems:Array.isArray(e.data.media_items)?e.data.media_items:[],r=[],o=new Set;for(const a of n){if(!Mr(a))continue;const i=String(a.mediaId??a.media_id??a.id??"").trim(),s=t.get(i);!s||o.has(s.url)||(o.add(s.url),r.push(Uy(s)));}return r.join(`
`)}function QS(e,t,n){const r=Array.isArray(e.entityRanges)?e.entityRanges:[],o=[];for(const a of r){if(!Mr(a))continue;const i=a.key;if(typeof i!="string"&&typeof i!="number")continue;const s=t.get(String(i)),l=$y(s);if(l){o.push(l);continue}const c=Fy(s);if(c){o.push(`$$
${c}
$$`);continue}const h=ZS(s,n);if(h){o.push(h);continue}if((s==null?void 0:s.type)==="TWEET"){const u=String(s.data.tweetId??s.data.tweet_id??"").trim();u&&o.push(`> Embedded post: https://x.com/i/status/${u}`);}}return o.join(`
`)}function e1(e){const t=Mr(e.data)?e.data:{};return Bn(t.language??t.lang??t.codeLanguage).trim().replace(/[^a-zA-Z0-9_+-]/g,"")}function t1(e){const t=e.content_state,n=Array.isArray(t==null?void 0:t.blocks)?t.blocks:[],r=GS(t==null?void 0:t.entityMap),o=XS(e),a=[];let i=[],s=[],l="";const c=new Map,h=()=>{i.length&&a.push(i.join(`
`)),i=[],c.clear();},u=()=>{s.length&&a.push(`\`\`\`${l}
${s.join(`
`)}
\`\`\``),s=[],l="";};for(const m of n){if(!Mr(m))continue;const g=Bn(m.type).toLowerCase()||"unstyled";if(g==="code-block"){h();const k=e1(m);s.length&&k&&l&&k!==l&&u(),l||(l=k),s.push(Bn(m.text));continue}u();const y=g==="unordered-list-item"||g==="ordered-list-item";if(y||h(),g==="atomic"){const k=QS(m,r,o);k&&a.push(k);continue}const b=YS(m,r);if(!(!b&&!["divider","horizontal-rule","separator"].includes(g))){if(y){const k=Math.max(0,Math.floor(Number(m.depth||0))),S=" ".repeat(k);if(g==="ordered-list-item"){const M=(c.get(k)||0)+1;c.set(k,M),i.push(`${S}${M}. ${b}`);}else i.push(`${S}- ${b}`);continue}switch(g){case "header-one":a.push(`# ${b}`);break;case "header-two":a.push(`## ${b}`);break;case "header-three":a.push(`### ${b}`);break;case "header-four":a.push(`#### ${b}`);break;case "header-five":a.push(`##### ${b}`);break;case "header-six":a.push(`###### ${b}`);break;case "blockquote":case "pullquote":a.push(b.split(`
`).map(k=>`> ${k}`).join(`
`));break;case "divider":case "horizontal-rule":case "separator":a.push("---");break;default:a.push(b);break}}}return u(),h(),la(a.join(`
`))}function Ks(e){if(!e)return "";const t=br(Bn(e.title)),n=t1(e),r=By(e.cover_media),o=la(Bn(e.plain_text)),a=la(Bn(e.preview_text)),i=[];return r&&!n.includes(r.url)&&i.push(Uy(r)),t&&!n.startsWith(`# ${t}`)&&i.push(`# ${Ka(t)}`),n?i.push(n):o?i.push(o):a&&a!==t&&i.push(a),la(i.join(`
`))}function n1(e){const t=e.querySelector('annotation[encoding="application/x-tex"]');return [t==null?void 0:t.textContent,e.getAttribute("data-tex"),e.getAttribute("data-latex"),e.getAttribute("data-math")].map(r=>String(r||"").trim()).find(Boolean)||""}function r1(e){return e.classList.contains("katex-display")||e.getAttribute("display")==="block"}function jy(e,t){return [...e.children].find(n=>n.tagName.toLowerCase()===t)}function Qp(e){const t=e.tagName.toLowerCase()==="pre"?e:jy(e,"pre");if(!t)return "";let n="";t!==e&&(n=[...e.querySelectorAll("span")].map(s=>br(s.textContent||"")).filter(s=>/^[a-zA-Z0-9_+-]{1,24}$/.test(s))[0]||"");const r=(t.textContent||"").replace(/^\n|\n$/g,""),o=Math.max(2,...Array.from(r.matchAll(/`+/g),i=>i[0].length)),a="`".repeat(o+1);return `${a}${n}
${r}
${a}`}function o1(e){const t=[...e.querySelectorAll("tr")].map(i=>[...i.querySelectorAll(":scope > th, :scope > td")].map(s=>zS(fr(s,true))));if(!t.length)return "";const n=Math.max(...t.map(i=>i.length));if(!n)return "";const r=t.map(i=>[...i,...Array.from({length:Math.max(0,n-i.length)},()=>"")]),o=r[0]||[],a=r.slice(1);return [`| ${o.join(" | ")} |`,`| ${o.map(()=>"---").join(" | ")} |`,...a.map(i=>`| ${i.join(" | ")} |`)].join(`
`)}function Hy(e,t=0){const n=e.tagName.toLowerCase()==="ol",r=[...e.children].filter(a=>a.tagName.toLowerCase()==="li"),o=[];return r.forEach((a,i)=>{const s=[...a.children].filter(c=>["ul","ol"].includes(c.tagName.toLowerCase())),l=[...a.childNodes].filter(c=>!(c instanceof Element&&["ul","ol"].includes(c.tagName.toLowerCase()))).map(c=>qy(c,true)).join("");o.push(`${" ".repeat(t)}${n?`${i+1}.`:"-"} ${br(l)}`);for(const c of s)o.push(Hy(c,t+1));}),o.join(`
`)}function fr(e,t){return [...e.childNodes].map(n=>qy(n,t)).join("")}function qy(e,t=false){var a;if(e.nodeType===Node.TEXT_NODE){const i=e.textContent||"";return !t&&!i.trim()?"":Ka(i)}if(!(e instanceof Element)||e.getAttribute("aria-hidden")==="true")return "";const n=e.tagName.toLowerCase();if(["button","script","style","meta","svg","noscript"].includes(n))return "";const r=n1(e);if(r&&(e.classList.contains("katex")||e.classList.contains("katex-display")||n==="math"))return r1(e)?`
$$
${r}
$$
`:`$${r}$`;if(n==="div"&&jy(e,"pre"))return `
${Qp(e)}
`;if(n==="pre")return `
${Qp(e)}
`;if(n==="table")return `
${o1(e)}
`;if(n==="ul"||n==="ol")return `
${Hy(e)}
`;if(n==="img"){const i=Bn(e.getAttribute("src")).trim();return !i||/profile_images|emoji/.test(i)?"":`})`}if(n==="video"){const i=e.getAttribute("src")||((a=e.querySelector("source"))==null?void 0:a.getAttribute("src"))||"";return i?`[video](${Ri(i)})`:""}if(n==="a"){const i=br(fr(e,true)),s=Bn(e.getAttribute("href")).trim();return s?`[${i||Ka(s)}](${Ri(s)})`:i}if(n==="code")return Ny(br(e.textContent||""));if(n==="strong"||n==="b")return Vu(fr(e,true),"**");if(n==="em"||n==="i")return Vu(fr(e,true),"*");if(n==="del"||n==="s")return Vu(fr(e,true),"~~");if(n==="u")return `<u>${br(fr(e,true))}</u>`;if(n==="mark")return `==${br(fr(e,true))}==`;if(n==="sup")return `<sup>${br(fr(e,true))}</sup>`;if(n==="sub")return `<sub>${br(fr(e,true))}</sub>`;if(n==="br")return t?`
`:`
`;if(n==="hr")return `
---
`;if(/^h[1-6]$/.test(n)){const i=Number(n.slice(1));return `
${"#".repeat(i)} ${br(fr(e,true))}
`}if(n==="blockquote")return `
${la(fr(e,false)).split(`
`).map(s=>`> ${s}`).join(`
`)}
`;if(n==="p"||n==="figcaption")return `
${br(fr(e,true))}
`;if(n==="figure")return `
${la(fr(e,false))}
`;if(n==="article"&&e.hasAttribute("data-tweet-id")){const i=e.getAttribute("data-tweet-id")||"",s=br(e.textContent||""),l=s?s.split(`
`).map(c=>`> ${c}`):[];return i&&l.push(`> https://x.com/i/status/${i}`),`
${l.join(`
`)}
`}const o=fr(e,t);return t?o:`
${o}
`}function a1(e){const t=e.matches("h1")?e:e.querySelector("h1"),n=t==null?void 0:t.parentElement;return !t||!n||!e.contains(n)?"":la(fr(n,false))}function Xa(e,t,n){const r=JSON.parse(e.responseText),o=t(r),a=i1(o),i=new Set,s=[];for(const l of a){const c=n(l);!c||i.has(c.rest_id)||(i.add(c.rest_id),s.push(c));}return s}function i1(e){var n,r,o,a;const t=[];for(const i of e){if(i.type==="TimelineAddEntries"){const l=i;for(const c of l.entries??[])qa(c)&&t.push(c);continue}if(i.type==="TimelinePinEntry"){const c=i.entry;c&&qa(c)&&t.push(c);continue}if(i.type==="TimelineAddToModule"){const l=i;for(const c of l.moduleItems??[]){const h=(n=c==null?void 0:c.item)==null?void 0:n.itemContent;h&&t.push({entryId:c.entryId??"",sortIndex:"0",content:{entryType:"TimelineTimelineItem",__typename:"TimelineTimelineItem",itemContent:h,clientEventInfo:((r=c==null?void 0:c.item)==null?void 0:r.clientEventInfo)??null}});}continue}const s=i;if(Array.isArray(s==null?void 0:s.entries)){for(const l of s.entries)l&&qa(l)&&t.push(l);continue}if(s!=null&&s.entry&&qa(s.entry)){t.push(s.entry);continue}if(Array.isArray(s==null?void 0:s.moduleItems)){for(const l of s.moduleItems??[]){const c=(o=l==null?void 0:l.item)==null?void 0:o.itemContent;c&&t.push({entryId:l.entryId??"",sortIndex:"0",content:{entryType:"TimelineTimelineItem",__typename:"TimelineTimelineItem",itemContent:c,clientEventInfo:((a=l==null?void 0:l.item)==null?void 0:a.clientEventInfo)??null}});}continue}}return t}function Gn(e){const t=e.tweet_results.result;return t?rh(t):(Ae.warn("TimelineTweet is empty. This could happen when the tweet's visibility is limited by Twitter.",e),null)}function go(e){const t=e.user_results.result;return !t||t.__typename!=="User"?(Ae.warn("TimelineUser is empty. This could happen when the user's account is suspended or deleted.",e),null):t}function qa(e){return e.content.entryType==="TimelineTimelineItem"}function th(e){return qa(e)&&e.entryId.startsWith("tweet-")&&e.content.itemContent.__typename==="TimelineTweet"}function nh(e){return qa(e)&&e.entryId.startsWith("user-")&&e.content.itemContent.__typename==="TimelineUser"}function wa(e){return e.content.entryType==="TimelineTimelineModule"}function s1(e){return wa(e)&&e.entryId.startsWith("conversationthread-")&&Array.isArray(e.content.items)}function l1(e){return wa(e)&&e.entryId.startsWith("profile-conversation-")&&Array.isArray(e.content.items)}function c1(e){return wa(e)&&e.entryId.startsWith("profile-grid-")&&Array.isArray(e.content.items)}function u1(e){return wa(e)&&e.entryId.startsWith("search-grid-")&&Array.isArray(e.content.items)}function d1(e){return wa(e)&&e.entryId.startsWith("list-search-")&&Array.isArray(e.content.items)}function f1(e){return wa(e)&&e.entryId.startsWith("communities-grid-")&&Array.isArray(e.content.items)}function rh(e){var t,n;try{if(e.__typename==="Tweet")return em(e);if(e.__typename==="TweetWithVisibilityResults")return em(e.tweet);if(e.__typename==="TweetTombstone")return Ae.warn(`TweetTombstone received (Reason: ${(n=(t=e.tombstone)==null?void 0:t.text)==null?void 0:n.text})`,e),null;if(e.__typename==="TweetUnavailable")return Ae.warn("TweetUnavailable received (Reason: unknown)",e),null;Ae.debug(e),Ae.errorWithBanner("Unknown tweet type received");}catch(r){Ae.debug(e),Ae.errorWithBanner("Failed to extract tweet",r);}return null}function zi(e){var t;return (t=e.legacy.retweeted_status_result)!=null&&t.result?rh(e.legacy.retweeted_status_result.result):null}function Wc(e){var t;return (t=e.quoted_status_result)!=null&&t.result?rh(e.quoted_status_result.result):null}function Gs(e){var n,r;const t=(r=(n=e.article)==null?void 0:n.article_results)==null?void 0:r.result;return t&&typeof t=="object"?t:null}function Vy(e){const t=String(e||"").trim();return t?t.replace(/\?(?:format|name)=[^&]+(?:&name=[^&]+)?$/i,""):""}function Xd(e){const t=String(e.url||"").trim();if(!t)return null;const n=ja(e.tweet),r=String(e.mediaId||`${e.idPrefix||"synthetic"}_${e.tweet.rest_id}`).trim(),o=String(e.mediaKey||`${e.idPrefix||"synthetic"}_${r}`).trim(),a=Number(e.width||0)||0,i=Number(e.height||0)||0;return {display_url:t,expanded_url:n,id_str:r||e.tweet.rest_id,indices:[0,0],media_url_https:t,type:"photo",url:t,sizes:{large:{h:i,w:a,resize:"fit"},medium:{h:i,w:a,resize:"fit"},small:{h:i,w:a,resize:"fit"},thumb:{h:i,w:a,resize:"fit"}},original_info:{height:i,width:a},media_results:{result:{media_key:o||`synthetic_${e.tweet.rest_id}`}},ext_alt_text:String(e.altText||"").trim()||void 0,media_key:o||`synthetic_${e.tweet.rest_id}`}}function zy(e,t){var a,i,s,l,c,h;if(!t)return [];const n=new Map,r=u=>{if(!u)return;const m=Vy(u.media_url_https);!m||n.has(m)||n.set(m,u);};for(const u of t.media_entities??[])r(Xd({tweet:e,url:((a=u==null?void 0:u.media_info)==null?void 0:a.original_img_url)||"",mediaId:(u==null?void 0:u.media_id)||(u==null?void 0:u.id)||(t==null?void 0:t.rest_id)||e.rest_id,mediaKey:(u==null?void 0:u.media_key)||null,width:((i=u==null?void 0:u.media_info)==null?void 0:i.original_img_width)||0,height:((s=u==null?void 0:u.media_info)==null?void 0:s.original_img_height)||0,altText:(t==null?void 0:t.title)||(t==null?void 0:t.preview_text)||null,idPrefix:"article"}));const o=t.cover_media;return r(Xd({tweet:e,url:((l=o==null?void 0:o.media_info)==null?void 0:l.original_img_url)||"",mediaId:(o==null?void 0:o.media_id)||(t==null?void 0:t.rest_id)||e.rest_id,mediaKey:(o==null?void 0:o.media_key)||null,width:((c=o==null?void 0:o.media_info)==null?void 0:c.original_img_width)||0,height:((h=o==null?void 0:o.media_info)==null?void 0:h.original_img_height)||0,altText:(t==null?void 0:t.title)||(t==null?void 0:t.preview_text)||null,idPrefix:"article"})),Array.from(n.values())}function h1(e){const t=[e.card,e.unified_card],n=new Map,r=a=>{if(!a)return;if(Array.isArray(a)){for(const s of a)r(s);return}if(typeof a!="object")return;const i=a;for(const[s,l]of Object.entries(i)){if(s==="url"&&typeof l=="string"&&/https:\/\/pbs\.twimg\.com\/(?:card_img|media)\//.test(l)){const c=Vy(l);c&&!n.has(c)&&n.set(c,l);continue}r(l);}};for(const a of t)r(a);let o=0;return Array.from(n.values()).slice(0,12).map(a=>Xd({tweet:e,url:a,mediaId:`${e.rest_id}_${o++}`,mediaKey:`card_${e.rest_id}_${o}`,altText:ha(e),idPrefix:"card"})).filter(a=>!!a)}function Ga(e){var r,o,a;const t=(r=e.legacy)==null?void 0:r.created_at;if(typeof t=="string"&&t.trim()){const i=+Ni(t);if(Number.isFinite(i)&&i>0)return i}const n=Number(((a=(o=Gs(e))==null?void 0:o.metadata)==null?void 0:a.first_published_at_secs)||0);return Number.isFinite(n)&&n>0?n*1e3:Date.now()}function Yc(e){return e.core.user_results.result.core.screen_name}function Po(e){var a,i,s,l;const t=zi(e)??e;if((a=t.legacy.extended_entities)!=null&&a.media)return t.legacy.extended_entities.media;const n=((s=(i=t.legacy)==null?void 0:i.entities)==null?void 0:s.media)??[];if(n.length)return n;const r=zy(t,Gs(t));if(r.length)return r;if((Number(((l=t.twe_private_fields)==null?void 0:l.media_count)||0)||0)>0){const c=h1(t);if(c.length)return c}return []}function p1(e){return zi(e)?false:Po(e).length>0}function m1(e){const t=Po(e),n=[];for(const r of t){const o=g1(r);for(const a of o)n.some(i=>i.user_id===a.user_id)||n.push(a);}return n}function ha(e){var i,s,l;const t=Gs(e),n=(i=e.twe_private_fields)==null?void 0:i.article_markdown,r=n&&n.trim()||Ks(t);if(r)return r;const o=(s=e.note_tweet)==null?void 0:s.note_tweet_results.result.text;if(o&&o.trim())return o;const a=(l=e.legacy)==null?void 0:l.full_text;return a&&a.trim()?a:""}function em(e){var n,r;if(!e.legacy){const o=Gs(e);if(!o||!((r=(n=e.core)==null?void 0:n.user_results)!=null&&r.result))return Ae.warn("Empty tweet received",e),null;const a=Ga(e),i=ha(e),s=zy(e,o),l=e.core.user_results.result.rest_id||String(e.core.user_results.result.id||"").split(":").pop()||"";e.legacy={bookmark_count:0,bookmarked:false,created_at:new Date(a).toUTCString(),conversation_id_str:e.rest_id,display_text_range:[0,i.length],entities:{media:s.length?s:void 0,user_mentions:[],urls:[],hashtags:[],symbols:[],timestamps:[]},extended_entities:s.length?{media:s}:void 0,favorite_count:0,favorited:false,full_text:i,is_quote_status:false,lang:"und",possibly_sensitive:false,possibly_sensitive_editable:false,quote_count:0,reply_count:0,retweet_count:0,retweeted:false,user_id_str:l,id_str:e.rest_id};}const t=Ks(Gs(e));return t&&(e.twe_private_fields={...e.twe_private_fields,article_markdown:t,article_markdown_version:eh}),e}function tm(e,t){const n=t.media_key;return Po(e).findIndex(r=>r.media_key===n)}function Wa(e){var t;if(e.type==="video"||e.type==="animated_gif"){const n=((t=e.video_info)==null?void 0:t.variants)??[];let r=n[0];for(const o of n)o.bitrate&&o.bitrate>((r==null?void 0:r.bitrate)??0)&&(r=o);return (r==null?void 0:r.url)??e.media_url_https}return $i(e.media_url_https,"orig")}function g1(e){var t,n;return ((n=(t=e.features)==null?void 0:t.all)==null?void 0:n.tags)??[]}function $i(e,t="medium"){if(!e)return "";try{const i=new URL(e);if(i.hostname==="pbs.twimg.com"){const s=i.searchParams.get("format"),l=i.pathname.match(/^(\/media\/.+)\.(\w+)$/);if(l){const[,c,h]=l;return i.pathname=c||i.pathname,i.search="",i.searchParams.set("format",h||s||"jpg"),i.searchParams.set("name",t),i.toString()}if(s||i.searchParams.has("name"))return i.searchParams.set("name",t),i.toString()}}catch{}const n=/^(https?:\/\/pbs\.twimg\.com\/media\/.+)\.(\w+)$/,r=e.match(n);if(!r){const i=e.includes("?")?"&":"?";return `${e}${i}name=${t}`}const[,o,a]=r;return `${o}?format=${a}&name=${t}`}function oh(e){return e.replace(/_normal\.(jpe?g|png|gif)$/,".$1")}function Zd(e){const n=/format=(\w+)|\.(\w+)$|\.(\w+)\?.+$/.exec(e);return (n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??"jpg"}function ja(e){var n;const t=String(((n=e.legacy)==null?void 0:n.id_str)||e.rest_id||"").trim();return `https://twitter.com/${Yc(e)}/status/${t}`}function Rs(e){return `https://twitter.com/${typeof e=="string"?e:e.core.screen_name}`}function _1(e){return `https://twitter.com/${e.legacy.in_reply_to_screen_name}/status/${e.legacy.in_reply_to_status_id_str}`}function rl({title:e,description:t,children:n,onClick:r,active:o,indicatorColor:a="bg-secondary",panelClass:i,contentClass:s,buttonClass:l}){return f("section",{class:on("module-panel -ml-2 overflow-visible pl-2 transition-colors duration-150",i),children:[f("div",{class:on("h-12 flex items-center justify-start",s),children:[f("div",{class:"relative flex h-4 w-4 mr-3 shrink-0",children:[o&&f("span",{class:on("animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",a)}),f("span",{class:on("relative inline-flex rounded-full h-4 w-4",a)})]}),f("div",{class:"flex flex-col flex-grow",children:[f("p",{class:"text-base m-0 font-medium leading-none",children:e}),f("p",{class:"text-sm text-base-content leading-5 text-opacity-70 m-0",children:t})]}),f("button",{class:on("btn btn-sm p-0 w-9 h-9",l),onClick:r,children:f(_k,{})})]}),n]})}function vr({show:e,onClose:t,title:n,children:r,class:o,fullscreen:a}){const[i,s]=$e(null);if(ot(()=>{!e||typeof document>"u"||s(document.getElementById("twe-root")??document.body);},[e]),!e)return f("dialog",{class:"modal"});const l=f("dialog",{class:on("modal modal-open z-[6000]",a&&"!p-0"),open:true,children:[f("div",{class:on("modal-box p-3 flex min-h-0 flex-col",a&&"h-screen w-screen max-h-screen max-w-none rounded-none border-0 p-0 shadow-none",o),children:[f("header",{class:on("flex items-center h-8 mb-1.5",a&&"mb-0 h-11 border-b border-base-300 px-3"),children:[f("div",{onClick:t,class:"w-8 h-8 mr-2 cursor-pointer flex justify-center items-center transition-colors duration-200 rounded-full hover:bg-base-200",children:f(uc,{})}),f("h2",{class:"leading-none text-lg m-0 font-semibold tracking-[0.01em]",children:n})]}),f(Ts,{children:r})]}),f("form",{method:"dialog",class:"modal-backdrop",children:f("div",{onClick:t})})]});return i?OS(l,i):l}function Ky(e){const{options:t,selected:n,onChange:r}=e,[o,a]=$e(""),i=t.filter(c=>n.includes(c.value)),s=St(()=>{const c=o.trim().toLowerCase();return (c?t.filter(u=>u.label.toLowerCase().includes(c)||String(u.value).toLowerCase().includes(c)):t).slice(0,250)},[o,t]),l=c=>{const h=c.target;h.checked?r([...new Set([...n,h.value])]):r(n.filter(u=>u!==h.value));};return f("div",{class:on("dropdown",e.class),children:[f("div",{tabIndex:0,class:"input input-bordered input-sm flex flex-row items-center space-x-1 cursor-pointer min-h-9",children:i.length?f("div",{class:"min-w-0 truncate text-xs font-medium",children:e.selectedSummary?e.selectedSummary(i.length):`${i.length} selected`}):f("span",{class:"text-xs opacity-60 select-none",children:e.placeholder||"Select..."})}),f("ul",{tabIndex:0,class:"dropdown-content menu menu-sm z-10 w-full rounded-box bg-base-100 p-2 shadow",children:[t.length>80?f("li",{class:"mb-1",children:f("input",{class:"input input-bordered input-xs w-full",value:o,placeholder:"Filter...",onInput:c=>a(c.target.value)})}):null,s.map(c=>f("li",{children:f("label",{class:"label cursor-pointer justify-start",children:[f("input",{type:"checkbox",class:"checkbox checkbox-accent checkbox-sm",value:c.value,checked:n.includes(c.value),onChange:l}),f("span",{class:"label-text ml-1",children:c.label})]})},c.value))]})]})}function Gy({data:e,onClick:t}){return f("div",{class:"flex max-w-full flex-row flex-wrap items-start gap-1",children:[e.map(n=>{var r;return f("div",{class:"flex-shrink-0 block cursor-pointer relative w-12 h-12 rounded bg-base-300 overflow-hidden",onClick:()=>t(n),children:[f("img",{class:"w-full h-full object-cover",src:$i(n.media_url_https,"thumb"),alt:n.ext_alt_text||"",title:n.ext_alt_text||"",loading:"lazy",decoding:"async"}),n.type!=="photo"&&f("div",{class:"absolute bottom-0.5 left-0.5 h-4 w-max px-0.5 text-xs text-white bg-black bg-opacity-30 leading-4 text-center rounded",children:n.type==="video"?by((r=n.video_info)==null?void 0:r.duration_millis):"GIF"}),n.type==="photo"&&n.ext_alt_text&&f("div",{class:"absolute bottom-0.5 left-0.5 h-4 w-max px-0.5 text-xs text-white bg-black bg-opacity-30 leading-4 text-center rounded",children:"ALT"})]},n.media_key??n.id_str)}),e.length?null:"N/A"]})}const Qn={major:1,minor:0},Hn=1;function Qd(e){if(Array.isArray(e))return e.map(Qd);if(e===null||typeof e!="object")return e;const t=e;return Object.fromEntries(Object.keys(t).sort().map(n=>[n,Qd(t[n])]))}function Sn(e){const t=JSON.stringify(Qd(e));if(t===void 0)throw new Error("unsupported undefined JSON value");return t}function y1(){const e=globalThis.crypto;if(!(e!=null&&e.subtle))throw new Error("Web Crypto is unavailable");return e}async function pa(e){const t=typeof e=="string"?e:Sn(e),n=new TextEncoder().encode(t),r=await y1().subtle.digest("SHA-256",n);return Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("")}function b1(e,t){const n={namespace_id:e,kind:t.kind,schema_revision:t.schema_revision,provenance:t.provenance,observed_at_ms:t.observed_at_ms};return t.kind==="entity_upsert"?(n.target=t.target,n.payload=t.payload):t.kind==="relationship_upsert"?(n.relationship_kind=t.relationship_kind,n.subject=t.subject,n.object=t.object,n.qualifier=t.qualifier,n.payload=t.payload):t.kind==="enrichment_upsert"?(n.target=t.target,n.enrichment_kind=t.enrichment_kind,n.payload=t.payload):(n.target_kind=t.target_kind,n.target_id=t.target_id,n.relationship_kind=t.relationship_kind??null,n.deletion_id=t.deletion_id),n}async function Fr(e,t){return pa(b1(e,t))}function w1(e,t){return {namespace_id:e,schema_revisions:[...new Set(t.mutations.map(n=>n.schema_revision))].sort((n,r)=>n-r),mutations:t.mutations.map(n=>({client_seq:n.client_seq,mutation_id:n.mutation_id,kind:n.kind,record_hash:n.record_hash}))}}async function Wy(e,t){return pa(w1(e,t))}function v1(e,t,n,r,o,a=Hn){return {namespace_id:e,schema_revision:a,prior_chain_hash:t,batch_hash:n,archive_sequence:{from:r,to:o}}}async function k1(e,t,n,r,o,a=Hn){return pa(v1(e,t,n,r,o,a))}function mr(e){return typeof e=="string"&&/^[0-9a-f]{64}$/.test(e)}function ta(e){if(!e||typeof e!="object")return false;const t=e;return typeof t.namespace_id=="string"&&Number.isInteger(t.archive_seq)&&Number(t.archive_seq)>=0&&mr(t.chain_hash)&&t.schema_revision===Hn}function x1(e){if(!e||typeof e!="object")return false;const t=e;return !!t.protocol&&t.protocol.major===Qn.major&&t.protocol.minor===Qn.minor&&typeof t.request_id=="string"&&typeof t.archive_id=="string"&&typeof t.namespace_id=="string"&&typeof t.client_id=="string"&&typeof t.client_epoch=="string"&&typeof t.batch_id=="string"&&(t.result==="committed"||t.result==="duplicate")&&nm(t.client_sequence)&&nm(t.archive_sequence)&&Number.isInteger(t.mutation_count)&&mr(t.batch_hash)&&mr(t.prior_chain_hash)&&mr(t.chain_hash)&&ta(t.checkpoint)&&typeof t.capability_revision=="string"}function nm(e){if(!e||typeof e!="object")return false;const t=e;return Number.isInteger(t.from)&&Number.isInteger(t.to)&&Number(t.from)>=1&&Number(t.to)>=Number(t.from)}const S1=(function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"})(),C1=function(e){return "/"+e},rm={},Yy=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let i=function(c){return Promise.all(c.map(h=>Promise.resolve(h).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=i(n.map(c=>{if(c=C1(c),c in rm)return;rm[c]=true;const h=c.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":S1,h||(m.as="script"),m.crossOrigin="",m.href=c,l&&m.setAttribute("nonce",l),document.head.appendChild(m),h)return new Promise((g,y)=>{m.addEventListener("load",g),m.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)));})}));}function a(i){const s=new Event("vite:preloadError",{cancelable:true});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return o.then(i=>{for(const s of i||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})},T1=4294967296;function om(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,"0")}async function Ei(e){var r;const t=typeof e=="string"?new TextEncoder().encode(e):e;if((r=globalThis.crypto)!=null&&r.subtle){const o=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),a=await globalThis.crypto.subtle.digest("SHA-256",o);return [...new Uint8Array(a)].map(i=>i.toString(16).padStart(2,"0")).join("")}let n="";for(let o=0;o<t.length;o+=4096)n+=om(String.fromCharCode(...t.slice(o,o+4096)));return om(`${t.length}:${n}:${T1}`)}async function Jy(e){return `bundle_${(await Ei(e)).slice(0,24)}`}async function Xy(e,t,n){return `record_${(await Ei(`${e}:${t}:${n}`)).slice(0,32)}`}const Zy={includeViewerAccountId:false,includeSourceCaptureTimes:false,includeRawGraphQL:false,includePrivateNotes:false,includeMediaBlobs:false,visibility:"shared_safe"};function Qy(e){return {visibility:e.visibility,includesViewerAccountId:e.includeViewerAccountId,includesSourceCaptureTimes:e.includeSourceCaptureTimes,includesRawGraphQL:e.includeRawGraphQL,includesPrivateNotes:e.includePrivateNotes,includesMediaBlobs:e.includeMediaBlobs,warnings:M1(e)}}function M1(e){const t=[];return e.includeViewerAccountId&&t.push("Includes the exporting account identifier."),e.includeSourceCaptureTimes&&t.push("Includes local capture/import timestamps."),e.includeRawGraphQL&&t.push("Includes raw API payloads that may contain unrelated account context."),e.includePrivateNotes&&t.push("Includes user-authored local notes or labels."),e.includeMediaBlobs&&t.push("Includes downloaded media files, increasing size and redistribution risk."),e.visibility==="public"&&t.length&&t.unshift("Public bundle includes fields that should be reviewed before sharing."),t}var An=Uint8Array,Ir=Uint16Array,ah=Int32Array,Jc=new An([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xc=new An([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ef=new An([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),eb=function(e,t){for(var n=new Ir(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var o=new ah(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)o[a]=a-n[r]<<5|r;return {b:n,r:o}},tb=eb(Jc,2),nb=tb.b,tf=tb.r;nb[28]=258,tf[258]=28;var rb=eb(Xc,0),I1=rb.b,am=rb.r,nf=new Ir(32768);for(var bn=0;bn<32768;++bn){var Wo=(bn&43690)>>1|(bn&21845)<<1;Wo=(Wo&52428)>>2|(Wo&13107)<<2,Wo=(Wo&61680)>>4|(Wo&3855)<<4,nf[bn]=((Wo&65280)>>8|(Wo&255)<<8)>>1;}var _o=(function(e,t,n){for(var r=e.length,o=0,a=new Ir(t);o<r;++o)e[o]&&++a[e[o]-1];var i=new Ir(t);for(o=1;o<t;++o)i[o]=i[o-1]+a[o-1]<<1;var s;if(n){s=new Ir(1<<t);var l=15-t;for(o=0;o<r;++o)if(e[o])for(var c=o<<4|e[o],h=t-e[o],u=i[e[o]-1]++<<h,m=u|(1<<h)-1;u<=m;++u)s[nf[u]>>l]=c;}else for(s=new Ir(r),o=0;o<r;++o)e[o]&&(s[o]=nf[i[e[o]-1]++]>>15-e[o]);return s}),ma=new An(288);for(var bn=0;bn<144;++bn)ma[bn]=8;for(var bn=144;bn<256;++bn)ma[bn]=9;for(var bn=256;bn<280;++bn)ma[bn]=7;for(var bn=280;bn<288;++bn)ma[bn]=8;var Ws=new An(32);for(var bn=0;bn<32;++bn)Ws[bn]=5;var R1=_o(ma,9,0),E1=_o(ma,9,1),A1=_o(Ws,5,0),D1=_o(Ws,5,1),zu=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Gr=function(e,t,n){var r=t/8|0;return (e[r]|e[r+1]<<8)>>(t&7)&n},Ku=function(e,t){var n=t/8|0;return (e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},ih=function(e){return (e+7)/8|0},ol=function(e,t,n){return (t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new An(e.subarray(t,n))},P1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],pr=function(e,t,n){var r=new Error(t||P1[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,pr),!n)throw r;return r},O1=function(e,t,n,r){var o=e.length,a=r?r.length:0;if(!o||t.f&&!t.l)return n||new An(0);var i=!n,s=i||t.i!=2,l=t.i;i&&(n=new An(o*3));var c=function(_e){var ve=n.length;if(_e>ve){var Ye=new An(Math.max(ve*2,_e));Ye.set(n),n=Ye;}},h=t.f||0,u=t.p||0,m=t.b||0,g=t.l,y=t.d,b=t.m,k=t.n,S=o*8;do{if(!g){h=Gr(e,u,1);var M=Gr(e,u+1,3);if(u+=3,M)if(M==1)g=E1,y=D1,b=9,k=5;else if(M==2){var I=Gr(e,u,31)+257,O=Gr(e,u+10,15)+4,U=I+Gr(e,u+5,31)+1;u+=14;for(var E=new An(U),v=new An(19),L=0;L<O;++L)v[ef[L]]=Gr(e,u+L*3,7);u+=O*3;for(var $=zu(v),xe=(1<<$)-1,G=_o(v,$,1),L=0;L<U;){var le=G[Gr(e,u,xe)];u+=le&15;var T=le>>4;if(T<16)E[L++]=T;else {var Q=0,ce=0;for(T==16?(ce=3+Gr(e,u,3),u+=2,Q=E[L-1]):T==17?(ce=3+Gr(e,u,7),u+=3):T==18&&(ce=11+Gr(e,u,127),u+=7);ce--;)E[L++]=Q;}}var me=E.subarray(0,I),pe=E.subarray(I);b=zu(me),k=zu(pe),g=_o(me,b,1),y=_o(pe,k,1);}else pr(1);else {var T=ih(u)+4,P=e[T-4]|e[T-3]<<8,N=T+P;if(N>o){l&&pr(0);break}s&&c(m+P),n.set(e.subarray(T,N),m),t.b=m+=P,t.p=u=N*8,t.f=h;continue}if(u>S){l&&pr(0);break}}s&&c(m+131072);for(var we=(1<<b)-1,z=(1<<k)-1,ae=u;;ae=u){var Q=g[Ku(e,u)&we],Le=Q>>4;if(u+=Q&15,u>S){l&&pr(0);break}if(Q||pr(2),Le<256)n[m++]=Le;else if(Le==256){ae=u,g=null;break}else {var fe=Le-254;if(Le>264){var L=Le-257,Pe=Jc[L];fe=Gr(e,u,(1<<Pe)-1)+nb[L],u+=Pe;}var it=y[Ku(e,u)&z],X=it>>4;it||pr(3),u+=it&15;var pe=I1[X];if(X>3){var Pe=Xc[X];pe+=Ku(e,u)&(1<<Pe)-1,u+=Pe;}if(u>S){l&&pr(0);break}s&&c(m+131072);var ne=m+fe;if(m<pe){var H=a-pe,se=Math.min(pe,ne);for(H+m<0&&pr(3);m<se;++m)n[m]=r[H+m];}for(;m<ne;++m)n[m]=n[m-pe];}}t.l=g,t.p=ae,t.b=m,t.f=h,g&&(h=1,t.m=b,t.d=y,t.n=k);}while(!h);return m!=n.length&&i?ol(n,0,m):n.subarray(0,m)},xo=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8;},cs=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16;},Gu=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,a=n.slice();if(!o)return {t:ab,l:0};if(o==1){var i=new An(n[0].s+1);return i[n[0].s]=1,{t:i,l:1}}n.sort(function(N,I){return N.f-I.f}),n.push({s:-1,f:25001});var s=n[0],l=n[1],c=0,h=1,u=2;for(n[0]={s:-1,f:s.f+l.f,l:s,r:l};h!=o-1;)s=n[n[c].f<n[u].f?c++:u++],l=n[c!=h&&n[c].f<n[u].f?c++:u++],n[h++]={s:-1,f:s.f+l.f,l:s,r:l};for(var m=a[0].s,r=1;r<o;++r)a[r].s>m&&(m=a[r].s);var g=new Ir(m+1),y=rf(n[h-1],g,0);if(y>t){var r=0,b=0,k=y-t,S=1<<k;for(a.sort(function(I,O){return g[O.s]-g[I.s]||I.f-O.f});r<o;++r){var M=a[r].s;if(g[M]>t)b+=S-(1<<y-g[M]),g[M]=t;else break}for(b>>=k;b>0;){var T=a[r].s;g[T]<t?b-=1<<t-g[T]++-1:++r;}for(;r>=0&&b;--r){var P=a[r].s;g[P]==t&&(--g[P],++b);}y=t;}return {t:new An(g),l:y}},rf=function(e,t,n){return e.s==-1?Math.max(rf(e.l,t,n+1),rf(e.r,t,n+1)):t[e.s]=n},im=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ir(++t),r=0,o=e[0],a=1,i=function(l){n[r++]=l;},s=1;s<=t;++s)if(e[s]==o&&s!=t)++a;else {if(!o&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0);}else if(a>3){for(i(o),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0);}for(;a--;)i(o);a=1,o=e[s];}return {c:n.subarray(0,r),n:t}},us=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},ob=function(e,t,n){var r=n.length,o=ih(t+2);e[o]=r&255,e[o+1]=r>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var a=0;a<r;++a)e[o+a+4]=n[a];return (o+4+r)*8},sm=function(e,t,n,r,o,a,i,s,l,c,h){xo(t,h++,n),++o[256];for(var u=Gu(o,15),m=u.t,g=u.l,y=Gu(a,15),b=y.t,k=y.l,S=im(m),M=S.c,T=S.n,P=im(b),N=P.c,I=P.n,O=new Ir(19),U=0;U<M.length;++U)++O[M[U]&31];for(var U=0;U<N.length;++U)++O[N[U]&31];for(var E=Gu(O,7),v=E.t,L=E.l,$=19;$>4&&!v[ef[$-1]];--$);var xe=c+5<<3,G=us(o,ma)+us(a,Ws)+i,le=us(o,m)+us(a,b)+i+14+3*$+us(O,v)+2*O[16]+3*O[17]+7*O[18];if(l>=0&&xe<=G&&xe<=le)return ob(t,h,e.subarray(l,l+c));var Q,ce,me,pe;if(xo(t,h,1+(le<G)),h+=2,le<G){Q=_o(m,g,0),ce=m,me=_o(b,k,0),pe=b;var we=_o(v,L,0);xo(t,h,T-257),xo(t,h+5,I-1),xo(t,h+10,$-4),h+=14;for(var U=0;U<$;++U)xo(t,h+3*U,v[ef[U]]);h+=3*$;for(var z=[M,N],ae=0;ae<2;++ae)for(var Le=z[ae],U=0;U<Le.length;++U){var fe=Le[U]&31;xo(t,h,we[fe]),h+=v[fe],fe>15&&(xo(t,h,Le[U]>>5&127),h+=Le[U]>>12);}}else Q=R1,ce=ma,me=A1,pe=Ws;for(var U=0;U<s;++U){var Pe=r[U];if(Pe>255){var fe=Pe>>18&31;cs(t,h,Q[fe+257]),h+=ce[fe+257],fe>7&&(xo(t,h,Pe>>23&31),h+=Jc[fe]);var it=Pe&31;cs(t,h,me[it]),h+=pe[it],it>3&&(cs(t,h,Pe>>5&8191),h+=Xc[it]);}else cs(t,h,Q[Pe]),h+=ce[Pe];}return cs(t,h,Q[256]),h+ce[256]},L1=new ah([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ab=new An(0),N1=function(e,t,n,r,o,a){var i=a.z||e.length,s=new An(r+i+5*(1+Math.ceil(i/7e3))+o),l=s.subarray(r,s.length-o),c=a.l,h=(a.r||0)&7;if(t){h&&(l[0]=a.r>>3);for(var u=L1[t-1],m=u>>13,g=u&8191,y=(1<<n)-1,b=a.p||new Ir(32768),k=a.h||new Ir(y+1),S=Math.ceil(n/3),M=2*S,T=function(Xe){return (e[Xe]^e[Xe+1]<<S^e[Xe+2]<<M)&y},P=new ah(25e3),N=new Ir(288),I=new Ir(32),O=0,U=0,E=a.i||0,v=0,L=a.w||0,$=0;E+2<i;++E){var xe=T(E),G=E&32767,le=k[xe];if(b[G]=le,k[xe]=G,L<=E){var Q=i-E;if((O>7e3||v>24576)&&(Q>423||!c)){h=sm(e,l,0,P,N,I,U,v,$,E-$,h),v=O=U=0,$=E;for(var ce=0;ce<286;++ce)N[ce]=0;for(var ce=0;ce<30;++ce)I[ce]=0;}var me=2,pe=0,we=g,z=G-le&32767;if(Q>2&&xe==T(E-z))for(var ae=Math.min(m,Q)-1,Le=Math.min(32767,E),fe=Math.min(258,Q);z<=Le&&--we&&G!=le;){if(e[E+me]==e[E+me-z]){for(var Pe=0;Pe<fe&&e[E+Pe]==e[E+Pe-z];++Pe);if(Pe>me){if(me=Pe,pe=z,Pe>ae)break;for(var it=Math.min(z,Pe-2),X=0,ce=0;ce<it;++ce){var ne=E-z+ce&32767,H=b[ne],se=ne-H&32767;se>X&&(X=se,le=ne);}}}G=le,le=b[G],z+=G-le&32767;}if(pe){P[v++]=268435456|tf[me]<<18|am[pe];var _e=tf[me]&31,ve=am[pe]&31;U+=Jc[_e]+Xc[ve],++N[257+_e],++I[ve],L=E+me,++O;}else P[v++]=e[E],++N[e[E]];}}for(E=Math.max(E,L);E<i;++E)P[v++]=e[E],++N[e[E]];h=sm(e,l,c,P,N,I,U,v,$,E-$,h),c||(a.r=h&7|l[h/8|0]<<3,h-=7,a.h=k,a.p=b,a.i=E,a.w=L);}else {for(var E=a.w||0;E<i+c;E+=65535){var Ye=E+65535;Ye>=i&&(l[h/8|0]=c,Ye=i),h=ob(l,h+1,e.subarray(E,Ye));}a.i=i;}return ol(s,0,r+ih(h)+o)},F1=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n;}return e})(),$1=function(){var e=-1;return {p:function(t){for(var n=e,r=0;r<t.length;++r)n=F1[n&255^t[r]]^n>>>8;e=n;},d:function(){return ~e}}},B1=function(e,t,n,r,o){if(!o&&(o={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),i=new An(a.length+e.length);i.set(a),i.set(e,a.length),e=i,o.w=a.length;}return N1(e,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,o)},ib=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},po=function(e,t){return e[t]|e[t+1]<<8},Wr=function(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Wu=function(e,t){return Wr(e,t)+Wr(e,t+4)*4294967296},Zn=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8;};function U1(e,t){return B1(e,t||{},0,0)}function j1(e,t){return O1(e,{i:2},t&&t.out,t&&t.dictionary)}var sb=function(e,t,n,r){for(var o in e){var a=e[o],i=t+o,s=r;Array.isArray(a)&&(s=ib(r,a[1]),a=a[0]),a instanceof An?n[i]=[a,s]:(n[i+="/"]=[new An(0),s],sb(a,i,n,r));}},lm=typeof TextEncoder<"u"&&new TextEncoder,of=typeof TextDecoder<"u"&&new TextDecoder,H1=0;try{of.decode(ab,{stream:!0}),H1=1;}catch{}var q1=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return {s:t,r:ol(e,n-1)};o?o==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):o&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r);}};function af(e,t){var n;if(lm)return lm.encode(e);for(var r=e.length,o=new An(e.length+(e.length>>1)),a=0,i=function(c){o[a++]=c;},n=0;n<r;++n){if(a+5>o.length){var s=new An(a+8+(r-n<<1));s.set(o),o=s;}var l=e.charCodeAt(n);l<128||t?i(l):l<2048?(i(192|l>>6),i(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|e.charCodeAt(++n)&1023,i(240|l>>18),i(128|l>>12&63),i(128|l>>6&63),i(128|l&63)):(i(224|l>>12),i(128|l>>6&63),i(128|l&63));}return ol(o,0,a)}function lb(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else {if(of)return of.decode(e);var o=q1(e),a=o.s,n=o.r;return n.length&&pr(8),a}}var V1=function(e,t){return t+30+po(e,t+26)+po(e,t+28)},z1=function(e,t,n){var r=po(e,t+28),o=lb(e.subarray(t+46,t+46+r),!(po(e,t+8)&2048)),a=t+46+r,i=Wr(e,t+20),s=n&&i==4294967295?K1(e,a):[i,Wr(e,t+24),Wr(e,t+42)],l=s[0],c=s[1],h=s[2];return [po(e,t+10),l,c,o,a+po(e,t+30)+po(e,t+32),h]},K1=function(e,t){for(;po(e,t)!=1;t+=4+po(e,t+2));return [Wu(e,t+12),Wu(e,t+4),Wu(e,t+20)]},sf=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&pr(9),t+=r+4;}return t},cm=function(e,t,n,r,o,a,i,s){var l=r.length,c=n.extra,h=s&&s.length,u=sf(c);Zn(e,t,i!=null?33639248:67324752),t+=4,i!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(a<0&&8),e[t++]=o&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var m=new Date(n.mtime==null?Date.now():n.mtime),g=m.getFullYear()-1980;if((g<0||g>119)&&pr(10),Zn(e,t,g<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),t+=4,a!=-1&&(Zn(e,t,n.crc),Zn(e,t+4,a<0?-a-2:a),Zn(e,t+8,n.size)),Zn(e,t+12,l),Zn(e,t+14,u),t+=16,i!=null&&(Zn(e,t,h),Zn(e,t+6,n.attrs),Zn(e,t+10,i),t+=14),e.set(r,t),t+=l,u)for(var y in c){var b=c[y],k=b.length;Zn(e,t,+y),Zn(e,t+2,k),e.set(b,t+4),t+=4+k;}return h&&(e.set(s,t),t+=h),t},G1=function(e,t,n,r,o){Zn(e,t,101010256),Zn(e,t+8,n),Zn(e,t+10,n),Zn(e,t+12,r),Zn(e,t+16,o);};function W1(e,t){t||(t={});var n={},r=[];sb(e,"",n,t);var o=0,a=0;for(var i in n){var s=n[i],l=s[0],c=s[1],h=c.level==0?0:8,u=af(i),m=u.length,g=c.comment,y=g&&af(g),b=y&&y.length,k=sf(c.extra);m>65535&&pr(11);var S=h?U1(l,c):l,M=S.length,T=$1();T.p(l),r.push(ib(c,{size:l.length,crc:T.d(),c:S,f:u,m:y,u:m!=i.length||y&&g.length!=b,o,compression:h})),o+=30+m+k+M,a+=76+2*(m+k)+(b||0)+M;}for(var P=new An(a+22),N=o,I=a-o,O=0;O<r.length;++O){var u=r[O];cm(P,u.o,u,u.f,u.u,u.c.length);var U=30+u.f.length+sf(u.extra);P.set(u.c,u.o+U),cm(P,o,u,u.f,u.u,u.c.length,u.o,u.m),o+=16+U+(u.m?u.m.length:0);}return G1(P,o,r.length,I,N),P}function Y1(e,t){for(var n={},r=e.length-22;Wr(e,r)!=101010256;--r)(!r||e.length-r>65558)&&pr(13);var o=po(e,r+8);if(!o)return {};var a=Wr(e,r+16),i=a==4294967295||o==65535;if(i){var s=Wr(e,r-12);i=Wr(e,s)==101075792,i&&(o=Wr(e,s+32),a=Wr(e,s+48));}for(var l=0;l<o;++l){var c=z1(e,a,i),h=c[0],u=c[1],m=c[2],g=c[3],y=c[4],b=c[5],k=V1(e,b);a=y,h?h==8?n[g]=j1(e.subarray(k,k+u),{out:new An(m)}):pr(14,"unknown compression type "+h):n[g]=ol(e,k,k+u);}return n}const J1=1e4,X1=128*1024*1024,Z1=512*1024*1024;function Q1(e){return !!e&&typeof e=="object"&&typeof e.arrayBuffer=="function"}function Tc(e){const t=new Uint8Array(e.byteLength);return t.set(e),t}async function eC(e){const t=await e.arrayBuffer();return Tc(new Uint8Array(t))}function tC(e){if(!e||typeof e!="object")return null;if(ArrayBuffer.isView(e)){const n=e;return Tc(new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}const t=e;return typeof t.byteLength=="number"&&typeof t.slice=="function"?Tc(new Uint8Array(e)):null}function cb(e){const t=e.replace(/\\/g,"/").replace(/^\/+/,"");if(!t||t.includes("..")||t.startsWith("/"))throw new Error(`Unsafe bundle ZIP path: ${e}`);return t}function nC(e){const t={};for(const n of e){const r=cb(n.path),o={level:n.level??6};t[r]=[typeof n.data=="string"?af(n.data):n.data,o];}return W1(t)}async function rC(e,t={}){const n=Q1(e)?await eC(e):tC(e);if(!n)throw new Error("Bundle ZIP input must be a File, Blob, ArrayBuffer, or Uint8Array.");const r=t.maxEntries??J1,o=t.maxEntryBytes??X1,a=t.maxTotalBytes??Z1,i=Y1(n),s=new Map;let l=0;for(const[c,h]of Object.entries(i)){if(s.size>=r)throw new Error(`Bundle ZIP exceeds ${r} entries.`);const u=cb(c);if(h.byteLength>o)throw new Error(`Bundle ZIP entry exceeds limit: ${u}`);if(l+=h.byteLength,l>a)throw new Error(`Bundle ZIP exceeds ${a} bytes after decompression.`);s.set(u,Tc(h));}return {entries:s,totalBytes:l}}function Yu(e,t){const n=e.get(t);if(!n)throw new Error(`Missing bundle ZIP entry: ${t}`);return lb(n)}function oC(e){return String(e||"bundle").trim().replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)||"bundle"}function um(e){if(typeof e=="string")try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?t.href:void 0}catch{return}}function aC(e,t){const r=String((e&&typeof e=="object"?e:{}).__typename||t.__typename||"").toLowerCase();return r.includes("tweet")||t.full_text||t.media?"tweet":r.includes("user")||t.screen_name||t.profile_image_url?"user":"unknown"}function iC(e,t){const r=(e&&typeof e=="object"?e:{}).twe_private_fields,o=[r==null?void 0:r.created_at,r==null?void 0:r.updated_at,t.created_at,t.time,t.date];for(const a of o){const i=Number(a);if(Number.isFinite(i)&&i>0)return i;if(typeof a=="string"){const s=Date.parse(a);if(Number.isFinite(s))return s}}}async function sC(e,t,n){const r=t.kind??aC(t.original,t.record),o=String(t.id||t.record.id||t.record.rest_id||""),a=await Xy(e,r,o||JSON.stringify(t.record)),i=n.includeOriginalMetadata?{...t.record,metadata:t.original}:t.record;return {id:a,kind:r,sourceId:o||void 0,observedAt:iC(t.original,t.record),sensitivity:"low",data:i,mediaRefs:Array.isArray(t.record.media)?t.record.media.map((s,l)=>({id:`${a}:media:${l}`,type:s.type==="photo"||s.type==="video"||s.type==="animated_gif"?s.type:"unknown",url:um(s.original),previewUrl:um(s.thumbnail),altText:typeof s.ext_alt_text=="string"?s.ext_alt_text:void 0})):void 0}}function lC(){return {records:0,tweets:0,users:0,socialEdges:0,captures:0,mediaBlobs:0}}function cC(e,t){e.records+=1,t.kind==="tweet"&&(e.tweets+=1),t.kind==="user"&&(e.users+=1),t.kind==="social_edge"&&(e.socialEdges+=1),t.kind==="capture"&&(e.captures+=1),e.mediaBlobs+=0;}async function ub(e,t){const n=Date.now(),r=typeof performance<"u"?performance.now():Date.now(),o=Math.max(0,Math.floor(Number(t.totalRecords||0))),a=(N,I)=>{var O;(O=t.onProgress)==null||O.call(t,{phase:N,processedRecords:I,totalRecords:o||I,elapsedMs:(typeof performance<"u"?performance.now():Date.now())-r});},i=await Jy(`${t.title}:${t.scope}:${t.queryText||""}:${n}:${o}`),s=lC(),l=[],c=[];let h=0;for await(const N of e){if(!N)continue;const I=await sC(i,N,t);cC(s,I),l.push(`${JSON.stringify(I)}
`);for(const O of I.mediaRefs||[])O.url&&c.push(O.url);h+=1,(h===1||h===o||h%100===0)&&a("envelope",h);}const u=l.join(""),m=Qy(Zy),g=t.companionSource?JSON.stringify(t.companionSource,void 0,2):null,y=[{path:"manifest.json",contentType:"application/json",role:"manifest"},{path:"records/records.jsonl",contentType:"application/x-ndjson",role:"records",bytes:new TextEncoder().encode(u).byteLength,sha256:await Ei(u)}],b=c.join(`
`)+(c.length?`
`:"");c.length&&y.push({path:"media/media-urls.txt",contentType:"text/plain",role:"media",bytes:new TextEncoder().encode(b).byteLength,sha256:await Ei(b)}),g&&y.push({path:"metadata/companion-source.json",contentType:"application/json",role:"metadata",bytes:new TextEncoder().encode(g).byteLength,sha256:await Ei(g)});const k={id:i,title:t.title,description:t.description,producer:{app:"twitter-web-exporter",appVersion:Br.version,schemaVersion:1,exportedAt:n},privacy:m,counts:s,files:y},S=y[0];S&&(y[0]={...S,bytes:new TextEncoder().encode(JSON.stringify(k,void 0,2)).byteLength}),a("manifest",h);const M=t.compressionLevel??1,T=[{path:"manifest.json",data:JSON.stringify(k,void 0,2),level:M},{path:"records/records.jsonl",data:u,level:M}];c.length&&T.push({path:"media/media-urls.txt",data:b,level:M}),g&&T.push({path:"metadata/companion-source.json",data:g,level:M}),a("zip",h);const P={filename:`twe-bundle-${oC(t.title)}-${n}.zip`,bytes:nC(T),manifest:k};return a("done",h),P}async function uC(e,t){return ub(e,{...t,totalRecords:t.totalRecords??e.length})}async function dC(e,t){const{filename:n,bytes:r}=await uC(e,t),o=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),{saveFile:a}=await Yy(async()=>{const{saveFile:i}=await Promise.resolve().then(()=>DC);return {saveFile:i}},void 0);return a(n,new Blob([o],{type:"application/zip"})),n}class Mc extends Error{constructor(t){super(t),this.name="CompanionBundleBridgeError";}}function kn(e,t){if(!e)throw new Mc(t)}function fC(e){return e.kind==="entity_upsert"||e.kind==="enrichment_upsert"?[e.target.namespace_id]:e.kind==="relationship_upsert"?[e.subject.namespace_id,e.object.namespace_id]:[]}function lf(e,t=new Set){if(!e||typeof e!="object"||t.has(e))return false;if(t.add(e),Array.isArray(e))return e.some(r=>lf(r,t));const n={dm:true,direct_message:true,direct_messages:true,conversation_id:true,recipient_ids:true,private_message:true,private_messages:true};return Object.entries(e).some(([r,o])=>{const a=r.trim().toLowerCase().replace(/-/g,"_");return n[a]===true||lf(o,t)})}async function hC(e,t){const n=t.mutation;kn(n.schema_revision===Hn,"unsupported canonical schema revision"),kn(t.mutation_id===n.mutation_id,"canonical mutation identity mismatch"),kn(t.record_hash===n.record_hash,"canonical record hash is not bound"),kn(fC(n).every(a=>a===e),"canonical mutation crosses the requested namespace");const{record_hash:r,...o}=n;kn(await Fr(e,o)===t.record_hash,"canonical record hash mismatch"),kn(!lf(n),"private-message material is not eligible for shared-safe bundle export");}async function pC(e){var s,l;const t={protocol:Qn,request_id:`bundle-bridge-${Date.now().toString(36)}`,archive_id:e.pairing.archive_id,namespace_id:e.pairing.namespace_id,client_id:e.pairing.client_id,client_epoch:e.pairing.client_epoch,sent_at_ms:Date.now(),mode:"state_bootstrap",after_checkpoint:null,known_checkpoint:null,page_hint:Math.max(1,Math.min(1e4,e.pageHint??512))};if((s=e.signal)!=null&&s.aborted)throw new Mc("bundle bridge cancelled");const n=await e.client.reconcile(t);kn(Sn(n.protocol)===Sn(Qn),"canonical stream protocol mismatch"),kn(n.namespace_id===e.pairing.namespace_id,"canonical namespace mismatch"),kn(n.mode==="state_bootstrap","bundle bridge requires a state bootstrap"),kn(n.page_count>0,"canonical stream page count is invalid");const r=[],o=new Set,a=new Set;let i;for(let c=0;c<n.page_count;c+=1){if((l=e.signal)!=null&&l.aborted)throw new Mc("bundle bridge cancelled");const h=await e.client.reconciliationPage(n.stream_id,i);kn(h.page_index===c,"canonical page sequence is not contiguous"),kn(h.stream_id===n.stream_id,"canonical page stream mismatch"),kn(h.namespace_id===n.namespace_id,"canonical page namespace mismatch"),kn(h.mode==="state_bootstrap","canonical page mode mismatch"),kn(h.manifest_hash===n.manifest_hash,"canonical page manifest mismatch"),kn(Sn(h.target_checkpoint)===Sn(n.target_checkpoint),"canonical page checkpoint mismatch"),kn(h.item_count===h.items.length,"canonical page item count mismatch"),kn(new TextEncoder().encode(Sn(h.items)).byteLength===h.byte_count,"canonical page byte proof mismatch");const{page_hash:u,...m}=h;kn(await pa(m)===h.page_hash,"canonical page hash mismatch");for(const g of h.items)kn(!o.has(g.mutation_id),"duplicate canonical mutation identity"),kn(typeof g.state_key=="string"&&!a.has(g.state_key),"canonical state key is missing or duplicated"),o.add(g.mutation_id),a.add(g.state_key),await hC(e.pairing.namespace_id,g),r.push(g);kn(h.final===(c===n.page_count-1),"canonical final-page proof mismatch"),i=h.next_cursor;}return kn(r.length===n.item_count,"canonical stream item count mismatch"),kn(await pa({mode:n.mode,namespace_id:n.namespace_id,source_checkpoint:n.source_checkpoint,target_checkpoint:n.target_checkpoint,items:r})===n.manifest_hash,"canonical state manifest mismatch"),{descriptor:n,items:r}}function mC(e){const t=[],n=new Set,r={total:0,tweets:0,users:0,socialEdges:0,captures:0,media:0,unknown:0},o=(a,i,s)=>{t.push({id:a,kind:i,original:s,record:s}),r.total+=1,i==="tweet"?r.tweets+=1:i==="user"?r.users+=1:i==="social_edge"?r.socialEdges+=1:i==="capture"?r.captures+=1:i==="media"?r.media+=1:r.unknown+=1;};for(const a of e){const i=a.mutation;if(i.kind==="entity_upsert"){const s=i.target.kind==="tweet"||i.target.kind==="user"?i.target.kind:i.target.kind==="media_reference"?"media":"unknown";o(i.target.id,s,{...i.payload,rest_id:i.target.id});}else if(i.kind==="relationship_upsert")i.relationship_kind==="capture_membership"?o(a.state_key??i.mutation_id,"capture",{...i.payload,relationship_kind:i.relationship_kind,subject:i.subject,object:i.object,qualifier:i.qualifier,observed_at_ms:i.observed_at_ms}):i.relationship_kind==="social_edge"?o(a.state_key??i.mutation_id,"social_edge",{...i.payload,subject:i.subject,object:i.object,qualifier:i.qualifier,observed_at_ms:i.observed_at_ms}):(n.add(`Exported unsupported relationship kind as unknown: ${i.relationship_kind}`),o(a.state_key??i.mutation_id,"unknown",{relationship_kind:i.relationship_kind,subject:i.subject,object:i.object,qualifier:i.qualifier,payload:i.payload,observed_at_ms:i.observed_at_ms}));else if(i.kind==="enrichment_upsert"){const s=i.enrichment_kind==="media_reference"?"media":"unknown";s==="unknown"&&n.add(`Exported enrichment as unknown: ${i.enrichment_kind}`),o(a.state_key??i.mutation_id,s,{...i.payload,enrichment_kind:i.enrichment_kind,target:i.target});}else n.add("Omitted canonical tombstone from current-state bundle");}return {rows:t,warnings:[...n].sort(),counts:r}}async function gC(e){var i;const{descriptor:t,items:n}=await pC(e),r=mC(n),o={format:"scrollmark.companion-source.v1",protocolVersion:Qn,schemaRevision:Hn,bridgeRevision:1,archiveFingerprint:await pa(`archive:${e.pairing.archive_id}`),namespaceFingerprint:await pa(`namespace:${e.pairing.namespace_id}`),checkpoint:{archiveSeq:t.target_checkpoint.archive_seq,chainHash:t.target_checkpoint.chain_hash},canonicalStateManifestHash:t.manifest_hash,records:r.counts,privacy:{visibility:"shared_safe",rawIdentifiersExcludedFromMetadata:true,privateMessagesExcluded:true},warnings:r.warnings};if((i=e.signal)!=null&&i.aborted)throw new Mc("bundle bridge cancelled");return {...await ub(r.rows,{title:e.title,description:e.description,scope:"bundle",includeOriginalMetadata:false,compressionLevel:e.compressionLevel,totalRecords:r.rows.length,companionSource:o}),companionSource:o}}function ws(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Lr(e,t,n){e.push({path:t,message:n,severity:"error"});}function _C(e){const t=[];if(!ws(e))return Lr(t,"$","Manifest must be an object."),{ok:false,issues:t};const n=e;return (!n.id||typeof n.id!="string")&&Lr(t,"$.id","Missing bundle id."),(!n.title||typeof n.title!="string")&&Lr(t,"$.title","Missing title."),ws(n.producer)||Lr(t,"$.producer","Missing producer block."),ws(n.privacy)||Lr(t,"$.privacy","Missing privacy block."),ws(n.counts)||Lr(t,"$.counts","Missing counts block."),Array.isArray(n.files)||Lr(t,"$.files","Files must be an array."),{ok:!t.some(r=>r.severity==="error"),issues:t}}function yC(e){const t=[];if(!ws(e))return Lr(t,"$","Record envelope must be an object."),{ok:false,issues:t};const n=e;return (!n.id||typeof n.id!="string")&&Lr(t,"$.id","Missing record id."),(!n.kind||typeof n.kind!="string")&&Lr(t,"$.kind","Missing record kind."),(!n.sensitivity||typeof n.sensitivity!="string")&&Lr(t,"$.sensitivity","Missing sensitivity."),"data"in n||Lr(t,"$.data","Missing data payload."),{ok:!t.some(r=>r.severity==="error"),issues:t}}function db(e){if(e&&typeof e=="object"){const t=e.message;if(typeof t=="string"&&t.trim())return t}return String(e)}function bC(e,t){const n=e.trim();if(!n)return null;try{return JSON.parse(n)}catch(r){throw new Error(`Invalid JSONL at records line ${t}: ${db(r)}`)}}function wC(e){const t=[],n=e.data;for(const r of ["full_text","text","description","name","screen_name"]){const o=n==null?void 0:n[r];typeof o=="string"&&o.trim()&&t.push(o);}return t.length||t.push(JSON.stringify(e.data).slice(0,2e4)),t.join(`
`)}function vC(e,t,n){return {id:e.id,title:e.title,description:e.description,status:"importing",visibility:e.privacy.visibility,importedAt:t,updatedAt:t,schemaVersion:e.producer.schemaVersion,appVersion:e.producer.appVersion,recordCount:e.counts.records,mediaBlobCount:e.counts.mediaBlobs,manifest:e,companionSource:n}}async function fb(e,t){var T,P,N,I,O,U,E;const n=Date.now(),{entries:r}=await rC(t),o=JSON.parse(Yu(r,"manifest.json")),a=_C(o);if(!a.ok)throw new Error(`Invalid bundle manifest: ${((T=a.issues[0])==null?void 0:T.message)??"unknown error"}`);const i=((P=o.files.find(v=>v.role==="records"))==null?void 0:P.path)??[...r.keys()].find(v=>v.endsWith(".jsonl"));if(!i)throw new Error("Bundle is missing a records JSONL file.");let s;const l=o.files.find(v=>v.path==="metadata/companion-source.json"&&v.role==="metadata");if(l){const v=Yu(r,l.path),L=new TextEncoder().encode(v).byteLength;if(l.bytes!==L||typeof l.sha256!="string"||await Ei(v)!==l.sha256)throw new Error("Companion source metadata integrity proof is invalid.");const $=JSON.parse(v);if($.format!=="scrollmark.companion-source.v1"||$.bridgeRevision!==1||((N=$.privacy)==null?void 0:N.visibility)!=="shared_safe"||((I=$.privacy)==null?void 0:I.rawIdentifiersExcludedFromMetadata)!==true||((O=$.privacy)==null?void 0:O.privateMessagesExcluded)!==true||!/^[0-9a-f]{64}$/.test($.archiveFingerprint)||!/^[0-9a-f]{64}$/.test($.namespaceFingerprint)||!/^[0-9a-f]{64}$/.test($.canonicalStateManifestHash)||!/^[0-9a-f]{64}$/.test((U=$.checkpoint)==null?void 0:U.chainHash))throw new Error("Companion source metadata contract is invalid.");s=$;}const c=`${o.id}:import:${n}`,h=Yu(r,i),u={id:`${o.id}:all`,bundle_id:o.id,name:"All Records",kind:"mixed",record_count:0,created_at:n,updated_at:n},m=[],g=[],y=[];let b=0,k=0;const S=h.split(/\r?\n/);for(let v=0;v<S.length;v+=1){const L=bC(S[v]??"",v+1);if(!L)continue;b+=1;const $=yC(L);if(!$.ok){k+=1,y.push(`Skipped line ${v+1}: ${((E=$.issues[0])==null?void 0:E.message)??"invalid record"}`);continue}const xe=`${o.id}:${L.id}`;m.push({id:xe,bundle_id:o.id,kind:L.kind,source_id:L.sourceId,source_extension:L.sourceExtension,observed_at:L.observedAt,sensitivity:L.sensitivity,data:L.data,media_refs:L.mediaRefs,search_text:wC(L),created_at:n,updated_at:n}),g.push({id:`${u.id}:${L.id}`,bundle_id:o.id,collection_id:u.id,record_id:xe,kind:L.kind,source_id:L.sourceId,sort_time:L.observedAt,created_at:n});}u.record_count=g.length;const M={id:c,bundle_id:o.id,started_at:n,finished_at:Date.now(),status:"ok",records_seen:b,records_imported:m.length,records_skipped:k,warnings:y};try{await e.bundlePutImportBatch({bundle:vC({...o,producer:{...o.producer,appVersion:o.producer.appVersion||Br.version}},n,s),collections:[u],items:g,snapshots:m,report:M}),await e.bundleMarkReady(o.id);}catch(v){throw await e.bundleMarkFailed(o.id,db(v)),v}return {bundleId:o.id,recordsSeen:b,recordsImported:m.length,recordsSkipped:k,warnings:y}}function kC(e){if(e&&typeof e=="object"){const t=e.message;if(typeof t=="string"&&t.trim())return t}return String(e)}function Yr(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function hb(e){if(e.metadata&&Yr(e.metadata))return hb(e.metadata);const t=String(e.__typename||"").toLowerCase();return t.includes("tweet")||e.full_text||e.media||e.bookmark_folder_id?"tweet":t.includes("user")||e.screen_name||e.profile_image_url?"user":"unknown"}function dm(e){if(typeof e=="string")try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?t.href:void 0}catch{return}}function pb(e,t){return e.metadata&&Yr(e.metadata)?pb(e.metadata,t):String(e.rest_id||e.id||e.user_id||e.tweet_id||t)}function xC(e){const t=Yr(e.metadata)?e.metadata:null,n=Yr(t==null?void 0:t.twe_private_fields)?t.twe_private_fields:Yr(e.twe_private_fields)?e.twe_private_fields:null,r=[n==null?void 0:n.created_at,n==null?void 0:n.updated_at,e.created_at,e.date,e.time];for(const o of r){const a=Number(o);if(Number.isFinite(a)&&a>0)return a;if(typeof o=="string"){const i=Date.parse(o);if(Number.isFinite(i))return i}}}function SC(e){return Array.isArray(e)?e.filter(Yr):Yr(e)?Array.isArray(e.records)?e.records.filter(Yr):Array.isArray(e.data)?e.data.filter(Yr):Array.isArray(e.rows)?e.rows.filter(Yr):[e]:[]}function CC(e,t){const n=e.trim();if(!n)return [];if(t.endsWith(".jsonl")||n.includes(`
{`)){const r=[];for(const o of n.split(/\r?\n/)){const a=o.trim();if(!a)continue;const i=JSON.parse(a);Yr(i)&&r.push(i);}if(r.length)return r}return SC(JSON.parse(n))}async function TC(e,t,n){const r=hb(t),o=pb(t,n),a=await Xy(e,r,o);return {id:a,kind:r,sourceId:o,observedAt:xC(t),sensitivity:"low",data:t,mediaRefs:Array.isArray(t.media)?t.media.map((i,s)=>({id:`${a}:media:${s}`,type:i.type==="photo"||i.type==="video"||i.type==="animated_gif"?i.type:"unknown",url:dm(i.original),previewUrl:dm(i.thumbnail),altText:typeof i.ext_alt_text=="string"?i.ext_alt_text:void 0})):void 0}}async function mb(e,t){const n=Date.now(),r=await t.text(),o=CC(r,t.name),a=await Jy(`legacy:${t.name}:${t.size}:${n}`),i=await Promise.all(o.map((g,y)=>TC(a,g,y))),s=Qy({...Zy,includeSourceCaptureTimes:true}),l={id:a,title:t.name.replace(/\.(json|jsonl)$/i,""),description:`Imported from legacy ${t.name}`,producer:{app:"twitter-web-exporter",appVersion:Br.version,schemaVersion:1,exportedAt:n},privacy:s,counts:{records:i.length,tweets:i.filter(g=>g.kind==="tweet").length,users:i.filter(g=>g.kind==="user").length,socialEdges:0,captures:0,mediaBlobs:0},files:[{path:t.name,contentType:t.name.endsWith(".jsonl")?"application/x-ndjson":"application/json",role:"records",bytes:t.size}]},c={id:`${a}:all`,bundle_id:a,name:"All Records",kind:"mixed",record_count:i.length,created_at:n,updated_at:n},h=i.map(g=>({id:`${a}:${g.id}`,bundle_id:a,kind:g.kind,source_id:g.sourceId,observed_at:g.observedAt,sensitivity:g.sensitivity,data:g.data,media_refs:g.mediaRefs,search_text:JSON.stringify(g.data).slice(0,2e4),created_at:n,updated_at:n})),u=h.map(g=>({id:`${c.id}:${g.id}`,bundle_id:a,collection_id:c.id,record_id:g.id,kind:g.kind,source_id:g.source_id,sort_time:g.observed_at,created_at:n})),m={id:`${a}:import:${n}`,bundle_id:a,started_at:n,finished_at:Date.now(),status:"ok",records_seen:o.length,records_imported:h.length,records_skipped:o.length-h.length,warnings:["Imported through legacy JSON/JSONL compatibility path."]};try{await e.bundlePutImportBatch({bundle:{id:a,title:l.title,description:l.description,status:"importing",visibility:l.privacy.visibility,importedAt:n,updatedAt:n,schemaVersion:l.producer.schemaVersion,appVersion:Br.version,recordCount:h.length,mediaBlobCount:0,manifest:l},collections:[c],items:u,snapshots:h,report:m}),await e.bundleMarkReady(a);}catch(g){throw await e.bundleMarkFailed(a,kC(g)),g}return {bundleId:a,recordsSeen:o.length,recordsImported:h.length,recordsSkipped:o.length-h.length,warnings:m.warnings}}function gb(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function fm(e){if(!gb(e))return {};try{return JSON.parse(JSON.stringify(e))}catch{return {...e}}}function MC(e){const t=fm(e),n=t.metadata;return gb(n)?fm(n):t}function Nn(e,t){const n=e[t];return typeof n=="string"?n:""}function _r(e,t){const n=e[t];if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"){const r=Number(n);return Number.isFinite(r)?r:0}return 0}function IC(e,t){if(e.legacy&&e.core)return e;const n=e,r=String(e.rest_id||t.source_id||t.id),o=Nn(n,"screen_name")||Nn(n,"author_screen_name"),a=Nn(n,"name")||Nn(n,"profile_name")||o,i=Nn(n,"profile_image_url"),s=Nn(n,"created_at")||(t.observed_at?new Date(t.observed_at).toUTCString():""),l=Nn(n,"full_text")||Nn(n,"text")||Nn(n,"content"),h=(Array.isArray(n.media)?n.media:[]).map((u,m)=>{const g=Nn(u,"original")||Nn(u,"url"),y=Nn(u,"thumbnail")||Nn(u,"previewUrl")||g;return {id_str:Nn(u,"id_str")||`${r}-media-${m}`,media_key:Nn(u,"media_key")||`${r}-media-${m}`,type:Nn(u,"type")||"photo",url:y,media_url_https:y||g,expanded_url:g,ext_alt_text:Nn(u,"ext_alt_text")||Nn(u,"altText"),original_info:{width:_r(u,"width")||void 0,height:_r(u,"height")||void 0},sizes:{large:{w:_r(u,"width")||1,h:_r(u,"height")||1,resize:"fit"}}}});return e.rest_id=r,e.legacy={id_str:r,full_text:l,created_at:s,favorite_count:_r(n,"favorite_count")||_r(n,"favorites"),retweet_count:_r(n,"retweet_count")||_r(n,"retweets"),reply_count:_r(n,"reply_count")||_r(n,"replies"),bookmark_count:_r(n,"bookmark_count")||_r(n,"bookmarks"),quote_count:_r(n,"quote_count")||_r(n,"quotes"),entities:{urls:[],media:h},extended_entities:{media:h}},e.core={user_results:{result:{rest_id:Nn(n,"user_id")||Nn(n,"author_id")||"",core:{screen_name:o,name:a},avatar:{image_url:i},legacy:{screen_name:o,name:a,profile_image_url_https:i}}}},e}function _b(e){const t=MC(e.data);return t.__twe_imported_bundle_id=e.bundle_id,t.__twe_imported_snapshot_id=e.id,t.__twe_imported_source_id=e.source_id,!t.rest_id&&e.source_id&&(t.rest_id=e.source_id),e.kind==="tweet"&&IC(t,e),(!t.twe_private_fields||typeof t.twe_private_fields!="object")&&(t.twe_private_fields={created_at:e.observed_at||e.created_at,updated_at:e.updated_at}),t}function RC(e,t){return e.filter(n=>!t||n.kind===t).map(n=>_b(n))}const EC="twe_stream_export_row_delay_ms_v1",ca={JSON:"JSON",HTML:"HTML",CSV:"CSV"};function Ys(e){return `"${e.replace(/"/g,'""').replace(/\n/g,"\\n").replace(/\r/g,"\\r")}"`}function ua(e,t,n=false){const r=document.createElement("a");let o;t instanceof Blob?o=t:o=new Blob(n?[new Uint8Array([239,187,191]),t]:[t],{type:"text/plain;charset=utf-8"});const a=URL.createObjectURL(o);r.href=a,r.download=e,r.click(),URL.revokeObjectURL(a);}async function yb(e,t,n,r){try{let o="",a=!1;switch(Ae.info(`Exporting to ${t} file: ${n}`),t){case ca.JSON:o=await wb(e);break;case ca.HTML:o=await vb(e,r);break;case ca.CSV:a=!0,o=await kb(e);break}ua(n,o,a);}catch(o){Ae.errorWithBanner("Failed to export file",o);}}function hm(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function pm(e){return e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)}function AC(){if(typeof localStorage>"u")return 0;try{const e=localStorage.getItem(EC),t=Number(e||0);return Number.isFinite(t)&&t>0?Math.min(1e3,t):0}catch{return 0}}async function Ju(e){e&&await new Promise(t=>{globalThis.setTimeout(t,e);});}async function bb(e,t,n,r,o={}){var a,i,s;try{Ae.info(`Streaming export to ${t} file: ${n}`);let l=0,c=[];const h=[],u=AC(),m=()=>{var y;l+=1,(y=o.onProgress)==null||y.call(o,l);};if(t===ca.JSON){h.push(`[
`);let y=!0;for await(const b of e){if((a=o.signal)!=null&&a.aborted)return;h.push(y?"":`,
`),h.push(JSON.stringify(b,void 0," ").replace(/^/gm," ")),y=!1,m(),await Ju(u);}h.push(`
]
`),ua(n,new Blob(h,{type:"application/json;charset=utf-8"}));return}if(t===ca.CSV){let y=!1;for await(const b of e){if((i=o.signal)!=null&&i.aborted)return;y||(c=Object.keys(b),h.push(c.join(",")+`
`),y=!0),h.push(c.map(k=>{const S=b[k];return Ys(typeof S=="object"?JSON.stringify(S):pm(S))}).join(",")+`
`),m(),await Ju(u);}ua(n,new Blob([new Uint8Array([239,187,191]),...h],{type:"text/csv;charset=utf-8"}));return}h.push(`
<html>
<head>
<meta charset="utf-8">
<title>Exported Data ${new Date().toISOString()}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body>
<table class="table table-striped">
`);let g=!1;for await(const y of e){if((s=o.signal)!=null&&s.aborted)return;if(!g){c=Object.keys(y),h.push("<thead><tr>");for(const b of c)h.push(`<th>${hm(r[b]??b)}</th>`);h.push("</tr></thead><tbody>"),g=!0;}h.push("<tr>");for(const b of c)h.push(`<td>${hm(pm(y[b]))}</td>`);h.push("</tr>"),m(),await Ju(u);}h.push(`
</tbody>
</table>
</body>
</html>
`),ua(n,new Blob(h,{type:"text/html;charset=utf-8"}));}catch(l){Ae.errorWithBanner("Failed to stream export file",l);}}async function wb(e){return JSON.stringify(e,void 0," ")}async function vb(e,t){const n=document.createElement("table"),r=document.createElement("thead"),o=document.createElement("tbody"),a=Object.keys(e[0]??{}),i=document.createElement("tr");for(const s of a){const l=document.createElement("th");l.textContent=t[s]??s,i.appendChild(l);}r.appendChild(i),n.appendChild(r),n.className="table table-striped";for(const s of e){const l=document.createElement("tr");for(const c of a){const h=document.createElement("td"),u=s[c];if(c==="profile_image_url"||c==="profile_banner_url"){const m=document.createElement("img");m.src=u,m.width=50,h.innerHTML="",h.appendChild(m);}else if(c==="media"){if((u==null?void 0:u.length)>0)for(const m of u){const g=document.createElement("img");g.src=m.thumbnail,g.width=50,g.alt=m.ext_alt_text||"",g.title=m.ext_alt_text||"";const y=document.createElement("a");y.href=m.original,y.target="_blank",y.style.marginRight="0.5em",y.appendChild(g),h.appendChild(y);}}else if(c==="full_text"||c==="description"){const m=document.createElement("p");m.textContent=typeof u=="string"?u:JSON.stringify(u),m.style.whiteSpace="pre-wrap",m.style.maxWidth="640px",h.appendChild(m);}else if(c==="metadata"){const m=document.createElement("details"),g=document.createElement("summary");g.textContent="Expand",m.appendChild(g);const y=document.createElement("pre");y.textContent=JSON.stringify(u,void 0," "),m.appendChild(y),h.appendChild(m);}else if(c==="url"){const m=document.createElement("a");m.href=u,m.target="_blank",m.textContent=u,h.appendChild(m);}else h.textContent=typeof u=="string"?u:JSON.stringify(s[c]);l.appendChild(h);}o.appendChild(l);}return n.appendChild(o),`
<html>
<head>
<meta charset="utf-8">
<title>Exported Data ${new Date().toISOString()}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body>
${n.outerHTML}
</body>
</html>
`}async function kb(e){const t=Object.keys(e[0]??{});let n=t.join(",")+`
`;for(const r of e){const o=t.map(a=>{const i=r[a];return typeof i=="string"?Ys(i):typeof i=="object"?Ys(JSON.stringify(i)):i});n+=o.join(","),n+=`
`;}return n}const DC=Object.freeze(Object.defineProperty({__proto__:null,EXPORT_FORMAT:ca,csvEscapeStr:Ys,csvExporter:kb,exportData:yb,exportDataFromAsyncRows:bb,htmlExporter:vb,jsonExporter:wb,saveFile:ua},Symbol.toStringTag,{value:"Module"}));var fo=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0;function PC(e,t){return typeof t>"u"?t={autoBom:false}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Xu(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Js(r.response,t,n);},r.onerror=function(){console.error("could not download file");},r.send();}function mm(e){var t=new XMLHttpRequest;t.open("HEAD",e,false);try{t.send();}catch{}return t.status>=200&&t.status<=299}function Il(e){try{e.dispatchEvent(new MouseEvent("click"));}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",true,true,window,0,0,0,80,20,false,false,false,false,0,null),e.dispatchEvent(t);}}var gm=fo.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Js=fo.saveAs||(typeof window!="object"||window!==fo?function(){}:"download"in HTMLAnchorElement.prototype&&!gm?function(t,n,r){var o=fo.URL||fo.webkitURL,a=document.createElement("a");n=n||t.name||"download",a.download=n,a.rel="noopener",typeof t=="string"?(a.href=t,a.origin!==location.origin?mm(a.href)?Xu(t,n,r):Il(a,a.target="_blank"):Il(a)):(a.href=o.createObjectURL(t),setTimeout(function(){o.revokeObjectURL(a.href);},4e4),setTimeout(function(){Il(a);},0));}:"msSaveOrOpenBlob"in navigator?function(t,n,r){if(n=n||t.name||"download",typeof t=="string")if(mm(t))Xu(t,n,r);else {var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout(function(){Il(o);});}else navigator.msSaveOrOpenBlob(PC(t,r),n);}:function(t,n,r,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof t=="string")return Xu(t,n,r);var a=t.type==="application/octet-stream",i=/constructor/i.test(fo.HTMLElement)||fo.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&i||gm)&&typeof FileReader<"u"){var l=new FileReader;l.onloadend=function(){var u=l.result;u=s?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=u:location=u,o=null;},l.readAsDataURL(t);}else {var c=fo.URL||fo.webkitURL,h=c.createObjectURL(t);o?o.location=h:location.href=h,o=null,setTimeout(function(){c.revokeObjectURL(h);},4e4);}});fo.saveAs=Js.saveAs=Js;const OC=67324752,LC=33639248,NC=101010256,xb=2048,cf=20;let Zu=null;function FC(){if(Zu)return Zu;const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n>>>0;}return Zu=e,e}function $C(e){const t=FC();let n=4294967295;for(let r=0;r<e.length;r++){const o=e[r]??0;n=(t[(n^o)&255]??0)^n>>>8;}return (n^4294967295)>>>0}function BC(e){const t=Math.floor(e.getSeconds()/2);return (e.getHours()<<11|e.getMinutes()<<5|t)&65535}function UC(e){return (Math.max(1980,e.getFullYear())-1980<<9|e.getMonth()+1<<5|e.getDate())&65535}function jC(e,t,n,r,o){const a=new Uint8Array(30+e.length),i=new DataView(a.buffer,a.byteOffset,a.byteLength);return i.setUint32(0,OC,true),i.setUint16(4,cf,true),i.setUint16(6,xb,true),i.setUint16(8,0,true),i.setUint16(10,r,true),i.setUint16(12,o,true),i.setUint32(14,t,true),i.setUint32(18,n,true),i.setUint32(22,n,true),i.setUint16(26,e.length,true),i.setUint16(28,0,true),a.set(e,30),a}function HC(e,t,n,r,o,a){const i=new Uint8Array(46+e.length),s=new DataView(i.buffer,i.byteOffset,i.byteLength);return s.setUint32(0,LC,true),s.setUint16(4,cf,true),s.setUint16(6,cf,true),s.setUint16(8,xb,true),s.setUint16(10,0,true),s.setUint16(12,r,true),s.setUint16(14,o,true),s.setUint32(16,t,true),s.setUint32(20,n,true),s.setUint32(24,n,true),s.setUint16(28,e.length,true),s.setUint16(30,0,true),s.setUint16(32,0,true),s.setUint16(34,0,true),s.setUint16(36,0,true),s.setUint32(38,0,true),s.setUint32(42,a,true),i.set(e,46),i}function qC(e,t,n){const r=new Uint8Array(22),o=new DataView(r.buffer,r.byteOffset,r.byteLength);return o.setUint32(0,NC,true),o.setUint16(4,0,true),o.setUint16(6,0,true),o.setUint16(8,e,true),o.setUint16(10,e,true),o.setUint32(12,t,true),o.setUint32(16,n,true),o.setUint16(20,0,true),r}function Rl(e){return VC(e)}function VC(e){const t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}function Sb(e){return new Promise(t=>setTimeout(t,e))}function zC(){return new Promise(e=>{if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,0);})}function KC(e){return e.type==="video"||e.type==="animated_gif"||/\.mp4(?:[?#].*)?$/i.test(e.url)}function GC(e){try{return new URL(e).hostname}catch{return ""}}function WC(e){if(typeof e=="number")return {minDelayBetweenStartsMs:Math.max(0,e),globalConcurrency:1,perHostConcurrency:1,videoConcurrency:1,maxRetries:0};const t=e||{};return {minDelayBetweenStartsMs:Math.max(0,t.minDelayBetweenStartsMs??100),globalConcurrency:Math.max(1,Math.min(32,t.globalConcurrency??8)),perHostConcurrency:Math.max(1,Math.min(32,t.perHostConcurrency??8)),videoConcurrency:Math.max(1,Math.min(16,t.videoConcurrency??3)),maxRetries:Math.max(0,Math.min(8,t.maxRetries??3))}}function YC(e){const t=Math.min(3e4,750*2**Math.max(0,e-1)),n=.8+Math.random()*.4;return Math.round(t*n)}async function JC(e,t){let n=null;for(let r=0;r<=t;r+=1){try{const o=await fetch(e.url);if(o.ok)return await o.blob();{const a=new Error(`Failed to fetch ${e.url}: HTTP ${o.status}`);if(o.status===403||o.status===404)throw a;n=a;}}catch(o){n=o;const a=o instanceof Error?o.message:String(o);if(/HTTP (403|404)/.test(a))throw o}r<t&&await Sb(YC(r+1));}throw n instanceof Error?n:new Error(`Failed to fetch ${e.url}`)}async function XC(e,t,n,r){const o=WC(r),a=new Array(t.length),i=t.length;let s=0,l=0,c=0,h=0,u=0;const m=new Map,g=async k=>{const S=GC(k.url),M=KC(k);for(;;){const T=m.get(S)||0,P=Date.now()-c;if(h<o.globalConcurrency&&T<o.perHostConcurrency&&(!M||u<o.videoConcurrency)&&P>=o.minDelayBetweenStartsMs)return h+=1,M&&(u+=1),m.set(S,T+1),c=Date.now(),()=>{h-=1,M&&(u-=1);const N=m.get(S)||1;N<=1?m.delete(S):m.set(S,N-1);};await Sb(Math.max(25,Math.min(100,o.minDelayBetweenStartsMs-P)));}},y=async()=>{for(;s<t.length;){const k=s++,S=t[k];if(!S)continue;const M=await g(S),T=Date.now();try{Ae.debug(`Start downloading ${S.filename} from ${S.url}`),a[k]={filename:S.filename,blob:await JC(S,o.maxRetries)},l+=1,n==null||n(l,i,S),Ae.debug(`Finished downloading ${S.filename} in ${Date.now()-T}ms`);}finally{M();}}},b=Math.min(o.globalConcurrency,t.length||1);await Promise.all(Array.from({length:b},()=>y())),await sh(e,a.filter(k=>!!k),typeof r=="object"?r.onZipProgress:void 0);}async function sh(e,t,n){Ae.info(`Exporting to ZIP file: ${e}`);const r=new Date,o=BC(r),a=UC(r),i=[],s=[];let l=0,c=0;const h=new TextEncoder,u=t.length;for(const[y,b]of t.entries()){const{filename:k,blob:S}=b,M=h.encode(k),T=new Uint8Array(await S.arrayBuffer()),P=$C(T),N=T.byteLength,I=l,O=jC(M,P,N,o,a);i.push(Rl(O),Rl(T)),l+=O.byteLength+T.byteLength;const U=HC(M,P,N,o,a,I);s.push(U),c+=U.byteLength,n==null||n(y+1,u,b),y%4===3&&await zC();}for(const y of s)i.push(Rl(y));const m=qC(t.length,c,l);i.push(Rl(m));const g=new Blob(i,{type:"application/zip"});return Ae.info("Zip stream closed."),Js(g,e),g}const ds=12e4;class _n extends Error{constructor(n,r,o={}){super(r);be(this,"code");be(this,"retryable");be(this,"retryAfterMs");be(this,"status");be(this,"requestId");be(this,"observed");this.name="CompanionClientError",this.code=n,this.retryable=o.retryable??false,this.retryAfterMs=o.retryAfterMs??null,this.status=o.status??null,this.requestId=o.requestId??null,this.observed=o.observed;}}const ZC=new Set(["companion_busy","companion_unavailable","internal_commit_unknown"]);function Qu(e){if(!e||typeof e!="object")return false;const t=e;return t.major===Qn.major&&t.minor===Qn.minor}function QC(e){return typeof e=="string"&&["protocol_version_unsupported","auth_required","origin_denied","archive_binding_mismatch","namespace_not_active","identity_required","client_epoch_unknown","client_sequence_gap","batch_hash_mismatch","mutation_hash_conflict","validation_failed","checkpoint_mismatch","checkpoint_expired","stream_expired","limit_exceeded","snapshot_corrupt","snapshot_incompatible","snapshot_key_unavailable","snapshot_rotation_failed","restore_failed","destroy_guard_failed","companion_busy","companion_unavailable","internal_commit_unknown"].includes(e)?e:"malformed_response"}function eT(e){return e==="https://x.com"||e==="https://twitter.com"||e==="https://mobile.x.com"}function tT(e,t){return `${e.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}function nT(e){if(!e||typeof e!="object")return null;const t=e.request_id;return typeof t=="string"?t:null}class Zc{constructor(t,n={}){be(this,"pairing");be(this,"fetchImpl");be(this,"timeoutMs");this.pairing=t;const r=globalThis.fetch;if(n.fetchImpl)this.fetchImpl=n.fetchImpl;else if(typeof r=="function")this.fetchImpl=(a,i)=>r.call(globalThis,a,i);else throw new _n("companion_unavailable","fetch is unavailable");this.timeoutMs=Math.max(1e3,Math.min(12e4,n.timeoutMs??15e3));const o=n.origin??t.origin??this.readOrigin();if(!eT(o))throw new _n("origin_denied","the browser origin is not admitted by the companion pairing")}async capabilities(){const t=await this.requestJson("/v1/capabilities",{method:"GET"});if(!t||typeof t!="object")throw this.malformed("capabilities response is not an object",t);const n=t;if(!Array.isArray(n.protocol_versions)||!Array.isArray(n.schema_revisions)||n.hash_algorithm!=="sha256-jcs-hex"||typeof n.capability_revision!="string"||!n.limits||typeof n.limits!="object"||!n.features||typeof n.features!="object")throw this.malformed("capabilities response is incomplete",t);const r=n.protocol_versions.filter(a=>!!a&&typeof a=="object"&&typeof a.major=="number"&&typeof a.minor=="number"),o=n.schema_revisions.filter(a=>typeof a=="number"&&Number.isInteger(a));if(!r.some(a=>a.major===1&&a.minor===0)||!o.includes(1))throw new _n("protocol_version_unsupported","the companion does not advertise Scrollmark protocol 1.0/schema 1");return {protocol_versions:r,schema_revisions:o,hash_algorithm:"sha256-jcs-hex",capability_revision:n.capability_revision,limits:n.limits,features:n.features}}async health(){const t=await this.requestJson("/v1/health",{method:"GET"});if(!t||typeof t!="object")throw this.malformed("health response is not an object",t);const n=t;if(!Qu(n.protocol))throw new _n("protocol_version_unsupported","health protocol is unsupported");const r=n.archive;if(!r||typeof r!="object")throw this.malformed("health archive proof is missing",t);if(r.archive_id!==this.pairing.archive_id)throw new _n("archive_binding_mismatch","health archive does not match pairing");const a=n.active_namespace_ids;if(!Array.isArray(a)||!a.includes(this.pairing.namespace_id))throw new _n("namespace_not_active","paired namespace is not active");return n}async checkpoint(t){if(t!==this.pairing.namespace_id)throw new _n("archive_binding_mismatch","checkpoint namespace differs from pairing");const n=await this.requestJson(`/v1/archive/namespaces/${encodeURIComponent(t)}/checkpoint`,{method:"GET"});if(!n||typeof n!="object")throw this.malformed("checkpoint response is not an object",n);const r=n;if(r.archive_id!==this.pairing.archive_id||r.namespace_id!==t)throw new _n("archive_binding_mismatch","checkpoint binding does not match pairing",{observed:n});if(!ta(r.checkpoint))throw this.malformed("checkpoint proof is invalid",n);if(r.checkpoint.namespace_id!==t)throw new _n("archive_binding_mismatch","checkpoint proof namespace differs from request",{observed:n});return r.checkpoint}async commit(t){this.assertRequestBinding(t);const n=await this.requestJson("/v1/archive/deltas",{method:"POST",body:JSON.stringify(t)});if(!x1(n))throw this.malformed("commit response is not a proof receipt",n);if(n.archive_id!==t.archive_id||n.namespace_id!==t.namespace_id)throw new _n("archive_binding_mismatch","receipt archive or namespace differs from request",{observed:n});if(n.request_id!==t.request_id||n.client_id!==t.client_id||n.client_epoch!==t.client_epoch||n.batch_id!==t.batch.batch_id||n.result!=="committed"&&n.result!=="duplicate"||!rT(n.client_sequence,t.client_sequence)||n.mutation_count!==t.batch.mutation_count||n.batch_hash!==t.batch.batch_hash||n.checkpoint.namespace_id!==t.namespace_id||n.checkpoint.archive_seq!==n.archive_sequence.to||n.checkpoint.chain_hash!==n.chain_hash)throw new _n("validation_failed","commit receipt does not bind to the immutable request",{observed:n});if(await k1(t.namespace_id,n.prior_chain_hash,t.batch.batch_hash,n.archive_sequence.from,n.archive_sequence.to)!==n.chain_hash)throw new _n("validation_failed","receipt chain hash is invalid",{observed:n});return n}async reconcile(t){this.assertRequestBinding(t);const n=await this.requestJson(`/v1/archive/namespaces/${encodeURIComponent(t.namespace_id)}/reconciliation`,{method:"POST",body:JSON.stringify(t)});if(!n||typeof n!="object")throw this.malformed("reconciliation response is not an object",n);const r=n;if(r.namespace_id!==t.namespace_id||typeof r.stream_id!="string"||!ta(r.source_checkpoint)||!ta(r.target_checkpoint)||typeof r.manifest_hash!="string")throw this.malformed("reconciliation descriptor is not bound to the request",n);return r}async reconciliationPage(t,n){const r=t.trim();if(!r)throw new _n("validation_failed","reconciliation stream id is required");const o=n?`?cursor=${encodeURIComponent(n)}`:"",a=await this.requestJson(`/v1/archive/reconciliation/${encodeURIComponent(r)}/pages${o}`,{method:"GET"});if(!a||typeof a!="object")throw this.malformed("reconciliation page response is not an object",a);const i=a;if(!Qu(i.protocol)||i.stream_id!==r||i.namespace_id!==this.pairing.namespace_id||i.mode!=="deltas"&&i.mode!=="state_bootstrap"||!Number.isInteger(i.page_index)||!Number.isInteger(i.item_count)||!Number.isInteger(i.byte_count)||!Array.isArray(i.items)||!mr(i.page_hash)||!ta(i.target_checkpoint)||i.target_checkpoint.namespace_id!==this.pairing.namespace_id||!mr(i.manifest_hash)||typeof i.final!="boolean"||i.next_cursor!==void 0&&typeof i.next_cursor!="string")throw this.malformed("reconciliation page proof is invalid",a);return i}async listSnapshots(){const t=this.recoveryResponse(await this.requestJson("/v1/snapshots",{method:"GET"}),"snapshot list");if(!Array.isArray(t.snapshots))throw this.malformed("snapshot list is missing",t);return t.snapshots.map(n=>this.snapshotSummary(n))}async createSnapshot(t=false){const n=this.recoveryResponse(await this.requestJson("/v1/snapshots",{method:"POST",body:JSON.stringify({request_id:El("snapshot"),encrypted:t})},ds),"snapshot creation");return this.snapshotSummary(n.snapshot)}async verifySnapshot(t){const n=this.recoveryResponse(await this.requestJson(`/v1/snapshots/${encodeURIComponent(t)}/verify`,{method:"POST",body:JSON.stringify({request_id:El("snapshot-verify"),namespace_ids:[this.pairing.namespace_id]})},ds),"snapshot verification");if(n.snapshot_id!==t||!mr(n.manifest_payload_hash))throw this.malformed("snapshot verification proof is invalid",n);return n}async restoreSnapshot(t){const n=this.recoveryResponse(await this.requestJson(`/v1/snapshots/${encodeURIComponent(t)}/restore`,{method:"POST",body:JSON.stringify({request_id:El("snapshot-restore"),namespace_ids:[this.pairing.namespace_id]})},ds),"snapshot restore"),r=n.checkpoints;if(n.snapshot_id!==t||n.state!=="restored"||!r||typeof r!="object"||!ta(r[this.pairing.namespace_id]))throw this.malformed("snapshot restore proof is invalid",n);return n}async rotateSnapshots(t={}){return this.recoveryResponse(await this.requestJson("/v1/snapshots/rotation",{method:"POST",body:JSON.stringify({request_id:El("snapshot-rotation"),hourly:t.hourly??24,daily:t.daily??30,monthly:t.monthly??12,dry_run:t.dryRun===true})},ds),"snapshot rotation").rotation}async destroyPreflight(t){const n=[...new Set(t.namespace_ids)].sort();if(t.archive_id!==this.pairing.archive_id||n.length!==t.namespace_ids.length||!n.includes(this.pairing.namespace_id))throw new _n("archive_binding_mismatch","durable destroy disclosure differs from pairing");const r=this.recoveryResponse(await this.requestJson("/v1/archive/destroy/preflight",{method:"POST",body:JSON.stringify(t)}),"durable destroy preflight"),o=Array.isArray(r.namespace_ids)?r.namespace_ids.filter(i=>typeof i=="string").sort():[],a=r.namespace_disclosures;if(typeof r.challenge_id!="string"||r.archive_id!==this.pairing.archive_id||Sn(o)!==Sn(n)||!Array.isArray(a)||a.length!==n.length||!a.every(i=>!!i&&typeof i=="object"&&n.includes(String(i.namespace_id))&&typeof i.identity_fingerprint=="string")||typeof r.required_phrase!="string"||r.second_confirmation_required!==true)throw this.malformed("durable destroy challenge is invalid",r);return r}async destroyConfirm(t,n){const r=this.recoveryResponse(await this.requestJson("/v1/archive/destroy/confirm",{method:"POST",body:JSON.stringify({challenge_id:t.challenge_id,archive_id:this.pairing.archive_id,phrase:n,second_confirmation:true})},ds),"durable destroy confirmation");if(r.state!=="destroyed"||typeof r.audit_id!="string")throw this.malformed("durable destroy receipt is invalid",r);return r}recoveryResponse(t,n){if(!t||typeof t!="object")throw this.malformed(`${n} response is not an object`,t);const r=t;if(!Qu(r.protocol))throw new _n("protocol_version_unsupported",`${n} protocol is unsupported`);if(r.archive_id!==this.pairing.archive_id)throw new _n("archive_binding_mismatch",`${n} archive differs from pairing`);return r}snapshotSummary(t){if(!t||typeof t!="object")throw this.malformed("snapshot summary is not an object",t);const n=t,r=n.image,o=n.verification;if(n.format!=="twe.snapshot.v1"||typeof n.snapshot_id!="string"||n.archive_id!==this.pairing.archive_id||!Number.isFinite(n.created_at_ms)||!Number.isFinite(n.verified_at_ms)||!Array.isArray(n.namespaces)||!n.namespaces.some(a=>!!a&&typeof a=="object"&&a.namespace_id===this.pairing.namespace_id)||!r||typeof r.bytes!="number"||!mr(r.sha256)||!o||o.state!=="verified"||!mr(n.manifest_payload_hash))throw this.malformed("snapshot summary proof is invalid",t);return n}assertRequestBinding(t){if(t.archive_id!==this.pairing.archive_id||t.namespace_id!==this.pairing.namespace_id||t.client_id!==this.pairing.client_id||t.client_epoch!==this.pairing.client_epoch)throw new _n("archive_binding_mismatch","request binding differs from pairing")}async requestJson(t,n,r=this.timeoutMs){const o=new AbortController,a=setTimeout(()=>o.abort(),r),i=new Headers(n.headers);i.set("Accept","application/json"),i.set("Authorization",`Bearer ${this.pairing.token}`),i.set("X-Scrollmark-Protocol","v1"),n.body!==void 0&&i.set("Content-Type","application/json");try{const s=await this.fetchImpl(tT(this.pairing.base_url,t),{...n,headers:i,credentials:"omit",cache:"no-store",signal:o.signal}),l=await s.text();let c=null;try{c=l?JSON.parse(l):null;}catch{throw this.malformed("companion response is not JSON",l.slice(0,256),s.status)}if(!s.ok)throw this.errorFromResponse(s.status,c);return c}catch(s){if(s instanceof _n)throw s;const l=s instanceof DOMException&&s.name==="AbortError";throw new _n("companion_unavailable",l?"companion request timed out":"companion request failed",{retryable:true,status:null,observed:s instanceof Error?s.message:String(s)})}finally{clearTimeout(a);}}errorFromResponse(t,n){const r=n&&typeof n=="object"?n:{},o=QC(r.code);return new _n(o,typeof r.message=="string"?r.message:`companion request failed (${t})`,{retryable:r.retryable===true||ZC.has(o),retryAfterMs:typeof r.retry_after_ms=="number"?r.retry_after_ms:null,status:t,requestId:nT(n),observed:n})}malformed(t,n,r=null){return new _n("malformed_response",t,{status:r,observed:n})}readOrigin(){var n;const t=(n=globalThis.location)==null?void 0:n.origin;return typeof t=="string"&&t?t:"https://x.com"}}function rT(e,t){return e.from===t.from&&e.to===t.to}function El(e="id"){var r;const t=globalThis.crypto,n=(r=t==null?void 0:t.randomUUID)==null?void 0:r.call(t);return n?`${e}-${n}`:`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}function Cb(){try{const e=globalThis.unsafeWindow;if(e&&typeof e=="object")return e}catch{}try{if(typeof window<"u")return window}catch{}return globalThis}const oT="__twe_scrollmark_companion_pairing_v1",aT=300*1e3,iT={state:"uninitialized",viewer_id:null,namespace_id:null,evidence:[],reason:"identity-not-observed",changed_at_ms:0};function lh(){const e=Cb();return e&&typeof e=="object"?e:{}}function uf(e){if(typeof e=="number"&&Number.isFinite(e))return String(Math.trunc(e))||null;if(typeof e!="string")return null;const t=e.trim();return t&&t.length<=128?t:null}function sT(){var t;const e=(t=globalThis.location)==null?void 0:t.origin;return typeof e=="string"&&e?e:"unknown"}function Tb(e){return e==="https://x.com"||e==="https://twitter.com"||e==="https://mobile.x.com"}function ch(e,t,n,r,o){const a=uf(e);if(!a)return null;const i=sT();return !Tb(i)&&i!=="unknown"?null:{viewer_id:a,source:t,signal_class:n,observed_at_ms:r,origin:i,confidence:o}}function lT(e){const t=lh().__META_DATA__;return !t||typeof t!="object"||!("userId"in t)?null:ch(t.userId,"__META_DATA__.userId","metadata",e,60)}function cT(e){const t=e.toLowerCase().replace(/[^a-z0-9]/g,"");return t==="viewerid"||t==="vieweruserid"||t==="currentuserid"||t==="loggedinuserid"||t==="authenticateduserid"||t==="accountuserid"}function Ic(e,t,n,r){if(n>5||e===null||typeof e!="object")return null;const o=e;if(r.has(o))return null;if(r.add(o),Array.isArray(e)){for(let i=0;i<e.length;i+=1){const s=Ic(e[i],`${t}[${i}]`,n+1,r);if(s)return s}return null}const a=e;for(const[i,s]of Object.entries(a)){if(cT(i)){const c=uf(s);if(c)return {id:c,path:`${t}.${i}`}}const l=i.toLowerCase().replace(/[^a-z0-9]/g,"");if(["viewer","currentuser","loggedinuser","account"].includes(l)&&s&&typeof s=="object"&&!Array.isArray(s)){const c=s;for(const h of ["id","rest_id","user_id","userId"]){const u=uf(c[h]);if(u)return {id:u,path:`${t}.${i}.${h}`}}}}for(const[i,s]of Object.entries(a)){const l=Ic(s,`${t}.${i}`,n+1,r);if(l)return l}return null}function uT(e){const t=lh();for(const n of ["__INITIAL_STATE__","__NEXT_DATA__","__NEXT_REDUX_STATE__","__INITIAL_PROPS__","__PRELOADED_STATE__"]){const r=Ic(t[n],n,0,new Set);if(r)return ch(r.id,r.path,"session_state",e,70)}return null}function dT(e){var r;const t=(r=lh().history)==null?void 0:r.state,n=Ic(t,"history.state",0,new Set);return n?ch(n.id,n.path,"navigation_state",e,65):null}function fT(e=Date.now()){const t=[lT(e),uT(e),dT(e)].filter(r=>r!==null),n=new Map;for(const r of t)n.has(r.signal_class)||n.set(r.signal_class,r);return [...n.values()]}function hT(e){if(!e||typeof e!="object")return null;const t=e;if(["base_url","token","archive_id","namespace_id","client_id","client_epoch","viewer_id"].some(a=>typeof t[a]!="string"||!String(t[a]).trim()))return null;const r=String(t.base_url).trim();let o;try{o=new URL(r);}catch{return null}return o.protocol!=="http:"||o.hostname!=="127.0.0.1"?null:{base_url:r.replace(/\/$/,""),token:String(t.token),archive_id:String(t.archive_id),namespace_id:String(t.namespace_id),client_id:String(t.client_id),client_epoch:String(t.client_epoch),viewer_id:String(t.viewer_id),...typeof t.origin=="string"&&t.origin?{origin:t.origin}:{}}}function Ki(){const t=globalThis.GM_getValue;if(typeof t=="function")try{const n=t(oT);return hT(typeof n=="string"?JSON.parse(n):n)}catch{return null}return null}class Mb{constructor(t,n=()=>Date.now()){be(this,"state",Oo(iT));be(this,"pairing");be(this,"now");be(this,"suppliedEvidence",[]);this.pairing=t,this.now=n;}setEvidence(t){this.suppliedEvidence.splice(0,this.suppliedEvidence.length,...t);}observe(t=this.suppliedEvidence.length?this.suppliedEvidence:fT()){var c;const n=this.now(),r=t.filter(h=>h.observed_at_ms>=n-aT&&h.observed_at_ms<=n+3e4&&Tb(h.origin)),o=new Map;for(const h of r){const u=o.get(h.viewer_id)??[];u.push(h),o.set(h.viewer_id,u);}const a=[...o.entries()].filter(([,h])=>new Set(h.map(u=>u.signal_class)).size>=2);if(!r.length)return this.transition("unverified",null,[],"identity-signal-missing");if(new Set(r.map(h=>h.viewer_id)).size>1)return this.transition("ambiguous",null,r,"conflicting-viewer-identities");const i=a[0];if(a.length!==1||!i)return this.transition(a.length>1?"ambiguous":"candidate",(i==null?void 0:i[0])??((c=r[0])==null?void 0:c.viewer_id)??null,r,a.length>1?"conflicting-viewer-identities":"corroboration-required");const[s,l]=i;return this.pairing?s!==this.pairing.viewer_id?this.transition("ambiguous",s,l,"viewer-does-not-match-pairing"):this.transition("active",s,l,"identity-and-pairing-verified"):this.transition("candidate",s,l,"companion-pairing-missing")}transition(t,n,r,o){var i;const a={state:t,viewer_id:n,namespace_id:t==="active"?((i=this.pairing)==null?void 0:i.namespace_id)??null:null,evidence:r,reason:o,changed_at_ms:this.now()};return this.state.value=a,{admitted:t==="active",state:t,viewer_id:n,reason:o,evidence:r}}}var nc={exports:{}},pT=nc.exports,_m;function mT(){return _m||(_m=1,(function(e,t){(function(n,r){e.exports=r();})(pT,function(){var n=function(d,p){return (n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,w){_.__proto__=w;}||function(_,w){for(var C in w)Object.prototype.hasOwnProperty.call(w,C)&&(_[C]=w[C]);})(d,p)},r=function(){return (r=Object.assign||function(d){for(var p,_=1,w=arguments.length;_<w;_++)for(var C in p=arguments[_])Object.prototype.hasOwnProperty.call(p,C)&&(d[C]=p[C]);return d}).apply(this,arguments)};function o(d,p,_){for(var w,C=0,D=p.length;C<D;C++)!w&&C in p||((w=w||Array.prototype.slice.call(p,0,C))[C]=p[C]);return d.concat(w||Array.prototype.slice.call(p))}var a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ix,i=Object.keys,s=Array.isArray;function l(d,p){return typeof p!="object"||i(p).forEach(function(_){d[_]=p[_];}),d}typeof Promise>"u"||a.Promise||(a.Promise=Promise);var c=Object.getPrototypeOf,h={}.hasOwnProperty;function u(d,p){return h.call(d,p)}function m(d,p){typeof p=="function"&&(p=p(c(d))),(typeof Reflect>"u"?i:Reflect.ownKeys)(p).forEach(function(_){y(d,_,p[_]);});}var g=Object.defineProperty;function y(d,p,_,w){g(d,p,l(_&&u(_,"get")&&typeof _.get=="function"?{get:_.get,set:_.set,configurable:true}:{value:_,configurable:true,writable:true},w));}function b(d){return {from:function(p){return d.prototype=Object.create(p.prototype),y(d.prototype,"constructor",d),{extend:m.bind(null,d.prototype)}}}}var k=Object.getOwnPropertyDescriptor,S=[].slice;function M(d,p,_){return S.call(d,p,_)}function T(d,p){return p(d)}function P(d){if(!d)throw new Error("Assertion Failed")}function N(d){a.setImmediate?setImmediate(d):setTimeout(d,0);}function I(d,p){if(typeof p=="string"&&u(d,p))return d[p];if(!p)return d;if(typeof p!="string"){for(var _=[],w=0,C=p.length;w<C;++w){var D=I(d,p[w]);_.push(D);}return _}var F=p.indexOf(".");if(F!==-1){var j=d[p.substr(0,F)];return j==null?void 0:I(j,p.substr(F+1))}}function O(d,p,_){if(d&&p!==void 0&&!("isFrozen"in Object&&Object.isFrozen(d)))if(typeof p!="string"&&"length"in p){P(typeof _!="string"&&"length"in _);for(var w=0,C=p.length;w<C;++w)O(d,p[w],_[w]);}else {var D,F,j=p.indexOf(".");j!==-1?(D=p.substr(0,j),(F=p.substr(j+1))===""?_===void 0?s(d)&&!isNaN(parseInt(D))?d.splice(D,1):delete d[D]:d[D]=_:O(j=!(j=d[D])||!u(d,D)?d[D]={}:j,F,_)):_===void 0?s(d)&&!isNaN(parseInt(p))?d.splice(p,1):delete d[p]:d[p]=_;}}function U(d){var p,_={};for(p in d)u(d,p)&&(_[p]=d[p]);return _}var E=[].concat;function v(d){return E.apply([],d)}var lt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(v([8,16,32,64].map(function(d){return ["Int","Uint","Float"].map(function(p){return p+d+"Array"})}))).filter(function(d){return a[d]}),L=new Set(lt.map(function(d){return a[d]})),$=null;function xe(d){return $=new WeakMap,d=(function p(_){if(!_||typeof _!="object")return _;var w=$.get(_);if(w)return w;if(s(_)){w=[],$.set(_,w);for(var C=0,D=_.length;C<D;++C)w.push(p(_[C]));}else if(L.has(_.constructor))w=_;else {var F,j=c(_);for(F in w=j===Object.prototype?{}:Object.create(j),$.set(_,w),_)u(_,F)&&(w[F]=p(_[F]));}return w})(d),$=null,d}var G={}.toString;function le(d){return G.call(d).slice(8,-1)}var Q=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ce=typeof Q=="symbol"?function(d){var p;return d!=null&&(p=d[Q])&&p.apply(d)}:function(){return null};function me(d,p){return p=d.indexOf(p),0<=p&&d.splice(p,1),0<=p}var pe={};function we(d){var p,_,w,C;if(arguments.length===1){if(s(d))return d.slice();if(this===pe&&typeof d=="string")return [d];if(C=ce(d)){for(_=[];!(w=C.next()).done;)_.push(w.value);return _}if(d==null)return [d];if(typeof(p=d.length)!="number")return [d];for(_=new Array(p);p--;)_[p]=d[p];return _}for(p=arguments.length,_=new Array(p);p--;)_[p]=arguments[p];return _}var z=typeof Symbol<"u"?function(d){return d[Symbol.toStringTag]==="AsyncFunction"}:function(){return false},yt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Dr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(yt),ae={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Le(d,p){this.name=d,this.message=p;}function fe(d,p){return d+". Errors: "+Object.keys(p).map(function(_){return p[_].toString()}).filter(function(_,w,C){return C.indexOf(_)===w}).join(`
`)}function Pe(d,p,_,w){this.failures=p,this.failedKeys=w,this.successCount=_,this.message=fe(d,p);}function it(d,p){this.name="BulkError",this.failures=Object.keys(p).map(function(_){return p[_]}),this.failuresByPos=p,this.message=fe(d,this.failures);}b(Le).from(Error).extend({toString:function(){return this.name+": "+this.message}}),b(Pe).from(Le),b(it).from(Le);var X=Dr.reduce(function(d,p){return d[p]=p+"Error",d},{}),ne=Le,H=Dr.reduce(function(d,p){var _=p+"Error";function w(C,D){this.name=_,C?typeof C=="string"?(this.message="".concat(C).concat(D?`
`+D:""),this.inner=D||null):typeof C=="object"&&(this.message="".concat(C.name," ").concat(C.message),this.inner=C):(this.message=ae[p]||_,this.inner=null);}return b(w).from(ne),d[p]=w,d},{});H.Syntax=SyntaxError,H.Type=TypeError,H.Range=RangeError;var se=yt.reduce(function(d,p){return d[p+"Error"]=H[p],d},{}),_e=Dr.reduce(function(d,p){return ["Syntax","Type","Range"].indexOf(p)===-1&&(d[p+"Error"]=H[p]),d},{});function ve(){}function Ye(d){return d}function Xe(d,p){return d==null||d===Ye?p:function(_){return p(d(_))}}function Ie(d,p){return function(){d.apply(this,arguments),p.apply(this,arguments);}}function xt(d,p){return d===ve?p:function(){var _=d.apply(this,arguments);_!==void 0&&(arguments[0]=_);var w=this.onsuccess,C=this.onerror;this.onsuccess=null,this.onerror=null;var D=p.apply(this,arguments);return w&&(this.onsuccess=this.onsuccess?Ie(w,this.onsuccess):w),C&&(this.onerror=this.onerror?Ie(C,this.onerror):C),D!==void 0?D:_}}function Lt(d,p){return d===ve?p:function(){d.apply(this,arguments);var _=this.onsuccess,w=this.onerror;this.onsuccess=this.onerror=null,p.apply(this,arguments),_&&(this.onsuccess=this.onsuccess?Ie(_,this.onsuccess):_),w&&(this.onerror=this.onerror?Ie(w,this.onerror):w);}}function Wt(d,p){return d===ve?p:function(_){var w=d.apply(this,arguments);l(_,w);var C=this.onsuccess,D=this.onerror;return this.onsuccess=null,this.onerror=null,_=p.apply(this,arguments),C&&(this.onsuccess=this.onsuccess?Ie(C,this.onsuccess):C),D&&(this.onerror=this.onerror?Ie(D,this.onerror):D),w===void 0?_===void 0?void 0:_:l(w,_)}}function Kt(d,p){return d===ve?p:function(){return p.apply(this,arguments)!==false&&d.apply(this,arguments)}}function Tt(d,p){return d===ve?p:function(){var _=d.apply(this,arguments);if(_&&typeof _.then=="function"){for(var w=this,C=arguments.length,D=new Array(C);C--;)D[C]=arguments[C];return _.then(function(){return p.apply(w,D)})}return p.apply(this,arguments)}}_e.ModifyError=Pe,_e.DexieError=Le,_e.BulkError=it;var Mt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Pt(d){Mt=d;}var zt={},De=100,lt=typeof Promise>"u"?[]:(function(){var d=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return [d,c(d),d];var p=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return [p,c(p),d]})(),yt=lt[0],Dr=lt[1],lt=lt[2],Dr=Dr&&Dr.then,_t=yt&&yt.constructor,Fe=!!lt,Ce=function(d,p){Be.push([d,p]),x&&(queueMicrotask(Ve),x=false);},A=true,x=true,R=[],B=[],V=Ye,ke={id:"global",global:true,ref:0,unhandleds:[],onunhandled:ve,pgp:false,env:{},finalize:ve},oe=ke,Be=[],Ue=0,tt=[];function ue(d){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=false;var p=this._PSD=oe;if(typeof d!="function"){if(d!==zt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===false&&Me(this,this._value))}this._state=null,this._value=null,++p.ref,(function _(w,C){try{C(function(D){if(w._state===null){if(D===w)throw new TypeError("A promise cannot be resolved with itself.");var F=w._lib&&Dt();D&&typeof D.then=="function"?_(w,function(j,W){D instanceof ue?D._then(j,W):D.then(j,W);}):(w._state=!0,w._value=D,je(w)),F&&Ee();}},Me.bind(null,w));}catch(D){Me(w,D);}})(this,d);}var We={get:function(){var d=oe,p=Oe;function _(w,C){var D=this,F=!d.global&&(d!==oe||p!==Oe),j=F&&!Ct(),W=new ue(function(J,te){At(D,new he(Ln(w,d,F,j),Ln(C,d,F,j),J,te,d));});return this._consoleTask&&(W._consoleTask=this._consoleTask),W}return _.prototype=zt,_},set:function(d){y(this,"then",d&&d.prototype===zt?We:{get:function(){return d},set:We.set});}};function he(d,p,_,w,C){this.onFulfilled=typeof d=="function"?d:null,this.onRejected=typeof p=="function"?p:null,this.resolve=_,this.reject=w,this.psd=C;}function Me(d,p){var _,w;B.push(p),d._state===null&&(_=d._lib&&Dt(),p=V(p),d._state=false,d._value=p,w=d,R.some(function(C){return C._value===w._value})||R.push(w),je(d),_&&Ee());}function je(d){var p=d._listeners;d._listeners=[];for(var _=0,w=p.length;_<w;++_)At(d,p[_]);var C=d._PSD;--C.ref||C.finalize(),Ue===0&&(++Ue,Ce(function(){--Ue==0&&Ne();},[]));}function At(d,p){if(d._state!==null){var _=d._state?p.onFulfilled:p.onRejected;if(_===null)return (d._state?p.resolve:p.reject)(d._value);++p.psd.ref,++Ue,Ce(K,[_,d,p]);}else d._listeners.push(p);}function K(d,p,_){try{var w,C=p._value;!p._state&&B.length&&(B=[]),w=Mt&&p._consoleTask?p._consoleTask.run(function(){return d(C)}):d(C),p._state||B.indexOf(C)!==-1||(function(D){for(var F=R.length;F;)if(R[--F]._value===D._value)return R.splice(F,1)})(p),_.resolve(w);}catch(D){_.reject(D);}finally{--Ue==0&&Ne(),--_.psd.ref||_.psd.finalize();}}function Ve(){Qt(ke,function(){Dt()&&Ee();});}function Dt(){var d=A;return x=A=false,d}function Ee(){var d,p,_;do for(;0<Be.length;)for(d=Be,Be=[],_=d.length,p=0;p<_;++p){var w=d[p];w[0].apply(null,w[1]);}while(0<Be.length);x=A=true;}function Ne(){var d=R;R=[],d.forEach(function(w){w._PSD.onunhandled.call(null,w._value,w);});for(var p=tt.slice(0),_=p.length;_;)p[--_]();}function nt(d){return new ue(zt,false,d)}function qe(d,p){var _=oe;return function(){var w=Dt(),C=oe;try{return ht(_,!0),d.apply(this,arguments)}catch(D){p&&p(D);}finally{ht(C,false),w&&Ee();}}}m(ue.prototype,{then:We,_then:function(d,p){At(this,new he(null,null,d,p,oe));},catch:function(d){if(arguments.length===1)return this.then(null,d);var p=d,_=arguments[1];return typeof p=="function"?this.then(null,function(w){return (w instanceof p?_:nt)(w)}):this.then(null,function(w){return (w&&w.name===p?_:nt)(w)})},finally:function(d){return this.then(function(p){return ue.resolve(d()).then(function(){return p})},function(p){return ue.resolve(d()).then(function(){return nt(p)})})},timeout:function(d,p){var _=this;return d<1/0?new ue(function(w,C){var D=setTimeout(function(){return C(new H.Timeout(p))},d);_.then(w,C).finally(clearTimeout.bind(null,D));}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&y(ue.prototype,Symbol.toStringTag,"Dexie.Promise"),ke.env=Xt(),m(ue,{all:function(){var d=we.apply(null,arguments).map(dt);return new ue(function(p,_){d.length===0&&p([]);var w=d.length;d.forEach(function(C,D){return ue.resolve(C).then(function(F){d[D]=F,--w||p(d);},_)});})},resolve:function(d){return d instanceof ue?d:d&&typeof d.then=="function"?new ue(function(p,_){d.then(p,_);}):new ue(zt,true,d)},reject:nt,race:function(){var d=we.apply(null,arguments).map(dt);return new ue(function(p,_){d.map(function(w){return ue.resolve(w).then(p,_)});})},PSD:{get:function(){return oe},set:function(d){return oe=d}},totalEchoes:{get:function(){return Oe}},newPSD:at,usePSD:Qt,scheduler:{get:function(){return Ce},set:function(d){Ce=d;}},rejectionMapper:{get:function(){return V},set:function(d){V=d;}},follow:function(d,p){return new ue(function(_,w){return at(function(C,D){var F=oe;F.unhandleds=[],F.onunhandled=D,F.finalize=Ie(function(){var j,W=this;j=function(){W.unhandleds.length===0?C():D(W.unhandleds[0]);},tt.push(function J(){j(),tt.splice(tt.indexOf(J),1);}),++Ue,Ce(function(){--Ue==0&&Ne();},[]);},F.finalize),d();},p,_,w)})}}),_t&&(_t.allSettled&&y(ue,"allSettled",function(){var d=we.apply(null,arguments).map(dt);return new ue(function(p){d.length===0&&p([]);var _=d.length,w=new Array(_);d.forEach(function(C,D){return ue.resolve(C).then(function(F){return w[D]={status:"fulfilled",value:F}},function(F){return w[D]={status:"rejected",reason:F}}).then(function(){return --_||p(w)})});})}),_t.any&&typeof AggregateError<"u"&&y(ue,"any",function(){var d=we.apply(null,arguments).map(dt);return new ue(function(p,_){d.length===0&&_(new AggregateError([]));var w=d.length,C=new Array(w);d.forEach(function(D,F){return ue.resolve(D).then(function(j){return p(j)},function(j){C[F]=j,--w||_(new AggregateError(C));})});})}),_t.withResolvers&&(ue.withResolvers=_t.withResolvers));var ct={awaits:0,echoes:0,id:0},jt=0,ln=[],Re=0,Oe=0,Et=0;function at(d,p,_,w){var C=oe,D=Object.create(C);return D.parent=C,D.ref=0,D.global=false,D.id=++Et,ke.env,D.env=Fe?{Promise:ue,PromiseProp:{value:ue,configurable:true,writable:true},all:ue.all,race:ue.race,allSettled:ue.allSettled,any:ue.any,resolve:ue.resolve,reject:ue.reject}:{},p&&l(D,p),++C.ref,D.finalize=function(){--this.parent.ref||this.parent.finalize();},w=Qt(D,d,_,w),D.ref===0&&D.finalize(),w}function $t(){return ct.id||(ct.id=++jt),++ct.awaits,ct.echoes+=De,ct.id}function Ct(){return !!ct.awaits&&(--ct.awaits==0&&(ct.id=0),ct.echoes=ct.awaits*De,true)}function dt(d){return ct.echoes&&d&&d.constructor===_t?($t(),d.then(function(p){return Ct(),p},function(p){return Ct(),Gt(p)})):d}function vt(){var d=ln[ln.length-1];ln.pop(),ht(d,false);}function ht(d,p){var _,w=oe;(p?!ct.echoes||Re++&&d===oe:!Re||--Re&&d===oe)||queueMicrotask(p?(function(C){++Oe,ct.echoes&&--ct.echoes!=0||(ct.echoes=ct.awaits=ct.id=0),ln.push(oe),ht(C,true);}).bind(null,d):vt),d!==oe&&(oe=d,w===ke&&(ke.env=Xt()),Fe&&(_=ke.env.Promise,p=d.env,(w.global||d.global)&&(Object.defineProperty(a,"Promise",p.PromiseProp),_.all=p.all,_.race=p.race,_.resolve=p.resolve,_.reject=p.reject,p.allSettled&&(_.allSettled=p.allSettled),p.any&&(_.any=p.any))));}function Xt(){var d=a.Promise;return Fe?{Promise:d,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:d.all,race:d.race,allSettled:d.allSettled,any:d.any,resolve:d.resolve,reject:d.reject}:{}}function Qt(d,p,_,w,C){var D=oe;try{return ht(d,!0),p(_,w,C)}finally{ht(D,false);}}function Ln(d,p,_,w){return typeof d!="function"?d:function(){var C=oe;_&&$t(),ht(p,true);try{return d.apply(this,arguments)}finally{ht(C,false),w&&queueMicrotask(Ct);}}}function mn(d){Promise===_t&&ct.echoes===0?Re===0?d():enqueueNativeMicroTask(d):setTimeout(d,0);}(""+Dr).indexOf("[native code]")===-1&&($t=Ct=ve);var Gt=ue.reject,dn="",an="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",nn="String expected.",Mn=[],In="__dbnames",to="readonly",bo="readwrite";function Er(d,p){return d?p?function(){return d.apply(this,arguments)&&p.apply(this,arguments)}:d:p}var No={type:3,lower:-1/0,lowerOpen:false,upper:[[]],upperOpen:false};function ti(d){return typeof d!="string"||/\./.test(d)?function(p){return p}:function(p){return p[d]===void 0&&d in p&&delete(p=xe(p))[d],p}}function dl(){throw H.Type()}function Rt(d,p){try{var _=Ji(d),w=Ji(p);if(_!==w)return _==="Array"?1:w==="Array"?-1:_==="binary"?1:w==="binary"?-1:_==="string"?1:w==="string"?-1:_==="Date"?1:w!=="Date"?NaN:-1;switch(_){case "number":case "Date":case "string":return p<d?1:d<p?-1:0;case "binary":return (function(C,D){for(var F=C.length,j=D.length,W=F<j?F:j,J=0;J<W;++J)if(C[J]!==D[J])return C[J]<D[J]?-1:1;return F===j?0:F<j?-1:1})(ni(d),ni(p));case "Array":return (function(C,D){for(var F=C.length,j=D.length,W=F<j?F:j,J=0;J<W;++J){var te=Rt(C[J],D[J]);if(te!==0)return te}return F===j?0:F<j?-1:1})(d,p)}}catch{}return NaN}function Ji(d){var p=typeof d;return p!="object"?p:ArrayBuffer.isView(d)?"binary":(d=le(d),d==="ArrayBuffer"?"binary":d)}function ni(d){return d instanceof Uint8Array?d:ArrayBuffer.isView(d)?new Uint8Array(d.buffer,d.byteOffset,d.byteLength):new Uint8Array(d)}var cn=(kt.prototype._trans=function(d,p,_){var w=this._tx||oe.trans,C=this.name,D=Mt&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(d==="readonly"?"read":"write"," ").concat(this.name));function F(J,te,q){if(!q.schema[C])throw new H.NotFound("Table "+C+" not part of transaction");return p(q.idbtrans,q)}var j=Dt();try{var W=w&&w.db._novip===this.db._novip?w===oe.trans?w._promise(d,F,_):at(function(){return w._promise(d,F,_)},{trans:w,transless:oe.transless||oe}):(function J(te,q,ie,Y){if(te.idbdb&&(te._state.openComplete||oe.letThrough||te._vip)){var ee=te._createTransaction(q,ie,te._dbSchema);try{ee.create(),te._state.PR1398_maxLoop=3;}catch(re){return re.name===X.InvalidState&&te.isOpen()&&0<--te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),te.close({disableAutoOpen:!1}),te.open().then(function(){return J(te,q,ie,Y)})):Gt(re)}return ee._promise(q,function(re,Z){return at(function(){return oe.trans=ee,Y(re,Z,ee)})}).then(function(re){if(q==="readwrite")try{ee.idbtrans.commit();}catch{}return q==="readonly"?re:ee._completion.then(function(){return re})})}if(te._state.openComplete)return Gt(new H.DatabaseClosed(te._state.dbOpenError));if(!te._state.isBeingOpened){if(!te._state.autoOpen)return Gt(new H.DatabaseClosed);te.open().catch(ve);}return te._state.dbReadyPromise.then(function(){return J(te,q,ie,Y)})})(this.db,d,[this.name],F);return D&&(W._consoleTask=D,W=W.catch(function(J){return console.trace(J),Gt(J)})),W}finally{j&&Ee();}},kt.prototype.get=function(d,p){var _=this;return d&&d.constructor===Object?this.where(d).first(p):d==null?Gt(new H.Type("Invalid argument to Table.get()")):this._trans("readonly",function(w){return _.core.get({trans:w,key:d}).then(function(C){return _.hook.reading.fire(C)})}).then(p)},kt.prototype.where=function(d){if(typeof d=="string")return new this.db.WhereClause(this,d);if(s(d))return new this.db.WhereClause(this,"[".concat(d.join("+"),"]"));var p=i(d);if(p.length===1)return this.where(p[0]).equals(d[p[0]]);var _=this.schema.indexes.concat(this.schema.primKey).filter(function(j){if(j.compound&&p.every(function(J){return 0<=j.keyPath.indexOf(J)})){for(var W=0;W<p.length;++W)if(p.indexOf(j.keyPath[W])===-1)return false;return true}return false}).sort(function(j,W){return j.keyPath.length-W.keyPath.length})[0];if(_&&this.db._maxKey!==dn){var D=_.keyPath.slice(0,p.length);return this.where(D).equals(D.map(function(W){return d[W]}))}!_&&Mt&&console.warn("The query ".concat(JSON.stringify(d)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(p.join("+"),"]"));var w=this.schema.idxByName;function C(j,W){return Rt(j,W)===0}var F=p.reduce(function(q,W){var J=q[0],te=q[1],q=w[W],ie=d[W];return [J||q,J||!q?Er(te,q&&q.multi?function(Y){return Y=I(Y,W),s(Y)&&Y.some(function(ee){return C(ie,ee)})}:function(Y){return C(ie,I(Y,W))}):te]},[null,null]),D=F[0],F=F[1];return D?this.where(D.name).equals(d[D.keyPath]).filter(F):_?this.filter(F):this.where(p).equals("")},kt.prototype.filter=function(d){return this.toCollection().and(d)},kt.prototype.count=function(d){return this.toCollection().count(d)},kt.prototype.offset=function(d){return this.toCollection().offset(d)},kt.prototype.limit=function(d){return this.toCollection().limit(d)},kt.prototype.each=function(d){return this.toCollection().each(d)},kt.prototype.toArray=function(d){return this.toCollection().toArray(d)},kt.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},kt.prototype.orderBy=function(d){return new this.db.Collection(new this.db.WhereClause(this,s(d)?"[".concat(d.join("+"),"]"):d))},kt.prototype.reverse=function(){return this.toCollection().reverse()},kt.prototype.mapToClass=function(d){var p,_=this.db,w=this.name;function C(){return p!==null&&p.apply(this,arguments)||this}(this.schema.mappedClass=d).prototype instanceof dl&&((function(W,J){if(typeof J!="function"&&J!==null)throw new TypeError("Class extends value "+String(J)+" is not a constructor or null");function te(){this.constructor=W;}n(W,J),W.prototype=J===null?Object.create(J):(te.prototype=J.prototype,new te);})(C,p=d),Object.defineProperty(C.prototype,"db",{get:function(){return _},enumerable:false,configurable:true}),C.prototype.table=function(){return w},d=C);for(var D=new Set,F=d.prototype;F;F=c(F))Object.getOwnPropertyNames(F).forEach(function(W){return D.add(W)});function j(W){if(!W)return W;var J,te=Object.create(d.prototype);for(J in W)if(!D.has(J))try{te[J]=W[J];}catch{}return te}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=j,this.hook("reading",j),d},kt.prototype.defineClass=function(){return this.mapToClass(function(d){l(this,d);})},kt.prototype.add=function(d,p){var _=this,w=this.schema.primKey,C=w.auto,D=w.keyPath,F=d;return D&&C&&(F=ti(D)(d)),this._trans("readwrite",function(j){return _.core.mutate({trans:j,type:"add",keys:p!=null?[p]:null,values:[F]})}).then(function(j){return j.numFailures?ue.reject(j.failures[0]):j.lastResult}).then(function(j){if(D)try{O(d,D,j);}catch{}return j})},kt.prototype.update=function(d,p){return typeof d!="object"||s(d)?this.where(":id").equals(d).modify(p):(d=I(d,this.schema.primKey.keyPath),d===void 0?Gt(new H.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(d).modify(p))},kt.prototype.put=function(d,p){var _=this,w=this.schema.primKey,C=w.auto,D=w.keyPath,F=d;return D&&C&&(F=ti(D)(d)),this._trans("readwrite",function(j){return _.core.mutate({trans:j,type:"put",values:[F],keys:p!=null?[p]:null})}).then(function(j){return j.numFailures?ue.reject(j.failures[0]):j.lastResult}).then(function(j){if(D)try{O(d,D,j);}catch{}return j})},kt.prototype.delete=function(d){var p=this;return this._trans("readwrite",function(_){return p.core.mutate({trans:_,type:"delete",keys:[d]})}).then(function(_){return _.numFailures?ue.reject(_.failures[0]):void 0})},kt.prototype.clear=function(){var d=this;return this._trans("readwrite",function(p){return d.core.mutate({trans:p,type:"deleteRange",range:No})}).then(function(p){return p.numFailures?ue.reject(p.failures[0]):void 0})},kt.prototype.bulkGet=function(d){var p=this;return this._trans("readonly",function(_){return p.core.getMany({keys:d,trans:_}).then(function(w){return w.map(function(C){return p.hook.reading.fire(C)})})})},kt.prototype.bulkAdd=function(d,p,_){var w=this,C=Array.isArray(p)?p:void 0,D=(_=_||(C?void 0:p))?_.allKeys:void 0;return this._trans("readwrite",function(F){var J=w.schema.primKey,j=J.auto,J=J.keyPath;if(J&&C)throw new H.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(C&&C.length!==d.length)throw new H.InvalidArgument("Arguments objects and keys must have the same length");var W=d.length,J=J&&j?d.map(ti(J)):d;return w.core.mutate({trans:F,type:"add",keys:C,values:J,wantResults:D}).then(function(ee){var q=ee.numFailures,ie=ee.results,Y=ee.lastResult,ee=ee.failures;if(q===0)return D?ie:Y;throw new it("".concat(w.name,".bulkAdd(): ").concat(q," of ").concat(W," operations failed"),ee)})})},kt.prototype.bulkPut=function(d,p,_){var w=this,C=Array.isArray(p)?p:void 0,D=(_=_||(C?void 0:p))?_.allKeys:void 0;return this._trans("readwrite",function(F){var J=w.schema.primKey,j=J.auto,J=J.keyPath;if(J&&C)throw new H.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(C&&C.length!==d.length)throw new H.InvalidArgument("Arguments objects and keys must have the same length");var W=d.length,J=J&&j?d.map(ti(J)):d;return w.core.mutate({trans:F,type:"put",keys:C,values:J,wantResults:D}).then(function(ee){var q=ee.numFailures,ie=ee.results,Y=ee.lastResult,ee=ee.failures;if(q===0)return D?ie:Y;throw new it("".concat(w.name,".bulkPut(): ").concat(q," of ").concat(W," operations failed"),ee)})})},kt.prototype.bulkUpdate=function(d){var p=this,_=this.core,w=d.map(function(F){return F.key}),C=d.map(function(F){return F.changes}),D=[];return this._trans("readwrite",function(F){return _.getMany({trans:F,keys:w,cache:"clone"}).then(function(j){var W=[],J=[];d.forEach(function(q,ie){var Y=q.key,ee=q.changes,re=j[ie];if(re){for(var Z=0,de=Object.keys(ee);Z<de.length;Z++){var ge=de[Z],ye=ee[ge];if(ge===p.schema.primKey.keyPath){if(Rt(ye,Y)!==0)throw new H.Constraint("Cannot update primary key in bulkUpdate()")}else O(re,ge,ye);}D.push(ie),W.push(Y),J.push(re);}});var te=W.length;return _.mutate({trans:F,type:"put",keys:W,values:J,updates:{keys:w,changeSpecs:C}}).then(function(q){var ie=q.numFailures,Y=q.failures;if(ie===0)return te;for(var ee=0,re=Object.keys(Y);ee<re.length;ee++){var Z,de=re[ee],ge=D[Number(de)];ge!=null&&(Z=Y[de],delete Y[de],Y[ge]=Z);}throw new it("".concat(p.name,".bulkUpdate(): ").concat(ie," of ").concat(te," operations failed"),Y)})})})},kt.prototype.bulkDelete=function(d){var p=this,_=d.length;return this._trans("readwrite",function(w){return p.core.mutate({trans:w,type:"delete",keys:d})}).then(function(F){var C=F.numFailures,D=F.lastResult,F=F.failures;if(C===0)return D;throw new it("".concat(p.name,".bulkDelete(): ").concat(C," of ").concat(_," operations failed"),F)})},kt);function kt(){}function wo(d){function p(F,j){if(j){for(var W=arguments.length,J=new Array(W-1);--W;)J[W-1]=arguments[W];return _[F].subscribe.apply(null,J),d}if(typeof F=="string")return _[F]}var _={};p.addEventType=D;for(var w=1,C=arguments.length;w<C;++w)D(arguments[w]);return p;function D(F,j,W){if(typeof F!="object"){var J;j=j||Kt;var te={subscribers:[],fire:W=W||ve,subscribe:function(q){te.subscribers.indexOf(q)===-1&&(te.subscribers.push(q),te.fire=j(te.fire,q));},unsubscribe:function(q){te.subscribers=te.subscribers.filter(function(ie){return ie!==q}),te.fire=te.subscribers.reduce(j,W);}};return _[F]=p[F]=te}i(J=F).forEach(function(q){var ie=J[q];if(s(ie))D(q,J[q][0],J[q][1]);else {if(ie!=="asap")throw new H.InvalidArgument("Invalid event config");var Y=D(q,Ye,function(){for(var ee=arguments.length,re=new Array(ee);ee--;)re[ee]=arguments[ee];Y.subscribers.forEach(function(Z){N(function(){Z.apply(null,re);});});});}});}}function qr(d,p){return b(p).from({prototype:d}),p}function kr(d,p){return !(d.filter||d.algorithm||d.or)&&(p?d.justLimit:!d.replayFilter)}function Kn(d,p){d.filter=Er(d.filter,p);}function Xi(d,p,_){var w=d.replayFilter;d.replayFilter=w?function(){return Er(w(),p())}:p,d.justLimit=_&&!w;}function Un(d,p){if(d.isPrimKey)return p.primaryKey;var _=p.getIndexByKeyPath(d.index);if(!_)throw new H.Schema("KeyPath "+d.index+" on object store "+p.name+" is not indexed");return _}function Zi(d,p,_){var w=Un(d,p.schema);return p.openCursor({trans:_,values:!d.keysOnly,reverse:d.dir==="prev",unique:!!d.unique,query:{index:w,range:d.range}})}function no(d,p,_,w){var C=d.replayFilter?Er(d.filter,d.replayFilter()):d.filter;if(d.or){var D={},F=function(j,W,J){var te,q;C&&!C(W,J,function(ie){return W.stop(ie)},function(ie){return W.fail(ie)})||((q=""+(te=W.primaryKey))=="[object ArrayBuffer]"&&(q=""+new Uint8Array(te)),u(D,q)||(D[q]=true,p(j,W,J)));};return Promise.all([d.or._iterate(F,_),Qi(Zi(d,w,_),d.algorithm,F,!d.keysOnly&&d.valueMapper)])}return Qi(Zi(d,w,_),Er(d.algorithm,C),p,!d.keysOnly&&d.valueMapper)}function Qi(d,p,_,w){var C=qe(w?function(D,F,j){return _(w(D),F,j)}:_);return d.then(function(D){if(D)return D.start(function(){var F=function(){return D.continue()};p&&!p(D,function(j){return F=j},function(j){D.stop(j),F=ve;},function(j){D.fail(j),F=ve;})||C(D.value,D,function(j){return F=j}),F();})})}var gr=(Fo.prototype.execute=function(d){var p=this["@@propmod"];if(p.add!==void 0){var _=p.add;if(s(_))return o(o([],s(d)?d:[],true),_).sort();if(typeof _=="number")return (Number(d)||0)+_;if(typeof _=="bigint")try{return BigInt(d)+_}catch{return BigInt(0)+_}throw new TypeError("Invalid term ".concat(_))}if(p.remove!==void 0){var w=p.remove;if(s(w))return s(d)?d.filter(function(C){return !w.includes(C)}).sort():[];if(typeof w=="number")return Number(d)-w;if(typeof w=="bigint")try{return BigInt(d)-w}catch{return BigInt(0)-w}throw new TypeError("Invalid subtrahend ".concat(w))}return _=(_=p.replacePrefix)===null||_===void 0?void 0:_[0],_&&typeof d=="string"&&d.startsWith(_)?p.replacePrefix[1]+d.substring(_.length):d},Fo);function Fo(d){this["@@propmod"]=d;}var $o=(Zt.prototype._read=function(d,p){var _=this._ctx;return _.error?_.table._trans(null,Gt.bind(null,_.error)):_.table._trans("readonly",d).then(p)},Zt.prototype._write=function(d){var p=this._ctx;return p.error?p.table._trans(null,Gt.bind(null,p.error)):p.table._trans("readwrite",d,"locked")},Zt.prototype._addAlgorithm=function(d){var p=this._ctx;p.algorithm=Er(p.algorithm,d);},Zt.prototype._iterate=function(d,p){return no(this._ctx,d,p,this._ctx.table.core)},Zt.prototype.clone=function(d){var p=Object.create(this.constructor.prototype),_=Object.create(this._ctx);return d&&l(_,d),p._ctx=_,p},Zt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Zt.prototype.each=function(d){var p=this._ctx;return this._read(function(_){return no(p,d,_,p.table.core)})},Zt.prototype.count=function(d){var p=this;return this._read(function(_){var w=p._ctx,C=w.table.core;if(kr(w,true))return C.count({trans:_,query:{index:Un(w,C.schema),range:w.range}}).then(function(F){return Math.min(F,w.limit)});var D=0;return no(w,function(){return ++D,false},_,C).then(function(){return D})}).then(d)},Zt.prototype.sortBy=function(d,p){var _=d.split(".").reverse(),w=_[0],C=_.length-1;function D(W,J){return J?D(W[_[J]],J-1):W[w]}var F=this._ctx.dir==="next"?1:-1;function j(W,J){return Rt(D(W,C),D(J,C))*F}return this.toArray(function(W){return W.sort(j)}).then(p)},Zt.prototype.toArray=function(d){var p=this;return this._read(function(_){var w=p._ctx;if(w.dir==="next"&&kr(w,true)&&0<w.limit){var C=w.valueMapper,D=Un(w,w.table.core.schema);return w.table.core.query({trans:_,limit:w.limit,values:true,query:{index:D,range:w.range}}).then(function(j){return j=j.result,C?j.map(C):j})}var F=[];return no(w,function(j){return F.push(j)},_,w.table.core).then(function(){return F})},d)},Zt.prototype.offset=function(d){var p=this._ctx;return d<=0||(p.offset+=d,kr(p)?Xi(p,function(){var _=d;return function(w,C){return _===0||(_===1?--_:C(function(){w.advance(_),_=0;}),false)}}):Xi(p,function(){var _=d;return function(){return --_<0}})),this},Zt.prototype.limit=function(d){return this._ctx.limit=Math.min(this._ctx.limit,d),Xi(this._ctx,function(){var p=d;return function(_,w,C){return --p<=0&&w(C),0<=p}},true),this},Zt.prototype.until=function(d,p){return Kn(this._ctx,function(_,w,C){return !d(_.value)||(w(C),p)}),this},Zt.prototype.first=function(d){return this.limit(1).toArray(function(p){return p[0]}).then(d)},Zt.prototype.last=function(d){return this.reverse().first(d)},Zt.prototype.filter=function(d){var p;return Kn(this._ctx,function(_){return d(_.value)}),(p=this._ctx).isMatch=Er(p.isMatch,d),this},Zt.prototype.and=function(d){return this.filter(d)},Zt.prototype.or=function(d){return new this.db.WhereClause(this._ctx.table,d,this)},Zt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Zt.prototype.desc=function(){return this.reverse()},Zt.prototype.eachKey=function(d){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(_,w){d(w.key,w);})},Zt.prototype.eachUniqueKey=function(d){return this._ctx.unique="unique",this.eachKey(d)},Zt.prototype.eachPrimaryKey=function(d){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(_,w){d(w.primaryKey,w);})},Zt.prototype.keys=function(d){var p=this._ctx;p.keysOnly=!p.isMatch;var _=[];return this.each(function(w,C){_.push(C.key);}).then(function(){return _}).then(d)},Zt.prototype.primaryKeys=function(d){var p=this._ctx;if(p.dir==="next"&&kr(p,true)&&0<p.limit)return this._read(function(w){var C=Un(p,p.table.core.schema);return p.table.core.query({trans:w,values:false,limit:p.limit,query:{index:C,range:p.range}})}).then(function(w){return w.result}).then(d);p.keysOnly=!p.isMatch;var _=[];return this.each(function(w,C){_.push(C.primaryKey);}).then(function(){return _}).then(d)},Zt.prototype.uniqueKeys=function(d){return this._ctx.unique="unique",this.keys(d)},Zt.prototype.firstKey=function(d){return this.limit(1).keys(function(p){return p[0]}).then(d)},Zt.prototype.lastKey=function(d){return this.reverse().firstKey(d)},Zt.prototype.distinct=function(){var d=this._ctx,d=d.index&&d.table.schema.idxByName[d.index];if(!d||!d.multi)return this;var p={};return Kn(this._ctx,function(C){var w=C.primaryKey.toString(),C=u(p,w);return p[w]=true,!C}),this},Zt.prototype.modify=function(d){var p=this,_=this._ctx;return this._write(function(w){var C,D,F;F=typeof d=="function"?d:(C=i(d),D=C.length,function(Z){for(var de=false,ge=0;ge<D;++ge){var ye=C[ge],Te=d[ye],ze=I(Z,ye);Te instanceof gr?(O(Z,ye,Te.execute(ze)),de=true):ze!==Te&&(O(Z,ye,Te),de=true);}return de});var j=_.table.core,q=j.schema.primaryKey,W=q.outbound,J=q.extractKey,te=200,q=p.db._options.modifyChunkSize;q&&(te=typeof q=="object"?q[j.name]||q["*"]||200:q);function ie(Z,ye){var ge=ye.failures,ye=ye.numFailures;ee+=Z-ye;for(var Te=0,ze=i(ge);Te<ze.length;Te++){var rt=ze[Te];Y.push(ge[rt]);}}var Y=[],ee=0,re=[];return p.clone().primaryKeys().then(function(Z){function de(ye){var Te=Math.min(te,Z.length-ye);return j.getMany({trans:w,keys:Z.slice(ye,ye+Te),cache:"immutable"}).then(function(ze){for(var rt=[],Ke=[],Je=W?[]:null,st=[],Qe=0;Qe<Te;++Qe){var pt=ze[Qe],Vt={value:xe(pt),primKey:Z[ye+Qe]};F.call(Vt,Vt.value,Vt)!==false&&(Vt.value==null?st.push(Z[ye+Qe]):W||Rt(J(pt),J(Vt.value))===0?(Ke.push(Vt.value),W&&Je.push(Z[ye+Qe])):(st.push(Z[ye+Qe]),rt.push(Vt.value)));}return Promise.resolve(0<rt.length&&j.mutate({trans:w,type:"add",values:rt}).then(function(Yt){for(var Jt in Yt.failures)st.splice(parseInt(Jt),1);ie(rt.length,Yt);})).then(function(){return (0<Ke.length||ge&&typeof d=="object")&&j.mutate({trans:w,type:"put",keys:Je,values:Ke,criteria:ge,changeSpec:typeof d!="function"&&d,isAdditionalChunk:0<ye}).then(function(Yt){return ie(Ke.length,Yt)})}).then(function(){return (0<st.length||ge&&d===ka)&&j.mutate({trans:w,type:"delete",keys:st,criteria:ge,isAdditionalChunk:0<ye}).then(function(Yt){return ie(st.length,Yt)})}).then(function(){return Z.length>ye+Te&&de(ye+te)})})}var ge=kr(_)&&_.limit===1/0&&(typeof d!="function"||d===ka)&&{index:_.index,range:_.range};return de(0).then(function(){if(0<Y.length)throw new Pe("Error modifying one or more objects",Y,ee,re);return Z.length})})})},Zt.prototype.delete=function(){var d=this._ctx,p=d.range;return kr(d)&&(d.isPrimKey||p.type===3)?this._write(function(_){var w=d.table.core.schema.primaryKey,C=p;return d.table.core.count({trans:_,query:{index:w,range:C}}).then(function(D){return d.table.core.mutate({trans:_,type:"deleteRange",range:C}).then(function(F){var j=F.failures;if(F.lastResult,F.results,F=F.numFailures,F)throw new Pe("Could not delete some values",Object.keys(j).map(function(W){return j[W]}),D-F);return D-F})})}):this.modify(ka)},Zt);function Zt(){}var ka=function(d,p){return p.value=null};function Bo(d,p){return d<p?-1:d===p?0:1}function es(d,p){return p<d?-1:d===p?0:1}function lr(d,p,_){return d=d instanceof hl?new d.Collection(d):d,d._ctx.error=new(_||TypeError)(p),d}function vo(d){return new d.Collection(d,function(){return fl("")}).limit(0)}function xa(d,p,_,w){var C,D,F,j,W,J,te,q=_.length;if(!_.every(function(ee){return typeof ee=="string"}))return lr(d,nn);function ie(ee){C=ee==="next"?function(Z){return Z.toUpperCase()}:function(Z){return Z.toLowerCase()},D=ee==="next"?function(Z){return Z.toLowerCase()}:function(Z){return Z.toUpperCase()},F=ee==="next"?Bo:es;var re=_.map(function(Z){return {lower:D(Z),upper:C(Z)}}).sort(function(Z,de){return F(Z.lower,de.lower)});j=re.map(function(Z){return Z.upper}),W=re.map(function(Z){return Z.lower}),te=(J=ee)==="next"?"":w;}ie("next"),d=new d.Collection(d,function(){return Vr(j[0],W[q-1]+w)}),d._ondirectionchange=function(ee){ie(ee);};var Y=0;return d._addAlgorithm(function(ee,re,Z){var de=ee.key;if(typeof de!="string")return false;var ge=D(de);if(p(ge,W,Y))return true;for(var ye=null,Te=Y;Te<q;++Te){var ze=(function(rt,Ke,Je,st,Qe,pt){for(var Vt=Math.min(rt.length,st.length),Yt=-1,Jt=0;Jt<Vt;++Jt){var Sr=Ke[Jt];if(Sr!==st[Jt])return Qe(rt[Jt],Je[Jt])<0?rt.substr(0,Jt)+Je[Jt]+Je.substr(Jt+1):Qe(rt[Jt],st[Jt])<0?rt.substr(0,Jt)+st[Jt]+Je.substr(Jt+1):0<=Yt?rt.substr(0,Yt)+Ke[Yt]+Je.substr(Yt+1):null;Qe(rt[Jt],Sr)<0&&(Yt=Jt);}return Vt<st.length&&pt==="next"?rt+Je.substr(rt.length):Vt<rt.length&&pt==="prev"?rt.substr(0,Je.length):Yt<0?null:rt.substr(0,Yt)+st[Yt]+Je.substr(Yt+1)})(de,ge,j[Te],W[Te],F,J);ze===null&&ye===null?Y=Te+1:(ye===null||0<F(ye,ze))&&(ye=ze);}return re(ye!==null?function(){ee.continue(ye+te);}:Z),false}),d}function Vr(d,p,_,w){return {type:2,lower:d,upper:p,lowerOpen:_,upperOpen:w}}function fl(d){return {type:1,lower:d,upper:d}}var hl=(Object.defineProperty(fn.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:false,configurable:true}),fn.prototype.between=function(d,p,_,w){_=_!==false,w=w===true;try{return 0<this._cmp(d,p)||this._cmp(d,p)===0&&(_||w)&&(!_||!w)?vo(this):new this.Collection(this,function(){return Vr(d,p,!_,!w)})}catch{return lr(this,an)}},fn.prototype.equals=function(d){return d==null?lr(this,an):new this.Collection(this,function(){return fl(d)})},fn.prototype.above=function(d){return d==null?lr(this,an):new this.Collection(this,function(){return Vr(d,void 0,true)})},fn.prototype.aboveOrEqual=function(d){return d==null?lr(this,an):new this.Collection(this,function(){return Vr(d,void 0,false)})},fn.prototype.below=function(d){return d==null?lr(this,an):new this.Collection(this,function(){return Vr(void 0,d,false,true)})},fn.prototype.belowOrEqual=function(d){return d==null?lr(this,an):new this.Collection(this,function(){return Vr(void 0,d)})},fn.prototype.startsWith=function(d){return typeof d!="string"?lr(this,nn):this.between(d,d+dn,true,true)},fn.prototype.startsWithIgnoreCase=function(d){return d===""?this.startsWith(d):xa(this,function(p,_){return p.indexOf(_[0])===0},[d],dn)},fn.prototype.equalsIgnoreCase=function(d){return xa(this,function(p,_){return p===_[0]},[d],"")},fn.prototype.anyOfIgnoreCase=function(){var d=we.apply(pe,arguments);return d.length===0?vo(this):xa(this,function(p,_){return _.indexOf(p)!==-1},d,"")},fn.prototype.startsWithAnyOfIgnoreCase=function(){var d=we.apply(pe,arguments);return d.length===0?vo(this):xa(this,function(p,_){return _.some(function(w){return p.indexOf(w)===0})},d,dn)},fn.prototype.anyOf=function(){var d=this,p=we.apply(pe,arguments),_=this._cmp;try{p.sort(_);}catch{return lr(this,an)}if(p.length===0)return vo(this);var w=new this.Collection(this,function(){return Vr(p[0],p[p.length-1])});w._ondirectionchange=function(D){_=D==="next"?d._ascending:d._descending,p.sort(_);};var C=0;return w._addAlgorithm(function(D,F,j){for(var W=D.key;0<_(W,p[C]);)if(++C===p.length)return F(j),false;return _(W,p[C])===0||(F(function(){D.continue(p[C]);}),false)}),w},fn.prototype.notEqual=function(d){return this.inAnyRange([[-1/0,d],[d,this.db._maxKey]],{includeLowers:false,includeUppers:false})},fn.prototype.noneOf=function(){var d=we.apply(pe,arguments);if(d.length===0)return new this.Collection(this);try{d.sort(this._ascending);}catch{return lr(this,an)}var p=d.reduce(function(_,w){return _?_.concat([[_[_.length-1][1],w]]):[[-1/0,w]]},null);return p.push([d[d.length-1],this.db._maxKey]),this.inAnyRange(p,{includeLowers:false,includeUppers:false})},fn.prototype.inAnyRange=function(de,p){var _=this,w=this._cmp,C=this._ascending,D=this._descending,F=this._min,j=this._max;if(de.length===0)return vo(this);if(!de.every(function(ge){return ge[0]!==void 0&&ge[1]!==void 0&&C(ge[0],ge[1])<=0}))return lr(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",H.InvalidArgument);var W=!p||p.includeLowers!==false,J=p&&p.includeUppers===true,te,q=C;function ie(ge,ye){return q(ge[0],ye[0])}try{(te=de.reduce(function(ge,ye){for(var Te=0,ze=ge.length;Te<ze;++Te){var rt=ge[Te];if(w(ye[0],rt[1])<0&&0<w(ye[1],rt[0])){rt[0]=F(rt[0],ye[0]),rt[1]=j(rt[1],ye[1]);break}}return Te===ze&&ge.push(ye),ge},[])).sort(ie);}catch{return lr(this,an)}var Y=0,ee=J?function(ge){return 0<C(ge,te[Y][1])}:function(ge){return 0<=C(ge,te[Y][1])},re=W?function(ge){return 0<D(ge,te[Y][0])}:function(ge){return 0<=D(ge,te[Y][0])},Z=ee,de=new this.Collection(this,function(){return Vr(te[0][0],te[te.length-1][1],!W,!J)});return de._ondirectionchange=function(ge){q=ge==="next"?(Z=ee,C):(Z=re,D),te.sort(ie);},de._addAlgorithm(function(ge,ye,Te){for(var ze,rt=ge.key;Z(rt);)if(++Y===te.length)return ye(Te),false;return !ee(ze=rt)&&!re(ze)||(_._cmp(rt,te[Y][1])===0||_._cmp(rt,te[Y][0])===0||ye(function(){q===C?ge.continue(te[Y][0]):ge.continue(te[Y][1]);}),false)}),de},fn.prototype.startsWithAnyOf=function(){var d=we.apply(pe,arguments);return d.every(function(p){return typeof p=="string"})?d.length===0?vo(this):this.inAnyRange(d.map(function(p){return [p,p+dn]})):lr(this,"startsWithAnyOf() only works with strings")},fn);function fn(){}function sn(d){return qe(function(p){return Uo(p),d(p.target.error),false})}function Uo(d){d.stopPropagation&&d.stopPropagation(),d.preventDefault&&d.preventDefault();}var Sa="storagemutated",Ca="x-storagemutated-1",Yn=wo(null,Sa),fu=(xr.prototype._lock=function(){return P(!oe.global),++this._reculock,this._reculock!==1||oe.global||(oe.lockOwnerFor=this),this},xr.prototype._unlock=function(){if(P(!oe.global),--this._reculock==0)for(oe.global||(oe.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var d=this._blockedFuncs.shift();try{Qt(d[1],d[0]);}catch{}}return this},xr.prototype._locked=function(){return this._reculock&&oe.lockOwnerFor!==this},xr.prototype.create=function(d){var p=this;if(!this.mode)return this;var _=this.db.idbdb,w=this.db._state.dbOpenError;if(P(!this.idbtrans),!d&&!_)switch(w&&w.name){case "DatabaseClosedError":throw new H.DatabaseClosed(w);case "MissingAPIError":throw new H.MissingAPI(w.message,w);default:throw new H.OpenFailed(w)}if(!this.active)throw new H.TransactionInactive;return P(this._completion._state===null),(d=this.idbtrans=d||(this.db.core||_).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=qe(function(C){Uo(C),p._reject(d.error);}),d.onabort=qe(function(C){Uo(C),p.active&&p._reject(new H.Abort(d.error)),p.active=false,p.on("abort").fire(C);}),d.oncomplete=qe(function(){p.active=false,p._resolve(),"mutatedParts"in d&&Yn.storagemutated.fire(d.mutatedParts);}),this},xr.prototype._promise=function(d,p,_){var w=this;if(d==="readwrite"&&this.mode!=="readwrite")return Gt(new H.ReadOnly("Transaction is readonly"));if(!this.active)return Gt(new H.TransactionInactive);if(this._locked())return new ue(function(D,F){w._blockedFuncs.push([function(){w._promise(d,p,_).then(D,F);},oe]);});if(_)return at(function(){var D=new ue(function(F,j){w._lock();var W=p(F,j,w);W&&W.then&&W.then(F,j);});return D.finally(function(){return w._unlock()}),D._lib=true,D});var C=new ue(function(D,F){var j=p(D,F,w);j&&j.then&&j.then(D,F);});return C._lib=true,C},xr.prototype._root=function(){return this.parent?this.parent._root():this},xr.prototype.waitFor=function(d){var p,_=this._root(),w=ue.resolve(d);_._waitingFor?_._waitingFor=_._waitingFor.then(function(){return w}):(_._waitingFor=w,_._waitingQueue=[],p=_.idbtrans.objectStore(_.storeNames[0]),(function D(){for(++_._spinCount;_._waitingQueue.length;)_._waitingQueue.shift()();_._waitingFor&&(p.get(-1/0).onsuccess=D);})());var C=_._waitingFor;return new ue(function(D,F){w.then(function(j){return _._waitingQueue.push(qe(D.bind(null,j)))},function(j){return _._waitingQueue.push(qe(F.bind(null,j)))}).finally(function(){_._waitingFor===C&&(_._waitingFor=null);});})},xr.prototype.abort=function(){this.active&&(this.active=false,this.idbtrans&&this.idbtrans.abort(),this._reject(new H.Abort));},xr.prototype.table=function(d){var p=this._memoizedTables||(this._memoizedTables={});if(u(p,d))return p[d];var _=this.schema[d];if(!_)throw new H.NotFound("Table "+d+" not part of transaction");return _=new this.db.Table(d,_,this),_.core=this.db.core.table(d),p[d]=_},xr);function xr(){}function jo(d,p,_,w,C,D,F){return {name:d,keyPath:p,unique:_,multi:w,auto:C,compound:D,src:(_&&!F?"&":"")+(w?"*":"")+(C?"++":"")+ts(p)}}function ts(d){return typeof d=="string"?d:d?"["+[].join.call(d,"+")+"]":""}function ns(d,p,_){return {name:d,primKey:p,indexes:_,mappedClass:null,idxByName:(w=function(C){return [C.name,C]},_.reduce(function(C,D,F){return F=w(D,F),F&&(C[F[0]]=F[1]),C},{}))};var w;}var Ta=function(d){try{return d.only([[]]),Ta=function(){return [[]]},[[]]}catch{return Ta=function(){return dn},dn}};function Ma(d){return d==null?function(){}:typeof d=="string"?(p=d).split(".").length===1?function(_){return _[p]}:function(_){return I(_,p)}:function(_){return I(_,d)};var p;}function Se(d){return [].slice.call(d)}var wt=0;function Bt(d){return d==null?":id":typeof d=="string"?d:"[".concat(d.join("+"),"]")}function zr(d,p,W){function w(Z){if(Z.type===3)return null;if(Z.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var Y=Z.lower,ee=Z.upper,re=Z.lowerOpen,Z=Z.upperOpen;return Y===void 0?ee===void 0?null:p.upperBound(ee,!!Z):ee===void 0?p.lowerBound(Y,!!re):p.bound(Y,ee,!!re,!!Z)}function C(ie){var Y,ee=ie.name;return {name:ee,schema:ie,mutate:function(re){var Z=re.trans,de=re.type,ge=re.keys,ye=re.values,Te=re.range;return new Promise(function(ze,rt){ze=qe(ze);var Ke=Z.objectStore(ee),Je=Ke.keyPath==null,st=de==="put"||de==="add";if(!st&&de!=="delete"&&de!=="deleteRange")throw new Error("Invalid operation type: "+de);var Qe,pt=(ge||ye||{length:1}).length;if(ge&&ye&&ge.length!==ye.length)throw new Error("Given keys array must have same length as given values array.");if(pt===0)return ze({numFailures:0,failures:{},results:[],lastResult:void 0});function Vt(cr){++Sr,Uo(cr);}var Yt=[],Jt=[],Sr=0;if(de==="deleteRange"){if(Te.type===4)return ze({numFailures:Sr,failures:Jt,results:[],lastResult:void 0});Te.type===3?Yt.push(Qe=Ke.clear()):Yt.push(Qe=Ke.delete(w(Te)));}else {var Je=st?Je?[ye,ge]:[ye,null]:[ge,null],qt=Je[0],rr=Je[1];if(st)for(var or=0;or<pt;++or)Yt.push(Qe=rr&&rr[or]!==void 0?Ke[de](qt[or],rr[or]):Ke[de](qt[or])),Qe.onerror=Vt;else for(or=0;or<pt;++or)Yt.push(Qe=Ke[de](qt[or])),Qe.onerror=Vt;}function kl(cr){cr=cr.target.result,Yt.forEach(function(Da,Mu){return Da.error!=null&&(Jt[Mu]=Da.error)}),ze({numFailures:Sr,failures:Jt,results:de==="delete"?ge:Yt.map(function(Da){return Da.result}),lastResult:cr});}Qe.onerror=function(cr){Vt(cr),kl(cr);},Qe.onsuccess=kl;})},getMany:function(re){var Z=re.trans,de=re.keys;return new Promise(function(ge,ye){ge=qe(ge);for(var Te,ze=Z.objectStore(ee),rt=de.length,Ke=new Array(rt),Je=0,st=0,Qe=function(Yt){Yt=Yt.target,Ke[Yt._pos]=Yt.result,++st===Je&&ge(Ke);},pt=sn(ye),Vt=0;Vt<rt;++Vt)de[Vt]!=null&&((Te=ze.get(de[Vt]))._pos=Vt,Te.onsuccess=Qe,Te.onerror=pt,++Je);Je===0&&ge(Ke);})},get:function(re){var Z=re.trans,de=re.key;return new Promise(function(ge,ye){ge=qe(ge);var Te=Z.objectStore(ee).get(de);Te.onsuccess=function(ze){return ge(ze.target.result)},Te.onerror=sn(ye);})},query:(Y=J,function(re){return new Promise(function(Z,de){Z=qe(Z);var ge,ye,Te,Je=re.trans,ze=re.values,rt=re.limit,Qe=re.query,Ke=rt===1/0?void 0:rt,st=Qe.index,Qe=Qe.range,Je=Je.objectStore(ee),st=st.isPrimaryKey?Je:Je.index(st.name),Qe=w(Qe);if(rt===0)return Z({result:[]});Y?((Ke=ze?st.getAll(Qe,Ke):st.getAllKeys(Qe,Ke)).onsuccess=function(pt){return Z({result:pt.target.result})},Ke.onerror=sn(de)):(ge=0,ye=!ze&&"openKeyCursor"in st?st.openKeyCursor(Qe):st.openCursor(Qe),Te=[],ye.onsuccess=function(pt){var Vt=ye.result;return Vt?(Te.push(ze?Vt.value:Vt.primaryKey),++ge===rt?Z({result:Te}):void Vt.continue()):Z({result:Te})},ye.onerror=sn(de));})}),openCursor:function(re){var Z=re.trans,de=re.values,ge=re.query,ye=re.reverse,Te=re.unique;return new Promise(function(ze,rt){ze=qe(ze);var st=ge.index,Ke=ge.range,Je=Z.objectStore(ee),Je=st.isPrimaryKey?Je:Je.index(st.name),st=ye?Te?"prevunique":"prev":Te?"nextunique":"next",Qe=!de&&"openKeyCursor"in Je?Je.openKeyCursor(w(Ke),st):Je.openCursor(w(Ke),st);Qe.onerror=sn(rt),Qe.onsuccess=qe(function(pt){var Vt,Yt,Jt,Sr,qt=Qe.result;qt?(qt.___id=++wt,qt.done=false,Vt=qt.continue.bind(qt),Yt=(Yt=qt.continuePrimaryKey)&&Yt.bind(qt),Jt=qt.advance.bind(qt),Sr=function(){throw new Error("Cursor not stopped")},qt.trans=Z,qt.stop=qt.continue=qt.continuePrimaryKey=qt.advance=function(){throw new Error("Cursor not started")},qt.fail=qe(rt),qt.next=function(){var rr=this,or=1;return this.start(function(){return or--?rr.continue():rr.stop()}).then(function(){return rr})},qt.start=function(rr){function or(){if(Qe.result)try{rr();}catch(cr){qt.fail(cr);}else qt.done=true,qt.start=function(){throw new Error("Cursor behind last entry")},qt.stop();}var kl=new Promise(function(cr,Da){cr=qe(cr),Qe.onerror=sn(Da),qt.fail=Da,qt.stop=function(Mu){qt.stop=qt.continue=qt.continuePrimaryKey=qt.advance=Sr,cr(Mu);};});return Qe.onsuccess=qe(function(cr){Qe.onsuccess=or,or();}),qt.continue=Vt,qt.continuePrimaryKey=Yt,qt.advance=Jt,or(),kl},ze(qt)):ze(null);},rt);})},count:function(re){var Z=re.query,de=re.trans,ge=Z.index,ye=Z.range;return new Promise(function(Te,ze){var rt=de.objectStore(ee),Ke=ge.isPrimaryKey?rt:rt.index(ge.name),rt=w(ye),Ke=rt?Ke.count(rt):Ke.count();Ke.onsuccess=qe(function(Je){return Te(Je.target.result)}),Ke.onerror=sn(ze);})}}}var D,F,j,te=(F=W,j=Se((D=d).objectStoreNames),{schema:{name:D.name,tables:j.map(function(ie){return F.objectStore(ie)}).map(function(ie){var Y=ie.keyPath,Z=ie.autoIncrement,ee=s(Y),re={},Z={name:ie.name,primaryKey:{name:null,isPrimaryKey:true,outbound:Y==null,compound:ee,keyPath:Y,autoIncrement:Z,unique:true,extractKey:Ma(Y)},indexes:Se(ie.indexNames).map(function(de){return ie.index(de)}).map(function(Te){var ge=Te.name,ye=Te.unique,ze=Te.multiEntry,Te=Te.keyPath,ze={name:ge,compound:s(Te),keyPath:Te,unique:ye,multiEntry:ze,extractKey:Ma(Te)};return re[Bt(Te)]=ze}),getIndexByKeyPath:function(de){return re[Bt(de)]}};return re[":id"]=Z.primaryKey,Y!=null&&(re[Bt(Y)]=Z.primaryKey),Z})},hasGetAll:0<j.length&&"getAll"in F.objectStore(j[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),W=te.schema,J=te.hasGetAll,te=W.tables.map(C),q={};return te.forEach(function(ie){return q[ie.name]=ie}),{stack:"dbcore",transaction:d.transaction.bind(d),table:function(ie){if(!q[ie])throw new Error("Table '".concat(ie,"' not found"));return q[ie]},MIN_KEY:-1/0,MAX_KEY:Ta(p),schema:W}}function Ho(d,p,_,w){var C=_.IDBKeyRange;return _.indexedDB,{dbcore:(w=zr(p,C,w),d.dbcore.reduce(function(D,F){return F=F.create,r(r({},D),F(D))},w))}}function Ia(d,w){var _=w.db,w=Ho(d._middlewares,_,d._deps,w);d.core=w.dbcore,d.tables.forEach(function(C){var D=C.name;d.core.schema.tables.some(function(F){return F.name===D})&&(C.core=d.core.table(D),d[D]instanceof d.Table&&(d[D].core=C.core));});}function qo(d,p,_,w){_.forEach(function(C){var D=w[C];p.forEach(function(F){var j=(function W(J,te){return k(J,te)||(J=c(J))&&W(J,te)})(F,C);(!j||"value"in j&&j.value===void 0)&&(F===d.Transaction.prototype||F instanceof d.Transaction?y(F,C,{get:function(){return this.table(C)},set:function(W){g(this,C,{value:W,writable:true,configurable:true,enumerable:true});}}):F[C]=new d.Table(C,D));});});}function ri(d,p){p.forEach(function(_){for(var w in _)_[w]instanceof d.Table&&delete _[w];});}function rs(d,p){return d._cfg.version-p._cfg.version}function Bh(d,p,_,w){var C=d._dbSchema;_.objectStoreNames.contains("$meta")&&!C.$meta&&(C.$meta=ns("$meta",Uh("")[0],[]),d._storeNames.push("$meta"));var D=d._createTransaction("readwrite",d._storeNames,C);D.create(_),D._completion.catch(w);var F=D._reject.bind(D),j=oe.transless||oe;at(function(){return oe.trans=D,oe.transless=j,p!==0?(Ia(d,_),J=p,((W=D).storeNames.includes("$meta")?W.table("$meta").get("version").then(function(te){return te??J}):ue.resolve(J)).then(function(te){return ie=te,Y=D,ee=_,re=[],te=(q=d)._versions,Z=q._dbSchema=ai(0,q.idbdb,ee),(te=te.filter(function(de){return de._cfg.version>=ie})).length!==0?(te.forEach(function(de){re.push(function(){var ge=Z,ye=de._cfg.dbschema;pl(q,ge,ee),pl(q,ye,ee),Z=q._dbSchema=ye;var Te=Ar(ge,ye);Te.add.forEach(function(st){Ra(ee,st[0],st[1].primKey,st[1].indexes);}),Te.change.forEach(function(st){if(st.recreate)throw new H.Upgrade("Not yet support for changing primary key");var Qe=ee.objectStore(st.name);st.add.forEach(function(pt){return oi(Qe,pt)}),st.change.forEach(function(pt){Qe.deleteIndex(pt.name),oi(Qe,pt);}),st.del.forEach(function(pt){return Qe.deleteIndex(pt)});});var ze=de._cfg.contentUpgrade;if(ze&&de._cfg.version>ie){Ia(q,ee),Y._memoizedTables={};var rt=U(ye);Te.del.forEach(function(st){rt[st]=ge[st];}),ri(q,[q.Transaction.prototype]),qo(q,[q.Transaction.prototype],i(rt),rt),Y.schema=rt;var Ke,Je=z(ze);return Je&&$t(),Te=ue.follow(function(){var st;(Ke=ze(Y))&&Je&&(st=Ct.bind(null,null),Ke.then(st,st));}),Ke&&typeof Ke.then=="function"?ue.resolve(Ke):Te.then(function(){return Ke})}}),re.push(function(ge){var ye,Te,ze=de._cfg.dbschema;ye=ze,Te=ge,[].slice.call(Te.db.objectStoreNames).forEach(function(rt){return ye[rt]==null&&Te.db.deleteObjectStore(rt)}),ri(q,[q.Transaction.prototype]),qo(q,[q.Transaction.prototype],q._storeNames,q._dbSchema),Y.schema=q._dbSchema;}),re.push(function(ge){q.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(q.idbdb.version/10)===de._cfg.version?(q.idbdb.deleteObjectStore("$meta"),delete q._dbSchema.$meta,q._storeNames=q._storeNames.filter(function(ye){return ye!=="$meta"})):ge.objectStore("$meta").put(de._cfg.version,"version"));});}),(function de(){return re.length?ue.resolve(re.shift()(Y.idbtrans)).then(de):ue.resolve()})().then(function(){Vo(Z,ee);})):ue.resolve();var q,ie,Y,ee,re,Z;}).catch(F)):(i(C).forEach(function(te){Ra(_,te,C[te].primKey,C[te].indexes);}),Ia(d,_),void ue.follow(function(){return d.on.populate.fire(D)}).catch(F));var W,J;});}function Kr(d,p){Vo(d._dbSchema,p),p.db.version%10!=0||p.objectStoreNames.contains("$meta")||p.db.createObjectStore("$meta").add(Math.ceil(p.db.version/10-1),"version");var _=ai(0,d.idbdb,p);pl(d,d._dbSchema,p);for(var w=0,C=Ar(_,d._dbSchema).change;w<C.length;w++){var D=(function(F){if(F.change.length||F.recreate)return console.warn("Unable to patch indexes of table ".concat(F.name," because it has changes on the type of index or primary key.")),{value:void 0};var j=p.objectStore(F.name);F.add.forEach(function(W){Mt&&console.debug("Dexie upgrade patch: Creating missing index ".concat(F.name,".").concat(W.src)),oi(j,W);});})(C[w]);if(typeof D=="object")return D.value}}function Ar(d,p){var _,w={del:[],add:[],change:[]};for(_ in d)p[_]||w.del.push(_);for(_ in p){var C=d[_],D=p[_];if(C){var F={name:_,def:D,recreate:false,del:[],add:[],change:[]};if(""+(C.primKey.keyPath||"")!=""+(D.primKey.keyPath||"")||C.primKey.auto!==D.primKey.auto)F.recreate=true,w.change.push(F);else {var j=C.idxByName,W=D.idxByName,J=void 0;for(J in j)W[J]||F.del.push(J);for(J in W){var te=j[J],q=W[J];te?te.src!==q.src&&F.change.push(q):F.add.push(q);}(0<F.del.length||0<F.add.length||0<F.change.length)&&w.change.push(F);}}else w.add.push([_,D]);}return w}function Ra(d,p,_,w){var C=d.db.createObjectStore(p,_.keyPath?{keyPath:_.keyPath,autoIncrement:_.auto}:{autoIncrement:_.auto});return w.forEach(function(D){return oi(C,D)}),C}function Vo(d,p){i(d).forEach(function(_){p.db.objectStoreNames.contains(_)||(Mt&&console.debug("Dexie: Creating missing table",_),Ra(p,_,d[_].primKey,d[_].indexes));});}function oi(d,p){d.createIndex(p.name,p.keyPath,{unique:p.unique,multiEntry:p.multi});}function ai(d,p,_){var w={};return M(p.objectStoreNames,0).forEach(function(C){for(var D=_.objectStore(C),F=jo(ts(J=D.keyPath),J||"",true,false,!!D.autoIncrement,J&&typeof J!="string",true),j=[],W=0;W<D.indexNames.length;++W){var te=D.index(D.indexNames[W]),J=te.keyPath,te=jo(te.name,J,!!te.unique,!!te.multiEntry,false,J&&typeof J!="string",false);j.push(te);}w[C]=ns(C,F,j);}),w}function pl(d,p,_){for(var w=_.db.objectStoreNames,C=0;C<w.length;++C){var D=w[C],F=_.objectStore(D);d._hasGetAll="getAll"in F;for(var j=0;j<F.indexNames.length;++j){var W=F.indexNames[j],J=F.index(W).keyPath,te=typeof J=="string"?J:"["+M(J).join("+")+"]";!p[D]||(J=p[D].idxByName[te])&&(J.name=W,delete p[D].idxByName[te],p[D].idxByName[W]=J);}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(d._hasGetAll=false);}function Uh(d){return d.split(",").map(function(p,_){var w=(p=p.trim()).replace(/([&*]|\+\+)/g,""),C=/^\[/.test(w)?w.match(/^\[(.*)\]$/)[1].split("+"):w;return jo(w,C||null,/\&/.test(p),/\*/.test(p),/\+\+/.test(p),s(C),_===0)})}var Zv=(ml.prototype._parseStoresSpec=function(d,p){i(d).forEach(function(_){if(d[_]!==null){var w=Uh(d[_]),C=w.shift();if(C.unique=true,C.multi)throw new H.Schema("Primary key cannot be multi-valued");w.forEach(function(D){if(D.auto)throw new H.Schema("Only primary key can be marked as autoIncrement (++)");if(!D.keyPath)throw new H.Schema("Index must have a name and cannot be an empty string")}),p[_]=ns(_,C,w);}});},ml.prototype.stores=function(_){var p=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,_):_;var _=p._versions,w={},C={};return _.forEach(function(D){l(w,D._cfg.storesSource),C=D._cfg.dbschema={},D._parseStoresSpec(w,C);}),p._dbSchema=C,ri(p,[p._allTables,p,p.Transaction.prototype]),qo(p,[p._allTables,p,p.Transaction.prototype,this._cfg.tables],i(C),C),p._storeNames=i(C),this},ml.prototype.upgrade=function(d){return this._cfg.contentUpgrade=Tt(this._cfg.contentUpgrade||ve,d),this},ml);function ml(){}function hu(d,p){var _=d._dbNamesDB;return _||(_=d._dbNamesDB=new ko(In,{addons:[],indexedDB:d,IDBKeyRange:p})).version(1).stores({dbnames:"name"}),_.table("dbnames")}function pu(d){return d&&typeof d.databases=="function"}function mu(d){return at(function(){return oe.letThrough=true,d()})}function gu(d){return !("from"in d)}var nr=function(d,p){if(!this){var _=new nr;return d&&"d"in d&&l(_,d),_}l(this,arguments.length?{d:1,from:d,to:1<arguments.length?p:d}:{d:0});};function os(d,p,_){var w=Rt(p,_);if(!isNaN(w)){if(0<w)throw RangeError();if(gu(d))return l(d,{from:p,to:_,d:1});var C=d.l,w=d.r;if(Rt(_,d.from)<0)return C?os(C,p,_):d.l={from:p,to:_,d:1,l:null,r:null},Hh(d);if(0<Rt(p,d.to))return w?os(w,p,_):d.r={from:p,to:_,d:1,l:null,r:null},Hh(d);Rt(p,d.from)<0&&(d.from=p,d.l=null,d.d=w?w.d+1:1),0<Rt(_,d.to)&&(d.to=_,d.r=null,d.d=d.l?d.l.d+1:1),_=!d.r,C&&!d.l&&as(d,C),w&&_&&as(d,w);}}function as(d,p){gu(p)||(function _(w,W){var D=W.from,F=W.to,j=W.l,W=W.r;os(w,D,F),j&&_(w,j),W&&_(w,W);})(d,p);}function jh(d,p){var _=gl(p),w=_.next();if(w.done)return false;for(var C=w.value,D=gl(d),F=D.next(C.from),j=F.value;!w.done&&!F.done;){if(Rt(j.from,C.to)<=0&&0<=Rt(j.to,C.from))return true;Rt(C.from,j.from)<0?C=(w=_.next(j.from)).value:j=(F=D.next(C.from)).value;}return false}function gl(d){var p=gu(d)?null:{s:0,n:d};return {next:function(_){for(var w=0<arguments.length;p;)switch(p.s){case 0:if(p.s=1,w)for(;p.n.l&&Rt(_,p.n.from)<0;)p={up:p,n:p.n.l,s:1};else for(;p.n.l;)p={up:p,n:p.n.l,s:1};case 1:if(p.s=2,!w||Rt(_,p.n.to)<=0)return {value:p.n,done:false};case 2:if(p.n.r){p.s=3,p={up:p,n:p.n.r,s:0};continue}case 3:p=p.up;}return {done:true}}}}function Hh(d){var p,_,w=(((p=d.r)===null||p===void 0?void 0:p.d)||0)-(((_=d.l)===null||_===void 0?void 0:_.d)||0),C=1<w?"r":w<-1?"l":"";C&&(p=C=="r"?"l":"r",_=r({},d),w=d[C],d.from=w.from,d.to=w.to,d[C]=w[C],_[C]=w[p],(d[p]=_).d=qh(_)),d.d=qh(d);}function qh(_){var p=_.r,_=_.l;return (p?_?Math.max(p.d,_.d):p.d:_?_.d:0)+1}function _l(d,p){return i(p).forEach(function(_){d[_]?as(d[_],p[_]):d[_]=(function w(C){var D,F,j={};for(D in C)u(C,D)&&(F=C[D],j[D]=!F||typeof F!="object"||L.has(F.constructor)?F:w(F));return j})(p[_]);}),d}function _u(d,p){return d.all||p.all||Object.keys(d).some(function(_){return p[_]&&jh(p[_],d[_])})}m(nr.prototype,((Dr={add:function(d){return as(this,d),this},addKey:function(d){return os(this,d,d),this},addKeys:function(d){var p=this;return d.forEach(function(_){return os(p,_,_)}),this},hasKey:function(d){var p=gl(this).next(d).value;return p&&Rt(p.from,d)<=0&&0<=Rt(p.to,d)}})[Q]=function(){return gl(this)},Dr));var Ea={},yu={},bu=false;function yl(d){_l(yu,d),bu||(bu=true,setTimeout(function(){bu=false,wu(yu,!(yu={}));},0));}function wu(d,p){p===void 0&&(p=false);var _=new Set;if(d.all)for(var w=0,C=Object.values(Ea);w<C.length;w++)Vh(F=C[w],d,_,p);else for(var D in d){var F,j=/^idb\:\/\/(.*)\/(.*)\//.exec(D);j&&(D=j[1],j=j[2],(F=Ea["idb://".concat(D,"/").concat(j)])&&Vh(F,d,_,p));}_.forEach(function(W){return W()});}function Vh(d,p,_,w){for(var C=[],D=0,F=Object.entries(d.queries.query);D<F.length;D++){for(var j=F[D],W=j[0],J=[],te=0,q=j[1];te<q.length;te++){var ie=q[te];_u(p,ie.obsSet)?ie.subscribers.forEach(function(Z){return _.add(Z)}):w&&J.push(ie);}w&&C.push([W,J]);}if(w)for(var Y=0,ee=C;Y<ee.length;Y++){var re=ee[Y],W=re[0],J=re[1];d.queries.query[W]=J;}}function Qv(d){var p=d._state,_=d._deps.indexedDB;if(p.isBeingOpened||d.idbdb)return p.dbReadyPromise.then(function(){return p.dbOpenError?Gt(p.dbOpenError):d});p.isBeingOpened=true,p.dbOpenError=null,p.openComplete=false;var w=p.openCanceller,C=Math.round(10*d.verno),D=false;function F(){if(p.openCanceller!==w)throw new H.DatabaseClosed("db.open() was cancelled")}function j(){return new ue(function(ie,Y){if(F(),!_)throw new H.MissingAPI;var ee=d.name,re=p.autoSchema||!C?_.open(ee):_.open(ee,C);if(!re)throw new H.MissingAPI;re.onerror=sn(Y),re.onblocked=qe(d._fireOnBlocked),re.onupgradeneeded=qe(function(Z){var de;te=re.transaction,p.autoSchema&&!d._options.allowEmptyDB?(re.onerror=Uo,te.abort(),re.result.close(),(de=_.deleteDatabase(ee)).onsuccess=de.onerror=qe(function(){Y(new H.NoSuchDatabase("Database ".concat(ee," doesnt exist")));})):(te.onerror=sn(Y),Z=Z.oldVersion>Math.pow(2,62)?0:Z.oldVersion,q=Z<1,d.idbdb=re.result,D&&Kr(d,te),Bh(d,Z/10,te,Y));},Y),re.onsuccess=qe(function(){te=null;var Z,de,ge,ye,Te,ze=d.idbdb=re.result,rt=M(ze.objectStoreNames);if(0<rt.length)try{var Ke=ze.transaction((ye=rt).length===1?ye[0]:ye,"readonly");if(p.autoSchema)de=ze,ge=Ke,(Z=d).verno=de.version/10,ge=Z._dbSchema=ai(0,de,ge),Z._storeNames=M(de.objectStoreNames,0),qo(Z,[Z._allTables],i(ge),ge);else if(pl(d,d._dbSchema,Ke),((Te=Ar(ai(0,(Te=d).idbdb,Ke),Te._dbSchema)).add.length||Te.change.some(function(Je){return Je.add.length||Je.change.length}))&&!D)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),ze.close(),C=ze.version+1,D=!0,ie(j());Ia(d,Ke);}catch{}Mn.push(d),ze.onversionchange=qe(function(Je){p.vcFired=true,d.on("versionchange").fire(Je);}),ze.onclose=qe(function(Je){d.on("close").fire(Je);}),q&&(Te=d._deps,Ke=ee,ze=Te.indexedDB,Te=Te.IDBKeyRange,pu(ze)||Ke===In||hu(ze,Te).put({name:Ke}).catch(ve)),ie();},Y);}).catch(function(ie){switch(ie==null?void 0:ie.name){case "UnknownError":if(0<p.PR1398_maxLoop)return p.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),j();break;case "VersionError":if(0<C)return C=0,j()}return ue.reject(ie)})}var W,J=p.dbReadyResolve,te=null,q=false;return ue.race([w,(typeof navigator>"u"?ue.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ie){function Y(){return indexedDB.databases().finally(ie)}W=setInterval(Y,100),Y();}).finally(function(){return clearInterval(W)}):Promise.resolve()).then(j)]).then(function(){return F(),p.onReadyBeingFired=[],ue.resolve(mu(function(){return d.on.ready.fire(d.vip)})).then(function ie(){if(0<p.onReadyBeingFired.length){var Y=p.onReadyBeingFired.reduce(Tt,ve);return p.onReadyBeingFired=[],ue.resolve(mu(function(){return Y(d.vip)})).then(ie)}})}).finally(function(){p.openCanceller===w&&(p.onReadyBeingFired=null,p.isBeingOpened=false);}).catch(function(ie){p.dbOpenError=ie;try{te&&te.abort();}catch{}return w===p.openCanceller&&d._close(),Gt(ie)}).finally(function(){p.openComplete=true,J();}).then(function(){var ie;return q&&(ie={},d.tables.forEach(function(Y){Y.schema.indexes.forEach(function(ee){ee.name&&(ie["idb://".concat(d.name,"/").concat(Y.name,"/").concat(ee.name)]=new nr(-1/0,[[[]]]));}),ie["idb://".concat(d.name,"/").concat(Y.name,"/")]=ie["idb://".concat(d.name,"/").concat(Y.name,"/:dels")]=new nr(-1/0,[[[]]]);}),Yn(Sa).fire(ie),wu(ie,true)),d})}function vu(d){function p(D){return d.next(D)}var _=C(p),w=C(function(D){return d.throw(D)});function C(D){return function(W){var j=D(W),W=j.value;return j.done?W:W&&typeof W.then=="function"?W.then(_,w):s(W)?Promise.all(W).then(_,w):_(W)}}return C(p)()}function bl(d,p,_){for(var w=s(d)?d.slice():[d],C=0;C<_;++C)w.push(p);return w}var ek={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(d){return r(r({},d),{table:function(p){var _=d.table(p),w=_.schema,C={},D=[];function F(q,ie,Y){var ee=Bt(q),re=C[ee]=C[ee]||[],Z=q==null?0:typeof q=="string"?1:q.length,de=0<ie,de=r(r({},Y),{name:de?"".concat(ee,"(virtual-from:").concat(Y.name,")"):Y.name,lowLevelIndex:Y,isVirtual:de,keyTail:ie,keyLength:Z,extractKey:Ma(q),unique:!de&&Y.unique});return re.push(de),de.isPrimaryKey||D.push(de),1<Z&&F(Z===2?q[0]:q.slice(0,Z-1),ie+1,Y),re.sort(function(ge,ye){return ge.keyTail-ye.keyTail}),de}p=F(w.primaryKey.keyPath,0,w.primaryKey),C[":id"]=[p];for(var j=0,W=w.indexes;j<W.length;j++){var J=W[j];F(J.keyPath,0,J);}function te(q){var ie,Y=q.query.index;return Y.isVirtual?r(r({},q),{query:{index:Y.lowLevelIndex,range:(ie=q.query.range,Y=Y.keyTail,{type:ie.type===1?2:ie.type,lower:bl(ie.lower,ie.lowerOpen?d.MAX_KEY:d.MIN_KEY,Y),lowerOpen:true,upper:bl(ie.upper,ie.upperOpen?d.MIN_KEY:d.MAX_KEY,Y),upperOpen:true})}}):q}return r(r({},_),{schema:r(r({},w),{primaryKey:p,indexes:D,getIndexByKeyPath:function(q){return (q=C[Bt(q)])&&q[0]}}),count:function(q){return _.count(te(q))},query:function(q){return _.query(te(q))},openCursor:function(q){var ie=q.query.index,Y=ie.keyTail,ee=ie.isVirtual,re=ie.keyLength;return ee?_.openCursor(te(q)).then(function(de){return de&&Z(de)}):_.openCursor(q);function Z(de){return Object.create(de,{continue:{value:function(ge){ge!=null?de.continue(bl(ge,q.reverse?d.MAX_KEY:d.MIN_KEY,Y)):q.unique?de.continue(de.key.slice(0,re).concat(q.reverse?d.MIN_KEY:d.MAX_KEY,Y)):de.continue();}},continuePrimaryKey:{value:function(ge,ye){de.continuePrimaryKey(bl(ge,d.MAX_KEY,Y),ye);}},primaryKey:{get:function(){return de.primaryKey}},key:{get:function(){var ge=de.key;return re===1?ge[0]:ge.slice(0,re)}},value:{get:function(){return de.value}}})}}})}})}};function ku(d,p,_,w){return _=_||{},w=w||"",i(d).forEach(function(C){var D,F,j;u(p,C)?(D=d[C],F=p[C],typeof D=="object"&&typeof F=="object"&&D&&F?(j=le(D))!==le(F)?_[w+C]=p[C]:j==="Object"?ku(D,F,_,w+C+"."):D!==F&&(_[w+C]=p[C]):D!==F&&(_[w+C]=p[C])):_[w+C]=void 0;}),i(p).forEach(function(C){u(d,C)||(_[w+C]=p[C]);}),_}function xu(d,p){return p.type==="delete"?p.keys:p.keys||p.values.map(d.extractKey)}var tk={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(d){return r(r({},d),{table:function(p){var _=d.table(p),w=_.schema.primaryKey;return r(r({},_),{mutate:function(C){var D=oe.trans,F=D.table(p).hook,j=F.deleting,W=F.creating,J=F.updating;switch(C.type){case "add":if(W.fire===ve)break;return D._promise("readwrite",function(){return te(C)},true);case "put":if(W.fire===ve&&J.fire===ve)break;return D._promise("readwrite",function(){return te(C)},true);case "delete":if(j.fire===ve)break;return D._promise("readwrite",function(){return te(C)},true);case "deleteRange":if(j.fire===ve)break;return D._promise("readwrite",function(){return (function q(ie,Y,ee){return _.query({trans:ie,values:false,query:{index:w,range:Y},limit:ee}).then(function(re){var Z=re.result;return te({type:"delete",keys:Z,trans:ie}).then(function(de){return 0<de.numFailures?Promise.reject(de.failures[0]):Z.length<ee?{failures:[],numFailures:0,lastResult:void 0}:q(ie,r(r({},Y),{lower:Z[Z.length-1],lowerOpen:true}),ee)})})})(C.trans,C.range,1e4)},true)}return _.mutate(C);function te(q){var ie,Y,ee,re=oe.trans,Z=q.keys||xu(w,q);if(!Z)throw new Error("Keys missing");return (q=q.type==="add"||q.type==="put"?r(r({},q),{keys:Z}):r({},q)).type!=="delete"&&(q.values=o([],q.values)),q.keys&&(q.keys=o([],q.keys)),ie=_,ee=Z,((Y=q).type==="add"?Promise.resolve([]):ie.getMany({trans:Y.trans,keys:ee,cache:"immutable"})).then(function(de){var ge=Z.map(function(ye,Te){var ze,rt,Ke,Je=de[Te],st={onerror:null,onsuccess:null};return q.type==="delete"?j.fire.call(st,ye,Je,re):q.type==="add"||Je===void 0?(ze=W.fire.call(st,ye,q.values[Te],re),ye==null&&ze!=null&&(q.keys[Te]=ye=ze,w.outbound||O(q.values[Te],w.keyPath,ye))):(ze=ku(Je,q.values[Te]),(rt=J.fire.call(st,ze,ye,Je,re))&&(Ke=q.values[Te],Object.keys(rt).forEach(function(Qe){u(Ke,Qe)?Ke[Qe]=rt[Qe]:O(Ke,Qe,rt[Qe]);}))),st});return _.mutate(q).then(function(ye){for(var Te=ye.failures,ze=ye.results,rt=ye.numFailures,ye=ye.lastResult,Ke=0;Ke<Z.length;++Ke){var Je=(ze||Z)[Ke],st=ge[Ke];Je==null?st.onerror&&st.onerror(Te[Ke]):st.onsuccess&&st.onsuccess(q.type==="put"&&de[Ke]?q.values[Ke]:Je);}return {failures:Te,results:ze,numFailures:rt,lastResult:ye}}).catch(function(ye){return ge.forEach(function(Te){return Te.onerror&&Te.onerror(ye)}),Promise.reject(ye)})})}}})}})}};function zh(d,p,_){try{if(!p||p.keys.length<d.length)return null;for(var w=[],C=0,D=0;C<p.keys.length&&D<d.length;++C)Rt(p.keys[C],d[D])===0&&(w.push(_?xe(p.values[C]):p.values[C]),++D);return w.length===d.length?w:null}catch{return null}}var nk={stack:"dbcore",level:-1,create:function(d){return {table:function(p){var _=d.table(p);return r(r({},_),{getMany:function(w){if(!w.cache)return _.getMany(w);var C=zh(w.keys,w.trans._cache,w.cache==="clone");return C?ue.resolve(C):_.getMany(w).then(function(D){return w.trans._cache={keys:w.keys,values:w.cache==="clone"?xe(D):D},D})},mutate:function(w){return w.type!=="add"&&(w.trans._cache=null),_.mutate(w)}})}}}};function Kh(d,p){return d.trans.mode==="readonly"&&!!d.subscr&&!d.trans.explicit&&d.trans.db._options.cache!=="disabled"&&!p.schema.primaryKey.outbound}function Gh(d,p){switch(d){case "query":return p.values&&!p.unique;case "get":case "getMany":case "count":case "openCursor":return false}}var rk={stack:"dbcore",level:0,name:"Observability",create:function(d){var p=d.schema.name,_=new nr(d.MIN_KEY,d.MAX_KEY);return r(r({},d),{transaction:function(w,C,D){if(oe.subscr&&C!=="readonly")throw new H.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(oe.querier));return d.transaction(w,C,D)},table:function(w){var C=d.table(w),D=C.schema,F=D.primaryKey,q=D.indexes,j=F.extractKey,W=F.outbound,J=F.autoIncrement&&q.filter(function(Y){return Y.compound&&Y.keyPath.includes(F.keyPath)}),te=r(r({},C),{mutate:function(Y){function ee(Qe){return Qe="idb://".concat(p,"/").concat(w,"/").concat(Qe),ye[Qe]||(ye[Qe]=new nr)}var re,Z,de,ge=Y.trans,ye=Y.mutatedParts||(Y.mutatedParts={}),Te=ee(""),ze=ee(":dels"),rt=Y.type,st=Y.type==="deleteRange"?[Y.range]:Y.type==="delete"?[Y.keys]:Y.values.length<50?[xu(F,Y).filter(function(Qe){return Qe}),Y.values]:[],Ke=st[0],Je=st[1],st=Y.trans._cache;return s(Ke)?(Te.addKeys(Ke),(st=rt==="delete"||Ke.length===Je.length?zh(Ke,st):null)||ze.addKeys(Ke),(st||Je)&&(re=ee,Z=st,de=Je,D.indexes.forEach(function(Qe){var pt=re(Qe.name||"");function Vt(Jt){return Jt!=null?Qe.extractKey(Jt):null}function Yt(Jt){return Qe.multiEntry&&s(Jt)?Jt.forEach(function(Sr){return pt.addKey(Sr)}):pt.addKey(Jt)}(Z||de).forEach(function(Jt,rr){var qt=Z&&Vt(Z[rr]),rr=de&&Vt(de[rr]);Rt(qt,rr)!==0&&(qt!=null&&Yt(qt),rr!=null&&Yt(rr));});}))):Ke?(Je={from:(Je=Ke.lower)!==null&&Je!==void 0?Je:d.MIN_KEY,to:(Je=Ke.upper)!==null&&Je!==void 0?Je:d.MAX_KEY},ze.add(Je),Te.add(Je)):(Te.add(_),ze.add(_),D.indexes.forEach(function(Qe){return ee(Qe.name).add(_)})),C.mutate(Y).then(function(Qe){return !Ke||Y.type!=="add"&&Y.type!=="put"||(Te.addKeys(Qe.results),J&&J.forEach(function(pt){for(var Vt=Y.values.map(function(qt){return pt.extractKey(qt)}),Yt=pt.keyPath.findIndex(function(qt){return qt===F.keyPath}),Jt=0,Sr=Qe.results.length;Jt<Sr;++Jt)Vt[Jt][Yt]=Qe.results[Jt];ee(pt.name).addKeys(Vt);})),ge.mutatedParts=_l(ge.mutatedParts||{},ye),Qe})}}),q=function(ee){var re=ee.query,ee=re.index,re=re.range;return [ee,new nr((ee=re.lower)!==null&&ee!==void 0?ee:d.MIN_KEY,(re=re.upper)!==null&&re!==void 0?re:d.MAX_KEY)]},ie={get:function(Y){return [F,new nr(Y.key)]},getMany:function(Y){return [F,new nr().addKeys(Y.keys)]},count:q,query:q,openCursor:q};return i(ie).forEach(function(Y){te[Y]=function(ee){var re=oe.subscr,Z=!!re,de=Kh(oe,C)&&Gh(Y,ee)?ee.obsSet={}:re;if(Z){var ge=function(Je){return Je="idb://".concat(p,"/").concat(w,"/").concat(Je),de[Je]||(de[Je]=new nr)},ye=ge(""),Te=ge(":dels"),re=ie[Y](ee),Z=re[0],re=re[1];if((Y==="query"&&Z.isPrimaryKey&&!ee.values?Te:ge(Z.name||"")).add(re),!Z.isPrimaryKey){if(Y!=="count"){var ze=Y==="query"&&W&&ee.values&&C.query(r(r({},ee),{values:false}));return C[Y].apply(this,arguments).then(function(Je){if(Y==="query"){if(W&&ee.values)return ze.then(function(Vt){return Vt=Vt.result,ye.addKeys(Vt),Je});var st=ee.values?Je.result.map(j):Je.result;(ee.values?ye:Te).addKeys(st);}else if(Y==="openCursor"){var Qe=Je,pt=ee.values;return Qe&&Object.create(Qe,{key:{get:function(){return Te.addKey(Qe.primaryKey),Qe.key}},primaryKey:{get:function(){var Vt=Qe.primaryKey;return Te.addKey(Vt),Vt}},value:{get:function(){return pt&&ye.addKey(Qe.primaryKey),Qe.value}}})}return Je})}Te.add(_);}}return C[Y].apply(this,arguments)};}),te}})}};function Wh(d,p,_){if(_.numFailures===0)return p;if(p.type==="deleteRange")return null;var w=p.keys?p.keys.length:"values"in p&&p.values?p.values.length:1;return _.numFailures===w?null:(p=r({},p),s(p.keys)&&(p.keys=p.keys.filter(function(C,D){return !(D in _.failures)})),"values"in p&&s(p.values)&&(p.values=p.values.filter(function(C,D){return !(D in _.failures)})),p)}function Su(d,p){return _=d,((w=p).lower===void 0||(w.lowerOpen?0<Rt(_,w.lower):0<=Rt(_,w.lower)))&&(d=d,(p=p).upper===void 0||(p.upperOpen?Rt(d,p.upper)<0:Rt(d,p.upper)<=0));var _,w;}function Yh(d,p,ie,w,C,D){if(!ie||ie.length===0)return d;var F=p.query.index,j=F.multiEntry,W=p.query.range,J=w.schema.primaryKey.extractKey,te=F.extractKey,q=(F.lowLevelIndex||F).extractKey,ie=ie.reduce(function(Y,ee){var re=Y,Z=[];if(ee.type==="add"||ee.type==="put")for(var de=new nr,ge=ee.values.length-1;0<=ge;--ge){var ye,Te=ee.values[ge],ze=J(Te);de.hasKey(ze)||(ye=te(Te),(j&&s(ye)?ye.some(function(Qe){return Su(Qe,W)}):Su(ye,W))&&(de.addKey(ze),Z.push(Te)));}switch(ee.type){case "add":var rt=new nr().addKeys(p.values?Y.map(function(pt){return J(pt)}):Y),re=Y.concat(p.values?Z.filter(function(pt){return pt=J(pt),!rt.hasKey(pt)&&(rt.addKey(pt),true)}):Z.map(function(pt){return J(pt)}).filter(function(pt){return !rt.hasKey(pt)&&(rt.addKey(pt),true)}));break;case "put":var Ke=new nr().addKeys(ee.values.map(function(pt){return J(pt)}));re=Y.filter(function(pt){return !Ke.hasKey(p.values?J(pt):pt)}).concat(p.values?Z:Z.map(function(pt){return J(pt)}));break;case "delete":var Je=new nr().addKeys(ee.keys);re=Y.filter(function(pt){return !Je.hasKey(p.values?J(pt):pt)});break;case "deleteRange":var st=ee.range;re=Y.filter(function(pt){return !Su(J(pt),st)});}return re},d);return ie===d?d:(ie.sort(function(Y,ee){return Rt(q(Y),q(ee))||Rt(J(Y),J(ee))}),p.limit&&p.limit<1/0&&(ie.length>p.limit?ie.length=p.limit:d.length===p.limit&&ie.length<p.limit&&(C.dirty=true)),D?Object.freeze(ie):ie)}function Jh(d,p){return Rt(d.lower,p.lower)===0&&Rt(d.upper,p.upper)===0&&!!d.lowerOpen==!!p.lowerOpen&&!!d.upperOpen==!!p.upperOpen}function ok(d,p){return (function(_,w,C,D){if(_===void 0)return w!==void 0?-1:0;if(w===void 0)return 1;if((w=Rt(_,w))===0){if(C&&D)return 0;if(C)return 1;if(D)return -1}return w})(d.lower,p.lower,d.lowerOpen,p.lowerOpen)<=0&&0<=(function(_,w,C,D){if(_===void 0)return w!==void 0?1:0;if(w===void 0)return -1;if((w=Rt(_,w))===0){if(C&&D)return 0;if(C)return -1;if(D)return 1}return w})(d.upper,p.upper,d.upperOpen,p.upperOpen)}function ak(d,p,_,w){d.subscribers.add(_),w.addEventListener("abort",function(){var C,D;d.subscribers.delete(_),d.subscribers.size===0&&(C=d,D=p,setTimeout(function(){C.subscribers.size===0&&me(D,C);},3e3));});}var ik={stack:"dbcore",level:0,name:"Cache",create:function(d){var p=d.schema.name;return r(r({},d),{transaction:function(_,w,C){var D,F,j=d.transaction(_,w,C);return w==="readwrite"&&(F=(D=new AbortController).signal,C=function(W){return function(){if(D.abort(),w==="readwrite"){for(var J=new Set,te=0,q=_;te<q.length;te++){var ie=q[te],Y=Ea["idb://".concat(p,"/").concat(ie)];if(Y){var ee=d.table(ie),re=Y.optimisticOps.filter(function(pt){return pt.trans===j});if(j._explicit&&W&&j.mutatedParts)for(var Z=0,de=Object.values(Y.queries.query);Z<de.length;Z++)for(var ge=0,ye=(rt=de[Z]).slice();ge<ye.length;ge++)_u((Ke=ye[ge]).obsSet,j.mutatedParts)&&(me(rt,Ke),Ke.subscribers.forEach(function(pt){return J.add(pt)}));else if(0<re.length){Y.optimisticOps=Y.optimisticOps.filter(function(pt){return pt.trans!==j});for(var Te=0,ze=Object.values(Y.queries.query);Te<ze.length;Te++)for(var rt,Ke,Je,st=0,Qe=(rt=ze[Te]).slice();st<Qe.length;st++)(Ke=Qe[st]).res!=null&&j.mutatedParts&&(W&&!Ke.dirty?(Je=Object.isFrozen(Ke.res),Je=Yh(Ke.res,Ke.req,re,ee,Ke,Je),Ke.dirty?(me(rt,Ke),Ke.subscribers.forEach(function(pt){return J.add(pt)})):Je!==Ke.res&&(Ke.res=Je,Ke.promise=ue.resolve({result:Je}))):(Ke.dirty&&me(rt,Ke),Ke.subscribers.forEach(function(pt){return J.add(pt)})));}}}J.forEach(function(pt){return pt()});}}},j.addEventListener("abort",C(false),{signal:F}),j.addEventListener("error",C(false),{signal:F}),j.addEventListener("complete",C(true),{signal:F})),j},table:function(_){var w=d.table(_),C=w.schema.primaryKey;return r(r({},w),{mutate:function(D){var F=oe.trans;if(C.outbound||F.db._options.cache==="disabled"||F.explicit||F.idbtrans.mode!=="readwrite")return w.mutate(D);var j=Ea["idb://".concat(p,"/").concat(_)];return j?(F=w.mutate(D),D.type!=="add"&&D.type!=="put"||!(50<=D.values.length||xu(C,D).some(function(W){return W==null}))?(j.optimisticOps.push(D),D.mutatedParts&&yl(D.mutatedParts),F.then(function(W){0<W.numFailures&&(me(j.optimisticOps,D),(W=Wh(0,D,W))&&j.optimisticOps.push(W),D.mutatedParts&&yl(D.mutatedParts));}),F.catch(function(){me(j.optimisticOps,D),D.mutatedParts&&yl(D.mutatedParts);})):F.then(function(W){var J=Wh(0,r(r({},D),{values:D.values.map(function(te,q){var ie;return W.failures[q]?te:(te=(ie=C.keyPath)!==null&&ie!==void 0&&ie.includes(".")?xe(te):r({},te),O(te,C.keyPath,W.results[q]),te)})}),W);j.optimisticOps.push(J),queueMicrotask(function(){return D.mutatedParts&&yl(D.mutatedParts)});}),F):w.mutate(D)},query:function(D){if(!Kh(oe,w)||!Gh("query",D))return w.query(D);var F=((J=oe.trans)===null||J===void 0?void 0:J.db._options.cache)==="immutable",q=oe,j=q.requery,W=q.signal,J=(function(ee,re,Z,de){var ge=Ea["idb://".concat(ee,"/").concat(re)];if(!ge)return [];if(!(re=ge.queries[Z]))return [null,false,ge,null];var ye=re[(de.query?de.query.index.name:null)||""];if(!ye)return [null,false,ge,null];switch(Z){case "query":var Te=ye.find(function(ze){return ze.req.limit===de.limit&&ze.req.values===de.values&&Jh(ze.req.query.range,de.query.range)});return Te?[Te,true,ge,ye]:[ye.find(function(ze){return ("limit"in ze.req?ze.req.limit:1/0)>=de.limit&&(!de.values||ze.req.values)&&ok(ze.req.query.range,de.query.range)}),false,ge,ye];case "count":return Te=ye.find(function(ze){return Jh(ze.req.query.range,de.query.range)}),[Te,!!Te,ge,ye]}})(p,_,"query",D),te=J[0],q=J[1],ie=J[2],Y=J[3];return te&&q?te.obsSet=D.obsSet:(q=w.query(D).then(function(ee){var re=ee.result;if(te&&(te.res=re),F){for(var Z=0,de=re.length;Z<de;++Z)Object.freeze(re[Z]);Object.freeze(re);}else ee.result=xe(re);return ee}).catch(function(ee){return Y&&te&&me(Y,te),Promise.reject(ee)}),te={obsSet:D.obsSet,promise:q,subscribers:new Set,type:"query",req:D,dirty:false},Y?Y.push(te):(Y=[te],(ie=ie||(Ea["idb://".concat(p,"/").concat(_)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[D.query.index.name||""]=Y)),ak(te,Y,j,W),te.promise.then(function(ee){return {result:Yh(ee.result,D,ie==null?void 0:ie.optimisticOps,w,te,F)}})}})}})}};function wl(d,p){return new Proxy(d,{get:function(_,w,C){return w==="db"?p:Reflect.get(_,w,C)}})}var ko=(Dn.prototype.version=function(d){if(isNaN(d)||d<.1)throw new H.Type("Given version is not a positive number");if(d=Math.round(10*d)/10,this.idbdb||this._state.isBeingOpened)throw new H.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,d);var p=this._versions,_=p.filter(function(w){return w._cfg.version===d})[0];return _||(_=new this.Version(d),p.push(_),p.sort(rs),_.stores({}),this._state.autoSchema=false,_)},Dn.prototype._whenReady=function(d){var p=this;return this.idbdb&&(this._state.openComplete||oe.letThrough||this._vip)?d():new ue(function(_,w){if(p._state.openComplete)return w(new H.DatabaseClosed(p._state.dbOpenError));if(!p._state.isBeingOpened){if(!p._state.autoOpen)return void w(new H.DatabaseClosed);p.open().catch(ve);}p._state.dbReadyPromise.then(_,w);}).then(d)},Dn.prototype.use=function(d){var p=d.stack,_=d.create,w=d.level,C=d.name;return C&&this.unuse({stack:p,name:C}),d=this._middlewares[p]||(this._middlewares[p]=[]),d.push({stack:p,create:_,level:w??10,name:C}),d.sort(function(D,F){return D.level-F.level}),this},Dn.prototype.unuse=function(d){var p=d.stack,_=d.name,w=d.create;return p&&this._middlewares[p]&&(this._middlewares[p]=this._middlewares[p].filter(function(C){return w?C.create!==w:!!_&&C.name!==_})),this},Dn.prototype.open=function(){var d=this;return Qt(ke,function(){return Qv(d)})},Dn.prototype._close=function(){var d=this._state,p=Mn.indexOf(this);if(0<=p&&Mn.splice(p,1),this.idbdb){try{this.idbdb.close();}catch{}this.idbdb=null;}d.isBeingOpened||(d.dbReadyPromise=new ue(function(_){d.dbReadyResolve=_;}),d.openCanceller=new ue(function(_,w){d.cancelOpen=w;}));},Dn.prototype.close=function(_){var p=(_===void 0?{disableAutoOpen:true}:_).disableAutoOpen,_=this._state;p?(_.isBeingOpened&&_.cancelOpen(new H.DatabaseClosed),this._close(),_.autoOpen=false,_.dbOpenError=new H.DatabaseClosed):(this._close(),_.autoOpen=this._options.autoOpen||_.isBeingOpened,_.openComplete=false,_.dbOpenError=null);},Dn.prototype.delete=function(d){var p=this;d===void 0&&(d={disableAutoOpen:true});var _=0<arguments.length&&typeof arguments[0]!="object",w=this._state;return new ue(function(C,D){function F(){p.close(d);var j=p._deps.indexedDB.deleteDatabase(p.name);j.onsuccess=qe(function(){var W,J,te;W=p._deps,J=p.name,te=W.indexedDB,W=W.IDBKeyRange,pu(te)||J===In||hu(te,W).delete(J).catch(ve),C();}),j.onerror=sn(D),j.onblocked=p._fireOnBlocked;}if(_)throw new H.InvalidArgument("Invalid closeOptions argument to db.delete()");w.isBeingOpened?w.dbReadyPromise.then(F):F();})},Dn.prototype.backendDB=function(){return this.idbdb},Dn.prototype.isOpen=function(){return this.idbdb!==null},Dn.prototype.hasBeenClosed=function(){var d=this._state.dbOpenError;return d&&d.name==="DatabaseClosed"},Dn.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Dn.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Dn.prototype,"tables",{get:function(){var d=this;return i(this._allTables).map(function(p){return d._allTables[p]})},enumerable:false,configurable:true}),Dn.prototype.transaction=function(){var d=(function(p,_,w){var C=arguments.length;if(C<2)throw new H.InvalidArgument("Too few arguments");for(var D=new Array(C-1);--C;)D[C-1]=arguments[C];return w=D.pop(),[p,v(D),w]}).apply(this,arguments);return this._transaction.apply(this,d)},Dn.prototype._transaction=function(d,p,_){var w=this,C=oe.trans;C&&C.db===this&&d.indexOf("!")===-1||(C=null);var D,F,j=d.indexOf("?")!==-1;d=d.replace("!","").replace("?","");try{if(F=p.map(function(J){if(J=J instanceof w.Table?J.name:J,typeof J!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return J}),d=="r"||d===to)D=to;else {if(d!="rw"&&d!=bo)throw new H.InvalidArgument("Invalid transaction mode: "+d);D=bo;}if(C){if(C.mode===to&&D===bo){if(!j)throw new H.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");C=null;}C&&F.forEach(function(J){if(C&&C.storeNames.indexOf(J)===-1){if(!j)throw new H.SubTransaction("Table "+J+" not included in parent transaction.");C=null;}}),j&&C&&!C.active&&(C=null);}}catch(J){return C?C._promise(null,function(te,q){q(J);}):Gt(J)}var W=(function J(te,q,ie,Y,ee){return ue.resolve().then(function(){var re=oe.transless||oe,Z=te._createTransaction(q,ie,te._dbSchema,Y);if(Z.explicit=true,re={trans:Z,transless:re},Y)Z.idbtrans=Y.idbtrans;else try{Z.create(),Z.idbtrans._explicit=!0,te._state.PR1398_maxLoop=3;}catch(ye){return ye.name===X.InvalidState&&te.isOpen()&&0<--te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),te.close({disableAutoOpen:false}),te.open().then(function(){return J(te,q,ie,null,ee)})):Gt(ye)}var de,ge=z(ee);return ge&&$t(),re=ue.follow(function(){var ye;(de=ee.call(Z,Z))&&(ge?(ye=Ct.bind(null,null),de.then(ye,ye)):typeof de.next=="function"&&typeof de.throw=="function"&&(de=vu(de)));},re),(de&&typeof de.then=="function"?ue.resolve(de).then(function(ye){return Z.active?ye:Gt(new H.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):re.then(function(){return de})).then(function(ye){return Y&&Z._resolve(),Z._completion.then(function(){return ye})}).catch(function(ye){return Z._reject(ye),Gt(ye)})})}).bind(null,this,D,F,C,_);return C?C._promise(D,W,"lock"):oe.trans?Qt(oe.transless,function(){return w._whenReady(W)}):this._whenReady(W)},Dn.prototype.table=function(d){if(!u(this._allTables,d))throw new H.InvalidTable("Table ".concat(d," does not exist"));return this._allTables[d]},Dn);function Dn(d,p){var _=this;this._middlewares={},this.verno=0;var w=Dn.dependencies;this._options=p=r({addons:Dn.addons,autoOpen:true,indexedDB:w.indexedDB,IDBKeyRange:w.IDBKeyRange,cache:"cloned"},p),this._deps={indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange},w=p.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var C,D,F,j,W,J={dbOpenError:null,isBeingOpened:false,onReadyBeingFired:null,openComplete:false,dbReadyResolve:ve,dbReadyPromise:null,cancelOpen:ve,openCanceller:null,autoSchema:true,PR1398_maxLoop:3,autoOpen:p.autoOpen};J.dbReadyPromise=new ue(function(q){J.dbReadyResolve=q;}),J.openCanceller=new ue(function(q,ie){J.cancelOpen=ie;}),this._state=J,this.name=d,this.on=wo(this,"populate","blocked","versionchange","close",{ready:[Tt,ve]}),this.on.ready.subscribe=T(this.on.ready.subscribe,function(q){return function(ie,Y){Dn.vip(function(){var ee,re=_._state;re.openComplete?(re.dbOpenError||ue.resolve().then(ie),Y&&q(ie)):re.onReadyBeingFired?(re.onReadyBeingFired.push(ie),Y&&q(ie)):(q(ie),ee=_,Y||q(function Z(){ee.on.ready.unsubscribe(ie),ee.on.ready.unsubscribe(Z);}));});}}),this.Collection=(C=this,qr($o.prototype,function(de,Z){this.db=C;var Y=No,ee=null;if(Z)try{Y=Z();}catch(ge){ee=ge;}var re=de._ctx,Z=re.table,de=Z.hook.reading.fire;this._ctx={table:Z,index:re.index,isPrimKey:!re.index||Z.schema.primKey.keyPath&&re.index===Z.schema.primKey.name,range:Y,keysOnly:false,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:true,isMatch:null,offset:0,limit:1/0,error:ee,or:re.or,valueMapper:de!==Ye?de:null};})),this.Table=(D=this,qr(cn.prototype,function(q,ie,Y){this.db=D,this._tx=Y,this.name=q,this.schema=ie,this.hook=D._allTables[q]?D._allTables[q].hook:wo(null,{creating:[xt,ve],reading:[Xe,Ye],updating:[Wt,ve],deleting:[Lt,ve]});})),this.Transaction=(F=this,qr(fu.prototype,function(q,ie,Y,ee,re){var Z=this;this.db=F,this.mode=q,this.storeNames=ie,this.schema=Y,this.chromeTransactionDurability=ee,this.idbtrans=null,this.on=wo(this,"complete","error","abort"),this.parent=re||null,this.active=true,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new ue(function(de,ge){Z._resolve=de,Z._reject=ge;}),this._completion.then(function(){Z.active=false,Z.on.complete.fire();},function(de){var ge=Z.active;return Z.active=false,Z.on.error.fire(de),Z.parent?Z.parent._reject(de):ge&&Z.idbtrans&&Z.idbtrans.abort(),Gt(de)});})),this.Version=(j=this,qr(Zv.prototype,function(q){this.db=j,this._cfg={version:q,storesSource:null,dbschema:{},tables:{},contentUpgrade:null};})),this.WhereClause=(W=this,qr(hl.prototype,function(q,ie,Y){if(this.db=W,this._ctx={table:q,index:ie===":id"?null:ie,or:Y},this._cmp=this._ascending=Rt,this._descending=function(ee,re){return Rt(re,ee)},this._max=function(ee,re){return 0<Rt(ee,re)?ee:re},this._min=function(ee,re){return Rt(ee,re)<0?ee:re},this._IDBKeyRange=W._deps.IDBKeyRange,!this._IDBKeyRange)throw new H.MissingAPI})),this.on("versionchange",function(q){0<q.newVersion?console.warn("Another connection wants to upgrade database '".concat(_.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(_.name,"'. Closing db now to resume the delete request.")),_.close({disableAutoOpen:false});}),this.on("blocked",function(q){!q.newVersion||q.newVersion<q.oldVersion?console.warn("Dexie.delete('".concat(_.name,"') was blocked")):console.warn("Upgrade '".concat(_.name,"' blocked by other connection holding version ").concat(q.oldVersion/10));}),this._maxKey=Ta(p.IDBKeyRange),this._createTransaction=function(q,ie,Y,ee){return new _.Transaction(q,ie,Y,_._options.chromeTransactionDurability,ee)},this._fireOnBlocked=function(q){_.on("blocked").fire(q),Mn.filter(function(ie){return ie.name===_.name&&ie!==_&&!ie._state.vcFired}).map(function(ie){return ie.on("versionchange").fire(q)});},this.use(nk),this.use(ik),this.use(rk),this.use(ek),this.use(tk);var te=new Proxy(this,{get:function(q,ie,Y){if(ie==="_vip")return true;if(ie==="table")return function(re){return wl(_.table(re),te)};var ee=Reflect.get(q,ie,Y);return ee instanceof cn?wl(ee,te):ie==="tables"?ee.map(function(re){return wl(re,te)}):ie==="_createTransaction"?function(){return wl(ee.apply(this,arguments),te)}:ee}});this.vip=te,w.forEach(function(q){return q(_)});}var vl,Dr=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",sk=(Cu.prototype.subscribe=function(d,p,_){return this._subscribe(d&&typeof d!="function"?d:{next:d,error:p,complete:_})},Cu.prototype[Dr]=function(){return this},Cu);function Cu(d){this._subscribe=d;}try{vl={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange};}catch{vl={indexedDB:null,IDBKeyRange:null};}function Xh(d){var p,_=false,w=new sk(function(C){var D=z(d),F,j=false,W={},J={},te={get closed(){return j},unsubscribe:function(){j||(j=true,F&&F.abort(),q&&Yn.storagemutated.unsubscribe(Y));}};C.start&&C.start(te);var q=false,ie=function(){return mn(ee)},Y=function(re){_l(W,re),_u(J,W)&&ie();},ee=function(){var re,Z,de;!j&&vl.indexedDB&&(W={},re={},F&&F.abort(),F=new AbortController,de=(function(ge){var ye=Dt();try{D&&$t();var Te=at(d,ge);return Te=D?Te.finally(Ct):Te}finally{ye&&Ee();}})(Z={subscr:re,signal:F.signal,requery:ie,querier:d,trans:null}),Promise.resolve(de).then(function(ge){_=true,p=ge,j||Z.signal.aborted||(W={},(function(ye){for(var Te in ye)if(u(ye,Te))return;return 1})(J=re)||q||(Yn(Sa,Y),q=true),mn(function(){return !j&&C.next&&C.next(ge)}));},function(ge){_=false,["DatabaseClosedError","AbortError"].includes(ge==null?void 0:ge.name)||j||mn(function(){j||C.error&&C.error(ge);});}));};return setTimeout(ie,0),te});return w.hasValue=function(){return _},w.getValue=function(){return p},w}var Aa=ko;function Tu(d){var p=zo;try{zo=!0,Yn.storagemutated.fire(d),wu(d,!0);}finally{zo=p;}}m(Aa,r(r({},_e),{delete:function(d){return new Aa(d,{addons:[]}).delete()},exists:function(d){return new Aa(d,{addons:[]}).open().then(function(p){return p.close(),true}).catch("NoSuchDatabaseError",function(){return false})},getDatabaseNames:function(d){try{return p=Aa.dependencies,_=p.indexedDB,p=p.IDBKeyRange,(pu(_)?Promise.resolve(_.databases()).then(function(w){return w.map(function(C){return C.name}).filter(function(C){return C!==In})}):hu(_,p).toCollection().primaryKeys()).then(d)}catch{return Gt(new H.MissingAPI)}var p,_;},defineClass:function(){return function(d){l(this,d);}},ignoreTransaction:function(d){return oe.trans?Qt(oe.transless,d):d()},vip:mu,async:function(d){return function(){try{var p=vu(d.apply(this,arguments));return p&&typeof p.then=="function"?p:ue.resolve(p)}catch(_){return Gt(_)}}},spawn:function(d,p,_){try{var w=vu(d.apply(_,p||[]));return w&&typeof w.then=="function"?w:ue.resolve(w)}catch(C){return Gt(C)}},currentTransaction:{get:function(){return oe.trans||null}},waitFor:function(d,p){return p=ue.resolve(typeof d=="function"?Aa.ignoreTransaction(d):d).timeout(p||6e4),oe.trans?oe.trans.waitFor(p):p},Promise:ue,debug:{get:function(){return Mt},set:function(d){Pt(d);}},derive:b,extend:l,props:m,override:T,Events:wo,on:Yn,liveQuery:Xh,extendObservabilitySet:_l,getByKeyPath:I,setByKeyPath:O,delByKeyPath:function(d,p){typeof p=="string"?O(d,p,void 0):"length"in p&&[].map.call(p,function(_){O(d,_,void 0);});},shallowClone:U,deepClone:xe,getObjectDiff:ku,cmp:Rt,asap:N,minKey:-1/0,addons:[],connections:Mn,errnames:X,dependencies:vl,cache:Ea,semVer:"4.0.11",version:"4.0.11".split(".").map(function(d){return parseInt(d)}).reduce(function(d,p,_){return d+p/Math.pow(10,2*_)})})),Aa.maxKey=Ta(Aa.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Yn(Sa,function(d){zo||(d=new CustomEvent(Ca,{detail:d}),zo=true,dispatchEvent(d),zo=false);}),addEventListener(Ca,function(d){d=d.detail,zo||Tu(d);}));var ii,zo=false,Zh=function(){};return typeof BroadcastChannel<"u"&&((Zh=function(){(ii=new BroadcastChannel(Ca)).onmessage=function(d){return d.data&&Tu(d.data)};})(),typeof ii.unref=="function"&&ii.unref(),Yn(Sa,function(d){zo||ii.postMessage(d);})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(d){if(!ko.disableBfCache&&d.persisted){Mt&&console.debug("Dexie: handling persisted pagehide"),ii!=null&&ii.close();for(var p=0,_=Mn;p<_.length;p++)_[p].close({disableAutoOpen:false});}}),addEventListener("pageshow",function(d){!ko.disableBfCache&&d.persisted&&(Mt&&console.debug("Dexie: handling persisted pageshow"),Zh(),Tu({all:new nr(-1/0,[[]])}));})),ue.rejectionMapper=function(d,p){return !d||d instanceof Le||d instanceof TypeError||d instanceof SyntaxError||!d.name||!se[d.name]?d:(p=new se[d.name](p||d.message,d),"stack"in d&&y(p,"stack",{get:function(){return this.inner.stack}}),p)},Pt(Mt),r(ko,Object.freeze({__proto__:null,Dexie:ko,liveQuery:Xh,Entity:dl,cmp:Rt,PropModification:gr,replacePrefix:function(d,p){return new gr({replacePrefix:[d,p]})},add:function(d){return new gr({add:d})},remove:function(d){return new gr({remove:d})},default:ko,RangeSet:nr,mergeRanges:as,rangesOverlap:jh}),{default:ko}),ko});})(nc)),nc.exports}var gT=mT();const df=py(gT),ym=Symbol.for("Dexie"),wn=globalThis[ym]||(globalThis[ym]=df);if(df.semVer!==wn.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${df.semVer} and ${wn.semVer}`);const{liveQuery:_T,mergeRanges:sN,rangesOverlap:lN,RangeSet:cN,cmp:uN,Entity:dN,PropModification:fN,replacePrefix:hN,add:pN,remove:mN}=wn,yT="twitter-web-exporter-scrollmark-outbox-v1",bT=1,wT=5e4,vT=512*1024*1024,kT=1440*60*1e3,ed=.8;function bm(e){return {pending_batches:0,pending_mutations:0,pending_bytes:0,quarantined_batches:0,quarantined_mutations:0,quarantined_bytes:0,oldest_age_ms:null,warning:false,stopped:true,stop_reason:e}}class Ba extends Error{constructor(n,r,o){super(r);be(this,"code","outbox_bound_exceeded");be(this,"dimension");be(this,"usage");this.name="OutboxBoundError",this.dimension=n,this.usage=o;}}class xT{constructor(t={}){be(this,"db");be(this,"outbox");be(this,"quarantine");be(this,"metadata");be(this,"limits");be(this,"now");be(this,"ready");var n,r,o;this.db=new wn(t.dbName??yT),this.limits={max_mutations:((n=t.limits)==null?void 0:n.max_mutations)??wT,max_bytes:((r=t.limits)==null?void 0:r.max_bytes)??vT,max_age_ms:((o=t.limits)==null?void 0:o.max_age_ms)??kT},this.now=t.now??(()=>Date.now()),this.db.version(bT).stores({outbox:"batch_id, namespace_id, archive_id, client_id, client_epoch, client_sequence_from, created_at_ms, next_retry_at_ms, status",quarantine:"quarantine_id, namespace_id, archive_id, batch_id, observed_at_ms, disposition",metadata:"key, updated_at_ms"}),this.outbox=this.db.table("outbox"),this.quarantine=this.db.table("quarantine"),this.metadata=this.db.table("metadata"),this.ready=this.db.open().then(()=>{});}async whenReady(){await this.ready;}async usage(){await this.whenReady();const t=await this.outbox.where("status").anyOf("pending","quarantined").toArray(),n=t.filter(b=>b.status==="pending"),r=t.filter(b=>b.status==="quarantined"),o=t.reduce((b,k)=>b===null||k.created_at_ms<b?k.created_at_ms:b,null),a=this.now(),i=n.reduce((b,k)=>b+k.mutation_count,0),s=n.reduce((b,k)=>b+k.canonical_bytes,0),l=r.reduce((b,k)=>b+k.mutation_count,0),c=r.reduce((b,k)=>b+k.canonical_bytes,0),h=i+l,u=s+c,m=o===null?null:Math.max(0,a-o),g=await this.getMetadata("stopped")??false,y=await this.getMetadata("stop_reason")??null;return {pending_batches:n.length,pending_mutations:i,pending_bytes:s,quarantined_batches:r.length,quarantined_mutations:l,quarantined_bytes:c,oldest_age_ms:m,warning:h>=this.limits.max_mutations*ed||u>=this.limits.max_bytes*ed||m!==null&&m>=this.limits.max_age_ms*ed,stopped:g,stop_reason:y}}async admit(t,n){let r;try{await this.whenReady(),r=await this.usage();}catch(h){throw new Ba("persistence",`outbox persistence is unavailable: ${h instanceof Error?h.message:String(h)}`,bm("persistence"))}const o=this.now();if(r.stopped)throw new Ba("persistence","the outbox is stopped pending recovery",r);const a=r.oldest_age_ms;if(a!==null&&a>=this.limits.max_age_ms)throw await this.stop("age_bound"),new Ba("age","the oldest pending or quarantined item reached the age bound",r);const i=r.pending_mutations+r.quarantined_mutations,s=r.pending_bytes+r.quarantined_bytes,l=t.batch.mutation_count;if(i+l>this.limits.max_mutations)throw await this.stop("mutation_bound"),new Ba("mutations","the outbox mutation bound would be exceeded",r);if(s+n>this.limits.max_bytes)throw await this.stop("byte_bound"),new Ba("bytes","the outbox byte bound would be exceeded",r);const c={batch_id:t.batch.batch_id,namespace_id:t.namespace_id,archive_id:t.archive_id,client_id:t.client_id,client_epoch:t.client_epoch,client_sequence_from:t.client_sequence.from,client_sequence_to:t.client_sequence.to,mutation_count:l,canonical_bytes:n,request:t,created_at_ms:o,last_attempt_at_ms:null,attempt_count:0,next_retry_at_ms:o,status:"pending",last_error_code:null,quarantine_id:null};try{await this.db.transaction("rw",this.outbox,this.metadata,async()=>{await this.outbox.get(c.batch_id)||await this.outbox.add(c);});}catch(h){let u;try{u=await this.usage();}catch{u=bm("persistence");}try{await this.stop("persistence");}catch{}throw new Ba("persistence",`outbox persistence failed: ${h instanceof Error?h.message:String(h)}`,u)}return c}async listPending(t=this.now()){return await this.whenReady(),this.outbox.where("status").equals("pending").filter(n=>n.next_retry_at_ms<=t).sortBy("client_sequence_from")}async listAllPending(){return await this.whenReady(),this.outbox.where("status").equals("pending").sortBy("client_sequence_from")}async markAttempt(t,n={nextRetryAtMs:this.now(),errorCode:null}){await this.whenReady();const r=await this.outbox.get(t);!r||r.status!=="pending"||await this.outbox.update(t,{last_attempt_at_ms:n.attemptedAtMs??this.now(),attempt_count:r.attempt_count+1,next_retry_at_ms:n.nextRetryAtMs,last_error_code:n.errorCode});}async acknowledge(t,n={}){await this.whenReady(),await this.db.transaction("rw",this.outbox,this.metadata,async()=>{for(const[r,o]of Object.entries(n))await this.metadata.put({key:r,value:o,updated_at_ms:this.now()});await this.outbox.delete(t);});}async quarantinePending(t,n){await this.whenReady();const r=await this.outbox.get(t);if(!r)return null;const o={quarantine_id:n.quarantineId,namespace_id:r.namespace_id,archive_id:r.archive_id,client_id:r.client_id,client_epoch:r.client_epoch,batch_id:r.batch_id,mutation_ids:r.request.batch.mutations.map(a=>a.mutation_id),canonical_hashes:r.request.batch.mutations.map(a=>a.record_hash),operation:n.operation,reason_code:n.reasonCode,observed_at_ms:n.observedAtMs??this.now(),evidence:n.evidence??{},disposition:"noncanonical"};return await this.db.transaction("rw",this.outbox,this.quarantine,async()=>{await this.quarantine.put(o),await this.outbox.update(t,{status:"quarantined",quarantine_id:o.quarantine_id,last_error_code:n.reasonCode,next_retry_at_ms:Number.MAX_SAFE_INTEGER});}),o}async listQuarantine(){return await this.whenReady(),this.quarantine.orderBy("observed_at_ms").toArray()}async getMetadata(t){await this.whenReady();const n=await this.metadata.get(t);return n?n.value:null}async setMetadata(t,n){await this.whenReady(),await this.metadata.put({key:t,value:n,updated_at_ms:this.now()});}async stop(t){await this.setMetadata("stopped",true),await this.setMetadata("stop_reason",t);}async clearStop(){await this.setMetadata("stopped",false),await this.setMetadata("stop_reason",null);}async close(){await this.whenReady(),this.db.close();}async deleteDatabase(){this.db.close(),await wn.delete(this.db.name);}}const Ib=new Set(["extAddTweets","extAddUsers","extAddCustomCaptures","extAddSocialEdges","extAddTweetCaptureIds","extRemoveTweetCaptureIds","extAddUserCaptureIds","extRemoveUserCaptureIds","upsertTweets","upsertUsers","upsertCaptures","upsertSocialEdges"]);class ur extends Error{constructor(n,r,o,a=false){super(r);be(this,"code");be(this,"retryable");be(this,"status");this.name="DurabilityError",this.code=n,this.retryable=a,this.status=o;}}function wm(e){return Array.isArray(e)?e.map(t=>typeof t=="string"||typeof t=="number"?String(t).trim():"").filter(Boolean):[]}function Rb(e){return !e||typeof e!="object"||Array.isArray(e)?{}:e}function Yo(e,t){const n=Rb(e);for(const r of t){const o=n[r];if(typeof o=="string"||typeof o=="number"){const a=String(o).trim();if(a)return a}}return null}function Oa(e){return Array.isArray(e)?e.map(Rb):[]}function Es(e,t=new Set){if(!e||typeof e!="object")return false;const n=e;if(t.has(n))return false;if(t.add(n),Array.isArray(e))return e.some(o=>Es(o,t));const r=new Set(["dm","direct_message","direct_messages","conversation_id","recipient_ids","private_message","private_messages"]);return Object.entries(e).some(([o,a])=>{const i=o.trim().toLowerCase().replace(/-/g,"_");return r.has(i)||Es(a,t)})}function td(e){return e instanceof _n&&(e.retryable||e.code==="malformed_response"||e.code==="companion_unavailable"||e.code==="internal_commit_unknown")}function ao(e){return e instanceof _n||e instanceof Ba?e.code:e instanceof Error?e.name:"unknown"}function Jn(e){return e instanceof Error?e.message:String(e)}class ST{constructor(t={}){be(this,"status");be(this,"identity");be(this,"outbox");be(this,"pairing");be(this,"client");be(this,"now");be(this,"randomId");be(this,"retryBaseMs");be(this,"checkpoint",null);be(this,"capabilityRevision",null);be(this,"nextClientSequence",1);be(this,"initializePromise",null);be(this,"replayPromise",null);be(this,"operationPromise",Promise.resolve());var n,r;this.pairing=t.pairing??null,this.identity=t.identity??new Mb(this.pairing,t.now),t.identityEvidence&&this.identity.setEvidence(t.identityEvidence),this.outbox=t.outbox??new xT,this.client=t.client??null,this.now=t.now??(()=>Date.now()),this.randomId=t.randomId??((o="id")=>`${o}-${this.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),this.retryBaseMs=Math.max(100,t.retryBaseMs??1e3),this.status=Oo({state:this.pairing&&this.client?"initializing":"disabled",reason:this.pairing&&this.client?"companion-not-initialized":"pairing-not-configured",archive_id:((n=this.pairing)==null?void 0:n.archive_id)??null,namespace_id:((r=this.pairing)==null?void 0:r.namespace_id)??null,checkpoint:null,capability_revision:null,identity:this.identity.state.value,outbox:null,last_error:null,changed_at_ms:this.now()});}isDurableOperation(t){return Ib.has(t)}getStatus(){return this.status.value}async initialize(){if(!this.pairing||!this.client){this.setStatus("disabled","pairing-not-configured");return}if(this.initializePromise)return this.initializePromise;this.initializePromise=this.initializeInternal();try{await this.initializePromise;}finally{this.initializePromise=null;}}async route(t,n,r){return this.withOperationLease(()=>this.routeExclusive(t,n,r))}async routeExclusive(t,n,r){var h;if(!this.isDurableOperation(t)||!this.pairing||!this.client)return r();await this.initialize();const o=this.identity.observe();if(this.updateIdentity(),!o.admitted)throw this.setStatus("identity_required",o.reason,{last_error:{code:"identity_required",message:o.reason}}),new ur("identity_required",o.reason,this.status.value);if(this.status.value.state==="stopped"||this.status.value.state==="error")throw new ur("durability_stream_stopped","durability stream is stopped pending operator recovery",this.status.value);if(await this.replayPendingExclusive(),this.streamStopped())throw new ur("durability_stream_stopped","durability stream is stopped pending operator recovery",this.status.value);const a=await this.buildMutations(t,n);if(!a.length)return r();const i=await this.createRequest(a),s=new TextEncoder().encode(Sn(i)).byteLength;let l;try{l=await this.outbox.admit(i,s),await this.outbox.setMetadata("next_client_sequence",this.nextClientSequence);}catch(u){throw this.setStatus("stopped",Jn(u),{last_error:{code:ao(u),message:Jn(u)}}),u}if(((h=(await this.outbox.listAllPending())[0])==null?void 0:h.batch_id)!==l.batch_id)return await this.refreshUsage(),this.setStatus("degraded","older-outbox-row-awaiting-fifo-replay"),this.localProjection(r);try{const u=await this.commitExact(l);return await this.acknowledgeReceipt(l,u),await this.refreshUsage(),this.setStatus("ready","companion-commit-acknowledged"),this.localProjection(r)}catch(u){if(u instanceof ur&&u.code==="outbox_persistence_failed")throw u;if(td(u))return await this.noteRetry(l,u),await this.refreshUsage(),this.setStatus("degraded",Jn(u),{last_error:{code:ao(u),message:Jn(u)}}),this.localProjection(r);throw await this.quarantine(l,u,t),this.setStatus("error",Jn(u),{last_error:{code:ao(u),message:Jn(u)}}),u}}async submitTombstone(t,n,r,o={}){return this.withOperationLease(()=>this.submitTombstoneExclusive(t,n,r,o))}async submitTombstoneExclusive(t,n,r,o={}){var m;if(!this.pairing||!this.client)return r();await this.initialize();const a=this.identity.observe();if(this.updateIdentity(),!a.admitted)throw new ur("identity_required",a.reason,this.status.value);if(await this.replayPendingExclusive(),this.status.value.state==="error"||this.status.value.state==="stopped")throw new ur("durability_stream_stopped","durability stream is stopped pending operator recovery",this.status.value);const i={mutation_id:this.randomId("mutation"),client_seq:this.nextClientSequence,kind:"tombstone",schema_revision:Hn,target_kind:t,target_id:n,...o.relationshipKind?{relationship_kind:o.relationshipKind}:{},deletion_id:this.randomId("deletion"),provenance:this.provenance(o.operation??"tombstone",n),observed_at_ms:this.now()},s={...i,record_hash:await Fr(this.pairing.namespace_id,i)},l=await this.createRequest([s]),c=new TextEncoder().encode(Sn(l)).byteLength;let h;try{h=await this.outbox.admit(l,c),await this.outbox.setMetadata("next_client_sequence",this.nextClientSequence);}catch(g){throw this.setStatus("stopped",Jn(g),{last_error:{code:ao(g),message:Jn(g)}}),g}if(((m=(await this.outbox.listAllPending())[0])==null?void 0:m.batch_id)!==h.batch_id)return await this.refreshUsage(),this.setStatus("degraded","older-outbox-row-awaiting-fifo-replay"),this.localProjection(r);try{const g=await this.commitExact(h);return await this.acknowledgeReceipt(h,g),await this.refreshUsage(),this.localProjection(r)}catch(g){if(g instanceof ur&&g.code==="outbox_persistence_failed")throw g;if(td(g))return await this.noteRetry(h,g),await this.refreshUsage(),this.setStatus("degraded",Jn(g),{last_error:{code:ao(g),message:Jn(g)}}),this.localProjection(r);throw await this.quarantine(h,g,o.operation??"tombstone"),this.setStatus("error",Jn(g),{last_error:{code:ao(g),message:Jn(g)}}),g}}async replayPending(){return this.withOperationLease(()=>this.replayPendingExclusive())}async replayPendingExclusive(){if(!(!this.pairing||!this.client)){if(this.replayPromise)return this.replayPromise;this.replayPromise=this.replayInternal();try{await this.replayPromise;}finally{this.replayPromise=null;}}}async stop(t){await this.outbox.stop(t),this.setStatus("stopped",t);}async withOperationLease(t){const n=this.operationPromise;let r;const o=new Promise(a=>{r=a;});this.operationPromise=o,await n;try{return await t()}finally{r();}}streamStopped(){const t=this.status.value.state;return t==="error"||t==="stopped"}async initializeInternal(){this.setStatus("initializing","companion-capabilities");const t=this.identity.observe();if(this.updateIdentity(),!t.admitted){this.setStatus("identity_required",t.reason,{last_error:{code:"identity_required",message:t.reason}});return}const n=await this.outbox.usage();if(n.stopped||n.quarantined_batches>0){n.stopped||await this.outbox.stop("quarantine_pending"),await this.refreshUsage(),this.setStatus("stopped",n.stop_reason??"outbox-recovery-required");return}const r=await this.client.capabilities();this.capabilityRevision=r.capability_revision;const o=await this.client.health();if(this.assertHealthBinding(o),this.checkpoint=await this.client.checkpoint(this.pairing.namespace_id),this.checkpoint.namespace_id!==this.pairing.namespace_id)throw new ur("namespace_not_active","checkpoint namespace does not match pairing",this.status.value);const a=await this.outbox.getMetadata("next_client_sequence"),s=(await this.outbox.listAllPending()).reduce((c,h)=>Math.max(c,h.client_sequence_to+1),1);this.nextClientSequence=Math.max(a??1,s),await this.refreshUsage();const l=this.status.value.outbox;if(l!=null&&l.stopped||l!=null&&l.quarantined_batches){this.setStatus("stopped",l.stop_reason??"outbox-recovery-required");return}this.setStatus("ready","companion-ready");}assertHealthBinding(t){const n=t.archive;if(n&&typeof n=="object"){const o=n;if(o.archive_id!==void 0&&o.archive_id!==this.pairing.archive_id)throw new ur("archive_binding_mismatch","health archive does not match pairing",this.status.value)}const r=t.active_namespace_ids;if(Array.isArray(r)&&r.length&&!r.includes(this.pairing.namespace_id))throw new ur("namespace_not_active","paired namespace is not active",this.status.value)}async createRequest(t){var i,s;const n=((i=t[0])==null?void 0:i.client_seq)??this.nextClientSequence,r=((s=t[t.length-1])==null?void 0:s.client_seq)??n,o={batch_id:this.randomId("batch"),mutation_count:t.length,mutations:t,batch_hash:await Wy(this.pairing.namespace_id,{mutations:t})},a={protocol:Qn,request_id:this.randomId("request"),archive_id:this.pairing.archive_id,namespace_id:this.pairing.namespace_id,client_id:this.pairing.client_id,client_epoch:this.pairing.client_epoch,sent_at_ms:this.now(),client_sequence:{from:n,to:r},batch:o,known_checkpoint:this.checkpoint};return this.nextClientSequence=r+1,a}async commitExact(t){const n=await this.client.commit(t.request);if(n.batch_id!==t.batch_id)throw new _n("validation_failed","receipt batch differs from outbox batch");return n}async replayInternal(){const t=this.identity.observe();if(this.updateIdentity(),!t.admitted){this.setStatus("identity_required",t.reason,{last_error:{code:"identity_required",message:t.reason}});return}const n=await this.outbox.listAllPending();for(const r of n)try{const o=await this.commitExact(r);await this.acknowledgeReceipt(r,o);}catch(o){if(o instanceof ur&&o.code==="outbox_persistence_failed")break;if(td(o)){await this.noteRetry(r,o);break}await this.quarantine(r,o,"replay"),this.setStatus("error",Jn(o),{last_error:{code:ao(o),message:Jn(o)}});break}if(await this.refreshUsage(),this.status.value.state!=="stopped"&&this.status.value.state!=="error"){const r=this.status.value.outbox;this.setStatus(r!=null&&r.pending_batches?"degraded":"ready","pending-replay-processed");}}async noteRetry(t,n){const r=t.attempt_count+1,a=(n instanceof _n?n.retryAfterMs:null)??Math.min(6e4,this.retryBaseMs*2**Math.min(r,8));await this.outbox.markAttempt(t.batch_id,{nextRetryAtMs:this.now()+a,errorCode:ao(n)});}async quarantine(t,n,r){await this.outbox.quarantinePending(t.batch_id,{quarantineId:this.randomId("quarantine"),operation:r,reasonCode:ao(n),evidence:{message:Jn(n),...n instanceof _n?{status:n.status,request_id:n.requestId}:{}}}),await this.outbox.stop(`quarantine:${ao(n)}`),await this.refreshUsage();}async localProjection(t){try{return await t()}catch(n){throw this.setStatus("degraded","local-projection-failed-recovery-required",{last_error:{code:"local_projection_failed",message:Jn(n)}}),n}}async acknowledgeReceipt(t,n){try{await this.outbox.acknowledge(t.batch_id,{next_client_sequence:n.client_sequence.to+1,checkpoint:n.checkpoint});}catch(r){try{await this.outbox.stop("acknowledgement_persistence");}catch{}throw this.setStatus("stopped","acknowledgement-persistence-failed",{last_error:{code:"outbox_persistence_failed",message:Jn(r)}}),new ur("outbox_persistence_failed","the committed receipt could not be persisted locally",this.status.value)}this.applyReceipt(n);}applyReceipt(t){this.checkpoint=t.checkpoint,this.nextClientSequence=Math.max(this.nextClientSequence,t.client_sequence.to+1);}updateIdentity(){this.status.value={...this.status.value,identity:this.identity.state.value,changed_at_ms:this.now()};}async refreshUsage(){const t=await this.outbox.usage();this.status.value={...this.status.value,outbox:t,changed_at_ms:this.now()};}setStatus(t,n,r={}){var o,a;this.status.value={...this.status.value,...r,state:t,reason:n,checkpoint:this.checkpoint,capability_revision:this.capabilityRevision,identity:this.identity.state.value,archive_id:((o=this.pairing)==null?void 0:o.archive_id)??null,namespace_id:((a=this.pairing)==null?void 0:a.namespace_id)??null,changed_at_ms:this.now()};}provenance(t,n){return {source:"x.com",source_event_id:n?`${t}:${n}`:t,extract_path:`browser.${t}`,extractor_rev:"scrollmark-browser-v1"}}async buildMutations(t,n){const r=typeof n[0]=="string"?n[0]:"unscoped";if(t==="extAddTweets"||t==="extAddUsers"){const o=t==="extAddTweets"?"tweet":"user",a=o==="tweet"?["rest_id","id_str","id"]:["rest_id","id_str","id","user_id"],i=Oa(n[1]),s=await this.entityMutations(o,t,i,a),l=await this.captureMutations(r,t,i.map(c=>({data_key:Yo(c,a),type:o})),s.length);return [...s,...l]}if(t==="upsertTweets")return this.entityMutations("tweet",t,Oa(n[0]),["rest_id","id_str","id"]);if(t==="upsertUsers")return this.entityMutations("user",t,Oa(n[0]),["rest_id","id_str","id","user_id"]);if(t==="extAddSocialEdges")return this.relationshipMutations(r,t,Oa(n[1]));if(t==="upsertSocialEdges"){const o=Oa(n[0]),a=Yo(o[0],["extension"])??"unscoped";return this.relationshipMutations(a,t,o)}if(t==="extAddCustomCaptures")return this.captureMutations(r,t,Oa(n[1]));if(t==="upsertCaptures")return this.captureMutations("unscoped",t,Oa(n[0]));if(t==="extAddTweetCaptureIds"||t==="extAddUserCaptureIds"){const o=t.includes("Tweet")?"tweet":"user";return this.membershipMutations(o,r,t,wm(n[1]))}if(t==="extRemoveTweetCaptureIds"||t==="extRemoveUserCaptureIds"){const o=t.includes("Tweet")?"tweet":"user";return this.membershipTombstones(o,r,t,wm(n[1]))}return []}async entityMutations(t,n,r,o,a=0){const i=[];for(const[s,l]of r.entries()){if(Es(l))throw new ur("private_lane_disabled","private or direct-message payloads are disabled",this.status.value);const c=Yo(l,o);if(!c)continue;const h={mutation_id:this.randomId("mutation"),client_seq:this.nextClientSequence+a+i.length,kind:"entity_upsert",schema_revision:Hn,target:this.endpoint(t,c),payload:l,provenance:this.provenance(n,`${c}:${s}`),observed_at_ms:this.now()};i.push({...h,record_hash:await Fr(this.pairing.namespace_id,h)});}return i}async relationshipMutations(t,n,r){const o=[];for(const[a,i]of r.entries()){if(Es(i))throw new ur("private_lane_disabled","private or direct-message payloads are disabled",this.status.value);const s=Yo(i,["subject_user_id","source_user_id","user_id","subject_id"]),l=Yo(i,["related_user_id","target_user_id","object_user_id","object_id"]);if(!s||!l)continue;const c={mutation_id:this.randomId("mutation"),client_seq:this.nextClientSequence+o.length,kind:"relationship_upsert",schema_revision:Hn,relationship_kind:"social_edge",subject:this.endpoint("user",s),object:this.endpoint("user",l),qualifier:{extension:t},payload:i,provenance:this.provenance(`${n}:${t}`,`${s}:${l}:${a}`),observed_at_ms:this.now()};o.push({...c,record_hash:await Fr(this.pairing.namespace_id,c)});}return o}async captureMutations(t,n,r,o=0){const a=[];for(const[i,s]of r.entries()){if(Es(s))throw new ur("private_lane_disabled","private or direct-message payloads are disabled",this.status.value);const l=Yo(s,["extension"])??t,c=Yo(s,["data_key","dataKey","tweet_id","rest_id","user_id","id_str","id"]);if(!c)continue;const h=Yo(s,["type","entity_type"]),u=h==="user"?"user":h==="tweet"?"tweet":"media_reference",m={mutation_id:this.randomId("mutation"),client_seq:this.nextClientSequence+o+a.length,kind:"relationship_upsert",schema_revision:Hn,relationship_kind:"capture_membership",subject:this.endpoint(u,c),object:this.endpoint("folder",`capture:${l}`),qualifier:{extension:l},payload:s,provenance:this.provenance(`${n}:${l}`,`${c}:${i}`),observed_at_ms:this.now()};a.push({...m,record_hash:await Fr(this.pairing.namespace_id,m)});}return a}async membershipMutations(t,n,r,o){const a=[];for(const[i,s]of o.entries()){const l={mutation_id:this.randomId("mutation"),client_seq:this.nextClientSequence+a.length,kind:"relationship_upsert",schema_revision:Hn,relationship_kind:"capture_membership",subject:this.endpoint(t,s),object:this.endpoint("folder",`capture:${n}`),qualifier:{extension:n},payload:{extension:n,data_key:s},provenance:this.provenance(r,`${t}:${n}:${s}:${i}`),observed_at_ms:this.now()};a.push({...l,record_hash:await Fr(this.pairing.namespace_id,l)});}return a}async membershipTombstones(t,n,r,o){const a=[];for(const[i,s]of o.entries()){const l={mutation_id:this.randomId("mutation"),client_seq:this.nextClientSequence+i,kind:"tombstone",schema_revision:Hn,target_kind:"relationship",target_id:`capture-membership:${t}:${n}:${s}`,relationship_kind:"capture_membership",deletion_id:this.randomId("deletion"),provenance:this.provenance(r,`${t}:${n}:${s}:${i}`),observed_at_ms:this.now()};a.push({...l,record_hash:await Fr(this.pairing.namespace_id,l)});}return a}endpoint(t,n){return {namespace_id:this.pairing.namespace_id,kind:t,id:n}}}const Eb="__twe_generation_pointer_v1",uh="__twe_generation_journal_v1",nd="__twe_active_db_name_v1",CT="__twe_allow_continuity_local_fallback_v1",dh=1,Ha=globalThis;function al(){const e=Ha.GM_getValue,t=Ha.GM_setValue,n=Ha.GM_deleteValue;if(typeof e=="function"&&typeof t=="function")return {read:o=>e(o),write:(o,a)=>t(o,a),remove:o=>{typeof n=="function"?n(o):t(o,void 0);}};if(Ha[CT]!==true)return null;const r=Ha.localStorage;return !(r!=null&&r.getItem)||!r.setItem?null:{read:o=>{var i;const a=(i=r.getItem)==null?void 0:i.call(r,o);if(a)try{return JSON.parse(a)}catch{return}},write:(o,a)=>{var i;return (i=r.setItem)==null?void 0:i.call(r,o,JSON.stringify(a))},remove:o=>{var a;return (a=r.removeItem)==null?void 0:a.call(r,o)}}}function fh(e){var t;try{const n=(t=al())==null?void 0:t.read(e);return n&&typeof n=="object"?n:null}catch{return null}}function TT(e){if(!e||typeof e!="object")return false;const t=e;return typeof t.namespace_id=="string"&&Number.isInteger(t.archive_seq)&&Number(t.archive_seq)>=0&&typeof t.chain_hash=="string"&&/^[0-9a-f]{64}$/.test(t.chain_hash)&&t.schema_revision===1}function MT(e){if(!e||typeof e!="object")return false;const t=e;return ["captures","tweets","users","social_edges","search_documents","total"].every(n=>Number.isInteger(t[n])&&Number(t[n])>=0)}function Gi(){const e=fh(Eb);return !e||e.schema_version!==dh||e.state!=="active"||e.verification!=="verified"||!e.protocol_version||e.protocol_version.major!==1||e.protocol_version.minor!==0||e.archive_schema_revision!==1||e.browser_generation_revision!==1||typeof e.generation_id!="string"||typeof e.database_name!="string"||!e.database_name.trim()||typeof e.archive_id!="string"||!e.archive_id.trim()||typeof e.namespace_id!="string"||!e.namespace_id.trim()||!TT(e.target_checkpoint)||e.target_checkpoint.namespace_id!==e.namespace_id||typeof e.manifest_hash!="string"||!/^[0-9a-f]{64}$/.test(e.manifest_hash)||typeof e.projection_hash!="string"||!/^[0-9a-f]{64}$/.test(e.projection_hash)||!Number.isInteger(e.item_count)||Number(e.item_count)<0||!Number.isInteger(e.page_count)||Number(e.page_count)<1||!MT(e.counts)||!Number.isFinite(e.verified_at_ms)||!Number.isFinite(e.activated_at_ms)?null:e}function Wi(e,t){const n=Gi();return n&&n.archive_id===e&&n.namespace_id===t?n:null}function IT(e){const t=al();if(!t)throw new Error("durability storage is unavailable");t.write(Eb,e);}function RT(){const e=fh(uh);return !e||e.schema_version!==dh||e.state!=="staging"&&e.state!=="failed"||typeof e.generation_id!="string"||typeof e.database_name!="string"||!e.database_name.trim()||typeof e.archive_id!="string"||typeof e.namespace_id!="string"||!Number.isFinite(e.started_at_ms)||!Number.isFinite(e.updated_at_ms)?null:e}function ff(e){const t=al();if(!t)throw new Error("durability storage is unavailable");t.write(uh,e);}function hf(){var e;(e=al())==null||e.remove(uh);}function ET(){var e;return ((e=Gi())==null?void 0:e.database_name)??null}function AT(e){const t=e.trim();if(t)try{Ha[nd]=t,typeof window<"u"&&(window[nd]=t),typeof localStorage<"u"&&localStorage.setItem(nd,t);}catch{}}function Ab(){var e;try{const t=(e=Ha.crypto)==null?void 0:e.randomUUID;if(typeof t=="function")return `generation-${t()}`}catch{}return `generation-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}const Db="__twe_migration_journal_v1",DT=["planned","preflighted","staging","transformed","verifying","prepared","companion_switched","browser_rebuilding","browser_verified","snapshot_verified","committed","rollback_required","rolled_back","failed"];function Pb(){const e=fh(Db);return !e||e.schema_version!==dh||typeof e.migration_id!="string"||typeof e.phase!="string"||!DT.includes(e.phase)||typeof e.archive_id!="string"||typeof e.namespace_id!="string"||!e.source_protocol||!Number.isInteger(e.source_protocol.major)||!Number.isInteger(e.source_protocol.minor)||!e.target_protocol||!Number.isInteger(e.target_protocol.major)||!Number.isInteger(e.target_protocol.minor)||!Number.isInteger(e.source_schema_revision)||!Number.isInteger(e.target_schema_revision)||typeof e.transform_id!="string"||!e.transform_id.trim()||typeof e.transform_hash!="string"||!/^[0-9a-f]{64}$/.test(e.transform_hash)||!Number.isInteger(e.event_id)||Number(e.event_id)<1||!Number.isFinite(e.updated_at_ms)||!["compatible","unknown","incompatible","lossy"].includes(String(e.compatibility))?null:e}function ho(e){const t=al();if(!t)throw new Error("durability storage is unavailable");t.write(Db,e);}var vm={};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Rc=function(){return Rc=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a]);}return t},Rc.apply(this,arguments)};function ga(e,t,n,r){function o(a){return a instanceof n?a:new n(function(i){i(a);})}return new(n||(n=Promise))(function(a,i){function s(h){try{c(r.next(h));}catch(u){i(u);}}function l(h){try{c(r.throw(h));}catch(u){i(u);}}function c(h){h.done?a(h.value):o(h.value).then(s,l);}c((r=r.apply(e,[])).next());})}function Xr(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(h){return l([c,h])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n);}catch(h){c=[6,h],o=0;}finally{r=a=0;}if(c[0]&5)throw c[1];return {value:c[0]?c[1]:void 0,done:true}}}function PT(e){var t=[e.schema.primKey].concat(e.schema.indexes);return t.map(function(n){return n.src}).join(",")}function OT(e){for(var t={},n=0,r=e.tables;n<r.length;n++){var o=r[n];t[o.name]=o.schema;}return t}function Ob(e,t){return new Promise(function(n,r){var o=new FileReader;o.onabort=function(a){return r(new Error("file read aborted"))},o.onerror=function(a){return r(a.target.error)},o.onload=function(a){return n(a.target.result)},t==="binary"?o.readAsArrayBuffer(e):o.readAsText(e);})}function Lb(e,t){if(typeof FileReaderSync>"u")throw new Error("FileReaderSync missing. Reading blobs synchronously requires code to run from within a web worker. Use TSON.encapsulateAsync() to do it from the main thread.");var n=new FileReaderSync,r=t==="binary"?n.readAsArrayBuffer(e):n.readAsText(e);return r}var pf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hh(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Qc=hh(function(e,t){(function(n,r){e.exports=r();})(pf,(function(){function n(X){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n=function(ne){return typeof ne}:n=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},n(X)}function r(X,ne,H,se,_e,ve,Ye){try{var Xe=X[ve](Ye),Ie=Xe.value;}catch(xt){H(xt);return}Xe.done?ne(Ie):Promise.resolve(Ie).then(se,_e);}function o(X){return function(){var ne=this,H=arguments;return new Promise(function(se,_e){var ve=X.apply(ne,H);function Ye(Ie){r(ve,se,_e,Ye,Xe,"next",Ie);}function Xe(Ie){r(ve,se,_e,Ye,Xe,"throw",Ie);}Ye(void 0);})}}function a(X,ne){if(!(X instanceof ne))throw new TypeError("Cannot call a class as a function")}function i(X,ne){for(var H=0;H<ne.length;H++){var se=ne[H];se.enumerable=se.enumerable||false,se.configurable=true,"value"in se&&(se.writable=true),Object.defineProperty(X,se.key,se);}}function s(X,ne,H){return ne&&i(X.prototype,ne),X}function l(X,ne,H){return ne in X?Object.defineProperty(X,ne,{value:H,enumerable:true,configurable:true,writable:true}):X[ne]=H,X}function c(X,ne){var H=Object.keys(X);if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(X);ne&&(se=se.filter(function(_e){return Object.getOwnPropertyDescriptor(X,_e).enumerable})),H.push.apply(H,se);}return H}function h(X){for(var ne=1;ne<arguments.length;ne++){var H=arguments[ne]!=null?arguments[ne]:{};ne%2?c(Object(H),true).forEach(function(se){l(X,se,H[se]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(H)):c(Object(H)).forEach(function(se){Object.defineProperty(X,se,Object.getOwnPropertyDescriptor(H,se));});}return X}function u(X,ne){return y(X)||k(X,ne)||M()}function m(X){return g(X)||b(X)||S()}function g(X){if(Array.isArray(X)){for(var ne=0,H=new Array(X.length);ne<X.length;ne++)H[ne]=X[ne];return H}}function y(X){if(Array.isArray(X))return X}function b(X){if(Symbol.iterator in Object(X)||Object.prototype.toString.call(X)==="[object Arguments]")return Array.from(X)}function k(X,ne){if(Symbol.iterator in Object(X)||Object.prototype.toString.call(X)==="[object Arguments]"){var H=[],se=true,_e=false,ve=void 0;try{for(var Ye=X[Symbol.iterator](),Xe;!(se=(Xe=Ye.next()).done)&&(H.push(Xe.value),!(ne&&H.length===ne));se=!0);}catch(Ie){_e=true,ve=Ie;}finally{try{!se&&Ye.return!=null&&Ye.return();}finally{if(_e)throw ve}}return H}}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var T=function X(ne){a(this,X),this.p=new Promise(ne);};T.__typeson__type__="TypesonPromise",typeof Symbol<"u"&&(T.prototype[Symbol.toStringTag]="TypesonPromise"),T.prototype.then=function(X,ne){var H=this;return new T(function(se,_e){H.p.then(function(ve){se(X?X(ve):ve);}).catch(function(ve){return ne?ne(ve):Promise.reject(ve)}).then(se,_e);})},T.prototype.catch=function(X){return this.then(null,X)},T.resolve=function(X){return new T(function(ne){ne(X);})},T.reject=function(X){return new T(function(ne,H){H(X);})},["all","race"].forEach(function(X){T[X]=function(ne){return new T(function(H,se){Promise[X](ne.map(function(_e){return _e&&_e.constructor&&_e.constructor.__typeson__type__==="TypesonPromise"?_e.p:_e})).then(H,se);})};});var P={},N=P.toString,I={}.hasOwnProperty,O=Object.getPrototypeOf,U=I.toString;function E(X,ne){return G(X)&&typeof X.then=="function"&&(!ne||typeof X.catch=="function")}function v(X){return N.call(X).slice(8,-1)}function L(X,ne){if(!X||n(X)!=="object")return false;var H=O(X);if(!H)return ne===null;var se=I.call(H,"constructor")&&H.constructor;return typeof se!="function"?ne===null:ne===se||ne!==null&&U.call(se)===U.call(ne)||typeof ne=="function"&&typeof se.__typeson__type__=="string"&&se.__typeson__type__===ne.__typeson__type__}function $(X){if(!X||v(X)!=="Object")return false;var ne=O(X);return ne?L(X,Object):true}function xe(X){if(!X||v(X)!=="Object")return false;var ne=O(X);return ne?L(X,Object)||xe(ne):true}function G(X){return X&&n(X)==="object"}function le(X){return X.replace(/~/g,"~0").replace(/\./g,"~1")}function Q(X){return X.replace(/~1/g,".").replace(/~0/g,"~")}function ce(X,ne){if(ne==="")return X;var H=ne.indexOf(".");if(H>-1){var se=X[Q(ne.slice(0,H))];return se===void 0?void 0:ce(se,ne.slice(H+1))}return X[Q(ne)]}function me(X,ne,H){if(ne==="")return H;var se=ne.indexOf(".");if(se>-1){var _e=X[Q(ne.slice(0,se))];return me(_e,ne.slice(se+1),H)}return X[Q(ne)]=H,X}function pe(X){return X===null?"null":Array.isArray(X)?"array":n(X)}var we=Object.keys,z=Array.isArray,ae={}.hasOwnProperty,Le=["type","replaced","iterateIn","iterateUnsetNumeric"];function fe(X,ne){if(X.keypath==="")return -1;var H=X.keypath.match(/\./g)||0,se=ne.keypath.match(/\./g)||0;return H&&(H=H.length),se&&(se=se.length),H>se?-1:H<se?1:X.keypath<ne.keypath?-1:X.keypath>ne.keypath}var Pe=(function(){function X(ne){a(this,X),this.options=ne,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={};}return s(X,[{key:"stringify",value:function(H,se,_e,ve){ve=h({},this.options,{},ve,{stringification:true});var Ye=this.encapsulate(H,null,ve);return z(Ye)?JSON.stringify(Ye[0],se,_e):Ye.then(function(Xe){return JSON.stringify(Xe,se,_e)})}},{key:"stringifySync",value:function(H,se,_e,ve){return this.stringify(H,se,_e,h({throwOnBadSyncType:true},ve,{sync:true}))}},{key:"stringifyAsync",value:function(H,se,_e,ve){return this.stringify(H,se,_e,h({throwOnBadSyncType:true},ve,{sync:false}))}},{key:"parse",value:function(H,se,_e){return _e=h({},this.options,{},_e,{parse:true}),this.revive(JSON.parse(H,se),_e)}},{key:"parseSync",value:function(H,se,_e){return this.parse(H,se,h({throwOnBadSyncType:true},_e,{sync:true}))}},{key:"parseAsync",value:function(H,se,_e){return this.parse(H,se,h({throwOnBadSyncType:true},_e,{sync:false}))}},{key:"specialTypeNames",value:function(H,se){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return _e.returnTypeNames=true,this.encapsulate(H,se,_e)}},{key:"rootTypeName",value:function(H,se){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return _e.iterateNone=true,this.encapsulate(H,se,_e)}},{key:"encapsulate",value:function(H,se,_e){_e=h({sync:true},this.options,{},_e);var ve=_e,Ye=ve.sync,Xe=this,Ie={},xt=[],Lt=[],Wt=[],Kt="cyclic"in _e?_e.cyclic:true,Tt=_e,Mt=Tt.encapsulateObserver,Pt=_t("",H,Kt,se||{},Wt);function zt(Ce){var A=Object.values(Ie);if(_e.iterateNone)return A.length?A[0]:X.getJSONType(Ce);if(A.length){if(_e.returnTypeNames)return m(new Set(A));!Ce||!$(Ce)||ae.call(Ce,"$types")?Ce={$:Ce,$types:{$:Ie}}:Ce.$types=Ie;}else G(Ce)&&ae.call(Ce,"$types")&&(Ce={$:Ce,$types:true});return _e.returnTypeNames?false:Ce}function De(Ce,A){return yt.apply(this,arguments)}function yt(){return yt=o(regeneratorRuntime.mark(function Ce(A,x){var R;return regeneratorRuntime.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,Promise.all(x.map(function(ke){return ke[1].p}));case 2:return R=V.sent,V.next=5,Promise.all(R.map((function(){var ke=o(regeneratorRuntime.mark(function oe(Be){var Ue,tt,ue,We,he,Me,je,At,K,Ve,Dt,Ee,Ne,nt;return regeneratorRuntime.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(Ue=[],tt=x.splice(0,1),ue=u(tt,1),We=ue[0],he=u(We,7),Me=he[0],je=he[2],At=he[3],K=he[4],Ve=he[5],Dt=he[6],Ee=_t(Me,Be,je,At,Ue,true,Dt),Ne=L(Ee,T),!(Me&&Ne)){ct.next=11;break}return ct.next=8,Ee.p;case 8:return nt=ct.sent,K[Ve]=nt,ct.abrupt("return",De(A,Ue));case 11:return Me?K[Ve]=Ee:Ne?A=Ee.p:A=Ee,ct.abrupt("return",De(A,Ue));case 13:case "end":return ct.stop()}},oe)}));return function(oe){return ke.apply(this,arguments)}})()));case 5:return V.abrupt("return",A);case 6:case "end":return V.stop()}},Ce)})),yt.apply(this,arguments)}function lt(Ce,A,x){Object.assign(Ce,A);var R=Le.map(function(B){var V=Ce[B];return delete Ce[B],V});x(),Le.forEach(function(B,V){Ce[B]=R[V];});}function _t(Ce,A,x,R,B,V,ke){var oe,Be={},Ue=n(A),tt=Mt?function(Ne){var nt=ke||R.type||X.getJSONType(A);Mt(Object.assign(Ne||Be,{keypath:Ce,value:A,cyclic:x,stateObj:R,promisesData:B,resolvingTypesonPromise:V,awaitingTypesonPromise:L(A,T)},{type:nt}));}:null;if(["string","boolean","number","undefined"].includes(Ue))return A===void 0||Ue==="number"&&(isNaN(A)||A===-1/0||A===1/0)?(R.replaced?oe=A:oe=Fe(Ce,A,R,B,false,V,tt),oe!==A&&(Be={replaced:oe})):oe=A,tt&&tt(),oe;if(A===null)return tt&&tt(),A;if(x&&!R.iterateIn&&!R.iterateUnsetNumeric&&A&&n(A)==="object"){var ue=xt.indexOf(A);if(ue<0)x===true&&(xt.push(A),Lt.push(Ce));else return Ie[Ce]="#",tt&&tt({cyclicKeypath:Lt[ue]}),"#"+Lt[ue]}var We=$(A),he=z(A),Me=(We||he)&&(!Xe.plainObjectReplacers.length||R.replaced)||R.iterateIn?A:Fe(Ce,A,R,B,We||he,null,tt),je;if(Me!==A?(oe=Me,Be={replaced:Me}):Ce===""&&L(A,T)?(B.push([Ce,A,x,R,void 0,void 0,R.type]),oe=A):he&&R.iterateIn!=="object"||R.iterateIn==="array"?(je=new Array(A.length),Be={clone:je}):!["function","symbol"].includes(n(A))&&!("toJSON"in A)&&!L(A,T)&&!L(A,Promise)&&!L(A,ArrayBuffer)||We||R.iterateIn==="object"?(je={},R.addLength&&(je.length=A.length),Be={clone:je}):oe=A,tt&&tt(),_e.iterateNone)return je||oe;if(!je)return oe;if(R.iterateIn){var At=function(nt){var qe={ownKeys:ae.call(A,nt)};lt(R,qe,function(){var ct=Ce+(Ce?".":"")+le(nt),jt=_t(ct,A[nt],!!x,R,B,V);L(jt,T)?B.push([ct,jt,!!x,R,je,nt,R.type]):jt!==void 0&&(je[nt]=jt);});};for(var K in A)At(K);tt&&tt({endIterateIn:true,end:true});}else we(A).forEach(function(Ne){var nt=Ce+(Ce?".":"")+le(Ne),qe={ownKeys:true};lt(R,qe,function(){var ct=_t(nt,A[Ne],!!x,R,B,V);L(ct,T)?B.push([nt,ct,!!x,R,je,Ne,R.type]):ct!==void 0&&(je[Ne]=ct);});}),tt&&tt({endIterateOwn:true,end:true});if(R.iterateUnsetNumeric){for(var Ve=A.length,Dt=function(nt){if(!(nt in A)){var qe=Ce+(Ce?".":"")+nt,ct={ownKeys:false};lt(R,ct,function(){var jt=_t(qe,void 0,!!x,R,B,V);L(jt,T)?B.push([qe,jt,!!x,R,je,nt,R.type]):jt!==void 0&&(je[nt]=jt);});}},Ee=0;Ee<Ve;Ee++)Dt(Ee);tt&&tt({endIterateUnsetNumeric:true,end:true});}return je}function Fe(Ce,A,x,R,B,V,ke){for(var oe=B?Xe.plainObjectReplacers:Xe.nonplainObjectReplacers,Be=oe.length;Be--;){var Ue=oe[Be];if(Ue.test(A,x)){var tt=Ue.type;if(Xe.revivers[tt]){var ue=Ie[Ce];Ie[Ce]=ue?[tt].concat(ue):tt;}if(Object.assign(x,{type:tt,replaced:true}),(Ye||!Ue.replaceAsync)&&!Ue.replace)return ke&&ke({typeDetected:true}),_t(Ce,A,Kt&&"readonly",x,R,V,tt);ke&&ke({replacing:true});var We=Ye||!Ue.replaceAsync?"replace":"replaceAsync";return _t(Ce,Ue[We](A,x),Kt&&"readonly",x,R,V,tt)}}return A}return Wt.length?Ye&&_e.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():Promise.resolve(De(Pt,Wt)).then(zt):!Ye&&_e.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():_e.stringification&&Ye?[zt(Pt)]:Ye?zt(Pt):Promise.resolve(zt(Pt))}},{key:"encapsulateSync",value:function(H,se,_e){return this.encapsulate(H,se,h({throwOnBadSyncType:true},_e,{sync:true}))}},{key:"encapsulateAsync",value:function(H,se,_e){return this.encapsulate(H,se,h({throwOnBadSyncType:true},_e,{sync:false}))}},{key:"revive",value:function(H,se){var _e=H&&H.$types;if(!_e)return H;if(_e===true)return H.$;se=h({sync:true},this.options,{},se);var ve=se,Ye=ve.sync,Xe=[],Ie={},xt=true;_e.$&&$(_e.$)&&(H=H.$,_e=_e.$,xt=false);var Lt=this;function Wt(yt,lt){var _t=Lt.revivers[yt]||[],Fe=u(_t,1),Ce=Fe[0];if(!Ce)throw new Error("Unregistered type: "+yt);return Ye&&!("revive"in Ce)?lt:Ce[Ye&&Ce.revive?"revive":!Ye&&Ce.reviveAsync?"reviveAsync":"revive"](lt,Ie)}function Kt(){var yt=[];if(Object.entries(_e).forEach(function(lt){var _t=u(lt,2),Fe=_t[0],Ce=_t[1];Ce!=="#"&&[].concat(Ce).forEach(function(A){var x=Lt.revivers[A]||[null,{}],R=u(x,2),B=R[1].plain;B&&(yt.push({keypath:Fe,type:A}),delete _e[Fe]);});}),!!yt.length)return yt.sort(fe).reduce(function lt(_t,Fe){var Ce=Fe.keypath,A=Fe.type;if(E(_t))return _t.then(function(B){return lt(B,{keypath:Ce,type:A})});var x=ce(H,Ce);if(x=Wt(A,x),L(x,T))return x.then(function(B){var V=me(H,Ce,B);V===B&&(H=V);});var R=me(H,Ce,x);R===x&&(H=R);},void 0)}var Tt=[];function Mt(yt,lt,_t,Fe,Ce){if(!(xt&&yt==="$types")){var A=_e[yt],x=z(lt);if(x||$(lt)){var R=x?new Array(lt.length):{};for(we(lt).forEach(function(ue){var We=Mt(yt+(yt?".":"")+le(ue),lt[ue],_t||R,R,ue),he=function(je){return L(je,it)?R[ue]=void 0:je!==void 0&&(R[ue]=je),je};L(We,T)?Tt.push(We.then(function(Me){return he(Me)})):he(We);}),lt=R;Xe.length;){var B=u(Xe[0],4),V=B[0],ke=B[1],oe=B[2],Be=B[3],Ue=ce(V,ke);if(Ue!==void 0)oe[Be]=Ue;else break;Xe.splice(0,1);}}if(!A)return lt;if(A==="#"){var tt=ce(_t,lt.slice(1));return tt===void 0&&Xe.push([_t,lt.slice(1),Fe,Ce]),tt}return [].concat(A).reduce(function ue(We,he){return L(We,T)?We.then(function(Me){return ue(Me,he)}):Wt(he,We)},lt)}}function Pt(yt){return L(yt,it)?void 0:yt}var zt=Kt(),De;return L(zt,T)?De=zt.then(function(){return H}):(De=Mt("",H,null),Tt.length&&(De=T.resolve(De).then(function(yt){return T.all([yt].concat(Tt))}).then(function(yt){var lt=u(yt,1),_t=lt[0];return _t}))),E(De)?Ye&&se.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():L(De,T)?De.p.then(Pt):De:!Ye&&se.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():Ye?Pt(De):Promise.resolve(Pt(De))}},{key:"reviveSync",value:function(H,se){return this.revive(H,h({throwOnBadSyncType:true},se,{sync:true}))}},{key:"reviveAsync",value:function(H,se){return this.revive(H,h({throwOnBadSyncType:true},se,{sync:false}))}},{key:"register",value:function(H,se){return se=se||{},[].concat(H).forEach(function _e(ve){var Ye=this;if(z(ve))return ve.map(function(Xe){return _e.call(Ye,Xe)});ve&&we(ve).forEach(function(Xe){if(Xe==="#")throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(X.JSON_TYPES.includes(Xe))throw new TypeError("Plain JSON object types are reserved as type names");var Ie=ve[Xe],xt=Ie&&Ie.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,Lt=xt.filter(function(_t){return _t.type===Xe});if(Lt.length&&(xt.splice(xt.indexOf(Lt[0]),1),delete this.revivers[Xe],delete this.types[Xe]),typeof Ie=="function"){var Wt=Ie;Ie={test:function(Fe){return Fe&&Fe.constructor===Wt},replace:function(Fe){return h({},Fe)},revive:function(Fe){return Object.assign(Object.create(Wt.prototype),Fe)}};}else if(z(Ie)){var Kt=Ie,Tt=u(Kt,3),Mt=Tt[0],Pt=Tt[1],zt=Tt[2];Ie={test:Mt,replace:Pt,revive:zt};}if(!(!Ie||!Ie.test)){var De={type:Xe,test:Ie.test.bind(Ie)};Ie.replace&&(De.replace=Ie.replace.bind(Ie)),Ie.replaceAsync&&(De.replaceAsync=Ie.replaceAsync.bind(Ie));var yt=typeof se.fallback=="number"?se.fallback:se.fallback?0:1/0;if(Ie.testPlainObjects?this.plainObjectReplacers.splice(yt,0,De):this.nonplainObjectReplacers.splice(yt,0,De),Ie.revive||Ie.reviveAsync){var lt={};Ie.revive&&(lt.revive=Ie.revive.bind(Ie)),Ie.reviveAsync&&(lt.reviveAsync=Ie.reviveAsync.bind(Ie)),this.revivers[Xe]=[lt,{plain:Ie.testPlainObjects}];}this.types[Xe]=Ie;}},this);},this),this}}]),X})(),it=function X(){a(this,X);};return it.__typeson__type__="TypesonUndefined",Pe.Undefined=it,Pe.Promise=T,Pe.isThenable=E,Pe.toStringTag=v,Pe.hasConstructorOf=L,Pe.isObject=G,Pe.isPlainObject=$,Pe.isUserObject=xe,Pe.escapeKeyPathComponent=le,Pe.unescapeKeyPathComponent=Q,Pe.getByKeyPath=ce,Pe.getJSONType=pe,Pe.JSON_TYPES=["null","boolean","number","string","array","object"],Pe}));}),LT=hh(function(e,t){(function(n,r){e.exports=r();})(pf,(function(){function n(A){return (n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(A)}function r(A,x){if(!(A instanceof x))throw new TypeError("Cannot call a class as a function")}function o(A,x){for(var R=0;R<x.length;R++){var B=x[R];B.enumerable=B.enumerable||false,B.configurable=true,"value"in B&&(B.writable=true),Object.defineProperty(A,B.key,B);}}function a(A,x,R){return x in A?Object.defineProperty(A,x,{value:R,enumerable:true,configurable:true,writable:true}):A[x]=R,A}function i(A,x){var R=Object.keys(A);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(A);x&&(B=B.filter((function(V){return Object.getOwnPropertyDescriptor(A,V).enumerable}))),R.push.apply(R,B);}return R}function s(A){return (function(R){if(Array.isArray(R))return l(R)})(A)||(function(R){if(typeof Symbol<"u"&&Symbol.iterator in Object(R))return Array.from(R)})(A)||(function(R,B){if(R){if(typeof R=="string")return l(R,B);var V=Object.prototype.toString.call(R).slice(8,-1);if(V==="Object"&&R.constructor&&(V=R.constructor.name),V==="Map"||V==="Set")return Array.from(R);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return l(R,B)}})(A)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function l(A,x){(x==null||x>A.length)&&(x=A.length);for(var R=0,B=new Array(x);R<x;R++)B[R]=A[R];return B}function c(A){return (c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(A)}function h(A,x){if(!(A instanceof x))throw new TypeError("Cannot call a class as a function")}function u(A,x){for(var R=0;R<x.length;R++){var B=x[R];B.enumerable=B.enumerable||false,B.configurable=true,"value"in B&&(B.writable=true),Object.defineProperty(A,B.key,B);}}function m(A,x,R){return x in A?Object.defineProperty(A,x,{value:R,enumerable:true,configurable:true,writable:true}):A[x]=R,A}function g(A,x){var R=Object.keys(A);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(A);x&&(B=B.filter((function(V){return Object.getOwnPropertyDescriptor(A,V).enumerable}))),R.push.apply(R,B);}return R}function y(A){for(var x=1;x<arguments.length;x++){var R=arguments[x]!=null?arguments[x]:{};x%2?g(Object(R),true).forEach((function(B){m(A,B,R[B]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(R)):g(Object(R)).forEach((function(B){Object.defineProperty(A,B,Object.getOwnPropertyDescriptor(R,B));}));}return A}function b(A,x){return (function(B){if(Array.isArray(B))return B})(A)||(function(B,V){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(B)))){var ke=[],oe=true,Be=false,Ue=void 0;try{for(var tt,ue=B[Symbol.iterator]();!(oe=(tt=ue.next()).done)&&(ke.push(tt.value),!V||ke.length!==V);oe=!0);}catch(We){Be=true,Ue=We;}finally{try{oe||ue.return==null||ue.return();}finally{if(Be)throw Ue}}return ke}})(A,x)||S(A,x)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function k(A){return (function(R){if(Array.isArray(R))return M(R)})(A)||(function(R){if(typeof Symbol<"u"&&Symbol.iterator in Object(R))return Array.from(R)})(A)||S(A)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function S(A,x){if(A){if(typeof A=="string")return M(A,x);var R=Object.prototype.toString.call(A).slice(8,-1);return R==="Object"&&A.constructor&&(R=A.constructor.name),R==="Map"||R==="Set"?Array.from(A):R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R)?M(A,x):void 0}}function M(A,x){(x==null||x>A.length)&&(x=A.length);for(var R=0,B=new Array(x);R<x;R++)B[R]=A[R];return B}var T=function A(x){h(this,A),this.p=new Promise(x);};T.__typeson__type__="TypesonPromise",typeof Symbol<"u"&&(T.prototype[Symbol.toStringTag]="TypesonPromise"),T.prototype.then=function(A,x){var R=this;return new T((function(B,V){R.p.then((function(ke){B(A?A(ke):ke);})).catch((function(ke){return x?x(ke):Promise.reject(ke)})).then(B,V);}))},T.prototype.catch=function(A){return this.then(null,A)},T.resolve=function(A){return new T((function(x){x(A);}))},T.reject=function(A){return new T((function(x,R){R(A);}))},["all","race"].forEach((function(A){T[A]=function(x){return new T((function(R,B){Promise[A](x.map((function(V){return V&&V.constructor&&V.constructor.__typeson__type__==="TypesonPromise"?V.p:V}))).then(R,B);}))};}));var P={}.toString,N={}.hasOwnProperty,I=Object.getPrototypeOf,O=N.toString;function U(A,x){return $(A)&&typeof A.then=="function"&&(!x||typeof A.catch=="function")}function E(A){return P.call(A).slice(8,-1)}function v(A,x){if(!A||c(A)!=="object")return false;var R=I(A);if(!R)return x===null;var B=N.call(R,"constructor")&&R.constructor;return typeof B!="function"?x===null:x===B||x!==null&&O.call(B)===O.call(x)||typeof x=="function"&&typeof B.__typeson__type__=="string"&&B.__typeson__type__===x.__typeson__type__}function L(A){return !(!A||E(A)!=="Object")&&(!I(A)||v(A,Object))}function $(A){return A&&c(A)==="object"}function xe(A){return A.replace(/~/g,"~0").replace(/\./g,"~1")}function G(A){return A.replace(/~1/g,".").replace(/~0/g,"~")}function le(A,x){if(x==="")return A;var R=x.indexOf(".");if(R>-1){var B=A[G(x.slice(0,R))];return B===void 0?void 0:le(B,x.slice(R+1))}return A[G(x)]}function Q(A,x,R){if(x==="")return R;var B=x.indexOf(".");return B>-1?Q(A[G(x.slice(0,B))],x.slice(B+1),R):(A[G(x)]=R,A)}function ce(A,x,R){return R?x?x(A):A:(A&&A.then||(A=Promise.resolve(A)),x?A.then(x):A)}var me=Object.keys,pe=Array.isArray,we={}.hasOwnProperty,z=["type","replaced","iterateIn","iterateUnsetNumeric"];function ae(A){return function(){for(var x=[],R=0;R<arguments.length;R++)x[R]=arguments[R];try{return Promise.resolve(A.apply(this,x))}catch(B){return Promise.reject(B)}}}function Le(A,x){if(A.keypath==="")return -1;var R=A.keypath.match(/\./g)||0,B=x.keypath.match(/\./g)||0;return R&&(R=R.length),B&&(B=B.length),R>B?-1:R<B?1:A.keypath<x.keypath?-1:A.keypath>x.keypath}var fe=(function(){function A(x){h(this,A),this.options=x,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={};}return (function(R,B,V){return B&&u(R.prototype,B),R})(A,[{key:"stringify",value:function(R,B,V,ke){ke=y(y(y({},this.options),ke),{},{stringification:true});var oe=this.encapsulate(R,null,ke);return pe(oe)?JSON.stringify(oe[0],B,V):oe.then((function(Be){return JSON.stringify(Be,B,V)}))}},{key:"stringifySync",value:function(R,B,V,ke){return this.stringify(R,B,V,y(y({throwOnBadSyncType:true},ke),{},{sync:true}))}},{key:"stringifyAsync",value:function(R,B,V,ke){return this.stringify(R,B,V,y(y({throwOnBadSyncType:true},ke),{},{sync:false}))}},{key:"parse",value:function(R,B,V){return V=y(y(y({},this.options),V),{},{parse:true}),this.revive(JSON.parse(R,B),V)}},{key:"parseSync",value:function(R,B,V){return this.parse(R,B,y(y({throwOnBadSyncType:true},V),{},{sync:true}))}},{key:"parseAsync",value:function(R,B,V){return this.parse(R,B,y(y({throwOnBadSyncType:true},V),{},{sync:false}))}},{key:"specialTypeNames",value:function(R,B){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return V.returnTypeNames=true,this.encapsulate(R,B,V)}},{key:"rootTypeName",value:function(R,B){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return V.iterateNone=true,this.encapsulate(R,B,V)}},{key:"encapsulate",value:function(R,B,V){var ke=ae((function(Ee,Ne){return ce(Promise.all(Ne.map((function(nt){return nt[1].p}))),(function(nt){return ce(Promise.all(nt.map(ae((function(qe){var ct=false,jt=[],ln=b(Ne.splice(0,1),1),Re=b(ln[0],7),Oe=Re[0],Et=Re[2],at=Re[3],$t=Re[4],Ct=Re[5],dt=Re[6],vt=Ve(Oe,qe,Et,at,jt,true,dt),ht=v(vt,T);return (function(Qt,Ln){var mn=Qt();return mn&&mn.then?mn.then(Ln):Ln(mn)})((function(){if(Oe&&ht)return ce(vt.p,(function(Xt){return $t[Ct]=Xt,ct=true,ke(Ee,jt)}))}),(function(Xt){return ct?Xt:(Oe?$t[Ct]=vt:Ee=ht?vt.p:vt,ke(Ee,jt))}))})))),(function(){return Ee}))}))})),oe=(V=y(y({sync:true},this.options),V)).sync,Be=this,Ue={},tt=[],ue=[],We=[],he=!("cyclic"in V)||V.cyclic,Me=V.encapsulateObserver,je=Ve("",R,he,B||{},We);function At(Ee){var Ne=Object.values(Ue);if(V.iterateNone)return Ne.length?Ne[0]:A.getJSONType(Ee);if(Ne.length){if(V.returnTypeNames)return k(new Set(Ne));Ee&&L(Ee)&&!we.call(Ee,"$types")?Ee.$types=Ue:Ee={$:Ee,$types:{$:Ue}};}else $(Ee)&&we.call(Ee,"$types")&&(Ee={$:Ee,$types:true});return !V.returnTypeNames&&Ee}function K(Ee,Ne,nt){Object.assign(Ee,Ne);var qe=z.map((function(ct){var jt=Ee[ct];return delete Ee[ct],jt}));nt(),z.forEach((function(ct,jt){Ee[ct]=qe[jt];}));}function Ve(Ee,Ne,nt,qe,ct,jt,ln){var Re,Oe={},Et=c(Ne),at=Me?function(dn){var an=ln||qe.type||A.getJSONType(Ne);Me(Object.assign(dn||Oe,{keypath:Ee,value:Ne,cyclic:nt,stateObj:qe,promisesData:ct,resolvingTypesonPromise:jt,awaitingTypesonPromise:v(Ne,T)},{type:an}));}:null;if(["string","boolean","number","undefined"].includes(Et))return Ne===void 0||Number.isNaN(Ne)||Ne===Number.NEGATIVE_INFINITY||Ne===Number.POSITIVE_INFINITY?(Re=qe.replaced?Ne:Dt(Ee,Ne,qe,ct,false,jt,at))!==Ne&&(Oe={replaced:Re}):Re=Ne,at&&at(),Re;if(Ne===null)return at&&at(),Ne;if(nt&&!qe.iterateIn&&!qe.iterateUnsetNumeric&&Ne&&c(Ne)==="object"){var $t=tt.indexOf(Ne);if(!($t<0))return Ue[Ee]="#",at&&at({cyclicKeypath:ue[$t]}),"#"+ue[$t];nt===true&&(tt.push(Ne),ue.push(Ee));}var Ct,dt=L(Ne),vt=pe(Ne),ht=(dt||vt)&&(!Be.plainObjectReplacers.length||qe.replaced)||qe.iterateIn?Ne:Dt(Ee,Ne,qe,ct,dt||vt,null,at);if(ht!==Ne?(Re=ht,Oe={replaced:ht}):Ee===""&&v(Ne,T)?(ct.push([Ee,Ne,nt,qe,void 0,void 0,qe.type]),Re=Ne):vt&&qe.iterateIn!=="object"||qe.iterateIn==="array"?(Ct=new Array(Ne.length),Oe={clone:Ct}):(["function","symbol"].includes(c(Ne))||"toJSON"in Ne||v(Ne,T)||v(Ne,Promise)||v(Ne,ArrayBuffer))&&!dt&&qe.iterateIn!=="object"?Re=Ne:(Ct={},qe.addLength&&(Ct.length=Ne.length),Oe={clone:Ct}),at&&at(),V.iterateNone)return Ct||Re;if(!Ct)return Re;if(qe.iterateIn){var Xt=function(an){var nn={ownKeys:we.call(Ne,an)};K(qe,nn,(function(){var Mn=Ee+(Ee?".":"")+xe(an),In=Ve(Mn,Ne[an],!!nt,qe,ct,jt);v(In,T)?ct.push([Mn,In,!!nt,qe,Ct,an,qe.type]):In!==void 0&&(Ct[an]=In);}));};for(var Qt in Ne)Xt(Qt);at&&at({endIterateIn:true,end:true});}else me(Ne).forEach((function(dn){var an=Ee+(Ee?".":"")+xe(dn);K(qe,{ownKeys:true},(function(){var nn=Ve(an,Ne[dn],!!nt,qe,ct,jt);v(nn,T)?ct.push([an,nn,!!nt,qe,Ct,dn,qe.type]):nn!==void 0&&(Ct[dn]=nn);}));})),at&&at({endIterateOwn:true,end:true});if(qe.iterateUnsetNumeric){for(var Ln=Ne.length,mn=function(an){if(!(an in Ne)){var nn=Ee+(Ee?".":"")+an;K(qe,{ownKeys:false},(function(){var Mn=Ve(nn,void 0,!!nt,qe,ct,jt);v(Mn,T)?ct.push([nn,Mn,!!nt,qe,Ct,an,qe.type]):Mn!==void 0&&(Ct[an]=Mn);}));}},Gt=0;Gt<Ln;Gt++)mn(Gt);at&&at({endIterateUnsetNumeric:true,end:true});}return Ct}function Dt(Ee,Ne,nt,qe,ct,jt,ln){for(var Re=ct?Be.plainObjectReplacers:Be.nonplainObjectReplacers,Oe=Re.length;Oe--;){var Et=Re[Oe];if(Et.test(Ne,nt)){var at=Et.type;if(Be.revivers[at]){var $t=Ue[Ee];Ue[Ee]=$t?[at].concat($t):at;}return Object.assign(nt,{type:at,replaced:true}),!oe&&Et.replaceAsync||Et.replace?(ln&&ln({replacing:true}),Ve(Ee,Et[oe||!Et.replaceAsync?"replace":"replaceAsync"](Ne,nt),he&&"readonly",nt,qe,jt,at)):(ln&&ln({typeDetected:true}),Ve(Ee,Ne,he&&"readonly",nt,qe,jt,at))}}return Ne}return We.length?oe&&V.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():Promise.resolve(ke(je,We)).then(At):!oe&&V.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():V.stringification&&oe?[At(je)]:oe?At(je):Promise.resolve(At(je))}},{key:"encapsulateSync",value:function(R,B,V){return this.encapsulate(R,B,y(y({throwOnBadSyncType:true},V),{},{sync:true}))}},{key:"encapsulateAsync",value:function(R,B,V){return this.encapsulate(R,B,y(y({throwOnBadSyncType:true},V),{},{sync:false}))}},{key:"revive",value:function(R,B){var V=R&&R.$types;if(!V)return R;if(V===true)return R.$;var ke=(B=y(y({sync:true},this.options),B)).sync,oe=[],Be={},Ue=true;V.$&&L(V.$)&&(R=R.$,V=V.$,Ue=false);var tt=this;function ue(At,K){var Ve=b(tt.revivers[At]||[],1)[0];if(!Ve)throw new Error("Unregistered type: "+At);return ke&&!("revive"in Ve)?K:Ve[ke&&Ve.revive?"revive":!ke&&Ve.reviveAsync?"reviveAsync":"revive"](K,Be)}var We=[];function he(At){return v(At,Pe)?void 0:At}var Me,je=(function(){var K=[];if(Object.entries(V).forEach((function(Ve){var Dt=b(Ve,2),Ee=Dt[0],Ne=Dt[1];Ne!=="#"&&[].concat(Ne).forEach((function(nt){b(tt.revivers[nt]||[null,{}],2)[1].plain&&(K.push({keypath:Ee,type:nt}),delete V[Ee]);}));})),K.length)return K.sort(Le).reduce((function Ve(Dt,Ee){var Ne=Ee.keypath,nt=Ee.type;if(U(Dt))return Dt.then((function(jt){return Ve(jt,{keypath:Ne,type:nt})}));var qe=le(R,Ne);if(v(qe=ue(nt,qe),T))return qe.then((function(jt){var ln=Q(R,Ne,jt);ln===jt&&(R=ln);}));var ct=Q(R,Ne,qe);ct===qe&&(R=ct);}),void 0)})();return v(je,T)?Me=je.then((function(){return R})):(Me=(function At(K,Ve,Dt,Ee,Ne){if(!Ue||K!=="$types"){var nt=V[K],qe=pe(Ve);if(qe||L(Ve)){var ct=qe?new Array(Ve.length):{};for(me(Ve).forEach((function(Ct){var dt=At(K+(K?".":"")+xe(Ct),Ve[Ct],Dt||ct,ct,Ct),vt=function(Xt){return v(Xt,Pe)?ct[Ct]=void 0:Xt!==void 0&&(ct[Ct]=Xt),Xt};v(dt,T)?We.push(dt.then((function(ht){return vt(ht)}))):vt(dt);})),Ve=ct;oe.length;){var jt=b(oe[0],4),ln=jt[0],Re=jt[1],Oe=jt[2],Et=jt[3],at=le(ln,Re);if(at===void 0)break;Oe[Et]=at,oe.splice(0,1);}}if(!nt)return Ve;if(nt==="#"){var $t=le(Dt,Ve.slice(1));return $t===void 0&&oe.push([Dt,Ve.slice(1),Ee,Ne]),$t}return [].concat(nt).reduce((function Ct(dt,vt){return v(dt,T)?dt.then((function(ht){return Ct(ht,vt)})):ue(vt,dt)}),Ve)}})("",R,null),We.length&&(Me=T.resolve(Me).then((function(At){return T.all([At].concat(We))})).then((function(At){return b(At,1)[0]})))),U(Me)?ke&&B.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():v(Me,T)?Me.p.then(he):Me:!ke&&B.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():ke?he(Me):Promise.resolve(he(Me))}},{key:"reviveSync",value:function(R,B){return this.revive(R,y(y({throwOnBadSyncType:true},B),{},{sync:true}))}},{key:"reviveAsync",value:function(R,B){return this.revive(R,y(y({throwOnBadSyncType:true},B),{},{sync:false}))}},{key:"register",value:function(R,B){return B=B||{},[].concat(R).forEach((function V(ke){var oe=this;if(pe(ke))return ke.map((function(Be){return V.call(oe,Be)}));ke&&me(ke).forEach((function(Be){if(Be==="#")throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(A.JSON_TYPES.includes(Be))throw new TypeError("Plain JSON object types are reserved as type names");var Ue=ke[Be],tt=Ue&&Ue.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,ue=tt.filter((function(K){return K.type===Be}));if(ue.length&&(tt.splice(tt.indexOf(ue[0]),1),delete this.revivers[Be],delete this.types[Be]),typeof Ue=="function"){var We=Ue;Ue={test:function(Ve){return Ve&&Ve.constructor===We},replace:function(Ve){return y({},Ve)},revive:function(Ve){return Object.assign(Object.create(We.prototype),Ve)}};}else if(pe(Ue)){var he=b(Ue,3);Ue={test:he[0],replace:he[1],revive:he[2]};}if(Ue&&Ue.test){var Me={type:Be,test:Ue.test.bind(Ue)};Ue.replace&&(Me.replace=Ue.replace.bind(Ue)),Ue.replaceAsync&&(Me.replaceAsync=Ue.replaceAsync.bind(Ue));var je=typeof B.fallback=="number"?B.fallback:B.fallback?0:Number.POSITIVE_INFINITY;if(Ue.testPlainObjects?this.plainObjectReplacers.splice(je,0,Me):this.nonplainObjectReplacers.splice(je,0,Me),Ue.revive||Ue.reviveAsync){var At={};Ue.revive&&(At.revive=Ue.revive.bind(Ue)),Ue.reviveAsync&&(At.reviveAsync=Ue.reviveAsync.bind(Ue)),this.revivers[Be]=[At,{plain:Ue.testPlainObjects}];}this.types[Be]=Ue;}}),this);}),this),this}}]),A})(),Pe=function A(){h(this,A);};Pe.__typeson__type__="TypesonUndefined",fe.Undefined=Pe,fe.Promise=T,fe.isThenable=U,fe.toStringTag=E,fe.hasConstructorOf=v,fe.isObject=$,fe.isPlainObject=L,fe.isUserObject=function A(x){if(!x||E(x)!=="Object")return false;var R=I(x);return !R||v(x,Object)||A(R)},fe.escapeKeyPathComponent=xe,fe.unescapeKeyPathComponent=G,fe.getByKeyPath=le,fe.getJSONType=function(x){return x===null?"null":Array.isArray(x)?"array":c(x)},fe.JSON_TYPES=["null","boolean","number","string","array","object"];for(var it={userObject:{test:function(x,R){return fe.isUserObject(x)},replace:function(x){return (function(B){for(var V=1;V<arguments.length;V++){var ke=arguments[V]!=null?arguments[V]:{};V%2?i(Object(ke),true).forEach((function(oe){a(B,oe,ke[oe]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(ke)):i(Object(ke)).forEach((function(oe){Object.defineProperty(B,oe,Object.getOwnPropertyDescriptor(ke,oe));}));}return B})({},x)},revive:function(x){return x}}},X=[{arrayNonindexKeys:{testPlainObjects:true,test:function(x,R){return !!Array.isArray(x)&&(Object.keys(x).some((function(B){return String(Number.parseInt(B))!==B}))&&(R.iterateIn="object",R.addLength=true),true)},replace:function(x,R){return R.iterateUnsetNumeric=true,x},revive:function(x){if(Array.isArray(x))return x;var R=[];return Object.keys(x).forEach((function(B){var V=x[B];R[B]=V;})),R}}},{sparseUndefined:{test:function(x,R){return x===void 0&&R.ownKeys===false},replace:function(x){return 0},revive:function(x){}}}],ne={undef:{test:function(x,R){return x===void 0&&(R.ownKeys||!("ownKeys"in R))},replace:function(x){return 0},revive:function(x){return new fe.Undefined}}},H={StringObject:{test:function(x){return fe.toStringTag(x)==="String"&&n(x)==="object"},replace:function(x){return String(x)},revive:function(x){return new String(x)}},BooleanObject:{test:function(x){return fe.toStringTag(x)==="Boolean"&&n(x)==="object"},replace:function(x){return !!x},revive:function(x){return new Boolean(x)}},NumberObject:{test:function(x){return fe.toStringTag(x)==="Number"&&n(x)==="object"},replace:function(x){return Number(x)},revive:function(x){return new Number(x)}}},se=[{nan:{test:function(x){return Number.isNaN(x)},replace:function(x){return "NaN"},revive:function(x){return Number.NaN}}},{infinity:{test:function(x){return x===Number.POSITIVE_INFINITY},replace:function(x){return "Infinity"},revive:function(x){return Number.POSITIVE_INFINITY}}},{negativeInfinity:{test:function(x){return x===Number.NEGATIVE_INFINITY},replace:function(x){return "-Infinity"},revive:function(x){return Number.NEGATIVE_INFINITY}}}],_e={date:{test:function(x){return fe.toStringTag(x)==="Date"},replace:function(x){var R=x.getTime();return Number.isNaN(R)?"NaN":R},revive:function(x){return x==="NaN"?new Date(Number.NaN):new Date(x)}}},ve={regexp:{test:function(x){return fe.toStringTag(x)==="RegExp"},replace:function(x){return {source:x.source,flags:(x.global?"g":"")+(x.ignoreCase?"i":"")+(x.multiline?"m":"")+(x.sticky?"y":"")+(x.unicode?"u":"")}},revive:function(x){var R=x.source,B=x.flags;return new RegExp(R,B)}}},Ye={map:{test:function(x){return fe.toStringTag(x)==="Map"},replace:function(x){return s(x.entries())},revive:function(x){return new Map(x)}}},Xe={set:{test:function(x){return fe.toStringTag(x)==="Set"},replace:function(x){return s(x.values())},revive:function(x){return new Set(x)}}},Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xt=new Uint8Array(256),Lt=0;Lt<Ie.length;Lt++)xt[Ie.charCodeAt(Lt)]=Lt;var Wt=function(x,R,B){B==null&&(B=x.byteLength);for(var V=new Uint8Array(x,0,B),ke=V.length,oe="",Be=0;Be<ke;Be+=3)oe+=Ie[V[Be]>>2],oe+=Ie[(3&V[Be])<<4|V[Be+1]>>4],oe+=Ie[(15&V[Be+1])<<2|V[Be+2]>>6],oe+=Ie[63&V[Be+2]];return ke%3==2?oe=oe.slice(0,-1)+"=":ke%3==1&&(oe=oe.slice(0,-2)+"=="),oe},Kt=function(x){var R,B,V,ke,oe=x.length,Be=.75*x.length,Ue=0;x[x.length-1]==="="&&(Be--,x[x.length-2]==="="&&Be--);for(var tt=new ArrayBuffer(Be),ue=new Uint8Array(tt),We=0;We<oe;We+=4)R=xt[x.charCodeAt(We)],B=xt[x.charCodeAt(We+1)],V=xt[x.charCodeAt(We+2)],ke=xt[x.charCodeAt(We+3)],ue[Ue++]=R<<2|B>>4,ue[Ue++]=(15&B)<<4|V>>2,ue[Ue++]=(3&V)<<6|63&ke;return tt},Tt={arraybuffer:{test:function(x){return fe.toStringTag(x)==="ArrayBuffer"},replace:function(x,R){R.buffers||(R.buffers=[]);var B=R.buffers.indexOf(x);return B>-1?{index:B}:(R.buffers.push(x),Wt(x))},revive:function(x,R){if(R.buffers||(R.buffers=[]),n(x)==="object")return R.buffers[x.index];var B=Kt(x);return R.buffers.push(B),B}}},Mt=typeof self>"u"?pf:self,Pt={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(A){var x=A,R=Mt[x];R&&(Pt[A.toLowerCase()]={test:function(V){return fe.toStringTag(V)===x},replace:function(V,ke){var oe=V.buffer,Be=V.byteOffset,Ue=V.length;ke.buffers||(ke.buffers=[]);var tt=ke.buffers.indexOf(oe);return tt>-1?{index:tt,byteOffset:Be,length:Ue}:(ke.buffers.push(oe),{encoded:Wt(oe),byteOffset:Be,length:Ue})},revive:function(V,ke){ke.buffers||(ke.buffers=[]);var oe,Be=V.byteOffset,Ue=V.length,tt=V.encoded,ue=V.index;return "index"in V?oe=ke.buffers[ue]:(oe=Kt(tt),ke.buffers.push(oe)),new R(oe,Be,Ue)}});}));var zt={dataview:{test:function(x){return fe.toStringTag(x)==="DataView"},replace:function(x,R){var B=x.buffer,V=x.byteOffset,ke=x.byteLength;R.buffers||(R.buffers=[]);var oe=R.buffers.indexOf(B);return oe>-1?{index:oe,byteOffset:V,byteLength:ke}:(R.buffers.push(B),{encoded:Wt(B),byteOffset:V,byteLength:ke})},revive:function(x,R){R.buffers||(R.buffers=[]);var B,V=x.byteOffset,ke=x.byteLength,oe=x.encoded,Be=x.index;return "index"in x?B=R.buffers[Be]:(B=Kt(oe),R.buffers.push(B)),new DataView(B,V,ke)}}},De={IntlCollator:{test:function(x){return fe.hasConstructorOf(x,Intl.Collator)},replace:function(x){return x.resolvedOptions()},revive:function(x){return new Intl.Collator(x.locale,x)}},IntlDateTimeFormat:{test:function(x){return fe.hasConstructorOf(x,Intl.DateTimeFormat)},replace:function(x){return x.resolvedOptions()},revive:function(x){return new Intl.DateTimeFormat(x.locale,x)}},IntlNumberFormat:{test:function(x){return fe.hasConstructorOf(x,Intl.NumberFormat)},replace:function(x){return x.resolvedOptions()},revive:function(x){return new Intl.NumberFormat(x.locale,x)}}};function yt(A){for(var x=new Uint8Array(A.length),R=0;R<A.length;R++)x[R]=A.charCodeAt(R);return x.buffer}var lt={file:{test:function(x){return fe.toStringTag(x)==="File"},replace:function(x){var R=new XMLHttpRequest;if(R.overrideMimeType("text/plain; charset=x-user-defined"),R.open("GET",URL.createObjectURL(x),false),R.send(),R.status!==200&&R.status!==0)throw new Error("Bad File access: "+R.status);return {type:x.type,stringContents:R.responseText,name:x.name,lastModified:x.lastModified}},revive:function(x){var R=x.name,B=x.type,V=x.stringContents,ke=x.lastModified;return new File([yt(V)],R,{type:B,lastModified:ke})},replaceAsync:function(x){return new fe.Promise((function(R,B){var V=new FileReader;V.addEventListener("load",(function(){R({type:x.type,stringContents:V.result,name:x.name,lastModified:x.lastModified});})),V.addEventListener("error",(function(){B(V.error);})),V.readAsBinaryString(x);}))}}},_t={bigint:{test:function(x){return typeof x=="bigint"},replace:function(x){return String(x)},revive:function(x){return BigInt(x)}}},Fe={bigintObject:{test:function(x){return n(x)==="object"&&fe.hasConstructorOf(x,BigInt)},replace:function(x){return String(x)},revive:function(x){return new Object(BigInt(x))}}},Ce={cryptokey:{test:function(x){return fe.toStringTag(x)==="CryptoKey"&&x.extractable},replaceAsync:function(x){return new fe.Promise((function(R,B){crypto.subtle.exportKey("jwk",x).catch((function(V){B(V);})).then((function(V){R({jwk:V,algorithm:x.algorithm,usages:x.usages});}));}))},revive:function(x){var R=x.jwk,B=x.algorithm,V=x.usages;return crypto.subtle.importKey("jwk",R,B,true,V)}}};return [it,ne,X,H,se,_e,ve,{imagedata:{test:function(x){return fe.toStringTag(x)==="ImageData"},replace:function(x){return {array:s(x.data),width:x.width,height:x.height}},revive:function(x){return new ImageData(new Uint8ClampedArray(x.array),x.width,x.height)}}},{imagebitmap:{test:function(x){return fe.toStringTag(x)==="ImageBitmap"||x&&x.dataset&&x.dataset.toStringTag==="ImageBitmap"},replace:function(x){var R=document.createElement("canvas");return R.getContext("2d").drawImage(x,0,0),R.toDataURL()},revive:function(x){var R=document.createElement("canvas"),B=R.getContext("2d"),V=document.createElement("img");return V.addEventListener("load",(function(){B.drawImage(V,0,0);})),V.src=x,R},reviveAsync:function(x){var R=document.createElement("canvas"),B=R.getContext("2d"),V=document.createElement("img");return V.addEventListener("load",(function(){B.drawImage(V,0,0);})),V.src=x,createImageBitmap(R)}}},lt,{file:lt.file,filelist:{test:function(x){return fe.toStringTag(x)==="FileList"},replace:function(x){for(var R=[],B=0;B<x.length;B++)R[B]=x.item(B);return R},revive:function(x){return new((function(){function R(){r(this,R),this._files=arguments[0],this.length=this._files.length;}return (function(V,ke,oe){return ke&&o(V.prototype,ke),V})(R,[{key:"item",value:function(V){return this._files[V]}},{key:Symbol.toStringTag,get:function(){return "FileList"}}]),R})())(x)}}},{blob:{test:function(x){return fe.toStringTag(x)==="Blob"},replace:function(x){var R=new XMLHttpRequest;if(R.overrideMimeType("text/plain; charset=x-user-defined"),R.open("GET",URL.createObjectURL(x),false),R.send(),R.status!==200&&R.status!==0)throw new Error("Bad Blob access: "+R.status);return {type:x.type,stringContents:R.responseText}},revive:function(x){var R=x.type,B=x.stringContents;return new Blob([yt(B)],{type:R})},replaceAsync:function(x){return new fe.Promise((function(R,B){var V=new FileReader;V.addEventListener("load",(function(){R({type:x.type,stringContents:V.result});})),V.addEventListener("error",(function(){B(V.error);})),V.readAsBinaryString(x);}))}}}].concat(typeof Map=="function"?Ye:[],typeof Set=="function"?Xe:[],typeof ArrayBuffer=="function"?Tt:[],typeof Uint8Array=="function"?Pt:[],typeof DataView=="function"?zt:[],typeof Intl<"u"?De:[],typeof crypto<"u"?Ce:[],typeof BigInt<"u"?[_t,Fe]:[])}));}),Ci="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vs=new Uint8Array(256);for(var Al=0;Al<Ci.length;Al++)vs[Ci.codePointAt(Al)]=Al;var mf=function(t,n,r){r==null&&(r=t.byteLength);for(var o=new Uint8Array(t,0,r),a=o.length,i="",s=0;s<a;s+=3)i+=Ci[o[s]>>2],i+=Ci[(o[s]&3)<<4|o[s+1]>>4],i+=Ci[(o[s+1]&15)<<2|o[s+2]>>6],i+=Ci[o[s+2]&63];return a%3===2?i=i.slice(0,-1)+"=":a%3===1&&(i=i.slice(0,-2)+"=="),i},Nb=function(t){var n=t.length,r=t.length*.75,o=0,a,i,s,l;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);for(var c=new ArrayBuffer(r),h=new Uint8Array(c),u=0;u<n;u+=4)a=vs[t.codePointAt(u)],i=vs[t.codePointAt(u+1)],s=vs[t.codePointAt(u+2)],l=vs[t.codePointAt(u+3)],h[o++]=a<<2|i>>4,h[o++]=(i&15)<<4|s>>2,h[o++]=(s&3)<<6|l&63;return c},NT=typeof self>"u"?global:self,Fb={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(e){var t=e,n=NT[t];n&&(Fb[e.toLowerCase()+"2"]={test:function(r){return Qc.toStringTag(r)===t},replace:function(r){var o=r.buffer,a=r.byteOffset,i=r.length;return {buffer:o,byteOffset:a,length:i}},revive:function(r){var o=r.buffer,a=r.byteOffset,i=r.length;return new n(o,a,i)}});});var FT={arraybuffer:{test:function(e){return Qc.toStringTag(e)==="ArrayBuffer"},replace:function(e){return mf(e,0,e.byteLength)},revive:function(e){var t=Nb(e);return t}}},Nr=new Qc().register(LT),$T="FileReaderSync"in self,Ec=[],rc=0;Nr.register([FT,Fb,{blob2:{test:function(e){return Qc.toStringTag(e)==="Blob"},replace:function(e){if(e.isClosed)throw new Error("The Blob is closed");if($T){var t=Lb(e,"binary"),n=mf(t,0,t.byteLength);return {type:e.type,data:n}}else {Ec.push(e);var r={type:e.type,data:{start:rc,end:rc+e.size}};return rc+=e.size,r}},finalize:function(e,t){e.data=mf(t,0,t.byteLength);},revive:function(e){var t=e.type,n=e.data;return new Blob([Nb(n)],{type:t})}}}]);Nr.mustFinalize=function(){return Ec.length>0};Nr.finalize=function(e){return ga(void 0,void 0,void 0,function(){var t,n,r,o,a,i,s,l,c,h,u,m;return Xr(this,function(g){switch(g.label){case 0:return [4,Ob(new Blob(Ec),"binary")];case 1:if(t=g.sent(),e){for(n=0,r=e;n<r.length;n++)if(o=r[n],o.$types){a=o.$types,i=a.$,i&&(a=a.$);for(s in a)l=a[s],c=Nr.types[l],c&&c.finalize&&(h=wn.getByKeyPath(o,i?"$."+s:s),c.finalize(h,t.slice((u=h.data)===null||u===void 0?void 0:u.start,(m=h.data)===null||m===void 0?void 0:m.end)));}}return Ec=[],rc=0,[2]}})})};var BT=2e3;function $b(e,t){return ga(this,void 0,void 0,function(){function n(){return ga(this,void 0,void 0,function(){var u,m,g,y,b,k,S,M,T,P;return Xr(this,function(N){switch(N.label){case 0:return [4,Promise.all(o.map(function(I){return I.count()}))];case 1:u=N.sent(),u.forEach(function(I,O){return i[O].rowCount=I}),h.totalRows=u.reduce(function(I,O){return I+O}),m=JSON.stringify(l,void 0,s?2:void 0),g=m.lastIndexOf("]"),y=m.substring(0,g),a.push(y),b=t.filter,k=t.transform,S=function(I){var O,U,E,v,L,$,xe,G,le,Q,ce,me;return Xr(this,function(pe){switch(pe.label){case 0:O=e.table(I),U=O.schema.primKey,E=!!U.keyPath,v=t.numRowsPerChunk||BT,L=E?{tableName:O.name,inbound:true,rows:[]}:{tableName:O.name,inbound:false,rows:[]},$=JSON.stringify(L,void 0,s?2:void 0),s&&($=$.split(`
`).join(`
`)),xe=$.lastIndexOf("]"),a.push($.substring(0,xe)),G=null,le=0,Q=true,ce=function(){var we,z,ae,Le,fe,ne,Pe,it,X,ne;return Xr(this,function(H){switch(H.label){case 0:return c&&wn.ignoreTransaction(function(){return c(h)}),we=G==null?O.limit(v):O.where(":id").above(G).limit(v),[4,we.toArray()];case 1:return z=H.sent(),z.length===0?[2,"break"]:(G!=null&&le>0&&(a.push(","),s&&a.push(`
`)),Q=z.length===v,E?(ae=b?z.filter(function(se){return b(I,se)}):z,Le=k?ae.map(function(se){return k(I,se).value}):ae,fe=Le.map(function(se){return Nr.encapsulate(se)}),Nr.mustFinalize()?[4,wn.waitFor(Nr.finalize(fe))]:[3,3]):[3,4]);case 2:H.sent(),H.label=3;case 3:return ne=JSON.stringify(fe,void 0,s?2:void 0),s&&(ne=ne.split(`
`).join(`
`)),a.push(new Blob([ne.substring(1,ne.length-1)])),le=Le.length,G=z.length>0?wn.getByKeyPath(z[z.length-1],U.keyPath):null,[3,8];case 4:return [4,we.primaryKeys()];case 5:return Pe=H.sent(),it=Pe.map(function(se,_e){return [se,z[_e]]}),b&&(it=it.filter(function(se){var _e=se[0],ve=se[1];return b(I,ve,_e)})),k&&(it=it.map(function(se){var _e=se[0],ve=se[1],Ye=k(I,ve,_e);return [Ye.key,Ye.value]})),X=it.map(function(se){return Nr.encapsulate(se)}),Nr.mustFinalize()?[4,wn.waitFor(Nr.finalize(X))]:[3,7];case 6:H.sent(),H.label=7;case 7:ne=JSON.stringify(X,void 0,s?2:void 0),s&&(ne=ne.split(`
`).join(`
`)),a.push(new Blob([ne.substring(1,ne.length-1)])),le=it.length,G=Pe.length>0?Pe[Pe.length-1]:null,H.label=8;case 8:return h.completedRows+=z.length,[2]}})},pe.label=1;case 1:return Q?[5,ce()]:[3,3];case 2:return me=pe.sent(),me==="break"?[3,3]:[3,1];case 3:return a.push($.substr(xe)),h.completedTables+=1,h.completedTables<h.totalTables&&a.push(","),[2]}})},M=0,T=i,N.label=2;case 2:return M<T.length?(P=T[M].name,[5,S(P)]):[3,5];case 3:N.sent(),N.label=4;case 4:return M++,[3,2];case 5:return a.push(m.substr(g)),h.done=true,c&&wn.ignoreTransaction(function(){return c(h)}),[2]}})})}var r,o,a,i,s,l,c,h;return Xr(this,function(u){switch(u.label){case 0:t=t||{},r=t.skipTables?t.skipTables:[],o=e.tables.filter(function(m){return !r.includes(m.name)}),a=[],i=o.map(function(m){return {name:m.name,schema:PT(m),rowCount:0}}),s=t.prettyJson,l={formatName:"dexie",formatVersion:1,data:{databaseName:e.name,databaseVersion:e.verno,tables:i,data:[]}},c=t.progressCallback,h={done:false,completedRows:0,completedTables:0,totalRows:NaN,totalTables:i.length},u.label=1;case 1:return u.trys.push([1,,6,7]),t.noTransaction?[4,n()]:[3,3];case 2:return u.sent(),[3,5];case 3:return [4,e.transaction("r",e.tables,n)];case 4:u.sent(),u.label=5;case 5:return [3,7];case 6:return Nr.finalize(),[7];case 7:return [2,new Blob(a,{type:"text/json"})]}})})}var UT=1,jT={Stream:function(){}},HT=hh(function(e,t){(function(n){var r=typeof process=="object"&&vm?vm:self;n.parser=function(E){return new g(E)},n.CParser=g,n.CStream=b,n.createStream=y,n.MAX_BUFFER_LENGTH=10*1024*1024,n.DEBUG=r.CDEBUG==="debug",n.INFO=r.CDEBUG==="debug"||r.CDEBUG==="info",n.EVENTS=["value","string","key","openobject","closeobject","openarray","closearray","error","end","ready"];var o={textNode:void 0,numberNode:""},a=n.EVENTS.filter(function(E){return E!=="error"&&E!=="end"}),i=0,s;n.STATE={BEGIN:i++,VALUE:i++,OPEN_OBJECT:i++,CLOSE_OBJECT:i++,OPEN_ARRAY:i++,CLOSE_ARRAY:i++,TEXT_ESCAPE:i++,STRING:i++,BACKSLASH:i++,END:i++,OPEN_KEY:i++,CLOSE_KEY:i++,TRUE:i++,TRUE2:i++,TRUE3:i++,FALSE:i++,FALSE2:i++,FALSE3:i++,FALSE4:i++,NULL:i++,NULL2:i++,NULL3:i++,NUMBER_DECIMAL_POINT:i++,NUMBER_DIGIT:i++};for(var l in n.STATE)n.STATE[n.STATE[l]]=l;i=n.STATE;const c={tab:9,lineFeed:10,carriageReturn:13,space:32,doubleQuote:34,plus:43,comma:44,minus:45,period:46,_0:48,_9:57,colon:58,E:69,openBracket:91,backslash:92,closeBracket:93,a:97,b:98,e:101,f:102,l:108,n:110,r:114,s:115,t:116,u:117,openBrace:123,closeBrace:125};Object.create||(Object.create=function(E){function v(){this.__proto__=E;}return v.prototype=E,new v}),Object.getPrototypeOf||(Object.getPrototypeOf=function(E){return E.__proto__}),Object.keys||(Object.keys=function(E){var v=[];for(var L in E)E.hasOwnProperty(L)&&v.push(L);return v});function h(E){var v=Math.max(n.MAX_BUFFER_LENGTH,10),L=0;for(var $ in o){var xe=E[$]===void 0?0:E[$].length;if(xe>v)switch($){case "text":closeText(E);break;default:N(E,"Max buffer length exceeded: "+$);}L=Math.max(L,xe);}E.bufferCheckPosition=n.MAX_BUFFER_LENGTH-L+E.position;}function u(E){for(var v in o)E[v]=o[v];}var m=/[\\"\n]/g;function g(E){if(!(this instanceof g))return new g(E);var v=this;u(v),v.bufferCheckPosition=n.MAX_BUFFER_LENGTH,v.q=v.c=v.p="",v.opt=E||{},v.closed=v.closedRoot=v.sawRoot=false,v.tag=v.error=null,v.state=i.BEGIN,v.stack=new Array,v.position=v.column=0,v.line=1,v.slashed=false,v.unicodeI=0,v.unicodeS=null,v.depth=0,k(v,"onready");}g.prototype={end:function(){I(this);},write:U,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{s=jT.Stream;}catch{s=function(){};}function y(E){return new b(E)}function b(E){if(!(this instanceof b))return new b(E);this._parser=new g(E),this.writable=true,this.readable=true,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var v=this;s.apply(v),this._parser.onend=function(){v.emit("end");},this._parser.onerror=function(L){v.emit("error",L),v._parser.error=null;},a.forEach(function(L){Object.defineProperty(v,"on"+L,{get:function(){return v._parser["on"+L]},set:function($){if(!$)return v.removeAllListeners(L),v._parser["on"+L]=$,$;v.on(L,$);},enumerable:true,configurable:false});});}b.prototype=Object.create(s.prototype,{constructor:{value:b}}),b.prototype.write=function(E){E=new Buffer(E);for(var v=0;v<E.length;v++){var L=E[v];if(this.bytes_remaining>0){for(var $=0;$<this.bytes_remaining;$++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+$]=E[$];this.string=this.temp_buffs[this.bytes_in_sequence].toString(),this.bytes_in_sequence=this.bytes_remaining=0,v=v+$-1,this._parser.write(this.string),this.emit("data",this.string);continue}if(this.bytes_remaining===0&&L>=128)if(L>=194&&L<=223&&(this.bytes_in_sequence=2),L>=224&&L<=239&&(this.bytes_in_sequence=3),L>=240&&L<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+v>E.length){for(var xe=0;xe<=E.length-1-v;xe++)this.temp_buffs[this.bytes_in_sequence][xe]=E[v+xe];return this.bytes_remaining=v+this.bytes_in_sequence-E.length,true}else {this.string=E.slice(v,v+this.bytes_in_sequence).toString(),v=v+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string);continue}for(var G=v;G<E.length&&!(E[G]>=128);G++);this.string=E.slice(v,G).toString(),this._parser.write(this.string),this.emit("data",this.string),v=G-1;}},b.prototype.end=function(E){return E&&E.length&&this._parser.write(E.toString()),this._parser.end(),true},b.prototype.on=function(E,v){var L=this;return !L._parser["on"+E]&&a.indexOf(E)!==-1&&(L._parser["on"+E]=function(){var $=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);$.splice(0,0,E),L.emit.apply(L,$);}),s.prototype.on.call(L,E,v)},b.prototype.destroy=function(){u(this._parser),this.emit("close");};function k(E,v,L){n.INFO&&console.log("-- emit",v,L),E[v]&&E[v](L);}function S(E,v,L){M(E),k(E,v,L);}function M(E,v){E.textNode=P(E.opt,E.textNode),E.textNode!==void 0&&k(E,v||"onvalue",E.textNode),E.textNode=void 0;}function T(E){E.numberNode&&k(E,"onvalue",parseFloat(E.numberNode)),E.numberNode="";}function P(E,v){return v===void 0||(E.trim&&(v=v.trim()),E.normalize&&(v=v.replace(/\s+/g," "))),v}function N(E,v){return M(E),v+=`
Line: `+E.line+`
Column: `+E.column+`
Char: `+E.c,v=new Error(v),E.error=v,k(E,"onerror",v),E}function I(E){return (E.state!==i.VALUE||E.depth!==0)&&N(E,"Unexpected end"),M(E),E.c="",E.closed=true,k(E,"onend"),g.call(E,E.opt),E}function O(E){return E===c.carriageReturn||E===c.lineFeed||E===c.space||E===c.tab}function U(E){var v=this;if(this.error)throw this.error;if(v.closed)return N(v,"Cannot write after close. Assign an onready handler.");if(E===null)return I(v);var L=0,$=E.charCodeAt(0),xe=v.p;for(n.DEBUG&&console.log("write -> ["+E+"]");$&&(xe=$,v.c=$=E.charCodeAt(L++),xe!==$?v.p=xe:xe=v.p,!!$);)switch(n.DEBUG&&console.log(L,$,n.STATE[v.state]),v.position++,$===c.lineFeed?(v.line++,v.column=0):v.column++,v.state){case i.BEGIN:$===c.openBrace?v.state=i.OPEN_OBJECT:$===c.openBracket?v.state=i.OPEN_ARRAY:O($)||N(v,"Non-whitespace before {[.");continue;case i.OPEN_KEY:case i.OPEN_OBJECT:if(O($))continue;if(v.state===i.OPEN_KEY)v.stack.push(i.CLOSE_KEY);else if($===c.closeBrace){k(v,"onopenobject"),this.depth++,k(v,"oncloseobject"),this.depth--,v.state=v.stack.pop()||i.VALUE;continue}else v.stack.push(i.CLOSE_OBJECT);$===c.doubleQuote?v.state=i.STRING:N(v,'Malformed object key should start with "');continue;case i.CLOSE_KEY:case i.CLOSE_OBJECT:if(O($))continue;v.state,i.CLOSE_KEY,$===c.colon?(v.state===i.CLOSE_OBJECT?(v.stack.push(i.CLOSE_OBJECT),M(v,"onopenobject"),this.depth++):M(v,"onkey"),v.state=i.VALUE):$===c.closeBrace?(S(v,"oncloseobject"),this.depth--,v.state=v.stack.pop()||i.VALUE):$===c.comma?(v.state===i.CLOSE_OBJECT&&v.stack.push(i.CLOSE_OBJECT),M(v),v.state=i.OPEN_KEY):N(v,"Bad object");continue;case i.OPEN_ARRAY:case i.VALUE:if(O($))continue;if(v.state===i.OPEN_ARRAY)if(k(v,"onopenarray"),this.depth++,v.state=i.VALUE,$===c.closeBracket){k(v,"onclosearray"),this.depth--,v.state=v.stack.pop()||i.VALUE;continue}else v.stack.push(i.CLOSE_ARRAY);$===c.doubleQuote?v.state=i.STRING:$===c.openBrace?v.state=i.OPEN_OBJECT:$===c.openBracket?v.state=i.OPEN_ARRAY:$===c.t?v.state=i.TRUE:$===c.f?v.state=i.FALSE:$===c.n?v.state=i.NULL:$===c.minus?v.numberNode+="-":c._0<=$&&$<=c._9?(v.numberNode+=String.fromCharCode($),v.state=i.NUMBER_DIGIT):N(v,"Bad value");continue;case i.CLOSE_ARRAY:if($===c.comma)v.stack.push(i.CLOSE_ARRAY),M(v,"onvalue"),v.state=i.VALUE;else if($===c.closeBracket)S(v,"onclosearray"),this.depth--,v.state=v.stack.pop()||i.VALUE;else {if(O($))continue;N(v,"Bad array");}continue;case i.STRING:v.textNode===void 0&&(v.textNode="");var G=L-1,le=v.slashed,Q=v.unicodeI;e:for(;;){for(n.DEBUG&&console.log(L,$,n.STATE[v.state],le);Q>0;)if(v.unicodeS+=String.fromCharCode($),$=E.charCodeAt(L++),v.position++,Q===4?(v.textNode+=String.fromCharCode(parseInt(v.unicodeS,16)),Q=0,G=L-1):Q++,!$)break e;if($===c.doubleQuote&&!le){v.state=v.stack.pop()||i.VALUE,v.textNode+=E.substring(G,L-1),v.position+=L-1-G;break}if($===c.backslash&&!le&&(le=true,v.textNode+=E.substring(G,L-1),v.position+=L-1-G,$=E.charCodeAt(L++),v.position++,!$))break;if(le){if(le=false,$===c.n?v.textNode+=`
`:$===c.r?v.textNode+="\r":$===c.t?v.textNode+=" ":$===c.f?v.textNode+="\f":$===c.b?v.textNode+="\b":$===c.u?(Q=1,v.unicodeS=""):v.textNode+=String.fromCharCode($),$=E.charCodeAt(L++),v.position++,G=L-1,$)continue;break}m.lastIndex=L;var ce=m.exec(E);if(ce===null){L=E.length+1,v.textNode+=E.substring(G,L-1),v.position+=L-1-G;break}if(L=ce.index+1,$=E.charCodeAt(ce.index),!$){v.textNode+=E.substring(G,L-1),v.position+=L-1-G;break}}v.slashed=le,v.unicodeI=Q;continue;case i.TRUE:$===c.r?v.state=i.TRUE2:N(v,"Invalid true started with t"+$);continue;case i.TRUE2:$===c.u?v.state=i.TRUE3:N(v,"Invalid true started with tr"+$);continue;case i.TRUE3:$===c.e?(k(v,"onvalue",true),v.state=v.stack.pop()||i.VALUE):N(v,"Invalid true started with tru"+$);continue;case i.FALSE:$===c.a?v.state=i.FALSE2:N(v,"Invalid false started with f"+$);continue;case i.FALSE2:$===c.l?v.state=i.FALSE3:N(v,"Invalid false started with fa"+$);continue;case i.FALSE3:$===c.s?v.state=i.FALSE4:N(v,"Invalid false started with fal"+$);continue;case i.FALSE4:$===c.e?(k(v,"onvalue",false),v.state=v.stack.pop()||i.VALUE):N(v,"Invalid false started with fals"+$);continue;case i.NULL:$===c.u?v.state=i.NULL2:N(v,"Invalid null started with n"+$);continue;case i.NULL2:$===c.l?v.state=i.NULL3:N(v,"Invalid null started with nu"+$);continue;case i.NULL3:$===c.l?(k(v,"onvalue",null),v.state=v.stack.pop()||i.VALUE):N(v,"Invalid null started with nul"+$);continue;case i.NUMBER_DECIMAL_POINT:$===c.period?(v.numberNode+=".",v.state=i.NUMBER_DIGIT):N(v,"Leading zero not followed by .");continue;case i.NUMBER_DIGIT:c._0<=$&&$<=c._9?v.numberNode+=String.fromCharCode($):$===c.period?(v.numberNode.indexOf(".")!==-1&&N(v,"Invalid number has two dots"),v.numberNode+="."):$===c.e||$===c.E?((v.numberNode.indexOf("e")!==-1||v.numberNode.indexOf("E")!==-1)&&N(v,"Invalid number has two exponential"),v.numberNode+="e"):$===c.plus||$===c.minus?(xe===c.e||xe===c.E||N(v,"Invalid symbol in number"),v.numberNode+=String.fromCharCode($)):(T(v),L--,v.state=v.stack.pop()||i.VALUE);continue;default:N(v,"Unknown state: "+v.state);}return v.position>=v.bufferCheckPosition&&h(v),v}})(t);});function qT(e){var t=0,n=VT(),r={pullAsync:function(o){return ga(this,void 0,void 0,function(){var a,i,s;return Xr(this,function(l){switch(l.label){case 0:return a=e.slice(t,t+o),t+=o,[4,Ob(a,"text")];case 1:return i=l.sent(),s=n.write(i),r.result=s||{},[2,s]}})})},pullSync:function(o){var a=e.slice(t,t+o);t+=o;var i=Lb(a,"text"),s=n.write(i);return r.result=s||{},s},done:function(){return n.done()},eof:function(){return t>=e.size},result:{}};return r}function VT(e){var t=HT.parser(),n=0,r,o=[],a,i,s=false,l=false;return t.onopenobject=function(c){var h={};h.incomplete=true,r||(r=h),a&&(o.push([i,a,l]),l?a.push(h):a[i]=h),a=h,i=c,l=false,++n;},t.onkey=function(c){return i=c},t.onvalue=function(c){return l?a.push(c):a[i]=c},t.oncloseobject=function(){var c;delete a.incomplete,i=null,--n===0?s=true:(c=o.pop(),i=c[0],a=c[1],l=c[2]);},t.onopenarray=function(){var c=[];c.incomplete=true,r||(r=c),a&&(o.push([i,a,l]),l?a.push(c):a[i]=c),a=c,l=true,i=null,++n;},t.onclosearray=function(){var c;delete a.incomplete,i=null,--n===0?s=true:(c=o.pop(),i=c[0],a=c[1],l=c[2]);},{write:function(c){return t.write(c),r},done:function(){return s}}}var Bb=1024;function zT(e,t){return ga(this,void 0,void 0,function(){var n,r,o,a;return Xr(this,function(i){switch(i.label){case 0:return t=t||{},n=t.chunkSizeBytes||Bb*1024,[4,Ub(e,n)];case 1:return r=i.sent(),o=r.result.data,a=new wn(t.name!==void 0?t.name:o.databaseName),a.version(o.databaseVersion).stores(OT(o)),[4,ph(a,r,t.name!==void 0?Rc(Rc({},t),{acceptNameDiff:true}):t)];case 2:return i.sent(),[2,a]}})})}function ph(e,t,n){return ga(this,void 0,void 0,function(){function r(){return ga(this,void 0,void 0,function(){var b,k,S,M,T;return Xr(this,function(P){switch(P.label){case 0:b=function(N){var I,O,U,E,v,L,$,xe,G,le,Q,ce,me;return Xr(this,function(pe){switch(pe.label){case 0:if(c.includes(N.tableName))return [2,"continue"];if(!N.rows)return [2,"break"];if(!N.rows.incomplete&&N.rows.length===0)return [2,"continue"];if(h&&wn.ignoreTransaction(function(){return h(u)}),I=N.tableName,O=e.table(I),U=l.tables.filter(function(we){return we.name===I})[0].schema,!O){if(n.acceptMissingTables)return [2,"continue"];throw new Error("Exported table ".concat(N.tableName," is missing in installed database"))}if(!n.acceptChangedPrimaryKey&&U.split(",")[0]!=O.schema.primKey.src)throw new Error("Primary key differs for table ".concat(N.tableName,". "));for(E=N.rows,v=[],L=0;L<E.length&&($=E[L],!$.incomplete);L++)v.push(Nr.revive($));return xe=n.filter,G=n.transform,le=xe?N.inbound?v.filter(function(we){return xe(I,we)}):v.filter(function(we){var z=we[0],ae=we[1];return xe(I,ae,z)}):v,G&&(le=le.map(N.inbound?function(we){return G(I,we).value}:function(we){var z=we[0],ae=we[1],Le=G(I,ae,z);return [Le.key,Le.value]})),Q=N.inbound?[void 0,le]:[le.map(function(we){return we[0]}),v.map(function(we){return we[1]})],ce=Q[0],me=Q[1],n.overwriteValues?[4,O.bulkPut(me,ce)]:[3,2];case 1:return pe.sent(),[3,4];case 2:return [4,O.bulkAdd(me,ce)];case 3:pe.sent(),pe.label=4;case 4:return u.completedRows+=v.length,v.incomplete||(u.completedTables+=1),E.splice(0,v.length),[2]}})},k=0,S=l.data,P.label=1;case 1:return k<S.length?(M=S[k],[5,b(M)]):[3,4];case 2:if(T=P.sent(),T==="break")return [3,4];P.label=3;case 3:return k++,[3,1];case 4:for(;l.data.length>0&&l.data[0].rows&&!l.data[0].rows.incomplete;)l.data.splice(0,1);return !a.done()&&!a.eof()?s?(a.pullSync(o),[3,7]):[3,5]:[3,8];case 5:return [4,wn.waitFor(a.pullAsync(o))];case 6:P.sent(),P.label=7;case 7:return [3,9];case 8:return [3,10];case 9:return [3,0];case 10:return [2]}})})}var o,a,i,s,l,c,h,u,m,g,y;return Xr(this,function(b){switch(b.label){case 0:return n=n||{},o=n.chunkSizeBytes||Bb*1024,[4,Ub(t,o)];case 1:if(a=b.sent(),i=a.result,s="FileReaderSync"in self,l=i.data,c=n.skipTables?n.skipTables:[],!n.acceptNameDiff&&e.name!==l.databaseName)throw new Error("Name differs. Current database name is ".concat(e.name," but export is ").concat(l.databaseName));if(!n.acceptVersionDiff&&e.verno!==l.databaseVersion)throw new Error("Database version differs. Current database is in version ".concat(e.verno," but export is ").concat(l.databaseVersion));if(h=n.progressCallback,u={done:false,completedRows:0,completedTables:0,totalRows:l.tables.reduce(function(k,S){return k+S.rowCount},0),totalTables:l.tables.length},h&&wn.ignoreTransaction(function(){return h(u)}),!n.clearTablesBeforeImport)return [3,5];m=0,g=e.tables,b.label=2;case 2:return m<g.length?(y=g[m],c.includes(y.name)?[3,4]:[4,y.clear()]):[3,5];case 3:b.sent(),b.label=4;case 4:return m++,[3,2];case 5:return n.noTransaction?[4,r()]:[3,7];case 6:return b.sent(),[3,9];case 7:return [4,e.transaction("rw",e.tables,r)];case 8:b.sent(),b.label=9;case 9:return u.done=true,h&&wn.ignoreTransaction(function(){return h(u)}),[2]}})})}function Ub(e,t){return ga(this,void 0,void 0,function(){var n,r;return Xr(this,function(o){switch(o.label){case 0:n="slice"in e?qT(e):e,o.label=1;case 1:return n.eof()?[3,3]:[4,n.pullAsync(t)];case 2:return o.sent(),n.result.data&&n.result.data.data?[3,3]:[3,1];case 3:if(r=n.result,!r||r.formatName!="dexie")throw new Error("Given file is not a dexie export");if(r.formatVersion>UT)throw new Error("Format version ".concat(r.formatVersion," not supported"));if(!r.data)throw new Error("No data in export file");if(!r.data.databaseName)throw new Error("Missing databaseName in export file");if(!r.data.databaseVersion)throw new Error("Missing databaseVersion in export file");if(!r.data.tables)throw new Error("Missing tables in export file");return [2,n]}})})}wn.prototype.export=function(e){return $b(this,e)};wn.prototype.import=function(e,t){return ph(this,e,t)};wn.import=function(e,t){return zT(e,t)};const KT=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function io(e,t){return e>>>t|e<<32-t}class jb{constructor(){be(this,"state",new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]));be(this,"block",new Uint8Array(64));be(this,"words",new Uint32Array(64));be(this,"blockLength",0);be(this,"bytesHashed",0);be(this,"finished",false);}update(t){if(this.finished)throw new Error("SHA-256 stream is already finalized");const n=typeof t=="string"?new TextEncoder().encode(t):t;this.bytesHashed+=n.byteLength;let r=0;for(;r<n.byteLength;){const o=Math.min(64-this.blockLength,n.byteLength-r);this.block.set(n.subarray(r,r+o),this.blockLength),this.blockLength+=o,r+=o,this.blockLength===64&&(this.transform(),this.blockLength=0);}return this}digestHex(){if(this.finished)throw new Error("SHA-256 stream is already finalized");this.finished=true;const t=this.bytesHashed*8;this.block[this.blockLength]=128,this.blockLength+=1,this.blockLength>56&&(this.block.fill(0,this.blockLength),this.transform(),this.blockLength=0),this.block.fill(0,this.blockLength,56);const n=Math.floor(t/4294967296),r=t>>>0;return this.block[56]=n>>>24,this.block[57]=n>>>16,this.block[58]=n>>>8,this.block[59]=n,this.block[60]=r>>>24,this.block[61]=r>>>16,this.block[62]=r>>>8,this.block[63]=r,this.transform(),Array.from(this.state,o=>o.toString(16).padStart(8,"0")).join("")}transform(){const t=this.words;for(let h=0;h<16;h+=1){const u=h*4;t[h]=(this.block[u]??0)<<24|(this.block[u+1]??0)<<16|(this.block[u+2]??0)<<8|(this.block[u+3]??0);}for(let h=16;h<64;h+=1){const u=t[h-15]??0,m=t[h-2]??0,g=io(u,7)^io(u,18)^u>>>3,y=io(m,17)^io(m,19)^m>>>10;t[h]=(t[h-16]??0)+g+(t[h-7]??0)+y>>>0;}let n=this.state[0]??0,r=this.state[1]??0,o=this.state[2]??0,a=this.state[3]??0,i=this.state[4]??0,s=this.state[5]??0,l=this.state[6]??0,c=this.state[7]??0;for(let h=0;h<64;h+=1){const u=io(i,6)^io(i,11)^io(i,25),m=i&s^~i&l,g=c+u+m+(KT[h]??0)+(t[h]??0)>>>0,y=io(n,2)^io(n,13)^io(n,22),b=n&r^n&o^r&o,k=y+b>>>0;c=l,l=s,s=i,i=a+g>>>0,a=o,o=r,r=n,n=g+k>>>0;}this.state[0]=(this.state[0]??0)+n>>>0,this.state[1]=(this.state[1]??0)+r>>>0,this.state[2]=(this.state[2]??0)+o>>>0,this.state[3]=(this.state[3]??0)+a>>>0,this.state[4]=(this.state[4]??0)+i>>>0,this.state[5]=(this.state[5]??0)+s>>>0,this.state[6]=(this.state[6]??0)+l>>>0,this.state[7]=(this.state[7]??0)+c>>>0;}}async function GT(e){Ae.info("Running migration_20250609: Migrating legacy user data format");let t=0;await e.table("users").toCollection().modify(r=>{r.core&&r.avatar||(Dl(r),Ae.debug(`Migrated user: ${r.rest_id}`),r.twe_private_fields.migrated_at=Date.now(),t++);});let n=0;await e.table("tweets").toCollection().modify(r=>{var s,l,c,h,u,m;const o=(l=(s=r.core)==null?void 0:s.user_results)==null?void 0:l.result;if(o&&o.core&&o.avatar)return;Dl(o),Ae.debug(`Migrated tweet user: ${r.rest_id} `);const a=zi(r);(h=(c=a==null?void 0:a.core)==null?void 0:c.user_results)!=null&&h.result&&(Dl(a.core.user_results.result),Ae.debug(`Migrated retweeted user: ${a.rest_id}`));const i=Wc(r);(m=(u=i==null?void 0:i.core)==null?void 0:u.user_results)!=null&&m.result&&(Dl(i.core.user_results.result),Ae.debug(`Migrated quoted user: ${i.rest_id}`)),r.twe_private_fields.migrated_at=Date.now(),n++;}),Ae.info(`Migration completed: ${t} users and ${n} tweets updated.`);}function Dl(e){const t=e;if(!(t!=null&&t.legacy)){Ae.debug("migrateFromLegacyUser",e),Ae.warn(`User ${e==null?void 0:e.rest_id} has no legacy data to migrate.`);return}e.core??(e.core={created_at:t.legacy.created_at,name:t.legacy.name,screen_name:t.legacy.screen_name}),e.avatar??(e.avatar={image_url:t.legacy.profile_image_url_https}),e.verification??(e.verification={verified:t.legacy.verified,verified_type:t.legacy.verified_type}),e.relationship_perspectives??(e.relationship_perspectives={following:t.legacy.following,followed_by:t.legacy.followed_by}),e.dm_permissions??(e.dm_permissions={can_dm:t.legacy.can_dm}),e.privacy??(e.privacy={protected:t.legacy.protected}),e.location??(e.location={location:t.legacy.location});}function WT(e){const t=Array.from(new Set(e.map(a=>a.relation_type))).sort(),n=Array.from(new Set(e.map(a=>a.subject_user_id))).sort(),r=Array.from(new Set(e.map(a=>String(a.subject_screen_name||"").trim()).filter(Boolean))).sort(),o=Math.max(...e.map(a=>Number(a.observed_at)||0),0);return {relation_types:t,subject_user_ids:n,subject_screen_names:r,last_observed_at:o,edge_count:e.length}}function YT(e,t){if(!e.length||!t.length)return e;const n=new Map;for(const r of t){const o=String(r.related_user_id||"").trim();if(!o)continue;const a=n.get(o);a?a.push(r):n.set(o,[r]);}return e.map(r=>{const o=n.get(String(r.rest_id||"").trim());return o!=null&&o.length?{...r,twe_relationship_fields:WT(o)}:r})}const rd="__twe_perf_events_v1",km="__twe_perf_summary_v1",JT="twe:perf-event-v1",xm=1e3;let Sm=false;function Hb(){return globalThis}function XT(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`perf-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function qb(){const e=Hb();return Array.isArray(e[rd])||(e[rd]=[]),e[rd]}function eu(){const e=Hb(),t=e[km];if(!t||typeof t!="object"){const r={buckets:{},counters:{},workers:{}};return e[km]=r,r}const n=t;return n.buckets||(n.buckets={}),n.counters||(n.counters={}),n.workers||(n.workers={}),n}function ZT(e,t){return `${e}:${t}`}function Cm(e,t){var o;if(!e.length)return 0;const n=[...e].sort((a,i)=>a-i),r=Math.min(n.length-1,Math.max(0,Math.ceil(n.length*t)-1));return Number(((o=n[r])==null?void 0:o.toFixed(2))||0)}function QT(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e))if(r!==void 0){if(typeof r=="string"){t[n]=r.length>160?`${r.slice(0,160)}...`:r;continue}t[n]=r;}return t}function He(e){const t={schema:"twe.perf.event.v1",id:XT(),name:e.name,kind:e.kind,atMs:Date.now(),durationMs:Number.isFinite(e.durationMs)?Number(e.durationMs):void 0,value:Number.isFinite(e.value)?Number(e.value):void 0,tags:QT(e.tags)},n=qb();n.push(t),n.length>xm&&n.splice(0,n.length-xm);const r=eu();if(r.counters[`${t.kind}:${t.name}:count`]=(r.counters[`${t.kind}:${t.name}:count`]||0)+1,typeof t.value=="number"&&(r.counters[`${t.kind}:${t.name}:value`]=t.value),typeof t.durationMs=="number"){const o=ZT(t.kind,t.name),a=r.buckets[o]||{count:0,totalMs:0,maxMs:0,values:[]};a.count+=1,a.totalMs+=t.durationMs,a.maxMs=Math.max(a.maxMs,t.durationMs),a.values.push(t.durationMs),a.values.length>300&&a.values.splice(0,a.values.length-300),r.buckets[o]=a;}if(typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(JT,{detail:t}));}catch{}return t}function na(e,t=1){const n=eu();n.counters[e]=(n.counters[e]||0)+t;}function Ai(e,t){const n=eu();e==="search"?n.workers.searchWorkerAvailable=t:n.workers.exportWorkerAvailable=t,He({kind:"worker",name:`${e}-availability`,value:t?1:0});}function eM(){const e=[...qb()],t=eu(),n={};for(const[r,o]of Object.entries(t.buckets))n[r]={count:o.count,p50Ms:Cm(o.values,.5),p95Ms:Cm(o.values,.95),maxMs:Number(o.maxMs.toFixed(2)),avgMs:o.count?Number((o.totalMs/o.count).toFixed(2)):0};return {schema:"twe.perf.diagnostics.v1",generatedAtMs:Date.now(),eventsBuffered:e.length,buckets:n,counters:{...t.counters},workers:{...t.workers},recent:e.slice(-100)}}function Ge(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function tM(){if(!Sm){Sm=true;try{const e=globalThis.PerformanceObserver;if(!e)return;const t=e.supportedEntryTypes;if(Array.isArray(t)&&!t.includes("longtask"))return;new e(r=>{for(const o of r.getEntries())He({kind:"longtask",name:"main-thread-longtask",durationMs:o.duration,tags:{entryType:o.entryType}});}).observe({entryTypes:["longtask"]});}catch{}}}const Vb="__twe_db_mutation_v1",nM="twe-db-mutation-v1",zb=Oo(0),Tm=new Map;let Mm=false,As=null;function Kb(e){let t=Tm.get(e);return t||(t=Oo(0),Tm.set(e,t)),t}function Gb(e){if(e){Kb(e).value+=1;return}zb.value+=1;}function rM(e){if(!e||typeof e!="object")return null;const t=e;return {extension:typeof t.extension=="string"?t.extension:void 0,operation:typeof t.operation=="string"?t.operation:void 0}}function Im(e){const t=rM(e);t&&Gb(t==null?void 0:t.extension);}function Wb(){if(!(Mm||typeof window>"u")&&(Mm=true,window.addEventListener("storage",e=>{if(!(e.key!==Vb||!e.newValue))try{const t=JSON.parse(e.newValue);Im(t);}catch{}}),typeof BroadcastChannel<"u"))try{As=new BroadcastChannel(nM),As.onmessage=e=>{Im(e.data);};}catch{As=null;}}function Pn(e={}){Wb();const t={extension:e.extension,operation:e.operation,at:Date.now(),nonce:Math.random().toString(36).slice(2)};if(Gb(t.extension),As)try{As.postMessage(t);}catch{}try{typeof localStorage<"u"&&localStorage.setItem(Vb,JSON.stringify(t));}catch{}Ox({ts:t.at||Date.now(),extension:e.extension,operation:e.operation,count:typeof e.count=="number"?e.count:void 0,keys:Array.isArray(e.keys)?e.keys.slice(0,20):void 0});}function Lo(e){Wb();const t=zb.value;return e?t+Kb(e).value:t}const Rm="twitter-web-exporter",oM=10,Pl="__twe_capture_counts_v1",Ol="__twe_capture_counts_v2",od="__twe_active_db_name_v1",fi="__twe_capture_index_revisions_v1",hi="__twe_folder_source_index_revisions_v1",Em="twe:capture-count-updated-v1",aM="twe_article_markdown_backfill_v1",pi=500,dr=256,La=256,iM=1e3,sM=1500,Jo=0,so=Number.MAX_SAFE_INTEGER,Xo="",Zo="",lM=["__bookmark_folder_id","__bookmark_folder_name","__bookmark_folder_name_source","__bookmark_folder_url"];function Ll(e,t){if(e.length<=t)return [e];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function yn(e,t){let n=e;for(const r of t.split(".")){if(!n||typeof n!="object")return;n=n[r];}return n}function Xn(e){return typeof e=="string"?e.trim():typeof e=="number"&&Number.isFinite(e)?String(e):""}function Am(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function mi(e){return e===mt.USER?"user":e===mt.TWEET?"tweet":""}function Dm(e){if(e)return {createdAt:Number(e.created_at)||0,captureId:e.id}}function Qo(e){if(e)return {observedAtMs:Number(e.observed_at_ms||e.created_at_ms||e.updated_at_ms)||0,documentId:e.id}}function cM(e){return e.folder_id&&e.folder_name?"api-name":e.folder_id?"id-only":"none"}function Nl(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return Math.abs(t).toString(36)}function gi(e){return [...new Set(e.map(t=>t.trim()).filter(Boolean))].join(" ")}function Pm(e,t){var c;if(!e||typeof e!="object")return t;const n={...t},r=e,o=e;n.twe_private_fields={...Am(r.twe_private_fields)?r.twe_private_fields:{},...Am(t.twe_private_fields)?t.twe_private_fields:{}};const a=ha(o),i=ha(t),s=!!o.article,l=!!t.article;s&&(!l||a.length>i.length)&&(n.article=o.article,(c=o.twe_private_fields)!=null&&c.article_markdown&&(n.twe_private_fields.article_markdown=o.twe_private_fields.article_markdown,n.twe_private_fields.article_markdown_version=o.twe_private_fields.article_markdown_version));for(const h of lM){const u=r[h],m=t[h];if(m===void 0&&u!==void 0){n[h]=u;continue}if(m===null&&u!==void 0&&u!==null){n[h]=u;continue}if(h==="__bookmark_folder_name_source"){const g=String(m||""),y=String(u||"");g==="id-only"&&y==="api"&&(n[h]=y);}}return n}class tu{constructor(t={}){be(this,"db");be(this,"ready");be(this,"writeQueue",Promise.resolve());be(this,"captureIndexBuilds",new Map);be(this,"captureIndexRevisionFallback",new Map);var o,a;let n="unknown";try{n=((o=Cb().__META_DATA__)==null?void 0:o.userId)??"unknown";}catch{n="unknown";}const r=et.get("dedicatedDbForAccounts")?`_${n}`:"";Ae.debug(`Using database: ${Rm}${r} for userId: ${n}`),this.db=new wn(((a=t.databaseName)==null?void 0:a.trim())||`${Rm}${r}`),t.publishActiveName!==false&&this.publishActiveDatabaseName(),this.ready=this.init();}async whenReady(){await this.ready;}enqueueWrite(t,n){const r=this.writeQueue.then(n,n);return this.writeQueue=r.then(()=>{},()=>{}),r.catch(o=>{throw this.logError(o,t),o})}tweets(){return this.db.table("tweets")}users(){return this.db.table("users")}captures(){return this.db.table("captures")}captureIndexPages(){return this.db.table("capture_index_pages")}folderSourceIndexPages(){return this.db.table("folder_source_index_pages")}socialEdges(){return this.db.table("social_edges")}importedBundles(){return this.db.table("imported_bundles")}importedBundleCollections(){return this.db.table("imported_bundle_collections")}importedBundleItems(){return this.db.table("imported_bundle_items")}importedEntitySnapshots(){return this.db.table("imported_entity_snapshots")}importedBundleImportReports(){return this.db.table("imported_bundle_import_reports")}searchDocuments(){return this.db.table("search_documents")}normalizeFolderSourceIds(t){return [...new Set(t.map(n=>String(n||"").trim()).filter(Boolean))].sort()}folderSourceIndexRevisionId(t){return [this.db.name,t].join("|")}folderSourceHash(t){return Nl(t)}folderSourceIndexPageId(t){return [this.folderSourceHash(t.sourceKey),Math.max(0,Math.floor(t.sourceCount)),Math.max(0,Math.floor(t.sourceRevision)),Math.max(0,Math.floor(t.pageStart))].join("|")}readFolderSourceIndexRevisionMap(){const t=r=>{if(!r||typeof r!="object")return null;const o=r[hi];if(!o||typeof o!="object")return null;const a={};for(const[i,s]of Object.entries(o)){const l=Number(s);Number.isFinite(l)&&l>=0&&(a[i]=Math.floor(l));}return a};let n={};try{n={...n,...t(globalThis)??{}};}catch{}try{typeof window<"u"&&(n={...n,...t(window)??{}});}catch{}try{if(typeof localStorage<"u"){const r=localStorage.getItem(hi);r&&(n={...n,...t({[hi]:JSON.parse(r)})??{}});}}catch{}return n}writeFolderSourceIndexRevisionMap(t){try{const n={};for(const[r,o]of Object.entries(t)){const a=Number(o);Number.isFinite(a)&&a>=0&&(n[r]=Math.floor(a));}globalThis[hi]=n,typeof window<"u"&&(window[hi]=n),typeof localStorage<"u"&&localStorage.setItem(hi,JSON.stringify(n));}catch{}}bumpFolderSourceIndexRevision(t){const n=this.folderSourceIndexRevisionId(t),r=this.readFolderSourceIndexRevisionMap(),o=Math.max(0,Math.floor(Number(r[n])||0))+1;return r[n]=o,this.writeFolderSourceIndexRevisionMap(r),o}readFolderSourceIndexRevision(t){const n=this.folderSourceIndexRevisionId(t),r=this.readFolderSourceIndexRevisionMap();return Math.max(0,Math.floor(Number(r[n])||0))}async deleteFolderSourceIndexPages(t){if(!t){await this.folderSourceIndexPages().clear().catch(n=>this.logError(n,"deleteFolderSourceIndexPages:clear"));return}await this.folderSourceIndexPages().where("extension_name").equals(t).delete().catch(n=>this.logError(n,"deleteFolderSourceIndexPages:extension"));}async invalidateFolderSourceIndexPages(t){if(t){this.bumpFolderSourceIndexRevision(t),await this.deleteFolderSourceIndexPages(t);return}const n=this.readFolderSourceIndexRevisionMap(),r=`${this.db.name}|`;for(const o of Object.keys(n).filter(a=>a.startsWith(r)))n[o]=Math.max(0,Math.floor(Number(n[o])||0))+1;this.writeFolderSourceIndexRevisionMap(n),await this.deleteFolderSourceIndexPages();}searchDocumentExtensionNames(t){return [...new Set(t.map(n=>String(n.extension_name||"").trim()).filter(Boolean))]}async invalidateFolderSourceIndexPagesForExtensions(t){const n=[...new Set(t.map(r=>r.trim()).filter(Boolean))];if(n.length)for(const r of n)await this.invalidateFolderSourceIndexPages(r);}async extPutFolderSourceIndexPages(t){const n=this.normalizeFolderSourceIds(t.folderIds),r=n.join(`
`),o=Math.max(0,Math.floor(Number(t.sourceCount)||0)),a=Math.max(0,Math.floor(Number(t.sourceRevision)||0)),i=Date.now(),s=t.pages.map(l=>{const c=Math.max(0,Math.floor(Number(l.pageStart)||0));return {id:this.folderSourceIndexPageId({sourceKey:t.sourceKey,sourceCount:o,sourceRevision:a,pageStart:c}),source_hash:this.folderSourceHash(t.sourceKey),source_key:t.sourceKey,extension_name:t.extensionName,entity_type:t.entityType,folder_ids_key:r,source_count:o,source_revision:a,page_start:c,page_size:La,row_ids:this.normalizeDataKeys(l.rowIds),cursor_after:l.cursorAfter,built_at_ms:i}});await this.enqueueWrite("extPutFolderSourceIndexPages",async()=>{await this.db.transaction("rw",this.folderSourceIndexPages(),async()=>{await this.folderSourceIndexPages().where("source_hash").equals(this.folderSourceHash(t.sourceKey)).filter(l=>l.source_key===t.sourceKey).delete(),s.length&&await this.bulkPutInChunks(this.folderSourceIndexPages(),s);});}),He({kind:"db",name:"folder-source-index-pages-put",value:s.length,tags:{extName:t.extensionName,entityType:t.entityType,folderCount:n.length,sourceCount:o,sourceRevision:a}});}async extGetFolderSourceIndexedPage(t){var T;const n=Ge(),r=Math.max(0,Math.floor(Number(t.sourceCount)||0));if(!r)return null;const o=Math.max(0,Math.floor(Number(t.offset)||0)),a=Math.max(1,Math.min(1e3,Number(t.limit)||100)),i=this.readFolderSourceIndexRevision(t.extensionName),s=Math.floor(o/La)*La,l=Math.max(o,o+a-1),c=Math.floor(l/La)*La,h=[];for(let P=s;P<=c;P+=La)h.push(P);const u=h.map(P=>this.folderSourceIndexPageId({sourceKey:t.sourceKey,sourceCount:r,sourceRevision:i,pageStart:P})),m=await this.folderSourceIndexPages().bulkGet(u).catch(this.logError);if(!m||m.some(P=>!P))return He({kind:"db",name:"folder-source-index-page-miss",durationMs:Ge()-n,value:0,tags:{extName:t.extensionName,entityType:t.entityType,offset:o,limit:a,sourceCount:r,sourceRevision:i}}),null;const g=this.normalizeFolderSourceIds(t.folderIds).join(`
`),y=m;if(y.some(P=>P.source_key!==t.sourceKey||P.extension_name!==t.extensionName||P.entity_type!==t.entityType||P.folder_ids_key!==g||P.source_count!==r||P.source_revision!==i||P.page_size!==La))return He({kind:"db",name:"folder-source-index-page-stale",durationMs:Ge()-n,value:0,tags:{extName:t.extensionName,entityType:t.entityType,offset:o,limit:a,sourceCount:r,sourceRevision:i}}),null;const b=y.sort((P,N)=>P.page_start-N.page_start),k=b.flatMap(P=>P.row_ids),S=o-s,M=k.slice(S,S+a);return He({kind:"db",name:"folder-source-index-page",durationMs:Ge()-n,value:M.length,tags:{extName:t.extensionName,entityType:t.entityType,folderCount:t.folderIds.length,offset:o,limit:a,sourceCount:r,sourceRevision:i,pages:u.length}}),{rowIds:M,cursorAfter:S+M.length===k.length?(T=b[b.length-1])==null?void 0:T.cursor_after:void 0}}async extGetCaptures(t){return this.captures().where("extension").equals(t).toArray().catch(this.logError)}async extGetCaptureCount(t,n){const r=Ge(),o=await(n?this.captures().where("[extension+type]").equals([t,n]).count().catch(this.logError):this.captures().where("extension").equals(t).count().catch(this.logError))??0;return He({kind:"db",name:"capture-count",durationMs:Ge()-r,value:o,tags:{extName:t,type:n}}),o}async extGetCaptureDataKeys(t){const n=await this.extGetCaptures(t);return n?this.normalizeDataKeys(n.map(r=>r.data_key)):[]}async extGetCapturePage(t,n={}){const r=Ge(),o=Math.max(0,Number(n.offset)||0),a=Math.max(1,Math.min(1e3,Number(n.limit)||100));let i=n.type?this.captures().where("[extension+type+created_at]").between([t,n.type,wn.minKey],[t,n.type,wn.maxKey]):this.captures().where("extension").equals(t);n.order!=="oldest"&&(i=i.reverse());let s=await i.offset(o).limit(a).toArray().catch(this.logError);s||(s=[]),n.type&&!s.every(c=>c.type===n.type)&&(s=s.filter(c=>c.type===n.type));const l=s.slice(0,a);return He({kind:"db",name:"capture-page",durationMs:Ge()-r,value:l.length,tags:{extName:t,type:n.type,offset:o,limit:a}}),l}async extGetCaptureIdsPage(t,n={}){const r=await this.extGetCapturePage(t,n);return this.normalizeDataKeys(r.map(o=>o.data_key))}captureIndexPageId(t){return [t.extName,t.type,t.order,Math.max(0,Math.floor(t.sourceCount)),Math.max(0,Math.floor(t.pageStart))].join("|")}captureIndexRevisionId(t,n){return [this.db.name,t,n].join("|")}readCaptureIndexRevisionMap(){const t=r=>{if(!r||typeof r!="object")return null;const o=r[fi];if(!o||typeof o!="object")return null;const a={};for(const[i,s]of Object.entries(o)){const l=Number(s);Number.isFinite(l)&&l>=0&&(a[i]=Math.floor(l));}return a};let n={};try{n={...n,...t(globalThis)??{}};}catch{}try{typeof window<"u"&&(n={...n,...t(window)??{}});}catch{}try{if(typeof localStorage<"u"){const r=localStorage.getItem(fi);r&&(n={...n,...t({[fi]:JSON.parse(r)})??{}});}}catch{}for(const[r,o]of this.captureIndexRevisionFallback)n[r]=Math.max(Number(n[r])||0,o);return n}writeCaptureIndexRevisionMap(t){try{const n={};for(const[r,o]of Object.entries(t)){const a=Number(o);Number.isFinite(a)&&a>=0&&(n[r]=Math.floor(a),this.captureIndexRevisionFallback.set(r,Math.floor(a)));}globalThis[fi]=n,typeof window<"u"&&(window[fi]=n),typeof localStorage<"u"&&localStorage.setItem(fi,JSON.stringify(n));}catch{}}readCaptureIndexRevision(t,n){const r=this.captureIndexRevisionId(t,n),o=this.readCaptureIndexRevisionMap(),a=Math.max(0,Math.floor(Number(o[r])||0));return this.captureIndexRevisionFallback.has(r)||this.captureIndexRevisionFallback.set(r,a),a}bumpCaptureIndexRevision(t,n){const r=this.captureIndexRevisionId(t,n),o=this.readCaptureIndexRevisionMap(),a=Math.max(0,Math.floor(Number(o[r])||0))+1;return o[r]=a,this.writeCaptureIndexRevisionMap(o),a}bumpAllCaptureIndexRevisions(){const t=this.readCaptureIndexRevisionMap(),n=`${this.db.name}|`;for(const r of new Set([...Object.keys(t).filter(o=>o.startsWith(n)),...[...this.captureIndexRevisionFallback.keys()].filter(o=>o.startsWith(n))]))t[r]=Math.max(0,Math.floor(Number(t[r])||0))+1;this.writeCaptureIndexRevisionMap(t);}async deleteCaptureIndexPagesForScope(t,n,r){await this.captureIndexPages().where("extension").equals(t).filter(o=>!(n&&o.type!==n||r&&o.order!==r)).delete().catch(o=>this.logError(o,"deleteCaptureIndexPagesForScope"));}async invalidateCaptureIndexPages(t,n,r={}){if(!t)return;const o=r.deletePages??true;if(n){this.bumpCaptureIndexRevision(t,n),o&&await this.deleteCaptureIndexPagesForScope(t,n);return}const a=await this.captureIndexPages().where("extension").equals(t).toArray().catch(this.logError)??[],i=new Set(a.map(s=>String(s.type||"")).filter(Boolean));if(!i.size){const s=`${this.db.name}|${t}|`;for(const l of Object.keys(this.readCaptureIndexRevisionMap()))if(l.startsWith(s)){const c=l.slice(s.length);c&&i.add(c);}}for(const s of i)this.bumpCaptureIndexRevision(t,s);o&&await this.deleteCaptureIndexPagesForScope(t);}async invalidateCaptureIndexPagesForRows(t){const n=new Map;for(const r of t){const o=String((r==null?void 0:r.extension)||"").trim(),a=String((r==null?void 0:r.type)||"").trim();if(!o||!a)continue;const i=n.get(o)??new Set;i.add(a),n.set(o,i);}for(const[r,o]of n)for(const a of o)await this.invalidateCaptureIndexPages(r,a);}async extPutCaptureIndexPagesFromOrderedCaptures(t,n,r,o,a="newest"){if(!r.length)return;const i=Math.max(0,Math.floor(Number(o)||0)),s=Ge(),l=Date.now(),c=this.readCaptureIndexRevision(t,n),h=[];for(let u=0;u<r.length;u+=dr){const m=r.slice(u,u+dr);h.push({id:this.captureIndexPageId({extName:t,type:n,order:a,sourceCount:i,pageStart:u}),extension:t,type:n,order:a,source_count:i,source_revision:c,page_start:u,page_size:dr,data_keys:this.normalizeDataKeys(m.map(g=>g.data_key)),built_at_ms:l});}await this.enqueueWrite("extPutCaptureIndexPagesFromOrderedCaptures",async()=>{await this.db.transaction("rw",this.captureIndexPages(),async()=>{await this.deleteCaptureIndexPagesForScope(t,n,a),await this.bulkPutInChunks(this.captureIndexPages(),h);});}),He({kind:"db",name:"capture-index-pages-put",durationMs:Ge()-s,value:h.length,tags:{extName:t,type:n,order:a,sourceCount:i,sourceRevision:c}});}scheduleCaptureIndexPageBuild(t,n){const r=Math.max(0,Math.floor(Number(n.sourceCount)||0));if(r<iM)return;const o=n.order??"newest",a=[this.db.name,t,n.type,o,r].join("|");if(this.captureIndexBuilds.has(a))return;const i=new Promise((s,l)=>{globalThis.setTimeout(()=>{this.extBuildCaptureIndexPages(t,{type:n.type,order:o,sourceCount:r}).then(s,l);},sM);}).finally(()=>{this.captureIndexBuilds.delete(a);});this.captureIndexBuilds.set(a,i),i.catch(s=>{this.logError(s,"scheduleCaptureIndexPageBuild");});}async extBuildCaptureIndexPages(t,n){const r=Ge(),o=n.order??"newest",a=typeof n.sourceCount=="number"&&Number.isFinite(n.sourceCount)?Math.max(0,Math.floor(n.sourceCount)):Math.max(0,Math.floor(Number(await this.extGetCaptureCount(t,n.type))||0));if(!a)return false;const i=this.readCaptureIndexRevision(t,n.type),s=Date.now(),l=[];let c=0,h,u=[];for(;;){const y=await this.extGetCaptureCursorPage(t,{type:n.type,after:h,limit:1e3,order:o});for(u.push(...this.normalizeDataKeys(y.captures.map(b=>b.data_key)));u.length>=dr;){const b=u.slice(0,dr);u=u.slice(dr),l.push({id:this.captureIndexPageId({extName:t,type:n.type,order:o,sourceCount:a,pageStart:c}),extension:t,type:n.type,order:o,source_count:a,source_revision:i,page_start:c,page_size:dr,data_keys:b,built_at_ms:s}),c+=dr;}if(!y.hasAfter||!y.cursorAfter||!y.captures.length)break;h=y.cursorAfter;}u.length&&l.push({id:this.captureIndexPageId({extName:t,type:n.type,order:o,sourceCount:a,pageStart:c}),extension:t,type:n.type,order:o,source_count:a,source_revision:i,page_start:c,page_size:dr,data_keys:u,built_at_ms:s});const m=Math.max(0,Math.floor(Number(await this.extGetCaptureCount(t,n.type))||0)),g=this.readCaptureIndexRevision(t,n.type);return m!==a||g!==i?(He({kind:"db",name:"capture-index-build-stale",durationMs:Ge()-r,value:l.length,tags:{extName:t,type:n.type,order:o,expectedCount:a,currentCount:m,sourceRevision:i,currentRevision:g}}),false):(await this.enqueueWrite("extBuildCaptureIndexPages",async()=>{this.readCaptureIndexRevision(t,n.type)===i&&await this.db.transaction("rw",this.captureIndexPages(),async()=>{await this.deleteCaptureIndexPagesForScope(t,n.type,o),await this.bulkPutInChunks(this.captureIndexPages(),l);});}),He({kind:"db",name:"capture-index-build",durationMs:Ge()-r,value:l.length,tags:{extName:t,type:n.type,order:o,sourceCount:a,sourceRevision:i}}),true)}async extGetCaptureIdsIndexedPage(t,n){const r=Ge(),o=Math.max(0,Math.floor(Number(n.sourceCount)||0));if(!o)return null;const a=Math.max(0,Math.floor(Number(n.offset)||0)),i=Math.max(1,Math.min(1e3,Number(n.limit)||100)),s=n.order??"newest",l=Math.floor(a/dr)*dr,c=Math.max(a,a+i-1),h=Math.floor(c/dr)*dr,u=[];for(let T=l;T<=h;T+=dr)u.push(T);const m=u.map(T=>this.captureIndexPageId({extName:t,type:n.type,order:s,sourceCount:o,pageStart:T})),g=await this.captureIndexPages().bulkGet(m).catch(this.logError);if(!g||g.some(T=>!T))return this.scheduleCaptureIndexPageBuild(t,{type:n.type,order:s,sourceCount:o}),He({kind:"db",name:"capture-index-page-miss",durationMs:Ge()-r,value:0,tags:{extName:t,type:n.type,offset:a,limit:i,order:s,sourceCount:o}}),null;const y=this.readCaptureIndexRevision(t,n.type),b=g;if(b.some(T=>T.source_revision!==y||T.source_count!==o||T.page_size!==dr))return this.scheduleCaptureIndexPageBuild(t,{type:n.type,order:s,sourceCount:o}),He({kind:"db",name:"capture-index-page-stale",durationMs:Ge()-r,value:0,tags:{extName:t,type:n.type,offset:a,limit:i,order:s,sourceCount:o,sourceRevision:y}}),null;const k=b.sort((T,P)=>T.page_start-P.page_start).flatMap(T=>T.data_keys),S=a-l,M=k.slice(S,S+i);return He({kind:"db",name:"capture-index-page",durationMs:Ge()-r,value:M.length,tags:{extName:t,type:n.type,offset:a,limit:i,order:s,sourceCount:o,sourceRevision:y,pages:m.length}}),M}async extGetCaptureCursorPage(t,n){const r=Ge(),o=Math.max(1,Math.min(1e3,Number(n.limit)||100)),a=n.order??"newest",i=[t,n.type,Jo,Xo],s=[t,n.type,so,Zo];let l=i,c=s,h=true,u=true;const m=n.after??n.before;if(m){const M=[t,n.type,m.createdAt,m.captureId];n.before?a==="newest"?(l=M,h=false):(c=M,u=false):a==="newest"?(c=M,u=false):(l=M,h=false);}let g=this.captures().where("[extension+type+created_at+id]").between(l,c,h,u);a==="newest"&&(g=g.reverse());const y=await g.limit(o+1).toArray().catch(this.logError)??[],b=y.slice(0,o),k=y.length>o,S={captures:b,cursorBefore:Dm(b[0]),cursorAfter:Dm(b[b.length-1]),hasBefore:!!(n.after||n.before),hasAfter:k};return He({kind:"db",name:"capture-cursor-page",durationMs:Ge()-r,value:b.length,tags:{extName:t,type:n.type,limit:o,order:a,hasAfter:S.hasAfter,cursorCreatedAt:m==null?void 0:m.createdAt}}),S}async extGetCaptureIdsCursorPage(t,n){const r=await this.extGetCaptureCursorPage(t,n);return {...r,ids:this.normalizeDataKeys(r.captures.map(o=>o.data_key))}}async extGetTweetsByIds(t){const n=Ge(),r=this.normalizeDataKeys(t);return r.length?this.tweets().bulkGet(r).then(o=>{const a=o.filter(i=>!!i&&this.filterEmptyData(i));return He({kind:"db",name:"tweets-by-ids",durationMs:Ge()-n,value:a.length,tags:{requested:r.length}}),a}).catch(this.logError):[]}async extGetUsersByIds(t){const n=Ge(),r=this.normalizeDataKeys(t);return r.length?this.users().bulkGet(r).then(o=>{const a=o.filter(i=>!!i&&this.filterEmptyData(i));return He({kind:"db",name:"users-by-ids",durationMs:Ge()-n,value:a.length,tags:{requested:r.length}}),a}).catch(this.logError):[]}async extGetCapturedTweets(t,n){const r=n??await this.extGetCaptures(t);return r?this.extGetTweetsByIds(r.map(o=>o.data_key)):[]}async extGetCapturedUsers(t,n){const r=n??await this.extGetCaptures(t);if(!r)return [];const o=await this.extGetUsersByIds(r.map(a=>a.data_key))??[];return this.enrichUsersWithRelationshipContext(t,o)}async extGetSocialEdges(t){return this.socialEdges().where("extension").equals(t).toArray().catch(this.logError)}async extGetSearchDocuments(t,n){const r=Ge(),o=mi(n),i=(n&&o?await this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]).toArray().catch(this.logError):await this.searchDocuments().where("extension_name").equals(t).toArray().catch(this.logError))??[];return He({kind:"db",name:"search-documents",durationMs:Ge()-r,value:i.length,tags:{extName:t,type:n}}),i}async extGetSearchDocumentPage(t,n={}){const r=Ge(),o=n.entityType??mi(n.type),a=Math.max(0,Math.floor(Number(n.offset)||0)),i=Math.max(1,Math.min(5e3,Number(n.limit)||1e3)),l=await(o?this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]):this.searchDocuments().where("extension_name").equals(t)).offset(a).limit(i+1).toArray().catch(this.logError)??[],c=l.slice(0,i),h={documents:c,cursorBefore:Qo(c[0]),cursorAfter:Qo(c[c.length-1]),hasBefore:a>0,hasAfter:l.length>i};return He({kind:"db",name:"search-document-page",durationMs:Ge()-r,value:c.length,tags:{extName:t,type:n.type,entityType:o,offset:a,limit:i,hasAfter:h.hasAfter}}),h}async extGetSearchDocumentCount(t,n={}){const r=Ge(),o=n.entityType??mi(n.type),a=String(n.folderId||"").trim(),i=String(n.sourceKey||"").trim();let s=0;return o&&a&&!i?s=await this.searchDocuments().where("[extension_name+entity_type+folder_id+observed_at_ms+id]").between([t,o,a,Jo,Xo],[t,o,a,so,Zo],true,true).count().catch(this.logError)??0:i&&o?s=await this.searchDocuments().where("[source_key+entity_type]").equals([i,o]).filter(l=>!a||l.folder_id===a).count().catch(this.logError)??0:o?s=await this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]).filter(l=>!a||l.folder_id===a).count().catch(this.logError)??0:s=await this.searchDocuments().where("extension_name").equals(t).filter(l=>!a||l.folder_id===a).count().catch(this.logError)??0,He({kind:"db",name:"search-document-count",durationMs:Ge()-r,value:s,tags:{extName:t,type:n.type,entityType:o,folderId:a,sourceKey:i}}),s}async extGetSearchDocumentFolderFacets(t,n={}){const r=Ge(),o=n.entityType??mi(n.type),a={"api-name":0,"id-only":0,none:0},i=new Map;let s=0;await(o?this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]):this.searchDocuments().where("extension_name").equals(t)).each(h=>{s+=1;const u=cM(h);a[u]+=1;const m=String(h.folder_id||"").trim();if(!m)return;const g=String(h.folder_name||"").trim(),y=i.get(m);if(y){y.count+=1,g&&y.status!=="api-name"&&(y.label=g,y.status="api-name");return}i.set(m,{folderId:m,label:g||`Folder ${m}`,count:1,status:u});}).catch(this.logError);const c=[...i.values()].sort((h,u)=>u.count!==h.count?u.count-h.count:h.label.localeCompare(u.label));return He({kind:"db",name:"search-document-folder-facets",durationMs:Ge()-r,value:c.length,tags:{extName:t,type:n.type,entityType:o,totalDocuments:s}}),{totalDocuments:s,statusCounts:a,facets:c}}async extGetSearchDocumentFolderCursorPage(t,n){const r=Ge(),o=n.entityType??mi(n.type),a=String(n.folderId||"").trim(),i=Math.max(1,Math.min(1e3,Number(n.limit)||100)),s=n.order??"newest";if(!o||!a)return {documents:[],hasBefore:false,hasAfter:false};const l=[t,o,a,Jo,Xo],c=[t,o,a,so,Zo];let h=l,u=c,m=true,g=true;const y=n.after??n.before;if(y){const T=[t,o,a,y.observedAtMs,y.documentId];n.before?s==="newest"?(h=T,m=false):(u=T,g=false):s==="newest"?(u=T,g=false):(h=T,m=false);}let b=this.searchDocuments().where("[extension_name+entity_type+folder_id+observed_at_ms+id]").between(h,u,m,g);s==="newest"&&(b=b.reverse());const k=await b.limit(i+1).toArray().catch(this.logError)??[],S=k.slice(0,i),M={documents:S,cursorBefore:Qo(S[0]),cursorAfter:Qo(S[S.length-1]),hasBefore:!!(n.after||n.before),hasAfter:k.length>i};return He({kind:"db",name:"search-document-folder-cursor-page",durationMs:Ge()-r,value:S.length,tags:{extName:t,type:n.type,entityType:o,folderId:a,limit:i,order:s,hasAfter:M.hasAfter}}),M}async extGetSearchDocumentFolderPage(t,n){const r=Ge(),o=n.entityType??mi(n.type),a=String(n.folderId||"").trim(),i=Math.max(0,Math.floor(Number(n.offset)||0)),s=Math.max(1,Math.min(1e3,Number(n.limit)||100)),l=n.order??"newest";if(!o||!a)return {documents:[],hasBefore:false,hasAfter:false};const c=[t,o,a,Jo,Xo],h=[t,o,a,so,Zo];let u=this.searchDocuments().where("[extension_name+entity_type+folder_id+observed_at_ms+id]").between(c,h,true,true);l==="newest"&&(u=u.reverse());const m=await u.offset(i).limit(s+1).toArray().catch(this.logError)??[],g=m.slice(0,s),y={documents:g,cursorBefore:Qo(g[0]),cursorAfter:Qo(g[g.length-1]),hasBefore:i>0,hasAfter:m.length>s};return He({kind:"db",name:"search-document-folder-page",durationMs:Ge()-r,value:g.length,tags:{extName:t,type:n.type,entityType:o,folderId:a,offset:i,limit:s,order:l,hasAfter:y.hasAfter}}),y}searchDocumentHasMedia(t){var n,r;return !!((n=t.flags_json)!=null&&n.has_media||Number(((r=t.numeric_json)==null?void 0:r.media_count)||0)>0||Number(t.media_flag||0)>0)}async getSearchDocumentMediaScanRows(t,n,r,o){const a=await this.searchDocuments().where("[extension_name+entity_type]").equals([t,n]).filter(i=>r.size&&!r.has(String(i.folder_id||"").trim())?false:this.searchDocumentHasMedia(i)).toArray().catch(this.logError)??[];return a.sort((i,s)=>{const l=Number(i.observed_at_ms||0),c=Number(s.observed_at_ms||0);return l!==c?o==="newest"?c-l:l-c:o==="newest"?String(s.id).localeCompare(String(i.id)):String(i.id).localeCompare(String(s.id))}),a}async repairSearchDocumentMediaIndexes(t){const n=t.filter(r=>{var o,a;return this.searchDocumentHasMedia(r)&&(Number(r.media_flag||0)!==1||Number(((o=r.numeric_json)==null?void 0:o.media_count)||0)<=0||((a=r.flags_json)==null?void 0:a.has_media)!==true)}).map(r=>{var o;return {...r,media_flag:1,flags_json:{...r.flags_json??{},has_media:true},numeric_json:{...r.numeric_json??{},media_count:Math.max(1,Number(((o=r.numeric_json)==null?void 0:o.media_count)||0))}}});n.length&&await this.upsertSearchDocuments(n);}async extGetSearchDocumentMediaCount(t,n={}){const r=Ge(),o=n.entityType??"tweet",a=new Set((n.folderIds??[]).map(g=>g.trim()).filter(Boolean)),i=await this.searchDocuments().where("[extension_name+entity_type+media_flag+observed_at_ms+id]").between([t,o,1,Jo,Xo],[t,o,1,so,Zo],true,true).filter(g=>!a.size||a.has(String(g.folder_id||"").trim())).count().catch(this.logError)??0,s=await this.searchDocuments().where("[extension_name+entity_type+numeric_json.media_count+observed_at_ms+id]").between([t,o,1,Jo,Xo],[t,o,so,so,Zo],true,true).filter(g=>!a.size||a.has(String(g.folder_id||"").trim())).count().catch(this.logError)??0,l=await this.getSearchDocumentMediaScanRows(t,o,a,"newest"),c=l.length,h=Math.max(i,s);c>h&&await this.repairSearchDocumentMediaIndexes(l);const u=c>h?"legacy_flags_scan":i?"media_flag":s?"numeric_json":"none",m=Math.max(h,c);return He({kind:"db",name:"search-document-media-count",durationMs:Ge()-r,value:m,tags:{extName:t,entityType:o,folderIds:[...a].join(","),fallbackMode:u}}),m}async extGetSearchDocumentMediaCursorPage(t,n={}){const r=Ge(),o=n.entityType??"tweet",a=new Set((n.folderIds??[]).map(I=>I.trim()).filter(Boolean)),i=Math.max(1,Math.min(1e3,Number(n.limit)||100)),s=Math.max(0,Math.floor(Number(n.offset)||0)),l=n.order??"newest",c=[t,o,1,Jo,Xo],h=[t,o,1,so,Zo];let u=c,m=h,g=true,y=true;const b=n.after??n.before;if(b){const I=[t,o,1,b.observedAtMs,b.documentId];n.before?l==="newest"?(u=I,g=false):(m=I,y=false):l==="newest"?(m=I,y=false):(u=I,g=false);}let k=this.searchDocuments().where("[extension_name+entity_type+media_flag+observed_at_ms+id]").between(u,m,g,y).filter(I=>!a.size||a.has(String(I.folder_id||"").trim()));l==="newest"&&(k=k.reverse());let S=false,M=await k.offset(b?0:s).limit(i+1).toArray().catch(this.logError)??[];if(!M.length&&!b){S=true;const I=[t,o,1,Jo,Xo],O=[t,o,so,so,Zo];let U=this.searchDocuments().where("[extension_name+entity_type+numeric_json.media_count+observed_at_ms+id]").between(I,O,true,true).filter(E=>!a.size||a.has(String(E.folder_id||"").trim()));l==="newest"&&(U=U.reverse()),M=await U.offset(s).limit(i+1).toArray().catch(this.logError)??[];}const T=S?"numeric_json":"media_flag",P=M.slice(0,i),N={documents:P,cursorBefore:Qo(P[0]),cursorAfter:Qo(P[P.length-1]),hasBefore:!!(n.after||n.before||s>0),hasAfter:M.length>i};return He({kind:"db",name:"search-document-media-cursor-page",durationMs:Ge()-r,value:P.length,tags:{extName:t,entityType:o,folderIds:[...a].join(","),offset:b?0:s,limit:i,order:l,hasAfter:N.hasAfter,fallback:S,fallbackMode:T}}),N}async searchDocumentsForSource(t,n){const r=await this.searchDocuments().where("source_key").equals(t).toArray().catch(this.logError);return r?n?r.filter(o=>o.entity_type===n):r:[]}async bundleList(){return this.importedBundles().orderBy("updatedAt").reverse().toArray().catch(this.logError)}async bundleGet(t){return this.importedBundles().get(t).catch(this.logError)}async bundleGetCollections(t){return this.importedBundleCollections().where("bundle_id").equals(t).toArray().catch(this.logError)}async bundleGetItems(t,n=5e3){return this.importedBundleItems().where("bundle_id").equals(t).limit(n).toArray().catch(this.logError)}async bundleGetSnapshots(t,n=5e3){return this.importedEntitySnapshots().where("bundle_id").equals(t).limit(n).toArray().catch(this.logError)}async bundleGetSnapshotCount(t,n){return n?this.importedEntitySnapshots().where("[bundle_id+kind]").equals([t,n]).count().catch(this.logError):this.importedEntitySnapshots().where("bundle_id").equals(t).count().catch(this.logError)}async bundleGetSnapshotPage(t,n={}){const r=Math.max(0,Number(n.offset||0)),o=Math.max(1,Number(n.limit||5e3));return ((n.kind?await this.importedEntitySnapshots().where("[bundle_id+kind]").equals([t,n.kind]).toArray().catch(this.logError):await this.importedEntitySnapshots().where("bundle_id").equals(t).toArray().catch(this.logError))??[]).sort((i,s)=>{const l=Number(i.observed_at||i.created_at||i.updated_at||0),c=Number(s.observed_at||s.created_at||s.updated_at||0);return l!==c?n.order==="oldest"?l-c:c-l:s.id.localeCompare(i.id)}).slice(r,r+o)}async bundleGetSnapshotsByIds(t){const n=this.normalizeDataKeys(t);return n.length?this.importedEntitySnapshots().bulkGet(n).then(r=>r.filter(o=>!!o)).catch(this.logError):[]}async bundleSearchSnapshots(t,n,r=5e3){const o=n.trim().toLowerCase(),a=this.importedEntitySnapshots().where("bundle_id").equals(t);return o?a.filter(i=>String(i.search_text||"").toLowerCase().includes(o)).limit(r).toArray().catch(this.logError):a.limit(r).toArray().catch(this.logError)}async extAddTweets(t,n){const r=this.normalizeRowsByRestId(n);r.length&&await this.enqueueWrite("extAddTweets",async()=>{const o=Date.now(),a=r.map(i=>({id:`${t}-${i.rest_id}`,extension:t,type:mt.TWEET,data_key:i.rest_id,created_at:o}));await this.db.transaction("rw",this.tweets(),this.captures(),this.searchDocuments(),async()=>{const i=await this.putMergedTweets(r);await this.bulkPutInChunks(this.captures(),a),await this.bulkPutInChunks(this.searchDocuments(),this.buildTweetSearchDocuments(t,i));}),await this.invalidateCaptureIndexPages(t,mt.TWEET),await this.invalidateFolderSourceIndexPages(t),Pn({extension:t,operation:"extAddTweets",count:r.length,keys:r.map(i=>i.rest_id)}),this.publishCaptureCountSnapshot(t);});}async extAddUsers(t,n){const r=this.normalizeRowsByRestId(n);r.length&&await this.enqueueWrite("extAddUsers",async()=>{const o=Date.now(),a=r.map(s=>({id:`${t}-${s.rest_id}`,extension:t,type:mt.USER,data_key:s.rest_id,created_at:o})),i=this.buildUserSearchDocuments(t,r);await this.db.transaction("rw",this.users(),this.captures(),this.searchDocuments(),async()=>{await this.putUsers(r),await this.bulkPutInChunks(this.captures(),a),await this.bulkPutInChunks(this.searchDocuments(),i);}),await this.invalidateCaptureIndexPages(t,mt.USER),await this.invalidateFolderSourceIndexPages(t),Pn({extension:t,operation:"extAddUsers",count:r.length,keys:r.map(s=>s.rest_id)}),this.publishCaptureCountSnapshot(t);});}async extAddCustomCaptures(t,n){if(!n.length)return;const r=[];for(const o of n){const a=String(o.id||"").trim(),i=String(o.data_key||"").trim();!a||!i||r.push({id:`${t}-${a}`,extension:t,type:mt.CUSTOM,data_key:i,created_at:Number(o.created_at)||Date.now()});}r.length&&await this.enqueueWrite("extAddCustomCaptures",async()=>{await this.db.transaction("rw",this.captures(),async()=>{await this.bulkPutInChunks(this.captures(),r);}),await this.invalidateCaptureIndexPages(t,mt.CUSTOM),Pn({extension:t,operation:"extAddCustomCaptures",count:r.length,keys:r.map(o=>o.data_key)}),this.publishCaptureCountSnapshot(t);});}async extAddSocialEdges(t,n){const r=n.map(o=>({...o,extension:t,observed_at:Number(o.observed_at)||Date.now()})).filter(o=>o.subject_user_id&&o.related_user_id&&o.relation_type&&o.id);r.length&&await this.enqueueWrite("extAddSocialEdges",async()=>{await this.db.transaction("rw",this.socialEdges(),async()=>{await this.bulkPutInChunks(this.socialEdges(),r);}),Pn({extension:t,operation:"extAddSocialEdges",count:r.length,keys:r.map(o=>o.id)});});}async extAddTweetCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&await this.enqueueWrite("extAddTweetCaptureIds",async()=>{await this.db.transaction("rw",this.tweets(),this.captures(),this.searchDocuments(),async()=>{const a=[];for(const i of Ll(o,pi))a.push(...await this.tweets().where("rest_id").anyOf(i).toArray());r&&a.length&&await this.bulkPutInChunks(this.tweets(),a.map(i=>r(i))),await this.bulkPutInChunks(this.captures(),o.map(i=>({id:`${t}-${i}`,extension:t,type:mt.TWEET,data_key:i,created_at:Date.now()}))),await this.bulkPutInChunks(this.searchDocuments(),this.buildTweetSearchDocuments(t,a));}),await this.invalidateCaptureIndexPages(t,mt.TWEET),await this.invalidateFolderSourceIndexPages(t),Pn({extension:t,operation:"extAddTweetCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t);});}async extBackfillTweetCapturesFromAllTweets(t){if(await this.extGetCaptureCount(t))return;const r=await this.tweets().toCollection().primaryKeys().then(o=>o.map(a=>String(a||"")).filter(Boolean)).catch(this.logError);r!=null&&r.length&&await this.extAddTweetCaptureIds(t,r);}async extRemoveTweetCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&(await this.db.transaction("rw",this.tweets(),this.captures(),this.searchDocuments(),async()=>{if(r){const a=await this.tweets().where("rest_id").anyOf(o).toArray();a.length&&await this.tweets().bulkPut(a.map(i=>r(i)));}await this.captures().bulkDelete(o.map(a=>`${t}-${a}`)),await this.searchDocuments().bulkDelete(o.map(a=>`live:${t}:tweet:${a}`));}).catch(this.logError),await this.invalidateCaptureIndexPages(t,mt.TWEET),await this.invalidateFolderSourceIndexPages(t),Pn({extension:t,operation:"extRemoveTweetCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t));}async extAddUserCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&(await this.db.transaction("rw",this.users(),this.captures(),this.searchDocuments(),async()=>{let a=[];r?(a=await this.users().where("rest_id").anyOf(o).toArray(),a.length&&await this.users().bulkPut(a.map(i=>r(i)))):a=await this.users().where("rest_id").anyOf(o).toArray(),await this.captures().bulkPut(o.map(i=>({id:`${t}-${i}`,extension:t,type:mt.USER,data_key:i,created_at:Date.now()}))),await this.searchDocuments().bulkPut(this.buildUserSearchDocuments(t,a));}).catch(this.logError),await this.invalidateCaptureIndexPages(t,mt.USER),await this.invalidateFolderSourceIndexPages(t),Pn({extension:t,operation:"extAddUserCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t));}async extRemoveUserCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&(await this.db.transaction("rw",this.users(),this.captures(),this.searchDocuments(),async()=>{if(r){const a=await this.users().where("rest_id").anyOf(o).toArray();a.length&&await this.users().bulkPut(a.map(i=>r(i)));}await this.captures().bulkDelete(o.map(a=>`${t}-${a}`)),await this.searchDocuments().bulkDelete(o.map(a=>`live:${t}:user:${a}`));}).catch(this.logError),await this.invalidateCaptureIndexPages(t,mt.USER),await this.invalidateFolderSourceIndexPages(t),Pn({extension:t,operation:"extRemoveUserCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t));}async bundlePutImportBatch(t){var o;const n=Date.now(),r={...t.bundle,updatedAt:n};await this.db.transaction("rw",[this.importedBundles(),this.importedBundleCollections(),this.importedBundleItems(),this.importedEntitySnapshots(),this.importedBundleImportReports(),this.searchDocuments()],async()=>{var a,i,s;await this.importedBundles().put(r),(a=t.collections)!=null&&a.length&&await this.importedBundleCollections().bulkPut(t.collections),(i=t.items)!=null&&i.length&&await this.importedBundleItems().bulkPut(t.items),(s=t.snapshots)!=null&&s.length&&(await this.importedEntitySnapshots().bulkPut(t.snapshots),await this.searchDocuments().bulkPut(this.buildImportedSnapshotSearchDocuments(r.id,t.snapshots))),t.report&&await this.importedBundleImportReports().put(t.report);}).catch(this.logError),await this.invalidateFolderSourceIndexPages(),Pn({operation:"bundlePutImportBatch",count:((o=t.snapshots)==null?void 0:o.length)??0,keys:[r.id]});}async bundleMarkReady(t){await this.importedBundles().update(t,{status:"ready",updatedAt:Date.now()}).catch(this.logError),Pn({operation:"bundleMarkReady",keys:[t]});}async bundleMarkFailed(t,n){await this.importedBundles().update(t,{status:"failed",error:n,updatedAt:Date.now()}).catch(this.logError),Pn({operation:"bundleMarkFailed",keys:[t]});}async extClearCaptures(t){const n=await this.extGetCaptures(t);if(!n)return;const r=await this.db.transaction("rw",this.captures(),this.searchDocuments(),async()=>{const o=await this.captures().bulkDelete(n.map(i=>i.id)),a=n.map(i=>i.type===mt.TWEET?`live:${t}:tweet:${i.data_key}`:i.type===mt.USER?`live:${t}:user:${i.data_key}`:"").filter(Boolean);return a.length&&await this.searchDocuments().bulkDelete(a),o}).catch(this.logError);return Pn({extension:t,operation:"extClearCaptures",count:n.length,keys:n.map(o=>o.data_key)}),await this.invalidateCaptureIndexPages(t),await this.invalidateFolderSourceIndexPages(t),this.publishCaptureCountSnapshot(t),r}async extBackfillRecentBookmarkFolderName(t,n,r,o={}){if(!t||!n||!r)return {candidates:0,inspected:0,updated:0};const a=Math.max(1,Math.min(1e3,Number(o.candidateLimit)||250)),i=Math.max(100,Math.min(5e3,Number(o.recentCaptureScanLimit)||1800)),s=new Set;for(const h of o.candidateTweetIds||[]){if(typeof h!="string")continue;const u=h.trim();if(u&&(s.add(u),s.size>=a))break}if(s.size<a){const h=await this.captures().orderBy("created_at").reverse().limit(i).toArray().catch(this.logError);for(const u of h||[]){if((u==null?void 0:u.extension)!==t||(u==null?void 0:u.type)!==mt.TWEET)continue;const m=String((u==null?void 0:u.data_key)||"").trim();if(!(!m||s.has(m))&&(s.add(m),s.size>=a))break}}if(!s.size)return {candidates:0,inspected:0,updated:0};const l=[...s],c=await this.db.transaction("rw",this.tweets(),this.searchDocuments(),async()=>{const h=await this.tweets().where("rest_id").anyOf(l).toArray(),u=[];for(const m of h){const g=m;if(String(g.__bookmark_folder_id||"")!==n)continue;const y=String(g.__bookmark_folder_name||""),b=String(g.__bookmark_folder_name_source||"");y===r&&b==="api"||u.push({...m,__bookmark_folder_name:r,__bookmark_folder_name_source:"api"});}return u.length&&(await this.tweets().bulkPut(u),await this.searchDocuments().bulkPut(this.buildTweetSearchDocuments(t,u)),Pn({extension:t,operation:"bookmarkFolderNameBackfill"})),{candidates:l.length,inspected:h.length,updated:u.length}}).catch(h=>(this.logError(h),{candidates:l.length,inspected:0,updated:0}));return c.updated>0&&await this.invalidateFolderSourceIndexPages(t),c}async export(){return $b(this.db).catch(this.logError)}async import(t,n={}){const r=await ph(this.db,t,{acceptMissingTables:true,acceptVersionDiff:true,progressCallback:n.progressCallback}).catch(o=>{throw this.logError(o,"import"),o});return this.bumpAllCaptureIndexRevisions(),await this.deleteAllCaptureIndexPages(),await this.invalidateFolderSourceIndexPages(),Pn({operation:"import"}),this.publishCaptureCountSnapshotForAllKnownExtensions(),r}async clear(){this.bumpAllCaptureIndexRevisions(),await this.deleteAllCaptures(),await this.deleteAllCaptureIndexPages(),await this.deleteAllSocialEdges(),await this.deleteAllSearchDocuments(),await this.invalidateFolderSourceIndexPages(),await this.deleteAllTweets(),await this.deleteAllUsers(),Pn({operation:"clear"}),this.publishCaptureCountSnapshotForAllKnownExtensions(),Ae.info("Database cleared");}async count(){try{return {tweets:await this.tweets().count(),users:await this.users().count(),captures:await this.captures().count(),social_edges:await this.socialEdges().count(),capture_index_pages:await this.captureIndexPages().count(),imported_bundles:await this.importedBundles().count(),imported_entity_snapshots:await this.importedEntitySnapshots().count(),search_documents:await this.searchDocuments().count(),folder_source_index_pages:await this.folderSourceIndexPages().count()}}catch(t){return this.logError(t),null}}async publishKnownCaptureCountSnapshot(t,n){await this.writeCaptureCountSnapshot(t,Math.max(0,Math.floor(Number(n)||0)));}async publishCaptureCountSnapshot(t){try{const n=Number(await this.extGetCaptureCount(t)||0);await this.writeCaptureCountSnapshot(t,n);}catch{}}async writeCaptureCountSnapshot(t,n){try{const r=this.db.name,o=Date.now(),a=globalThis,i=a[Pl],s=i&&typeof i=="object"?{...i}:{};s[t]=n;const l=a[Ol],c=l&&typeof l=="object"?{...l}:{};c[t]={count:n,dbName:r,updatedAt:o},a[Pl]=s,a[Ol]=c,typeof window<"u"&&(window[Pl]=s,window[Ol]=c);try{typeof localStorage<"u"&&(localStorage.setItem(Pl,JSON.stringify(s)),localStorage.setItem(Ol,JSON.stringify(c)));}catch{}try{if(typeof window<"u"&&typeof window.dispatchEvent=="function"){const h={extension:t,count:n,dbName:r,updatedAt:o};try{window.dispatchEvent(new CustomEvent(Em,{detail:h}));}catch{window.dispatchEvent(new Event(Em));}}}catch{}}catch{}}publishCaptureCountSnapshotForAllKnownExtensions(){this.captures().toArray().then(t=>{const n=new Set;for(const r of t)r!=null&&r.extension&&n.add(String(r.extension));return Promise.all([...n].map(r=>this.publishCaptureCountSnapshot(r)))}).catch(()=>{});}publishActiveDatabaseName(){try{const t=this.db.name,n=globalThis;n[od]=t,typeof window<"u"&&(window[od]=t),typeof localStorage<"u"&&localStorage.setItem(od,t);}catch{}}buildTweetSearchDocuments(t,n){const r=Date.now(),o=[];for(const a of n){const i=a,s=String(a.rest_id||yn(i,"legacy.id_str")||"").trim();if(!s)continue;const l=gi([ha(a),Xn(yn(i,"legacy.text"))]),c=Wc(a),h=gi([c?ha(c):"",Xn(yn(i,"quoted_status_result.result.legacy.text"))]),u=Xn(yn(i,"core.user_results.result.core.screen_name")||yn(i,"core.screen_name")).toLowerCase(),m=Xn(yn(i,"core.user_results.result.rest_id")||yn(i,"author_id")),g=Xn(yn(i,"__bookmark_folder_id")),y=Xn(yn(i,"__bookmark_folder_name")),b=Ga(a),k=gi([l,u,g,y]),S=gi([Xn(yn(i,"legacy.lang")),Xn(yn(i,"card.name")),Xn(yn(i,"card.card_platform.card_name"))]),M=Po(a).length,T=M>0,P=Nl([k,h,S].join(`
`));o.push({id:`live:${t}:tweet:${s}`,source_key:`live:${t}`,source_kind:"live",entity_type:"tweet",entity_id:s,extension_name:t,updated_at_ms:r,created_at_ms:b||void 0,observed_at_ms:r,primary_text:k,quoted_text:h||void 0,auxiliary_text:S||void 0,author_screen_name:u||void 0,author_id:m||void 0,folder_id:g||void 0,folder_name:y||void 0,media_flag:T?1:0,route_type:Xn(yn(i,"__route_type"))||void 0,lang:Xn(yn(i,"legacy.lang"))||void 0,flags_json:{has_media:T},exact_json:{author:u?[u,`@${u}`]:[],folder:[g,y].filter(Boolean)},numeric_json:{favorite_count:Number(yn(i,"legacy.favorite_count")||0),retweet_count:Number(yn(i,"legacy.retweet_count")||0),reply_count:Number(yn(i,"legacy.reply_count")||0),bookmark_count:Number(yn(i,"legacy.bookmark_count")||0),media_count:M},raw_ref_table:"tweets",raw_ref_key:s,doc_hash:P});}return o}buildUserSearchDocuments(t,n){var a;const r=Date.now(),o=[];for(const i of n){const s=i,l=String(i.rest_id||"").trim();if(!l)continue;const c=Xn(yn(s,"core.screen_name")).toLowerCase(),h=Xn(yn(s,"core.name")),u=Xn(yn(s,"legacy.description")),m=gi([c,h,u]);o.push({id:`live:${t}:user:${l}`,source_key:`live:${t}`,source_kind:"live",entity_type:"user",entity_id:l,extension_name:t,updated_at_ms:r,created_at_ms:Number(((a=i.twe_private_fields)==null?void 0:a.created_at)||0)||void 0,observed_at_ms:r,primary_text:m,author_screen_name:c||void 0,author_id:l,flags_json:{is_blue_verified:!!yn(s,"is_blue_verified")},exact_json:{author:c?[c,`@${c}`]:[]},raw_ref_table:"users",raw_ref_key:l,doc_hash:Nl(m)});}return o}buildImportedSnapshotSearchDocuments(t,n){const r=Date.now();return n.map(o=>{const a=o.data,i=o.kind==="tweet"||o.kind==="user"?_b(o):a,s=String(o.source_id||o.id).trim(),l=Xn(o.search_text)||gi([JSON.stringify(a)]),c=Xn(yn(i,"__bookmark_folder_id")),h=Xn(yn(i,"__bookmark_folder_name")),u=Number(yn(i,"twe_private_fields.media_count")||0);return {id:`bundle:${t}:${o.kind}:${o.id}`,source_key:`bundle:${t}`,source_kind:"bundle",entity_type:o.kind==="user"?"user":o.kind==="tweet"?"tweet":"bundle_item",entity_id:s,bundle_id:t,bundle_item_id:o.id,extension_name:o.source_extension,updated_at_ms:r,created_at_ms:o.created_at,observed_at_ms:o.observed_at,primary_text:l,folder_id:c||void 0,folder_name:h||void 0,media_flag:u>0?1:0,exact_json:{folder:[c,h].filter(Boolean)},numeric_json:{media_count:u},raw_ref_table:"imported_entity_snapshots",raw_ref_key:o.id,doc_hash:Nl(l)}})}async upsertSearchDocuments(t){if(!t.length)return;const n=Ge(),r=this.searchDocumentExtensionNames(t);return this.enqueueWrite("upsertSearchDocuments",async()=>{const o=await this.db.transaction("rw",this.searchDocuments(),async()=>{await this.bulkPutInChunks(this.searchDocuments(),t);});return await this.invalidateFolderSourceIndexPagesForExtensions(r),He({kind:"db",name:"search-documents-upsert",durationMs:Ge()-n,value:t.length}),o})}async putSyntheticSeedRows(t){const n=t.users??[],r=t.tweets??[],o=t.captures??[],a=t.searchDocuments??[],i=n.length+r.length+o.length+a.length;if(!i)return;const s=Ge(),l=this.searchDocumentExtensionNames(a);return this.enqueueWrite("putSyntheticSeedRows",async()=>{const c=await this.db.transaction("rw",this.users(),this.tweets(),this.captures(),this.searchDocuments(),async()=>{n.length&&await this.bulkPutInChunks(this.users(),n),r.length&&await this.bulkPutInChunks(this.tweets(),r),o.length&&await this.bulkPutInChunks(this.captures(),o),a.length&&await this.bulkPutInChunks(this.searchDocuments(),a);});return o.length&&await this.invalidateCaptureIndexPagesForRows(o),await this.invalidateFolderSourceIndexPagesForExtensions(l),He({kind:"db",name:"synthetic-seed-bulk-put",durationMs:Ge()-s,value:i,tags:{users:n.length,tweets:r.length,captures:o.length,searchDocuments:a.length}}),c})}async extBackfillSearchDocuments(t,n,r=640){const o=Ge();if(!(n===mt.USER?"user":n===mt.TWEET?"tweet":null))return {processed:0,documents:0};let i=0,s=0,l=0;for(;;){const c=await this.extGetCapturePage(t,{type:n,offset:i,limit:r,order:"newest"});if(!c.length)break;const h=new Map(c.map(u=>[u.data_key,Number(u.created_at)||Date.now()]));if(n===mt.USER){const u=await this.extGetCapturedUsers(t,c)??[],m=this.buildUserSearchDocuments(t,u);m.forEach(g=>{g.observed_at_ms=h.get(g.raw_ref_key)||g.observed_at_ms;}),await this.upsertSearchDocuments(m),l+=m.length;}else {const u=await this.extGetCapturedTweets(t,c)??[],m=this.buildTweetSearchDocuments(t,u);m.forEach(g=>{g.observed_at_ms=h.get(g.raw_ref_key)||g.observed_at_ms;}),await this.upsertSearchDocuments(m),l+=m.length;}if(s+=c.length,i+=c.length,c.length<r)break}return He({kind:"db",name:"search-documents-backfill",durationMs:Ge()-o,value:l,tags:{extName:t,type:n,processed:s}}),Pn({extension:t,operation:"searchDocumentsBackfill"}),{processed:s,documents:l}}async backfillArticleMarkdownOnce(){const t=`${aM}:${this.db.name}`;try{if(typeof localStorage<"u"&&localStorage.getItem(t)==="1")return}catch{}await this.enqueueWrite("backfillArticleMarkdownOnce",async()=>{var a,i;const n=await this.tweets().filter(s=>!!s.article).toArray();let r=0,o=0;for(const s of Ll(n,pi)){const l=[];for(const g of s){const y=((i=(a=g.article)==null?void 0:a.article_results)==null?void 0:i.result)??null,b=Ks(y);b&&l.push({...g,twe_private_fields:{...g.twe_private_fields,article_markdown:b,article_markdown_version:eh}});}if(!l.length)continue;const c=new Map(l.map(g=>[g.rest_id,g])),h=l.map(g=>["tweet",g.rest_id]),u=await this.searchDocuments().where("[entity_type+entity_id]").anyOf(h).toArray(),m=[];for(const g of u){if(g.source_kind!=="live"||g.raw_ref_table!=="tweets"||!g.extension_name)continue;const y=c.get(g.entity_id);if(!y)continue;const b=this.buildTweetSearchDocuments(g.extension_name,[y])[0];b&&m.push({...b,id:g.id,source_key:g.source_key,observed_at_ms:g.observed_at_ms});}await this.db.transaction("rw",this.tweets(),this.searchDocuments(),async()=>{await this.bulkPutInChunks(this.tweets(),l),await this.bulkPutInChunks(this.searchDocuments(),m);}),r+=l.length,o+=m.length,await new Promise(g=>globalThis.setTimeout(g,0));}He({kind:"db",name:"article-markdown-backfill",value:r,tags:{updatedDocuments:o}}),o>0&&Pn({operation:"articleMarkdownBackfill",count:o});});try{typeof localStorage<"u"&&localStorage.setItem(t,"1");}catch{}}async putMergedTweets(t){if(!t.length)return [];const n=this.normalizeDataKeys(t.map(i=>i.rest_id)),r=[];for(const i of Ll(n,pi))r.push(...await this.tweets().where("rest_id").anyOf(i).toArray());const o=new Map(r.map(i=>[String(i.rest_id),i])),a=t.map(i=>{const s={...i,twe_private_fields:{...i.twe_private_fields,created_at:Ga(i),updated_at:Date.now(),media_count:Po(i).length}};return Pm(o.get(i.rest_id)??null,s)});return await this.bulkPutInChunks(this.tweets(),a),a}async putUsers(t){if(!t.length)return;const n=t.map(r=>({...r,twe_private_fields:{created_at:+Ni(r.core.created_at),updated_at:Date.now()}}));await this.bulkPutInChunks(this.users(),n);}async bulkPutInChunks(t,n){for(const r of Ll(n,pi))await t.bulkPut(r);}normalizeRowsByRestId(t){const n=new Map;for(const r of t){const o=String((r==null?void 0:r.rest_id)||"").trim();o&&n.set(o,{...r,rest_id:o});}return [...n.values()]}async upsertTweets(t){const n=this.normalizeRowsByRestId(t);if(n.length)return this.enqueueWrite("upsertTweets",async()=>{await this.db.transaction("rw",this.tweets(),async()=>{await this.putMergedTweets(n);});})}async upsertUsers(t){const n=this.normalizeRowsByRestId(t);if(n.length)return this.enqueueWrite("upsertUsers",async()=>{await this.db.transaction("rw",this.users(),async()=>{await this.putUsers(n);});})}async upsertCaptures(t){if(t.length)return this.enqueueWrite("upsertCaptures",async()=>{await this.db.transaction("rw",this.captures(),async()=>{await this.bulkPutInChunks(this.captures(),t);}),await this.invalidateCaptureIndexPagesForRows(t);})}async upsertSocialEdges(t){if(t.length)return this.enqueueWrite("upsertSocialEdges",async()=>{await this.db.transaction("rw",this.socialEdges(),async()=>{await this.bulkPutInChunks(this.socialEdges(),t);});})}async deleteAllTweets(){return this.tweets().clear().catch(this.logError)}async deleteAllUsers(){return this.users().clear().catch(this.logError)}async deleteAllCaptures(){return this.bumpAllCaptureIndexRevisions(),await this.deleteAllCaptureIndexPages(),this.captures().clear().catch(this.logError)}async deleteAllCaptureIndexPages(){return this.captureIndexPages().clear().catch(this.logError)}async deleteAllSocialEdges(){return this.socialEdges().clear().catch(this.logError)}async deleteAllSearchDocuments(){return await this.invalidateFolderSourceIndexPages(),this.searchDocuments().clear().catch(this.logError)}async bundleDelete(t){await this.db.transaction("rw",[this.importedBundles(),this.importedBundleCollections(),this.importedBundleItems(),this.importedEntitySnapshots(),this.importedBundleImportReports(),this.searchDocuments()],async()=>{const n=await this.importedBundleCollections().where("bundle_id").equals(t).primaryKeys(),r=await this.importedBundleItems().where("bundle_id").equals(t).primaryKeys(),o=await this.importedEntitySnapshots().where("bundle_id").equals(t).primaryKeys(),a=await this.importedBundleImportReports().where("bundle_id").equals(t).primaryKeys(),i=await this.searchDocuments().where("bundle_id").equals(t).primaryKeys();await this.importedBundleCollections().bulkDelete(n),await this.importedBundleItems().bulkDelete(r),await this.importedEntitySnapshots().bulkDelete(o),await this.importedBundleImportReports().bulkDelete(a),await this.searchDocuments().bulkDelete(i),await this.importedBundles().delete(t);}).catch(this.logError),await this.invalidateFolderSourceIndexPages(),Pn({operation:"bundleDelete",keys:[t]});}async enrichUsersWithRelationshipContext(t,n){if(!n.length||t!=="FollowersModule"&&t!=="FollowingModule")return n;const r=this.normalizeDataKeys(n.map(a=>a.rest_id));if(!r.length)return n;const o=await this.socialEdges().where("[extension+related_user_id]").anyOf(r.map(a=>[t,a])).toArray().catch(this.logError);return o!=null&&o.length?YT(n,o):n}normalizeDataKeys(t){const n=new Set;for(const r of t){const o=String(r||"").trim();o&&n.add(o);}return [...n]}filterEmptyData(t){if(!t)return Ae.warn("Empty data found in DB",t),false;if(t.__typename==="Tweet"){const n=t;return !n.legacy&&!n.article?(Ae.warn("Empty data found in DB",t),false):true}return t.legacy?true:(Ae.warn("Empty data found in DB",t),false)}async init(){const t=["rest_id","twe_private_fields.created_at","twe_private_fields.updated_at","twe_private_fields.media_count","core.user_results.result.core.screen_name","legacy.favorite_count","legacy.retweet_count","legacy.bookmark_count","legacy.quote_count","legacy.reply_count","views.count","legacy.favorited","legacy.retweeted","legacy.bookmarked"],n=["rest_id","twe_private_fields.created_at","twe_private_fields.updated_at","core.screen_name","legacy.followers_count","legacy.friends_count","legacy.statuses_count","legacy.favourites_count","legacy.listed_count","verification.verified_type","is_blue_verified","relationship_perspectives.following","relationship_perspectives.followed_by"],r=["id","extension","type","created_at","[extension+type]","[extension+type+created_at]","[extension+type+created_at+id]"],o=["id","extension","type","order","source_count","page_start","[extension+type+order+source_count+page_start]"],a=["id","source_hash","source_key","extension_name","entity_type","source_count","source_revision","page_start","[source_hash+source_count+source_revision+page_start]"],i=["id","extension","relation_type","subject_user_id","related_user_id","observed_at","[extension+relation_type]","[extension+subject_user_id]","[extension+related_user_id]"],s=["id","status","visibility","importedAt","updatedAt","recordCount"],l=["id","bundle_id","kind","[bundle_id+kind]"],c=["id","bundle_id","collection_id","record_id","kind","source_id","sort_time","[bundle_id+kind]","[bundle_id+sort_time]"],h=["id","bundle_id","kind","source_id","source_extension","observed_at","updated_at","[bundle_id+kind]","[kind+source_id]"],u=["id","bundle_id","started_at","finished_at","status"],m=["id","source_key","source_kind","entity_type","entity_id","extension_name","bundle_id","bundle_item_id","updated_at_ms","created_at_ms","observed_at_ms","author_screen_name","author_id","folder_id","media_flag","numeric_json.media_count","[source_key+entity_type]","[extension_name+entity_type]","[extension_name+entity_type+media_flag+observed_at_ms+id]","[extension_name+entity_type+numeric_json.media_count+observed_at_ms+id]","[extension_name+entity_type+folder_id+observed_at_ms]","[extension_name+entity_type+folder_id+observed_at_ms+id]","[bundle_id+entity_type]","[entity_type+entity_id]"];try{this.db.version(2).stores({tweets:t.join(","),users:n.join(","),captures:r.join(",")}).upgrade(async g=>{Ae.info("Upgrading database schema..."),await GT(g),Ae.info("Database upgraded");}),this.db.version(oM).stores({tweets:t.join(","),users:n.join(","),captures:r.join(","),capture_index_pages:o.join(","),folder_source_index_pages:a.join(","),social_edges:i.join(","),imported_bundles:s.join(","),imported_bundle_collections:l.join(","),imported_bundle_items:c.join(","),imported_entity_snapshots:h.join(","),imported_bundle_import_reports:u.join(","),search_documents:m.join(",")}),await this.db.open(),Ae.info(`Database connected: ${this.db.name}`),this.backfillArticleMarkdownOnce().catch(g=>{Ae.warn("Article Markdown backfill failed",g);});}catch(g){this.logError(g);}}logError(t,n){const r=t instanceof Error?t.message:String(t),o=n?`Database Error (${n})`:"Database Error";Ae.error(`${o}: ${r}`,t);}async deleteGenerationPatchStubs(){return await this.whenReady(),this.enqueueWrite("deleteGenerationPatchStubs",async()=>this.db.transaction("rw",this.tweets(),async()=>this.tweets().filter(t=>t.__scrollmark_generation_patch_stub===true).delete()))}async generationProjectionHash(){await this.whenReady();const t=new jb,n=[this.tweets(),this.users(),this.captures(),this.captureIndexPages(),this.folderSourceIndexPages(),this.socialEdges(),this.importedBundles(),this.importedBundleCollections(),this.importedBundleItems(),this.importedEntitySnapshots(),this.importedBundleImportReports(),this.searchDocuments()];for(const r of n){t.update(`${Sn(r.name)}:[`);let o=true;await r.orderBy(":id").each(a=>{o||t.update(","),t.update(Sn(a)),o=false;}),t.update(`]
`);}return t.digestHex()}async applyGenerationProjection(t){await this.whenReady();const n=t.tweets??[],r=t.tweetPatches??[],o=t.users??[],a=t.captures??[],i=t.socialEdges??[],s=[...new Set((t.deleteTweets??[]).map(String).filter(Boolean))],l=[...new Set((t.deleteUsers??[]).map(String).filter(Boolean))],c=[...new Set((t.deleteCaptures??[]).map(String).filter(Boolean))],h=[...new Set((t.deleteSocialEdges??[]).map(String).filter(Boolean))];!n.length&&!r.length&&!o.length&&!a.length&&!i.length&&!s.length&&!l.length&&!c.length&&!h.length||await this.enqueueWrite("applyGenerationProjection",async()=>{await this.db.transaction("rw",this.tweets(),this.users(),this.captures(),this.socialEdges(),async()=>{if(s.length&&await this.tweets().bulkDelete(s),l.length&&await this.users().bulkDelete(l),c.length&&await this.captures().bulkDelete(c),h.length&&await this.socialEdges().bulkDelete(h),n.length){const m=await this.tweets().bulkGet(n.map(g=>g.rest_id));await this.bulkPutInChunks(this.tweets(),n.map((g,y)=>Pm(m[y],g)));}if(r.length){const m=await this.tweets().bulkGet(r.map(y=>y.id)),g=r.map((y,b)=>{const k=m[b]??{rest_id:y.id,__scrollmark_generation_patch_stub:true};return {...k,...y.fields,rest_id:y.id,twe_private_fields:{...k.twe_private_fields,...y.fields.twe_private_fields}}});await this.bulkPutInChunks(this.tweets(),g);}o.length&&await this.bulkPutInChunks(this.users(),o),a.length&&await this.bulkPutInChunks(this.captures(),a),i.length&&await this.bulkPutInChunks(this.socialEdges(),i);});const u=[...a.map(m=>m.extension),...i.map(m=>m.extension)];for(const m of new Set(u.filter(Boolean)))await this.invalidateFolderSourceIndexPagesForExtensions([m]);});}async rebuildGenerationSearchDocuments(t){return await this.whenReady(),this.enqueueWrite("rebuildGenerationSearchDocuments",async()=>{var o;await this.db.transaction("rw",this.searchDocuments(),async()=>{await this.searchDocuments().where("source_kind").equals("live").delete();});let n=0,r=null;for(;;){const a=await(r?this.captures().where("id").above(r):this.captures().orderBy("id")).limit(pi).toArray();if(!a.length)break;const i=new Map,s=new Map;for(const l of a){const c=String(l.extension||"").trim(),h=String(l.data_key||"").trim();if(!c||!h)continue;const u=l.type===mt.USER?s:i,m=u.get(c)??new Set;m.add(h),u.set(c,m);}for(const[l,c]of i){const h=(await this.tweets().bulkGet([...c])).filter(m=>!!m),u=this.buildTweetSearchDocuments(l,h);u.length&&await this.db.transaction("rw",this.searchDocuments(),async()=>{await this.bulkPutInChunks(this.searchDocuments(),u);});}for(const[l,c]of s){const h=(await this.users().bulkGet([...c])).filter(m=>!!m),u=this.buildUserSearchDocuments(l,h);u.length&&await this.db.transaction("rw",this.searchDocuments(),async()=>{await this.bulkPutInChunks(this.searchDocuments(),u);});}if(n+=a.length,t==null||t(n),r=((o=a[a.length-1])==null?void 0:o.id)??null,!r||a.length<pi)break}return this.publishCaptureCountSnapshotForAllKnownExtensions(),n})}async rebuildGenerationDerivedIndexes(){await this.whenReady();const t=new Map;await this.captures().each(n=>{const r=String(n.extension||"").trim();if(!r)return;const o=Object.values(mt).includes(n.type)?n.type:mt.CUSTOM,a=`${r}|${o}`,i=t.get(a)??{extension:r,type:o,count:0};i.count+=1,t.set(a,i);});for(const n of t.values())await this.extBuildCaptureIndexPages(n.extension,{type:n.type,order:"newest",sourceCount:n.count}),await this.extBuildCaptureIndexPages(n.extension,{type:n.type,order:"oldest",sourceCount:n.count});}close(){this.db.close();}async readGenerationSourceRows(){return await this.whenReady(),{tweets:await this.tweets().toArray(),users:await this.users().toArray(),captures:await this.captures().toArray(),socialEdges:await this.socialEdges().toArray()}}}function Yb(e){return {schema:"scrollmark.result_source.v1",kind:"captures",extensionName:e.extensionName,extensionType:e.extensionType,sort:{kind:"observed_at",direction:e.direction??"desc"}}}function Jb(e){return {schema:"scrollmark.result_source.v1",kind:"folder",extensionName:e.extensionName,entityType:e.entityType,folderIds:[...e.folderIds],sort:{kind:"observed_at",direction:e.direction??"desc"}}}function Xb(e){var t;return {schema:"scrollmark.result_source.v1",kind:"media",extensionName:e.extensionName,entityType:"tweet",folderIds:(t=e.folderIds)!=null&&t.length?[...e.folderIds]:void 0,sort:{kind:"observed_at",direction:e.direction??"desc"}}}function il(e){return JSON.stringify(e)}const Om="__scrollmark_result_source_diagnostics_v1",uM=24;function Zb(){const e=globalThis,t=e[Om];if(t instanceof Map)return t;const n=new Map;return e[Om]=n,n}function _a(e){const t=Zb();for(t.set(e.sourceKey,{schema:"scrollmark.result_source.diagnostics.v1",mode:e.descriptor.kind,updatedAtMs:e.updatedAtMs??Date.now(),...e});t.size>uM;){const n=[...t.entries()].sort((r,o)=>r[1].updatedAtMs-o[1].updatedAtMs)[0];if(!n)break;t.delete(n[0]);}}function Qb(){return [...Zb().values()].sort((e,t)=>t.updatedAtMs-e.updatedAtMs)}const Lm=160;function Nm(e,t){const n=e[t];if(!(t<0||!n))return {index:t,id:n}}function dM(e,t,n){if(t.after){const r=e[t.after.index]===t.after.id?t.after.index:-1,o=e.indexOf(t.after.id);return Math.max(0,(r>=0?r:o)+1)}if(t.before){const r=e[t.before.index]===t.before.id?t.before.index:-1,o=e.indexOf(t.before.id);return Math.max(0,(r>=0?r:o)-n)}return Math.max(0,Math.floor(Number(t.startIndex)||0))}function ew(e){const t=[...e.ids],n=il(e.descriptor),r=e.totalCount??t.length,o=async a=>{const i=performance.now(),s=Math.max(1,Math.min(1e3,Number(a.limit)||Lm)),l=dM(t,a,s),c=t.slice(l,l+s),h=await e.hydrateByIds(c),u={source:e.descriptor,totalCount:r,startIndex:l,rows:h,rowIds:c,hasBefore:l>0,hasAfter:l+c.length<r,cursorBefore:Nm(t,l),cursorAfter:Nm(t,l+c.length-1)};return _a({sourceKey:n,descriptor:e.descriptor,totalCount:r,cachedPages:0,cachedRows:0,lastFetchDurationMs:performance.now()-i,lastWindowRows:h.length,lastWindowStartIndex:l,lastCacheHit:false}),u};return {key:n,descriptor:e.descriptor,totalCount:async()=>r,getWindow:o,getByIds:e.hydrateByIds,streamRows:async function*(i={}){var c,h;let s=0;i.cursor&&(s=Math.max(0,i.cursor.index+1));const l=Math.max(1,Math.min(1e3,Number(i.batchSize)||Lm));for(;s<r&&!((c=i.signal)!=null&&c.aborted);){const u=await o({startIndex:s,limit:l});for(const m of u.rows){if((h=i.signal)!=null&&h.aborted)return;yield m;}if(!u.rowIds.length||!u.hasAfter)return;s+=u.rowIds.length;}}}}function tw(e){const t={schema:"scrollmark.result_source.v1",kind:"explicit-selection",extensionName:e.extensionName,entityType:e.entityType,ids:[...e.ids],source:e.source};return ew({descriptor:t,ids:e.ids,hydrateByIds:e.hydrateByIds})}function nw(e){const t={schema:"scrollmark.result_source.v1",kind:"search",extensionName:e.extensionName,entityType:e.entityType,query:e.query,folderIds:e.folderIds,searchEngine:e.searchEngine??"worker-corpus",sort:{kind:"search_rank",direction:"desc"}};return ew({descriptor:t,ids:e.ids,totalCount:e.totalCount,hydrateByIds:e.hydrateByIds})}const Bi=160,nu=10,fM=1e3,hM=5e3,Fl=256,pM=1e3,mM=1500,ad="__twe_capture_counts_v2",gM="__twe_active_db_name_v1";class mh{constructor(t=nu){be(this,"entries",new Map);this.maxPages=t;}get(t){const n=this.entries.get(t);return n?(n.touchedAt=Date.now(),n.value):null}set(t,n){if(this.entries.set(t,{key:t,value:n,touchedAt:Date.now()}),this.entries.size<=this.maxPages)return;const r=[...this.entries.values()].sort((o,a)=>o.touchedAt-a.touchedAt);for(const o of r.slice(0,Math.max(0,this.entries.size-this.maxPages)))this.entries.delete(o.key);}get size(){return this.entries.size}get rowCount(){let t=0;for(const n of this.entries.values())t+=n.value.rows.length;return t}}function Di(e,t,n){const r=Math.max(0,Math.floor(Number(t)||0));r>0&&!n||e.set(r,{index:r,cursorAfter:n});}function rw(e,t){let n=null;for(const r of e.values())r.index>t||(!n||r.index>n.index)&&(n=r);return !n||t-n.index>hM?null:n}function gh(e){return JSON.stringify({startIndex:e.startIndex??0,limit:e.limit,after:e.after??null,before:e.before??null,direction:e.direction??"forward"})}function ow(e){return [...new Set(e.map(t=>t.trim()).filter(Boolean))].sort()}function _M(){try{const e=localStorage.getItem(gM);return (e==null?void 0:e.trim())??""}catch{return ""}}function Fm(e){var i;const t=[],n=_M(),r=s=>{if(!s||typeof s!="object")return;const l=s[ad];if(!l||typeof l!="object")return;const c=l[e];if(!c||typeof c!="object")return;const h=c,u=Number(h.count);if(!Number.isFinite(u)||u<0)return;const m=typeof h.dbName=="string"?h.dbName:"",g=Number(h.updatedAt);t.push({count:Math.floor(u),dbName:m,updatedAt:Number.isFinite(g)?g:0});};try{r(globalThis);}catch{}try{typeof window<"u"&&r(window);}catch{}try{const s=localStorage.getItem(ad);s&&r({[ad]:JSON.parse(s)});}catch{}const o=n?t.filter(s=>s.dbName===n):t,a=o.length?o:t;return a.sort((s,l)=>l.updatedAt!==s.updatedAt?l.updatedAt-s.updatedAt:l.count-s.count),((i=a[0])==null?void 0:i.count)??null}function ea(e){if(e)return {observedAtMs:Number(e.observed_at_ms||e.created_at_ms||e.updated_at_ms)||0,documentId:e.id}}function $m(e){if(e)return {createdAt:Number(e.created_at)||0,captureId:e.id}}function Bm(e,t){const n=Number(e.observed_at_ms||e.created_at_ms||e.updated_at_ms)||0,r=Number(t.observed_at_ms||t.created_at_ms||t.updated_at_ms)||0;return r!==n?r-n:t.id.localeCompare(e.id)}function id(e){const t=new Set,n=[];for(const r of e)t.has(r.id)||(t.add(r.id),n.push(r));return n}async function Um(e,t){return e===mt.USER?await Ze.extGetUsersByIds(t)??[]:await Ze.extGetTweetsByIds(t)??[]}async function jm(e,t){return e==="user"?await Ze.extGetUsersByIds(t)??[]:e==="tweet"?await Ze.extGetTweetsByIds(t)??[]:[]}function aw(e){const t=Yb({extensionName:e.extensionName,extensionType:e.extensionType,direction:"desc"}),n=new mh(e.cachePages??nu),r=new Map;Di(r,0);const o=il(t);let a=Fm(e.extensionName),i=null;const s=async()=>{const h=Fm(e.extensionName);return h!==null?(a=h,h):(a!==null||(i||(i=Ze.extGetCaptureCount(e.extensionName,e.extensionType).then(u=>Number(u)||0).finally(()=>{i=null;})),a=await i),a)},l=async(h,u)=>{const m=rw(r,h);if(!m)return null;const g=h+u;let y=m.index,b=m.cursorAfter,k=false;const S=[];for(;y<g;){const M=await Ze.extGetCaptureIdsCursorPage(e.extensionName,{type:e.extensionType,after:b,limit:Math.min(1e3,Math.max(1,g-y)),order:"newest"});if(!M.captures.length){k=false;break}const T=y,P=y+M.captures.length,N=Math.max(0,h-T),I=Math.max(N,Math.min(M.captures.length,g-T));if(S.push(...M.captures.slice(N,I)),y=P,b=M.cursorAfter,k=M.hasAfter,Di(r,y,b),!M.hasAfter||P<=T)break}return {captures:S,cursorBefore:$m(S[0]),cursorAfter:$m(S[S.length-1]),hasBefore:h>0,hasAfter:k||y>g}},c=async h=>{const u=performance.now(),m=Math.max(1,Math.min(1e3,Number(h.limit)||Bi)),g={...h,limit:m,direction:h.direction??"forward"},y=gh(g),b=n.get(y);if(b)return _a({sourceKey:o,descriptor:t,totalCount:b.totalCount,cachedPages:n.size,cachedRows:n.rowCount,lastFetchDurationMs:performance.now()-u,lastWindowRows:b.rows.length,lastWindowStartIndex:b.startIndex,lastCacheHit:true}),b;const k=s();let S=[],M,T,P=false,N=false,I=null;if(g.after||g.before){const E=await Ze.extGetCaptureIdsCursorPage(e.extensionName,{type:e.extensionType,after:g.after,before:g.before,limit:m,order:"newest"});S=E.ids,M=E.cursorBefore,T=E.cursorAfter,P=E.hasBefore,N=E.hasAfter;}else {const E=Math.max(0,Math.floor(Number(g.startIndex)||0));I=await k;const v=await Ze.extGetCaptureIdsIndexedPage(e.extensionName,{type:e.extensionType,offset:E,limit:m,order:"newest",sourceCount:I});if(v)S=v,P=E>0,N=E+S.length<I;else {const L=await l(E,m);L?(S=L.captures.map($=>$.data_key).filter(Boolean),M=L.cursorBefore,T=L.cursorAfter,P=L.hasBefore,N=L.hasAfter):(S=await Ze.extGetCaptureIdsPage(e.extensionName,{type:e.extensionType,offset:E,limit:m,order:"newest"}),P=E>0);}}I??(I=await k),N||(N=Math.max(0,Math.floor(Number(g.startIndex)||0))+S.length<I);const O=await Um(e.extensionType,S),U={source:t,totalCount:I,startIndex:g.startIndex,rows:O,rowIds:S,hasBefore:P,hasAfter:N,cursorBefore:M,cursorAfter:T};return Di(r,Math.max(0,Math.floor(Number(g.startIndex)||0))+S.length,T),n.set(y,U),_a({sourceKey:o,descriptor:t,totalCount:I,cachedPages:n.size,cachedRows:n.rowCount,lastFetchDurationMs:performance.now()-u,lastWindowRows:O.length,lastWindowStartIndex:g.startIndex,lastCacheHit:false}),U};return {key:o,descriptor:t,totalCount:s,getWindow:c,getByIds:h=>Um(e.extensionType,h),streamRows:async function*(u={}){var k,S;let m=u.cursor,g=0;const y=!!u.cursor,b=Math.max(1,Math.min(1e3,Number(u.batchSize)||Bi));for(;!((k=u.signal)!=null&&k.aborted);){const M=y&&m?await c({limit:b,after:m}):await c({startIndex:g,limit:b});for(const T of M.rows){if((S=u.signal)!=null&&S.aborted)return;yield T;}if(!M.hasAfter||!M.rowIds.length)return;if(g+=M.rowIds.length,M.cursorAfter)m=M.cursorAfter;else if(y)return}}}}function gf(e){const t=ow([...e.folderIds??[],...e.folderId?[e.folderId]:[]]),n=Jb({extensionName:e.extensionName,entityType:e.entityType,folderIds:t,direction:"desc"}),r=new mh(e.cachePages??nu),o=new Map;Di(o,0);const a=il(n),i=typeof e.knownTotalCount=="number"&&Number.isFinite(e.knownTotalCount)?Math.max(0,Math.floor(e.knownTotalCount)):null;let s=null;const l=async()=>i!==null?i:(await Promise.all(t.map(k=>Ze.extGetSearchDocumentCount(e.extensionName,{entityType:e.entityType,folderId:k})))).reduce((k,S)=>k+(Number(S)||0),0),c=async(b,k)=>{if(t.length===1)return Ze.extGetSearchDocumentFolderCursorPage(e.extensionName,{entityType:e.entityType,folderId:t[0],after:b.after,before:b.before,limit:k,order:"newest"});const S=await Promise.all(t.map(T=>Ze.extGetSearchDocumentFolderCursorPage(e.extensionName,{entityType:e.entityType,folderId:T,after:b.after,before:b.before,limit:k+1,order:"newest"}))),M=id(S.flatMap(T=>T.documents).sort(Bm)).slice(0,k);return {documents:M,cursorBefore:ea(M[0]),cursorAfter:ea(M[M.length-1]),hasBefore:!!(b.after||b.before),hasAfter:S.some(T=>T.hasAfter)||id(S.flatMap(T=>T.documents)).length>k}},h=async(b,k)=>{const S=rw(o,b);if(!S)return null;const M=b+k;let T=S.index,P=S.cursorAfter,N=false;const I=[];for(;T<M;){const O=await c({after:P},Math.min(1e3,Math.max(1,M-T)));if(!O.documents.length){N=false;break}const U=T,E=T+O.documents.length,v=Math.max(0,b-U),L=Math.max(v,Math.min(O.documents.length,M-U));if(I.push(...O.documents.slice(v,L)),T=E,P=O.cursorAfter,N=O.hasAfter,Di(o,T,P),!O.hasAfter||E<=U)break}return {documents:I,cursorBefore:ea(I[0]),cursorAfter:ea(I[I.length-1]),hasBefore:b>0,hasAfter:N}},u=async(b,k)=>{if(t.length===1)return Ze.extGetSearchDocumentFolderPage(e.extensionName,{entityType:e.entityType,folderId:t[0],offset:b,limit:k,order:"newest"});const S=b+k+1,M=await Promise.all(t.map(async N=>{const I=[];let O=0;for(;I.length<S;){const U=await Ze.extGetSearchDocumentFolderPage(e.extensionName,{entityType:e.entityType,folderId:N,offset:O,limit:Math.min(fM,S-I.length),order:"newest"});if(I.push(...U.documents),!U.hasAfter||!U.documents.length)break;O+=U.documents.length;}return I})),T=id(M.flat().sort(Bm)),P=T.slice(b,b+k);return {documents:P,cursorBefore:ea(P[0]),cursorAfter:ea(P[P.length-1]),hasBefore:b>0,hasAfter:T.length>b+k}},m=async b=>{const k=Ge(),S=Math.max(0,Math.floor(Number(b)||0));if(!S)return false;const M=Ze.readFolderSourceIndexRevision(e.extensionName),T=[];let P=0,N,I=[];for(;;){const E=await c({after:N},1e3);for(I.push(...E.documents);I.length>=Fl;){const $=I.slice(0,Fl);I=I.slice(Fl),T.push({pageStart:P,rowIds:$.map(xe=>xe.raw_ref_key||xe.entity_id).filter(Boolean),cursorAfter:ea($[$.length-1])}),P+=Fl;}const v=N?`${N.observedAtMs}|${N.documentId}`:"",L=E.cursorAfter?`${E.cursorAfter.observedAtMs}|${E.cursorAfter.documentId}`:"";if(!E.hasAfter||!E.cursorAfter||!E.documents.length||L===v)break;N=E.cursorAfter;}I.length&&T.push({pageStart:P,rowIds:I.map(E=>E.raw_ref_key||E.entity_id).filter(Boolean),cursorAfter:ea(I[I.length-1])});const O=await l(),U=Ze.readFolderSourceIndexRevision(e.extensionName);return O!==S||U!==M?(He({kind:"db",name:"folder-source-index-build-stale",durationMs:Ge()-k,value:T.length,tags:{extName:e.extensionName,entityType:e.entityType,folderCount:t.length,expectedCount:S,currentCount:O,sourceRevision:M,currentRevision:U}}),false):(await Ze.extPutFolderSourceIndexPages({sourceKey:a,extensionName:e.extensionName,entityType:e.entityType,folderIds:t,sourceCount:S,sourceRevision:M,pages:T}),He({kind:"db",name:"folder-source-index-build",durationMs:Ge()-k,value:T.length,tags:{extName:e.extensionName,entityType:e.entityType,folderCount:t.length,sourceCount:S,sourceRevision:M}}),true)},g=b=>{const k=Math.max(0,Math.floor(Number(b)||0));k<pM||s||(s=new Promise((S,M)=>{globalThis.setTimeout(()=>{m(k).then(S,M);},mM);}).finally(()=>{s=null;}),s.catch(S=>{He({kind:"db",name:"folder-source-index-build-error",value:0,tags:{extName:e.extensionName,entityType:e.entityType,folderCount:t.length,message:S instanceof Error?S.message:String(S)}});}));},y=async b=>{const k=performance.now(),S=Math.max(1,Math.min(1e3,Number(b.limit)||Bi)),M={...b,limit:S,direction:b.direction??"forward"},T=gh(M),P=r.get(T);if(P)return _a({sourceKey:a,descriptor:n,totalCount:P.totalCount,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-k,lastWindowRows:P.rows.length,lastWindowStartIndex:P.startIndex,lastCacheHit:true}),P;const N=Math.max(0,Math.floor(Number(M.startIndex)||0)),I=l();let O=null,U=[],E,v,L=false,$=false;const xe=!!(M.after||M.before);if(xe){const Q=await c(M,S);U=Q.documents.map(ce=>ce.raw_ref_key||ce.entity_id).filter(Boolean),E=Q.cursorBefore,v=Q.cursorAfter,L=Q.hasBefore,$=Q.hasAfter;}else {O=await I;const Q=await Ze.extGetFolderSourceIndexedPage({sourceKey:a,extensionName:e.extensionName,entityType:e.entityType,folderIds:t,sourceCount:O,offset:N,limit:S});if(Q)U=Q.rowIds,v=Q.cursorAfter,L=N>0,$=N+U.length<O;else {g(O);const ce=await h(N,S)??await u(N,S);U=ce.documents.map(me=>me.raw_ref_key||me.entity_id).filter(Boolean),E=ce.cursorBefore,v=ce.cursorAfter,L=ce.hasBefore,$=ce.hasAfter;}}O??(O=await I),!xe&&!$&&($=N+U.length<O);const G=await jm(e.entityType,U),le={source:n,totalCount:O,startIndex:M.startIndex,rows:G,rowIds:U,hasBefore:L,hasAfter:$,cursorBefore:E,cursorAfter:v};return Di(o,N+U.length,v),r.set(T,le),_a({sourceKey:a,descriptor:n,totalCount:O,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-k,lastWindowRows:G.length,lastWindowStartIndex:M.startIndex,lastCacheHit:false}),le};return {key:a,descriptor:n,totalCount:l,getWindow:y,getByIds:b=>jm(e.entityType,b),streamRows:async function*(k={}){var N,I;let S=k.cursor,M=0;const T=!!k.cursor,P=Math.max(1,Math.min(1e3,Number(k.batchSize)||Bi));for(;!((N=k.signal)!=null&&N.aborted);){const O=T&&S?await y({limit:P,after:S}):await y({startIndex:M,limit:P});for(const U of O.rows){if((I=k.signal)!=null&&I.aborted)return;yield U;}if(!O.hasAfter||!O.rows.length)return;if(M+=O.rows.length,O.cursorAfter)S=O.cursorAfter;else if(T)return}}}}function iw(e){const t=ow(e.folderIds??[]),n=Xb({extensionName:e.extensionName,folderIds:t,direction:"desc"}),r=new mh(e.cachePages??nu),o=il(n);let a=null,i=null;const s=async()=>i!==null?i:(a||(a=Ze.extGetSearchDocumentMediaCount(e.extensionName,{entityType:"tweet",folderIds:t}).then(c=>(i=Number(c)||0,i)).catch(c=>{throw a=null,c})),await a),l=async c=>{const h=performance.now(),u=Math.max(1,Math.min(1e3,Number(c.limit)||Bi)),m={...c,limit:u,direction:c.direction??"forward"},g=gh(m),y=r.get(g);if(y)return _a({sourceKey:o,descriptor:n,totalCount:y.totalCount,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-h,lastWindowRows:y.rows.length,lastWindowStartIndex:y.startIndex,lastCacheHit:true}),y;const b=Math.max(0,Math.floor(Number(m.startIndex)||0)),k=await Ze.extGetSearchDocumentMediaCursorPage(e.extensionName,{entityType:"tweet",folderIds:t,after:m.after,before:m.before,offset:m.after||m.before?void 0:b,limit:u,order:"newest"}),S=i??Math.max(b+k.documents.length+(k.hasAfter?1:0),0),M=k.documents.map(N=>N.entity_id).filter(Boolean),T=await Ze.extGetTweetsByIds(M)??[],P={source:n,totalCount:S,startIndex:m.startIndex,rows:T,rowIds:M,hasBefore:k.hasBefore,hasAfter:k.hasAfter,cursorBefore:k.cursorBefore,cursorAfter:k.cursorAfter};return r.set(g,P),_a({sourceKey:o,descriptor:n,totalCount:S,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-h,lastWindowRows:T.length,lastWindowStartIndex:m.startIndex,lastCacheHit:false}),i===null&&globalThis.setTimeout(()=>{s().catch(()=>{});},3e3),P};return {key:o,descriptor:n,totalCount:s,getWindow:l,getByIds:async c=>await Ze.extGetTweetsByIds(c)??[],streamRows:async function*(h={}){var b,k;let u=h.cursor,m=0;const g=!!h.cursor,y=Math.max(1,Math.min(1e3,Number(h.batchSize)||Bi));for(;!((b=h.signal)!=null&&b.aborted);){const S=g&&u?await l({limit:y,after:u}):await l({startIndex:m,limit:y});for(const M of S.rows){if((k=h.signal)!=null&&k.aborted)return;yield M;}if(!S.hasAfter||!S.rows.length)return;if(m+=S.rows.length,S.cursorAfter)u=S.cursorAfter;else if(g)return}}}}let Ti=null,$l=null;function Ui(){if(Ti)return Ti;const e=Ki(),t=Gi(),n=e?Wi(e.archive_id,e.namespace_id):null,r=e?t&&!n?`twitter-web-exporter-quarantine-${e.namespace_id.replace(/[^a-zA-Z0-9_-]/g,"_")}`:n==null?void 0:n.database_name:ET();return Ti=new tu({databaseName:r??void 0}),Ti}function _h(){const e=Ti;Ti=null;try{e==null||e.close();}catch{}}function sl(){if($l)return $l;const e=Ki();return $l=new ST({pairing:e,client:e?new Zc(e):null}),$l}function sw(){return sl().getStatus()}const Ze=new Proxy({},{get(e,t,n){const r=Ui(),o=Reflect.get(r,t,n);return typeof o!="function"?o:typeof t!="string"||!Ib.has(t)?o.bind(r):(...a)=>sl().route(t,a,()=>o.apply(r,a))},set(e,t,n,r){const o=Ui();return Reflect.set(o,t,n,r)}}),yM=Object.freeze(Object.defineProperty({__proto__:null,DatabaseManager:tu,createCaptureResultSourceDescriptor:Yb,createExplicitSelectionResultSource:tw,createFolderResultSource:gf,createFolderResultSourceDescriptor:Jb,createLiveCapturesResultSource:aw,createMediaResultSource:iw,createMediaResultSourceDescriptor:Xb,createSearchResultSourceAdapter:nw,db:Ze,getDatabaseManager:Ui,getDurabilityCoordinator:sl,getDurabilityStatus:sw,readResultSourceDiagnostics:Qb,recordResultSourceDiagnostics:_a,resetDatabaseManager:_h,serializeResultSourceDescriptor:il},Symbol.toStringTag,{value:"Module"})),Hm="__twe_active_db_name_v1",sd="BookmarksModule",bM=["twitter-web-exporter","scrollmark"],wM=["captures","tweets","users","social_edges","search_documents","imported_bundles","imported_entity_snapshots"];function lw(e){return bM.some(t=>e.includes(t))}function vM(){const e=t=>{if(!t||typeof t!="object")return null;const n=t[Hm];return typeof n=="string"&&n.trim()?n.trim():null};try{const t=e(globalThis);if(t)return t}catch{}try{if(typeof window<"u"){const t=e(window);if(t)return t}}catch{}try{if(typeof localStorage<"u"){const t=localStorage.getItem(Hm);if(t!=null&&t.trim())return t.trim()}}catch{}return null}function cw(){return typeof indexedDB<"u"&&typeof indexedDB.databases=="function"}async function kM(){if(!cw())return [];try{const e=await indexedDB.databases();return Array.from(new Set((e||[]).map(t=>t==null?void 0:t.name).filter(t=>typeof t=="string"&&lw(t)))).sort()}catch{return []}}function ld(e){return new Promise(t=>{e.onsuccess=()=>t(Number(e.result)||0),e.onerror=()=>t(0);})}async function xM(e,t){return await new Promise(n=>{const r=indexedDB.open(e);r.onerror=()=>{var o;n({name:e,active:e===t,tables:{},error:((o=r.error)==null?void 0:o.message)||"open failed"});},r.onsuccess=()=>{const o=r.result;(async()=>{try{const a=wM.filter(m=>o.objectStoreNames.contains(m));if(!a.length){o.close(),n({name:e,active:e===t,tables:{}});return}const i={},s=o.transaction(a,"readonly");s.onerror=()=>{var m;o.close(),n({name:e,active:e===t,tables:i,error:((m=s.error)==null?void 0:m.message)||"transaction failed"});};const l={};let c;const h=a.map(async m=>{i[m]=await ld(s.objectStore(m).count());}),u=[];if(a.includes("captures")){const m=s.objectStore("captures");m.indexNames.contains("extension")&&u.push(ld(m.index("extension").count(sd)).then(g=>{l[sd]=g;})),m.indexNames.contains("[extension+type]")&&u.push(ld(m.index("[extension+type]").count([sd,"tweet"])).then(g=>{c=g;}));}await Promise.all([...h,...u]),o.close(),n({name:e,active:e===t,tables:i,captures_by_extension:Object.keys(l).length?l:void 0,bookmark_tweet_captures:c});}catch(a){o.close(),n({name:e,active:e===t,tables:{},error:a instanceof Error?a.message:String(a)});}})();};})}async function yh(){const e=vM(),t=cw(),n=await kM(),r=t&&!!e&&lw(e)&&!n.includes(e);if(typeof indexedDB>"u"||!t)return {active_db_name:e,enumeration_supported:false,databases:[]};const o=await Promise.all(n.map(a=>xM(a,e)));return r&&e&&o.push({name:e,active:true,tables:{},error:"active database missing"}),o.sort((a,i)=>a.name.localeCompare(i.name)),{active_db_name:e,enumeration_supported:true,databases:o}}function uw(){try{const e=globalThis.GM_info;if(!e||typeof e!="object")return {};const t=e,n=t.script&&typeof t.script=="object"?t.script:{};return {scriptHandler:t.scriptHandler,version:t.version,platform:t.platform,script:n}}catch{return {}}}function dw(){const e=typeof navigator<"u"?navigator:null;return {userAgent:(e==null?void 0:e.userAgent)??"",vendor:(e==null?void 0:e.vendor)??"",platform:(e==null?void 0:e.platform)??"",language:(e==null?void 0:e.language)??"",languages:e!=null&&e.languages?[...e.languages]:[],cookieEnabled:(e==null?void 0:e.cookieEnabled)??null,webdriver:(e==null?void 0:e.webdriver)??null}}async function SM(){const e=await Ze.count().catch(()=>null),t=(await Ze.bundleList().catch(()=>[])??[]).map(n=>({id:n.id,title:n.title,status:n.status,recordCount:n.recordCount,schemaVersion:n.schemaVersion,importedAt:n.importedAt,updatedAt:n.updatedAt}));return {generated_at_ms:Date.now(),browser:dw(),userscript_manager:uw(),runtime_modes:pw(),hook_stats:mw(),raw_capture_stats:Ac(),diagnostic_capture_enabled:Ur(),database_counts:e,imported_bundle_count:t.length,imported_bundles:t,checklist:{canonical_bundle_export:"manual-qc-required",canonical_bundle_import:"manual-qc-required",legacy_json_import:"manual-qc-required",malicious_import_safety:"manual-qc-required",chrome_parity:"manual-qc-required",firefox_parity:"manual-qc-required"}}}async function fw(){const e=Date.now(),t=new Date(e).toISOString(),n=globalThis,r=await(async()=>{try{if(!(indexedDB!=null&&indexedDB.databases))return [];const m=await indexedDB.databases();return (Array.isArray(m)?m:[]).map(g=>g==null?void 0:g.name).filter(g=>typeof g=="string")}catch{return []}})(),o=await yh(),a=(()=>{try{const m=n.__twe_raw_events_v1;return Array.isArray(m)?m.slice(-10).map(g=>{if(!g||typeof g!="object")return null;const y=g;return {event_id:typeof y.event_id=="string"?y.event_id:null,kind:typeof y.kind=="string"?y.kind:null,wall_time_ms:typeof y.wall_time_ms=="number"?y.wall_time_ms:null,route_type:typeof y.route_type=="string"?y.route_type:null}}):[]}catch{return []}})(),i=(()=>{try{const m=n.__twe_raw_events_v1;return Array.isArray(m)?m.slice():[]}catch{return []}})(),s=Nx(),l=bc.value.slice(-400),c=["twe_safe_mode_v1","twe_hook_mode_v1","twe_repair_mode_v1","twe_raw_capture_enabled_v1","twe_raw_capture_encryption_ready_v1","twe_raw_capture_dm_session_armed_until_ms_v1","twe_raw_capture_stream_enabled_v1","twe_raw_capture_daemon_url_v1"],h={};for(const m of c)try{h[m]=localStorage.getItem(m);}catch{h[m]=null;}const u={dedicatedDbForAccounts:et.get("dedicatedDbForAccounts",false),directMessagesCaptureEnabled:et.get("directMessagesCaptureEnabled",false),rawCaptureEncryptedStorageReady:et.get("rawCaptureEncryptedStorageReady",false),rawCapturePolicyPublicEnabled:et.get("rawCapturePolicyPublicEnabled",true),rawCapturePolicySensitiveEnabled:et.get("rawCapturePolicySensitiveEnabled",true),rawCapturePolicyDmEnabled:et.get("rawCapturePolicyDmEnabled",true)};return {generated_at_ms:e,generated_at_iso:t,location:typeof location<"u"?location.href:"",title:typeof document<"u"?document.title:"",runtime_modes:pw(),hook_stats:mw(),browser:dw(),userscript_manager:uw(),release_readiness:await SM(),performance:eM(),result_sources:Qb(),raw_capture_stats:Ac(),raw_events_recent:a,raw_events_count:i.length,diagnostic_capture_enabled:Ur(),diagnostic_buffer_counts:{parser:s.parser.length,db:s.db.length,interaction:s.interaction.length,logs:l.length},indexeddb_names:r,indexeddb_inventory:o,local_storage:h,app_options:u,raw_events_full:i,diagnostic_buffers:s,recent_logs:l}}function hw(e,t){const n=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=t,o.click(),URL.revokeObjectURL(r);}async function bh(){const e=await fw(),t=Date.now(),{raw_events_full:n=[],diagnostic_buffers:r={parser:[],db:[],interaction:[]},recent_logs:o=[],...a}=e,i=[{filename:"summary.json",blob:new Blob([JSON.stringify(a,null,2)],{type:"application/json"})},{filename:"raw-events.json",blob:new Blob([JSON.stringify(n,null,2)],{type:"application/json"})},{filename:"parser-events.json",blob:new Blob([JSON.stringify(r.parser??[],null,2)],{type:"application/json"})},{filename:"db-events.json",blob:new Blob([JSON.stringify(r.db??[],null,2)],{type:"application/json"})},{filename:"interaction-events.json",blob:new Blob([JSON.stringify(r.interaction??[],null,2)],{type:"application/json"})},{filename:"recent-logs.json",blob:new Blob([JSON.stringify(o,null,2)],{type:"application/json"})},{filename:"release-readiness.json",blob:new Blob([JSON.stringify(a.release_readiness??{},null,2)],{type:"application/json"})}];return await sh(`twe-diagnostics-${t}.zip`,i)}function CM(){try{return localStorage.getItem("twe_enable_synthetic_db_tools_v1")==="1"||location.search.includes("scrollmarkSyntheticDb=1")}catch{return false}}function TM(){if(!CM())return;const e=globalThis;e.__scrollmark_collect_diagnostics_bundle_v1=fw,e.__scrollmark_export_diagnostics_bundle_zip_v1=bh;}TM();function Ac(){try{const e=globalThis.__twe_raw_capture_stats_v1;return !e||typeof e!="object"?{}:e}catch{return {}}}function pw(){try{const e=globalThis.__twe_runtime_modes_v1;return !e||typeof e!="object"?{}:e}catch{return {}}}function mw(){try{const e=globalThis.__twe_hook_stats_v1;return !e||typeof e!="object"?{}:e}catch{return {}}}const _f="__twe_continuity_sentinel_v1",qm="__twe_persistence_report_v1",MM="__twe_allow_continuity_local_fallback_v1",yf=1,bf={captures:0,tweets:0,users:0,social_edges:0,search_documents:0,total:0},gw={phase:"checking",reason:"startup-check",checked_at_ms:null,storage_backend:"unavailable",sentinel:null,sentinel_present:false,sentinel_valid:false,inventory:null,current_counts:null,error:null,persistence:null},yr=Oo(gw),Va=globalThis;function wr(e){const t=Number(e);return Number.isFinite(t)&&t>=0?Math.floor(t):0}function _w(e){const t=e&&typeof e=="object"?e:{},n=wr(t.captures),r=wr(t.tweets),o=wr(t.users),a=wr(t.social_edges),i=wr(t.search_documents),l=wr(t.total)||Math.max(n,r,o,i);return {captures:n,tweets:r,users:o,social_edges:a,search_documents:i,total:l}}function Vm(e){return Array.isArray(e)?Array.from(new Set(e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(Boolean))).sort():[]}function cd(e){return typeof e=="string"&&e.trim()?e.trim():null}function zm(e){if(e==null||e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}function yw(e){return {schema_version:e.schema_version,archive_uuid:e.archive_uuid,companion_protocol_version:e.companion_protocol_version,account_ids:e.account_ids,namespace_ids:e.namespace_ids,active_db_name:e.active_db_name,approximate_counts:e.approximate_counts,last_acknowledged_durable_seq:e.last_acknowledged_durable_seq,last_verified_backup_at_ms:e.last_verified_backup_at_ms,updated_at_ms:e.updated_at_ms}}function bw(e){return JSON.stringify(yw(e))}async function ww(e){const t=Va.crypto;if(!(t!=null&&t.subtle))throw new Error("Web Crypto is unavailable for continuity checksum verification");const n=new TextEncoder().encode(e),r=await t.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("")}function vw(){const e=Va.GM_getValue,t=Va.GM_setValue;if(typeof e=="function"&&typeof t=="function")return {backend:"userscript",read:r=>e(r),write:(r,o)=>t(r,o)};if(Va[MM]!==true)return null;const n=Va.localStorage;return !(n!=null&&n.getItem)||!n.setItem?null:{backend:"test-local",read:r=>{var o;return (o=n.getItem)==null?void 0:o.call(n,r)},write:(r,o)=>{var a;return (a=n.setItem)==null?void 0:a.call(n,r,JSON.stringify(o))}}}function IM(e){if(!e||typeof e!="object")return null;const t=e,n=t.state;if(n!=="granted"&&n!=="denied"&&n!=="unsupported"&&n!=="error")return null;const r=wr(t.requested_at_ms),o=wr(t.observed_at_ms);return !r||!o||typeof t.origin!="string"?null:{schema_version:1,state:n,requested_at_ms:r,observed_at_ms:o,origin:t.origin||"unknown",...typeof t.error_code=="string"&&t.error_code?{error_code:t.error_code}:{}}}function fs(){const e=Va.location;return typeof(e==null?void 0:e.origin)=="string"&&e.origin?e.origin:"unknown"}function RM(e){if(e&&typeof e=="object"){const t=e.name;if(typeof t=="string"&&t)return t}return "request-error"}async function EM(e){const t=Date.now();let n;try{n=await e.read(qm),typeof n=="string"&&(n=JSON.parse(n));}catch{return {schema_version:1,state:"error",requested_at_ms:t,observed_at_ms:t,origin:fs(),error_code:"report-read-failed"}}if(n!=null&&n!==""){const s=IM(n);return s||{schema_version:1,state:"error",requested_at_ms:t,observed_at_ms:t,origin:fs(),error_code:"invalid-report"}}const r=Va.navigator,o=r==null?void 0:r.storage,a=o==null?void 0:o.persist;let i;if(typeof a!="function"||!o)i={schema_version:1,state:"unsupported",requested_at_ms:t,observed_at_ms:Date.now(),origin:fs()};else try{i={schema_version:1,state:!!await a.call(o)?"granted":"denied",requested_at_ms:t,observed_at_ms:Date.now(),origin:fs()};}catch(s){i={schema_version:1,state:"error",requested_at_ms:t,observed_at_ms:Date.now(),origin:fs(),error_code:RM(s)};}try{await e.write(qm,i);}catch{return {...i,state:"error",error_code:"report-write-failed"}}return i}function AM(e){if(!e||typeof e!="object")return null;const t=e,n=t.payload&&typeof t.payload=="object"?t.payload:t,r=typeof t.checksum=="string"?t.checksum.toLowerCase():"";if(!/^[a-f0-9]{64}$/.test(r)||Number(n.schema_version)!==yf)return null;const o=wr(n.updated_at_ms);return o?{schema_version:yf,archive_uuid:cd(n.archive_uuid),companion_protocol_version:cd(n.companion_protocol_version),account_ids:Vm(n.account_ids),namespace_ids:Vm(n.namespace_ids),active_db_name:cd(n.active_db_name),approximate_counts:_w(n.approximate_counts),last_acknowledged_durable_seq:zm(n.last_acknowledged_durable_seq),last_verified_backup_at_ms:zm(n.last_verified_backup_at_ms),updated_at_ms:o,checksum:r}:null}async function DM(){const e=vw();if(!e)return {backend:"unavailable",present:false,valid:false,sentinel:null};let t;try{t=await e.read(_f),typeof t=="string"&&(t=JSON.parse(t));}catch{return {backend:e.backend,present:true,valid:false,sentinel:null}}if(t==null||t==="")return {backend:e.backend,present:false,valid:false,sentinel:null};const n=AM(t);if(!n)return {backend:e.backend,present:true,valid:false,sentinel:null};try{const r=yw({schema_version:n.schema_version,archive_uuid:n.archive_uuid,companion_protocol_version:n.companion_protocol_version,account_ids:n.account_ids,namespace_ids:n.namespace_ids,active_db_name:n.active_db_name,approximate_counts:n.approximate_counts,last_acknowledged_durable_seq:n.last_acknowledged_durable_seq,last_verified_backup_at_ms:n.last_verified_backup_at_ms,updated_at_ms:n.updated_at_ms}),o=await ww(bw(r));return {backend:e.backend,present:!0,valid:o===n.checksum,sentinel:o===n.checksum?n:null}}catch{return {backend:e.backend,present:true,valid:false,sentinel:null}}}function PM(e){if(!e)return {...bf};const t=e.tables||{},n=wr(t.captures),r=wr(t.tweets),o=wr(t.users),a=wr(t.social_edges),i=wr(t.search_documents);return _w({captures:n,tweets:r,users:o,social_edges:a,search_documents:i,total:Math.max(n,r,o,i)})}function OM(e,t){return e!=null&&e.active_db_name?t.databases.find(n=>n.name===e.active_db_name)||null:t.databases.find(n=>n.active)||(t.databases.length===1?t.databases[0]:null)||null}function LM(e,t){const n=(e==null?void 0:e.approximate_counts)||bf,r=n.total>0;if(!t.enumeration_supported)return {phase:r?"recovery_required":"warning",reason:r?"inventory-unavailable":"inventory-unavailable-no-baseline",current_counts:{...bf},current_db_name:t.active_db_name};const o=OM(e,t),a=PM(o),i=(o==null?void 0:o.name)||t.active_db_name||null;if(o!=null&&o.error&&r)return {phase:"recovery_required",reason:"active-database-unreadable",current_counts:a,current_db_name:i};if(r&&!o)return {phase:"recovery_required",reason:"active-database-missing",current_counts:a,current_db_name:i};if(r&&(e!=null&&e.active_db_name)&&t.active_db_name&&e.active_db_name!==t.active_db_name)return {phase:"recovery_required",reason:"active-database-changed",current_counts:a,current_db_name:i};const s=n.total,l=a.total;return r&&l<Math.max(1,Math.floor(s*.5))?{phase:"recovery_required",reason:"archive-count-dropped",current_counts:a,current_db_name:i}:o!=null&&o.error?{phase:"warning",reason:"active-database-unreadable-no-baseline",current_counts:a,current_db_name:i}:!o&&t.databases.length>1?{phase:"warning",reason:"account-identity-ambiguous",current_counts:a,current_db_name:i}:{phase:"healthy",reason:e?"continuity-verified":"baseline-created",current_counts:a,current_db_name:i}}async function Km(e,t,n){const r={schema_version:yf,archive_uuid:(e==null?void 0:e.archive_uuid)||null,companion_protocol_version:(e==null?void 0:e.companion_protocol_version)||null,account_ids:(e==null?void 0:e.account_ids)||[],namespace_ids:(e==null?void 0:e.namespace_ids)||[],active_db_name:t.active_db_name||(e==null?void 0:e.active_db_name)||null,approximate_counts:n,last_acknowledged_durable_seq:(e==null?void 0:e.last_acknowledged_durable_seq)??null,last_verified_backup_at_ms:(e==null?void 0:e.last_verified_backup_at_ms)??null,updated_at_ms:Date.now()};return {...r,checksum:await ww(bw(r))}}function Or(e){return {...gw,checked_at_ms:Date.now(),...e}}let Bl=null;async function NM(e){const t=vw();if(!t){const s=Or({phase:"recovery_required",reason:"continuity-storage-unavailable",error:"Userscript manager storage is unavailable; the archive cannot be guarded."});return yr.value=s,s}const n=await EM(t),r=await DM();if(r.present&&!r.valid){const s=Or({phase:"recovery_required",reason:"continuity-sentinel-invalid",storage_backend:r.backend,persistence:n,sentinel_present:true,error:"The continuity sentinel failed checksum or schema validation."});return yr.value=s,s}let o;try{o=await yh();}catch(s){const l=Or({phase:"recovery_required",reason:"inventory-read-failed",storage_backend:r.backend,persistence:n,sentinel:r.sentinel,sentinel_present:r.present,sentinel_valid:r.valid,error:s instanceof Error?s.message:String(s)});return yr.value=l,l}const a=LM(r.sentinel,o);if(e.acknowledgeCacheReset&&o.enumeration_supported){let s;try{s=await Km(r.sentinel,o,a.current_counts);}catch(l){const c=Or({phase:"recovery_required",reason:"continuity-checksum-unavailable",storage_backend:r.backend,persistence:n,sentinel:r.sentinel,sentinel_present:r.present,sentinel_valid:r.valid,inventory:o,current_counts:a.current_counts,error:l instanceof Error?l.message:String(l)});return yr.value=c,c}try{await t.write(_f,s);const l=Or({phase:"healthy",reason:"cache-clear-acknowledged",storage_backend:r.backend,persistence:n,sentinel:s,sentinel_present:!0,sentinel_valid:!0,inventory:o,current_counts:a.current_counts});return yr.value=l,l}catch(l){const c=Or({phase:"recovery_required",reason:"continuity-sentinel-write-failed",storage_backend:r.backend,persistence:n,sentinel:r.sentinel,sentinel_present:r.present,sentinel_valid:r.valid,inventory:o,current_counts:a.current_counts,error:l instanceof Error?l.message:String(l)});return yr.value=c,c}}if(a.phase==="recovery_required"){const s=Or({phase:a.phase,reason:a.reason,storage_backend:r.backend,persistence:n,sentinel:r.sentinel,sentinel_present:r.present,sentinel_valid:r.valid,inventory:o,current_counts:a.current_counts});return yr.value=s,s}if(!o.enumeration_supported||a.phase==="warning"){const s=Or({phase:a.phase,reason:a.reason,storage_backend:r.backend,persistence:n,sentinel:r.sentinel,sentinel_present:r.present,sentinel_valid:r.valid,inventory:o,current_counts:a.current_counts});return yr.value=s,s}let i;try{i=await Km(r.sentinel,o,a.current_counts);}catch(s){const l=Or({phase:"recovery_required",reason:"continuity-checksum-unavailable",storage_backend:r.backend,persistence:n,sentinel:r.sentinel,sentinel_present:r.present,sentinel_valid:r.valid,inventory:o,current_counts:a.current_counts,error:s instanceof Error?s.message:String(s)});return yr.value=l,l}try{await t.write(_f,i);const s=Or({phase:a.phase,reason:a.reason,storage_backend:r.backend,persistence:n,sentinel:i,sentinel_present:!0,sentinel_valid:!0,inventory:o,current_counts:a.current_counts});return yr.value=s,s}catch(s){const l=Or({phase:"recovery_required",reason:"continuity-sentinel-write-failed",storage_backend:r.backend,persistence:n,sentinel:r.sentinel,sentinel_present:r.present,sentinel_valid:r.valid,inventory:o,current_counts:a.current_counts,error:s instanceof Error?s.message:String(s)});return yr.value=l,l}}function ji(e={}){return Bl&&!e.force||(Bl=NM(e).catch(t=>{const n=Or({phase:"recovery_required",reason:"startup-check-failed",error:t instanceof Error?t.message:String(t)});return yr.value=n,n})),Bl}async function kw(){const{db:e}=await Yy(async()=>{const{db:t}=await Promise.resolve().then(()=>yM);return {db:t}},void 0);return await e.clear(),ji({force:true,acknowledgeCacheReset:true})}function FM(e){return String(e||"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/_+/g,"_")}function $M(e){const t=e.data&&typeof e.data=="object"?e.data:{},n=t.metadata&&typeof t.metadata=="object"?t.metadata:{},r=[t.full_text,t.text,t.description,n.legacy&&typeof n.legacy=="object"?n.legacy.full_text:void 0,t.name,t.screen_name];for(const o of r)if(typeof o=="string"&&o.trim())return o.trim();return String(e.search_text||"").slice(0,240)}function ud(e){if(typeof e!="string")return null;try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?t.href:null}catch{return null}}function Gm(e){const t=new Set;for(const o of e.media_refs||[]){const a=ud(o.previewUrl),i=ud(o.url);a&&t.add(a),i&&t.add(i);}const n=e.data&&typeof e.data=="object"?e.data:{},r=Array.isArray(n.media)?n.media:[];for(const o of r){if(!o||typeof o!="object")continue;const a=o;for(const i of ["thumbnail","original","url","media_url_https"]){const s=a[i],l=ud(s);l&&t.add(l);}}return [...t].slice(0,8)}async function Wm(){await new Promise(e=>{setTimeout(e,0);});}function BM(){const{t:e,i18n:t}=er(),n=tn(et.get("theme")),r=tn(0),[o,a]=Tr(false),[i,s]=Tr(false),[l,c]=Tr(false),[h,u]=Tr(false),m=tn(true),g=tn(true),y=tn(false),b=tn({current:0,total:0}),k=tn(""),S=tn(null),M=tn(""),T=tn(""),P=tn([]),N=tn([]),I=tn(""),O=tn(""),U=tn("all"),E=tn(""),v=tn(false),L=tn(""),$=tn(false),xe=tn(Ur()),G={subtitle:"mb-2 text-base-content ml-4 opacity-50 font-semibold text-xs",block:"text-sm mb-2 w-full flex px-4 py-2 text-base-content bg-base-200 rounded-box justify-between",item:"label cursor-pointer flex justify-between h-8 items-center p-0",wrapButton:"btn btn-xs h-auto min-h-6 max-w-full whitespace-normal break-words text-center leading-tight"},le=async()=>{if(y.value)return;y.value=true,S.value=null,k.value="Preparing export...",b.value={current:0,total:0};const z=Date.now(),ae=[],Le=[];let fe=0;try{if(m.value){k.value="Exporting DB snapshot...";const ne=await Ze.export();ne&&ae.push({filename:"database/twitter-web-exporter-db.json",blob:ne});}if(g.value){k.value="Collecting module exports...";const ne=hr.getExtensions(),H=ne.length;for(const[se,_e]of ne.entries()){k.value=`Collecting module exports (${se+1}/${H}): ${_e.name}`;const ve=await Ze.extGetCaptures(_e.name)??[];if(!ve.length){fe+=1,await Wm();continue}let Ye=[];_e.type===mt.TWEET?Ye=await Ze.extGetCapturedTweets(_e.name,ve)??[]:_e.type===mt.USER&&(Ye=await Ze.extGetCapturedUsers(_e.name,ve)??[]);const Ie=`modules/${FM(_e.name)}.json`,xt={extension:_e.name,type:_e.type,exported_at_ms:z,capture_count:ve.length,record_count:Ye.length,captures:ve,records:Ye};ae.push({filename:Ie,blob:new Blob([JSON.stringify(xt)],{type:"application/json"})}),Le.push({extension:_e.name,type:_e.type,capture_count:ve.length,record_count:Ye.length,filename:Ie}),await Wm();}}const Pe={generated_at_ms:z,generated_at_iso:new Date(z).toISOString(),include_db_snapshot:m.value,include_module_exports:g.value,files_total:ae.length+1,modules_exported:Le.length,modules_skipped_empty:fe,modules:Le};if(ae.unshift({filename:"manifest.json",blob:new Blob([JSON.stringify(Pe,void 0,2)],{type:"application/json"})}),!ae.length)throw new Error("No files prepared for bundle export.");const it=`twitter-web-exporter-bundle-${z}.zip`;k.value="Creating ZIP...",b.value={current:0,total:ae.length};const X=await sh(it,ae,(ne,H)=>{b.value={current:ne,total:H};});T.value&&(URL.revokeObjectURL(T.value),T.value=""),M.value=it,T.value=URL.createObjectURL(X),k.value=`Bundle export completed: ${it}`,S.value={modules:Le.length,files:ae.length,skipped:fe};}catch(Pe){k.value=`Bundle export failed: ${(Pe==null?void 0:Pe.message)??"Unknown error"}`;}finally{y.value=false;}},Q=async()=>{P.value=await Ze.bundleList()??[];},ce=async z=>{if(!(!z||v.value)){v.value=true,E.value=`Importing ${z.name}...`;try{const Le=z.name.toLowerCase().endsWith(".zip")||z.type==="application/zip"||z.type==="application/x-zip-compressed"?await fb(Ze,z):await mb(Ze,z);E.value=`Imported ${Le.recordsImported}/${Le.recordsSeen} records from ${z.name}`,await Q();}catch(ae){E.value=`Import failed: ${ae.message}`;}finally{v.value=false;}}},me=async()=>{if(!I.value){N.value=[];return}const z=await Ze.bundleSearchSnapshots(I.value,O.value,1e3)??[];N.value=U.value==="all"?z:z.filter(ae=>ae.kind===U.value);},pe=async()=>{const z=P.value.find(ae=>ae.id===I.value);!z||!N.value.length||await dC(N.value.map((ae,Le)=>({id:ae.source_id||ae.id||String(Le),original:ae.data,record:ae.data&&typeof ae.data=="object"?ae.data:{value:ae.data}})),{title:`${z.title}-subset`,description:`Re-exported subset from imported bundle ${z.id}`,scope:"bundle",queryText:O.value});},we=async()=>{if(!$.value){$.value=true,L.value="Preparing QC diagnostics bundle...";try{await bh(),L.value="QC diagnostics bundle exported.";}catch(z){L.value=`QC diagnostics export failed: ${z.message}`;}finally{$.value=false;}}};return ot(()=>{const z=et.signal.subscribe(()=>{r.value++,n.value=et.get("theme");});return ()=>{typeof z=="function"&&z(),T.value&&URL.revokeObjectURL(T.value);}},[]),ot(()=>{l&&Q();},[l]),ot(()=>{typeof vc=="function"&&vc(`${e("Version")} ${Br.version}`,()=>{window.open(Br.homepage,"_blank");});},[]),f(sr,{children:[f("div",{onClick:a,class:"w-9 h-9 mr-2 cursor-pointer flex justify-center items-center transition-colors duration-200 rounded-full hover:bg-base-200",children:f(Dk,{})}),f(vr,{title:e("Settings"),show:o,onClose:a,class:"max-w-lg",children:[f("p",{class:G.subtitle,children:e("General")}),f("div",{class:on(G.block,"flex-col"),children:[f("label",{class:G.item,children:[f("span",{class:"label-text whitespace-nowrap",children:e("Theme")}),f("select",{class:"select select-xs",onChange:z=>{var ae;n.value=((ae=z.target)==null?void 0:ae.value)??ec.theme,et.set("theme",n.value);},children:r0.map(z=>f("option",{value:z,selected:n.value===z,children:e(`theme.${z}`)},z))})]}),f("label",{class:G.item,children:[f("span",{class:"label-text whitespace-nowrap",children:e("Language")}),f("select",{class:"select select-xs",onChange:z=>{var Le;const ae=((Le=z.target)==null?void 0:Le.value)??vy();t.changeLanguage(ae),et.set("language",ae);},children:Object.entries(wy).map(([z,ae])=>f("option",{value:z,selected:et.get("language")===z,children:[ae.nameEn," - ",ae.name]},z))})]}),f("label",{class:G.item,children:[f("span",{class:"label-text whitespace-nowrap",children:e("Debug")}),f("input",{type:"checkbox",class:"toggle toggle-primary",checked:et.get("debug"),onChange:z=>{var ae;et.set("debug",(ae=z.target)==null?void 0:ae.checked);}})]}),f("label",{class:G.item,children:[f("div",{class:"flex items-center",children:[f("span",{class:"label-text whitespace-nowrap",children:e("Safe mode")}),f("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture."),children:f(vi,{size:20})})]}),f("input",{type:"checkbox",class:"toggle toggle-warning",checked:et.get("safeMode"),onChange:z=>{var ae;et.set("safeMode",(ae=z.target)==null?void 0:ae.checked);}},`safe-mode-${r.value}`)]}),f("label",{class:G.item,children:[f("div",{class:"flex items-center",children:[f("span",{class:"label-text whitespace-nowrap",children:e("Hook mode")}),f("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Controls whether the userscript hooks XHR, fetch, both, or neither."),children:f(vi,{size:20})})]}),f("select",{class:"select select-xs",value:et.get("hookMode"),onChange:z=>{var ae;et.set("hookMode",(ae=z.target)==null?void 0:ae.value);},children:[f("option",{value:"both",children:e("both")}),f("option",{value:"xhr",children:e("xhr")}),f("option",{value:"fetch",children:e("fetch")}),f("option",{value:"off",children:e("off")})]})]}),f("label",{class:G.item,children:[f("div",{class:"flex items-center",children:[f("span",{class:"label-text whitespace-nowrap",children:e("Repair mode")}),f("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Controls whether hook repair watchdog behavior is active."),children:f(vi,{size:20})})]}),f("select",{class:"select select-xs",value:et.get("repairMode"),onChange:z=>{var ae;et.set("repairMode",(ae=z.target)==null?void 0:ae.value);},children:[f("option",{value:"watchdog",children:e("watchdog")}),f("option",{value:"off",children:e("off")})]})]}),f("label",{class:G.item,children:[f("div",{class:"flex items-center",children:[f("span",{class:"label-text whitespace-nowrap",children:e("Date Time Format")}),f("a",{href:"https://day.js.org/docs/en/display/format",target:"_blank",rel:"noopener noreferrer",class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Click for more information. This will take effect on both previewer and exported files."),children:f(vi,{size:20})})]}),f("input",{type:"text",class:"input input-bordered input-xs w-48",value:et.get("dateTimeFormat"),onChange:z=>{var ae;et.set("dateTimeFormat",(ae=z.target)==null?void 0:ae.value);}})]}),f("label",{class:G.item,children:[f("div",{class:"flex items-center",children:[f("span",{class:"label-text whitespace-nowrap",children:e("Use dedicated DB for accounts")}),f("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts."),children:f(vi,{size:20})})]}),f("input",{type:"checkbox",class:"toggle toggle-primary",checked:et.get("dedicatedDbForAccounts"),onChange:z=>{var ae;et.set("dedicatedDbForAccounts",(ae=z.target)==null?void 0:ae.checked);}})]}),f("div",{class:"flex w-full flex-col gap-2 py-1",children:[f("div",{class:"flex items-center justify-between gap-2",children:f("span",{class:"label-text whitespace-nowrap",children:e("Local Database")})}),f("div",{class:"grid min-w-0 grid-cols-2 gap-2 sm:grid-cols-3",children:[f("button",{class:on(G.wrapButton,"btn-neutral"),onClick:async()=>{let z="Storage usage: N/A";if(typeof navigator.storage.estimate=="function"){const{quota:fe=1,usage:Pe=0}=await navigator.storage.estimate(),it=(Pe/1024/1024).toFixed(2),X=(fe/1024/1024).toFixed(2);z=`Storage usage: ${it}MB / ${X}MB`;}const ae=await Ze.count(),Le=await yh();alert(z+`
IndexedDB tables count:
`+JSON.stringify(ae,void 0," ")+`
Scrollmark database inventory:
`+JSON.stringify(Le,void 0," "));},children:[f(Ru,{size:20}),e("Analyze DB")]}),f("button",{class:on(G.wrapButton,"btn-primary"),onClick:async()=>{const z=await Ze.export();z&&ua(`twitter-web-exporter-${Date.now()}.json`,z);},children:[f(Iu,{size:20}),e("Export DB")]}),f("button",{class:on(G.wrapButton,"btn-info"),onClick:s,children:[f(Iu,{size:20}),e("Bundle Export")]}),f("button",{class:on(G.wrapButton,"btn-secondary"),onClick:c,children:[f(Iu,{size:20}),e("Bundle Library")]}),f("button",{class:on(G.wrapButton,"btn-accent"),onClick:u,children:[f(Ru,{size:20}),e("QC Session")]}),f("button",{class:on(G.wrapButton,"btn-success"),onClick:()=>{const z=sw();alert(`Companion durability status
${JSON.stringify(z,void 0," ")}`);},children:[f(Ru,{size:20}),"Durability status"]}),f("button",{class:on(G.wrapButton,"btn-warning"),onClick:async()=>{window.prompt("This clears the disposable browser cache. Type CLEAR BROWSER CACHE to continue.")==="CLEAR BROWSER CACHE"&&await kw();},children:[f(rp,{size:20}),"Clear browser cache"]}),f("button",{class:on(G.wrapButton,"btn-disabled"),disabled:true,title:"Requires the local companion archive",children:[f(rp,{size:20}),"Destroy durable archive"]})]})]})]}),f("p",{class:G.subtitle,children:e("Modules (Scroll to see more)")}),f("div",{class:on(G.block,"flex-col","max-h-44 overflow-scroll"),children:hr.getExtensions().map(z=>f("label",{class:on(G.item,"flex-shrink-0"),children:[f("span",{children:[e(z.name.replace("Module",""))," ",e("Module")]}),f("input",{type:"checkbox",class:"toggle toggle-secondary",checked:z.enabled,onChange:()=>{z.enabled?hr.disable(z.name):hr.enable(z.name);}})]},z.name))}),f("p",{class:G.subtitle,children:e("About")}),f("div",{class:G.block,children:[f("span",{class:"label-text whitespace-nowrap",children:[e("Version")," ",Br.version]}),f("a",{class:"btn btn-xs btn-ghost",target:"_blank",href:Br.homepage,children:[f($k,{class:"[&>path]:stroke-0"}),"GitHub"]})]})]}),f(vr,{title:"Bundle Export",show:i,onClose:s,class:"max-w-lg",children:[f("div",{class:"px-4 text-base",children:[f("p",{class:"text-base-content text-opacity-60 mb-2 leading-5 text-sm",children:"Create one ZIP with a DB snapshot and per-module JSON exports."}),f("label",{class:G.item,children:[f("span",{class:"label-text whitespace-nowrap",children:"Include DB snapshot"}),f("input",{type:"checkbox",class:"toggle toggle-primary",checked:m.value,onChange:z=>{var ae;m.value=(ae=z.target)==null?void 0:ae.checked;}})]}),f("label",{class:G.item,children:[f("span",{class:"label-text whitespace-nowrap",children:"Include module exports"}),f("input",{type:"checkbox",class:"toggle toggle-primary",checked:g.value,onChange:z=>{var ae;g.value=(ae=z.target)==null?void 0:ae.checked;}})]}),f("div",{class:"text-xs text-base-content text-opacity-70 mt-2",children:["Status: ",k.value||"Idle"]}),f("div",{class:"text-xs text-base-content text-opacity-70",children:["Progress: ",b.value.current,"/",b.value.total]}),S.value&&f("div",{class:"text-xs text-base-content text-opacity-70 mt-1",children:["Exported modules: ",S.value.modules," | files: ",S.value.files," | skipped empty modules: ",S.value.skipped]}),M.value&&f("div",{class:"text-xs text-base-content text-opacity-70 mt-1 break-all",children:["Last ZIP: ",f("code",{children:M.value})]}),T.value&&f("div",{class:"text-xs mt-1",children:f("a",{class:"link link-primary",href:T.value,download:M.value,children:"Download again"})})]}),f("div",{class:"flex space-x-2",children:[f("span",{class:"flex-grow"}),f("button",{class:"btn",onClick:s,children:"Cancel"}),f("button",{class:on("btn btn-primary",y.value&&"btn-disabled"),onClick:le,children:[y.value&&f("span",{class:"loading loading-spinner"}),"Export Bundle ZIP"]})]})]}),f(vr,{title:"Bundle Library",show:l,onClose:c,class:"max-w-2xl",children:[f("div",{class:"px-4 text-sm",children:[f("p",{class:"text-base-content text-opacity-60 mb-3 leading-5",children:"Import canonical TWE bundle ZIPs into isolated local bundle tables. Imported bundles do not mutate live captures or your X account."}),f("div",{class:"rounded-box-half border border-base-300 bg-base-200/70 p-3",children:[f("label",{class:"flex items-center justify-between gap-3",children:[f("span",{class:"font-semibold",children:"Import bundle ZIP or legacy JSON/JSONL"}),f("input",{type:"file",accept:".zip,.json,.jsonl,application/zip,application/json,application/x-ndjson",class:"file-input file-input-bordered file-input-sm max-w-xs",disabled:v.value,onChange:z=>{var Le;const ae=z.target;ce((Le=ae.files)==null?void 0:Le[0]),ae.value="";}})]}),f("div",{class:"mt-2 font-mono text-xs opacity-70",children:[v.value?"busy: ":"",E.value||"Idle"]})]}),f("div",{class:"mt-3 flex items-center justify-between",children:[f("h3",{class:"font-semibold",children:"Imported bundles"}),f("button",{class:"btn btn-xs btn-outline",onClick:()=>void Q(),children:"Refresh"})]}),f("div",{class:"mt-2 max-h-80 overflow-y-auto rounded-box-half border border-base-300",children:P.value.length?f("table",{class:"table table-sm",children:[f("thead",{children:f("tr",{children:[f("th",{children:"Title"}),f("th",{children:"Status"}),f("th",{children:"Records"}),f("th",{children:"Imported"}),f("th",{})]})}),f("tbody",{children:P.value.map(z=>f("tr",{children:[f("td",{children:[f("div",{class:"font-semibold",children:z.title}),f("div",{class:"font-mono text-[10px] opacity-60",children:z.id})]}),f("td",{children:f("span",{class:"badge badge-sm badge-outline",children:z.status})}),f("td",{class:"font-mono text-xs",children:z.recordCount}),f("td",{class:"font-mono text-xs",children:new Date(z.importedAt).toLocaleString()}),f("td",{children:[f("button",{class:"btn btn-xs btn-primary btn-outline mr-1",onClick:async()=>{I.value=z.id,O.value="",U.value="all",await me();},children:"View"}),f("button",{class:"btn btn-xs btn-error btn-outline",onClick:async()=>{confirm(`Delete imported bundle "${z.title}"?`)&&(await Ze.bundleDelete(z.id),I.value===z.id&&(I.value="",N.value=[]),await Q());},children:"Delete"})]})]},z.id))})]}):f("div",{class:"p-6 text-center text-base-content/50",children:"No imported bundles yet."})}),I.value?f("div",{class:"mt-3 rounded-box-half border border-base-300 bg-base-200/50 p-3",children:[f("div",{class:"mb-2 flex items-center justify-between gap-2",children:[f("div",{children:[f("h3",{class:"font-semibold",children:"Bundle Viewer"}),f("div",{class:"font-mono text-[10px] opacity-60",children:I.value})]}),f("button",{class:"btn btn-xs btn-outline",onClick:()=>{I.value="",N.value=[];},children:"Close Viewer"})]}),f("label",{class:"input input-bordered input-sm mb-2 flex items-center gap-2",children:[f("span",{class:"text-xs opacity-60",children:"Search"}),f("input",{class:"grow bg-transparent",value:O.value,onInput:z=>{O.value=z.target.value;},onKeyDown:z=>{z.key==="Enter"&&me();}}),f("button",{class:"btn btn-xs",onClick:()=>void me(),children:"Run"})]}),f("div",{class:"mb-2 flex items-center justify-between gap-2",children:[f("div",{class:"flex items-center gap-2",children:[f("select",{class:"select select-bordered select-xs",value:U.value,onChange:z=>{U.value=z.target.value,me();},children:[f("option",{value:"all",children:"all kinds"}),f("option",{value:"tweet",children:"tweets"}),f("option",{value:"user",children:"users"}),f("option",{value:"unknown",children:"unknown"})]}),f("span",{class:"font-mono text-xs opacity-70",children:["Showing ",N.value.length," snapshots"]})]}),f("button",{class:"btn btn-xs btn-secondary",disabled:!N.value.length,onClick:()=>void pe(),children:"Export Loaded Subset"})]}),f("div",{class:"max-h-72 overflow-y-auto rounded-box-half border border-base-300 bg-base-100",children:N.value.length?N.value.map(z=>f("details",{class:"border-b border-base-300 p-2 text-xs",children:[f("summary",{class:"cursor-pointer",children:[f("span",{class:"badge badge-xs badge-outline mr-2",children:z.kind}),f("span",{class:"font-mono mr-2",children:z.source_id||z.id}),f("span",{class:"opacity-60",children:z.observed_at?new Date(z.observed_at).toLocaleString():""})]}),f("div",{class:"mt-2 rounded bg-base-100 p-2",children:[f("p",{class:"whitespace-pre-wrap text-sm leading-5",children:$M(z)||"(no text preview)"}),Gm(z).length?f("div",{class:"mt-2 grid grid-cols-4 gap-2",children:Gm(z).map(ae=>f("a",{href:ae,target:"_blank",rel:"noopener noreferrer",children:ae.includes(".mp4")?f("video",{src:ae,class:"h-20 w-full rounded object-cover"}):f("img",{src:ae,class:"h-20 w-full rounded object-cover",loading:"lazy"})},ae))}):null]}),f("pre",{class:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap rounded bg-base-200 p-2 text-[10px] leading-4",children:JSON.stringify(z.data,null,2)})]},z.id)):f("div",{class:"p-6 text-center text-base-content/50",children:"No snapshots loaded."})})]}):null]}),f("div",{class:"flex space-x-2",children:[f("span",{class:"flex-grow"}),f("button",{class:"btn",onClick:c,children:"Close"})]})]}),f(vr,{title:"Unified QC Session",show:h,onClose:u,class:"max-w-3xl",children:[f("div",{class:"px-4 text-sm",children:[f("p",{class:"mb-3 text-base-content/70",children:"Use this single session to QC Bundle Library, core release workflows, and Firefox/Chrome parity. Run Firefox first, export diagnostics, then repeat the browser parity subset in Chrome and export diagnostics again."}),f("div",{class:"grid gap-3 md:grid-cols-2",children:[f("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[f("h3",{class:"mb-2 font-semibold",children:"Preparation"}),f("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[f("li",{children:"Install the current local userscript in Firefox."}),f("li",{children:"Open Settings and set Safe mode off, Hook mode both, Repair mode watchdog."}),f("li",{children:"Enable Diagnostic capture below."}),f("li",{children:"Browse X normally long enough to confirm counters increment."}),f("li",{children:"Repeat the parity subset in Chrome after Firefox is complete."})]})]}),f("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[f("h3",{class:"mb-2 font-semibold",children:"Bundle Library"}),f("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[f("li",{children:["Export a filtered result set with Export Data ","->"," Export Bundle ZIP."]}),f("li",{children:["Import that ZIP through Settings ","->"," Bundle Library."]}),f("li",{children:"Search exact text from one imported row."}),f("li",{children:"Filter by tweets/users, inspect text/media/raw JSON."}),f("li",{children:"Export Loaded Subset, then import that subset ZIP."}),f("li",{children:"Import the legacy and malicious fixtures from e2e/fixtures/bundles."})]})]}),f("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[f("h3",{class:"mb-2 font-semibold",children:"Core Release Smoke"}),f("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[f("li",{children:"Bookmarks folder scroll indexes rows and folder metadata."}),f("li",{children:"Bookmark-from-feed increments and later resolves folder details."}),f("li",{children:"Search exact snippets and phrases rank correctly enough for QC."}),f("li",{children:"Table fullscreen and masonry scrolling remain stable."}),f("li",{children:"Export Data and Export Media complete without browser freeze."})]})]}),f("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[f("h3",{class:"mb-2 font-semibold",children:"Chrome Parity"}),f("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[f("li",{children:"Install in Chrome userscript manager."}),f("li",{children:"Confirm widget loads on x.com and settings toggles work."}),f("li",{children:"Confirm hooks/counters increment with Safe mode off."}),f("li",{children:"Run Bundle ZIP export/import and legacy import."}),f("li",{children:"Run one media export and one diagnostics export."}),f("li",{children:"Record any Chrome-only console errors or CSP differences."})]})]})]}),f("div",{class:"mt-3 rounded-box-half border border-base-300 bg-base-100 p-3",children:[f("div",{class:"grid min-w-0 grid-cols-2 items-center gap-2",children:[f("label",{class:"label min-w-0 cursor-pointer gap-2 py-0",children:[f("span",{class:"text-xs",children:e("Diagnostic capture")}),f("input",{type:"checkbox",class:"toggle toggle-sm",checked:xe.value,onChange:z=>{const ae=z.target.checked;my(ae),xe.value=ae;}})]}),f("button",{class:on(G.wrapButton,"btn-outline"),onClick:()=>{gy(),L.value=e("Diagnostic buffers cleared.");},children:e("Clear Buffers")}),f("button",{class:on(G.wrapButton,"btn-primary col-span-2"),disabled:$.value,onClick:we,children:$.value?e("Preparing..."):e("Export QC Diagnostics")})]}),f("div",{class:"mt-2 font-mono text-xs opacity-70",children:L.value||e("QC idle.")}),f("div",{class:"mt-2 text-xs opacity-70",children:["Full runbook: ",f("code",{children:"docs/release/unified-qc-session-runbook.md"})]})]})]}),f("div",{class:"flex space-x-2",children:[f("span",{class:"flex-grow"}),f("button",{class:"btn",onClick:u,children:"Close"})]})]})]})}function UM({currentTheme:e,show:t,title:n,byline:r,description:o,hookLine:a,healthLine:i,persistenceLine:s,onToggle:l,children:c}){return f("section",{"data-theme":e,class:on("card card-compact bg-base-100 fixed border shadow-xl w-80 leading-loose text-base-content py-3 rounded-box border-solid border-neutral-content border-opacity-50 left-8 top-8 transition-transform duration-500 flex flex-col overflow-hidden",t?"translate-x-0 transform-none":"translate-x-[-500px]"),style:{maxHeight:"calc(100vh - 4rem)"},children:[f("header",{class:"mx-4 mb-1 flex h-9 items-center",children:[f(Bk,{class:"mr-2 shrink-0 text-base-content"}),f("div",{class:"flex-grow leading-none",children:[f("h2",{class:"m-0 flex items-baseline gap-2 text-xl font-semibold leading-none",children:[f("span",{children:n}),f("span",{class:"font-mono text-[10px] font-normal text-base-content opacity-70",children:["v",Br.version]})]}),r?f("p",{class:"font-mono text-[10px] opacity-70 m-0 mt-1",children:r}):null]}),f(Ts,{children:f(BM,{})}),f("div",{onClick:l,class:"w-9 h-9 cursor-pointer flex justify-center items-center transition-colors duration-200 rounded-full hover:bg-base-200",children:f(uc,{})})]}),f("p",{class:"mx-4 mb-1 text-sm leading-none text-base-content text-opacity-70",children:o}),f("p",{class:"mx-4 mb-1 font-mono text-xs leading-none text-base-content text-opacity-60",children:a}),f("p",{class:"mx-4 mb-1 font-mono text-xs leading-none text-base-content text-opacity-60",children:i}),s?f("p",{class:"mx-4 mb-1 font-mono text-xs leading-none text-base-content text-opacity-60",children:s}):null,f("div",{class:"divider mt-0 mb-0"}),f("main",{class:"min-h-0 grow overflow-y-auto overscroll-contain scroll-smooth",children:f("div",{class:"pl-4 pr-2",children:c})})]})}const Ym=5e3;function jM(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`rs-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function oa(e,t){var l,c;if(!e||typeof e!="object")return `row-${t}`;const n=e,r=h=>typeof h=="string"&&h.trim()?h.trim():typeof h=="number"&&Number.isFinite(h)?String(h):"",a=((...h)=>{for(const u of h){const m=r(u);if(m)return m}return ""})(n.id,n.rest_id,n.id_str,(l=n.legacy)==null?void 0:l.id_str,(c=n.core)==null?void 0:c.screen_name,n.screen_name),i=[n.__bookmark_folder_id,n.__twe_imported_bundle_id,n.__twe_imported_snapshot_id,n.entryId,n.conversationId,n.conversation_id,n.dm_conversation_id].map(r).filter(Boolean);return (a&&i.length?`${a}::${i.join("::")}`:a)||`row-${t}`}function xw(e){const t=String(e||"").trim();if(!t)return "";const[n]=t.split("::");return n||t}function Ul(e,t){let n=e;for(const r of t.split(".")){if(!n||typeof n!="object")return;n=n[r];}return n}function HM(e){return typeof e=="string"&&e.trim()?e.trim():typeof e=="number"&&Number.isFinite(e)?String(e):""}function Na(e,t){const n=new Set,r=o=>{const a=HM(o);a&&n.add(a);};if(r(oa(e,t)),e&&typeof e=="object"){const o=e;r(o.id),r(o.rest_id),r(o.id_str),r(Ul(o,"legacy.id_str")),r(Ul(o,"legacy.id")),r(Ul(o,"core.user_results.result.rest_id")),r(Ul(o,"core.screen_name")),r(o.__twe_imported_snapshot_id),r(o.__twe_imported_source_id);}return [...n]}function qM(e,t,n=new Set){const r=[];for(const o of e){const a=t.get(o);if(a){r.push(a);continue}if(!n.has(o))break}return r}function VM(e){return e!=null&&e.length?e.map(t=>`${t.id}:${t.desc?"desc":"asc"}`).join(","):"default"}function zM(e){const t=e.sourceDescriptor&&e.idsTruncated?[]:e.ids.slice(0,Ym),n=!!e.idsTruncated||e.ids.length>Ym;return {resultSetId:jM(),scope:"table",engine:"local-sync",generatedAtMs:Date.now(),queryText:e.queryText,sort:e.sort,totalMatches:e.totalMatches,ids:t,idsTotalCount:e.ids.length,idsTruncated:n,sourceDescriptor:e.sourceDescriptor,warnings:[...e.warnings]}}const KM="^[a-zA-Z0-9_.]+$",GM=["from","from_id","author_id","to","to_id","in_reply_to_id","lang","since","until","since_time","until_time","since_id","max_id","conversation_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","url","domain","id","source","card_name","filter","include","is","has","bookmark_folder","folder","route","mention","hashtag","cashtag"],WM=["since","until","since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","id","from_id","author_id","to_id","in_reply_to_id","conversation_id"],YM={min_content_term_length:2,full_run_exact_min_terms:2,stop_terms:["a","an","the","and","or","but","if","then","than","to","of","in","on","for","with","by","at","from","into","onto","as","is","are","was","were","be","been","being","do","does","did","done","have","has","had","can","could","should","would","will","just","about","what","when","where","why","how","who","whom","whose","this","that","these","those","it","its","my","your","our","their","his","her","me","you","we","they","he","she","them","us","post","tweet","too"],bigram_slop:2,trigram_slop:3,fourgram_slop:4,bigram_boost:20,trigram_boost:60,fourgram_boost:140,full_run_exact_boost:320},JM={min_term_length:3,max_expansions:128},XM={min_term_length:5,max_edit_distance:1,prefix_root_length:4,max_expansions:64},Za={field_path_pattern:KM,known_filter_keys:GM,non_highlight_filters:WM,free_text:YM,prefix:JM,fuzzy:XM},Sw=new RegExp(Za.field_path_pattern),Jm=new Set(Za.known_filter_keys),ZM=new Set(Za.non_highlight_filters),So=Za.free_text,wh=Za.prefix,ll=Za.fuzzy,QM=new Set((Za.free_text.stop_terms||[]).map(e=>String(e||"").trim().toLowerCase()).filter(Boolean));function Cw(e){return e.kind==="term"||e.kind==="phrase"}const eI=/[\p{L}\p{N}_]+(?:['’][\p{L}\p{N}_]+)*/gu,tI=32,nI=Math.max(1,Number(So.min_content_term_length)),rI=Math.max(2,Number(So.full_run_exact_min_terms)),oI=Math.max(1,Number(wh.min_term_length)),aI=Math.max(1,Number(ll.min_term_length)),iI=[{category:"lexical",syntax:"plain free text",description:"Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.",examples:["tour guides in France","distributed systems design"]},{category:"lexical",syntax:'"exact phrase"~2',description:"Phrase search with optional slop.",examples:['"design system"','"design system"~2',"machine^2"]},{category:"lexical",syntax:"AND / OR / NOT / (...)",description:"Boolean operators with standard precedence and parentheses.",examples:["machine OR reliability","(machine OR reliability) AND fragile","machine AND NOT reliability"]},{category:"identity",syntax:"from: / from_id: / author_id:",description:"Match the author handle or author id.",examples:["from:alice","from_id:12345"]},{category:"identity",syntax:"@user",description:"Shorthand for an enforced author constraint, equivalent to from:user.",examples:["@sama","@openai"]},{category:"identity",syntax:"to: / to_id: / in_reply_to_id: / id: / conversation_id:",description:"Match reply targets, entity ids, or conversation ids.",examples:["to:alice","in_reply_to_id:1888","id:1999"]},{category:"metadata",syntax:"bookmark_folder: / folder:",description:"Match bookmark folder id or folder name.",examples:["bookmark_folder:12345",'folder:"Design References"']},{category:"metadata",syntax:"lang: / route: / source: / card_name:",description:"Match language, route surface, source text, or card name.",examples:["lang:en","route:bookmarks","source:iphone"]},{category:"metadata",syntax:"domain: / url:",description:"Match domains or URLs found in tweets.",examples:["domain:github.com","url:openai.com"]},{category:"presence",syntax:"is:",description:"Boolean state filters.",examples:["is:bookmarked","is:reply","is:verified","is:blue_verified"]},{category:"presence",syntax:"has:",description:"Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.",examples:["has:media","has:links","has:hashtags","has:engagement"]},{category:"compatibility",syntax:"filter: / include:",description:"Compatibility aliases retained for Twitter-style queries.",examples:["filter:media","filter:replies","include:nativeretweets"]},{category:"numeric_date",syntax:"min_likes: / min_retweets: / min_replies: / min_bookmarks:",description:"Numeric threshold filters.",examples:["min_likes:50","min_bookmarks:10"]},{category:"numeric_date",syntax:"since: / until: / since_time: / until_time: / since_id: / max_id:",description:"Date, timestamp, and Snowflake-style boundary filters.",examples:["since:2026-03-01","until:2026-03-31","since_id:1900"]},{category:"compatibility",syntax:"mention: / #tag / $symbol",description:"Explicit mention filter plus shorthand hashtag and cashtag filters.",examples:["mention:alice","#ai","$tsla"]},{category:"metadata",syntax:'field:value / field:"quoted phrase"',description:"Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.",examples:["md.collection:B","legacy.entities.hashtags.text:ai",'core.user_results.result.legacy.name:"Jane Doe"']}];function xi(e,t,n=""){return {code:e,message:t,token:n||void 0,severity:"warn"}}function Xm(e){const t=Number(e);return Number.isFinite(t)?Math.max(.05,Math.min(100,t)):1}function ya(e){if(!e)return [];const t=e.toLowerCase().match(eI);return t?t.map(n=>n.replace(/['’]/g,"")).filter(Boolean):[]}function vh(e){const t=String(e||"").trim().toLowerCase();return !t||t.length<nI?true:QM.has(t)}function Tw(e){const t=e.flatMap(r=>ya(r.value)),n=t.filter(r=>!vh(r));return n.length?n:t}function sI(e){const t=new Set(Tw(e));if(!t.size)return e;const n=e.filter(r=>t.has(String(r.value||"").trim().toLowerCase()));return n.length?n:e}function dd(e){let t=0;for(const n of e)for(const r of ya(n.value))vh(r)||(t+=1);return t}function ks(e){return ya(e).join(" ").trim()}function lI(e){return Number.isFinite(e)?Math.round(e*100)/100:1}function cI(e,t){const n=e.lastIndexOf(t);if(n<=0)return {base:e,value:null};const r=e.slice(n+1);return !r||!/^\d+(?:\.\d+)?$/.test(r)?{base:e,value:null}:{base:e.slice(0,n),value:r}}function uI(e){const t=String(e||""),n=[];let r=0;for(;r<t.length;){for(;r<t.length&&/\s/.test(t[r]??"");)r+=1;if(r>=t.length)break;const o=t[r]??"";if(o==="("){n.push({kind:"lparen"}),r+=1;continue}if(o===")"){n.push({kind:"rparen"}),r+=1;continue}let a=false;if(o==="-"){for(a=true,r+=1;r<t.length&&/\s/.test(t[r]??"");)r+=1;if(r>=t.length)break;if((t[r]??"")==="("){n.push({kind:"op",op:"NOT"});continue}}let i;const s=r;for(;r<t.length&&/[a-zA-Z0-9_.]/.test(t[r]??"");)r+=1;if(r>s&&(t[r]??"")===":"&&(t[r+1]??"")==='"'&&Sw.test(t.slice(s,r))?(i=t.slice(s,r),r+=1):r=s,(t[r]??"")==='"'){r+=1;let g="";for(;r<t.length;){const k=t[r]??"";if(k==="\\"&&r+1<t.length){g+=t[r+1]??"",r+=2;continue}if(k==='"'){r+=1;break}g+=k,r+=1;}let y=0,b=1;if((t[r]??"")==="~"){r+=1;const k=r;for(;r<t.length&&/\d/.test(t[r]??"");)r+=1;r>k&&(y=Math.max(0,Number(t.slice(k,r))||0));}if((t[r]??"")==="^"){r+=1;const k=r;for(;r<t.length&&/[\d.]/.test(t[r]??"");)r+=1;r>k&&(b=Xm(t.slice(k,r)));}n.push({kind:"phrase",value:g.trim(),negated:a,boost:b,slop:y,field:i,quoted:true});continue}const l=r;for(;r<t.length&&!/\s/.test(t[r]??"")&&(t[r]??"")!=="("&&(t[r]??"")!==")";)r+=1;const c=t.slice(l,r).trim();if(!c)continue;const{base:h,value:u}=cI(c,"^"),m=h.toUpperCase();if((m==="AND"||m==="OR"||m==="NOT")&&!a){n.push({kind:"op",op:m});continue}n.push({kind:"term",value:h,negated:a,boost:u?Xm(u):1,slop:0});}return n}function dI(e,t){if(t.length&&!/\s$/.test(String(e||"")))for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(!r||!Cw(r))continue;if(r.kind!=="term"||r.field||r.quoted)return;const o=ks(r.value);o.length>=oI&&(r.prefix=true),o.length>=aI&&(r.fuzzy=true);return}}function Io(e){return e?e.kind==="term"||e.kind==="phrase":false}function fI(e){const t=[];if(!e.length)return {ast:null,warnings:t};const n=[];let r=null;for(const u of e){let m=false;if(r){const g=Io(r)||r.kind==="rparen",y=Io(u)||u.kind==="lparen"||u.kind==="op"&&u.op==="NOT";g&&y&&(m=true);}m&&n.push({kind:"op",op:"AND"}),n.push(u),r=u;}const o={OR:1,AND:2,NOT:3},a=[],i=[];for(const u of n){if(Io(u)){a.push(u);continue}if(u.kind==="lparen"){i.push(u);continue}if(u.kind==="rparen"){let m=false;for(;i.length;){const g=i.pop();if(!g)break;if(g.kind==="lparen"){m=true;break}a.push(g);}m||t.push(xi("boolean_syntax","unmatched closing parenthesis in query"));continue}if(u.kind==="op"){for(;i.length;){const m=i[i.length-1];if(!m||m.kind!=="op"||!(u.op==="NOT"?o[u.op]<o[m.op]:o[u.op]<=o[m.op]))break;a.push(i.pop());}i.push(u);}}for(;i.length;){const u=i.pop();if(!u)break;if(u.kind==="lparen"){t.push(xi("boolean_syntax","unmatched opening parenthesis in query"));continue}a.push(u);}const s=[];for(const u of a){if(Io(u)){s.push(u);continue}if(u.kind!=="op")continue;if(u.op==="NOT"){const y=s.pop();if(!y){t.push(xi("boolean_syntax","dangling NOT operator in query","NOT"));continue}s.push({kind:"op",op:"NOT",child:y});continue}const m=s.pop(),g=s.pop();if(!g||!m){t.push(xi("boolean_syntax",`dangling ${u.op} operator in query`,u.op));continue}s.push({kind:"op",op:u.op,left:g,right:m});}if(s.length===1)return {ast:s[0]??null,warnings:t};const l=e.filter(Io);if(!l.length)return {ast:null,warnings:t};const c=l[0];if(!c)return {ast:null,warnings:t};let h=c;for(let u=1;u<l.length;u+=1){const m=l[u];m&&(h={kind:"op",op:"AND",left:h,right:m});}return t.push(xi("boolean_syntax","query boolean expression was malformed; fell back to implicit AND between lexical terms")),{ast:h,warnings:t}}function Zm(e,t){const n=[],r=(o,a)=>{if(o){if(Io(o)){a===t&&n.push(o);return}if(o.op==="NOT"){r(o.child,!a);return}r(o.left,a),r(o.right,a);}};return r(e,true),n}function wf(e,t,n){if(e){if(!Io(e)&&e.op===t){wf(e.left,t,n),wf(e.right,t,n);return}n.push(e);}}function vf(e){if(!e)return "";if(Io(e)){let r=e.kind==="phrase"?`"${e.value}"`:e.value;return e.prefix&&(r+="*"),e.kind==="phrase"&&e.slop>0&&(r+=`~${e.slop}`),Math.abs(e.boost-1)>1e-9&&(r+=`^${e.boost}`),e.field&&(r=`${e.field}:${r}`),r}if(e.op==="NOT"){const r=vf(e.child);return r?`NOT (${r})`:"NOT (?)"}const t=[];return wf(e,e.op,t),t.map(r=>{const o=vf(r);return o?!Io(r)&&r.op!==e.op?`(${o})`:o:""}).filter(Boolean).join(` ${e.op} `)}function hI(e){return !e.field&&e.kind==="term"&&ya(e.value).length===1}function pI(e){var a,i,s,l,c,h,u,m;if(e.length<=1)return e;const t=[],n=new Set,r=g=>{const y=`${g.kind}|${g.field||""}|${g.value}|${g.slop}|${g.boost}`;n.has(y)||(n.add(y),t.push(g));},o=(g,y)=>{const b=g.reduce((k,S)=>k+S.boost,0)/g.length;return lI(y*b)};for(const g of sI(e))r(g);for(let g=0;g<=e.length-2;g+=1){const y=e.slice(g,g+2);dd(y)<2||r({kind:"phrase",value:y.map(b=>b.value).join(" "),slop:So.bigram_slop,boost:o(y,So.bigram_boost),prefix:!!((a=y[y.length-1])!=null&&a.prefix),fuzzy:!!((i=y[y.length-1])!=null&&i.fuzzy)});}for(let g=0;g<=e.length-3;g+=1){const y=e.slice(g,g+3);dd(y)<2||r({kind:"phrase",value:y.map(b=>b.value).join(" "),slop:So.trigram_slop,boost:o(y,So.trigram_boost),prefix:!!((s=y[y.length-1])!=null&&s.prefix),fuzzy:!!((l=y[y.length-1])!=null&&l.fuzzy)});}for(let g=0;g<=e.length-4;g+=1){const y=e.slice(g,g+4);dd(y)<2||r({kind:"phrase",value:y.map(b=>b.value).join(" "),slop:So.fourgram_slop,boost:o(y,So.fourgram_boost),prefix:!!((c=y[y.length-1])!=null&&c.prefix),fuzzy:!!((h=y[y.length-1])!=null&&h.fuzzy)});}return e.length>=rI&&r({kind:"phrase",value:e.map(g=>g.value).join(" "),slop:0,boost:o(e,So.full_run_exact_boost),prefix:!!((u=e[e.length-1])!=null&&u.prefix),fuzzy:!!((m=e[e.length-1])!=null&&m.fuzzy)}),t}function mI(e,t){if(!t.length)return;if(t.length===1){e.push(t[0]),t.length=0;return}const n=pI(t);e.push({kind:"lparen"}),n.forEach((r,o)=>{o>0&&e.push({kind:"op",op:"OR"}),e.push(r);}),e.push({kind:"rparen"}),t.length=0;}function gI(e){const t=new Set,n=[];for(const r of e)for(const o of ya(r))!o||t.has(o)||(t.add(o),n.push(o));return n}function _I(e,t){const n=new Set;for(const r of e)for(const o of ya(r.value))o&&!vh(o)&&n.add(o);for(const r of t)if(!(r.negated||ZM.has(r.name)))for(const o of ya(r.value))o&&n.add(o);return [...n].slice(0,tI)}function yI(e){var S;const t=uI(e);dI(e,t);const n=[],r=[],o=[],a=[],i=[],s=[],l=()=>{if(a.length){const M=Tw(a);s.push(...M),i.push(...M);}mI(o,a);};for(const M of t){if(!Cw(M)){l(),o.push(M);continue}const T=String(M.value||"").trim();if(!T)continue;let P=M.kind,N=T,I=(S=M.field)==null?void 0:S.trim(),O=false;if(I&&Jm.has(I)){n.push({name:I,value:T,negated:M.negated}),l();continue}if(M.kind==="term"&&T.startsWith("@")&&T.length>1){const E=ks(T.slice(1));if(E){n.push({name:"from",value:E,negated:M.negated}),l();continue}}else if(M.kind==="term"&&T.startsWith("#")&&T.length>1){const E=ks(T.slice(1));E&&(n.push({name:"hashtag",value:E,negated:M.negated}),P="term",N=E,O=true);}else if(M.kind==="term"&&T.startsWith("$")&&T.length>1){const E=ks(T.slice(1));E&&(n.push({name:"cashtag",value:E,negated:M.negated}),P="term",N=E,O=true);}else if(M.kind==="term"&&T.includes(":")){const[E,...v]=T.split(":"),L=String(E||"").trim().toLowerCase(),$=v.join(":").trim();if(Jm.has(L)){if(!$){r.push(T);continue}n.push({name:L,value:$,negated:M.negated}),l();continue}L&&$&&Sw.test(L)&&(P="term",N=$,I=L);}const U={kind:P,value:P==="term"?ks(N):N.trim(),boost:M.boost,slop:M.slop,field:I||void 0,quoted:!!M.quoted,prefix:!!M.prefix,fuzzy:!!M.fuzzy};if(U.value){if(M.negated){l(),o.push({kind:"op",op:"NOT"}),o.push(U);continue}if(!O&&hI(U)){a.push(U);continue}if(l(),!U.field){const E=ya(U.value);s.push(...E),i.push(...E);}o.push(U);}}l();const{ast:c,warnings:h}=fI(o),u=Zm(c,true),m=Zm(c,false),g=s.filter(Boolean),y=gI(i),b=_I(u,n),k=r.map(M=>xi("unsupported_token",`unsupported token: ${M}`,M));return {query:String(e||""),lexicalTokens:o,lexicalAst:c,lexicalExpression:vf(c),positiveLexicalTokens:u,negativeLexicalTokens:m,positiveTerms:y,filters:n,unsupported:r,orderedTerms:g,highlightTerms:b,warnings:[...h,...k],hasPositiveLexical:u.length>0,filterBooleanSemantics:"global_and"}}const Mw="twe_search_history_v1";function Iw(){return typeof localStorage<"u"}function Rw(e){return [...new Set(e.map(t=>t.trim()).filter(Boolean))].sort()}function Qm(e,t,n){return `${e}::${t}::${Rw(n).join(",")}`}function kh(e){if(!Iw())return [];try{const t=localStorage.getItem(Mw);if(!t)return [];const n=JSON.parse(t);if(!Array.isArray(n))return [];const r=n.filter(o=>!!o&&typeof o=="object");return e?r.filter(o=>o.scope===e):r}catch{return []}}function bI(e){const t=Date.now(),n={...e,selected_folders:Rw(e.selected_folders),id:`${e.scope}:${t}:${Math.random().toString(36).slice(2,8)}`,searched_at_iso:new Date(t).toISOString(),repeat_count:1},o=[...kh()],a=Qm(n.scope,n.normalized_query,n.selected_folders),i=o[o.length-1];i&&Qm(i.scope,i.normalized_query,i.selected_folders||[])===a?o[o.length-1]={...i,query:n.query,title:n.title,searched_at_ms:n.searched_at_ms,searched_at_iso:n.searched_at_iso,result_count:n.result_count,total_records:n.total_records,lexical_expression:n.lexical_expression,warning_messages:[...n.warning_messages],repeat_count:(i.repeat_count||1)+1}:o.push(n);const s=o.slice(-4e3);if(Iw())try{localStorage.setItem(Mw,JSON.stringify(s));}catch{}return s}/**
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function xh(){return {accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Eo(e,t){return typeof e=="function"?e(t):e}function Rr(e,t){return n=>{t.setState(r=>({...r,[e]:Eo(n,r[e])}));}}function ru(e){return e instanceof Function}function wI(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function vI(e,t){const n=[],r=o=>{o.forEach(a=>{n.push(a);const i=t(a);i!=null&&i.length&&r(i);});};return r(e),n}function Nt(e,t,n){let r=[],o;return a=>{let i;n.key&&n.debug&&(i=Date.now());const s=e(a);if(!(s.length!==r.length||s.some((h,u)=>r[u]!==h)))return o;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-i)*100)/100,u=Math.round((Date.now()-c)*100)/100,m=u/16,g=(y,b)=>{for(y=String(y);y.length<b;)y=" "+y;return y};console.info(`%c⏱ ${g(u,5)} /${g(h,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key);}return o}}function Ft(e,t,n,r){return {debug:()=>{var o;return (o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:false,onChange:r}}function kI(e,t,n,r){const o=()=>{var i;return (i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Nt(()=>[e,n,t,a],(i,s,l,c)=>({table:i,column:s,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Ft(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,n,t,e);},{}),a}function xI(e,t,n,r){var o,a;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let c=(o=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,h;if(s.accessorFn?h=s.accessorFn:l&&(l.includes(".")?h=m=>{let g=m;for(const b of l.split(".")){var y;g=(y=g)==null?void 0:y[b];}return g}:h=m=>m[s.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:h,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Nt(()=>[true],()=>{var m;return [u,...(m=u.columns)==null?void 0:m.flatMap(g=>g.getFlatColumns())]},Ft(e.options,"debugColumns")),getLeafColumns:Nt(()=>[e._getOrderColumnsFn()],m=>{var g;if((g=u.columns)!=null&&g.length){let y=u.columns.flatMap(b=>b.getLeafColumns());return m(y)}return [u]},Ft(e.options,"debugColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(u,e);return u}const ar="debugHeaders";function eg(e,t,n){var r;let a={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l);};return s(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e);}),a}const SI={createTable:e=>{e.getHeaderGroups=Nt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var a,i;const s=(a=r==null?void 0:r.map(u=>n.find(m=>m.id===u)).filter(Boolean))!=null?a:[],l=(i=o==null?void 0:o.map(u=>n.find(m=>m.id===u)).filter(Boolean))!=null?i:[],c=n.filter(u=>!(r!=null&&r.includes(u.id))&&!(o!=null&&o.includes(u.id)));return jl(t,[...s,...c,...l],e)},Ft(e.options,ar)),e.getCenterHeaderGroups=Nt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(a=>!(r!=null&&r.includes(a.id))&&!(o!=null&&o.includes(a.id))),jl(t,n,e,"center")),Ft(e.options,ar)),e.getLeftHeaderGroups=Nt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return jl(t,a,e,"left")},Ft(e.options,ar)),e.getRightHeaderGroups=Nt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return jl(t,a,e,"right")},Ft(e.options,ar)),e.getFooterGroups=Nt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ft(e.options,ar)),e.getLeftFooterGroups=Nt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ft(e.options,ar)),e.getCenterFooterGroups=Nt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ft(e.options,ar)),e.getRightFooterGroups=Nt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ft(e.options,ar)),e.getFlatHeaders=Nt(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ft(e.options,ar)),e.getLeftFlatHeaders=Nt(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ft(e.options,ar)),e.getCenterFlatHeaders=Nt(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ft(e.options,ar)),e.getRightFlatHeaders=Nt(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ft(e.options,ar)),e.getCenterLeafHeaders=Nt(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return !((r=n.subHeaders)!=null&&r.length)}),Ft(e.options,ar)),e.getLeftLeafHeaders=Nt(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return !((r=n.subHeaders)!=null&&r.length)}),Ft(e.options,ar)),e.getRightLeafHeaders=Nt(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return !((r=n.subHeaders)!=null&&r.length)}),Ft(e.options,ar)),e.getLeafHeaders=Nt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,a,i,s,l,c;return [...(o=(a=t[0])==null?void 0:a.headers)!=null?o:[],...(i=(s=n[0])==null?void 0:s.headers)!=null?i:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(h=>h.getLeafHeaders()).flat()},Ft(e.options,ar));}};function jl(e,t,n,r){var o,a;let i=0;const s=function(m,g){g===void 0&&(g=1),i=Math.max(i,g),m.filter(y=>y.getIsVisible()).forEach(y=>{var b;(b=y.columns)!=null&&b.length&&s(y.columns,g+1);},0);};s(e);let l=[];const c=(m,g)=>{const y={depth:g,id:[r,`${g}`].filter(Boolean).join("_"),headers:[]},b=[];m.forEach(k=>{const S=[...b].reverse()[0],M=k.column.depth===y.depth;let T,P=false;if(M&&k.column.parent?T=k.column.parent:(T=k.column,P=true),S&&(S==null?void 0:S.column)===T)S.subHeaders.push(k);else {const N=eg(n,T,{id:[r,g,T.id,k==null?void 0:k.id].filter(Boolean).join("_"),isPlaceholder:P,placeholderId:P?`${b.filter(I=>I.column===T).length}`:void 0,depth:g,index:b.length});N.subHeaders.push(k),b.push(N);}y.headers.push(k),k.headerGroup=y;}),l.push(y),g>0&&c(b,g-1);},h=t.map((m,g)=>eg(n,m,{depth:i,index:g}));c(h,i-1),l.reverse();const u=m=>m.filter(y=>y.column.getIsVisible()).map(y=>{let b=0,k=0,S=[0];y.subHeaders&&y.subHeaders.length?(S=[],u(y.subHeaders).forEach(T=>{let{colSpan:P,rowSpan:N}=T;b+=P,S.push(N);})):b=1;const M=Math.min(...S);return k=k+M,y.colSpan=b,y.rowSpan=k,{colSpan:b,rowSpan:k}});return u((o=(a=l[0])==null?void 0:a.headers)!=null?o:[]),l}const CI=(e,t,n,r,o,a,i)=>{let s={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return s._valuesCache[l]=c.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=c.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var c;return (c=s.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>vI(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,true):void 0,getParentRows:()=>{let l=[],c=s;for(;;){const h=c.getParentRow();if(!h)break;l.push(h),c=h;}return l.reverse()},getAllCells:Nt(()=>[e.getAllLeafColumns()],l=>l.map(c=>kI(e,s,c,c.id)),Ft(e.options,"debugRows")),_getAllCellsByColumnId:Nt(()=>[s.getAllCells()],l=>l.reduce((c,h)=>(c[h.column.id]=h,c),{}),Ft(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(s,e);}return s},TI={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()};}},Ew=(e,t,n)=>{var r,o;const a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return !!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};Ew.autoRemove=e=>Qr(e);const Aw=(e,t,n)=>{var r;return !!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Aw.autoRemove=e=>Qr(e);const Dw=(e,t,n)=>{var r;return ((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Dw.autoRemove=e=>Qr(e);const Pw=(e,t,n)=>{var r;return (r=e.getValue(t))==null?void 0:r.includes(n)};Pw.autoRemove=e=>Qr(e);const Ow=(e,t,n)=>!n.some(r=>{var o;return !((o=e.getValue(t))!=null&&o.includes(r))});Ow.autoRemove=e=>Qr(e)||!(e!=null&&e.length);const Lw=(e,t,n)=>n.some(r=>{var o;return (o=e.getValue(t))==null?void 0:o.includes(r)});Lw.autoRemove=e=>Qr(e)||!(e!=null&&e.length);const Nw=(e,t,n)=>e.getValue(t)===n;Nw.autoRemove=e=>Qr(e);const Fw=(e,t,n)=>e.getValue(t)==n;Fw.autoRemove=e=>Qr(e);const Sh=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};Sh.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,a=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(o)?1/0:o;if(a>i){const s=a;a=i,i=s;}return [a,i]};Sh.autoRemove=e=>Qr(e)||Qr(e[0])&&Qr(e[1]);const Co={includesString:Ew,includesStringSensitive:Aw,equalsString:Dw,arrIncludes:Pw,arrIncludesAll:Ow,arrIncludesSome:Lw,equals:Nw,weakEquals:Fw,inNumberRange:Sh};function Qr(e){return e==null||e===""}const MI={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Rr("columnFilters",e),filterFromLeafRows:false,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Co.includesString:typeof r=="number"?Co.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Co.equals:Array.isArray(r)?Co.arrIncludes:Co.weakEquals},e.getFilterFn=()=>{var n,r;return ru(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Co[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return ((n=e.columnDef.enableColumnFilter)!=null?n:true)&&((r=t.options.enableColumnFilters)!=null?r:true)&&((o=t.options.enableFilters)!=null?o:true)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return (n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return (n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),a=r==null?void 0:r.find(h=>h.id===e.id),i=Eo(n,a?a.value:void 0);if(tg(o,i,e)){var s;return (s=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?s:[]}const l={id:e.id,value:i};if(a){var c;return (c=r==null?void 0:r.map(h=>h.id===e.id?l:h))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]});};},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={};},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var a;return (a=Eo(t,o))==null?void 0:a.filter(i=>{const s=n.find(l=>l.id===i.id);if(s){const l=s.getFilterFn();if(tg(l,i.value,s))return false}return true})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r);},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[]);},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel());}};function tg(e,t,n){return (e&&e.autoRemove?e.autoRemove(t,n):false)||typeof t>"u"||typeof t=="string"&&!t}const II=(e,t,n)=>n.reduce((r,o)=>{const a=o.getValue(e);return r+(typeof a=="number"?a:0)},0),RI=(e,t,n)=>{let r;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);}),r},EI=(e,t,n)=>{let r;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);}),r},AI=(e,t,n)=>{let r,o;return n.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)));}),[r,o]},DI=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++n,r+=a);}),n)return r/n},PI=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!wI(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((a,i)=>a-i);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},OI=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),LI=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,NI=(e,t)=>t.length,fd={sum:II,min:RI,max:EI,extent:AI,mean:DI,median:PI,unique:OI,uniqueCount:LI,count:NI},FI={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return (t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Rr("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id]);},e.getCanGroup=()=>{var n,r;return ((n=e.columnDef.enableGrouping)!=null?n:true)&&((r=t.options.enableGrouping)!=null?r:true)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return (n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return (n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return ()=>{n&&e.toggleGrouping();}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return fd.sum;if(Object.prototype.toString.call(r)==="[object Date]")return fd.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return ru(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:fd[e.columnDef.aggregationFn]};},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[]);},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel());},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={};},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return !e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)};}};function $I(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(a=>!t.includes(a.id));return n==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}const BI={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Rr("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Nt(n=>[Ds(t,n)],n=>n.findIndex(r=>r.id===e.id),Ft(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return ((r=Ds(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Ds(t,n);return ((r=o[o.length-1])==null?void 0:r.id)===e.id};},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[]);},e._getOrderColumnsFn=Nt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let a=[];if(!(t!=null&&t.length))a=o;else {const i=[...t],s=[...o];for(;s.length&&i.length;){const l=i.shift(),c=s.findIndex(h=>h.id===l);c>-1&&a.push(s.splice(c,1)[0]);}a=[...a,...s];}return $I(a,n,r)},Ft(e.options,"debugTable"));}},hd=()=>({left:[],right:[]}),UI={getInitialState:e=>({columnPinning:hd(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Rr("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var a,i;if(n==="right"){var s,l;return {left:((s=o==null?void 0:o.left)!=null?s:[]).filter(u=>!(r!=null&&r.includes(u))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(u=>!(r!=null&&r.includes(u))),...r]}}if(n==="left"){var c,h;return {left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(u=>!(r!=null&&r.includes(u))),...r],right:((h=o==null?void 0:o.right)!=null?h:[]).filter(u=>!(r!=null&&r.includes(u)))}}return {left:((a=o==null?void 0:o.left)!=null?a:[]).filter(u=>!(r!=null&&r.includes(u))),right:((i=o==null?void 0:o.right)!=null?i:[]).filter(u=>!(r!=null&&r.includes(u)))}});},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,a,i;return ((o=r.columnDef.enablePinning)!=null?o:true)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:true)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,a=n.some(s=>r==null?void 0:r.includes(s)),i=n.some(s=>o==null?void 0:o.includes(s));return a?"left":i?"right":false},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0};},createRow:(e,t)=>{e.getCenterVisibleCells=Nt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const a=[...r??[],...o??[]];return n.filter(i=>!a.includes(i.column.id))},Ft(t.options,"debugRows")),e.getLeftVisibleCells=Nt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),Ft(t.options,"debugRows")),e.getRightVisibleCells=Nt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),Ft(t.options,"debugRows"));},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?hd():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:hd())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,a;return !!((o=r.left)!=null&&o.length||(a=r.right)!=null&&a.length)}return !!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Nt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ft(e.options,"debugColumns")),e.getRightLeafColumns=Nt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ft(e.options,"debugColumns")),e.getCenterLeafColumns=Nt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(a=>!o.includes(a.id))},Ft(e.options,"debugColumns"));}},Hl={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:false,columnSizingStart:[]}),jI={getDefaultColumnDef:()=>Hl,getInitialState:e=>({columnSizing:{},columnSizingInfo:pd(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Rr("columnSizing",e),onColumnSizingInfoChange:Rr("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Hl.minSize,(r=a??e.columnDef.size)!=null?r:Hl.size),(o=e.columnDef.maxSize)!=null?o:Hl.maxSize)},e.getStart=Nt(n=>[n,Ds(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,a)=>o+a.getSize(),0),Ft(t.options,"debugColumns")),e.getAfter=Nt(n=>[n,Ds(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,a)=>o+a.getSize(),0),Ft(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o});},e.getCanResize=()=>{var n,r;return ((n=e.columnDef.enableResizing)!=null?n:true)&&((r=t.options.enableColumnResizing)!=null?r:true)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id;},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else {var a;n+=(a=o.column.getSize())!=null?a:0;}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return a=>{if(!r||!o||(a.persist==null||a.persist(),md(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),s=e?e.getLeafHeaders().map(S=>[S.column.id,S.column.getSize()]):[[r.id,r.getSize()]],l=md(a)?Math.round(a.touches[0].clientX):a.clientX,c={},h=(S,M)=>{typeof M=="number"&&(t.setColumnSizingInfo(T=>{var P,N;const I=t.options.columnResizeDirection==="rtl"?-1:1,O=(M-((P=T==null?void 0:T.startOffset)!=null?P:0))*I,U=Math.max(O/((N=T==null?void 0:T.startSize)!=null?N:0),-0.999999);return T.columnSizingStart.forEach(E=>{let[v,L]=E;c[v]=Math.round(Math.max(L+L*U,0)*100)/100;}),{...T,deltaOffset:O,deltaPercentage:U}}),(t.options.columnResizeMode==="onChange"||S==="end")&&t.setColumnSizing(T=>({...T,...c})));},u=S=>h("move",S),m=S=>{h("end",S),t.setColumnSizingInfo(M=>({...M,isResizingColumn:false,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}));},g=n||typeof document<"u"?document:null,y={moveHandler:S=>u(S.clientX),upHandler:S=>{g==null||g.removeEventListener("mousemove",y.moveHandler),g==null||g.removeEventListener("mouseup",y.upHandler),m(S.clientX);}},b={moveHandler:S=>(S.cancelable&&(S.preventDefault(),S.stopPropagation()),u(S.touches[0].clientX),false),upHandler:S=>{var M;g==null||g.removeEventListener("touchmove",b.moveHandler),g==null||g.removeEventListener("touchend",b.upHandler),S.cancelable&&(S.preventDefault(),S.stopPropagation()),m((M=S.touches[0])==null?void 0:M.clientX);}},k=HI()?{passive:false}:false;md(a)?(g==null||g.addEventListener("touchmove",b.moveHandler,k),g==null||g.addEventListener("touchend",b.upHandler,k)):(g==null||g.addEventListener("mousemove",y.moveHandler,k),g==null||g.addEventListener("mouseup",y.upHandler,k)),t.setColumnSizingInfo(S=>({...S,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}));}};},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{});},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?pd():(n=e.initialState.columnSizingInfo)!=null?n:pd());},e.getTotalSize=()=>{var t,n;return (t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return (t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return (t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return (t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0};}};let ql=null;function HI(){if(typeof ql=="boolean")return ql;let e=false;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n);}catch{e=false;}return ql=e,ql}function md(e){return e.type==="touchstart"}const qI={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Rr("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}));},e.getIsVisible=()=>{var n,r;const o=e.columns;return (n=o.length?o.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:true},e.getCanHide=()=>{var n,r;return ((n=e.columnDef.enableHiding)!=null?n:true)&&((r=t.options.enableHiding)!=null?r:true)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked);};},createRow:(e,t)=>{e._getAllVisibleCells=Nt(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ft(t.options,"debugRows")),e.getVisibleCells=Nt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Ft(t.options,"debugRows"));},createTable:e=>{const t=(n,r)=>Nt(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Ft(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{});},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}));},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked);};}};function Ds(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const VI={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()};}},zI={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Rr("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,a;return ((n=e.columnDef.enableGlobalFilter)!=null?n:true)&&((r=t.options.enableGlobalFilter)!=null?r:true)&&((o=t.options.enableFilters)!=null?o:true)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:true)&&!!e.accessorFn};},createTable:e=>{e.getGlobalAutoFilterFn=()=>Co.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return ru(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Co[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t);},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter);};}},KI={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Rr("expanded",e),paginateExpandedRows:true}),createTable:e=>{let t=false,n=false;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=true;});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=true,e._queue(()=>{e.resetExpanded(),n=false;});}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(true):e.setExpanded({});},e.resetExpanded=r=>{var o,a;e.setExpanded(r?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{});},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded();},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===true||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===true:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return (e.getState().expanded===true?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");r=Math.max(r,i.length);}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel());},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const a=r===true?true:!!(r!=null&&r[e.id]);let i={};if(r===true?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=true;}):i=r,n=(o=n)!=null?o:!a,!a&&n)return {...i,[e.id]:true};if(a&&!n){const{[e.id]:s,...l}=i;return l}return r});},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return !!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===true||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return (n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:true)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=true,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,true),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return ()=>{n&&e.toggleExpanded();}};}},kf=0,xf=10,gd=()=>({pageIndex:kf,pageSize:xf}),GI={getInitialState:e=>({...e,pagination:{...gd(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Rr("pagination",e)}),createTable:e=>{let t=false,n=false;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=true;});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=true,e._queue(()=>{e.resetPageIndex(),n=false;});}},e.setPagination=r=>{const o=a=>Eo(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?gd():(o=e.initialState.pagination)!=null?o:gd());},e.setPageIndex=r=>{e.setPagination(o=>{let a=Eo(r,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...o,pageIndex:a}});},e.resetPageIndex=r=>{var o,a;e.setPageIndex(r?kf:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:kf);},e.resetPageSize=r=>{var o,a;e.setPageSize(r?xf:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:xf);},e.setPageSize=r=>{e.setPagination(o=>{const a=Math.max(1,Eo(r,o.pageSize)),i=o.pageSize*o.pageIndex,s=Math.floor(i/a);return {...o,pageIndex:s,pageSize:a}});},e.setPageCount=r=>e.setPagination(o=>{var a;let i=Eo(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=Nt(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((a,i)=>i)),o},Ft(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?true:o===0?false:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return (r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return (r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length};}},_d=()=>({top:[],bottom:[]}),WI={getInitialState:e=>({rowPinning:_d(),...e}),getDefaultOptions:e=>({onRowPinningChange:Rr("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],i=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],s=new Set([...i,e.id,...a]);t.setRowPinning(l=>{var c,h;if(n==="bottom"){var u,m;return {top:((u=l==null?void 0:l.top)!=null?u:[]).filter(b=>!(s!=null&&s.has(b))),bottom:[...((m=l==null?void 0:l.bottom)!=null?m:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)]}}if(n==="top"){var g,y;return {top:[...((g=l==null?void 0:l.top)!=null?g:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)],bottom:((y=l==null?void 0:l.bottom)!=null?y:[]).filter(b=>!(s!=null&&s.has(b)))}}return {top:((c=l==null?void 0:l.top)!=null?c:[]).filter(b=>!(s!=null&&s.has(b))),bottom:((h=l==null?void 0:l.bottom)!=null?h:[]).filter(b=>!(s!=null&&s.has(b)))}});},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:true},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some(s=>r==null?void 0:r.includes(s)),i=n.some(s=>o==null?void 0:o.includes(s));return a?"top":i?"bottom":false},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return -1;const a=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:s}=i;return s});return (r=a==null?void 0:a.indexOf(e.id))!=null?r:-1};},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?_d():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:_d())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,a;return !!((o=r.top)!=null&&o.length||(a=r.bottom)!=null&&a.length)}return !!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return ((o=e.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const s=e.getRow(i,true);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=Nt(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ft(e.options,"debugRows")),e.getBottomRows=Nt(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ft(e.options,"debugRows")),e.getCenterRows=Nt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(a=>!o.has(a.id))},Ft(e.options,"debugRows"));}},YI={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Rr("rowSelection",e),enableRowSelection:true,enableMultiRowSelection:true,enableSubRowSelection:true}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(a=>{a.getCanSelect()&&(r[a.id]=true);}):o.forEach(a=>{delete r[a.id];}),r});},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(a=>{Sf(o,a.id,r,true,e);}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Nt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?yd(e,n):{rows:[],flatRows:[],rowsById:{}},Ft(e.options,"debugTable")),e.getFilteredSelectedRowModel=Nt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?yd(e,n):{rows:[],flatRows:[],rowsById:{}},Ft(e.options,"debugTable")),e.getGroupedSelectedRowModel=Nt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?yd(e,n):{rows:[],flatRows:[],rowsById:{}},Ft(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=false),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=false),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?false:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked);},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked);};},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(a=>{var i;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return a;const s={...a};return Sf(s,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:true,t),s});},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ch(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Cf(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Cf(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:true},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:true},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:true},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked);}};}},Sf=(e,t,n,r,o)=>{var a;const i=o.getRow(t,true);n?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=true)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>Sf(e,s.id,n,r,o));};function yd(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(i,s){return i.map(l=>{var c;const h=Ch(l,n);if(h&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:a(l.subRows)}),h)return l}).filter(Boolean)};return {rows:a(t.rows),flatRows:r,rowsById:o}}function Ch(e,t){var n;return (n=t[e.id])!=null?n:false}function Cf(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return false;let o=true,a=false;return e.subRows.forEach(i=>{if(!(a&&!o)&&(i.getCanSelect()&&(Ch(i,t)?a=true:o=false),i.subRows&&i.subRows.length)){const s=Cf(i,t);s==="all"?a=true:(s==="some"&&(a=true),o=false);}}),o?"all":a?"some":false}const Tf=/([0-9]+)/gm,JI=(e,t,n)=>$w(ba(e.getValue(n)).toLowerCase(),ba(t.getValue(n)).toLowerCase()),XI=(e,t,n)=>$w(ba(e.getValue(n)),ba(t.getValue(n))),ZI=(e,t,n)=>Th(ba(e.getValue(n)).toLowerCase(),ba(t.getValue(n)).toLowerCase()),QI=(e,t,n)=>Th(ba(e.getValue(n)),ba(t.getValue(n))),eR=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},tR=(e,t,n)=>Th(e.getValue(n),t.getValue(n));function Th(e,t){return e===t?0:e>t?1:-1}function ba(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function $w(e,t){const n=e.split(Tf).filter(Boolean),r=t.split(Tf).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),a=r.shift(),i=parseInt(o,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(o>a)return 1;if(a>o)return -1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return -1}return n.length-r.length}const hs={alphanumeric:JI,alphanumericCaseSensitive:XI,text:ZI,textCaseSensitive:QI,datetime:eR,basic:tR},nR={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Rr("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=false;for(const o of n){const a=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return hs.datetime;if(typeof a=="string"&&(r=true,a.split(Tf).length>1))return hs.alphanumeric}return r?hs.text:hs.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return ru(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:hs[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;t.setSorting(i=>{const s=i==null?void 0:i.find(g=>g.id===e.id),l=i==null?void 0:i.findIndex(g=>g.id===e.id);let c=[],h,u=a?n:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?s?h="toggle":h="add":i!=null&&i.length&&l!==i.length-1?h="replace":s?h="toggle":h="replace",h==="toggle"&&(a||o||(h="remove")),h==="add"){var m;c=[...i,{id:e.id,desc:u}],c.splice(0,c.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER));}else h==="toggle"?c=i.map(g=>g.id===e.id?{...g,desc:u}:g):h==="remove"?c=i.filter(g=>g.id!==e.id):c=[{id:e.id,desc:u}];return c});},e.getFirstSortDir=()=>{var n,r;return ((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?false:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,r;return ((n=e.columnDef.enableSorting)!=null?n:true)&&((r=t.options.enableSorting)!=null?r:true)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return (n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":false},e.getSortIndex=()=>{var n,r;return (n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[]);},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):false));}};},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[]);},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel());}},rR=[SI,qI,BI,UI,TI,MI,VI,zI,nR,FI,KI,GI,WI,YI,jI];function oR(e){var t,n;const r=[...rR,...(t=e._features)!=null?t:[]];let o={_features:r};const a=o._features.reduce((m,g)=>Object.assign(m,g.getDefaultOptions==null?void 0:g.getDefaultOptions(o)),{}),i=m=>o.options.mergeOptions?o.options.mergeOptions(a,m):{...a,...m};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(m=>{var g;l=(g=m.getInitialState==null?void 0:m.getInitialState(l))!=null?g:l;});const c=[];let h=false;const u={_features:r,options:{...a,...e},initialState:l,_queue:m=>{c.push(m),h||(h=true,Promise.resolve().then(()=>{for(;c.length;)c.shift()();h=false;}).catch(g=>setTimeout(()=>{throw g})));},reset:()=>{o.setState(o.initialState);},setOptions:m=>{const g=Eo(m,o.options);o.options=i(g);},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m);},_getRowId:(m,g,y)=>{var b;return (b=o.options.getRowId==null?void 0:o.options.getRowId(m,g,y))!=null?b:`${y?[y.id,g].join("."):g}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,g)=>{let y=(g?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!y&&(y=o.getCoreRowModel().rowsById[m],!y))throw new Error;return y},_getDefaultColumnDef:Nt(()=>[o.options.defaultColumn],m=>{var g;return m=(g=m)!=null?g:{},{header:y=>{const b=y.header.column.columnDef;return b.accessorKey?b.accessorKey:b.accessorFn?b.id:null},cell:y=>{var b,k;return (b=(k=y.renderValue())==null||k.toString==null?void 0:k.toString())!=null?b:null},...o._features.reduce((y,b)=>Object.assign(y,b.getDefaultColumnDef==null?void 0:b.getDefaultColumnDef()),{}),...m}},Ft(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Nt(()=>[o._getColumnDefs()],m=>{const g=function(y,b,k){return k===void 0&&(k=0),y.map(S=>{const M=xI(o,S,k,b),T=S;return M.columns=T.columns?g(T.columns,M,k+1):[],M})};return g(m)},Ft(e,"debugColumns")),getAllFlatColumns:Nt(()=>[o.getAllColumns()],m=>m.flatMap(g=>g.getFlatColumns()),Ft(e,"debugColumns")),_getAllFlatColumnsById:Nt(()=>[o.getAllFlatColumns()],m=>m.reduce((g,y)=>(g[y.id]=y,g),{}),Ft(e,"debugColumns")),getAllLeafColumns:Nt(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,g)=>{let y=m.flatMap(b=>b.getLeafColumns());return g(y)},Ft(e,"debugColumns")),getColumn:m=>o._getAllFlatColumnsById()[m]};Object.assign(o,u);for(let m=0;m<o._features.length;m++){const g=o._features[m];g==null||g.createTable==null||g.createTable(o);}return o}function aR(){return e=>Nt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,a,i){a===void 0&&(a=0);const s=[];for(let c=0;c<o.length;c++){const h=CI(e,e._getRowId(o[c],c,i),o[c],c,a,void 0,i==null?void 0:i.id);if(n.flatRows.push(h),n.rowsById[h.id]=h,s.push(h),e.options.getSubRows){var l;h.originalSubRows=e.options.getSubRows(o[c],c),(l=h.originalSubRows)!=null&&l.length&&(h.subRows=r(h.originalSubRows,a+1,h));}}return s};return n.rows=r(t),n},Ft(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function ng(e,t){return e?iR(e)?f(e,{...t}):e:null}function iR(e){return typeof e=="function"}/**
* @license MIT
* https://github.com/TanStack/table/blob/main/packages/react-table/src/index.tsx
*/function sR(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=$e(()=>({current:oR(t)})),[r,o]=$e(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{var s;o(i),(s=e.onStateChange)==null||s.call(e,i);}})),n.current}const Bw='(function(){"use strict";var Ne={version:"1.5.0"};const Oe=4294967296;function pe(r){let e=2166136261;for(let n=0;n<r.length;n+=1)e^=r.charCodeAt(n),e=Math.imul(e,16777619)>>>0;return e.toString(16).padStart(8,"0")}async function Q(r){var t;const e=typeof r=="string"?new TextEncoder().encode(r):r;if((t=globalThis.crypto)!=null&&t.subtle){const a=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),i=await globalThis.crypto.subtle.digest("SHA-256",a);return[...new Uint8Array(i)].map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let a=0;a<e.length;a+=4096)n+=pe(String.fromCharCode(...e.slice(a,a+4096)));return pe(`${e.length}:${n}:${Oe}`)}async function Ue(r){return`bundle_${(await Q(r)).slice(0,24)}`}async function je(r,e,n){return`record_${(await Q(`${r}:${e}:${n}`)).slice(0,32)}`}const De={includeViewerAccountId:!1,includeSourceCaptureTimes:!1,includeRawGraphQL:!1,includePrivateNotes:!1,includeMediaBlobs:!1,visibility:"shared_safe"};function Je(r){return{visibility:r.visibility,includesViewerAccountId:r.includeViewerAccountId,includesSourceCaptureTimes:r.includeSourceCaptureTimes,includesRawGraphQL:r.includeRawGraphQL,includesPrivateNotes:r.includePrivateNotes,includesMediaBlobs:r.includeMediaBlobs,warnings:He(r)}}function He(r){const e=[];return r.includeViewerAccountId&&e.push("Includes the exporting account identifier."),r.includeSourceCaptureTimes&&e.push("Includes local capture/import timestamps."),r.includeRawGraphQL&&e.push("Includes raw API payloads that may contain unrelated account context."),r.includePrivateNotes&&e.push("Includes user-authored local notes or labels."),r.includeMediaBlobs&&e.push("Includes downloaded media files, increasing size and redistribution risk."),r.visibility==="public"&&e.length&&e.unshift("Public bundle includes fields that should be reviewed before sharing."),e}var T=Uint8Array,R=Uint16Array,ae=Int32Array,ie=new T([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oe=new T([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),me=new T([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xe=function(r,e){for(var n=new R(31),t=0;t<31;++t)n[t]=e+=1<<r[t-1];for(var a=new ae(n[30]),t=1;t<30;++t)for(var i=n[t];i<n[t+1];++i)a[i]=i-n[t]<<5|t;return{b:n,r:a}},be=xe(ie,2),Ve=be.b,le=be.r;Ve[28]=258,le[258]=28;for(var Ze=xe(oe,0),Ae=Ze.r,ce=new R(32768),y=0;y<32768;++y){var j=(y&43690)>>1|(y&21845)<<1;j=(j&52428)>>2|(j&13107)<<2,j=(j&61680)>>4|(j&3855)<<4,ce[y]=((j&65280)>>8|(j&255)<<8)>>1}for(var K=(function(r,e,n){for(var t=r.length,a=0,i=new R(e);a<t;++a)r[a]&&++i[r[a]-1];var o=new R(e);for(a=1;a<e;++a)o[a]=o[a-1]+i[a-1]<<1;var c;if(n){c=new R(1<<e);var s=15-e;for(a=0;a<t;++a)if(r[a])for(var u=a<<4|r[a],l=e-r[a],f=o[r[a]-1]++<<l,w=f|(1<<l)-1;f<=w;++f)c[ce[f]>>s]=u}else for(c=new R(t),a=0;a<t;++a)r[a]&&(c[a]=ce[o[r[a]-1]++]>>15-r[a]);return c}),J=new T(288),y=0;y<144;++y)J[y]=8;for(var y=144;y<256;++y)J[y]=9;for(var y=256;y<280;++y)J[y]=7;for(var y=280;y<288;++y)J[y]=8;for(var ee=new T(32),y=0;y<32;++y)ee[y]=5;var Ge=K(J,9,0),Qe=K(ee,5,0),Ie=function(r){return(r+7)/8|0},Se=function(r,e,n){return(n==null||n>r.length)&&(n=r.length),new T(r.subarray(e,n))},Ke=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],re=function(r,e,n){var t=new Error(e||Ke[r]);if(t.code=r,Error.captureStackTrace&&Error.captureStackTrace(t,re),!n)throw t;return t},U=function(r,e,n){n<<=e&7;var t=e/8|0;r[t]|=n,r[t+1]|=n>>8},W=function(r,e,n){n<<=e&7;var t=e/8|0;r[t]|=n,r[t+1]|=n>>8,r[t+2]|=n>>16},se=function(r,e){for(var n=[],t=0;t<r.length;++t)r[t]&&n.push({s:t,f:r[t]});var a=n.length,i=n.slice();if(!a)return{t:ke,l:0};if(a==1){var o=new T(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(A,x){return A.f-x.f}),n.push({s:-1,f:25001});var c=n[0],s=n[1],u=0,l=1,f=2;for(n[0]={s:-1,f:c.f+s.f,l:c,r:s};l!=a-1;)c=n[n[u].f<n[f].f?u++:f++],s=n[u!=l&&n[u].f<n[f].f?u++:f++],n[l++]={s:-1,f:c.f+s.f,l:c,r:s};for(var w=i[0].s,t=1;t<a;++t)i[t].s>w&&(w=i[t].s);var h=new R(w+1),p=fe(n[l-1],h,0);if(p>e){var t=0,g=0,I=p-e,B=1<<I;for(i.sort(function(x,m){return h[m.s]-h[x.s]||x.f-m.f});t<a;++t){var M=i[t].s;if(h[M]>e)g+=B-(1<<p-h[M]),h[M]=e;else break}for(g>>=I;g>0;){var C=i[t].s;h[C]<e?g-=1<<e-h[C]++-1:++t}for(;t>=0&&g;--t){var b=i[t].s;h[b]==e&&(--h[b],++g)}p=e}return{t:new T(h),l:p}},fe=function(r,e,n){return r.s==-1?Math.max(fe(r.l,e,n+1),fe(r.r,e,n+1)):e[r.s]=n},Me=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new R(++e),t=0,a=r[0],i=1,o=function(s){n[t++]=s},c=1;c<=e;++c)if(r[c]==a&&c!=e)++i;else{if(!a&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(a),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(a);i=1,a=r[c]}return{c:n.subarray(0,t),n:e}},Y=function(r,e){for(var n=0,t=0;t<e.length;++t)n+=r[t]*e[t];return n},_e=function(r,e,n){var t=n.length,a=Ie(e+2);r[a]=t&255,r[a+1]=t>>8,r[a+2]=r[a]^255,r[a+3]=r[a+1]^255;for(var i=0;i<t;++i)r[a+i+4]=n[i];return(a+4+t)*8},Te=function(r,e,n,t,a,i,o,c,s,u,l){U(e,l++,n),++a[256];for(var f=se(a,15),w=f.t,h=f.l,p=se(i,15),g=p.t,I=p.l,B=Me(w),M=B.c,C=B.n,b=Me(g),A=b.c,x=b.n,m=new R(19),d=0;d<M.length;++d)++m[M[d]&31];for(var d=0;d<A.length;++d)++m[A[d]&31];for(var v=se(m,7),E=v.t,H=v.l,F=19;F>4&&!E[me[F-1]];--F);var V=u+5<<3,$=Y(a,J)+Y(i,ee)+o,L=Y(a,w)+Y(i,g)+o+14+3*F+Y(m,E)+2*m[16]+3*m[17]+7*m[18];if(s>=0&&V<=$&&V<=L)return _e(e,l,r.subarray(s,s+u));var z,_,P,D;if(U(e,l,1+(L<$)),l+=2,L<$){z=K(w,h,0),_=w,P=K(g,I,0),D=g;var he=K(E,H,0);U(e,l,C-257),U(e,l+5,x-1),U(e,l+10,F-4),l+=14;for(var d=0;d<F;++d)U(e,l+3*d,E[me[d]]);l+=3*F;for(var N=[M,A],q=0;q<2;++q)for(var Z=N[q],d=0;d<Z.length;++d){var O=Z[d]&31;U(e,l,he[O]),l+=E[O],O>15&&(U(e,l,Z[d]>>5&127),l+=Z[d]>>12)}}else z=Ge,_=J,P=Qe,D=ee;for(var d=0;d<c;++d){var k=t[d];if(k>255){var O=k>>18&31;W(e,l,z[O+257]),l+=_[O+257],O>7&&(U(e,l,k>>23&31),l+=ie[O]);var G=k&31;W(e,l,P[G]),l+=D[G],G>3&&(W(e,l,k>>5&8191),l+=oe[G])}else W(e,l,z[k]),l+=_[k]}return W(e,l,z[256]),l+_[256]},We=new ae([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ke=new T(0),Ye=function(r,e,n,t,a,i){var o=i.z||r.length,c=new T(t+o+5*(1+Math.ceil(o/7e3))+a),s=c.subarray(t,c.length-a),u=i.l,l=(i.r||0)&7;if(e){l&&(s[0]=i.r>>3);for(var f=We[e-1],w=f>>13,h=f&8191,p=(1<<n)-1,g=i.p||new R(32768),I=i.h||new R(p+1),B=Math.ceil(n/3),M=2*B,C=function(ye){return(r[ye]^r[ye+1]<<B^r[ye+2]<<M)&p},b=new ae(25e3),A=new R(288),x=new R(32),m=0,d=0,v=i.i||0,E=0,H=i.w||0,F=0;v+2<o;++v){var V=C(v),$=v&32767,L=I[V];if(g[$]=L,I[V]=$,H<=v){var z=o-v;if((m>7e3||E>24576)&&(z>423||!u)){l=Te(r,s,0,b,A,x,d,E,F,v-F,l),E=m=d=0,F=v;for(var _=0;_<286;++_)A[_]=0;for(var _=0;_<30;++_)x[_]=0}var P=2,D=0,he=h,N=$-L&32767;if(z>2&&V==C(v-N))for(var q=Math.min(w,z)-1,Z=Math.min(32767,v),O=Math.min(258,z);N<=Z&&--he&&$!=L;){if(r[v+P]==r[v+P-N]){for(var k=0;k<O&&r[v+k]==r[v+k-N];++k);if(k>P){if(P=k,D=N,k>q)break;for(var G=Math.min(N,k-2),$e=0,_=0;_<G;++_){var we=v-N+_&32767,mr=g[we],Le=we-mr&32767;Le>$e&&($e=Le,L=we)}}}$=L,L=g[$],N+=$-L&32767}if(D){b[E++]=268435456|le[P]<<18|Ae[D];var Pe=le[P]&31,ze=Ae[D]&31;d+=ie[Pe]+oe[ze],++A[257+Pe],++x[ze],H=v+P,++m}else b[E++]=r[v],++A[r[v]]}}for(v=Math.max(v,H);v<o;++v)b[E++]=r[v],++A[r[v]];l=Te(r,s,u,b,A,x,d,E,F,v-F,l),u||(i.r=l&7|s[l/8|0]<<3,l-=7,i.h=I,i.p=g,i.i=v,i.w=H)}else{for(var v=i.w||0;v<o+u;v+=65535){var ge=v+65535;ge>=o&&(s[l/8|0]=u,ge=o),l=_e(s,l+1,r.subarray(v,ge))}i.i=o}return Se(c,0,t+Ie(l)+a)},Xe=(function(){for(var r=new Int32Array(256),e=0;e<256;++e){for(var n=e,t=9;--t;)n=(n&1&&-306674912)^n>>>1;r[e]=n}return r})(),qe=function(){var r=-1;return{p:function(e){for(var n=r,t=0;t<e.length;++t)n=Xe[n&255^e[t]]^n>>>8;r=n},d:function(){return~r}}},er=function(r,e,n,t,a){if(!a&&(a={l:1},e.dictionary)){var i=e.dictionary.subarray(-32768),o=new T(i.length+r.length);o.set(i),o.set(r,i.length),r=o,a.w=i.length}return Ye(r,e.level==null?6:e.level,e.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,n,t,a)},Ce=function(r,e){var n={};for(var t in r)n[t]=r[t];for(var t in e)n[t]=e[t];return n},S=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8};function rr(r,e){return er(r,e||{},0,0)}var Re=function(r,e,n,t){for(var a in r){var i=r[a],o=e+a,c=t;Array.isArray(i)&&(c=Ce(t,i[1]),i=i[0]),i instanceof T?n[o]=[i,c]:(n[o+="/"]=[new T(0),c],Re(i,o,n,t))}},Be=typeof TextEncoder<"u"&&new TextEncoder,nr=typeof TextDecoder<"u"&&new TextDecoder,tr=0;try{nr.decode(ke,{stream:!0}),tr=1}catch{}function ue(r,e){var n;if(Be)return Be.encode(r);for(var t=r.length,a=new T(r.length+(r.length>>1)),i=0,o=function(u){a[i++]=u},n=0;n<t;++n){if(i+5>a.length){var c=new T(i+8+(t-n<<1));c.set(a),a=c}var s=r.charCodeAt(n);s<128||e?o(s):s<2048?(o(192|s>>6),o(128|s&63)):s>55295&&s<57344?(s=65536+(s&1047552)|r.charCodeAt(++n)&1023,o(240|s>>18),o(128|s>>12&63),o(128|s>>6&63),o(128|s&63)):(o(224|s>>12),o(128|s>>6&63),o(128|s&63))}return Se(a,0,i)}var ve=function(r){var e=0;if(r)for(var n in r){var t=r[n].length;t>65535&&re(9),e+=t+4}return e},Ee=function(r,e,n,t,a,i,o,c){var s=t.length,u=n.extra,l=c&&c.length,f=ve(u);S(r,e,o!=null?33639248:67324752),e+=4,o!=null&&(r[e++]=20,r[e++]=n.os),r[e]=20,e+=2,r[e++]=n.flag<<1|(i<0&&8),r[e++]=a&&8,r[e++]=n.compression&255,r[e++]=n.compression>>8;var w=new Date(n.mtime==null?Date.now():n.mtime),h=w.getFullYear()-1980;if((h<0||h>119)&&re(10),S(r,e,h<<25|w.getMonth()+1<<21|w.getDate()<<16|w.getHours()<<11|w.getMinutes()<<5|w.getSeconds()>>1),e+=4,i!=-1&&(S(r,e,n.crc),S(r,e+4,i<0?-i-2:i),S(r,e+8,n.size)),S(r,e+12,s),S(r,e+14,f),e+=16,o!=null&&(S(r,e,l),S(r,e+6,n.attrs),S(r,e+10,o),e+=14),r.set(t,e),e+=s,f)for(var p in u){var g=u[p],I=g.length;S(r,e,+p),S(r,e+2,I),r.set(g,e+4),e+=4+I}return l&&(r.set(c,e),e+=l),e},ar=function(r,e,n,t,a){S(r,e,101010256),S(r,e+8,n),S(r,e+10,n),S(r,e+12,t),S(r,e+16,a)};function ir(r,e){e||(e={});var n={},t=[];Re(r,"",n,e);var a=0,i=0;for(var o in n){var c=n[o],s=c[0],u=c[1],l=u.level==0?0:8,f=ue(o),w=f.length,h=u.comment,p=h&&ue(h),g=p&&p.length,I=ve(u.extra);w>65535&&re(11);var B=l?rr(s,u):s,M=B.length,C=qe();C.p(s),t.push(Ce(u,{size:s.length,crc:C.d(),c:B,f,m:p,u:w!=o.length||p&&h.length!=g,o:a,compression:l})),a+=30+w+I+M,i+=76+2*(w+I)+(g||0)+M}for(var b=new T(i+22),A=a,x=i-a,m=0;m<t.length;++m){var f=t[m];Ee(b,f.o,f,f.f,f.u,f.c.length);var d=30+f.f.length+ve(f.extra);b.set(f.c,f.o+d),Ee(b,a,f,f.f,f.u,f.c.length,f.o,f.m),a+=16+d+(f.m?f.m.length:0)}return ar(b,a,t.length,x,A),b}function or(r){const e=r.replace(/\\\\/g,"/").replace(/^\\/+/,"");if(!e||e.includes("..")||e.startsWith("/"))throw new Error(`Unsafe bundle ZIP path: ${r}`);return e}function lr(r){const e={};for(const n of r){const t=or(n.path),a={level:n.level??6};e[t]=[typeof n.data=="string"?ue(n.data):n.data,a]}return ir(e)}function cr(r){return String(r||"bundle").trim().replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)||"bundle"}function Fe(r){if(typeof r=="string")try{const e=new URL(r);return e.protocol==="http:"||e.protocol==="https:"?e.href:void 0}catch{return}}function sr(r,e){const t=String((r&&typeof r=="object"?r:{}).__typename||e.__typename||"").toLowerCase();return t.includes("tweet")||e.full_text||e.media?"tweet":t.includes("user")||e.screen_name||e.profile_image_url?"user":"unknown"}function fr(r,e){const t=(r&&typeof r=="object"?r:{}).twe_private_fields,a=[t==null?void 0:t.created_at,t==null?void 0:t.updated_at,e.created_at,e.time,e.date];for(const i of a){const o=Number(i);if(Number.isFinite(o)&&o>0)return o;if(typeof i=="string"){const c=Date.parse(i);if(Number.isFinite(c))return c}}}async function ur(r,e,n){const t=e.kind??sr(e.original,e.record),a=String(e.id||e.record.id||e.record.rest_id||""),i=await je(r,t,a||JSON.stringify(e.record)),o=n.includeOriginalMetadata?{...e.record,metadata:e.original}:e.record;return{id:i,kind:t,sourceId:a||void 0,observedAt:fr(e.original,e.record),sensitivity:"low",data:o,mediaRefs:Array.isArray(e.record.media)?e.record.media.map((c,s)=>({id:`${i}:media:${s}`,type:c.type==="photo"||c.type==="video"||c.type==="animated_gif"?c.type:"unknown",url:Fe(c.original),previewUrl:Fe(c.thumbnail),altText:typeof c.ext_alt_text=="string"?c.ext_alt_text:void 0})):void 0}}function vr(){return{records:0,tweets:0,users:0,socialEdges:0,captures:0,mediaBlobs:0}}function dr(r,e){r.records+=1,e.kind==="tweet"&&(r.tweets+=1),e.kind==="user"&&(r.users+=1),e.kind==="social_edge"&&(r.socialEdges+=1),e.kind==="capture"&&(r.captures+=1),r.mediaBlobs+=0}async function hr(r,e){const n=Date.now(),t=typeof performance<"u"?performance.now():Date.now(),a=Math.max(0,Math.floor(Number(e.totalRecords||0))),i=(A,x)=>{var m;(m=e.onProgress)==null||m.call(e,{phase:A,processedRecords:x,totalRecords:a||x,elapsedMs:(typeof performance<"u"?performance.now():Date.now())-t})},o=await Ue(`${e.title}:${e.scope}:${e.queryText||""}:${n}:${a}`),c=vr(),s=[],u=[];let l=0;for await(const A of r){if(!A)continue;const x=await ur(o,A,e);dr(c,x),s.push(`${JSON.stringify(x)}\n`);for(const m of x.mediaRefs||[])m.url&&u.push(m.url);l+=1,(l===1||l===a||l%100===0)&&i("envelope",l)}const f=s.join(""),w=Je(De),h=e.companionSource?JSON.stringify(e.companionSource,void 0,2):null,p=[{path:"manifest.json",contentType:"application/json",role:"manifest"},{path:"records/records.jsonl",contentType:"application/x-ndjson",role:"records",bytes:new TextEncoder().encode(f).byteLength,sha256:await Q(f)}],g=u.join(`\n`)+(u.length?`\n`:"");u.length&&p.push({path:"media/media-urls.txt",contentType:"text/plain",role:"media",bytes:new TextEncoder().encode(g).byteLength,sha256:await Q(g)}),h&&p.push({path:"metadata/companion-source.json",contentType:"application/json",role:"metadata",bytes:new TextEncoder().encode(h).byteLength,sha256:await Q(h)});const I={id:o,title:e.title,description:e.description,producer:{app:"twitter-web-exporter",appVersion:Ne.version,schemaVersion:1,exportedAt:n},privacy:w,counts:c,files:p},B=p[0];B&&(p[0]={...B,bytes:new TextEncoder().encode(JSON.stringify(I,void 0,2)).byteLength}),i("manifest",l);const M=e.compressionLevel??1,C=[{path:"manifest.json",data:JSON.stringify(I,void 0,2),level:M},{path:"records/records.jsonl",data:f,level:M}];u.length&&C.push({path:"media/media-urls.txt",data:g,level:M}),h&&C.push({path:"metadata/companion-source.json",data:h,level:M}),i("zip",l);const b={filename:`twe-bundle-${cr(e.title)}-${n}.zip`,bytes:lr(C),manifest:I};return i("done",l),b}const X=new Map;function de(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function ne(r,e){self.postMessage(r,{transfer:e||[]})}function wr(r){return r instanceof Error?r.message:String(r)}function te(r){var e;(e=r.wake)==null||e.call(r),r.wake=null}async function gr(r){r.rows.length||r.finished||r.cancelled||(r.waitingForChunk||(r.waitingForChunk=!0,ne({type:"bundle-export:ready-for-chunk",jobId:r.jobId})),await new Promise(e=>{r.wake=e}))}async function*yr(r){for(;;){if(await gr(r),r.cancelled)throw new Error("Bundle export cancelled.");const e=r.rows.shift();if(e){yield e;continue}if(r.finished)return}}async function pr(r,e){try{const n=await hr(yr(r),{...e.options,totalRecords:e.totalRecords,onProgress:a=>{if(r.cancelled)throw new Error("Bundle export cancelled.");ne({type:"bundle-export:progress",jobId:e.jobId,progress:a})}});if(r.cancelled)return;const t=n.bytes.buffer.slice(n.bytes.byteOffset,n.bytes.byteOffset+n.bytes.byteLength);ne({type:"bundle-export:done",jobId:e.jobId,filename:n.filename,buffer:t,manifest:n.manifest,elapsedMs:de()-r.startedAt},[t])}catch(n){r.cancelled||ne({type:"bundle-export:error",jobId:e.jobId,error:wr(n),elapsedMs:de()-r.startedAt})}finally{X.delete(e.jobId)}}self.onmessage=r=>{const e=r.data;if(!e||typeof e!="object")return;if(e.type==="bundle-export:start"){const t=X.get(e.jobId);t&&(t.cancelled=!0,te(t),X.delete(e.jobId));const a={jobId:e.jobId,startedAt:de(),rows:[],finished:!1,cancelled:!1,waitingForChunk:!1,wake:null};X.set(e.jobId,a),pr(a,e);return}const n=X.get(e.jobId);if(n){if(e.type==="bundle-export:chunk"){!n.finished&&!n.cancelled&&(n.rows.push(...e.rows),n.waitingForChunk=!1,te(n));return}if(e.type==="bundle-export:finish"){n.finished=!0,te(n);return}e.type==="bundle-export:cancel"&&(n.cancelled=!0,te(n))}}})();\n',rg=typeof self<"u"&&self.Blob&&new Blob([Bw],{type:"text/javascript;charset=utf-8"});function lR(e){let t;try{if(t=rg&&(self.URL||self.webkitURL).createObjectURL(rg),!t)throw "";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t);}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Bw),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t);}}const cR=100,uR="twe_bundle_export_batch_delay_ms_v1";function dR(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`bundle-${crypto.randomUUID()}`:`bundle-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function fR(e){return !!e&&typeof e=="object"&&Symbol.asyncIterator in e}async function*hR(e){if(fR(e)){yield*e;return}yield*e;}function pR(){if(typeof localStorage>"u")return 0;try{const e=localStorage.getItem(uR),t=Number(e||0);return Number.isFinite(t)&&t>0?Math.min(1e3,t):0}catch{return 0}}async function og(e){e&&await new Promise(t=>{globalThis.setTimeout(t,e);});}function mR({rows:e,totalRecords:t,options:n,onProgress:r,batchSize:o=cR}){const a=dR(),i=Ge(),s=Math.max(1,Math.floor(o)),l=pR();let c=null,h=false,u=false,m=0,g=0,y=null,b=null,k=false;const S=()=>new Promise((N,I)=>{if(u||h){I(new Error("Bundle export cancelled."));return}if(k){k=false,N();return}b=N;}),M=()=>{h=true,b==null||b(),b=null;},T=N=>{!c||h||u||c.postMessage(N);},P=new Promise((N,I)=>{y=I;try{c=new lR,Ai("export",!0);}catch(O){Ai("export",false),I(O instanceof Error?O:new Error(String(O)));return}c.onmessage=O=>{const U=O.data;if(!U||U.jobId!==a)return;if(U.type==="bundle-export:ready-for-chunk"){b?(b(),b=null):k=true;return}if(U.type==="bundle-export:progress"){r==null||r(U.progress);return}if(M(),c==null||c.terminate(),c=null,U.type==="bundle-export:error"){He({kind:"export",name:"bundle-worker-error",durationMs:U.elapsedMs,tags:{error:U.error}}),I(new Error(U.error));return}const E=new Blob([U.buffer],{type:"application/zip"});ua(U.filename,E),He({kind:"export",name:"bundle-worker-complete",durationMs:Ge()-i,value:U.buffer.byteLength,tags:{records:U.manifest.counts.records,compressionLevel:n.compressionLevel??1,batches:g,sentRows:m}}),N(U.filename);},c.onerror=O=>{h||(M(),Ai("export",false),c==null||c.terminate(),c=null,I(new Error(O.message||"Bundle export worker failed.")));},T({type:"bundle-export:start",jobId:a,totalRecords:t,options:{...n,compressionLevel:n.compressionLevel??1,totalRecords:t}}),(async()=>{try{let O=[];for await(const U of hR(e)){if(u||h)return;if(O.push(U),!(O.length<s)){if(await S(),u||h)return;g+=1,m+=O.length,T({type:"bundle-export:chunk",jobId:a,rows:O}),He({kind:"export",name:"bundle-worker-batch-sent",value:O.length,tags:{batch:g,sentRows:m,totalRecords:t}}),O=[],await og(l);}}if(O.length){if(await S(),u||h)return;g+=1,m+=O.length,T({type:"bundle-export:chunk",jobId:a,rows:O}),He({kind:"export",name:"bundle-worker-batch-sent",value:O.length,tags:{batch:g,sentRows:m,totalRecords:t}}),await og(l);}if(await S(),u||h)return;T({type:"bundle-export:finish",jobId:a}),He({kind:"export",name:"bundle-worker-stream-complete",durationMs:Ge()-i,value:m,tags:{batches:g,totalRecords:t}});}catch(O){if(h)return;M(),c==null||c.terminate(),c=null,I(O instanceof Error?O:new Error(String(O)));}})();});return {jobId:a,promise:P,cancel:()=>{h||u||(u=true,M(),c==null||c.postMessage({type:"bundle-export:cancel",jobId:a}),c==null||c.terminate(),c=null,y==null||y(new Error("Bundle export cancelled.")),He({kind:"export",name:"bundle-worker-cancel",durationMs:Ge()-i,value:m,tags:{batches:g}}));}}}const bd=["rest_id","legacy.created_at","legacy.full_text","legacy.lang","legacy.entities","legacy.extended_entities","core.user_results.result.rest_id","core.user_results.result.legacy.screen_name","core.user_results.result.legacy.name","core.user_results.result.is_blue_verified","twe_private_fields.created_at","twe_private_fields.updated_at","__bookmark_folder_id","__bookmark_folder_name","__bookmark_folder_url"],gR=new Set(["__proto__","prototype","constructor"]);function Uw(e){return e.split(".").every(t=>t&&!gR.has(t))}function Mh(e){if(e==null||typeof e!="object")return e;if(typeof structuredClone=="function")try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}}function _R(e,t){if(!Uw(t)||!e||typeof e!="object")return;const n=t.split(".");let r=e;for(const o of n){if(!r||typeof r!="object")return;r=r[o];}return r}function ag(e){return Array.isArray(e)?Array.from(new Set(e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(Uw))):[]}function yR(e,t){const n=Object.create(null);for(const r of t){const o=_R(e,r);o!==void 0&&(n[r]=Mh(o));}return n}function bR(e,t,n,r){if(n==="all"){e.metadata=Mh(t);return}n==="custom"&&(e.metadata=yR(t,r));}function oc(e){return Mh(e)}function jw(e){return Array.isArray(e)?Array.from(new Set(e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(Boolean))):[]}function wR(e){return ou(e).filter(t=>{var n;return ((n=t.meta)==null?void 0:n.exportable)!==false}).map(t=>{var n,r;return {key:((n=t.meta)==null?void 0:n.exportKey)||Xs(t),label:((r=t.meta)==null?void 0:r.exportHeader)||Xs(t)}}).filter(t=>!!t.key)}function Hw(e,t){const n=new Set(t.map(r=>r.key));return jw(e).filter(r=>n.has(r))}function Mf(e){return JSON.stringify(e.map(t=>t.key).sort())}function qw(e){return et.get("exportColumnSignature","")===Mf(e)}function ig(e){return qw(e)&&et.get("exportColumnMode")==="custom"?"custom":"all"}function sg(e){if(!qw(e))return e.map(r=>r.key);const t=jw(et.get("exportColumnFields")),n=Hw(t,e);return t.length>0&&n.length===0?e.map(r=>r.key):n}function vR(e,t,n){if(t==="all")return e;const r=new Set(n);return Object.fromEntries(Object.entries(e).filter(([o])=>r.has(o)))}function kR(e,t){if(!e||typeof e!="object")return;const n=t.split(".");let r=e;for(const o of n){if(!r||typeof r!="object")return;r=r[o];}return r}function ou(e){const t=[];for(const n of e){if("columns"in n&&Array.isArray(n.columns)){t.push(...ou(n.columns));continue}t.push(n);}return t}function Xs(e){return "id"in e&&typeof e.id=="string"&&e.id?e.id:"accessorKey"in e&&typeof e.accessorKey=="string"?e.accessorKey:""}function xR(e,t,n){if("accessorFn"in e&&typeof e.accessorFn=="function")return e.accessorFn(t,n);if("accessorKey"in e){if(typeof e.accessorKey=="string")return kR(t,e.accessorKey);if(typeof e.accessorKey=="number"&&Array.isArray(t))return t[e.accessorKey]}}function ps(e,t,n){const r={},o=ou(t);for(const i of o){const s=i.meta;if((s==null?void 0:s.exportable)===false)continue;const l=xR(i,e,n),c={original:e};let h=s!=null&&s.exportValue?s.exportValue(c):l;h===void 0&&(h=null),r[(s==null?void 0:s.exportKey)||Xs(i)]=oc(h);}const a=oc(e);if(a&&(a.__bookmark_folder_id||a.__bookmark_folder_name||a.__bookmark_folder_url)){const i=a.__bookmark_folder_name_source==="api"?a.__bookmark_folder_name??null:null;r.bookmark_folder_id=a.__bookmark_folder_id??null,r.bookmark_folder_name=i,r.bookmark_folder_url=a.__bookmark_folder_url??null;}return {id:oa(a,n),original:oc(e),record:r}}function SR({title:e,columns:t,resultRecords:n,selectedRecords:r,selectedRecordCount:o,selectionExcludedRecordIds:a=[],resultCount:i,streamResultRecords:s,streamSelectedRecords:l,resultSetSnapshot:c,selectionMode:h,preparingFullDataset:u=false,show:m,onClose:g}){const{t:y}=er("exporter"),b=Ki(),[k,S]=xn(ca.JSON),[M,T]=xn(false),[P,N]=xn(false),I=St(()=>wR(t),[t]),[O,U]=xn(ig(I)),[E,v]=xn(sg(I)),L=et.get("exportMetadataMode"),[$,xe]=xn(L==="all"||L==="custom"?L:"none"),[G,le]=xn(ag(et.get("exportMetadataFields"))),Q=St(()=>new Set(E),[E]),ce=St(()=>new Set(G),[G]),[me,pe]=xn(0),[we,z]=xn(0),[ae,Le]=xn("result_set"),[fe,Pe]=xn(1),[it,X]=xn(et.get("bundleIncludeOriginalMetadata",false)===true),[ne,H]=$e(null),se=bt(false),_e=bt(null),ve=bt(null),Ye=bt(null),Xe=bt(false);ot(()=>{if(!m){se.current=false;return}se.current||(se.current=true,H({...c,ids:[...c.ids],warnings:[...c.warnings]}),Le(r.length>0&&h==="explicit"?"selected":"result_set"),pe(0),z(0),U(ig(I)),v(sg(I)));},[I,c,r,h,v,U,pe,Le,z,m]);const Ie=i??(ne==null?void 0:ne.totalMatches)??n.length,xt=St(()=>new Set(h==="all"?a:[]),[a,h]),Lt=h==="all"?Math.min(xt.size,Ie):0,Wt=Math.max(0,Ie-Lt),Kt=o??r.length,Tt=ae==="selected"?r:n,Mt=ae==="selected"?Kt:Wt,Pt=ae==="result_set"&&!!s,zt=ae==="selected"&&!!l,De=Pt||zt,yt=u&&ae==="result_set",lt=Mt>0&&!yt,_t=he=>ae==="result_set"&&xt.has(he),Fe=()=>{const he=[];return Tt.forEach((Me,je)=>{const At=ps(Me,t,je);_t(At.id)||he.push(At);}),he},Ce=he=>{const Me=vR(oc(he.record),O,E);return bR(Me,he.original,$,G),Me},A=he=>{he==="custom"&&E.length===0&&x(I.map(Me=>Me.key)),U(he),et.set("exportColumnMode",he),et.set("exportColumnSignature",Mf(I));},x=he=>{const Me=Hw(he,I);v(Me),et.set("exportColumnFields",Me),et.set("exportColumnSignature",Mf(I));},R=he=>{const Me=Q.has(he)?E.filter(je=>je!==he):[...E,he];x(Me),O==="all"&&A("custom");},B=he=>{xe(he),et.set("exportMetadataMode",he);},V=he=>{const Me=ag(he);le(Me),et.set("exportMetadataFields",Me);},ke=he=>{const Me=ce.has(he)?G.filter(je=>je!==he):[...G,he];V(Me),$==="none"&&B("custom");};async function*oe(){if(Pt&&s){let he=0;for await(const Me of s()){const je=ps(Me,t,he);he+=1,!_t(je.id)&&(yield Ce(je));}return}if(zt&&l){let he=0;for await(const Me of l()){const je=ps(Me,t,he);he+=1,yield Ce(je);}return}for(const he of Fe())yield Ce(he);}const Be=async()=>{if(!lt)return;const he=new AbortController,Me=Ge();Xe.current=false,ve.current=he,T(true),pe(0),z(Mt),He({kind:"export",name:"modal-export-start",value:Mt,tags:{scope:ae,format:k,streaming:De,excluded:Lt}});const je=ou(t).reduce((K,Ve)=>{var Ne,nt;const Dt=((Ne=Ve.meta)==null?void 0:Ne.exportKey)||Xs(Ve),Ee=((nt=Ve.meta)==null?void 0:nt.exportHeader)||Xs(Ve);return K[Dt]=y(Ee),K},{});if(De){if(await bb(oe(),k,`twitter-${e}-${ae==="selected"?"selected":"results"}-${Date.now()}.${k.toLowerCase()}`,je,{onProgress:pe,signal:he.signal}),ve.current=null,T(false),he.signal.aborted){Xe.current||He({kind:"export",name:"modal-export-cancel",durationMs:Ge()-Me,value:me,tags:{scope:ae,format:k,streaming:true,excluded:Lt}});return}He({kind:"export",name:"modal-export-complete",durationMs:Ge()-Me,value:Mt,tags:{scope:ae,format:k,streaming:true,excluded:Lt}});return}const At=[];for(const K of Fe()){if(he.signal.aborted){ve.current=null,T(false);return}At.push(Ce(K)),pe(At.length);}He({kind:"export",name:"modal-array-export-rows",value:At.length,tags:{scope:ae,format:k,excluded:Lt}}),await yb(At,k,`twitter-${e}-${ae==="selected"?"selected":"results"}-${Date.now()}.${k.toLowerCase()}`,je),ve.current=null,T(false),He({kind:"export",name:"modal-export-complete",durationMs:Ge()-Me,value:At.length,tags:{scope:ae,format:k,streaming:false,excluded:Lt}});};async function*Ue(he){if(Pt&&s){let Me=0;for await(const je of s()){if(he.aborted)return;const At=ps(je,t,Me);Me+=1,!_t(At.id)&&(yield At);}return}if(zt&&l){let Me=0;for await(const je of l()){if(he.aborted)return;yield ps(je,t,Me),Me+=1;}return}for(const Me of Fe()){if(he.aborted)return;yield Me;}}const tt=async()=>{if(!lt)return;const he=new AbortController;Ye.current=he,N(true),pe(0),z(Mt);try{const Me=mR({rows:Ue(he.signal),totalRecords:Mt,options:{title:e,scope:ae,queryText:ne==null?void 0:ne.queryText,sort:ne==null?void 0:ne.sort,includeOriginalMetadata:it,compressionLevel:fe},onProgress:je=>{pe(je.processedRecords),z(je.totalRecords);}});if(_e.current=Me,await Me.promise,he.signal.aborted)return;pe(Mt);}catch(Me){const je=Me instanceof Error?Me.message:String(Me);/cancelled/i.test(je)||console.error("[twitter-web-exporter] Failed to export bundle ZIP.",Me);}finally{_e.current=null,Ye.current=null,N(false);}},ue=async()=>{if(!b||P)return;const he=new AbortController;Ye.current=he,N(true),pe(0),z(0);try{const Me=await gC({pairing:b,client:new Zc(b),title:`${e} canonical namespace`,description:"Read-only export from the paired Scrollmark companion canonical namespace.",compressionLevel:fe,signal:he.signal});if(he.signal.aborted)return;const je=Me.bytes.buffer.slice(Me.bytes.byteOffset,Me.bytes.byteOffset+Me.bytes.byteLength);ua(Me.filename,new Blob([je],{type:"application/zip"})),pe(Me.companionSource.records.total),z(Me.companionSource.records.total);}catch(Me){const je=Me instanceof Error?Me.message:String(Me);/cancelled/i.test(je)||console.error("[twitter-web-exporter] Failed to export canonical companion bundle.",Me);}finally{_e.current=null,Ye.current=null,N(false);}},We=()=>{var he,Me,je;if(M){(he=ve.current)==null||he.abort(),Xe.current=true,He({kind:"export",name:"modal-export-cancel",value:me,tags:{scope:ae,format:k,streaming:De}}),ve.current=null,T(false);return}if(P){(Me=Ye.current)==null||Me.abort(),(je=_e.current)==null||je.cancel(),_e.current=null,Ye.current=null,N(false);return}g==null||g();};return f(vr,{class:"max-w-sm md:max-w-screen-sm sm:max-w-screen-sm max-h-full",title:`${e} ${y("Data")}`,show:m,onClose:g,children:[f("div",{class:"px-4 text-base",children:[f("p",{class:"text-base-content text-opacity-60 mb-2 leading-5 text-sm",children:y("Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.")}),f("div",{class:"flex items-center",children:[f("p",{class:"mr-2 leading-8",children:y("Data length:")}),f("span",{class:"font-mono leading-6 h-6 bg-base-200 px-2 rounded-md",children:Mt}),yt?f("span",{class:"ml-2 inline-flex items-center gap-1 text-xs opacity-70",children:[f("span",{class:"loading loading-spinner loading-xs"}),y("loading remaining rows")]}):null]}),f("div",{class:"flex items-center gap-4",children:[f("p",{class:"leading-8",children:y("Export scope:")}),f("label",{class:"label cursor-pointer gap-2 py-0",children:[f("input",{type:"radio",name:"export-scope",class:"radio radio-sm",checked:ae==="result_set",onChange:()=>Le("result_set")}),f("span",{children:y("All current results")}),f("span",{class:"font-mono opacity-60",children:["(",Wt,")"]})]}),f("label",{class:on("label cursor-pointer gap-2 py-0",Kt<=0&&"opacity-50"),children:[f("input",{type:"radio",name:"export-scope",class:"radio radio-sm",checked:ae==="selected",disabled:Kt<=0,onChange:()=>Le("selected")}),f("span",{children:y("Selected rows")}),f("span",{class:"font-mono opacity-60",children:["(",Kt,")"]})]})]}),ne?f("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 text-xs leading-5",children:[f("div",{class:"font-semibold",children:y("Pinned result set")}),f("div",{class:"font-mono opacity-70",children:ne.resultSetId}),f("div",{children:[y("Query"),":"," ",f("span",{class:"font-mono",children:ne.queryText||"-"})]}),f("div",{children:[y("Sort"),": ",f("span",{class:"font-mono",children:ne.sort})]})]}):null,f("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2",children:[f("div",{class:"mb-2 flex flex-wrap items-center gap-4",children:[f("p",{class:"font-semibold text-sm",children:y("Export columns")}),f("label",{class:"label cursor-pointer gap-2 py-0",children:[f("input",{type:"radio",name:"export-column-mode",class:"radio radio-sm",checked:O==="all",onChange:()=>A("all")}),f("span",{children:y("All")})]}),f("label",{class:"label cursor-pointer gap-2 py-0",children:[f("input",{type:"radio",name:"export-column-mode",class:"radio radio-sm",checked:O==="custom",onChange:()=>A("custom")}),f("span",{children:y("Custom columns")})]}),O==="custom"?f("div",{class:"ml-auto flex gap-2",children:[f("button",{type:"button",class:"btn btn-xs",onClick:()=>x(I.map(he=>he.key)),children:y("Select all")}),f("button",{type:"button",class:"btn btn-xs",onClick:()=>x([]),children:y("Clear")})]}):null]}),O==="custom"?f("div",{class:"space-y-2",children:[f("div",{class:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-1 text-xs",children:I.map(he=>f("label",{class:"label cursor-pointer justify-start gap-2 py-0",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:Q.has(he.key),onChange:()=>R(he.key)}),f("span",{children:y(he.label)}),f("span",{class:"font-mono opacity-60 break-all",children:he.key})]},he.key))}),f("p",{class:"text-xs opacity-60",children:[E.length," ",y("columns selected")]})]}):null]}),f("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2",children:[f("div",{class:"mb-2 flex flex-wrap items-center gap-4",children:[f("p",{class:"font-semibold text-sm",children:y("Metadata")}),f("label",{class:"label cursor-pointer gap-2 py-0",children:[f("input",{type:"radio",name:"export-metadata-mode",class:"radio radio-sm",checked:$==="none",onChange:()=>B("none")}),f("span",{children:y("None")})]}),f("label",{class:"label cursor-pointer gap-2 py-0",children:[f("input",{type:"radio",name:"export-metadata-mode",class:"radio radio-sm",checked:$==="all",onChange:()=>B("all")}),f("span",{children:y("All")})]}),f("label",{class:"label cursor-pointer gap-2 py-0",children:[f("input",{type:"radio",name:"export-metadata-mode",class:"radio radio-sm",checked:$==="custom",onChange:()=>B("custom")}),f("span",{children:y("Custom fields")})]})]}),$==="custom"?f("div",{class:"space-y-2",children:[f("div",{class:"grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-1 text-xs",children:bd.map(he=>f("label",{class:"label cursor-pointer justify-start gap-2 py-0",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:ce.has(he),onChange:()=>ke(he)}),f("span",{class:"font-mono break-all",children:he})]},he))}),f("label",{class:"form-control",children:[f("span",{class:"label-text text-xs",children:y("Additional metadata paths")}),f("textarea",{class:"textarea textarea-bordered textarea-sm font-mono text-xs min-h-16",value:G.filter(he=>!bd.includes(he)).join(`
`),placeholder:`legacy.conversation_id_str
views.count`,onInput:he=>{const Me=he.currentTarget.value.split(/\r?\n|,/).map(je=>je.trim()).filter(Boolean);V([...bd.filter(je=>ce.has(je)),...Me]);}})]}),f("p",{class:"text-xs opacity-60",children:[G.length," ",y("metadata fields selected")]})]}):null]}),f("div",{class:"flex",children:[f("p",{class:"mr-2 leading-8",children:y("Export as:")}),f("select",{class:"select select-bordered select-sm w-32",onChange:he=>{S(he.target.value);},children:Object.values(ca).map(he=>f("option",{selected:he===k,children:he},he))})]}),f("div",{class:"flex items-center gap-2",children:[f("p",{class:"leading-8",children:y("Bundle ZIP compression:")}),f("select",{class:"select select-bordered select-sm w-44",value:String(fe),onChange:he=>Pe(Number(he.target.value)),children:[f("option",{value:"0",children:y("Fastest / store")}),f("option",{value:"1",children:y("Balanced / fast")}),f("option",{value:"6",children:y("Smaller / slower")})]})]}),f("label",{class:"label cursor-pointer justify-start gap-2 py-0",children:[f("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:it,onChange:he=>{const Me=he.currentTarget.checked;X(Me),et.set("bundleIncludeOriginalMetadata",Me);}}),f("span",{children:y("Include original record metadata in bundle:")})]}),Mt>0||b?null:f("div",{class:"flex items-center justify-center h-28 w-full",children:f("p",{class:"text-base-content text-opacity-50",children:y("No data selected.")})}),f("div",{class:"flex flex-col mt-6",children:[f("progress",{class:"progress progress-primary w-full",value:me/(we||1)*100,max:"100"}),f("span",{class:"text-sm leading-none mt-2 text-base-content text-opacity-60",children:`${me}/${we||Mt}`})]})]}),f("div",{class:"flex space-x-2",children:[f("span",{class:"flex-grow"}),f("button",{class:"btn",onClick:We,children:y(P||M?"Cancel Export":"Cancel")}),f("button",{class:on("btn btn-secondary",(P||!lt)&&"btn-disabled"),onClick:tt,title:y("Export a canonical portable ZIP bundle for sharing/importing."),children:[P&&f("span",{class:"loading loading-spinner"}),y("Export Bundle ZIP")]}),f("button",{class:on("btn btn-info",(P||!b)&&"btn-disabled"),disabled:P||!b,onClick:ue,title:y(b?"Export the paired canonical namespace as a verified shared-safe bundle.":"Pair a local companion to export its canonical namespace."),children:[P&&f("span",{class:"loading loading-spinner"}),y("Export Companion Namespace")]}),f("button",{class:on("btn btn-primary",(M||!lt)&&"btn-disabled"),onClick:Be,children:[M&&f("span",{class:"loading loading-spinner"}),y("Start Export")]})]})]})}const lg=.5,cg=8,ug=1.25;function dg(e,t,n){return Math.max(t,Math.min(n,e))}function CR(e){return /\.mp4(?:[?#].*)?$/i.test(e)}function TR({show:e,url:t,dockAfterClose:n,onDockAfterCloseChange:r,onClose:o}){const{t:a}=er(),[i,s]=$e(1),[l,c]=$e({x:0,y:0}),h=bt(false),u=bt({x:0,y:0}),m=bt({x:0,y:0}),g=CR(t);ot(()=>{s(1),c({x:0,y:0});},[t]);const y=qn(I=>{s(O=>{const U=dg(I,lg,cg);return U<=1&&O>1&&c({x:0,y:0}),U});},[]),b=qn(I=>{s(O=>{const U=dg(O*I,lg,cg);return U<=1&&c({x:0,y:0}),U});},[]),k=qn(()=>{s(1),c({x:0,y:0});},[]),S=I=>{if(!g){if(I.ctrlKey||I.metaKey||I.altKey){I.preventDefault(),b(I.deltaY<0?1.12:.88);return}i>1&&(I.preventDefault(),c(O=>({x:O.x-I.deltaX,y:O.y-I.deltaY})));}},M=I=>{var O,U;g||i<=1||(h.current=true,u.current={x:I.clientX,y:I.clientY},m.current=l,(U=(O=I.currentTarget).setPointerCapture)==null||U.call(O,I.pointerId));},T=I=>{h.current&&(I.preventDefault(),c({x:m.current.x+I.clientX-u.current.x,y:m.current.y+I.clientY-u.current.y}));},P=I=>{var O,U;h.current=false,(U=(O=I.currentTarget).releasePointerCapture)==null||U.call(O,I.pointerId);},N=()=>{g||(i>1?k():y(2));};return f(vr,{title:a("Media View"),class:"h-[min(92vh,980px)] w-[min(96vw,1480px)] max-w-[96vw] max-h-[92vh]",show:e&&!!t,onClose:o,children:f("div",{class:"flex min-h-0 grow flex-col gap-2",children:[f("div",{class:"flex flex-wrap items-center gap-2 border-b border-base-300 pb-2 text-xs",children:[g?null:f(sr,{children:[f("button",{class:"btn btn-xs",onClick:()=>b(1/ug),children:[f(Fk,{size:14}),Math.round(i*100),"%"]}),f("button",{class:"btn btn-xs",onClick:()=>b(ug),children:f(Nk,{size:14})}),f("button",{class:"btn btn-xs",onClick:k,children:[f(ey,{size:14}),"Reset"]})]}),f("a",{class:"btn btn-xs",href:t,target:"_blank",rel:"noreferrer",children:[f(X_,{size:14}),"Open"]}),f("label",{class:"label ml-auto cursor-pointer gap-2 py-0",children:[f("input",{type:"checkbox",class:"toggle toggle-xs",checked:n,onChange:I=>r(I.target.checked)}),f("span",{class:"label-text text-xs",children:"Keep mini preview after close"})]})]}),f("main",{class:`relative min-h-0 grow overflow-hidden rounded-box-half bg-base-200 ${g?"":i>1?"cursor-grab active:cursor-grabbing":"cursor-zoom-in"}`,onWheel:S,onPointerDown:M,onPointerMove:T,onPointerUp:P,onPointerCancel:P,onDblClick:N,children:g?f("video",{controls:true,class:"h-full w-full object-contain",src:t}):f("img",{class:"h-full w-full select-none object-contain",style:{transform:`translate3d(${l.x}px, ${l.y}px, 0) scale(${i})`,transformOrigin:"center center",transition:h.current?"none":"transform 120ms ease-out"},src:t,draggable:false})})]})})}const MR=/[\p{L}\p{N}_]+(?:['’][\p{L}\p{N}_]+)*/gu,fg={bm25:1,lexical:1,cover_density:1,recency:0,term_match:1,phrase_match:8,quoted_phrase_match:256,cover_bigram:10,cover_trigram:30},IR="twe_raw_search_ranking_v1",RR=128,Vw=Math.max(1,Number(wh.min_term_length)),ER=Math.max(8,Number(wh.max_expansions)),If=Math.max(1,Number(ll.min_term_length)),Ps=Math.max(0,Number(ll.max_edit_distance)),zw=Math.max(1,Number(ll.prefix_root_length)),Kw=Math.max(8,Number(ll.max_expansions)),Gw=3,AR=4,DR=.65,PR=1.5,ms=new Map,hg=new WeakMap;function ut(e,t){const n=t.split(".");let r=e;for(const o of n){if(!r||typeof r!="object")return null;r=r[o];}return r}function Ot(e){return typeof e=="string"?e:""}function gs(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e>0;if(typeof e=="string"){const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}return false}function Vl(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){const t=Number(e);if(Number.isFinite(t))return t}return 0}function jn(e){return e.trim().toLowerCase()}function da(e){if(!e)return [];const t=e.toLowerCase().match(MR);return t?t.map(n=>n.replace(/['’]/g,"")).filter(Boolean):[]}function wd(e){const t=new Map;for(let n=0;n<e.length;n+=1){const r=e[n];r&&t.set(r,(t.get(r)||0)+1);}return t}function Ww(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const n=new Array(t.length+1),r=new Array(t.length+1);for(let o=0;o<=t.length;o+=1)n[o]=o;for(let o=1;o<=e.length;o+=1){r[0]=o;for(let a=1;a<=t.length;a+=1){const i=e[o-1]===t[a-1]?0:1;r[a]=Math.min((n[a]??0)+1,(r[a-1]??0)+1,(n[a-1]??0)+i);}for(let a=0;a<=t.length;a+=1)n[a]=r[a]??0;}return n[t.length]??Math.max(e.length,t.length)}function Rf(e,t=false){if(!e)return 0;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){const r=t?"T23:59:59.999Z":"T00:00:00.000Z",o=Date.parse(`${e}${r}`);return Number.isFinite(o)?o:0}const n=Date.parse(e);return Number.isFinite(n)?n:0}function OR(e){return e?e.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim():""}function LR(e){const t=new Set,n=r=>{if(Array.isArray(r))for(const o of r){if(!o||typeof o!="object")continue;const a=o,i=Ot(a.expanded_url).trim(),s=Ot(a.display_url).trim(),l=Ot(a.url).trim();i&&t.add(i),s&&t.add(s),l&&t.add(l);}};return n(ut(e,"legacy.entities.urls")),n(ut(e,"legacy.entities.media")),n(ut(e,"legacy.entities.description.urls")),n(ut(e,"legacy.entities.url.urls")),[...t]}function vd(e,t,n="text"){const r=ut(e,t);if(!Array.isArray(r))return [];const o=new Set;for(const a of r){if(!a||typeof a!="object")continue;const s=jn(Ot(a[n]).trim());s&&o.add(s);}return [...o]}function NR(e){const t=(Array.isArray(ut(e,"legacy.extended_entities.media"))?ut(e,"legacy.extended_entities.media"):ut(e,"legacy.entities.media"))||[];if(!Array.isArray(t))return [];const n=new Set;for(const r of t){if(!r||typeof r!="object")continue;const a=jn(Ot(r.type).trim());a&&n.add(a);}return [...n]}function FR(e){const t=ut(e,"article.article_results.result.content_state.blocks");if(!Array.isArray(t))return [];const n=[];for(const r of t){if(!r||typeof r!="object")continue;const o=Ot(r.text).trim();o&&n.push(o);}return n}function $R(e){const t=new Set;for(const n of e)try{const r=n.startsWith("http")?n:`https://${n}`,o=new URL(r).hostname.replace(/^www\./,"").toLowerCase();o&&t.add(o);}catch{}return [...t]}function Os(e,t,n=false){if(!t.length)return 0;const r=t[0],o=[];for(let i=0;i<e.length;i+=1)e[i]===r&&o.push(i);if(!o.length)return null;let a=null;for(const i of o){let s=i,l=true;for(let m=1;m<t.length;m+=1){const g=t[m],y=n&&m===t.length-1;let b=-1;for(let k=s+1;k<e.length;k+=1){const S=e[k];if(y&&g&&(S!=null&&S.startsWith(g))||S===g){b=k;break}}if(b<0){l=false;break}s=b;}if(!l)continue;const c=s-i,h=Math.max(0,t.length-1),u=Math.max(0,c-h);(a===null||u<a)&&(a=u);}return a}function pg(e){const t=e||{},n=Ot(ut(t,"rest_id"))||Ot(ut(t,"legacy.id_str"))||Ot(ut(t,"id_str"))||`${Math.random().toString(36).slice(2)}`,r=Ot(ut(t,"twe_private_fields.article_markdown"))||Ks(ut(t,"article.article_results.result")??null)||Ot(ut(t,"note_tweet.note_tweet_results.result.text"))||[Ot(ut(t,"article.article_results.result.title")),Ot(ut(t,"article.article_results.result.preview_text")),...FR(t)].map(Tt=>Tt.trim()).filter(Boolean).filter((Tt,Mt,Pt)=>Pt.indexOf(Tt)===Mt).join(`
`)||Ot(ut(t,"legacy.full_text"))||Ot(ut(t,"legacy.text"))||Ot(ut(t,"legacy.description")),o=Ot(ut(t,"quoted_status_result.result.twe_private_fields.article_markdown"))||Ks(ut(t,"quoted_status_result.result.article.article_results.result")??null)||Ot(ut(t,"quoted_status_result.result.note_tweet.note_tweet_results.result.text"))||Ot(ut(t,"quoted_status_result.result.legacy.full_text"))||Ot(ut(t,"quoted_status_result.result.legacy.text"))||Ot(ut(t,"quoted_status_result.result.article.article_results.result.title"))||Ot(ut(t,"quoted_status_result.result.article.article_results.result.preview_text")),a=jn(Ot(ut(t,"quoted_status_result.result.core.user_results.result.core.screen_name"))),i=Ot(ut(t,"quoted_status_result.result.core.user_results.result.core.name")),s=jn(Ot(ut(t,"core.user_results.result.core.screen_name"))||Ot(ut(t,"core.screen_name"))),l=Ot(ut(t,"core.user_results.result.core.name"))||Ot(ut(t,"core.name")),c=Ot(ut(t,"core.user_results.result.rest_id"))||Ot(ut(t,"rest_id")),h=Ot(ut(t,"legacy.created_at"))||Ot(ut(t,"core.created_at")),u=h?Number(Ni(h)||0):Number(ut(t,"article.article_results.result.metadata.first_published_at_secs")||0)*1e3,m=OR(Ot(ut(t,"legacy.source"))),g=jn(Ot(ut(t,"card.card_platform.card_name"))||Ot(ut(t,"card.name"))||Ot(ut(t,"__card_name"))),y=Ot(ut(t,"__bookmark_folder_id")).trim(),b=Ot(ut(t,"__bookmark_folder_name")).trim(),k=LR(t),S=$R(k),M=vd(t,"legacy.entities.user_mentions","screen_name"),T=vd(t,"legacy.entities.hashtags"),P=vd(t,"legacy.entities.symbols"),N=NR(t),I=Ao(ut(t,"twe_relationship_fields.subject_screen_names")).map(Tt=>jn(Tt)),O=Ao(ut(t,"twe_relationship_fields.subject_user_ids")).map(Tt=>String(Tt).trim()),U=Ao(ut(t,"twe_relationship_fields.relation_types")).map(Tt=>jn(Tt)),E=jn(Ot(ut(t,"legacy.in_reply_to_screen_name"))),v=Ot(ut(t,"legacy.in_reply_to_user_id_str")).trim(),L=Ot(ut(t,"legacy.in_reply_to_status_id_str")).trim(),$=Ot(ut(t,"legacy.conversation_id_str"))||Ot(ut(t,"conversation_id_str")),xe=jn(Ot(ut(t,"legacy.lang"))),G=jn(Ot(ut(t,"__route_type"))),le=N.length>0,Q=N.includes("photo"),ce=N.includes("video")||N.includes("animated_gif"),me=k.length>0,pe=!!ut(t,"legacy.retweeted_status_result")||Ot(ut(t,"legacy.full_text")).startsWith("RT @"),we=!!ut(t,"quoted_status_result"),z=!!L,ae=jn(Ot(ut(t,"core.user_results.result.verification.verified_type")))==="verified"||jn(Ot(ut(t,"verification.verified_type")))==="verified",Le=gs(ut(t,"core.user_results.result.is_blue_verified"))||gs(ut(t,"is_blue_verified")),fe=gs(ut(t,"legacy.favorited")),Pe=gs(ut(t,"legacy.retweeted")),it=gs(ut(t,"legacy.bookmarked")),X=Vl(ut(t,"legacy.favorite_count")),ne=Vl(ut(t,"legacy.retweet_count")),H=Vl(ut(t,"legacy.reply_count")),se=Vl(ut(t,"legacy.bookmark_count")),_e=[r,o,m,s,l,a,i,E,y,b,g,...I,...O,...U,...M,...T,...P,...k,...S].filter(Boolean).join(" ").trim(),ve=[r,m,s,l,E,y,b,g,...I,...O,...U,...M,...T,...P,...k,...S].filter(Boolean).join(" ").trim(),Ye=[o,a,i].filter(Boolean).join(" ").trim(),Xe=da(_e),Ie=da(ve),xt=da(Ye),Lt=wd(Xe),Wt=wd(Ie),Kt=wd(xt);return {raw:e,id:n,text:_e,primaryText:ve,quotedText:Ye,tokens:Xe,primaryTokens:Ie,quotedTokens:xt,tokenFreq:Lt,primaryTokenFreq:Wt,quotedTokenFreq:Kt,createdAtMs:u,authorScreenName:s,authorId:c,toUser:E,toUserId:v,inReplyToId:L,conversationId:$,lang:xe,routeType:G,sourceText:jn(m),cardName:g,bookmarkFolderId:y,bookmarkFolderName:jn(b),mentions:M,hashtags:T,cashtags:P,urls:k.map(Tt=>Tt.toLowerCase()),domains:S,favoriteCount:X,retweetCount:ne,replyCount:H,bookmarkCount:se,favorited:fe,retweeted:Pe,bookmarked:it,hasMedia:le,hasImages:Q,hasVideo:ce,hasLinks:me,isReply:z,isRetweet:pe,isQuote:we,isVerified:ae,isBlueVerified:Le,fieldSearchCache:new Map}}function BR(e){if(!e||typeof e!="object")return pg(e);const t=hg.get(e);if(t)return t;const n=pg(e);return hg.set(e,n),n}function Ao(e){if(e==null)return [];if(typeof e=="string"){const t=e.trim();return t?[t]:[]}return typeof e=="number"||typeof e=="boolean"?[String(e)]:Array.isArray(e)?e.flatMap(t=>Ao(t)):typeof e=="object"?Object.values(e).flatMap(t=>Ao(t)):[]}function UR(e,t){switch(t){case "text":return e.text;case "id":return e.id;case "author_screen_name":return e.authorScreenName;case "author_id":return e.authorId;case "to_user":return e.toUser;case "to_user_id":return e.toUserId;case "conversation_id":return e.conversationId;case "lang":return e.lang;case "route":case "route_type":return e.routeType;case "source":case "source_text":return e.sourceText;case "card_name":return e.cardName;case "bookmark_folder_id":return e.bookmarkFolderId;case "bookmark_folder_name":return e.bookmarkFolderName;case "subject_screen_names":return Ao(ut(e.raw||{},"twe_relationship_fields.subject_screen_names"));case "subject_user_ids":return Ao(ut(e.raw||{},"twe_relationship_fields.subject_user_ids"));case "relation_types":return Ao(ut(e.raw||{},"twe_relationship_fields.relation_types"));case "mentions":return e.mentions;case "hashtags":return e.hashtags;case "cashtags":return e.cashtags;case "urls":return e.urls;case "domains":return e.domains;default:return ut(e.raw||{},t)}}function jR(e,t){const n=String(t||"").trim();if(!n)return {text:e.text,tokens:e.tokens,tokenFreq:e.tokenFreq};const r=e.fieldSearchCache.get(n);if(r)return r;const a=Ao(UR(e,n)).join(" ").trim(),i=da(a),s=new Map;for(const c of i)s.set(c,(s.get(c)||0)+1);const l={text:a,tokens:i,tokenFreq:s};return e.fieldSearchCache.set(n,l),l}function HR(e){const t=new Map;let n=0;for(const r of e){n+=r.tokens.length;for(const o of r.tokenFreq.keys())t.set(o,(t.get(o)||0)+1);}return {docCount:e.length,avgDocLength:e.length?n/e.length:1,termDocFreq:t}}function hn(e,t,n){if(!t)return;const r=e.get(t);if(r){r.push(n);return}e.set(t,[n]);}function rn(e,t){return `${e}:${t}`}function qR(e){const t=new Map,n=new Map;for(let r=0;r<e.length;r+=1){const o=e[r];if(o){for(const a of o.tokenFreq.keys())hn(t,a,r);hn(n,rn("id",o.id),r),hn(n,rn("from",o.authorScreenName),r),hn(n,rn("from_id",o.authorId),r),hn(n,rn("author_id",o.authorId),r),hn(n,rn("to",o.toUser),r),hn(n,rn("to_id",o.toUserId),r),hn(n,rn("in_reply_to_id",o.inReplyToId),r),hn(n,rn("conversation_id",o.conversationId),r),hn(n,rn("lang",o.lang),r),hn(n,rn("route",o.routeType),r),hn(n,rn("bookmark_folder",o.bookmarkFolderId),r);for(const a of o.mentions)hn(n,rn("mention",a),r);for(const a of o.hashtags)hn(n,rn("hashtag",a),r);for(const a of o.cashtags)hn(n,rn("cashtag",a),r);o.hasMedia&&hn(n,rn("is","media"),r),o.hasImages&&hn(n,rn("is","images"),r),o.hasVideo&&hn(n,rn("is","videos"),r),o.hasLinks&&hn(n,rn("is","links"),r),o.bookmarked&&hn(n,rn("is","bookmarked"),r),o.favorited&&hn(n,rn("is","liked"),r),o.retweeted&&hn(n,rn("is","retweeted"),r),o.isReply&&hn(n,rn("is","reply"),r),o.isRetweet&&hn(n,rn("is","retweet"),r),o.isQuote&&hn(n,rn("is","quote"),r),o.isVerified&&hn(n,rn("is","verified"),r),o.isBlueVerified&&hn(n,rn("is","blue_verified"),r);}}return {tokenDocs:t,exactFilterDocs:n,tokenVocabulary:[...t.keys()].sort()}}function kd(e,t){const n=t instanceof Set?t:new Set(t);if(!e)return new Set(n);const r=new Set;for(const o of e)n.has(o)&&r.add(o);return r}function Dc(e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}function VR(e,t){if(!e.length||!t.length)return [];const n=e.length<=t.length?e:t,r=e.length<=t.length?t:e,o=new Set(r),a=[];for(const i of n)o.has(i)&&a.push(i);return a}function zR(e,t){const n=t.orderedTerms.filter(Boolean);if(n.length<Gw)return null;const r=[];for(let a=0;a<n.length-1;a+=1){const i=e.indexes.tokenDocs.get(n[a]||"")||[],s=e.indexes.tokenDocs.get(n[a+1]||"")||[],l=VR(i,s);l.length&&r.push(l);}if(!r.length)return null;const o=Dc(r);return !o.size||o.size>=e.docs.length?null:o}function KR(e,t){var u;const n=t.positiveTerms.filter(Boolean);if(n.length<Gw)return null;const r=Math.max(1,e.rankingContext.docCount),o=n.map(m=>({term:m,docFreq:e.rankingContext.termDocFreq.get(m)||0})).filter(m=>m.docFreq>0).sort((m,g)=>m.docFreq!==g.docFreq?m.docFreq-g.docFreq:m.term.localeCompare(g.term));if(!o.length)return null;const a=o.filter(m=>m.docFreq/r<=DR),i=a.length?a:o,s=((u=i[0])==null?void 0:u.docFreq)||0,l=s>0?i.filter(m=>m.docFreq<=s*PR):i,c=(l.length?l:i).slice(0,AR);if(!c.length)return null;const h=Dc(c.map(m=>e.indexes.tokenDocs.get(m.term)||[]));return !h.size||h.size>=e.docs.length?null:h}function GR(e,t,n){if(!t||t.length<Vw)return [];const r=[];for(const o of e)if(o.startsWith(t)&&(r.push(o),r.length>=n))break;return r}function Yw(e,t,n){if(!t||t.length<If||Ps<=0)return [];const r=t.slice(0,zw),o=[];for(const a of e)if(a.startsWith(r)&&!(Math.abs(a.length-t.length)>Ps)&&!(Ww(a,t)>Ps)&&(o.push(a),o.length>=n))break;return o}function WR(e,t){const n=e.indexes.tokenDocs,r=e.indexes.tokenVocabulary,o=da(t.value);if(!o.length)return [];const a=new Set;for(let i=0;i<o.length;i+=1){const s=o[i];if(!(!s||(a.add(s),!(i===o.length-1)))){if(t.prefix)for(const c of GR(r,s,ER))a.add(c);if(t.fuzzy)for(const c of Yw(r,s,Kw))a.add(c);}}return [...a].flatMap(i=>n.get(i)||[])}function YR(e,t){const n=String(t.value||"").trim(),r=jn(n);if(!n)return null;const o=e.indexes.exactFilterDocs;switch(t.name){case "from":case "to":case "lang":case "route":case "mention":case "hashtag":case "cashtag":case "id":return new Set(o.get(rn(t.name,r))||[]);case "from_id":case "author_id":case "to_id":case "in_reply_to_id":case "conversation_id":return new Set(o.get(rn(t.name,n))||[]);case "bookmark_folder":return /^\d+$/.test(n)?new Set(o.get(rn("bookmark_folder",n))||[]):null;case "folder":return /^\d+$/.test(n)?new Set(o.get(rn("bookmark_folder",n))||[]):null;case "is":return new Set(o.get(rn("is",r))||[]);default:return null}}function JR(e,t,n){let r=null;if(n.size){const s=Dc([...n].map(l=>e.indexes.exactFilterDocs.get(rn("bookmark_folder",l))||[]));r=kd(r,s);}for(const s of t.filters){const l=YR(e,s);if(l){if(s.negated){if(!r)continue;for(const c of l)r.delete(c);continue}r=kd(r,l);}}const o=t.negativeLexicalTokens.length?null:zR(e,t)||KR(e,t),a=t.positiveLexicalTokens.filter(s=>!s.field),i=o||Dc(a.map(s=>WR(e,s)));return i.size&&(r=kd(r,i)),r}function XR(){const e={...fg};try{if(typeof localStorage>"u")return e;const t=localStorage.getItem(IR);if(!t)return e;const n=JSON.parse(t);for(const r of Object.keys(fg)){const o=Number(n[r]);Number.isFinite(o)&&(e[r]=o);}return e}catch{return e}}function ZR(e){const t=String(e||"").trim(),n=ms.get(t);if(n)return n;const r=yI(t);if(ms.set(t,r),ms.size>RR){const o=ms.keys().next().value;typeof o=="string"&&ms.delete(o);}return r}function QR(e,t,n){const r=e.tokenFreq.get(t)||0;if(!r)return 0;const o=n.termDocFreq.get(t)||0,a=Math.max(1,n.docCount),i=Math.max(1,n.avgDocLength),s=Math.max(1,e.tokens.length),l=1.2,c=.75,h=Math.log(1+(a-o+.5)/(o+.5)),u=r+l*(1-c+c*s/i);return h*(r*(l+1))/u}function eE(e){const t=[],n=new Set(["bookmarked","liked","retweeted","reply","retweet","quote","media","images","videos","links","verified","blue_verified"]),r=new Set(["media","images","videos","links","mentions","hashtags","cashtags","engagement","polls"]),o=new Set(["replies","retweets","nativeretweets","quote","media","images","videos","links","mentions","hashtags","verified","blue_verified","twimg","native_video","consumer_video","pro_video","has_engagement"]);for(const a of e){const i=`${a.name}:${a.value}`,s=String(a.value||"").trim();if(s){if(["since","until"].includes(a.name)&&!Rf(s,a.name==="until")){t.push({code:"invalid_filter_value",message:`invalid ${i}`,token:i,severity:"warn"});continue}if(["since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks"].includes(a.name)&&!Number.isFinite(Number(s))){t.push({code:"invalid_filter_value",message:`invalid ${i}`,token:i,severity:"warn"});continue}if(a.name==="is"&&!n.has(jn(s))){t.push({code:"unsupported_filter",message:`unsupported ${i}`,token:i,severity:"warn"});continue}if(a.name==="has"&&!r.has(jn(s))){t.push({code:"unsupported_filter",message:`unsupported ${i}`,token:i,severity:"warn"});continue}if(["filter","include"].includes(a.name)&&!o.has(jn(s))){t.push({code:"unsupported_filter",message:`unsupported ${i}`,token:i,severity:"warn"});continue}}}return t}function tE(e,t){const n=String(t.value||"").trim(),r=jn(n);if(!n)return true;const a=(()=>{switch(t.name){case "from":return e.authorScreenName===r;case "from_id":case "author_id":return e.authorId===n;case "to":return e.toUser===r;case "to_id":return e.toUserId===n;case "in_reply_to_id":return e.inReplyToId===n;case "id":return e.id===n;case "lang":return e.lang===r;case "route":return e.routeType===r;case "conversation_id":return e.conversationId===n;case "bookmark_folder":case "folder":return /^\d+$/.test(n)?e.bookmarkFolderId===n:e.bookmarkFolderName===r||e.bookmarkFolderName.includes(r);case "mention":return e.mentions.includes(r);case "hashtag":return e.hashtags.includes(r);case "cashtag":return e.cashtags.includes(r);case "source":return e.sourceText.includes(r);case "card_name":{const i=r.replace(/\s+/g,"_");return e.cardName===i||e.cardName.includes(i)}case "domain":return e.domains.some(i=>i===r||i.endsWith(`.${r}`));case "url":return e.urls.some(i=>i.includes(r));case "is":return r==="bookmarked"?e.bookmarked:r==="liked"?e.favorited:r==="retweeted"?e.retweeted:r==="reply"?e.isReply:r==="retweet"?e.isRetweet:r==="quote"?e.isQuote:r==="media"?e.hasMedia:r==="images"?e.hasImages:r==="videos"?e.hasVideo:r==="links"?e.hasLinks:r==="verified"?e.isVerified:r==="blue_verified"?e.isBlueVerified:true;case "has":return r==="media"?e.hasMedia:r==="images"?e.hasImages:r==="videos"?e.hasVideo:r==="links"?e.hasLinks:r==="mentions"?e.mentions.length>0:r==="hashtags"?e.hashtags.length>0:r==="cashtags"?e.cashtags.length>0:r==="engagement"?e.favoriteCount+e.retweetCount+e.replyCount+e.bookmarkCount>0:r==="polls"?e.cardName.includes("poll"):true;case "filter":case "include":return t.name==="include"&&r==="nativeretweets"&&!t.negated?true:r==="replies"?e.isReply:r==="retweets"?e.isRetweet||e.isQuote:r==="nativeretweets"?e.isRetweet:r==="quote"?e.isQuote:r==="media"?e.hasMedia:r==="images"?e.hasImages:r==="videos"||r==="native_video"||r==="consumer_video"||r==="pro_video"?e.hasVideo:r==="links"?e.hasLinks:r==="mentions"?e.mentions.length>0:r==="hashtags"?e.hashtags.length>0:r==="verified"?e.isVerified:r==="blue_verified"?e.isBlueVerified:r==="twimg"?e.urls.some(i=>i.includes("pbs.twimg.com")||i.includes("pic.twitter.com")):r==="has_engagement"?e.favoriteCount+e.retweetCount+e.replyCount+e.bookmarkCount>0:true;case "since":{const i=Rf(n,false);return !i||!e.createdAtMs?true:e.createdAtMs>=i}case "until":{const i=Rf(n,true);return !i||!e.createdAtMs?true:e.createdAtMs<i}case "since_time":{const i=Number(n)*1e3;return !Number.isFinite(i)||!e.createdAtMs?true:e.createdAtMs>=i}case "until_time":{const i=Number(n)*1e3;return !Number.isFinite(i)||!e.createdAtMs?true:e.createdAtMs<i}case "since_id":return /^\d+$/.test(e.id)&&Number(e.id)>Number(n);case "max_id":return /^\d+$/.test(e.id)&&Number(e.id)<=Number(n);case "min_faves":case "min_likes":return e.favoriteCount>=Number(n);case "min_retweets":return e.retweetCount>=Number(n);case "min_replies":return e.replyCount>=Number(n);case "min_bookmarks":return e.bookmarkCount>=Number(n);default:return true}})();return t.negated?!a:a}function xd(e,t,n){if(n.kind==="phrase"){const a=da(n.value),i=Os(e,a,!!n.prefix);if(i===null){if(n.fuzzy&&a.length){const s=a[a.length-1],l=s&&s.length>=If?Yw([...new Set(e)],s,Kw):[];for(const c of l){const h=[...a];h[h.length-1]=c;const u=Os(e,h,false);if(u!==null&&u<=n.slop)return {matched:true,slopUsed:u}}}return {matched:false,slopUsed:Number.POSITIVE_INFINITY}}return i>n.slop?{matched:false,slopUsed:i}:{matched:true,slopUsed:i}}const r=da(n.value);if(!r.length)return {matched:false,slopUsed:Number.POSITIVE_INFINITY};if(r.length===1){const a=r[0];if(!a)return {matched:false,slopUsed:Number.POSITIVE_INFINITY};let i=t.has(a);return !i&&n.prefix&&a.length>=Vw&&(i=[...t.keys()].some(s=>s.startsWith(a))),!i&&n.fuzzy&&a.length>=If&&(i=[...t.keys()].some(s=>s.startsWith(a.slice(0,zw))&&Math.abs(s.length-a.length)<=Ps&&Ww(s,a)<=Ps)),{matched:i,slopUsed:i?0:Number.POSITIVE_INFINITY}}const o=Os(e,r,!!n.prefix);return {matched:o!==null&&o<=0,slopUsed:o??Number.POSITIVE_INFINITY}}function Jw(e,t){const n=t.field?jR(e,t.field):null;if(n){const i=xd(n.tokens,n.tokenFreq,t);return {matched:i.matched,slopUsed:i.slopUsed,primaryMatched:i.matched,quotedMatched:false}}const r=xd(e.primaryTokens,e.primaryTokenFreq,t),o=e.quotedTokens.length>0?xd(e.quotedTokens,e.quotedTokenFreq,t):{matched:false,slopUsed:Number.POSITIVE_INFINITY};if(!r.matched&&!o.matched)return {matched:false,slopUsed:Number.POSITIVE_INFINITY,primaryMatched:false,quotedMatched:false};let a=Number.POSITIVE_INFINITY;return r.matched&&(a=Math.min(a,r.slopUsed)),o.matched&&(a=Math.min(a,o.slopUsed)),{matched:true,slopUsed:a,primaryMatched:r.matched,quotedMatched:o.matched}}function nE(e,t,n,r=false){if(e.kind==="phrase"){const i=(e.quoted&&e.slop===0?n.quoted_phrase_match:n.phrase_match)*e.boost/(1+Math.max(0,t));return r?i*.2:i}const o=n.term_match*e.boost;return r?o*.2:o}function rE(e,t){let n=0,r=0,o=0,a=0;for(const i of t){if(i.kind!=="phrase")continue;const s=Jw(e,i);if(!s.matched||s.slopUsed!==0)continue;const c=da(i.value).length;c>n&&(n=c),s.primaryMatched&&c>o&&(o=c),i.quoted&&i.slop===0&&c>r&&(r=c),i.quoted&&i.slop===0&&s.primaryMatched&&c>a&&(a=c);}return {exactPhraseTerms:n,exactQuotedPhraseTerms:r,exactPrimaryPhraseTerms:o,exactPrimaryQuotedPhraseTerms:a}}function Si(e,t,n){if(t.kind==="term"||t.kind==="phrase"){const a=Jw(e,t);return a.matched?{matched:true,lexicalRaw:nE(t,a.slopUsed,n,a.quotedMatched&&!a.primaryMatched)}:{matched:false,lexicalRaw:0}}if(t.kind!=="op")return {matched:true,lexicalRaw:0};if(t.op==="NOT")return {matched:!Si(e,t.child,n).matched,lexicalRaw:0};if(t.op==="AND"){const a=Si(e,t.left,n);if(!a.matched)return {matched:false,lexicalRaw:0};const i=Si(e,t.right,n);return i.matched?{matched:true,lexicalRaw:a.lexicalRaw+i.lexicalRaw}:{matched:false,lexicalRaw:0}}const r=Si(e,t.left,n),o=Si(e,t.right,n);return !r.matched&&!o.matched?{matched:false,lexicalRaw:0}:r.matched&&o.matched?{matched:true,lexicalRaw:r.lexicalRaw+o.lexicalRaw}:r.matched?r:o}function oE(e,t,n){const r=t.filter(Boolean);if(!r.length)return 0;let o=0;if(r.length>=2)for(let a=0;a<r.length-1;a+=1){const i=r.slice(a,a+2),s=Os(e.tokens,i);s===null||s>2||(o+=n.cover_bigram/(1+s));}if(r.length>=3)for(let a=0;a<r.length-2;a+=1){const i=r.slice(a,a+3),s=Os(e.tokens,i);s===null||s>3||(o+=n.cover_trigram/(1+s));}return o}function aE(e,t){if(!t.length)return e;const n=new Set(t.map(r=>String(r||"").trim()).filter(Boolean));return n.size?e.filter(r=>{const a=String(ut(r||{},"__bookmark_folder_id")||"").trim();return a?n.has(a):false}):e}function iE(e){const t=e.map(n=>BR(n));return {records:e,docs:t,rankingContext:HR(t),indexes:qR(t)}}function sE(e,t,n={}){const r=String(t||"").trim(),o=new Set((n.bookmarkFolderIds||[]).map(S=>String(S||"").trim()).filter(Boolean)),a=o.size>0;if(!r){const S=a?e.docs.filter(M=>M.bookmarkFolderId&&o.has(M.bookmarkFolderId)).map(M=>M.raw):e.records;return {records:S,highlightTerms:[],totalMatches:S.length,warnings:[],warningObjects:[],parsed:{query:"",lexicalExpression:"",filterBooleanSemantics:"global_and"}}}const i=XR(),s=ZR(r),l=[...s.warnings,...eE(s.filters)],c=Date.now(),h=JR(e,s,o),u=h&&h.size<e.docs.length?[...h].sort((S,M)=>S-M).map(S=>e.docs[S]).filter(S=>!!S):e.docs,m=[];for(const S of u){if(a&&(!S.bookmarkFolderId||!o.has(S.bookmarkFolderId)))continue;let M=true;for(const xe of s.filters)if(!tE(S,xe)){M=false;break}if(!M)continue;let T=!s.hasPositiveLexical,P=0;if(s.lexicalAst){const xe=Si(S,s.lexicalAst,i);T=xe.matched,P=xe.lexicalRaw;}if(!T)continue;let N=0;for(const xe of s.positiveTerms)N+=QR(S,xe,e.rankingContext);const I=oE(S,s.orderedTerms,i),O=N*i.bm25,U=P*i.lexical,E=I*i.cover_density,v=(S.createdAtMs?S.createdAtMs/1e15:c/1e15)*i.recency,L=rE(S,s.positiveLexicalTokens),$=O+U+E+v;m.push({doc:S,score:$,weightedBm25:O,weightedLexical:U,weightedDensity:E,exactPhraseTerms:L.exactPhraseTerms,exactQuotedPhraseTerms:L.exactQuotedPhraseTerms,exactPrimaryPhraseTerms:L.exactPrimaryPhraseTerms,exactPrimaryQuotedPhraseTerms:L.exactPrimaryQuotedPhraseTerms});}m.sort((S,M)=>M.score!==S.score?M.score-S.score:M.exactPrimaryQuotedPhraseTerms!==S.exactPrimaryQuotedPhraseTerms?M.exactPrimaryQuotedPhraseTerms-S.exactPrimaryQuotedPhraseTerms:M.exactPrimaryPhraseTerms!==S.exactPrimaryPhraseTerms?M.exactPrimaryPhraseTerms-S.exactPrimaryPhraseTerms:M.exactQuotedPhraseTerms!==S.exactQuotedPhraseTerms?M.exactQuotedPhraseTerms-S.exactQuotedPhraseTerms:M.exactPhraseTerms!==S.exactPhraseTerms?M.exactPhraseTerms-S.exactPhraseTerms:M.weightedLexical!==S.weightedLexical?M.weightedLexical-S.weightedLexical:M.weightedDensity!==S.weightedDensity?M.weightedDensity-S.weightedDensity:M.doc.createdAtMs!==S.doc.createdAtMs?M.doc.createdAtMs-S.doc.createdAtMs:M.doc.id.localeCompare(S.doc.id));const g=[],y=new Set;for(const S of m){const M=[S.doc.authorId||S.doc.authorScreenName||"",S.doc.text.replace(/\s+/g," ").trim().toLowerCase()].join("::");M!=="::"&&y.has(M)||(M!=="::"&&y.add(M),g.push(S));}const b=Number(n.limit||0);return {records:(Number.isFinite(b)&&b>0?g.slice(0,Math.max(1,Math.floor(b))):g).map(S=>S.doc.raw),highlightTerms:s.highlightTerms,totalMatches:g.length,warnings:l.map(S=>S.message),warningObjects:l,parsed:{query:s.query,lexicalExpression:s.lexicalExpression,filterBooleanSemantics:s.filterBooleanSemantics}}}function mg(e,t,n={}){const r=aE(e,n.bookmarkFolderIds||[]),o=String(t||"").trim();return o?sE(iE(r),o):{records:r,highlightTerms:[],totalMatches:r.length,warnings:[],warningObjects:[],parsed:{query:"",lexicalExpression:"",filterBooleanSemantics:"global_and"}}}const Xw='(function(){"use strict";function on(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe={exports:{}},an=qe.exports,lt;function un(){return lt||(lt=1,(function(e,t){(function(r,n){e.exports=n()})(an,(function(){var r=1e3,n=6e4,s=36e5,i="millisecond",o="second",a="minute",u="hour",c="day",w="week",f="month",p="quarter",l="year",v="date",M="Invalid Date",k=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,_=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var y=["th","st","nd","rd"],d=T%100;return"["+T+(y[(d-20)%10]||y[d]||y[0])+"]"}},I=function(T,y,d){var x=String(T);return!x||x.length>=y?T:""+Array(y+1-x.length).join(d)+T},Y={s:I,z:function(T){var y=-T.utcOffset(),d=Math.abs(y),x=Math.floor(d/60),g=d%60;return(y<=0?"+":"-")+I(x,2,"0")+":"+I(g,2,"0")},m:function T(y,d){if(y.date()<d.date())return-T(d,y);var x=12*(d.year()-y.year())+(d.month()-y.month()),g=y.clone().add(x,f),S=d-g<0,$=y.clone().add(x+(S?-1:1),f);return+(-(x+(d-g)/(S?g-$:$-g))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:f,y:l,w,d:c,D:v,h:u,m:a,s:o,ms:i,Q:p}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},z="en",U={};U[z]=m;var J="$isDayjsObject",B=function(T){return T instanceof X||!(!T||!T[J])},F=function T(y,d,x){var g;if(!y)return z;if(typeof y=="string"){var S=y.toLowerCase();U[S]&&(g=S),d&&(U[S]=d,g=S);var $=y.split("-");if(!g&&$.length>1)return T($[0])}else{var E=y.name;U[E]=y,g=E}return!x&&g&&(z=g),g||!x&&z},q=function(T,y){if(B(T))return T.clone();var d=typeof y=="object"?y:{};return d.date=T,d.args=arguments,new X(d)},N=Y;N.l=F,N.i=B,N.w=function(T,y){return q(T,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var X=(function(){function T(d){this.$L=F(d.locale,null,!0),this.parse(d),this.$x=this.$x||d.x||{},this[J]=!0}var y=T.prototype;return y.parse=function(d){this.$d=(function(x){var g=x.date,S=x.utc;if(g===null)return new Date(NaN);if(N.u(g))return new Date;if(g instanceof Date)return new Date(g);if(typeof g=="string"&&!/Z$/i.test(g)){var $=g.match(k);if($){var E=$[2]-1||0,D=($[7]||"0").substring(0,3);return S?new Date(Date.UTC($[1],E,$[3]||1,$[4]||0,$[5]||0,$[6]||0,D)):new Date($[1],E,$[3]||1,$[4]||0,$[5]||0,$[6]||0,D)}}return new Date(g)})(d),this.init()},y.init=function(){var d=this.$d;this.$y=d.getFullYear(),this.$M=d.getMonth(),this.$D=d.getDate(),this.$W=d.getDay(),this.$H=d.getHours(),this.$m=d.getMinutes(),this.$s=d.getSeconds(),this.$ms=d.getMilliseconds()},y.$utils=function(){return N},y.isValid=function(){return this.$d.toString()!==M},y.isSame=function(d,x){var g=q(d);return this.startOf(x)<=g&&g<=this.endOf(x)},y.isAfter=function(d,x){return q(d)<this.startOf(x)},y.isBefore=function(d,x){return this.endOf(x)<q(d)},y.$g=function(d,x,g){return N.u(d)?this[x]:this.set(g,d)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(d,x){var g=this,S=!!N.u(x)||x,$=N.p(d),E=function(ue,V){var te=N.w(g.$u?Date.UTC(g.$y,V,ue):new Date(g.$y,V,ue),g);return S?te:te.endOf(c)},D=function(ue,V){return N.w(g.toDate()[ue].apply(g.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(V)),g)},O=this.$W,j=this.$M,W=this.$D,de="set"+(this.$u?"UTC":"");switch($){case l:return S?E(1,0):E(31,11);case f:return S?E(1,j):E(0,j+1);case w:var ae=this.$locale().weekStart||0,_e=(O<ae?O+7:O)-ae;return E(S?W-_e:W+(6-_e),j);case c:case v:return D(de+"Hours",0);case u:return D(de+"Minutes",1);case a:return D(de+"Seconds",2);case o:return D(de+"Milliseconds",3);default:return this.clone()}},y.endOf=function(d){return this.startOf(d,!1)},y.$set=function(d,x){var g,S=N.p(d),$="set"+(this.$u?"UTC":""),E=(g={},g[c]=$+"Date",g[v]=$+"Date",g[f]=$+"Month",g[l]=$+"FullYear",g[u]=$+"Hours",g[a]=$+"Minutes",g[o]=$+"Seconds",g[i]=$+"Milliseconds",g)[S],D=S===c?this.$D+(x-this.$W):x;if(S===f||S===l){var O=this.clone().set(v,1);O.$d[E](D),O.init(),this.$d=O.set(v,Math.min(this.$D,O.daysInMonth())).$d}else E&&this.$d[E](D);return this.init(),this},y.set=function(d,x){return this.clone().$set(d,x)},y.get=function(d){return this[N.p(d)]()},y.add=function(d,x){var g,S=this;d=Number(d);var $=N.p(x),E=function(j){var W=q(S);return N.w(W.date(W.date()+Math.round(j*d)),S)};if($===f)return this.set(f,this.$M+d);if($===l)return this.set(l,this.$y+d);if($===c)return E(1);if($===w)return E(7);var D=(g={},g[a]=n,g[u]=s,g[o]=r,g)[$]||1,O=this.$d.getTime()+d*D;return N.w(O,this)},y.subtract=function(d,x){return this.add(-1*d,x)},y.format=function(d){var x=this,g=this.$locale();if(!this.isValid())return g.invalidDate||M;var S=d||"YYYY-MM-DDTHH:mm:ssZ",$=N.z(this),E=this.$H,D=this.$m,O=this.$M,j=g.weekdays,W=g.months,de=g.meridiem,ae=function(V,te,he,ge){return V&&(V[te]||V(x,S))||he[te].slice(0,ge)},_e=function(V){return N.s(E%12||12,V,"0")},ue=de||function(V,te,he){var ge=V<12?"AM":"PM";return he?ge.toLowerCase():ge};return S.replace(_,(function(V,te){return te||(function(he){switch(he){case"YY":return String(x.$y).slice(-2);case"YYYY":return N.s(x.$y,4,"0");case"M":return O+1;case"MM":return N.s(O+1,2,"0");case"MMM":return ae(g.monthsShort,O,W,3);case"MMMM":return ae(W,O);case"D":return x.$D;case"DD":return N.s(x.$D,2,"0");case"d":return String(x.$W);case"dd":return ae(g.weekdaysMin,x.$W,j,2);case"ddd":return ae(g.weekdaysShort,x.$W,j,3);case"dddd":return j[x.$W];case"H":return String(E);case"HH":return N.s(E,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return ue(E,D,!0);case"A":return ue(E,D,!1);case"m":return String(D);case"mm":return N.s(D,2,"0");case"s":return String(x.$s);case"ss":return N.s(x.$s,2,"0");case"SSS":return N.s(x.$ms,3,"0");case"Z":return $}return null})(V)||$.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(d,x,g){var S,$=this,E=N.p(x),D=q(d),O=(D.utcOffset()-this.utcOffset())*n,j=this-D,W=function(){return N.m($,D)};switch(E){case l:S=W()/12;break;case f:S=W();break;case p:S=W()/3;break;case w:S=(j-O)/6048e5;break;case c:S=(j-O)/864e5;break;case u:S=j/s;break;case a:S=j/n;break;case o:S=j/r;break;default:S=j}return g?S:N.a(S)},y.daysInMonth=function(){return this.endOf(f).$D},y.$locale=function(){return U[this.$L]},y.locale=function(d,x){if(!d)return this.$L;var g=this.clone(),S=F(d,x,!0);return S&&(g.$L=S),g},y.clone=function(){return N.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},T})(),ee=X.prototype;return q.prototype=ee,[["$ms",i],["$s",o],["$m",a],["$H",u],["$W",c],["$M",f],["$y",l],["$D",v]].forEach((function(T){ee[T[1]]=function(y){return this.$g(y,T[0],T[1])}})),q.extend=function(T,y){return T.$i||(T(y,X,q),T.$i=!0),q},q.locale=F,q.isDayjs=B,q.unix=function(T){return q(1e3*T)},q.en=U[z],q.Ls=U,q.p={},q}))})(qe)),qe.exports}var cn=un(),ft=on(cn),Te,Ke;Te={__e:function(e,t,r,n){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},Ke=function(e){return e!=null&&e.constructor==null},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var Be,Q,Ve,dt,ht=0,mt=[],L=Te,pt=L.__b,_t=L.__r,gt=L.diffed,yt=L.__c,vt=L.unmount,xt=L.__;function ln(e,t){L.__h&&L.__h(Q,e,ht||t),ht=0;var r=Q.__H||(Q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function wt(e,t){var r=ln(Be++,7);return hn(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function fn(){for(var e;e=mt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(De),e.__H.__h.forEach(Ye),e.__H.__h=[]}catch(t){e.__H.__h=[],L.__e(t,e.__v)}}L.__b=function(e){Q=null,pt&&pt(e)},L.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),xt&&xt(e,t)},L.__r=function(e){_t&&_t(e),Be=0;var t=(Q=e.__c).__H;t&&(Ve===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(De),t.__h.forEach(Ye),t.__h=[],Be=0)),Ve=Q},L.diffed=function(e){gt&>(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(mt.push(t)!==1&&dt===L.requestAnimationFrame||((dt=L.requestAnimationFrame)||dn)(fn)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ve=Q=null},L.__c=function(e,t){t.some(function(r){try{r.__h.forEach(De),r.__h=r.__h.filter(function(n){return!n.__||Ye(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],L.__e(n,r.__v)}}),yt&&yt(e,t)},L.unmount=function(e){vt&&vt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{De(n)}catch(s){t=s}}),r.__H=void 0,t&&L.__e(t,r.__v))};var bt=typeof requestAnimationFrame=="function";function dn(e){var t,r=function(){clearTimeout(n),bt&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);bt&&(t=requestAnimationFrame(r))}function De(e){var t=Q,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Q=t}function Ye(e){var t=Q;e.__c=e.__(),Q=t}function hn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var mn=Symbol.for("preact-signals");function Oe(){if(ce>1)ce--;else{for(var e,t=!1;Se!==void 0;){var r=Se;for(Se=void 0,We++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&St(r))try{r.c()}catch(s){t||(e=s,t=!0)}r=n}}if(We=0,ce--,t)throw e}}function pn(e){if(ce>0)return e();ce++;try{return e()}finally{Oe()}}var R=void 0,Se=void 0,ce=0,We=0,Le=0;function kt(e){if(R!==void 0){var t=e.n;if(t===void 0||t.t!==R)return t={i:0,S:e,p:R.s,n:void 0,t:R,e:void 0,x:void 0,r:t},R.s!==void 0&&(R.s.n=t),R.s=t,e.n=t,32&R.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=R.s,t.n=void 0,R.s.n=t,R.s=t),t}}function K(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}K.prototype.brand=mn,K.prototype.h=function(){return!0},K.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},K.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},K.prototype.subscribe=function(e){var t=this;return Pe(function(){var r=t.value,n=R;R=void 0;try{e(r)}finally{R=n}})},K.prototype.valueOf=function(){return this.value},K.prototype.toString=function(){return this.value+""},K.prototype.toJSON=function(){return this.value},K.prototype.peek=function(){var e=R;R=void 0;try{return this.value}finally{R=e}},Object.defineProperty(K.prototype,"value",{get:function(){var e=kt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(We>100)throw new Error("Cycle detected");this.v=e,this.i++,Le++,ce++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Oe()}}}});function Tt(e){return new K(e)}function St(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function $t(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Mt(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function ye(e){K.call(this,void 0),this.x=e,this.s=void 0,this.g=Le-1,this.f=4}(ye.prototype=new K).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Le))return!0;if(this.g=Le,this.f|=1,this.i>0&&!St(this))return this.f&=-2,!0;var e=R;try{$t(this),R=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return R=e,Mt(this),this.f&=-2,!0},ye.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}K.prototype.S.call(this,e)},ye.prototype.U=function(e){if(this.t!==void 0&&(K.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ye.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(ye.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=kt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Nt(e){return new ye(e)}function It(e){var t=e.u;if(e.u=void 0,typeof t=="function"){ce++;var r=R;R=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Qe(e),n}finally{R=r,Oe()}}}function Qe(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,It(e)}function _n(e){if(R!==this)throw new Error("Out-of-order effect");Mt(this),R=e,this.f&=-2,8&this.f&&Qe(this),Oe()}function $e(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}$e.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},$e.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,It(this),$t(this),ce++;var e=R;return R=this,_n.bind(this,e)},$e.prototype.N=function(){2&this.f||(this.f|=2,this.o=Se,Se=this)},$e.prototype.d=function(){this.f|=8,1&this.f||Qe(this)};function Pe(e){var t=new $e(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Ze;function ve(e,t){Te[e]=t.bind(null,Te[e]||function(){})}function ze(e){Ze&&Ze(),Ze=e&&e.S()}function At(e){var t=this,r=e.data,n=yn(r);n.value=r;var s=wt(function(){for(var i=t,o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}var a=Nt(function(){var c=n.value.value;return c===0?0:c===!0?"":c||""}),u=Nt(function(){var c;return Ke(a.value)||((c=t.base)==null?void 0:c.nodeType)!==3});return t.__$u.c=function(){var c;!Ke(s.peek())&&((c=t.base)==null?void 0:c.nodeType)===3?t.base.data=s.peek():(t.__$f|=1,t.setState({}))},Pe(function(){Me||(Me=this.N),this.N=Rt,u.value&&i.base&&(i.base.data=a.value)}),a},[]);return s.value}At.displayName="_st",Object.defineProperties(K.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:At},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),ve("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var s in n)if(s!=="children"){var i=n[s];i instanceof K&&(r||(t.__np=r={}),r[s]=i,n[s]=i.peek())}}e(t)}),ve("__r",function(e,t){ze();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(s){var i;return Pe(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),ze(r),e(t)}),ve("__e",function(e,t,r,n){ze(),e(t,r,n)}),ve("diffed",function(e,t){ze();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,s=t.props;if(n){var i=r.U;if(i)for(var o in i){var a=i[o];a!==void 0&&!(o in n)&&(a.d(),i[o]=void 0)}else r.U=i={};for(var u in n){var c=i[u],w=n[u];c===void 0?(c=gn(r,u,w,s),i[u]=c):c.o(w,s)}}}e(t)});function gn(e,t,r,n){var s=t in e&&e.ownerSVGElement===void 0,i=Tt(r);return{o:function(o,a){i.value=o,n=a},d:Pe(function(){Me||(Me=this.N),this.N=Rt;var o=i.value.value;n[t]!==o&&(n[t]=o,s?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}ve("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var s in n){var i=n[s];i&&i.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)}),ve("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});function yn(e){return wt(function(){return Tt(e)},[])}var Me,Et=[],vn=function(e){queueMicrotask(function(){queueMicrotask(e)})};function xn(){pn(function(){for(var e;e=Et.shift();)Me.call(e)})}function Rt(){Et.push(this)===1&&(Te.requestAnimationFrame||vn)(xn)}function wn(e){if(!e)return ft(0);const t=e.replace(/^\\w+ (.*)$/,"$1");return ft(t,"MMM DD HH:mm:ss ZZ YYYY","en")}function Z(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function H(e){return typeof e=="string"?e:""}function Xe(e){const t=Number(e);return Number.isFinite(t)?t:null}function Ne(e){var s,i,o,a;const t=e.replace(/\\r\\n?/g,`\n`).split(`\n`),r=[];let n=null;for(const u of t){const c=u.match(/^\\s*(`{3,}|~{3,})/);if(n){r.push(u),c&&((s=c[1])!=null&&s.startsWith(n.character))&&c[1].length>=n.length&&(n=null);continue}const w=u.trimEnd();if(c!=null&&c[1]){n={character:c[1][0]||"`",length:c[1].length},r.push(w);continue}!w.trim()&&!((i=r.at(-1))!=null&&i.trim())||r.push(w)}for(;r.length&&!((o=r[0])!=null&&o.trim());)r.shift();for(;r.length&&!((a=r.at(-1))!=null&&a.trim());)r.pop();return r.join(`\n`)}function bn(e){return e.replace(/\\s+/g," ").trim()}function He(e){return e.replace(/([\\\\`*_[\\]<>])/g,"\\\\$1")}function Ge(e){return e.replace(/\\\\/g,"%5C").replace(/\\)/g,"\\\\)")}function kn(e){const t=Math.max(0,...Array.from(e.matchAll(/`+/g),s=>s[0].length)),r="`".repeat(t+1),n=e.startsWith("`")||e.endsWith("`")?" ":"";return`${r}${n}${e}${n}${r}`}function Tn(e,t){if(!e)return"";switch(t.toUpperCase()){case"BOLD":return`**${e}**`;case"ITALIC":return`*${e}*`;case"STRIKETHROUGH":case"STRIKE":return`~~${e}~~`;case"UNDERLINE":return`<u>${e}</u>`;case"CODE":case"MONOSPACE":return kn(e.replace(/\\\\([\\\\`*_[\\]<>])/g,"$1"));default:return e}}function Sn(e){const t=new Map,r=(n,s)=>{if(typeof n!="string"&&typeof n!="number"||!Z(s))return;const i=H(s.type).toUpperCase();i&&t.set(String(n),{type:i,data:Z(s.data)?s.data:{}})};if(Array.isArray(e)){for(const n of e)Z(n)&&r(n.key,n.value);return t}if(Z(e))for(const[n,s]of Object.entries(e))r(n,s);return t}function Ct(e,t){if(!Array.isArray(e))return[];const r=[];for(const n of e){if(!Z(n))continue;const s=Xe(n.offset??n.from_index),i=Xe(n.length),o=Xe(n.to_index),a=i??(s!==null&&o!==null?o-s:null);if(s===null||a===null||s<0||a<=0)continue;if(t==="entity"){const c=n.key;if(typeof c!="string"&&typeof c!="number")continue;r.push({offset:s,length:a,key:String(c)});continue}const u=H(n.style);u&&r.push({offset:s,length:a,style:u})}return r}function $n(e){if(!e||e.type!=="LINK")return"";for(const t of["expanded_url","expandedUrl","original_url","originalUrl","url","display_url","displayUrl"]){const r=H(e.data[t]).trim();if(r)return r}return""}function Ft(e){if(!e||!["MATH","LATEX","KATEX","FORMULA"].includes(e.type))return"";for(const t of["latex","tex","expression","formula","value","text"]){const r=H(e.data[t]).trim();if(r)return r}return""}function qt(e){return!e||e.type!=="MARKDOWN"?"":Ne(H(e.data.markdown))}function Mn(e,t){const r=H(e.text);if(!r)return"";const n=Ct(e.entityRanges,"entity"),s=Ct(e.inlineStyleRanges,"style"),i=new Set([0,r.length]);for(const u of[...n,...s])i.add(Math.min(r.length,u.offset)),i.add(Math.min(r.length,u.offset+u.length));const o=[...i].filter(u=>u>=0).sort((u,c)=>u-c),a=[];for(let u=0;u<o.length-1;u+=1){const c=o[u]??0,w=o[u+1]??c;if(w<=c)continue;const f=r.slice(c,w),p=n.find(I=>I.offset<=c&&I.offset+I.length>=w),l=p!=null&&p.key?t.get(p.key):void 0,v=qt(l);if(v){a.push(v);continue}const M=Ft(l);if(M){a.push(`$${M.replace(/\\$/g,"\\\\$")}$`);continue}let k=He(f);const _=s.filter(I=>I.offset<=c&&I.offset+I.length>=w).map(I=>I.style||"").filter(Boolean).sort();for(const I of _)k=Tn(k,I);const m=$n(l);m&&(k=`[${k||He(m)}](${Ge(m)})`),a.push(k)}return a.join("").trim()}function Nn(e){var r;return((r=(Array.isArray(e.variants)?e.variants:[]).filter(n=>Z(n)).filter(n=>H(n.content_type).toLowerCase()==="video/mp4").map(n=>({url:H(n.url).trim(),bitrate:Number(n.bit_rate??n.bitrate??0)||0})).filter(n=>!!n.url).sort((n,s)=>s.bitrate-n.bitrate)[0])==null?void 0:r.url)??""}function Dt(e){if(!Z(e))return null;const t=Z(e.media_info)?e.media_info:e,r=Nn(t);if(r)return{kind:"video",url:r,altText:H(e.alt_text).trim()||void 0};const n=[t.original_img_url,t.url,e.media_url_https].map(s=>H(s).trim()).find(Boolean);return n?{kind:"image",url:n,altText:H(e.alt_text).trim()||H(e.ext_alt_text).trim()||void 0}:null}function Ot(e){const t=He(e.altText||"");return e.kind==="image"?`})`:`[${t||"video"}](${Ge(e.url)})`}function In(e){const t=new Map,r=n=>{if(!Z(n))return;const s=String(n.media_id??n.id??n.media_key??"").trim(),i=Dt(n);s&&i&&t.set(s,i)};for(const n of e.media_entities??[])r(n);return r(e.cover_media),t}function An(e,t){if(!e||e.type!=="MEDIA")return"";const r=Array.isArray(e.data.mediaItems)?e.data.mediaItems:Array.isArray(e.data.media_items)?e.data.media_items:[],n=[],s=new Set;for(const i of r){if(!Z(i))continue;const o=String(i.mediaId??i.media_id??i.id??"").trim(),a=t.get(o);!a||s.has(a.url)||(s.add(a.url),n.push(Ot(a)))}return n.join(`\n\n`)}function En(e,t,r){const n=Array.isArray(e.entityRanges)?e.entityRanges:[],s=[];for(const i of n){if(!Z(i))continue;const o=i.key;if(typeof o!="string"&&typeof o!="number")continue;const a=t.get(String(o)),u=qt(a);if(u){s.push(u);continue}const c=Ft(a);if(c){s.push(`$$\n${c}\n$$`);continue}const w=An(a,r);if(w){s.push(w);continue}if((a==null?void 0:a.type)==="TWEET"){const f=String(a.data.tweetId??a.data.tweet_id??"").trim();f&&s.push(`> Embedded post: https://x.com/i/status/${f}`)}}return s.join(`\n\n`)}function Rn(e){const t=Z(e.data)?e.data:{};return H(t.language??t.lang??t.codeLanguage).trim().replace(/[^a-zA-Z0-9_+-]/g,"")}function Cn(e){const t=e.content_state,r=Array.isArray(t==null?void 0:t.blocks)?t.blocks:[],n=Sn(t==null?void 0:t.entityMap),s=In(e),i=[];let o=[],a=[],u="";const c=new Map,w=()=>{o.length&&i.push(o.join(`\n`)),o=[],c.clear()},f=()=>{a.length&&i.push(`\\`\\`\\`${u}\n${a.join(`\n`)}\n\\`\\`\\``),a=[],u=""};for(const p of r){if(!Z(p))continue;const l=H(p.type).toLowerCase()||"unstyled";if(l==="code-block"){w();const k=Rn(p);a.length&&k&&u&&k!==u&&f(),u||(u=k),a.push(H(p.text));continue}f();const v=l==="unordered-list-item"||l==="ordered-list-item";if(v||w(),l==="atomic"){const k=En(p,n,s);k&&i.push(k);continue}const M=Mn(p,n);if(!(!M&&!["divider","horizontal-rule","separator"].includes(l))){if(v){const k=Math.max(0,Math.floor(Number(p.depth||0))),_=" ".repeat(k);if(l==="ordered-list-item"){const m=(c.get(k)||0)+1;c.set(k,m),o.push(`${_}${m}. ${M}`)}else o.push(`${_}- ${M}`);continue}switch(l){case"header-one":i.push(`# ${M}`);break;case"header-two":i.push(`## ${M}`);break;case"header-three":i.push(`### ${M}`);break;case"header-four":i.push(`#### ${M}`);break;case"header-five":i.push(`##### ${M}`);break;case"header-six":i.push(`###### ${M}`);break;case"blockquote":case"pullquote":i.push(M.split(`\n`).map(k=>`> ${k}`).join(`\n`));break;case"divider":case"horizontal-rule":case"separator":i.push("---");break;default:i.push(M);break}}}return f(),w(),Ne(i.join(`\n\n`))}function Lt(e){if(!e)return"";const t=bn(H(e.title)),r=Cn(e),n=Dt(e.cover_media),s=Ne(H(e.plain_text)),i=Ne(H(e.preview_text)),o=[];return n&&!r.includes(n.url)&&o.push(Ot(n)),t&&!r.startsWith(`# ${t}`)&&o.push(`# ${He(t)}`),r?o.push(r):s?o.push(s):i&&i!==t&&o.push(i),Ne(o.join(`\n\n`))}var me={field_path_pattern:"^[a-zA-Z0-9_.]+$",known_filter_keys:["from","from_id","author_id","to","to_id","in_reply_to_id","lang","since","until","since_time","until_time","since_id","max_id","conversation_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","url","domain","id","source","card_name","filter","include","is","has","bookmark_folder","folder","route","mention","hashtag","cashtag"],non_highlight_filters:["since","until","since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","id","from_id","author_id","to_id","in_reply_to_id","conversation_id"],free_text:{min_content_term_length:2,full_run_exact_min_terms:2,stop_terms:["a","an","the","and","or","but","if","then","than","to","of","in","on","for","with","by","at","from","into","onto","as","is","are","was","were","be","been","being","do","does","did","done","have","has","had","can","could","should","would","will","just","about","what","when","where","why","how","who","whom","whose","this","that","these","those","it","its","my","your","our","their","his","her","me","you","we","they","he","she","them","us","post","tweet","too"],bigram_slop:2,trigram_slop:3,fourgram_slop:4,bigram_boost:20,trigram_boost:60,fourgram_boost:140,full_run_exact_boost:320},prefix:{min_term_length:3,max_expansions:128},fuzzy:{min_term_length:5,max_edit_distance:1,prefix_root_length:4,max_expansions:64}};const Pt=new RegExp(me.field_path_pattern),zt=new Set(me.known_filter_keys),Fn=new Set(me.non_highlight_filters),se=me.free_text,Je=me.prefix,Ie=me.fuzzy,qn=new Set((me.free_text.stop_terms||[]).map(e=>String(e||"").trim().toLowerCase()).filter(Boolean));function Ht(e){return e.kind==="term"||e.kind==="phrase"}const Dn=/[\\p{L}\\p{N}_]+(?:[\'’][\\p{L}\\p{N}_]+)*/gu,On=32,Ln=Math.max(1,Number(se.min_content_term_length)),Pn=Math.max(2,Number(se.full_run_exact_min_terms)),zn=Math.max(1,Number(Je.min_term_length)),Hn=Math.max(1,Number(Ie.min_term_length));function xe(e,t,r=""){return{code:e,message:t,token:r||void 0,severity:"warn"}}function Ut(e){const t=Number(e);return Number.isFinite(t)?Math.max(.05,Math.min(100,t)):1}function le(e){if(!e)return[];const t=e.toLowerCase().match(Dn);return t?t.map(r=>r.replace(/[\'’]/g,"")).filter(Boolean):[]}function et(e){const t=String(e||"").trim().toLowerCase();return!t||t.length<Ln?!0:qn.has(t)}function jt(e){const t=e.flatMap(n=>le(n.value)),r=t.filter(n=>!et(n));return r.length?r:t}function Un(e){const t=new Set(jt(e));if(!t.size)return e;const r=e.filter(n=>t.has(String(n.value||"").trim().toLowerCase()));return r.length?r:e}function tt(e){let t=0;for(const r of e)for(const n of le(r.value))et(n)||(t+=1);return t}function Ae(e){return le(e).join(" ").trim()}function jn(e){return Number.isFinite(e)?Math.round(e*100)/100:1}function Kn(e,t){const r=e.lastIndexOf(t);if(r<=0)return{base:e,value:null};const n=e.slice(r+1);return!n||!/^\\d+(?:\\.\\d+)?$/.test(n)?{base:e,value:null}:{base:e.slice(0,r),value:n}}function Bn(e){const t=String(e||""),r=[];let n=0;for(;n<t.length;){for(;n<t.length&&/\\s/.test(t[n]??"");)n+=1;if(n>=t.length)break;const s=t[n]??"";if(s==="("){r.push({kind:"lparen"}),n+=1;continue}if(s===")"){r.push({kind:"rparen"}),n+=1;continue}let i=!1;if(s==="-"){for(i=!0,n+=1;n<t.length&&/\\s/.test(t[n]??"");)n+=1;if(n>=t.length)break;if((t[n]??"")==="("){r.push({kind:"op",op:"NOT"});continue}}let o;const a=n;for(;n<t.length&&/[a-zA-Z0-9_.]/.test(t[n]??"");)n+=1;if(n>a&&(t[n]??"")===":"&&(t[n+1]??"")===\'"\'&&Pt.test(t.slice(a,n))?(o=t.slice(a,n),n+=1):n=a,(t[n]??"")===\'"\'){n+=1;let l="";for(;n<t.length;){const k=t[n]??"";if(k==="\\\\"&&n+1<t.length){l+=t[n+1]??"",n+=2;continue}if(k===\'"\'){n+=1;break}l+=k,n+=1}let v=0,M=1;if((t[n]??"")==="~"){n+=1;const k=n;for(;n<t.length&&/\\d/.test(t[n]??"");)n+=1;n>k&&(v=Math.max(0,Number(t.slice(k,n))||0))}if((t[n]??"")==="^"){n+=1;const k=n;for(;n<t.length&&/[\\d.]/.test(t[n]??"");)n+=1;n>k&&(M=Ut(t.slice(k,n)))}r.push({kind:"phrase",value:l.trim(),negated:i,boost:M,slop:v,field:o,quoted:!0});continue}const u=n;for(;n<t.length&&!/\\s/.test(t[n]??"")&&(t[n]??"")!=="("&&(t[n]??"")!==")";)n+=1;const c=t.slice(u,n).trim();if(!c)continue;const{base:w,value:f}=Kn(c,"^"),p=w.toUpperCase();if((p==="AND"||p==="OR"||p==="NOT")&&!i){r.push({kind:"op",op:p});continue}r.push({kind:"term",value:w,negated:i,boost:f?Ut(f):1,slop:0})}return r}function Vn(e,t){if(t.length&&!/\\s$/.test(String(e||"")))for(let r=t.length-1;r>=0;r-=1){const n=t[r];if(!n||!Ht(n))continue;if(n.kind!=="term"||n.field||n.quoted)return;const s=Ae(n.value);s.length>=zn&&(n.prefix=!0),s.length>=Hn&&(n.fuzzy=!0);return}}function ie(e){return e?e.kind==="term"||e.kind==="phrase":!1}function Yn(e){const t=[];if(!e.length)return{ast:null,warnings:t};const r=[];let n=null;for(const f of e){let p=!1;if(n){const l=ie(n)||n.kind==="rparen",v=ie(f)||f.kind==="lparen"||f.kind==="op"&&f.op==="NOT";l&&v&&(p=!0)}p&&r.push({kind:"op",op:"AND"}),r.push(f),n=f}const s={OR:1,AND:2,NOT:3},i=[],o=[];for(const f of r){if(ie(f)){i.push(f);continue}if(f.kind==="lparen"){o.push(f);continue}if(f.kind==="rparen"){let p=!1;for(;o.length;){const l=o.pop();if(!l)break;if(l.kind==="lparen"){p=!0;break}i.push(l)}p||t.push(xe("boolean_syntax","unmatched closing parenthesis in query"));continue}if(f.kind==="op"){for(;o.length;){const p=o[o.length-1];if(!p||p.kind!=="op"||!(f.op==="NOT"?s[f.op]<s[p.op]:s[f.op]<=s[p.op]))break;i.push(o.pop())}o.push(f)}}for(;o.length;){const f=o.pop();if(!f)break;if(f.kind==="lparen"){t.push(xe("boolean_syntax","unmatched opening parenthesis in query"));continue}i.push(f)}const a=[];for(const f of i){if(ie(f)){a.push(f);continue}if(f.kind!=="op")continue;if(f.op==="NOT"){const v=a.pop();if(!v){t.push(xe("boolean_syntax","dangling NOT operator in query","NOT"));continue}a.push({kind:"op",op:"NOT",child:v});continue}const p=a.pop(),l=a.pop();if(!l||!p){t.push(xe("boolean_syntax",`dangling ${f.op} operator in query`,f.op));continue}a.push({kind:"op",op:f.op,left:l,right:p})}if(a.length===1)return{ast:a[0]??null,warnings:t};const u=e.filter(ie);if(!u.length)return{ast:null,warnings:t};const c=u[0];if(!c)return{ast:null,warnings:t};let w=c;for(let f=1;f<u.length;f+=1){const p=u[f];p&&(w={kind:"op",op:"AND",left:w,right:p})}return t.push(xe("boolean_syntax","query boolean expression was malformed; fell back to implicit AND between lexical terms")),{ast:w,warnings:t}}function Kt(e,t){const r=[],n=(s,i)=>{if(s){if(ie(s)){i===t&&r.push(s);return}if(s.op==="NOT"){n(s.child,!i);return}n(s.left,i),n(s.right,i)}};return n(e,!0),r}function nt(e,t,r){if(e){if(!ie(e)&&e.op===t){nt(e.left,t,r),nt(e.right,t,r);return}r.push(e)}}function rt(e){if(!e)return"";if(ie(e)){let n=e.kind==="phrase"?`"${e.value}"`:e.value;return e.prefix&&(n+="*"),e.kind==="phrase"&&e.slop>0&&(n+=`~${e.slop}`),Math.abs(e.boost-1)>1e-9&&(n+=`^${e.boost}`),e.field&&(n=`${e.field}:${n}`),n}if(e.op==="NOT"){const n=rt(e.child);return n?`NOT (${n})`:"NOT (?)"}const t=[];return nt(e,e.op,t),t.map(n=>{const s=rt(n);return s?!ie(n)&&n.op!==e.op?`(${s})`:s:""}).filter(Boolean).join(` ${e.op} `)}function Wn(e){return!e.field&&e.kind==="term"&&le(e.value).length===1}function Qn(e){var i,o,a,u,c,w,f,p;if(e.length<=1)return e;const t=[],r=new Set,n=l=>{const v=`${l.kind}|${l.field||""}|${l.value}|${l.slop}|${l.boost}`;r.has(v)||(r.add(v),t.push(l))},s=(l,v)=>{const M=l.reduce((k,_)=>k+_.boost,0)/l.length;return jn(v*M)};for(const l of Un(e))n(l);for(let l=0;l<=e.length-2;l+=1){const v=e.slice(l,l+2);tt(v)<2||n({kind:"phrase",value:v.map(M=>M.value).join(" "),slop:se.bigram_slop,boost:s(v,se.bigram_boost),prefix:!!((i=v[v.length-1])!=null&&i.prefix),fuzzy:!!((o=v[v.length-1])!=null&&o.fuzzy)})}for(let l=0;l<=e.length-3;l+=1){const v=e.slice(l,l+3);tt(v)<2||n({kind:"phrase",value:v.map(M=>M.value).join(" "),slop:se.trigram_slop,boost:s(v,se.trigram_boost),prefix:!!((a=v[v.length-1])!=null&&a.prefix),fuzzy:!!((u=v[v.length-1])!=null&&u.fuzzy)})}for(let l=0;l<=e.length-4;l+=1){const v=e.slice(l,l+4);tt(v)<2||n({kind:"phrase",value:v.map(M=>M.value).join(" "),slop:se.fourgram_slop,boost:s(v,se.fourgram_boost),prefix:!!((c=v[v.length-1])!=null&&c.prefix),fuzzy:!!((w=v[v.length-1])!=null&&w.fuzzy)})}return e.length>=Pn&&n({kind:"phrase",value:e.map(l=>l.value).join(" "),slop:0,boost:s(e,se.full_run_exact_boost),prefix:!!((f=e[e.length-1])!=null&&f.prefix),fuzzy:!!((p=e[e.length-1])!=null&&p.fuzzy)}),t}function Zn(e,t){if(!t.length)return;if(t.length===1){e.push(t[0]),t.length=0;return}const r=Qn(t);e.push({kind:"lparen"}),r.forEach((n,s)=>{s>0&&e.push({kind:"op",op:"OR"}),e.push(n)}),e.push({kind:"rparen"}),t.length=0}function Xn(e){const t=new Set,r=[];for(const n of e)for(const s of le(n))!s||t.has(s)||(t.add(s),r.push(s));return r}function Gn(e,t){const r=new Set;for(const n of e)for(const s of le(n.value))s&&!et(s)&&r.add(s);for(const n of t)if(!(n.negated||Fn.has(n.name)))for(const s of le(n.value))s&&r.add(s);return[...r].slice(0,On)}function Jn(e){var _;const t=Bn(e);Vn(e,t);const r=[],n=[],s=[],i=[],o=[],a=[],u=()=>{if(i.length){const m=jt(i);a.push(...m),o.push(...m)}Zn(s,i)};for(const m of t){if(!Ht(m)){u(),s.push(m);continue}const I=String(m.value||"").trim();if(!I)continue;let Y=m.kind,z=I,U=(_=m.field)==null?void 0:_.trim(),J=!1;if(U&&zt.has(U)){r.push({name:U,value:I,negated:m.negated}),u();continue}if(m.kind==="term"&&I.startsWith("@")&&I.length>1){const F=Ae(I.slice(1));if(F){r.push({name:"from",value:F,negated:m.negated}),u();continue}}else if(m.kind==="term"&&I.startsWith("#")&&I.length>1){const F=Ae(I.slice(1));F&&(r.push({name:"hashtag",value:F,negated:m.negated}),Y="term",z=F,J=!0)}else if(m.kind==="term"&&I.startsWith("$")&&I.length>1){const F=Ae(I.slice(1));F&&(r.push({name:"cashtag",value:F,negated:m.negated}),Y="term",z=F,J=!0)}else if(m.kind==="term"&&I.includes(":")){const[F,...q]=I.split(":"),N=String(F||"").trim().toLowerCase(),X=q.join(":").trim();if(zt.has(N)){if(!X){n.push(I);continue}r.push({name:N,value:X,negated:m.negated}),u();continue}N&&X&&Pt.test(N)&&(Y="term",z=X,U=N)}const B={kind:Y,value:Y==="term"?Ae(z):z.trim(),boost:m.boost,slop:m.slop,field:U||void 0,quoted:!!m.quoted,prefix:!!m.prefix,fuzzy:!!m.fuzzy};if(B.value){if(m.negated){u(),s.push({kind:"op",op:"NOT"}),s.push(B);continue}if(!J&&Wn(B)){i.push(B);continue}if(u(),!B.field){const F=le(B.value);a.push(...F),o.push(...F)}s.push(B)}}u();const{ast:c,warnings:w}=Yn(s),f=Kt(c,!0),p=Kt(c,!1),l=a.filter(Boolean),v=Xn(o),M=Gn(f,r),k=n.map(m=>xe("unsupported_token",`unsupported token: ${m}`,m));return{query:String(e||""),lexicalTokens:s,lexicalAst:c,lexicalExpression:rt(c),positiveLexicalTokens:f,negativeLexicalTokens:p,positiveTerms:v,filters:r,unsupported:n,orderedTerms:l,highlightTerms:M,warnings:[...w,...k],hasPositiveLexical:f.length>0,filterBooleanSemantics:"global_and"}}const er=/[\\p{L}\\p{N}_]+(?:[\'’][\\p{L}\\p{N}_]+)*/gu,Bt={bm25:1,lexical:1,cover_density:1,recency:0,term_match:1,phrase_match:8,quoted_phrase_match:256,cover_bigram:10,cover_trigram:30},tr="twe_raw_search_ranking_v1",nr=128,Vt=Math.max(1,Number(Je.min_term_length)),rr=Math.max(8,Number(Je.max_expansions)),st=Math.max(1,Number(Ie.min_term_length)),Ee=Math.max(0,Number(Ie.max_edit_distance)),Yt=Math.max(1,Number(Ie.prefix_root_length)),Wt=Math.max(8,Number(Ie.max_expansions)),Qt=3,sr=4,ir=.65,or=1.5,Re=new Map,Zt=new WeakMap;function h(e,t){const r=t.split(".");let n=e;for(const s of r){if(!n||typeof n!="object")return null;n=n[s]}return n}function b(e){return typeof e=="string"?e:""}function Ce(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e>0;if(typeof e=="string"){const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}return!1}function Ue(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){const t=Number(e);if(Number.isFinite(t))return t}return 0}function P(e){return e.trim().toLowerCase()}function fe(e){if(!e)return[];const t=e.toLowerCase().match(er);return t?t.map(r=>r.replace(/[\'’]/g,"")).filter(Boolean):[]}function it(e){const t=new Map;for(let r=0;r<e.length;r+=1){const n=e[r];n&&t.set(n,(t.get(n)||0)+1)}return t}function Xt(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const r=new Array(t.length+1),n=new Array(t.length+1);for(let s=0;s<=t.length;s+=1)r[s]=s;for(let s=1;s<=e.length;s+=1){n[0]=s;for(let i=1;i<=t.length;i+=1){const o=e[s-1]===t[i-1]?0:1;n[i]=Math.min((r[i]??0)+1,(n[i-1]??0)+1,(r[i-1]??0)+o)}for(let i=0;i<=t.length;i+=1)r[i]=n[i]??0}return r[t.length]??Math.max(e.length,t.length)}function ot(e,t=!1){if(!e)return 0;if(/^\\d{4}-\\d{2}-\\d{2}$/.test(e)){const n=t?"T23:59:59.999Z":"T00:00:00.000Z",s=Date.parse(`${e}${n}`);return Number.isFinite(s)?s:0}const r=Date.parse(e);return Number.isFinite(r)?r:0}function ar(e){return e?e.replace(/<[^>]+>/g," ").replace(/\\s+/g," ").trim():""}function ur(e){const t=new Set,r=n=>{if(Array.isArray(n))for(const s of n){if(!s||typeof s!="object")continue;const i=s,o=b(i.expanded_url).trim(),a=b(i.display_url).trim(),u=b(i.url).trim();o&&t.add(o),a&&t.add(a),u&&t.add(u)}};return r(h(e,"legacy.entities.urls")),r(h(e,"legacy.entities.media")),r(h(e,"legacy.entities.description.urls")),r(h(e,"legacy.entities.url.urls")),[...t]}function at(e,t,r="text"){const n=h(e,t);if(!Array.isArray(n))return[];const s=new Set;for(const i of n){if(!i||typeof i!="object")continue;const a=P(b(i[r]).trim());a&&s.add(a)}return[...s]}function cr(e){const t=(Array.isArray(h(e,"legacy.extended_entities.media"))?h(e,"legacy.extended_entities.media"):h(e,"legacy.entities.media"))||[];if(!Array.isArray(t))return[];const r=new Set;for(const n of t){if(!n||typeof n!="object")continue;const i=P(b(n.type).trim());i&&r.add(i)}return[...r]}function lr(e){const t=h(e,"article.article_results.result.content_state.blocks");if(!Array.isArray(t))return[];const r=[];for(const n of t){if(!n||typeof n!="object")continue;const s=b(n.text).trim();s&&r.push(s)}return r}function fr(e){const t=new Set;for(const r of e)try{const n=r.startsWith("http")?r:`https://${r}`,s=new URL(n).hostname.replace(/^www\\./,"").toLowerCase();s&&t.add(s)}catch{}return[...t]}function Fe(e,t,r=!1){if(!t.length)return 0;const n=t[0],s=[];for(let o=0;o<e.length;o+=1)e[o]===n&&s.push(o);if(!s.length)return null;let i=null;for(const o of s){let a=o,u=!0;for(let p=1;p<t.length;p+=1){const l=t[p],v=r&&p===t.length-1;let M=-1;for(let k=a+1;k<e.length;k+=1){const _=e[k];if(v&&l&&(_!=null&&_.startsWith(l))||_===l){M=k;break}}if(M<0){u=!1;break}a=M}if(!u)continue;const c=a-o,w=Math.max(0,t.length-1),f=Math.max(0,c-w);(i===null||f<i)&&(i=f)}return i}function Gt(e){const t=e||{},r=b(h(t,"rest_id"))||b(h(t,"legacy.id_str"))||b(h(t,"id_str"))||`${Math.random().toString(36).slice(2)}`,n=b(h(t,"twe_private_fields.article_markdown"))||Lt(h(t,"article.article_results.result")??null)||b(h(t,"note_tweet.note_tweet_results.result.text"))||[b(h(t,"article.article_results.result.title")),b(h(t,"article.article_results.result.preview_text")),...lr(t)].map(ne=>ne.trim()).filter(Boolean).filter((ne,Lr,Pr)=>Pr.indexOf(ne)===Lr).join(`\n\n`)||b(h(t,"legacy.full_text"))||b(h(t,"legacy.text"))||b(h(t,"legacy.description")),s=b(h(t,"quoted_status_result.result.twe_private_fields.article_markdown"))||Lt(h(t,"quoted_status_result.result.article.article_results.result")??null)||b(h(t,"quoted_status_result.result.note_tweet.note_tweet_results.result.text"))||b(h(t,"quoted_status_result.result.legacy.full_text"))||b(h(t,"quoted_status_result.result.legacy.text"))||b(h(t,"quoted_status_result.result.article.article_results.result.title"))||b(h(t,"quoted_status_result.result.article.article_results.result.preview_text")),i=P(b(h(t,"quoted_status_result.result.core.user_results.result.core.screen_name"))),o=b(h(t,"quoted_status_result.result.core.user_results.result.core.name")),a=P(b(h(t,"core.user_results.result.core.screen_name"))||b(h(t,"core.screen_name"))),u=b(h(t,"core.user_results.result.core.name"))||b(h(t,"core.name")),c=b(h(t,"core.user_results.result.rest_id"))||b(h(t,"rest_id")),w=b(h(t,"legacy.created_at"))||b(h(t,"core.created_at")),f=w?Number(wn(w)||0):Number(h(t,"article.article_results.result.metadata.first_published_at_secs")||0)*1e3,p=ar(b(h(t,"legacy.source"))),l=P(b(h(t,"card.card_platform.card_name"))||b(h(t,"card.name"))||b(h(t,"__card_name"))),v=b(h(t,"__bookmark_folder_id")).trim(),M=b(h(t,"__bookmark_folder_name")).trim(),k=ur(t),_=fr(k),m=at(t,"legacy.entities.user_mentions","screen_name"),I=at(t,"legacy.entities.hashtags"),Y=at(t,"legacy.entities.symbols"),z=cr(t),U=oe(h(t,"twe_relationship_fields.subject_screen_names")).map(ne=>P(ne)),J=oe(h(t,"twe_relationship_fields.subject_user_ids")).map(ne=>String(ne).trim()),B=oe(h(t,"twe_relationship_fields.relation_types")).map(ne=>P(ne)),F=P(b(h(t,"legacy.in_reply_to_screen_name"))),q=b(h(t,"legacy.in_reply_to_user_id_str")).trim(),N=b(h(t,"legacy.in_reply_to_status_id_str")).trim(),X=b(h(t,"legacy.conversation_id_str"))||b(h(t,"conversation_id_str")),ee=P(b(h(t,"legacy.lang"))),T=P(b(h(t,"__route_type"))),y=z.length>0,d=z.includes("photo"),x=z.includes("video")||z.includes("animated_gif"),g=k.length>0,S=!!h(t,"legacy.retweeted_status_result")||b(h(t,"legacy.full_text")).startsWith("RT @"),$=!!h(t,"quoted_status_result"),E=!!N,D=P(b(h(t,"core.user_results.result.verification.verified_type")))==="verified"||P(b(h(t,"verification.verified_type")))==="verified",O=Ce(h(t,"core.user_results.result.is_blue_verified"))||Ce(h(t,"is_blue_verified")),j=Ce(h(t,"legacy.favorited")),W=Ce(h(t,"legacy.retweeted")),de=Ce(h(t,"legacy.bookmarked")),ae=Ue(h(t,"legacy.favorite_count")),_e=Ue(h(t,"legacy.retweet_count")),ue=Ue(h(t,"legacy.reply_count")),V=Ue(h(t,"legacy.bookmark_count")),te=[n,s,p,a,u,i,o,F,v,M,l,...U,...J,...B,...m,...I,...Y,...k,..._].filter(Boolean).join(" ").trim(),he=[n,p,a,u,F,v,M,l,...U,...J,...B,...m,...I,...Y,...k,..._].filter(Boolean).join(" ").trim(),ge=[s,i,o].filter(Boolean).join(" ").trim(),nn=fe(te),rn=fe(he),sn=fe(ge),qr=it(nn),Dr=it(rn),Or=it(sn);return{raw:e,id:r,text:te,primaryText:he,quotedText:ge,tokens:nn,primaryTokens:rn,quotedTokens:sn,tokenFreq:qr,primaryTokenFreq:Dr,quotedTokenFreq:Or,createdAtMs:f,authorScreenName:a,authorId:c,toUser:F,toUserId:q,inReplyToId:N,conversationId:X,lang:ee,routeType:T,sourceText:P(p),cardName:l,bookmarkFolderId:v,bookmarkFolderName:P(M),mentions:m,hashtags:I,cashtags:Y,urls:k.map(ne=>ne.toLowerCase()),domains:_,favoriteCount:ae,retweetCount:_e,replyCount:ue,bookmarkCount:V,favorited:j,retweeted:W,bookmarked:de,hasMedia:y,hasImages:d,hasVideo:x,hasLinks:g,isReply:E,isRetweet:S,isQuote:$,isVerified:D,isBlueVerified:O,fieldSearchCache:new Map}}function dr(e){if(!e||typeof e!="object")return Gt(e);const t=Zt.get(e);if(t)return t;const r=Gt(e);return Zt.set(e,r),r}function oe(e){if(e==null)return[];if(typeof e=="string"){const t=e.trim();return t?[t]:[]}return typeof e=="number"||typeof e=="boolean"?[String(e)]:Array.isArray(e)?e.flatMap(t=>oe(t)):typeof e=="object"?Object.values(e).flatMap(t=>oe(t)):[]}function hr(e,t){switch(t){case"text":return e.text;case"id":return e.id;case"author_screen_name":return e.authorScreenName;case"author_id":return e.authorId;case"to_user":return e.toUser;case"to_user_id":return e.toUserId;case"conversation_id":return e.conversationId;case"lang":return e.lang;case"route":case"route_type":return e.routeType;case"source":case"source_text":return e.sourceText;case"card_name":return e.cardName;case"bookmark_folder_id":return e.bookmarkFolderId;case"bookmark_folder_name":return e.bookmarkFolderName;case"subject_screen_names":return oe(h(e.raw||{},"twe_relationship_fields.subject_screen_names"));case"subject_user_ids":return oe(h(e.raw||{},"twe_relationship_fields.subject_user_ids"));case"relation_types":return oe(h(e.raw||{},"twe_relationship_fields.relation_types"));case"mentions":return e.mentions;case"hashtags":return e.hashtags;case"cashtags":return e.cashtags;case"urls":return e.urls;case"domains":return e.domains;default:return h(e.raw||{},t)}}function mr(e,t){const r=String(t||"").trim();if(!r)return{text:e.text,tokens:e.tokens,tokenFreq:e.tokenFreq};const n=e.fieldSearchCache.get(r);if(n)return n;const i=oe(hr(e,r)).join(" ").trim(),o=fe(i),a=new Map;for(const c of o)a.set(c,(a.get(c)||0)+1);const u={text:i,tokens:o,tokenFreq:a};return e.fieldSearchCache.set(r,u),u}function pr(e){const t=new Map;let r=0;for(const n of e){r+=n.tokens.length;for(const s of n.tokenFreq.keys())t.set(s,(t.get(s)||0)+1)}return{docCount:e.length,avgDocLength:e.length?r/e.length:1,termDocFreq:t}}function C(e,t,r){if(!t)return;const n=e.get(t);if(n){n.push(r);return}e.set(t,[r])}function A(e,t){return`${e}:${t}`}function _r(e){const t=new Map,r=new Map;for(let n=0;n<e.length;n+=1){const s=e[n];if(s){for(const i of s.tokenFreq.keys())C(t,i,n);C(r,A("id",s.id),n),C(r,A("from",s.authorScreenName),n),C(r,A("from_id",s.authorId),n),C(r,A("author_id",s.authorId),n),C(r,A("to",s.toUser),n),C(r,A("to_id",s.toUserId),n),C(r,A("in_reply_to_id",s.inReplyToId),n),C(r,A("conversation_id",s.conversationId),n),C(r,A("lang",s.lang),n),C(r,A("route",s.routeType),n),C(r,A("bookmark_folder",s.bookmarkFolderId),n);for(const i of s.mentions)C(r,A("mention",i),n);for(const i of s.hashtags)C(r,A("hashtag",i),n);for(const i of s.cashtags)C(r,A("cashtag",i),n);s.hasMedia&&C(r,A("is","media"),n),s.hasImages&&C(r,A("is","images"),n),s.hasVideo&&C(r,A("is","videos"),n),s.hasLinks&&C(r,A("is","links"),n),s.bookmarked&&C(r,A("is","bookmarked"),n),s.favorited&&C(r,A("is","liked"),n),s.retweeted&&C(r,A("is","retweeted"),n),s.isReply&&C(r,A("is","reply"),n),s.isRetweet&&C(r,A("is","retweet"),n),s.isQuote&&C(r,A("is","quote"),n),s.isVerified&&C(r,A("is","verified"),n),s.isBlueVerified&&C(r,A("is","blue_verified"),n)}}return{tokenDocs:t,exactFilterDocs:r,tokenVocabulary:[...t.keys()].sort()}}function ut(e,t){const r=t instanceof Set?t:new Set(t);if(!e)return new Set(r);const n=new Set;for(const s of e)r.has(s)&&n.add(s);return n}function je(e){const t=new Set;for(const r of e)for(const n of r)t.add(n);return t}function gr(e,t){if(!e.length||!t.length)return[];const r=e.length<=t.length?e:t,n=e.length<=t.length?t:e,s=new Set(n),i=[];for(const o of r)s.has(o)&&i.push(o);return i}function yr(e,t){const r=t.orderedTerms.filter(Boolean);if(r.length<Qt)return null;const n=[];for(let i=0;i<r.length-1;i+=1){const o=e.indexes.tokenDocs.get(r[i]||"")||[],a=e.indexes.tokenDocs.get(r[i+1]||"")||[],u=gr(o,a);u.length&&n.push(u)}if(!n.length)return null;const s=je(n);return!s.size||s.size>=e.docs.length?null:s}function vr(e,t){var f;const r=t.positiveTerms.filter(Boolean);if(r.length<Qt)return null;const n=Math.max(1,e.rankingContext.docCount),s=r.map(p=>({term:p,docFreq:e.rankingContext.termDocFreq.get(p)||0})).filter(p=>p.docFreq>0).sort((p,l)=>p.docFreq!==l.docFreq?p.docFreq-l.docFreq:p.term.localeCompare(l.term));if(!s.length)return null;const i=s.filter(p=>p.docFreq/n<=ir),o=i.length?i:s,a=((f=o[0])==null?void 0:f.docFreq)||0,u=a>0?o.filter(p=>p.docFreq<=a*or):o,c=(u.length?u:o).slice(0,sr);if(!c.length)return null;const w=je(c.map(p=>e.indexes.tokenDocs.get(p.term)||[]));return!w.size||w.size>=e.docs.length?null:w}function xr(e,t,r){if(!t||t.length<Vt)return[];const n=[];for(const s of e)if(s.startsWith(t)&&(n.push(s),n.length>=r))break;return n}function Jt(e,t,r){if(!t||t.length<st||Ee<=0)return[];const n=t.slice(0,Yt),s=[];for(const i of e)if(i.startsWith(n)&&!(Math.abs(i.length-t.length)>Ee)&&!(Xt(i,t)>Ee)&&(s.push(i),s.length>=r))break;return s}function wr(e,t){const r=e.indexes.tokenDocs,n=e.indexes.tokenVocabulary,s=fe(t.value);if(!s.length)return[];const i=new Set;for(let o=0;o<s.length;o+=1){const a=s[o];if(!(!a||(i.add(a),!(o===s.length-1)))){if(t.prefix)for(const c of xr(n,a,rr))i.add(c);if(t.fuzzy)for(const c of Jt(n,a,Wt))i.add(c)}}return[...i].flatMap(o=>r.get(o)||[])}function br(e,t){const r=String(t.value||"").trim(),n=P(r);if(!r)return null;const s=e.indexes.exactFilterDocs;switch(t.name){case"from":case"to":case"lang":case"route":case"mention":case"hashtag":case"cashtag":case"id":return new Set(s.get(A(t.name,n))||[]);case"from_id":case"author_id":case"to_id":case"in_reply_to_id":case"conversation_id":return new Set(s.get(A(t.name,r))||[]);case"bookmark_folder":return/^\\d+$/.test(r)?new Set(s.get(A("bookmark_folder",r))||[]):null;case"folder":return/^\\d+$/.test(r)?new Set(s.get(A("bookmark_folder",r))||[]):null;case"is":return new Set(s.get(A("is",n))||[]);default:return null}}function kr(e,t,r){let n=null;if(r.size){const a=je([...r].map(u=>e.indexes.exactFilterDocs.get(A("bookmark_folder",u))||[]));n=ut(n,a)}for(const a of t.filters){const u=br(e,a);if(u){if(a.negated){if(!n)continue;for(const c of u)n.delete(c);continue}n=ut(n,u)}}const s=t.negativeLexicalTokens.length?null:yr(e,t)||vr(e,t),i=t.positiveLexicalTokens.filter(a=>!a.field),o=s||je(i.map(a=>wr(e,a)));return o.size&&(n=ut(n,o)),n}function Tr(){const e={...Bt};try{if(typeof localStorage>"u")return e;const t=localStorage.getItem(tr);if(!t)return e;const r=JSON.parse(t);for(const n of Object.keys(Bt)){const s=Number(r[n]);Number.isFinite(s)&&(e[n]=s)}return e}catch{return e}}function Sr(e){const t=String(e||"").trim(),r=Re.get(t);if(r)return r;const n=Jn(t);if(Re.set(t,n),Re.size>nr){const s=Re.keys().next().value;typeof s=="string"&&Re.delete(s)}return n}function $r(e,t,r){const n=e.tokenFreq.get(t)||0;if(!n)return 0;const s=r.termDocFreq.get(t)||0,i=Math.max(1,r.docCount),o=Math.max(1,r.avgDocLength),a=Math.max(1,e.tokens.length),u=1.2,c=.75,w=Math.log(1+(i-s+.5)/(s+.5)),f=n+u*(1-c+c*a/o);return w*(n*(u+1))/f}function Mr(e){const t=[],r=new Set(["bookmarked","liked","retweeted","reply","retweet","quote","media","images","videos","links","verified","blue_verified"]),n=new Set(["media","images","videos","links","mentions","hashtags","cashtags","engagement","polls"]),s=new Set(["replies","retweets","nativeretweets","quote","media","images","videos","links","mentions","hashtags","verified","blue_verified","twimg","native_video","consumer_video","pro_video","has_engagement"]);for(const i of e){const o=`${i.name}:${i.value}`,a=String(i.value||"").trim();if(a){if(["since","until"].includes(i.name)&&!ot(a,i.name==="until")){t.push({code:"invalid_filter_value",message:`invalid ${o}`,token:o,severity:"warn"});continue}if(["since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks"].includes(i.name)&&!Number.isFinite(Number(a))){t.push({code:"invalid_filter_value",message:`invalid ${o}`,token:o,severity:"warn"});continue}if(i.name==="is"&&!r.has(P(a))){t.push({code:"unsupported_filter",message:`unsupported ${o}`,token:o,severity:"warn"});continue}if(i.name==="has"&&!n.has(P(a))){t.push({code:"unsupported_filter",message:`unsupported ${o}`,token:o,severity:"warn"});continue}if(["filter","include"].includes(i.name)&&!s.has(P(a))){t.push({code:"unsupported_filter",message:`unsupported ${o}`,token:o,severity:"warn"});continue}}}return t}function Nr(e,t){const r=String(t.value||"").trim(),n=P(r);if(!r)return!0;const i=(()=>{switch(t.name){case"from":return e.authorScreenName===n;case"from_id":case"author_id":return e.authorId===r;case"to":return e.toUser===n;case"to_id":return e.toUserId===r;case"in_reply_to_id":return e.inReplyToId===r;case"id":return e.id===r;case"lang":return e.lang===n;case"route":return e.routeType===n;case"conversation_id":return e.conversationId===r;case"bookmark_folder":case"folder":return/^\\d+$/.test(r)?e.bookmarkFolderId===r:e.bookmarkFolderName===n||e.bookmarkFolderName.includes(n);case"mention":return e.mentions.includes(n);case"hashtag":return e.hashtags.includes(n);case"cashtag":return e.cashtags.includes(n);case"source":return e.sourceText.includes(n);case"card_name":{const o=n.replace(/\\s+/g,"_");return e.cardName===o||e.cardName.includes(o)}case"domain":return e.domains.some(o=>o===n||o.endsWith(`.${n}`));case"url":return e.urls.some(o=>o.includes(n));case"is":return n==="bookmarked"?e.bookmarked:n==="liked"?e.favorited:n==="retweeted"?e.retweeted:n==="reply"?e.isReply:n==="retweet"?e.isRetweet:n==="quote"?e.isQuote:n==="media"?e.hasMedia:n==="images"?e.hasImages:n==="videos"?e.hasVideo:n==="links"?e.hasLinks:n==="verified"?e.isVerified:n==="blue_verified"?e.isBlueVerified:!0;case"has":return n==="media"?e.hasMedia:n==="images"?e.hasImages:n==="videos"?e.hasVideo:n==="links"?e.hasLinks:n==="mentions"?e.mentions.length>0:n==="hashtags"?e.hashtags.length>0:n==="cashtags"?e.cashtags.length>0:n==="engagement"?e.favoriteCount+e.retweetCount+e.replyCount+e.bookmarkCount>0:n==="polls"?e.cardName.includes("poll"):!0;case"filter":case"include":return t.name==="include"&&n==="nativeretweets"&&!t.negated?!0:n==="replies"?e.isReply:n==="retweets"?e.isRetweet||e.isQuote:n==="nativeretweets"?e.isRetweet:n==="quote"?e.isQuote:n==="media"?e.hasMedia:n==="images"?e.hasImages:n==="videos"||n==="native_video"||n==="consumer_video"||n==="pro_video"?e.hasVideo:n==="links"?e.hasLinks:n==="mentions"?e.mentions.length>0:n==="hashtags"?e.hashtags.length>0:n==="verified"?e.isVerified:n==="blue_verified"?e.isBlueVerified:n==="twimg"?e.urls.some(o=>o.includes("pbs.twimg.com")||o.includes("pic.twitter.com")):n==="has_engagement"?e.favoriteCount+e.retweetCount+e.replyCount+e.bookmarkCount>0:!0;case"since":{const o=ot(r,!1);return!o||!e.createdAtMs?!0:e.createdAtMs>=o}case"until":{const o=ot(r,!0);return!o||!e.createdAtMs?!0:e.createdAtMs<o}case"since_time":{const o=Number(r)*1e3;return!Number.isFinite(o)||!e.createdAtMs?!0:e.createdAtMs>=o}case"until_time":{const o=Number(r)*1e3;return!Number.isFinite(o)||!e.createdAtMs?!0:e.createdAtMs<o}case"since_id":return/^\\d+$/.test(e.id)&&Number(e.id)>Number(r);case"max_id":return/^\\d+$/.test(e.id)&&Number(e.id)<=Number(r);case"min_faves":case"min_likes":return e.favoriteCount>=Number(r);case"min_retweets":return e.retweetCount>=Number(r);case"min_replies":return e.replyCount>=Number(r);case"min_bookmarks":return e.bookmarkCount>=Number(r);default:return!0}})();return t.negated?!i:i}function ct(e,t,r){if(r.kind==="phrase"){const i=fe(r.value),o=Fe(e,i,!!r.prefix);if(o===null){if(r.fuzzy&&i.length){const a=i[i.length-1],u=a&&a.length>=st?Jt([...new Set(e)],a,Wt):[];for(const c of u){const w=[...i];w[w.length-1]=c;const f=Fe(e,w,!1);if(f!==null&&f<=r.slop)return{matched:!0,slopUsed:f}}}return{matched:!1,slopUsed:Number.POSITIVE_INFINITY}}return o>r.slop?{matched:!1,slopUsed:o}:{matched:!0,slopUsed:o}}const n=fe(r.value);if(!n.length)return{matched:!1,slopUsed:Number.POSITIVE_INFINITY};if(n.length===1){const i=n[0];if(!i)return{matched:!1,slopUsed:Number.POSITIVE_INFINITY};let o=t.has(i);return!o&&r.prefix&&i.length>=Vt&&(o=[...t.keys()].some(a=>a.startsWith(i))),!o&&r.fuzzy&&i.length>=st&&(o=[...t.keys()].some(a=>a.startsWith(i.slice(0,Yt))&&Math.abs(a.length-i.length)<=Ee&&Xt(a,i)<=Ee)),{matched:o,slopUsed:o?0:Number.POSITIVE_INFINITY}}const s=Fe(e,n,!!r.prefix);return{matched:s!==null&&s<=0,slopUsed:s??Number.POSITIVE_INFINITY}}function en(e,t){const r=t.field?mr(e,t.field):null;if(r){const o=ct(r.tokens,r.tokenFreq,t);return{matched:o.matched,slopUsed:o.slopUsed,primaryMatched:o.matched,quotedMatched:!1}}const n=ct(e.primaryTokens,e.primaryTokenFreq,t),s=e.quotedTokens.length>0?ct(e.quotedTokens,e.quotedTokenFreq,t):{matched:!1,slopUsed:Number.POSITIVE_INFINITY};if(!n.matched&&!s.matched)return{matched:!1,slopUsed:Number.POSITIVE_INFINITY,primaryMatched:!1,quotedMatched:!1};let i=Number.POSITIVE_INFINITY;return n.matched&&(i=Math.min(i,n.slopUsed)),s.matched&&(i=Math.min(i,s.slopUsed)),{matched:!0,slopUsed:i,primaryMatched:n.matched,quotedMatched:s.matched}}function Ir(e,t,r,n=!1){if(e.kind==="phrase"){const o=(e.quoted&&e.slop===0?r.quoted_phrase_match:r.phrase_match)*e.boost/(1+Math.max(0,t));return n?o*.2:o}const s=r.term_match*e.boost;return n?s*.2:s}function Ar(e,t){let r=0,n=0,s=0,i=0;for(const o of t){if(o.kind!=="phrase")continue;const a=en(e,o);if(!a.matched||a.slopUsed!==0)continue;const c=fe(o.value).length;c>r&&(r=c),a.primaryMatched&&c>s&&(s=c),o.quoted&&o.slop===0&&c>n&&(n=c),o.quoted&&o.slop===0&&a.primaryMatched&&c>i&&(i=c)}return{exactPhraseTerms:r,exactQuotedPhraseTerms:n,exactPrimaryPhraseTerms:s,exactPrimaryQuotedPhraseTerms:i}}function we(e,t,r){if(t.kind==="term"||t.kind==="phrase"){const i=en(e,t);return i.matched?{matched:!0,lexicalRaw:Ir(t,i.slopUsed,r,i.quotedMatched&&!i.primaryMatched)}:{matched:!1,lexicalRaw:0}}if(t.kind!=="op")return{matched:!0,lexicalRaw:0};if(t.op==="NOT")return{matched:!we(e,t.child,r).matched,lexicalRaw:0};if(t.op==="AND"){const i=we(e,t.left,r);if(!i.matched)return{matched:!1,lexicalRaw:0};const o=we(e,t.right,r);return o.matched?{matched:!0,lexicalRaw:i.lexicalRaw+o.lexicalRaw}:{matched:!1,lexicalRaw:0}}const n=we(e,t.left,r),s=we(e,t.right,r);return!n.matched&&!s.matched?{matched:!1,lexicalRaw:0}:n.matched&&s.matched?{matched:!0,lexicalRaw:n.lexicalRaw+s.lexicalRaw}:n.matched?n:s}function Er(e,t,r){const n=t.filter(Boolean);if(!n.length)return 0;let s=0;if(n.length>=2)for(let i=0;i<n.length-1;i+=1){const o=n.slice(i,i+2),a=Fe(e.tokens,o);a===null||a>2||(s+=r.cover_bigram/(1+a))}if(n.length>=3)for(let i=0;i<n.length-2;i+=1){const o=n.slice(i,i+3),a=Fe(e.tokens,o);a===null||a>3||(s+=r.cover_trigram/(1+a))}return s}function Rr(e){const t=e.map(r=>dr(r));return{records:e,docs:t,rankingContext:pr(t),indexes:_r(t)}}function Cr(e,t,r={}){const n=String(t||"").trim(),s=new Set((r.bookmarkFolderIds||[]).map(_=>String(_||"").trim()).filter(Boolean)),i=s.size>0;if(!n){const _=i?e.docs.filter(m=>m.bookmarkFolderId&&s.has(m.bookmarkFolderId)).map(m=>m.raw):e.records;return{records:_,highlightTerms:[],totalMatches:_.length,warnings:[],warningObjects:[],parsed:{query:"",lexicalExpression:"",filterBooleanSemantics:"global_and"}}}const o=Tr(),a=Sr(n),u=[...a.warnings,...Mr(a.filters)],c=Date.now(),w=kr(e,a,s),f=w&&w.size<e.docs.length?[...w].sort((_,m)=>_-m).map(_=>e.docs[_]).filter(_=>!!_):e.docs,p=[];for(const _ of f){if(i&&(!_.bookmarkFolderId||!s.has(_.bookmarkFolderId)))continue;let m=!0;for(const ee of a.filters)if(!Nr(_,ee)){m=!1;break}if(!m)continue;let I=!a.hasPositiveLexical,Y=0;if(a.lexicalAst){const ee=we(_,a.lexicalAst,o);I=ee.matched,Y=ee.lexicalRaw}if(!I)continue;let z=0;for(const ee of a.positiveTerms)z+=$r(_,ee,e.rankingContext);const U=Er(_,a.orderedTerms,o),J=z*o.bm25,B=Y*o.lexical,F=U*o.cover_density,q=(_.createdAtMs?_.createdAtMs/1e15:c/1e15)*o.recency,N=Ar(_,a.positiveLexicalTokens),X=J+B+F+q;p.push({doc:_,score:X,weightedBm25:J,weightedLexical:B,weightedDensity:F,exactPhraseTerms:N.exactPhraseTerms,exactQuotedPhraseTerms:N.exactQuotedPhraseTerms,exactPrimaryPhraseTerms:N.exactPrimaryPhraseTerms,exactPrimaryQuotedPhraseTerms:N.exactPrimaryQuotedPhraseTerms})}p.sort((_,m)=>m.score!==_.score?m.score-_.score:m.exactPrimaryQuotedPhraseTerms!==_.exactPrimaryQuotedPhraseTerms?m.exactPrimaryQuotedPhraseTerms-_.exactPrimaryQuotedPhraseTerms:m.exactPrimaryPhraseTerms!==_.exactPrimaryPhraseTerms?m.exactPrimaryPhraseTerms-_.exactPrimaryPhraseTerms:m.exactQuotedPhraseTerms!==_.exactQuotedPhraseTerms?m.exactQuotedPhraseTerms-_.exactQuotedPhraseTerms:m.exactPhraseTerms!==_.exactPhraseTerms?m.exactPhraseTerms-_.exactPhraseTerms:m.weightedLexical!==_.weightedLexical?m.weightedLexical-_.weightedLexical:m.weightedDensity!==_.weightedDensity?m.weightedDensity-_.weightedDensity:m.doc.createdAtMs!==_.doc.createdAtMs?m.doc.createdAtMs-_.doc.createdAtMs:m.doc.id.localeCompare(_.doc.id));const l=[],v=new Set;for(const _ of p){const m=[_.doc.authorId||_.doc.authorScreenName||"",_.doc.text.replace(/\\s+/g," ").trim().toLowerCase()].join("::");m!=="::"&&v.has(m)||(m!=="::"&&v.add(m),l.push(_))}const M=Number(r.limit||0);return{records:(Number.isFinite(M)&&M>0?l.slice(0,Math.max(1,Math.floor(M))):l).map(_=>_.doc.raw),highlightTerms:a.highlightTerms,totalMatches:l.length,warnings:u.map(_=>_.message),warningObjects:u,parsed:{query:a.query,lexicalExpression:a.lexicalExpression,filterBooleanSemantics:a.filterBooleanSemantics}}}function pe(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}const be=new Map,re=new Map,G=new Set;function ke(e){self.postMessage(e)}function Fr(e){return e instanceof Error?e.message:String(e)}function tn(e,t){const r=t.map(s=>s.record),n=new Map;return t.forEach((s,i)=>{n.set(s.record,s.id||`row-${i}`)}),{rows:t,prepared:Rr(r),idByRecord:n}}self.onmessage=e=>{const t=e.data;if(!t||typeof t!="object")return;if(t.type==="search:cancel"){G.add(t.requestId);return}if(t.type==="search:dispose"){t.scopeKey?(be.delete(t.scopeKey),re.delete(t.scopeKey)):(be.clear(),re.clear()),G.delete(t.requestId);return}const r=pe();try{if(t.type==="search:set-corpus"){const n=tn(t.scopeKey,t.records||[]);be.set(t.scopeKey,n),ke({type:"search:corpus-ready",requestId:t.requestId,scopeKey:t.scopeKey,corpusSize:n.rows.length,elapsedMs:pe()-r});return}if(t.type==="search:begin-corpus"){if(G.has(t.requestId)){re.delete(t.scopeKey),G.delete(t.requestId);return}be.delete(t.scopeKey),re.set(t.scopeKey,[]);return}if(t.type==="search:append-corpus"){if(G.has(t.requestId)){re.delete(t.scopeKey),G.delete(t.requestId);return}const n=re.get(t.scopeKey);if(!n){re.set(t.scopeKey,[...t.records||[]]);return}n.push(...t.records||[]);return}if(t.type==="search:commit-corpus"){if(G.has(t.requestId)){re.delete(t.scopeKey),G.delete(t.requestId);return}const n=re.get(t.scopeKey);if(!n){ke({type:"search:error",requestId:t.requestId,scopeKey:t.scopeKey,error:`Search corpus chunks not ready for scope: ${t.scopeKey}`,elapsedMs:pe()-r});return}re.delete(t.scopeKey);const s=tn(t.scopeKey,n);be.set(t.scopeKey,s),ke({type:"search:corpus-ready",requestId:t.requestId,scopeKey:t.scopeKey,corpusSize:s.rows.length,elapsedMs:pe()-r});return}if(t.type==="search:query"){const n=be.get(t.scopeKey);if(!n){ke({type:"search:error",requestId:t.requestId,scopeKey:t.scopeKey,error:`Search corpus not ready for scope: ${t.scopeKey}`,elapsedMs:pe()-r});return}if(G.has(t.requestId)){G.delete(t.requestId);return}const s=Cr(n.prepared,t.query,t.options);if(G.has(t.requestId)){G.delete(t.requestId);return}const i=s.records.map((o,a)=>{var u;return n.idByRecord.get(o)||((u=n.rows[a])==null?void 0:u.id)||`row-${a}`});ke({type:"search:result",requestId:t.requestId,scopeKey:t.scopeKey,query:t.query,ids:i,elapsedMs:pe()-r,corpusSize:n.rows.length,result:{highlightTerms:s.highlightTerms,totalMatches:s.totalMatches,warnings:s.warnings,warningObjects:s.warningObjects,parsed:s.parsed}})}}catch(n){ke({type:"search:error",requestId:t.requestId,scopeKey:"scopeKey"in t?t.scopeKey:void 0,error:Fr(n),elapsedMs:pe()-r})}}})();\n',gg=typeof self<"u"&&self.Blob&&new Blob([Xw],{type:"text/javascript;charset=utf-8"});function lE(e){let t;try{if(t=gg&&(self.URL||self.webkitURL).createObjectURL(gg),!t)throw "";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t);}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Xw),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t);}}const cE="twe_search_worker_request_delay_ms_v1",uE=5e3;function _g(e){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${e}-${crypto.randomUUID()}`:`${e}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function dE(e){if(e.type!=="search:query")return 0;try{if(typeof localStorage>"u")return 0;const t=localStorage.getItem(cE);if(!t)return 0;const n=Number(t);return !Number.isFinite(n)||n<=0?0:Math.min(uE,Math.floor(n))}catch{return 0}}class fE{constructor(){be(this,"worker",null);be(this,"pending",new Map);be(this,"available",false);try{this.worker=new lE,this.worker.onmessage=t=>this.handleMessage(t.data),this.worker.onerror=t=>{Ai("search",!1),na("search:worker:error");for(const[n,r]of this.pending)r.reject(new Error(t.message||`Search worker error: ${n}`));this.pending.clear();},this.available=!0,Ai("search",!0);}catch(t){this.worker=null,this.available=false,Ai("search",false),He({kind:"worker",name:"search-create-failed",tags:{error:t instanceof Error?t.message:String(t)}});}}isAvailable(){return this.available&&!!this.worker}async setCorpus(t,n){const r=_g("corpus");return this.request({type:"search:set-corpus",requestId:r,scopeKey:t,records:n})}beginCorpus(t){this.worker&&this.worker.postMessage({type:"search:begin-corpus",requestId:t.requestId,scopeKey:t.scopeKey,expectedCount:t.expectedCount});}appendCorpus(t){this.worker&&this.worker.postMessage({type:"search:append-corpus",requestId:t.requestId,scopeKey:t.scopeKey,records:t.records});}async commitCorpus(t,n){return this.request({type:"search:commit-corpus",requestId:n,scopeKey:t})}async query(t){const n=t.requestId||_g("query"),r=await this.request({type:"search:query",requestId:n,scopeKey:t.scopeKey,query:t.query,options:t.options});if(r.type==="search:result")return r;throw r.type==="search:error"?new Error(r.error):new Error(`Unexpected search worker response: ${r.type}`)}cancel(t){const n=this.pending.get(t);n&&(n.reject(new Error(`Search request cancelled: ${t}`)),this.pending.delete(t)),this.worker&&(this.worker.postMessage({type:"search:cancel",requestId:t}),na("search:cancelled"),He({kind:"search",name:"query-cancel",tags:{requestId:t,pending:!!n}}));}dispose(){var t;for(const[n,r]of this.pending)r.reject(new Error(`Search worker disposed: ${n}`));this.pending.clear(),(t=this.worker)==null||t.terminate(),this.worker=null,this.available=false;}request(t){if(!this.worker)return Promise.reject(new Error("Search worker unavailable"));const n=Ge(),r=dE(t);return new Promise((o,a)=>{this.pending.set(t.requestId,{resolve:o,reject:a,startedAt:n});const i=()=>{var s;if(!this.pending.has(t.requestId)){r>0&&He({kind:"search",name:"delayed-query-cancelled-before-post",value:r,tags:{requestId:t.requestId,type:t.type}});return}(s=this.worker)==null||s.postMessage(t);};r>0?globalThis.setTimeout(i,r):i();})}handleMessage(t){const n=this.pending.get(t.requestId);if(!n){na("search:stale-response");return}this.pending.delete(t.requestId),He({kind:"search",name:t.type==="search:result"?"worker-query":"worker-corpus",durationMs:Ge()-n.startedAt,tags:{type:t.type,corpusSize:"corpusSize"in t?t.corpusSize:void 0,resultCount:t.type==="search:result"?t.ids.length:void 0}}),n.resolve(t);}}function Zw(e,t){if(!e||typeof e!="object")return;const n=t.split(".");let r=e;for(const o of n){if(!r||typeof r!="object")return;r=r[o];}return r}function yg(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)?e:typeof e=="boolean"?e?1:0:e instanceof Date?e.getTime():String(e).toLowerCase()}function hE(e,t){const n=yg(e),r=yg(t);return typeof n=="number"&&typeof r=="number"?n-r:String(n).localeCompare(String(r),void 0,{numeric:true,sensitivity:"base"})}function Qw(e){const t=[];for(const n of e){if("columns"in n&&Array.isArray(n.columns)){t.push(...Qw(n.columns));continue}t.push(n);}return t}function pE(e){return "id"in e&&typeof e.id=="string"&&e.id?e.id:"accessorKey"in e&&typeof e.accessorKey=="string"?e.accessorKey:""}function bg(e,t,n){if("accessorFn"in e&&typeof e.accessorFn=="function")return e.accessorFn(t,n);if("accessorKey"in e){if(typeof e.accessorKey=="string")return Zw(t,e.accessorKey);if(typeof e.accessorKey=="number"&&Array.isArray(t))return t[e.accessorKey]}}function mE(e){if(typeof e=="number"&&Number.isFinite(e))return e;const t=Number(e);return Number.isFinite(t)?t:null}function gE(e){if(e==null||e==="")return null;const t=mE(e);if(t!==null)return t>1e12?t:t*1e3;if(typeof e=="string"){const n=Number(Ni(e)||0);if(Number.isFinite(n)&&n>0)return n;const r=Date.parse(e);if(Number.isFinite(r))return r}return null}function wg(e){if(!e||typeof e!="object")return 0;const t=["twe_private_fields.created_at","created_at","legacy.created_at","core.created_at","article.published_at","__seen_at"];for(const n of t){const r=Zw(e,n),o=gE(r);if(o!==null&&o>0)return o}return 0}const vg=1200,zl=6e3,Sd=320,_E=1e3;function _i(e,t=[]){return {records:[],highlightTerms:[],totalMatches:0,warnings:t,warningObjects:t.map(n=>({code:"unsupported_token",message:n,severity:"warn"})),parsed:{query:e,lexicalExpression:"",filterBooleanSemantics:"global_and"}}}function kg(e){return {records:e.records,highlightTerms:[],totalMatches:e.totalMatches,warnings:[],warningObjects:[],parsed:{query:e.query,lexicalExpression:"",filterBooleanSemantics:"global_and"}}}function yE(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`search-${crypto.randomUUID()}`:`search-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function yi(e){switch(e){case "idle":return "search idle";case "unavailable":return "search worker unavailable";case "preparing-corpus":return "preparing search index";case "ready":return "search ready";case "querying":return "querying local index";case "degraded":return "search degraded";case "cancelled":return "search cancelled";case "failed":return "search failed";default:return "search"}}function Rn(e,t){let n=e;for(const r of t.split(".")){if(!n||typeof n!="object")return;n=n[r];}return n}function bE(e){if(!e||typeof e!="object")return e;const t=e;return {__typename:t.__typename,rest_id:t.rest_id,id_str:t.id_str,__bookmark_folder_id:t.__bookmark_folder_id,__bookmark_folder_name:t.__bookmark_folder_name,__route_type:t.__route_type,twe_relationship_fields:t.twe_relationship_fields,note_tweet:t.note_tweet,article:t.article,quoted_status_result:t.quoted_status_result,card:t.card,views:t.views,core:t.core,verification:t.verification,is_blue_verified:t.is_blue_verified,legacy:{id_str:Rn(t,"legacy.id_str"),full_text:Rn(t,"legacy.full_text"),text:Rn(t,"legacy.text"),description:Rn(t,"legacy.description"),created_at:Rn(t,"legacy.created_at"),source:Rn(t,"legacy.source"),lang:Rn(t,"legacy.lang"),entities:Rn(t,"legacy.entities"),extended_entities:Rn(t,"legacy.extended_entities"),in_reply_to_screen_name:Rn(t,"legacy.in_reply_to_screen_name"),in_reply_to_user_id_str:Rn(t,"legacy.in_reply_to_user_id_str"),in_reply_to_status_id_str:Rn(t,"legacy.in_reply_to_status_id_str"),conversation_id_str:Rn(t,"legacy.conversation_id_str"),favorite_count:Rn(t,"legacy.favorite_count"),retweet_count:Rn(t,"legacy.retweet_count"),reply_count:Rn(t,"legacy.reply_count"),bookmark_count:Rn(t,"legacy.bookmark_count"),quote_count:Rn(t,"legacy.quote_count"),favorited:Rn(t,"legacy.favorited"),retweeted:Rn(t,"legacy.retweeted"),bookmarked:Rn(t,"legacy.bookmarked"),retweeted_status_result:Rn(t,"legacy.retweeted_status_result")}}}function ev(e){var r,o,a,i,s;const t=e.raw_ref_key||e.entity_id,n=[e.primary_text,e.quoted_text,e.auxiliary_text].filter(l=>typeof l=="string"&&l.trim().length>0).join(`
`);return {rest_id:t,id_str:t,__bookmark_folder_id:e.folder_id,__bookmark_folder_name:e.folder_name,__route_type:e.route_type,core:{user_results:{result:{rest_id:e.author_id,core:{screen_name:e.author_screen_name,name:e.author_screen_name},legacy:{screen_name:e.author_screen_name,name:e.author_screen_name}}}},legacy:{id_str:t,full_text:n,text:n,created_at:e.created_at_ms?new Date(e.created_at_ms).toUTCString():void 0,lang:e.lang,favorite_count:(r=e.numeric_json)==null?void 0:r.favorite_count,retweet_count:(o=e.numeric_json)==null?void 0:o.retweet_count,reply_count:(a=e.numeric_json)==null?void 0:a.reply_count,bookmark_count:(i=e.numeric_json)==null?void 0:i.bookmark_count,quote_count:(s=e.numeric_json)==null?void 0:s.quote_count}}}function wE(e,t){return e.map((n,r)=>({id:n.raw_ref_key||n.entity_id||`search-doc-${t+r}`,record:ev(n)}))}function vE({title:e,viewStateKey:t,fullscreen:n,onFullscreenChange:r,records:o,searchDocuments:a,searchDocumentsLoading:i=false,searchDocumentsLoaded:s=false,searchDocumentTotalCount:l=0,searchDocumentsBlockedReason:c,loadSearchDocuments:h,loadSearchDocumentChunks:u,folderScopeSourceBacked:m=false,resultSourceDescriptor:g,resultSourceTotalCount:y,resultEntityType:b,hydrateRecordsByIds:k,columns:S,alternateViews:M}){const[T,P]=$e(""),[N,I]=$e(""),[O,U]=$e([]),[E,v]=$e({}),[L,$]=$e([]),[xe,G]=$e("all"),[le,Q]=$e(false),[ce,me]=$e("table"),[pe,we]=$e(null),[z,ae]=$e([]),[Le,fe]=$e(()=>({key:"",ids:new Set})),Pe=bt(null),it=bt(""),X=bt(""),ne=bt(""),H=bt(""),se=bt(""),_e=bt(null),ve=bt(""),Ye=bt(""),Xe=N.trim(),Ie=Xe.length>0,xt=O.length>0,Lt=xt&&m&&!Ie,Wt=Ie,Kt=(Ie||xt&&!Lt)&&(s||!!(a!=null&&a.length)),Tt=Ie&&Kt,Mt=Tt&&!(a!=null&&a.length)&&l>0&&!!u,Pt=St(()=>{const Re=T.trim();if(!Re)return 60;const Oe=/["():]|^[@#$-]/.test(Re),Et=Re.split(/\s+/).filter(Boolean).length;return Oe||Et>1?180:240},[T]),zt=n??le,De=Re=>{const Oe=typeof Re=="function"?Re(zt):Re;n===void 0&&Q(Oe),r==null||r(Oe);},yt=St(()=>`twe_table_view_state_v2:${t||e}`,[e,t]),lt=St(()=>a!=null&&a.length||l>0?`${yt}:search-documents:${l||(a==null?void 0:a.length)||0}`:`${yt}:records:${o.length}`,[o.length,yt,l,a==null?void 0:a.length]),_t=St(()=>[...O].sort().join(","),[O]),Fe=St(()=>o.map((Re,Oe)=>oa(Re,Oe)),[o]),Ce=St(()=>{if(a!=null&&a.length){const Re=a[0],Oe=a[a.length-1];return [lt,"docs",a.length,(Re==null?void 0:Re.id)||"",(Re==null?void 0:Re.updated_at_ms)||"",(Oe==null?void 0:Oe.id)||"",(Oe==null?void 0:Oe.updated_at_ms)||""].join(":")}return Mt?[lt,"docs-stream",l].join(":"):[lt,"records",o.length,Fe[0]||"",Fe[Fe.length-1]||""].join(":")},[Fe,o.length,lt,l,a,Mt]),A=`${Ce}:${Xe}:${_t}`,x=St(()=>{const Re=new Map;return o.forEach((Oe,Et)=>{for(const at of Na(Oe,Et))Re.set(at,Oe);Re.set(Fe[Et]||`row-${Et}`,Oe);}),z.forEach((Oe,Et)=>{for(const at of Na(Oe,Et))Re.set(at,Oe);}),Re},[Fe,o,z]),R=bt(x);ot(()=>{R.current=x;},[x]),ot(()=>{He({kind:"viewer",name:"table-record-lookup-ids",value:x.size,tags:{title:e,viewStateKey:t||"",records:o.length,searchHydratedRecords:z.length}});},[x.size,o.length,z.length,e,t]),ot(()=>{ae([]),fe({key:"",ids:new Set}),ve.current="",Ye.current="",_e.current=null,X.current="",ne.current="";},[lt]);const B=St(()=>Tt?(a==null?void 0:a.map((Re,Oe)=>({id:Re.raw_ref_key||Re.entity_id||`search-doc-${Oe}`,record:ev(Re)})))??[]:[],[a,Tt]),V=St(()=>!Ie||Kt?[]:o.map((Re,Oe)=>({id:Fe[Oe]||`row-${Oe}`,record:bE(Re)})),[Ie,Fe,o,Kt]),ke=Kt?B:V,oe=bt(ke),Be=bt(O),Ue=bt(k);ot(()=>{He({kind:"search",name:"worker-corpus-candidates",value:ke.length,tags:{title:e,viewStateKey:t||"",source:Kt?"search-documents":"records",records:o.length,searchDocuments:(a==null?void 0:a.length)??0,searchDocumentTotalCount:l,searchDocumentsLoaded:s,searchDocumentsLoading:i,searchDocumentsBlocked:!!c}});},[o.length,a==null?void 0:a.length,l,c,s,i,Kt,e,t,ke.length]),ot(()=>{oe.current=ke;},[ke]),ot(()=>{!Ie||!h||c||s||i||a!=null&&a.length||h().catch(Re=>{He({kind:"search",name:"lazy-search-documents-error",tags:{error:Re instanceof Error?Re.message:String(Re)}});});},[xt,Ie,Lt,h,c,a==null?void 0:a.length,s,i]),ot(()=>{Be.current=O;},[O]),ot(()=>{Ue.current=k;},[k]);const tt=St(()=>{if(Lt||Ie||!xt||!(a!=null&&a.length))return [];const Re=new Set(O);return a.filter(Oe=>Oe.folder_id&&Re.has(Oe.folder_id)).sort((Oe,Et)=>{const at=Et.observed_at_ms||Et.created_at_ms||Et.updated_at_ms||0,$t=Oe.observed_at_ms||Oe.created_at_ms||Oe.updated_at_ms||0;return at!==$t?at-$t:(Et.raw_ref_key||Et.entity_id).localeCompare(Oe.raw_ref_key||Oe.entity_id)})},[Lt,xt,Ie,a,O]),ue=St(()=>tt.map(Re=>Re.raw_ref_key||Re.entity_id).filter(Boolean).slice(0,zl),[tt]),We=St(()=>{if(!ue.length)return "";const Re=ue[0]||"",Oe=ue[ue.length-1]||"";return `${lt}:folders:${_t}:${ue.length}:${Re}:${Oe}`},[ue,lt,_t]);ot(()=>{if(Ie||Lt||!xt||!ue.length||!k||ve.current===We||Ye.current===We)return;ve.current=We,fe(at=>at.key===We?at:{key:We,ids:new Set});let Re=false;const Oe=at=>{at.length&&ae($t=>{const Ct=new Set($t.flatMap((vt,ht)=>Na(vt,ht))),dt=at.filter((vt,ht)=>{const Xt=Na(vt,ht);return Xt.some(Qt=>Ct.has(Qt))?false:(Xt.forEach(Qt=>Ct.add(Qt)),true)});return dt.length?[...$t,...dt].slice(-zl):$t});};return (async()=>{const at=Ge();let $t=0;const Ct=ue.filter(dt=>!R.current.has(dt));for(let dt=0;dt<Ct.length&&!Re;dt+=Sd){const vt=Ct.slice(dt,dt+Sd),ht=await k(vt);if(Re||ve.current!==We)return;$t+=ht.length,fe(Xt=>{if(Xt.key!==We)return Xt;const Qt=new Set(Xt.ids);return vt.forEach(Ln=>Qt.add(Ln)),{key:We,ids:Qt}}),Oe(ht),await new Promise(Xt=>globalThis.setTimeout(Xt,0));}!Re&&ve.current===We&&(Ye.current=We,ve.current=""),He({kind:"viewer",name:"folder-result-hydrate",durationMs:Ge()-at,value:$t,tags:{selectedFolders:_t,totalMatches:ue.length,missingIds:Ct.length,batchSize:Sd}});})().catch(at=>{ve.current===We&&(ve.current=""),He({kind:"viewer",name:"folder-result-hydrate-error",tags:{error:at instanceof Error?at.message:String(at)}});}),()=>{Re=true,ve.current===We&&(ve.current="");}},[We,ue,Lt,xt,Ie,k,_t]),ot(()=>{const Re=new fE;return Pe.current=Re,()=>{Re.dispose(),Pe.current=null,H.current="";}},[]),ot(()=>{H.current="",se.current="";},[lt]),ot(()=>{const Re=Pe.current;if(!Ie||!(Re!=null&&Re.isAvailable())||!oe.current.length||H.current===Ce||se.current===Ce)return;let Oe=false;const Et=()=>{if(Oe||H.current===Ce)return;se.current=Ce;const $t=Ge(),Ct=Re.setCorpus(lt,oe.current);_e.current=Ct,Ct.then(dt=>{Oe||dt.type==="search:corpus-ready"&&(H.current=Ce,He({kind:"search",name:"corpus-warm-ready",durationMs:Ge()-$t,tags:{corpusSize:dt.corpusSize}}));}).catch(dt=>{Oe||He({kind:"search",name:"corpus-warm-error",durationMs:Ge()-$t,tags:{error:dt instanceof Error?dt.message:String(dt)}});}).finally(()=>{se.current===Ce&&(se.current=""),_e.current===Ct&&(_e.current=null);});},at=globalThis.setTimeout(Et,120);return ()=>{Oe=true,globalThis.clearTimeout(at);}},[Ce,Ie,lt]),ot(()=>{if(!Wt){X.current="",ne.current="",we(null);return}if(c){we({key:A,pending:false,phase:"degraded",result:_i(Xe,[c]),error:c}),na("search:large-corpus-blocked");return}const Re=Pe.current;if(h&&!s&&!(a!=null&&a.length)){we({key:A,pending:true,phase:"preparing-corpus",result:_i(Xe)});return}if(ne.current===A||X.current===A)return;X.current=A;const Oe=yE();it.current=Oe;const Et=Ge(),at=Xe;let $t=false;if(!(Re!=null&&Re.isAvailable())){if(o.length<=1500||!(a!=null&&a.length)){const vt=mg(o??[],at,{bookmarkFolderIds:Be.current});ne.current=A,X.current="";const ht=vt.records.map((Xt,Qt)=>xw(oa(Xt,Qt)));we({key:A,pending:false,phase:"unavailable",result:vt,resultIds:ht,error:"Search worker unavailable; used bounded main-thread fallback."});return}const dt=a!=null&&a.length?"Search worker unavailable; large-corpus indexed folder/search hydration was blocked.":"Search worker unavailable; large-corpus main-thread search was blocked.";we({key:A,pending:false,phase:"unavailable",result:_i(at,[dt]),error:dt}),X.current="",na("search:large-fallback-blocked");return}return we(dt=>({key:A,pending:true,phase:H.current===Ce?"querying":"preparing-corpus",result:(dt==null?void 0:dt.key)===A?dt.result:null})),(async()=>{if(H.current!==Ce){const dt=Ge();let vt=null;if(se.current===Ce&&_e.current)try{vt=await _e.current;}catch{vt=null;}if((!vt||vt.type!=="search:corpus-ready")&&Mt&&u){let ht=0;if(Re.beginCorpus({scopeKey:lt,requestId:Oe,expectedCount:l}),(await u({chunkSize:_E,isCancelled:()=>$t||it.current!==Oe,onChunk:(Qt,Ln)=>{if($t||it.current!==Oe)return;const mn=wE(Qt,ht);ht+=mn.length,Re.appendCorpus({scopeKey:lt,requestId:Oe,records:mn}),He({kind:"search",name:"chunked-corpus-transfer",value:Ln.loaded,tags:{totalCount:Ln.totalCount,chunkRows:mn.length,scopeKey:lt}});}})).cancelled||$t||it.current!==Oe){na("search:chunked-corpus-cancelled");return}vt=await Re.commitCorpus(lt,Oe);}if((!vt||vt.type!=="search:corpus-ready")&&(vt=await Re.setCorpus(lt,oe.current)),it.current!==Oe){na("search:stale-corpus-ignored");return}vt.type==="search:corpus-ready"&&(H.current=Ce,we(ht=>(ht==null?void 0:ht.key)===A?{...ht,pending:true,phase:"querying"}:ht),He({kind:"search",name:"corpus-ready",durationMs:Ge()-dt,tags:{corpusSize:vt.corpusSize}}));}return await Re.query({scopeKey:lt,query:at,options:{bookmarkFolderIds:Be.current,limit:vg},requestId:Oe})})().then(dt=>{if(!dt){X.current===A&&(X.current="");return}if(it.current!==Oe){X.current===A&&(X.current=""),na("search:stale-ignored");return}const vt=R.current,ht=dt.ids.map(mn=>vt.get(mn)).filter(mn=>!!mn);we({key:A,pending:false,phase:"ready",result:{...dt.result,records:ht},resultIds:dt.ids}),ne.current=A,X.current===A&&(X.current="");const Xt=Ie?vg:zl,Qt=Ue.current,Ln=Qt?dt.ids.filter(mn=>!vt.has(mn)).slice(0,Xt):[];if(Ln.length){const mn=Ge();Qt==null||Qt(Ln).then(Gt=>{if(it.current!==Oe)return;const dn=new Map(R.current);Gt.forEach((nn,Mn)=>{for(const In of Na(nn,Mn))dn.set(In,nn);}),ae(nn=>{const Mn=new Set(nn.flatMap((to,bo)=>Na(to,bo))),In=Gt.filter((to,bo)=>{const Er=Na(to,bo);return Er.some(No=>Mn.has(No))?false:(Er.forEach(No=>Mn.add(No)),true)});return In.length?[...nn,...In].slice(-zl):nn});const an=dt.ids.map(nn=>dn.get(nn)).filter(nn=>!!nn);we({key:A,pending:false,phase:"ready",result:{...dt.result,records:an},resultIds:dt.ids}),He({kind:"viewer",name:"search-result-hydrate",durationMs:Ge()-mn,value:Gt.length,tags:{missingIds:Ln.length,resultCount:dt.ids.length}});}).catch(Gt=>{He({kind:"viewer",name:"search-result-hydrate-error",durationMs:Ge()-mn,tags:{error:Gt instanceof Error?Gt.message:String(Gt)}});});}He({kind:"search",name:"query-total",durationMs:Ge()-Et,tags:{corpusSize:dt.corpusSize,resultCount:dt.ids.length,queryLength:at.length}});}).catch(dt=>{if(it.current!==Oe)return;const vt=dt instanceof Error?dt.message:String(dt);we({key:A,pending:false,phase:/cancelled/i.test(vt)?"cancelled":"failed",result:_i(at,[vt]),error:vt}),X.current===A&&(X.current=""),He({kind:"search",name:"query-error",durationMs:Ge()-Et,tags:{error:vt,queryLength:at.length}});}),()=>{$t=true;const dt=X.current===A;dt&&(X.current=""),Re.cancel(Oe),dt&&He({kind:"search",name:"readiness-state",value:1,tags:{phase:"cancelled",queryLength:Xe.length,corpusRows:oe.current.length,searchDocuments:(a==null?void 0:a.length)??0,searchDocumentsLoaded:s,searchDocumentsLoading:i,cancellable:false}}),we(vt=>(vt==null?void 0:vt.key)===A&&vt.pending?{...vt,pending:false,phase:"cancelled",result:vt.result??_i(Xe),error:"Search request cancelled."}:vt);}},[A,Ie,Wt,Xe,Ce,lt,u,l,a==null?void 0:a.length,s,i,c,Mt]);const he=St(()=>{if(!Ie&&Lt)return kg({query:"",records:o??[],totalMatches:(o==null?void 0:o.length)??0});if(!Ie&&xt&&(a!=null&&a.length)){const Re=Le.key===We?Le.ids:new Set,Oe=qM(ue,x,Re);return kg({query:"",records:Oe,totalMatches:tt.length})}return Wt?(pe==null?void 0:pe.key)===A&&pe.result?pe.result:_i(Xe):mg(o??[],"",{bookmarkFolderIds:O})},[A,pe,ue,tt.length,Le,We,Lt,xt,Ie,Wt,Xe,x,o,a==null?void 0:a.length,O]),Me=!!(Wt&&(pe==null?void 0:pe.key)===A&&pe.pending),je=Ie&&(pe==null?void 0:pe.key)===A?pe.resultIds??[]:[],At=St(()=>{if(!Ie||L.length||!k||!b||!je.length)return;const Re=nw({extensionName:g&&"extensionName"in g&&typeof g.extensionName=="string"&&g.extensionName?g.extensionName:e,entityType:b,query:Xe,ids:je,totalCount:je.length,folderIds:O,hydrateByIds:k});return ()=>Re.streamRows()},[Ie,k,Xe,b,g,je,O,L.length,e]),K=(pe==null?void 0:pe.key)===A?pe:null,Ve=St(()=>Ie?K!=null&&K.phase?{phase:K.phase,label:yi(K.phase),detail:K.error,cancellable:K.pending&&(K.phase==="preparing-corpus"||K.phase==="querying")}:c?{phase:"degraded",label:yi("degraded"),detail:c,cancellable:false}:h&&!s&&!(a!=null&&a.length)?{phase:"preparing-corpus",label:yi("preparing-corpus"),detail:i?"loading search documents":"waiting for search corpus",cancellable:true}:H.current===Ce?{phase:"ready",label:yi("ready"),cancellable:false}:{phase:"preparing-corpus",label:yi("preparing-corpus"),cancellable:true}:{phase:"idle",label:yi("idle"),cancellable:false},[Ce,K,Ie,h,a==null?void 0:a.length,c,s,i]);ot(()=>{He({kind:"search",name:"readiness-state",value:Ie?1:0,tags:{phase:Ve.phase,queryLength:Xe.length,corpusRows:ke.length,searchDocuments:(a==null?void 0:a.length)??0,searchDocumentsLoaded:s,searchDocumentsLoading:i,cancellable:Ve.cancellable}});},[Ie,Xe.length,a==null?void 0:a.length,s,i,Ve.cancellable,Ve.phase,ke.length]);const Dt=St(()=>{const Re=Qw(S),Oe=new Map;for(const Et of Re){const at=pE(Et);at&&Oe.set(at,Et);}return Oe},[S]),Ee=St(()=>{if(!L.length)return Ie||xt&&(a!=null&&a.length)?he.records:[...he.records].sort((Et,at)=>{const $t=wg(at),Ct=wg(Et);return $t!==Ct?$t-Ct:0});const Re=new Map;he.records.forEach((Et,at)=>{Re.set(Et,at);});const Oe=[...he.records];return Oe.sort((Et,at)=>{const $t=Re.get(Et)??0,Ct=Re.get(at)??0;for(const dt of L){const vt=Dt.get(dt.id);if(!vt)continue;const ht=bg(vt,Et,$t),Xt=bg(vt,at,Ct),Qt=hE(ht,Xt);if(Qt!==0)return dt.desc?-Qt:Qt}return $t-Ct}),Oe},[Ie,he.records,Dt,L]),Ne=St(()=>Ee.map((Re,Oe)=>oa(Re,Oe)),[Ee]),nt=!!g&&!Ie&&!L.length&&(!xt||Lt),qe=Re=>{const Oe=Eo(Re,E);if(v(Oe),!Ne.length)return;const Et=Ne.every(at=>!!Oe[at]);G(Et?"all":"explicit");},ct=St(()=>xe==="all"?[]:Ee.filter((Re,Oe)=>{const Et=oa(Re,Oe);return !!E[Et]}),[E,xe,Ee]),jt=St(()=>xe==="all"?[]:Object.entries(E).filter(([,Re])=>Re).map(([Re])=>Re),[E,xe]),ln=St(()=>zM({queryText:Xe,sort:VM(L),ids:nt?[]:Ne,idsTruncated:nt?Ne.length>0:false,sourceDescriptor:nt?g:void 0,totalMatches:nt?y??he.totalMatches:he.totalMatches,warnings:he.warnings}),[Ne,nt,Xe,g,y,he.totalMatches,he.warnings,L]);return ot(()=>{const Re=globalThis.setTimeout(()=>{I(T);},Pt);return ()=>{globalThis.clearTimeout(Re);}},[Pt,T]),ot(()=>{if(!(M!=null&&M.length)&&ce!=="table"){me("table");return}ce!=="table"&&!(M!=null&&M.some(Re=>Re.id===ce))&&me("table");},[ce,M]),ot(()=>{try{if(typeof localStorage>"u")return;const Re=localStorage.getItem(yt);if(!Re)return;const Oe=JSON.parse(Re);n===void 0&&typeof Oe.fullscreen=="boolean"&&Q(Oe.fullscreen),typeof Oe.activeViewId=="string"&&Oe.activeViewId.trim()&&me(Oe.activeViewId);}catch{}},[yt]),ot(()=>{try{if(typeof localStorage>"u")return;localStorage.setItem(yt,JSON.stringify({fullscreen:zt,activeViewId:ce}));}catch{}},[ce,zt,yt]),{searchQuery:T,setSearchQuery:P,normalizedSearchQuery:Xe,selectedFolders:O,setSelectedFolders:U,rowSelection:E,setRowSelection:v,sorting:L,setSorting:$,selectionMode:xe,setSelectionMode:G,isFullscreen:zt,setIsFullscreen:De,activeViewId:ce,setActiveViewId:me,searchResult:he,searchPending:Me,searchReadinessState:Ve,sortedRecords:Ee,currentResultIds:Ne,handleRowSelectionChange:qe,selectedRecords:ct,selectedRecordIds:jt,streamSearchResultRows:At,resultSetSnapshot:ln,resolvedViewStateKey:yt}}const Fa=12,xg=74,kE=4,Kl=1600,Sg=90,xE=24,Ef=2500,SE=2,CE=96,TE=140,Cg=1e4,ME="data-twe-highlight-v1",IE="scrollmark-table-search-",Tg="scrollmark_media_preview_dock_after_close_v1",Af=new WeakMap;let Mg=0;function RE(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e),t.normalize();}}function Df(e){const t=Af.get(e),n=tv();t&&n&&(n.delete(t),DE(t)),e.querySelectorAll(`mark[${ME}="1"]`).forEach(o=>{o instanceof HTMLElement&&RE(o);});}function tv(){const e=globalThis.CSS,t=nv();return !(e!=null&&e.highlights)||!t?null:e.highlights}function nv(){const e=globalThis.Highlight;return typeof e=="function"?e:null}function EE(e){const t=Af.get(e);if(t)return Ig(t),t;Mg+=1;const n=`${IE}${Mg}`;return Af.set(e,n),Ig(n),n}function AE(e="sm"){switch(e){case "md":return "hidden md:inline";case "lg":return "hidden lg:inline";case "xl":return "hidden xl:inline";case "sm":default:return "hidden sm:inline"}}function Ig(e){if(typeof document>"u")return;const t=`twe-css-highlight-style-${e}`;if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=`
::highlight(${e}) {
background-color: rgba(250, 204, 21, 0.32);
color: inherit;
}
`,document.head.appendChild(n);}function DE(e){var t;typeof document>"u"||(t=document.getElementById(`twe-css-highlight-style-${e}`))==null||t.remove();}function PE(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function OE(e,t){if(Df(e),!t.length)return;const n=[...new Set(t.map(c=>c.trim().toLowerCase()))].filter(c=>c.length>=2).sort((c,h)=>h.length-c.length).slice(0,24);if(!n.length)return;const r=tv(),o=nv();if(!r||!o)return;const a=new RegExp(`(${n.map(c=>PE(c)).join("|")})`,"ig"),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:c=>{if(!c.nodeValue||!c.nodeValue.trim())return NodeFilter.FILTER_REJECT;const h=c.parentElement;return !h||h.closest("mark,button,input,textarea,select,option,svg,code,pre,.btn,.checkbox,.label,.dropdown-content")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),s=[];for(;i.nextNode();)s.push(i.currentNode);const l=[];for(const c of s){const h=c.nodeValue||"";a.lastIndex=0,a.test(h)&&(a.lastIndex=0,h.replace(a,(u,m,g)=>{const y=document.createRange();return y.setStart(c,g),y.setEnd(c,g+u.length),l.push(y),u}));}l.length&&r.set(EE(e),new o(...l));}function Rg(e,t){if(t<=0||e.length<=1)return 0;let n=0,r=e.length-1;for(;n<r;){const o=Math.floor((n+r+1)/2);(e[o]||0)<=t?n=o:r=o-1;}return Math.max(0,Math.min(e.length-2,n))}function LE(e){if(e.size<=Ef)return;const t=[...e.entries()].sort((n,r)=>n[1].touchedAt-r[1].touchedAt);for(const[n]of t.slice(0,e.size-Ef))e.delete(n);}function Zs({title:e,viewStateKey:t,searchHistoryScope:n,fullscreen:r,onFullscreenChange:o,loading:a=false,loadingMore:i=false,loadedCount:s=0,totalCount:l=0,hasMore:c=false,sourceMode:h=false,sourceModeFiltersActive:u=false,sourceWindowStartIndex:m=0,resultSourceDescriptor:g,resultEntityType:y,onSourceWindowChange:b,streamSourceRows:k,streamMediaRows:S,mediaSourceKey:M,mediaSourceTotalCount:T,getMediaWindow:P,onBookmarkFolderSelectionChange:N,loadMore:I,loadAll:O,hydrateRecordsByIds:U,records:E,searchDocuments:v,searchDocumentsLoading:L,searchDocumentsLoaded:$,searchDocumentTotalCount:xe,searchDocumentsBlockedReason:G,loadSearchDocuments:le,loadSearchDocumentChunks:Q,columns:ce,clear:me,showClearButton:pe=true,renderActions:we,renderExtra:z,bookmarkFolderOptions:ae,alternateViews:Le}){const{t:fe}=er(),Pe=bt(Ge()),it=bt(false),X=bt(false),ne=bt(false),[H,se]=xn(""),[_e,ve]=xn(false),[Ye,Xe]=$e(()=>{try{return localStorage.getItem(Tg)==="1"}catch{return false}}),[Ie,xt]=xn(null);ot(()=>{try{localStorage.setItem(Tg,Ye?"1":"0");}catch{}},[Ye]);const Lt=qn(()=>{ve(false),Ye||se("");},[Ye,se,ve]),[Wt,Kt]=Tr(false),[Tt,Mt]=$e(0),{searchQuery:Pt,setSearchQuery:zt,normalizedSearchQuery:De,selectedFolders:yt,setSelectedFolders:lt,rowSelection:_t,setRowSelection:Fe,sorting:Ce,setSorting:A,selectionMode:x,setSelectionMode:R,isFullscreen:B,setIsFullscreen:V,activeViewId:ke,setActiveViewId:oe,searchResult:Be,searchPending:Ue,searchReadinessState:tt,sortedRecords:ue,currentResultIds:We,handleRowSelectionChange:he,selectedRecords:Me,selectedRecordIds:je,streamSearchResultRows:At,resultSetSnapshot:K,resolvedViewStateKey:Ve}=vE({title:e,viewStateKey:t,fullscreen:r,onFullscreenChange:o,records:E,columns:ce,alternateViews:Le,searchDocuments:v,searchDocumentsLoading:L,searchDocumentsLoaded:$,searchDocumentTotalCount:xe,searchDocumentsBlockedReason:G,loadSearchDocuments:le,loadSearchDocumentChunks:Q,hydrateRecordsByIds:U,folderScopeSourceBacked:u,resultSourceDescriptor:g,resultEntityType:y,resultSourceTotalCount:l}),Dt=St(()=>{const Se=new Map;for(const wt of iI){const Bt=Se.get(wt.category)||[];Bt.push(wt),Se.set(wt.category,Bt);}return [...Se.entries()]},[]),Ee=St(()=>(Le==null?void 0:Le.find(Se=>Se.id===ke))??null,[ke,Le]),Ne=!Ee,[nt,qe]=$e(null),ct=qn(Se=>{qe(Se);},[]);ot(()=>{qe(null);},[Ee==null?void 0:Ee.id,De]);const jt=!!Ee&&h&&l>Cg&&(Ee==null?void 0:Ee.sourceBacked)!==true&&!De,ln=!!(Ee&&De),Re=ln?false:h,Oe=ln?ue.length:l,Et=ln?void 0:k,at=ln?void 0:M,$t=ln?void 0:T,Ct=ln?void 0:P,dt=ln?void 0:S,vt=Se=>{N==null||N(Se),lt(Se);};ot(()=>{N==null||N(yt);},[N,yt]);const ht=St(()=>({title:e,viewStateKey:t||"",resolvedViewStateKey:Ve,activeViewId:ke,fullscreen:B}),[ke,B,Ve,e,t]);ot(()=>{He({kind:"viewer",name:"table-open-start",value:l,tags:{...ht,loadedCount:s,totalCount:l,searchDocuments:(v==null?void 0:v.length)??0}});},[]);const Xt=bt(null),Qt=bt(null),Ln=bt(0),mn=bt(0),Gt=bt(null),dn=bt(new Map),an=bt(false),[nn,Mn]=$e(0),[In,to]=$e(520),[bo,Er]=$e(xg),[No,ti]=$e(0);ot(()=>{const Se=Xt.current;Se&&(Se.scrollTop=0,Ln.current=0,Mn(0),to(Math.max(320,Se.clientHeight||520)));},[ke,De,yt]);const dl=()=>{const Se=Xt.current;Se&&(mn.current=Ge(),Ln.current=Se.scrollTop,Gt.current===null&&(Gt.current=window.requestAnimationFrame(()=>{Gt.current=null;const wt=Ln.current;Mn(Bt=>Math.abs(wt-Bt)<xE?Bt:wt);})));};ot(()=>{const Se=Xt.current;if(!Se||typeof ResizeObserver>"u")return;const wt=new ResizeObserver(()=>{const Bt=Math.max(320,Se.clientHeight||520);to(zr=>Math.abs(zr-Bt)>12?Bt:zr);});return wt.observe(Se),()=>wt.disconnect()},[]),ot(()=>()=>{Gt.current!==null&&window.cancelAnimationFrame(Gt.current);},[]);const Rt=Math.max(32,bo||xg),Ji=h&&!De&&(!yt.length||u)&&!Ee,ni=Ji&&l>E.length,cn=Ji&&!Ce.length,kt=cn?Math.max(l,E.length):ue.length,wo=We,qr=St(()=>{var wt;if(cn)return [];const Se=new Array(kt+1);Se[0]=0;for(let Bt=0;Bt<kt;Bt+=1){const zr=wo[Bt]||`row-${Bt}`,Ho=((wt=dn.current.get(zr))==null?void 0:wt.height)||Rt;Se[Bt+1]=(Se[Bt]||0)+Math.max(24,Ho);}return Se},[No,wo,Rt,cn,kt]),kr=cn?kt*Rt:qr[kt]||0,Kn=cn?Math.max(0,Math.floor(Math.max(0,nn-Kl)/Rt)-Fa):Math.max(0,Rg(qr,nn-Kl)-Fa),Xi=cn?Math.ceil((nn+In+Kl)/Rt)+Fa+1:Rg(qr,nn+In+Kl)+Fa+1,Un=Math.min(kt,Math.max(Kn+1,Math.min(Xi,Kn+Sg))),Zi=m+E.length,no=cn?Math.max(m,Math.min(Kn,Zi)):Kn,Qi=cn?Math.max(no,Math.min(Un,Zi,kt)):Un,gr=St(()=>{if(cn){const Se=Math.max(0,no-m),wt=Math.max(Se,Qi-m);return E.slice(Se,wt)}return ue.slice(Kn,Un)},[Un,E,ue,cn,Qi,no,m,Kn]);ot(()=>{if(!cn||!b)return;const Se=Math.max(0,Kn-Fa),wt=Math.min(kt,Un+Fa);b(Se,wt);},[Un,b,cn,Kn,kt]),ot(()=>{if(cn||!c||a||i||Ee||De)return;const Se=Math.max(0,kr-(nn+In)),wt=Math.max(900,In*kE,Rt*80);kt>0&&(Un>=kt-Fa||Se<=wt)&&(I==null||I());},[Ee,Un,c,I,a,i,De,Rt,kr,kt,nn,In]);const Fo=cn&&i&&kt>0&&gr.length===0,$o=Fo?Kn:cn?no:Kn,Zt=cn?Fo?Un:Math.min(kt,no+gr.length):Un,ka=St(()=>x==="all"?Object.entries(_t).filter(([,Se])=>Se).map(([Se])=>Se):[],[_t,x]),Bo=ka.length,es=x==="all"?Math.max(0,kt-Bo):je.length,lr=St(()=>{if(x!=="explicit"||!je.length||!U||!g||!y)return;const Se=je.map(Bt=>xw(Bt)).filter(Bt=>Bt.length>0);if(!Se.length)return;const wt=tw({extensionName:"extensionName"in g?g.extensionName:void 0,entityType:y,ids:Se,source:g,hydrateByIds:U});return ()=>wt.streamRows()},[U,y,g,je,x]),vo=cn?$o*Rt:qr[Kn]||0,xa=Fo?Math.max(Rt,Math.max(1,Zt-$o)*Rt):0,Vr=Math.max(0,kr-(cn?Zt*Rt:qr[Un]||kr));ot(()=>{!ni||!Ce.length||(A([]),He({kind:"viewer",name:"source-sort-cleared",value:l,tags:ht}));},[ht,A,Ce.length,ni,l]);const fl=Se=>{if(x==="all"){Fe(wt=>{const Bt={...wt};return Bt[Se]?delete Bt[Se]:Bt[Se]=true,He({kind:"viewer",name:"selection-all-exception-toggle",value:Object.keys(Bt).length,tags:{...ht,totalRows:kt,rowId:Se}}),Bt}),He({kind:"viewer",name:"selection-mode-retained-all",value:Math.max(0,kt-1),tags:{...ht,totalRows:kt,rowId:Se}});return}he(wt=>({...wt,[Se]:!wt[Se]}));},hl=()=>{if(x==="all"){if(Bo>0){Fe({}),He({kind:"viewer",name:"selection-all-exceptions-cleared",value:kt,tags:ht});return}R("explicit"),Fe({}),He({kind:"viewer",name:"selection-all-cleared",value:0,tags:ht});return}if(We.length>0&&We.every(wt=>!!_t[wt])){Fe({}),He({kind:"viewer",name:"selection-explicit-visible-cleared",value:0,tags:ht});return}R("all"),Fe({}),He({kind:"viewer",name:"selection-explicit-promoted-all",value:kt,tags:ht});},fn=sR({data:gr,columns:ce,defaultColumn:{size:160,minSize:48,maxSize:520},enableRowSelection:true,getCoreRowModel:aR(),getRowId:(Se,wt)=>oa(Se,$o+wt),enableSorting:!ni,manualSorting:true,onSortingChange:A,onRowSelectionChange:he,state:{rowSelection:_t,sorting:Ce},meta:{mediaPreview:H,setMediaPreview:Se=>{se(Se),ve(true);},rawDataPreview:Ie,setRawDataPreview:Se=>xt(Se),isAllResultRowsSelected:()=>x==="all"?We.length>0&&Bo===0:We.length>0&&We.every(Se=>!!_t[Se]),isSomeResultRowsSelected:()=>x==="all"?Bo>0:We.some(Se=>!!_t[Se]),toggleAllResultRowsSelected:hl,isResultRowSelected:Se=>x==="all"?!_t[Se]:!!_t[Se],toggleResultRowSelected:fl}}),sn=fn.getRowModel().rows,Uo=fn.getVisibleLeafColumns(),Sa=Uo.reduce((Se,wt)=>Se+wt.getSize(),0);ot(()=>{it.current||!sn.length||(it.current=true,He({kind:"viewer",name:"first-visible-rows",durationMs:Ge()-Pe.current,value:sn.length,tags:{...ht,hydratedRecords:E.length,totalRows:kt,loadedCount:s,totalCount:l,searchDocuments:(v==null?void 0:v.length)??0,visibleRows:sn.length,loading:a}}));},[s,a,ht,E.length,v==null?void 0:v.length,l,kt,sn.length]),ot(()=>{X.current||a||!sn.length||(X.current=true,He({kind:"viewer",name:"first-interactive",durationMs:Ge()-Pe.current,value:sn.length,tags:{...ht,hydratedRecords:E.length,loadedCount:s,totalCount:l,totalRows:kt,visibleRows:sn.length}}));},[s,a,ht,E.length,l,kt,sn.length]),ot(()=>{if(ne.current||a||i||!sn.length)return;const Se=globalThis.setTimeout(()=>{ne.current||(ne.current=true,He({kind:"viewer",name:"first-stable-layout",durationMs:Ge()-Pe.current,value:sn.length,tags:{...ht,hydratedRecords:E.length,loadedCount:s,totalCount:l,totalRows:kt,visibleRows:sn.length,safeRowHeight:Rt,measuredRows:dn.current.size,virtualHeight:kr}}));},350);return ()=>globalThis.clearTimeout(Se)},[s,a,i,ht,E.length,Rt,l,kt,kr,sn.length]),ot(()=>{He({kind:"viewer",name:"table-hydrated-records",value:E.length,tags:ht}),He({kind:"viewer",name:"table-search-documents",value:(v==null?void 0:v.length)??0,tags:ht}),He({kind:"viewer",name:"table-result-ids",value:We.length,tags:ht}),He({kind:"viewer",name:"table-selected-records",value:Me.length,tags:{...ht,selectionMode:x}}),He({kind:"viewer",name:"table-selection-exceptions",value:Bo,tags:{...ht,selectionMode:x}}),He({kind:"viewer",name:"table-selected-result-count",value:es,tags:{...ht,selectionMode:x}}),He({kind:"viewer",name:"table-visible-rows",value:sn.length,tags:{...ht,startIndex:Kn,endIndex:Un}});},[We.length,Un,ht,E.length,v==null?void 0:v.length,Me.length,es,Bo,x,Kn,sn.length]),ot(()=>{const Se=()=>{const zr=Qt.current;if(!zr)return;const Ho=zr.querySelectorAll('tr[data-vrow="1"]');if(!Ho.length)return;let Ia=0,qo=0,ri=false;Ho.forEach(Kr=>{if(Kr instanceof HTMLTableRowElement){const Ar=Kr.getBoundingClientRect().height;Ia+=Ar,qo+=1;const Ra=Kr.dataset.vrowKey;if(Ra&&Number.isFinite(Ar)&&Ar>0){const Vo=dn.current.get(Ra),oi=(Vo==null?void 0:Vo.height)??Rt,ai=Ar-oi;!Vo||Math.abs(ai)>SE?(dn.current.set(Ra,{height:Ar,touchedAt:Ge()}),LE(dn.current),ri=true):Vo.touchedAt=Ge();}}});const rs=Ia/qo;(dn.current.size<CE||nn<In*2||kt<=Sg)&&Number.isFinite(rs)&&rs>16&&Er(Kr=>{const Ar=Math.max(24,Kr*.92+rs*.08);return Math.abs(Ar-Kr)>4?Ar:Kr}),ri&&(ti(Kr=>Kr+1),He({kind:"viewer",name:"table-row-height-cache",value:dn.current.size,tags:{...ht,limit:Ef,measuredRows:qo,visibleRows:sn.length}}));},wt=Math.max(0,TE-(Ge()-mn.current)),Bt=globalThis.setTimeout(Se,wt);return ()=>globalThis.clearTimeout(Bt)},[Un,ht,De,Rt,yt,Kn,kt,In,nn,sn]),ot(()=>{const Se=Qt.current;if(Se){if(!Be.highlightTerms.length){an.current&&(Df(Se),an.current=false);return}return an.current=true,OE(Se,Be.highlightTerms),()=>{Df(Se);}}},[sn,Be.highlightTerms]),ot(()=>{if(!B)return;const Se=wt=>{wt.key==="Escape"&&V(false);};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[B]);const Ca=bt(""),Yn=bt(null);ot(()=>{!n||typeof localStorage>"u"||Mt(kh(n).length);},[n]),ot(()=>{if(!n)return;if(!De){Ca.current="";return}const Se=[...yt].sort().join(","),wt=`${n}::${De}::${Se}`;if(Ca.current===wt)return;Ca.current=wt;const Bt=()=>{const zr=bI({scope:n,title:e,query:Pt,normalized_query:De,searched_at_ms:Date.now(),result_count:Be.totalMatches,total_records:E.length,selected_folders:yt,lexical_expression:Be.parsed.lexicalExpression,warning_messages:Be.warnings});Mt(zr.filter(Ho=>Ho.scope===n).length);};return typeof window<"u"&&"requestIdleCallback"in window&&typeof window.requestIdleCallback=="function"?Yn.current=window.requestIdleCallback(()=>{Yn.current=null,Bt();}):Yn.current=window.setTimeout(()=>{Yn.current=null,Bt();},160),()=>{Yn.current!==null&&(typeof window<"u"&&"cancelIdleCallback"in window&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(Yn.current):window.clearTimeout(Yn.current),Yn.current=null);}},[E.length,n,Pt,Be.parsed.lexicalExpression,Be.totalMatches,Be.warnings,De,yt,e]),ot(()=>{if(!B||typeof document>"u")return;const{body:Se}=document,wt=Se.style.overflow;return Se.style.overflow="hidden",()=>{Se.style.overflow=wt;}},[B]);const[fu,xr]=Tr(),[jo,ts]=$e(false),ns=()=>{xr(),c&&!De&&O&&!jo&&(ts(true),O().finally(()=>{ts(false);}));},Ta=B?"relative flex min-h-0 grow flex-col overflow-hidden bg-base-100 text-base-content":"relative flex min-h-0 grow flex-col",Ma=Ee==null?void 0:Ee.component;return f("div",{class:Ta,children:[f("section",{class:B?"sticky top-0 z-20 border-b border-base-300 bg-base-100 px-3 py-2":"sticky top-0 z-20 mb-1.5 rounded-box-half border border-base-300 bg-base-200 px-2 py-1.5",children:[f("div",{class:"flex items-center gap-2",children:[f("label",{class:"input input-bordered input-sm flex h-9 flex-1 items-center gap-2",children:[f(Ak,{size:18,class:"opacity-70"}),f("input",{type:"text",class:"grow bg-transparent text-sm",value:Pt,placeholder:fe('Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)'),onInput:Se=>zt(Se.target.value),onKeyDown:Se=>{Se.key==="Escape"&&zt("");}}),Pt?f("button",{class:"btn btn-ghost btn-xs",title:fe("Clear search"),onClick:()=>zt(""),children:f(uc,{size:14})}):null]}),ae!=null&&ae.length?f(Ky,{class:"w-56",options:ae,selected:yt,onChange:vt,placeholder:fe("Bookmark folders"),selectedSummary:Se=>Se===1?fe("1 folder selected"):fe("{{count}} folders selected",{count:Se})}):null,f("button",{class:"btn btn-ghost btn-sm",onClick:Kt,title:fe("Search help"),children:f(Z_,{size:18})}),Le!=null&&Le.length?f("div",{class:"join",children:[f("button",{class:`btn join-item btn-sm ${ke==="table"?"btn-primary":"btn-ghost"}`,onClick:()=>oe("table"),title:fe("Table view"),children:f(Xl,{size:16})}),Le.map(Se=>{const wt=h&&l>Cg&&Se.sourceBacked!==true&&!De;return f("button",{class:`btn join-item btn-sm ${ke===Se.id?"btn-primary":"btn-ghost"} ${wt?"btn-disabled":""}`,onClick:()=>oe(Se.id),disabled:wt,title:wt?fe("{{view}} is disabled for large source-backed result sets.",{view:Se.label}):fe(Se.label),children:Se.icon==="grid"?f(Ik,{size:16}):f(Xl,{size:16})},Se.id)})]}):null,f("button",{class:"btn btn-ghost btn-sm",onClick:()=>V(Se=>!Se),title:fe(B?"Exit fullscreen":"Fullscreen"),children:B?f(bk,{size:18}):f(yk,{size:18})})]}),De?f("div",{class:"mt-1.5 space-y-1 text-[10px] leading-4",children:[tt.phase!=="idle"?f("div",{class:`font-mono ${tt.phase==="degraded"||tt.phase==="failed"?"text-warning":"opacity-70"}`,children:[tt.label,tt.cancellable?" - cancellable on query change":""]}):null,Be.parsed.lexicalExpression?f("div",{class:"font-mono opacity-70 break-all",children:["parsed: ",Be.parsed.lexicalExpression]}):null,Be.warningObjects.length?f("div",{class:"rounded-box-half border border-warning/40 bg-warning/10 px-2 py-1 font-mono text-warning",children:Be.warningObjects.map((Se,wt)=>f("div",{children:["[",Se.code,"] ",Se.message,Se.token?` (${Se.token})`:""]},`search-warning-${wt}`))}):null]}):null,f("div",{class:"mt-1 flex min-w-0 items-center justify-between gap-3 overflow-hidden whitespace-nowrap text-[10px] leading-4 font-mono opacity-70",children:[f("span",{class:"min-w-0 flex-1 truncate",children:[Ee?nt!=null&&nt.primary?fe("{{view}} view - {{status}}",{view:fe(Ee.label),status:nt.primary}):fe("{{view}} view",{view:fe(Ee.label)}):a?fe("loading {{loaded}}/{{total}}",{loaded:s,total:Math.max(l,E.length)}):De?Ue?fe("searching {{matches}}/{{total}}",{matches:Be.totalMatches,total:E.length}):fe("matches {{matches}}/{{total}}",{matches:Be.totalMatches,total:E.length}):c||l>E.length?fe("rows {{loaded}}/{{total}}",{loaded:E.length,total:Math.max(l,E.length)}):fe("rows {{count}}",{count:E.length}),!Ee&&!De&&i?` ${fe("buffering...")}`:""]}),f("div",{class:"flex shrink-0 items-center gap-3 overflow-hidden whitespace-nowrap",children:Ee?f(sr,{children:[((nt==null?void 0:nt.details)??[]).map(Se=>f("span",{class:AE(Se.minWidth),children:Se.label},Se.key)),nt!=null&&nt.actions?f("span",{class:"shrink-0",children:nt.actions}):null]}):f(sr,{children:[n?f("span",{class:"hidden lg:inline",children:fe("history {{count}}",{count:Tt})}):null,f("span",{class:"hidden md:inline",children:fe("selected {{count}} ({{mode}})",{count:es,mode:fe(x)})}),Ne?f("span",{class:"hidden sm:inline",children:fe("rendered {{rendered}}/{{total}} (window {{start}}-{{end}})",{rendered:Fo?0:sn.length,total:kt,start:$o+1,end:Zt||0})}):null]})})]})]}),f("main",{ref:Xt,onScroll:dl,class:"max-w-full min-h-0 grow overflow-y-auto overflow-x-auto bg-base-200 overscroll-none rounded-box-half border border-base-300",children:Ma&&jt?f("div",{class:"flex h-[320px] flex-col items-center justify-center gap-3 px-4 text-center text-sm",children:[f("div",{class:"max-w-md opacity-70",children:[Ee==null?void 0:Ee.label," is available after narrowing the result set or switching back to table mode."]}),f("button",{class:"btn btn-sm btn-primary",onClick:()=>oe("table"),children:[f(Xl,{size:16}),"Table"]})]}):Ma?f(Ma,{records:ue,scrollParentRef:Xt,storageKey:`${Ve}:${(Ee==null?void 0:Ee.id)||"table"}`,fullscreen:B,sourceMode:Re,sourceTotalCount:Oe,streamSourceRows:Et,mediaSourceKey:at,mediaSourceTotalCount:$t,getMediaWindow:Ct,streamMediaRows:dt,onDiagnosticsChange:ct,onOpenMedia:Se=>{se(Se),ve(true);}}):f(sr,{children:[f("table",{class:"table table-fixed table-pin-rows table-border-bc table-padding-sm",style:{width:`max(${Sa}px, 100%)`},children:[f("colgroup",{children:Uo.map(Se=>f("col",{style:{width:`${Se.getSize()}px`}},Se.id))}),f("thead",{children:fn.getHeaderGroups().map(Se=>f("tr",{children:Se.headers.map(wt=>f("th",{className:wt.column.getCanSort()?"cursor-pointer select-none":"",onClick:wt.column.getToggleSortingHandler(),children:[ng(wt.column.columnDef.header,wt.getContext()),wt.column.getIsSorted()==="asc"&&f(Pk,{size:15,class:"inline align-top ml-1"}),wt.column.getIsSorted()==="desc"&&f(Ok,{size:15,class:"inline align-top ml-1"})]},wt.id))},Se.id))}),f("tbody",{ref:Qt,children:[vo>0?f("tr",{"aria-hidden":"true",children:f("td",{colSpan:Math.max(1,fn.getVisibleFlatColumns().length),style:{height:`${vo}px`,padding:0,border:0}})}):null,sn.map((Se,wt)=>f("tr",{"data-vrow":"1","data-vrow-key":wo[cn?Math.max(0,$o-m)+wt:$o+wt]||Se.id,children:Se.getVisibleCells().map(Bt=>f("td",{class:"scrollmark-table-cell",children:f("div",{class:"scrollmark-table-cell-content",children:ng(Bt.column.columnDef.cell,Bt.getContext())})},Bt.id))},Se.id)),xa>0?f("tr",{"aria-hidden":"true","data-source-buffering-window":"1",children:f("td",{colSpan:Math.max(1,fn.getVisibleFlatColumns().length),style:{height:`${xa}px`,padding:0,border:0}})}):null,Vr>0?f("tr",{"aria-hidden":"true",children:f("td",{colSpan:Math.max(1,fn.getVisibleFlatColumns().length),style:{height:`${Vr}px`,padding:0,border:0}})}):null]})]}),gr.length>0||Fo?null:f("div",{class:"flex items-center justify-center h-[320px] w-full",children:f("p",{class:"text-base-content text-opacity-50",children:fe("No data available.")})})]})}),f("div",{class:"flex mt-1.5 items-center gap-2 border-t border-base-300 px-2 py-1.5",children:[pe?f("button",{class:"btn btn-sm btn-neutral btn-ghost",onClick:me,children:fe("Clear")}):null,f("span",{class:"flex-grow"}),we==null?void 0:we(fn,{loading:a,loadingMore:i,loadedCount:s,totalCount:l,resultRecords:cn?gr:ue,visibleRecords:gr}),f("button",{class:"btn btn-sm btn-primary",onClick:ns,disabled:a,title:jo?fe("Export menu is open while remaining rows load in the background."):a?fe("Wait for records to finish loading before exporting."):cn&&k?fe("Exports stream from the active source without loading all rows into the table."):c&&!De?fe("Opens immediately and loads remaining rows in the background."):void 0,children:[jo?f("span",{class:"loading loading-spinner"}):null,fe("Export Data")]})]}),Ye&&H&&!_e?f("aside",{class:"absolute right-2 bottom-14 z-[2] w-56 rounded-box-half border border-base-300 bg-base-100 shadow-lg",children:[f("header",{class:"flex items-center justify-between border-b border-base-300 px-2 py-1 text-xs font-semibold",children:[f("span",{children:fe("Media View")}),f("div",{class:"flex items-center gap-1",children:[f("button",{class:"btn btn-ghost btn-xs",onClick:()=>ve(true),children:"Open"}),f("button",{class:"btn btn-ghost btn-xs",onClick:()=>{ve(false),se("");},children:f(uc,{size:12})})]})]}),f("div",{class:"h-36 overflow-hidden bg-base-200",children:H.includes(".mp4")?f("video",{controls:true,class:"h-full w-full object-contain",src:H}):f("img",{class:"h-full w-full object-contain",src:H})})]}):null,f(vr,{title:fe("JSON View"),class:"max-w-xl",show:!!Ie,onClose:()=>xt(null),children:f("main",{class:"max-w-full max-h-[500px] overflow-scroll overscroll-none",children:typeof Ie=="string"?f("p",{class:"whitespace-pre-wrap",children:Ie}):f("pre",{class:"text-xs leading-none",children:JSON.stringify(Ie,null,2)})})}),f(TR,{show:_e&&!!H,url:H,dockAfterClose:Ye,onDockAfterCloseChange:Xe,onClose:Lt}),f(vr,{title:fe("Search Operators"),class:"h-[min(88vh,860px)] w-[min(92vw,1040px)] max-w-[92vw] max-h-[88vh] overflow-hidden",show:Wt,onClose:Kt,children:f("div",{class:"min-h-0 grow overflow-y-auto pr-1 text-sm leading-6",children:[f("p",{class:"mb-2",children:[fe("Query semantics now follow recorder-style precedence:")," ",f("code",{class:"ml-1",children:"NOT"}),",",f("code",{class:"ml-1",children:"AND"}),",",f("code",{class:"ml-1",children:"OR"}),", ",fe("with implicit")," ",f("code",{class:"ml-1",children:"AND"})," ",fe("between adjacent terms.")]}),f("div",{class:"grid gap-3 md:grid-cols-2",children:Dt.map(([Se,wt])=>f("section",{class:"rounded-box-half border border-base-300 bg-base-200/70 p-3",children:[f("h4",{class:"mb-2 text-xs font-semibold uppercase tracking-[0.08em] opacity-70",children:fe(`search.category.${Se}`)}),f("div",{class:"space-y-2",children:wt.map(Bt=>f("div",{class:"text-xs",children:[f("div",{class:"font-mono text-[11px] text-info",children:Bt.syntax}),f("div",{children:fe(Bt.description)}),f("div",{class:"font-mono opacity-70",children:Bt.examples.join(" | ")})]},`${Se}-${Bt.syntax}`))})]},Se))})]})}),f(SR,{title:e,columns:ce,resultRecords:cn?gr:ue,resultCount:cn?kt:ue.length,streamResultRecords:cn?k:At,selectedRecords:Me,selectedRecordCount:x==="explicit"?je.length:void 0,streamSelectedRecords:lr,selectionExcludedRecordIds:ka,resultSetSnapshot:K,selectionMode:x,preparingFullDataset:jo,show:fu,onClose:xr}),z==null?void 0:z(fn,{resultSetSnapshot:K,resultRecords:cn?gr:ue,selectedRecords:Me,selectionMode:x,selectionExcludedRecordIds:ka})]})}const gn=xh(),Cd=1200,Eg=new WeakMap;function ir(e){var a;const t=Eg.get(e);if(t)return t;const n=(()=>{const i=e,s=i.__bookmark_folder_name_source,l=i.__bookmark_folder_name;return s==="api"&&typeof l=="string"&&l.trim()?l:null})(),r=(()=>{const i=e.__bookmark_folder_id;return typeof i=="string"&&i.trim()?i:null})(),o={createdAtMs:typeof((a=e.twe_private_fields)==null?void 0:a.created_at)=="number"?e.twe_private_fields.created_at:Ga(e),fullText:ha(e),media:Po(e),mediaTags:m1(e),retweetedTweet:zi(e),quotedTweet:Wc(e),bookmarkFolderName:n,bookmarkFolderId:r};return Eg.set(e,o),o}const NE=e=>{const t=ir(e).retweetedTweet;return t?Yc(t):null},FE=e=>{const t=ir(e).quotedTweet;return t?Yc(t):null},Ag=e=>ir(e).bookmarkFolderName,Dg=e=>ir(e).bookmarkFolderId,rv=[gn.display({id:"select",size:48,minSize:48,maxSize:48,meta:{exportable:false},header:({table:e})=>{var t,n,r,o;return f("input",{type:"checkbox",class:"checkbox checkbox-sm align-middle",checked:((n=(t=e.options.meta)==null?void 0:t.isAllResultRowsSelected)==null?void 0:n.call(t))??e.getIsAllRowsSelected(),indeterminate:((o=(r=e.options.meta)==null?void 0:r.isSomeResultRowsSelected)==null?void 0:o.call(r))??e.getIsSomeRowsSelected(),onChange:()=>{var a;if((a=e.options.meta)!=null&&a.toggleAllResultRowsSelected){e.options.meta.toggleAllResultRowsSelected();return}e.toggleAllRowsSelected();}})},cell:({row:e,table:t})=>{var n,r;return f("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:((r=(n=t.options.meta)==null?void 0:n.isResultRowSelected)==null?void 0:r.call(n,e.id))??e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:()=>{var o;if((o=t.options.meta)!=null&&o.toggleResultRowSelected){t.options.meta.toggleResultRowSelected(e.id);return}e.toggleSelected();}})}}),gn.accessor("rest_id",{size:112,minSize:112,meta:{exportKey:"id",exportHeader:"ID"},header:()=>f(gt,{i18nKey:"ID"}),cell:e=>f("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),gn.accessor(e=>ir(e).createdAtMs,{id:"created_at",size:136,minSize:128,meta:{exportKey:"created_at",exportHeader:"Date",exportValue:e=>Jr(ir(e.original).createdAtMs,et.get("dateTimeFormat"))},header:()=>f(gt,{i18nKey:"Date"}),cell:e=>f("p",{class:"w-24",children:f("a",{class:"link",target:"_blank",href:ja(e.row.original),children:Jr(e.getValue(),et.get("dateTimeFormat"))})})}),gn.accessor("legacy.full_text",{size:360,minSize:280,maxSize:520,meta:{exportKey:"full_text",exportHeader:"Content",exportValue:e=>ir(e.original).fullText},header:()=>f(gt,{i18nKey:"Content"}),cell:e=>{var o,a,i,s;const t=ir(e.row.original).fullText,n=!!e.row.original.article||!!e.row.original.note_tweet||t.length>Cd,r=n?`${t.slice(0,Cd).trimEnd()}${t.length>Cd?`
...`:""}`:t;return f("div",{children:[f("p",{class:"w-60 whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:wc(r,[...((a=(o=e.row.original.legacy)==null?void 0:o.entities)==null?void 0:a.urls)??[],...((s=(i=e.row.original.legacy)==null?void 0:i.entities)==null?void 0:s.media)??[]])}}),n&&f("button",{class:"link",onClick:()=>{var l;return (l=e.table.options.meta)==null?void 0:l.setRawDataPreview(t)},children:[">>"," ",f(gt,{i18nKey:"Show Full Text"})]})]})}}),gn.accessor(e=>ir(e).media.length,{id:"media",size:176,minSize:136,meta:{exportKey:"media",exportHeader:"Media",exportValue:e=>ir(e.original).media.map(t=>({type:t.type,url:t.url,thumbnail:$i(t.media_url_https,"thumb"),original:Wa(t),ext_alt_text:t.ext_alt_text}))},header:()=>f(gt,{i18nKey:"Media"}),cell:e=>f(Gy,{data:ir(e.row.original).media,onClick:t=>{var n;return (n=e.table.options.meta)==null?void 0:n.setMediaPreview(Wa(t))}})}),gn.accessor("core.user_results.result.core.screen_name",{size:144,minSize:120,meta:{exportKey:"screen_name",exportHeader:"Screen Name"},header:()=>f(gt,{i18nKey:"Screen Name"}),cell:e=>f("p",{class:"whitespace-pre",children:f("a",{class:"link",target:"_blank",href:Rs(e.row.original.core.user_results.result),children:["@",e.getValue()]})})}),gn.accessor("core.user_results.result.core.name",{size:184,minSize:144,meta:{exportKey:"name",exportHeader:"Profile Name"},header:()=>f(gt,{i18nKey:"Profile Name"}),cell:e=>f("p",{class:"w-32",children:e.getValue()})}),gn.accessor("core.user_results.result.avatar.image_url",{size:96,minSize:84,meta:{exportKey:"profile_image_url",exportHeader:"Profile Image"},header:()=>f(gt,{i18nKey:"Profile Image"}),cell:e=>f("div",{class:"cursor-pointer",onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setMediaPreview(oh(e.getValue()))},children:f("img",{class:"w-12 h-12 rounded",src:e.getValue(),loading:"lazy",decoding:"async"})})}),gn.accessor("core.user_results.result.rest_id",{size:112,minSize:112,meta:{exportKey:"user_id",exportHeader:"User ID"},header:()=>f(gt,{i18nKey:"User ID"}),cell:e=>f("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),gn.accessor("legacy.in_reply_to_screen_name",{size:144,minSize:120,meta:{exportKey:"in_reply_to",exportHeader:"Replying To",exportValue:e=>e.original.legacy.in_reply_to_status_id_str},header:()=>f(gt,{i18nKey:"Replying To"}),cell:e=>f("p",{class:"whitespace-pre",children:e.row.original.legacy.in_reply_to_status_id_str?f("a",{class:"link",target:"_blank",href:_1(e.row.original),children:["@",e.getValue()]}):"N/A"})}),gn.accessor(NE,{id:"rt_source",size:144,minSize:120,meta:{exportKey:"retweeted_status",exportHeader:"RT Source",exportValue:e=>{var t;return (t=zi(e.original))==null?void 0:t.rest_id}},header:()=>f(gt,{i18nKey:"RT Source"}),cell:e=>{const t=ir(e.row.original).retweetedTweet;return f("p",{class:"whitespace-pre",children:t?f("a",{class:"link",target:"_blank",href:ja(t),children:["@",e.getValue()]}):"N/A"})}}),gn.accessor(FE,{id:"quote_source",size:144,minSize:120,meta:{exportKey:"quoted_status",exportHeader:"Quote Source",exportValue:e=>{var t;return (t=Wc(e.original))==null?void 0:t.rest_id}},header:()=>f(gt,{i18nKey:"Quote Source"}),cell:e=>{const t=ir(e.row.original).quotedTweet;return f("p",{class:"whitespace-pre",children:t?f("a",{class:"link",target:"_blank",href:ja(t),children:["@",e.getValue()]}):"N/A"})}}),gn.display({id:"media_tags",size:184,minSize:144,meta:{exportKey:"media_tags",exportHeader:"Media Tags",exportValue:e=>ir(e.original).mediaTags},header:()=>f(gt,{i18nKey:"Media Tags"}),cell:e=>f("p",{children:ir(e.row.original).mediaTags.length?ir(e.row.original).mediaTags.map(t=>f("a",{class:"link inline-block",target:"_blank",href:Rs(t.screen_name),children:["@",t.screen_name]})):"N/A"})}),gn.accessor("legacy.favorite_count",{size:96,minSize:88,meta:{exportKey:"favorite_count",exportHeader:"Favorites"},header:()=>f(gt,{i18nKey:"Favorites"}),cell:e=>f("p",{children:e.getValue()})}),gn.accessor("legacy.retweet_count",{size:96,minSize:88,meta:{exportKey:"retweet_count",exportHeader:"Retweets"},header:()=>f(gt,{i18nKey:"Retweets"}),cell:e=>f("p",{children:e.getValue()})}),gn.accessor("legacy.bookmark_count",{size:104,minSize:96,meta:{exportKey:"bookmark_count",exportHeader:"Bookmarks"},header:()=>f(gt,{i18nKey:"Bookmarks"}),cell:e=>f("p",{children:e.getValue()})}),gn.accessor("legacy.quote_count",{size:88,minSize:80,meta:{exportKey:"quote_count",exportHeader:"Quotes"},header:()=>f(gt,{i18nKey:"Quotes"}),cell:e=>f("p",{children:e.getValue()})}),gn.accessor("legacy.reply_count",{size:88,minSize:80,meta:{exportKey:"reply_count",exportHeader:"Replies"},header:()=>f(gt,{i18nKey:"Replies"}),cell:e=>f("p",{children:e.getValue()})}),gn.accessor("views.count",{size:88,minSize:80,meta:{exportKey:"views_count",exportHeader:"Views",exportValue:e=>{var t;return typeof((t=e.original.views)==null?void 0:t.count)>"u"?null:+e.original.views.count}},header:()=>f(gt,{i18nKey:"Views"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),gn.accessor("legacy.favorited",{size:104,minSize:96,meta:{exportKey:"favorited",exportHeader:"Favorited"},header:()=>f(gt,{i18nKey:"Favorited"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),gn.accessor("legacy.retweeted",{size:104,minSize:96,meta:{exportKey:"retweeted",exportHeader:"Retweeted"},header:()=>f(gt,{i18nKey:"Retweeted"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),gn.accessor("legacy.bookmarked",{size:112,minSize:104,meta:{exportKey:"bookmarked",exportHeader:"Bookmarked"},header:()=>f(gt,{i18nKey:"Bookmarked"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),gn.accessor(Ag,{id:"bookmark_folder_name",size:184,minSize:152,meta:{exportKey:"bookmark_folder_name",exportHeader:"Bookmark Folder",exportValue:e=>Ag(e.original)},header:()=>f(gt,{i18nKey:"Bookmark Folder"}),cell:e=>{const t=e.getValue();return t?f("p",{class:"w-36 truncate",title:String(t),children:t}):f("p",{class:"text-gray-400",children:"—"})}}),gn.accessor(Dg,{id:"bookmark_folder_id",size:168,minSize:144,meta:{exportKey:"bookmark_folder_id",exportHeader:"Bookmark Folder ID",exportValue:e=>Dg(e.original)},header:()=>f("span",{children:"Bookmark Folder ID"}),cell:e=>{const t=e.getValue();return t?f("p",{class:"w-32 break-all font-mono text-xs",children:t}):f("p",{class:"text-gray-400",children:"—"})}}),gn.display({id:"url",size:64,minSize:56,maxSize:72,meta:{exportKey:"url",exportHeader:"URL",exportValue:e=>ja(e.original)},header:()=>f(gt,{i18nKey:"URL"}),cell:e=>f("a",{href:ja(e.row.original),target:"_blank",children:f(Q_,{})})}),gn.display({id:"actions",size:112,minSize:104,meta:{exportable:false},header:()=>f(gt,{i18nKey:"Actions"}),cell:e=>f("div",{class:"flex flex-row items-start space-x-1",children:f("button",{onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setRawDataPreview(e.row.original)},class:"btn btn-xs btn-neutral whitespace-nowrap",children:f(gt,{i18nKey:"Details"})})})})],un=xh(),ov=[un.display({id:"select",size:48,minSize:48,maxSize:48,meta:{exportable:false},header:({table:e})=>{var t,n,r,o;return f("input",{type:"checkbox",class:"checkbox checkbox-sm align-middle",checked:((n=(t=e.options.meta)==null?void 0:t.isAllResultRowsSelected)==null?void 0:n.call(t))??e.getIsAllRowsSelected(),indeterminate:((o=(r=e.options.meta)==null?void 0:r.isSomeResultRowsSelected)==null?void 0:o.call(r))??e.getIsSomeRowsSelected(),onChange:()=>{var a;if((a=e.options.meta)!=null&&a.toggleAllResultRowsSelected){e.options.meta.toggleAllResultRowsSelected();return}e.toggleAllRowsSelected();}})},cell:({row:e,table:t})=>{var n,r;return f("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:((r=(n=t.options.meta)==null?void 0:n.isResultRowSelected)==null?void 0:r.call(n,e.id))??e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:()=>{var o;if((o=t.options.meta)!=null&&o.toggleResultRowSelected){t.options.meta.toggleResultRowSelected(e.id);return}e.toggleSelected();}})}}),un.accessor("rest_id",{size:112,minSize:112,meta:{exportKey:"id",exportHeader:"ID"},header:()=>f(gt,{i18nKey:"ID"}),cell:e=>f("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),un.accessor("core.screen_name",{size:144,minSize:120,meta:{exportKey:"screen_name",exportHeader:"Screen Name"},header:()=>f(gt,{i18nKey:"Screen Name"}),cell:e=>f("p",{class:"whitespace-pre",children:f("a",{class:"link",target:"_blank",href:Rs(e.row.original),children:["@",e.getValue()]})})}),un.accessor("core.name",{size:184,minSize:144,meta:{exportKey:"name",exportHeader:"Profile Name"},header:()=>f(gt,{i18nKey:"Profile Name"}),cell:e=>f("p",{class:"w-32",children:e.getValue()})}),un.accessor("legacy.description",{size:336,minSize:260,maxSize:520,meta:{exportKey:"description",exportHeader:"Description"},header:()=>f(gt,{i18nKey:"Description"}),cell:e=>{var t;return f("p",{class:"w-52 break-words",dangerouslySetInnerHTML:{__html:wc(e.row.original.legacy.description||"N/A",(t=e.row.original.legacy.entities)==null?void 0:t.description.urls)}})}}),un.accessor("avatar.image_url",{size:104,minSize:92,meta:{exportKey:"profile_image_url",exportHeader:"Profile Image"},header:()=>f(gt,{i18nKey:"Profile Image"}),cell:e=>f("div",{class:"cursor-pointer",onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setMediaPreview(oh(e.getValue()))},children:f("img",{class:"w-12 h-12 rounded",src:e.getValue(),loading:"lazy",decoding:"async"})})}),un.accessor("legacy.profile_banner_url",{size:184,minSize:160,meta:{exportKey:"profile_banner_url",exportHeader:"Profile Banner"},header:()=>f(gt,{i18nKey:"Profile Banner"}),cell:e=>f("div",{class:"cursor-pointer w-36 h-12",onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setMediaPreview(e.getValue()??"")},children:e.getValue()?f("img",{class:"w-auto h-12 rounded",src:`${e.getValue()}/600x200`,loading:"lazy",decoding:"async"}):f("span",{class:"leading-[48px]",children:"N/A"})})}),un.accessor("legacy.followers_count",{size:104,minSize:96,meta:{exportKey:"followers_count",exportHeader:"Followers"},header:()=>f(gt,{i18nKey:"Followers"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),un.accessor("legacy.friends_count",{size:120,minSize:104,meta:{exportKey:"friends_count",exportHeader:"FollowingCount"},header:()=>f(gt,{i18nKey:"FollowingCount"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),un.accessor("legacy.statuses_count",{size:104,minSize:96,meta:{exportKey:"statuses_count",exportHeader:"Statuses"},header:()=>f(gt,{i18nKey:"Statuses"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),un.accessor("legacy.favourites_count",{size:112,minSize:104,meta:{exportKey:"favourites_count",exportHeader:"Favourites"},header:()=>f(gt,{i18nKey:"Favourites"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),un.accessor("legacy.listed_count",{size:88,minSize:80,meta:{exportKey:"listed_count",exportHeader:"Listed"},header:()=>f(gt,{i18nKey:"Listed"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),un.accessor("location.location",{size:176,minSize:136,meta:{exportKey:"location",exportHeader:"Location"},header:()=>f(gt,{i18nKey:"Location"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),un.accessor("legacy.url",{size:220,minSize:160,meta:{exportKey:"website",exportHeader:"Website"},header:()=>f(gt,{i18nKey:"Website"}),cell:e=>{var t,n;return f("p",{dangerouslySetInnerHTML:{__html:wc(e.row.original.legacy.url||"N/A",(n=(t=e.row.original.legacy.entities)==null?void 0:t.url)==null?void 0:n.urls)}})}}),un.accessor("legacy_extended_profile.birthdate",{size:120,minSize:104,meta:{exportKey:"birthdate",exportHeader:"Birthdate",exportValue:e=>{var t;return Rp((t=e.original.legacy_extended_profile)==null?void 0:t.birthdate)}},header:()=>f(gt,{i18nKey:"Birthdate"}),cell:e=>f("p",{children:Rp(e.getValue())??"N/A"})}),un.accessor("verification.verified_type",{size:128,minSize:112,meta:{exportKey:"verified_type",exportHeader:"Verified Type"},header:()=>f(gt,{i18nKey:"Verified Type"}),cell:e=>f("p",{children:e.getValue()??"N/A"})}),un.accessor("is_blue_verified",{size:128,minSize:112,meta:{exportKey:"is_blue_verified",exportHeader:"Blue Verified"},header:()=>f(gt,{i18nKey:"Blue Verified"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),un.accessor("relationship_perspectives.following",{size:112,minSize:104,meta:{exportKey:"following",exportHeader:"Following"},header:()=>f(gt,{i18nKey:"Following"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),un.accessor("relationship_perspectives.followed_by",{size:112,minSize:104,meta:{exportKey:"followed_by",exportHeader:"Follows You"},header:()=>f(gt,{i18nKey:"Follows You"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),un.accessor(e=>{var t,n;return ((n=(t=e.twe_relationship_fields)==null?void 0:t.relation_types)==null?void 0:n.join(", "))||""},{id:"relation_types",size:160,minSize:128,meta:{exportKey:"relation_types",exportHeader:"Relation Types"},header:()=>f(gt,{i18nKey:"Relation Types"}),cell:e=>f("p",{children:e.getValue()||"N/A"})}),un.accessor(e=>{var t,n;return ((n=(t=e.twe_relationship_fields)==null?void 0:t.subject_screen_names)==null?void 0:n.join(", "))||""},{id:"subject_screen_names",size:192,minSize:160,meta:{exportKey:"subject_screen_names",exportHeader:"Subject Accounts"},header:()=>f(gt,{i18nKey:"Subject Accounts"}),cell:e=>f("p",{class:"w-40 break-words",children:e.getValue()||"N/A"})}),un.accessor(e=>{var t,n;return ((n=(t=e.twe_relationship_fields)==null?void 0:t.subject_user_ids)==null?void 0:n.join(", "))||""},{id:"subject_user_ids",size:152,minSize:136,meta:{exportKey:"subject_user_ids",exportHeader:"Subject User IDs"},header:()=>f(gt,{i18nKey:"Subject User IDs"}),cell:e=>f("p",{class:"w-28 break-all font-mono text-xs",children:e.getValue()||"N/A"})}),un.accessor(e=>{var t;return ((t=e.twe_relationship_fields)==null?void 0:t.last_observed_at)||0},{id:"last_observed_at",size:136,minSize:128,meta:{exportKey:"last_observed_at",exportHeader:"Last Observed At",exportValue:e=>{var t;return (t=e.original.twe_relationship_fields)!=null&&t.last_observed_at?Jr(e.original.twe_relationship_fields.last_observed_at,et.get("dateTimeFormat")):""}},header:()=>f(gt,{i18nKey:"Last Observed At"}),cell:e=>f("p",{class:"w-24",children:e.getValue()?Jr(e.getValue(),et.get("dateTimeFormat")):"N/A"})}),un.accessor("dm_permissions.can_dm",{size:88,minSize:80,meta:{exportKey:"can_dm",exportHeader:"Can DM"},header:()=>f(gt,{i18nKey:"Can DM"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),un.accessor("privacy.protected",{size:104,minSize:96,meta:{exportKey:"protected",exportHeader:"Protected"},header:()=>f(gt,{i18nKey:"Protected"}),cell:e=>f("p",{children:e.getValue()?"YES":"NO"})}),un.accessor(e=>+Ni(e.core.created_at),{id:"created_at",size:136,minSize:128,meta:{exportKey:"created_at",exportHeader:"Created At",exportValue:e=>Jr(Ni(e.original.core.created_at),et.get("dateTimeFormat"))},header:()=>f(gt,{i18nKey:"Created At"}),cell:e=>f("p",{class:"w-24",children:e.getValue()?Jr(e.getValue(),et.get("dateTimeFormat")):"N/A"})}),un.display({id:"url",size:64,minSize:56,maxSize:72,meta:{exportKey:"url",exportHeader:"URL",exportValue:e=>Rs(e.original)},header:()=>f(gt,{i18nKey:"URL"}),cell:e=>f("a",{href:Rs(e.row.original),target:"_blank",children:f(Q_,{})})}),un.display({id:"actions",size:112,minSize:104,meta:{exportable:false},header:()=>f(gt,{i18nKey:"Actions"}),cell:e=>f("div",{class:"flex flex-row items-start space-x-1",children:f("button",{onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setRawDataPreview(e.row.original)},class:"btn btn-xs btn-neutral whitespace-nowrap",children:f(gt,{i18nKey:"Details"})})})})],_s=42,$E=24,BE=900,UE=320,jE=264,HE=228,qE=196,VE=16,zE=14,Pg=360,KE=48,GE=160,WE=42,Gl=144,YE=8,xs=new Map;function Og(e){return xs.get(e)??null}function Td(e,t){var r;if(t.updatedAt=Date.now(),xs.set(e,t),xs.size<=YE)return;const n=(r=[...xs.entries()].sort((o,a)=>o[1].updatedAt-a[1].updatedAt)[0])==null?void 0:r[0];n&&xs.delete(n);}function Lg(e){return {items:[],nextRowIndex:0,scannedRows:0,exhausted:false,totalCount:e,updatedAt:Date.now()}}function JE(e){return zi(e)?[]:Po(e).filter(n=>n.type==="photo"||n.type==="video"||n.type==="animated_gif")}function XE(e){const t=e;return t.__bookmark_folder_name_source==="api"&&typeof t.__bookmark_folder_name=="string"?t.__bookmark_folder_name.trim():""}function ZE(e){return e.type==="photo"?$i(e.media_url_https,"large"):$i(e.media_url_https,"medium")}function QE(e){var r,o,a,i,s,l,c,h,u,m;const t=((r=e.original_info)==null?void 0:r.width)||((a=(o=e.sizes)==null?void 0:o.large)==null?void 0:a.w)||((s=(i=e.sizes)==null?void 0:i.medium)==null?void 0:s.w)||1,n=((l=e.original_info)==null?void 0:l.height)||((h=(c=e.sizes)==null?void 0:c.large)==null?void 0:h.h)||((m=(u=e.sizes)==null?void 0:u.medium)==null?void 0:m.h)||1;return Math.max(.56,Math.min(1.8,t/n))}function eA(e,t){if(!e.trim())return 0;const n=t==="compact"?34:42;return Math.max(1,Math.min(t==="compact"?3:4,Math.ceil(e.trim().length/n)))}function tA(e,t,n){const r=t/Math.max(.56,e.aspectRatio||1),a=eA(e.fullText,n)*20,i=n==="compact"?96:108,s=34,l=e.bookmarkFolderName?22:0,c=e.durationLabel?4:0,h=n==="compact"?24:30;return r+i+s+l+a+c+h}function nA(e,t,n,r){const o=Math.max(1,t),a=Array.from({length:o},()=>({items:[],estimatedHeight:0}));for(const i of e){let s=0;for(let l=1;l<a.length;l+=1)a[l].estimatedHeight<a[s].estimatedHeight&&(s=l);a[s].items.push(i),a[s].estimatedHeight+=tA(i,n,r);}return a}function Md(e){const t=JE(e);if(!t.length)return [];const n=Yc(e),r=ha(e).trim(),o=Jr(Ga(e),et.get("dateTimeFormat")),a=ja(e),i=XE(e);return t.map((s,l)=>{var c,h,u,m,g;return {id:`${e.rest_id}:${s.media_key||s.id_str||l}`,tweet:e,media:s,screenName:n,fullText:r,createdAtLabel:o,tweetUrl:a,previewUrl:ZE(s),originalUrl:Wa(s),aspectRatio:QE(s),bookmarkFolderName:i,favoriteCount:Number(((c=e.legacy)==null?void 0:c.favorite_count)||0),retweetCount:Number(((h=e.legacy)==null?void 0:h.retweet_count)||0),bookmarkCount:Number(((u=e.legacy)==null?void 0:u.bookmark_count)||0),replyCount:Number(((m=e.legacy)==null?void 0:m.reply_count)||0),durationLabel:s.type==="photo"?"":by((g=s.video_info)==null?void 0:g.duration_millis)}})}function av({records:e,scrollParentRef:t,onOpenMedia:n,storageKey:r,fullscreen:o,sourceMode:a,sourceTotalCount:i=0,streamSourceRows:s,mediaSourceKey:l,mediaSourceTotalCount:c,getMediaWindow:h,streamMediaRows:u,onDiagnosticsChange:m}){var x;const{t:g}=er(),y=bt(null),b=bt(""),k=bt(null),S=bt(null),M=bt(0),T=bt(false),P=bt(false),N=bt(0),I=bt([]),O=bt(""),[U,E]=$e(_s),[v,L]=$e("comfortable"),[$,xe]=$e(0),[G,le]=$e([]),[Q,ce]=$e(0),[me,pe]=$e(false),[we,z]=$e(false),[ae,Le]=$e({start:0,end:0,count:0}),fe=u??s,Pe=c??i,it=St(()=>[r||"media-masonry",l||"stream-source",i].join(":"),[l,i,r]),X=!!(a&&(h||fe));ot(()=>{try{if(typeof localStorage>"u"||!r)return;const R=localStorage.getItem(`${r}:density`);(R==="compact"||R==="comfortable")&&L(R);}catch{}},[r]),ot(()=>{try{if(typeof localStorage>"u"||!r)return;localStorage.setItem(`${r}:density`,v);}catch{}},[v,r]);const ne=St(()=>e.flatMap(R=>Md(R)),[e]),H=X?G:ne;ot(()=>{I.current=G;},[G]);const se=async R=>{if(!X||!fe&&!h||T.current||P.current||I.current.length>=R)return;T.current=true,pe(true);const B=M.current,V=N.current,ke=O.current||it,oe=Og(ke)??Lg(Pe);let Be=0,Ue=0;try{const tt=[];if(h)for(;I.current.length+tt.length<R&&Be<Pg&&!oe.exhausted;){if(M.current!==B)return;const ue=oe.nextRowIndex<=0?KE:GE,We=await h(oe.nextRowIndex,ue);if(M.current!==B)return;Be+=We.rows.length,oe.nextRowIndex+=We.rows.length,N.current=Math.max(N.current,oe.nextRowIndex),ce(N.current);for(const he of We.rows){const Me=Md(he);Me.length&&(tt.push(...Me),Ue+=Me.length);}if(oe.totalCount=We.totalCount||Pe,!We.hasAfter||!We.rows.length){oe.exhausted=!0,P.current=!0,z(!0);break}}else if(fe){const ue=k.current??fe()[Symbol.asyncIterator]();for(k.current=ue;I.current.length+tt.length<R&&Be<Pg;){if(M.current!==B)return;const We=await ue.next();if(M.current!==B)return;if(We.done){oe.exhausted=!0,P.current=!0,z(!0);break}Be+=1,oe.nextRowIndex+=1,N.current+=1,Be%12===0&&ce(N.current);const he=Md(We.value);he.length&&(tt.push(...he),Ue+=he.length);}}tt.length?le(ue=>{if(M.current!==B)return ue;const We=new Set(ue.map(je=>je.id)),he=tt.filter(je=>We.has(je.id)?!1:(We.add(je.id),!0));if(!he.length)return ue;const Me=[...ue,...he];return oe.items=Me,oe.scannedRows=N.current,oe.exhausted=P.current,Td(ke,oe),I.current=Me,Me}):(oe.items=I.current,oe.scannedRows=N.current,oe.exhausted=P.current,Td(ke,oe));}finally{M.current===B&&(T.current=false,ce(N.current),pe(false)),He({kind:"viewer",name:"media-source-scan",value:Ue,tags:{scannedRows:Be,scannedRowsTotal:N.current,scannedRowsBefore:V,mediaItems:I.current.length+Ue,targetMediaCount:R,exhausted:P.current,sourceTotalCount:Pe,windowBacked:!!h}});}};ot(()=>{if(M.current+=1,k.current=null,T.current=false,pe(false),O.current=it,!X){P.current=false,N.current=0,I.current=[],le([]),ce(0),z(false);return}const R=Og(it);if(R){P.current=R.exhausted,N.current=R.scannedRows,I.current=R.items,le(R.items),ce(R.scannedRows),z(R.exhausted);return}const B=Lg(Pe);Td(it,B),P.current=false,N.current=0,I.current=[],le([]),ce(0),z(false);},[Pe,it,X]),ot(()=>{X&&se(WE);},[Pe,it,G.length,X]);const _e=((x=H[0])==null?void 0:x.id)||"";ot(()=>{E(R=>b.current!==_e?(b.current=_e,Math.min(_s,Math.max(0,H.length))):H.length<=_s?Math.min(_s,Math.max(0,H.length)):R>H.length?H.length:Math.max(R,Math.min(_s,H.length)));},[_e,H.length]),ot(()=>{const R=t.current;if(!R)return;const B=()=>{if(R.scrollHeight-(R.scrollTop+R.clientHeight)<=BE){const ke=Math.min(H.length,U+$E);E(ke),X&&!we&&H.length<=ke+Gl&&se(ke+Gl);}};return B(),R.addEventListener("scroll",B,{passive:true}),()=>R.removeEventListener("scroll",B)},[H.length,t,we,X,U]),ot(()=>{!X||we||H.length<=U+Gl&&se(U+Gl);},[H.length,we,X,U]),jk(()=>{const R=y.current,B=t.current;if(!R&&!B)return;const V=()=>{const oe=(R==null?void 0:R.clientWidth)||0,Be=(B==null?void 0:B.clientWidth)||0;xe(Math.max(oe,Be,0));};V();const ke=new ResizeObserver(()=>V());return R&&ke.observe(R),B&&B!==R&&ke.observe(B),()=>ke.disconnect()},[t]);const ve=H.slice(0,U),Ye=St(()=>{const R=new Map;return ve.forEach((B,V)=>R.set(B.id,V)),R},[ve]),Xe=v==="compact"?zE:VE,Ie=!o,xt=v==="compact"?Ie?qE:jE:Ie?HE:UE,Lt=Math.max(1,$?Math.floor(($+Xe)/(xt+Xe)):1),Wt=!o&&$>=520?2:1,Tt=Math.max(Wt,Math.min(o?6:4,Lt)),Mt=$>0?($-Xe*Math.max(0,Tt-1))/Tt:xt,Pt=St(()=>nA(ve,Tt,Mt,v),[Tt,Mt,v,ve]);ot(()=>{const R=y.current,B=t.current;if(!R||!B)return;const V=()=>{S.current=null;const oe=B.getBoundingClientRect(),Be=Array.from(R.querySelectorAll("article[data-masonry-index]"));let Ue=Number.POSITIVE_INFINITY,tt=-1,ue=0;for(const he of Be){const Me=he.getBoundingClientRect();if(Me.bottom<oe.top||Me.top>oe.bottom)continue;const je=Number(he.dataset.masonryIndex??-1);!Number.isFinite(je)||je<0||(Ue=Math.min(Ue,je),tt=Math.max(tt,je),ue+=1);}const We=ue>0?{start:Ue,end:tt,count:ue}:{start:0,end:Math.max(0,Math.min(ve.length,U)-1),count:0};Le(he=>he.start===We.start&&he.end===We.end&&he.count===We.count?he:We);},ke=()=>{S.current===null&&(S.current=window.requestAnimationFrame(V));};return ke(),B.addEventListener("scroll",ke,{passive:true}),window.addEventListener("resize",ke),()=>{B.removeEventListener("scroll",ke),window.removeEventListener("resize",ke),S.current!==null&&(window.cancelAnimationFrame(S.current),S.current=null);}},[Tt,v,t,U,ve.length]);const zt=ae.count?ae.start+1:ve.length?1:0,De=ae.count?ae.end+1:Math.min(ve.length,U),yt=ae.count||ve.length,lt=me?"loading":we?"complete":"idle",_t=Pe||"?",Fe=X?me?g("loading source {{scanned}}/{{total}}",{scanned:Q,total:_t}):g("source {{status}} {{scanned}}/{{total}}",{status:g(lt),scanned:Q,total:_t}):g("media {{count}}",{count:H.length}),Ce=St(()=>f("div",{class:"join",children:[f("button",{class:`btn join-item btn-xs ${v==="comfortable"?"btn-primary":"btn-ghost"}`,onClick:()=>L("comfortable"),title:g("Comfortable density"),children:f(Xl,{size:14})}),f("button",{class:`btn join-item btn-xs ${v==="compact"?"btn-primary":"btn-ghost"}`,onClick:()=>L("compact"),title:g("Compact density"),children:f(Mk,{size:14})})]}),[v,g]),A=St(()=>({primary:Fe,details:[{key:"rendered",label:g("rendered {{rendered}}/{{total}} (window {{start}}-{{end}})",{rendered:yt,total:H.length,start:zt,end:De}),minWidth:"sm"},{key:"loaded-media",label:g("loaded media {{count}}",{count:H.length}),minWidth:"md"},{key:"source-rows",label:X?g("source rows {{scanned}}/{{total}} {{status}}",{scanned:Q,total:_t,status:g(lt)}):`result rows ${e.length}`,minWidth:"lg"},{key:"layout",label:g("layout {{columns}} cols @ {{width}}px",{columns:Tt,width:Math.round(Mt)}),minWidth:"xl"},{key:"scope",label:g("original tweet attachments only"),minWidth:"xl"}],actions:Ce}),[Tt,Mt,Ce,H.length,Fe,e.length,De,zt,yt,Q,lt,_t,g,X,ae.count]);return ot(()=>{m==null||m(A);},[A,m]),ot(()=>()=>m==null?void 0:m(null),[m]),H.length?f("div",{ref:y,class:"w-full min-w-0 px-3 py-3",children:f("div",{class:"flex items-start",style:{gap:`${Xe}px`},children:Pt.map((R,B)=>f("div",{class:"min-w-0 flex-1",children:R.items.map(V=>f("article",{"data-masonry-index":Ye.get(V.id)??0,class:`overflow-hidden rounded-[20px] border border-base-300 bg-gradient-to-b from-base-100 to-base-200/80 shadow-md ${v==="compact"?"mb-3":"mb-4"}`,children:[f("button",{class:"group relative block w-full bg-base-300 text-left",onClick:()=>n(V.originalUrl),children:[f("div",{class:"w-full overflow-hidden",style:{aspectRatio:`${V.aspectRatio}`},children:f("img",{class:"h-full w-full object-cover transition duration-300 group-hover:scale-[1.02]",src:V.previewUrl,loading:"lazy",decoding:"async"})}),f("div",{class:"pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-between bg-gradient-to-t from-black/70 via-black/20 to-transparent px-3 pb-3 pt-8 text-white",children:[f("div",{class:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.08em]",children:[V.media.type==="photo"?f(Rk,{size:14}):f(Uk,{size:14}),f("span",{children:V.media.type==="photo"?g("Photo"):g("Video")})]}),V.durationLabel?f("div",{class:"rounded-full bg-black/40 px-2 py-1 text-[10px] font-semibold",children:V.durationLabel}):null]})]}),f("div",{class:`space-y-2 px-3 ${v==="compact"?"py-2.5":"py-3"}`,children:[f("div",{class:"flex items-start justify-between gap-2",children:[f("div",{class:"min-w-0",children:[f("div",{class:"truncate text-sm font-semibold",children:["@",V.screenName]}),f("div",{class:"text-[11px] opacity-60",children:V.createdAtLabel})]}),f("a",{class:"btn btn-ghost btn-xs",href:V.tweetUrl,target:"_blank",rel:"noreferrer",title:g("Open tweet"),children:f(X_,{size:14})})]}),V.bookmarkFolderName?f("div",{class:"badge badge-outline badge-sm",children:V.bookmarkFolderName}):null,V.fullText?f("p",{class:`text-xs leading-5 opacity-80 ${v==="compact"?"line-clamp-3":"line-clamp-4"}`,children:V.fullText}):null,f("div",{class:"flex flex-wrap items-center gap-2 pt-1 text-[10px] font-semibold uppercase tracking-[0.08em] opacity-65",children:[f("span",{class:"inline-flex items-center gap-1",children:[f(Tk,{size:12}),V.favoriteCount]}),f("span",{class:"inline-flex items-center gap-1",children:[f(Ek,{size:12}),V.retweetCount]}),f("span",{class:"inline-flex items-center gap-1",children:[f(wk,{size:12}),V.bookmarkCount]}),f("span",{children:["Replies ",V.replyCount]})]})]})]},V.id))},`column-${B}`))})}):f("div",{ref:y,class:"w-full min-w-0 px-3 py-3",children:f("div",{class:"flex h-[320px] items-center justify-center text-sm opacity-60",children:me?f("span",{class:"inline-flex items-center gap-2",children:[f("span",{class:"loading loading-spinner loading-sm"}),g("Loading media.")]}):g("No media available.")})})}const rA=160,Ng=320,oA=960;function aA(e){return e.name.toLowerCase().endsWith(".zip")||e.type==="application/zip"}function Fg(e){if(e&&typeof e=="object"){const t=e.message;if(typeof t=="string"&&t.trim())return t}return String(e)}function $g(e){var t,n,r,o;return !e||(n=(t=e.manifest)==null?void 0:t.counts)!=null&&n.tweets?"tweet":(o=(r=e.manifest)==null?void 0:r.counts)!=null&&o.users?"user":"tweet"}function iA(e){const t=Lo(),[n,r]=$e([]),o=qn(async()=>{r(await Ze.bundleList()??[]);},[]);return ot(()=>{e&&o();},[t,o,e]),{bundles:n,refresh:o}}function sA(e,t){const n=Lo(),[r,o]=$e([]);return ot(()=>{let a=false;if(!e){o([]);return}return Ze.searchDocumentsForSource(`bundle:${e}`,t).then(i=>{a||o(i??[]);}).catch(()=>{a||o([]);}),()=>{a=true;}},[e,t,n]),r}function lA(e,t){const n=Lo(),[r,o]=$e({records:[],loading:false,loadingMore:false,loadedCount:0,totalCount:0,hasMore:false}),a=bt(0),i=bt([]),s=bt(false),l=qn(g=>RC(g,t),[t]),c=qn(async g=>{const y=(await Ze.bundleGetSnapshotsByIds(g)??[]).filter(b=>b.kind===t);return l(y)},[t,l]),h=qn(async(g,y)=>{const b=await Ze.bundleGetSnapshotPage(e,{kind:t,offset:g,limit:y,order:"newest"})??[];return l(b)},[e,t,l]),u=qn(async()=>{if(!(!e||s.current)&&!(r.totalCount>0&&a.current>=r.totalCount)){s.current=true,o(g=>({...g,loadingMore:true}));try{const g=await h(a.current,Ng),y=[...i.current,...g];a.current+=g.length,i.current=y,o(b=>({records:y,loading:!1,loadingMore:!1,loadedCount:y.length,totalCount:Math.max(b.totalCount,y.length),hasMore:g.length>=Ng}));}finally{s.current=false,o(g=>({...g,loadingMore:false}));}}},[e,h,r.totalCount]),m=qn(async()=>{for(;r.hasMore&&a.current<r.totalCount;){const g=a.current;if(await u(),a.current===g)break}},[u,r.hasMore,r.totalCount]);return ot(()=>{let g=false;if(a.current=0,i.current=[],!e){o({records:[],loading:false,loadingMore:false,loadedCount:0,totalCount:0,hasMore:false});return}return (async()=>{o({records:[],loading:true,loadingMore:false,loadedCount:0,totalCount:0,hasMore:false});const[b,k]=await Promise.all([Ze.bundleGetSnapshotCount(e,t),h(0,rA)]);g||(a.current=k.length,i.current=k,o({records:k,loading:false,loadingMore:false,loadedCount:k.length,totalCount:b??k.length,hasMore:k.length<(b??k.length)}));})(),()=>{g=true;}},[e,t,h,n]),ot(()=>{if(r.loading||r.loadingMore||!r.hasMore||r.loadedCount>=oA)return;const g=globalThis.setTimeout(()=>{u();},120);return ()=>globalThis.clearTimeout(g)},[u,r.hasMore,r.loadedCount,r.loading,r.loadingMore]),{...r,loadMore:u,loadAll:m,hydrateRecordsBySnapshotIds:c}}function cA(){const{t:e}=er(),[t,n]=Tr(false),[r,o]=$e(false),[a,i]=$e(""),[s,l]=$e("tweet"),[c,h]=$e("Idle"),[u,m]=$e(false),{bundles:g,refresh:y}=iA(t),b=g.find(I=>I.id===a)??null,k=sA(a,s),S=lA(a,s),M=St(()=>{const I=new Map;for(const O of k){const U=String(O.folder_id||"").trim();if(!U)continue;const E=String(O.folder_name||"").trim(),v=I.get(U);v?v.count+=1:I.set(U,{label:E||`Folder ${U}`,count:1});}return [...I.entries()].sort((O,U)=>U[1].count!==O[1].count?U[1].count-O[1].count:O[1].label.localeCompare(U[1].label)).map(([O,U])=>({value:O,label:`${U.label} (${U.count})`}))},[k]);ot(()=>{if(!t||a||!g.length)return;const I=g.find(O=>O.status==="ready")??g[0];I&&(i(I.id),l($g(I)));},[g,a,t]);const T=async I=>{if(!I||u)return;const O=I.name||"selected bundle";m(true),h(`Importing ${O}...`);let U="";try{const E=aA(I)?await fb(Ze,I):await mb(Ze,I);U=E.bundleId,h(`Imported ${E.recordsImported}/${E.recordsSeen} records from ${O}`);}catch(E){h(`Import failed: ${Fg(E)}`),m(false);return}try{await y(),i(U);}catch(E){h(`Imported ${O}, but refresh failed: ${Fg(E)}`);}finally{m(false);}},P=b?`${e("Bundle Viewer")}: ${b.title}`:e("Bundle Viewer"),N=g.length>0;return f(rl,{title:e("Bundle Viewer"),description:e("{{count}} imported bundles",{count:g.length}),active:N,onClick:n,indicatorColor:"bg-accent",panelClass:"my-1 rounded-box-half border border-accent/40 bg-accent/10 px-2 shadow-sm",buttonClass:"btn-accent",children:f(vr,{class:r?"h-screen max-h-screen max-w-none":"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm h-[82vh] max-h-[calc(100vh-4rem)]",title:e("Bundle Viewer"),show:t,fullscreen:r,onClose:()=>{o(false),n();},children:f("div",{class:"flex min-h-0 grow flex-col gap-2",children:[f("section",{class:"rounded-box-half border border-base-300 bg-base-200 px-2 py-1.5",children:f("div",{class:"flex flex-wrap items-center gap-2",children:[f("label",{class:"btn btn-sm btn-outline",children:[f(xk,{size:16}),"Import Bundle",f("input",{type:"file",accept:".zip,.json,.jsonl,application/zip,application/json,application/x-ndjson",class:"hidden",disabled:u,onChange:I=>{var U;const O=I.target;T((U=O.files)==null?void 0:U[0]),O.value="";}})]}),f("select",{class:"select select-bordered select-sm min-w-56",value:a,onChange:I=>{const O=I.target.value,U=g.find(E=>E.id===O)??null;i(O),l($g(U));},children:[f("option",{value:"",children:"Select imported bundle"}),g.map(I=>f("option",{value:I.id,children:[I.title," (",I.recordCount,")"]},I.id))]}),f("select",{class:"select select-bordered select-sm",value:s,onChange:I=>l(I.target.value),children:[f("option",{value:"tweet",children:"Tweets"}),f("option",{value:"user",children:"Users"})]}),f("button",{class:"btn btn-sm btn-ghost",onClick:()=>void y(),children:[f(ey,{size:16}),"Refresh"]}),b?f("button",{class:"btn btn-sm btn-error btn-outline",onClick:async()=>{confirm(`Delete imported bundle "${b.title}"?`)&&(await Ze.bundleDelete(b.id),i(""),await y());},children:[f(Lk,{size:16}),"Delete"]}):null,f("span",{class:"font-mono text-[10px] opacity-70",children:[u?"busy: ":"",c]})]})}),a?s==="tweet"?f(Zs,{title:P,viewStateKey:`bundle:${a}:tweet`,fullscreen:r,onFullscreenChange:o,loading:S.loading,loadingMore:S.loadingMore,loadedCount:S.loadedCount,totalCount:S.totalCount,hasMore:S.hasMore,loadMore:S.loadMore,loadAll:S.loadAll,hydrateRecordsByIds:S.hydrateRecordsBySnapshotIds,records:S.records,searchDocuments:k,columns:rv,clear:()=>{},showClearButton:false,alternateViews:[{id:"media-masonry",label:"Media masonry",icon:"grid",component:av}],bookmarkFolderOptions:M,renderActions:()=>f("span",{class:"badge badge-outline badge-sm font-mono",children:["imported bundle: ",(b==null?void 0:b.recordCount)??0," records"]})}):f(Zs,{title:P,viewStateKey:`bundle:${a}:user`,fullscreen:r,onFullscreenChange:o,loading:S.loading,loadingMore:S.loadingMore,loadedCount:S.loadedCount,totalCount:S.totalCount,hasMore:S.hasMore,loadMore:S.loadMore,loadAll:S.loadAll,hydrateRecordsByIds:S.hydrateRecordsBySnapshotIds,records:S.records,searchDocuments:k,columns:ov,clear:()=>{},showClearButton:false,renderActions:()=>f("span",{class:"badge badge-outline badge-sm font-mono",children:["imported bundle: ",(b==null?void 0:b.recordCount)??0," records"]})}):f("div",{class:"flex grow items-center justify-center rounded-box-half border border-base-300 bg-base-200 text-sm opacity-70",children:"Import or select a bundle to open it in the explorer."})]})})})}const uA={BookmarksModule:10,TweetIndexModule:20,UserDetailModule:30,UserTweetsModule:40,UserMediaModule:50,LikesModule:60,QuotesModule:70,TweetDetailModule:80,SearchTimelineModule:90,FollowersModule:120,FollowingModule:130,RetweetersModule:140,HomeTimelineModule:220,ListTimelineModule:230,CommunityTimelineModule:240,ListMembersModule:320,ListSubscribersModule:330,CommunityMembersModule:340,DirectMessagesModule:420,LocalSearchModule:9e3,InteractionEventsModule:9010,RuntimeLogsModule:9990},dA={BookmarksModule:"Bookmarks",TweetIndexModule:"Tweets",UserDetailModule:"Users",UserTweetsModule:"User Tweets",UserMediaModule:"User Media",TweetDetailModule:"Tweet Details",SearchTimelineModule:"Search Timeline",HomeTimelineModule:"Home Timeline",ListTimelineModule:"List Timeline",CommunityTimelineModule:"Community Timeline",CommunityMembersModule:"Community Members",ListMembersModule:"List Members",ListSubscribersModule:"List Subscribers",DirectMessagesModule:"Direct Messages",InteractionEventsModule:"Interaction Events",LocalSearchModule:"Local Search",RuntimeLogsModule:"Runtime Logs"},fA={BookmarksModule:{indicatorColor:"bg-warning",panelClass:"border-l-2 border-warning/60 pl-2"},TweetIndexModule:{indicatorColor:"bg-info",panelClass:"border-l-2 border-info/50 pl-2"},UserDetailModule:{indicatorColor:"bg-success",panelClass:"border-l-2 border-success/50 pl-2"},UserTweetsModule:{indicatorColor:"bg-info"},UserMediaModule:{indicatorColor:"bg-info"},TweetDetailModule:{indicatorColor:"bg-info"},SearchTimelineModule:{indicatorColor:"bg-info"},LikesModule:{indicatorColor:"bg-secondary"},QuotesModule:{indicatorColor:"bg-secondary"},RetweetersModule:{indicatorColor:"bg-secondary"},FollowersModule:{indicatorColor:"bg-success"},FollowingModule:{indicatorColor:"bg-success"},HomeTimelineModule:{indicatorColor:"bg-primary"},ListTimelineModule:{indicatorColor:"bg-primary"},CommunityTimelineModule:{indicatorColor:"bg-primary"},ListMembersModule:{indicatorColor:"bg-success"},ListSubscribersModule:{indicatorColor:"bg-success"},CommunityMembersModule:{indicatorColor:"bg-success"},DirectMessagesModule:{indicatorColor:"bg-accent"},LocalSearchModule:{indicatorColor:"bg-neutral",panelClass:"opacity-90"},InteractionEventsModule:{indicatorColor:"bg-neutral",panelClass:"opacity-90"},RuntimeLogsModule:{indicatorColor:"bg-neutral",panelClass:"opacity-90"}};function hA(e){return e===mt.TWEET?{indicatorColor:"bg-info"}:e===mt.USER?{indicatorColor:"bg-success"}:e===mt.CUSTOM?{indicatorColor:"bg-accent"}:{indicatorColor:"bg-neutral"}}function Pc(e){const t=fA[e.name]??hA(e.type);return {rank:uA[e.name]??5e3,titleKey:dA[e.name],...t}}function pA(e,t){const n=Pc(e).rank,r=Pc(t).rank;return n!==r?n-r:e.name.localeCompare(t.name)}function Bg(e){return Pc(e).rank>=9e3}class mA{constructor(t,n,r){be(this,"hash",new jb);be(this,"itemCount",0);be(this,"finalized",false);this.namespaceId=t,this.sourceCheckpoint=n,this.targetCheckpoint=r,this.hash.update('{"items":[');}add(t){if(this.finalized)throw new Error("state bootstrap manifest is already finalized");for(const n of t)this.itemCount&&this.hash.update(","),this.hash.update(Sn(n)),this.itemCount+=1;}digestHex(){if(this.finalized)throw new Error("state bootstrap manifest is already finalized");return this.finalized=true,this.hash.update(`],"mode":"state_bootstrap","namespace_id":${Sn(this.namespaceId)}`),this.hash.update(`,"source_checkpoint":${Sn(this.sourceCheckpoint)}`),this.hash.update(`,"target_checkpoint":${Sn(this.targetCheckpoint)}}`),this.hash.digestHex()}get count(){return this.itemCount}}const gA="twitter-web-exporter",_A=256;class yA extends Error{constructor(t){super(t),this.name="GenerationError";}}function bA(e){throw new yA(e)}function It(e,t){e||bA(t);}function Pf(e,t){return Sn(e)===Sn(t)}function aa(e){return typeof e=="string"||typeof e=="number"?String(e).trim():""}function Ls(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function wA(e){return e.kind==="entity_upsert"||e.kind==="enrichment_upsert"?[e.target.namespace_id]:e.kind==="relationship_upsert"?[e.subject.namespace_id,e.object.namespace_id]:[]}async function vA(e,t){const n=t.mutation;It(n&&typeof n=="object","reconciliation mutation is missing"),It(typeof n.mutation_id=="string"&&n.mutation_id,"mutation id is missing"),It(n.schema_revision===Hn,"mutation schema revision is unsupported"),It(mr(t.record_hash),"reconciliation item record hash is invalid"),It(n.record_hash===t.record_hash,"reconciliation record hash is not bound"),It(wA(n).every(i=>i===e),"reconciliation endpoint namespace is not bound");const{record_hash:r,...o}=n,a=await Fr(e,o);It(a===t.record_hash,"reconciliation mutation record hash mismatch"),(n.kind==="entity_upsert"||n.kind==="enrichment_upsert")&&It(n.payload&&typeof n.payload=="object","entity payload is invalid"),n.kind==="relationship_upsert"&&It(n.payload&&typeof n.payload=="object","relationship payload is invalid");}function kA(e,t){It(Pf(e.protocol,Qn),"reconciliation protocol mismatch"),It(e.namespace_id===t.namespace_id,"reconciliation namespace mismatch"),It(e.mode==="state_bootstrap","generation requires a state bootstrap stream"),It(ta(e.source_checkpoint),"reconciliation source checkpoint is invalid"),It(ta(e.target_checkpoint),"reconciliation target checkpoint is invalid"),It(e.source_checkpoint.namespace_id===t.namespace_id&&e.target_checkpoint.namespace_id===t.namespace_id,"reconciliation checkpoint namespace mismatch"),It(mr(e.manifest_hash),"reconciliation manifest hash is invalid"),It(Number.isInteger(e.item_count)&&e.item_count>=0,"reconciliation item count is invalid"),It(Number.isInteger(e.page_count)&&e.page_count>0,"reconciliation page count is invalid");}async function xA(e,t,n,r,o,a,i){var u;It(Pf(e.protocol,Qn),"reconciliation page protocol mismatch"),It(e.stream_id===t.stream_id,"reconciliation page stream mismatch"),It(e.namespace_id===t.namespace_id,"reconciliation page namespace mismatch"),It(e.mode===t.mode,"reconciliation page mode mismatch"),It(e.page_index===n,"reconciliation page index is not contiguous"),It(e.manifest_hash===t.manifest_hash,"reconciliation page manifest mismatch"),It(Pf(e.target_checkpoint,t.target_checkpoint),"reconciliation page checkpoint mismatch"),It(e.item_count===e.items.length,"reconciliation page item count mismatch"),It(e.item_count>=0&&e.byte_count>=0,"reconciliation page byte count is invalid"),It(new TextEncoder().encode(Sn(e.items)).byteLength===e.byte_count,"reconciliation page byte count proof mismatch");const{page_hash:s,...l}=e;It(mr(e.page_hash),"reconciliation page hash is invalid"),It(await pa(l)===e.page_hash,"reconciliation page hash mismatch");let c=r,h=o;e.mode==="deltas"&&(It(mr(e.previous_chain_hash),"delta page previous chain hash is invalid"),It(e.previous_chain_hash===r,"delta page chain link mismatch"));for(const m of e.items)It(Number.isInteger(m.archive_seq)&&m.archive_seq>=0,"reconciliation archive sequence is invalid"),It(typeof m.mutation_id=="string"&&m.mutation_id===m.mutation.mutation_id,"reconciliation mutation id mismatch"),It(!a.has(m.mutation_id),"reconciliation mutation id is duplicated"),a.add(m.mutation_id),await vA(t.namespace_id,m),e.mode==="deltas"?(It(m.archive_seq===h,"delta archive sequence is not contiguous"),It(mr(m.chain_hash),"delta item chain hash is invalid"),c=m.chain_hash,h+=1):(It(typeof m.state_key=="string"&&m.state_key,"bootstrap state key is missing"),It(!i.has(m.state_key),"bootstrap state key is duplicated"),i.add(m.state_key));if(e.mode==="deltas"){const m=e.items.length?(u=e.items[e.items.length-1])==null?void 0:u.chain_hash:t.target_checkpoint.chain_hash;It(e.next_chain_hash===m,"delta page next chain hash mismatch"),e.items.length||(c=t.target_checkpoint.chain_hash);}return {nextChainHash:c,nextArchiveSequence:h}}function Ug(e){const t={...e.payload};return e.target.kind==="tweet"&&!aa(t.rest_id)&&(t.rest_id=e.target.id),e.target.kind==="user"&&!aa(t.rest_id)&&(t.rest_id=e.target.id),t}function jg(e){const t=Ls(e.qualifier),n=Ls(e.payload),r=aa(t.extension),o=aa(n.extension),a=e.object.id.startsWith("capture:")?e.object.id.slice(8):"";return r||o||a}function SA(e){const t=new Map,n=new Map,r=new Map,o=new Map,a=new Map,i=new Set,s=new Set,l=new Set,c=new Set;for(const h of e){const u=h.mutation;if(u.kind==="entity_upsert"){u.target.kind==="tweet"?(i.delete(u.target.id),t.set(u.target.id,Ug(u))):u.target.kind==="user"&&(s.delete(u.target.id),n.set(u.target.id,Ug(u)));continue}if(u.kind==="enrichment_upsert"){if(u.enrichment_kind==="article_markdown"&&u.target.kind==="tweet"){const m=Ls(u.payload),g=typeof m.markdown=="string"?m.markdown:"";It(g,"article Markdown enrichment is missing");const y=o.get(u.target.id);o.set(u.target.id,{...y,twe_private_fields:{...y==null?void 0:y.twe_private_fields,article_markdown:g,article_markdown_version:typeof m.version=="number"&&Number.isFinite(m.version)?m.version:1}});}else if(u.enrichment_kind==="media_reference"&&u.target.kind==="media_reference"){const m=`canonical-media-reference-${u.target.id}`;r.set(m,{id:m,extension:"canonical-media-reference",type:mt.CUSTOM,data_key:u.target.id,created_at:Number(u.observed_at_ms)||0,canonical_payload:u.payload});}continue}if(u.kind==="relationship_upsert"){if(u.relationship_kind==="capture_membership"){const m=jg(u);It(m,"capture membership extension is missing"),It(u.subject.kind==="tweet"||u.subject.kind==="user"||u.subject.kind==="media_reference","capture membership subject kind is unsupported");const g=`${m}-${u.subject.id}`;l.delete(g),r.set(g,{id:g,extension:m,type:u.subject.kind==="user"?mt.USER:u.subject.kind==="tweet"?mt.TWEET:mt.CUSTOM,data_key:u.subject.id,created_at:Number(u.observed_at_ms)||0});}else if(u.relationship_kind==="social_edge"){It(u.subject.kind==="user"&&u.object.kind==="user","social edge endpoints are invalid");const m=Ls(u.payload),g=aa(m.relation_type||m.relationType);It(g==="follower"||g==="following"||g==="subscription","social edge relation type is unsupported");const y=jg(u)||"canonical",b=aa(m.id)||`${y}-${u.subject.id}-${g}-${u.object.id}`;c.delete(b),a.set(b,{...m,id:b,extension:y,relation_type:g,subject_user_id:u.subject.id,related_user_id:u.object.id,observed_at:Number(m.observed_at)||Number(u.observed_at_ms)||0});}else if(u.relationship_kind==="bookmark_folder_membership"&&u.subject.kind==="tweet"){const m=Ls(u.payload),g={},y=aa(m.folder_id),b=aa(m.folder_name);y&&(g.__bookmark_folder_id=y),b&&(g.__bookmark_folder_name=b),Object.keys(g).length&&o.set(u.subject.id,{...o.get(u.subject.id),...g});}continue}if(u.kind==="tombstone"){if(u.target_kind==="tweet")t.delete(u.target_id),i.add(u.target_id);else if(u.target_kind==="user")n.delete(u.target_id),s.add(u.target_id);else if(u.target_kind==="relationship"){const m=/^capture-membership:(tweet|user):([^:]+):(.+)$/.exec(u.target_id);if(u.relationship_kind==="capture_membership"&&m){const g=`${m[2]}-${m[3]}`;r.delete(g),l.add(g);}else a.delete(u.target_id),c.add(u.target_id);}}}return {tweets:[...t.values()],tweetPatches:[...o].map(([h,u])=>({id:h,fields:u})),users:[...n.values()],captures:[...r.values()],socialEdges:[...a.values()],deleteTweets:[...i],deleteUsers:[...s],deleteCaptures:[...l],deleteSocialEdges:[...c]}}function iv(e){const t=e.captures+e.tweets+e.users+e.social_edges+e.search_documents;return {...e,total:t}}function CA(e){return `${gA}-generation-${e.replace(/[^a-zA-Z0-9_-]/g,"").slice(-48)}`}function sv(e,t){return {...e,state:"failed",updated_at_ms:Date.now(),error:t instanceof Error?t.message:String(t)}}async function Ih(e){var l,c,h,u,m;const t=Ab(),n=CA(t),r=Wi(e.pairing.archive_id,e.pairing.namespace_id),o=(r==null?void 0:r.database_name)??null,a={schema_version:1,state:"staging",generation_id:t,database_name:n,previous_database_name:o,archive_id:e.pairing.archive_id,namespace_id:e.pairing.namespace_id,started_at_ms:Date.now(),updated_at_ms:Date.now()};ff(a);let i=null,s=false;try{const g=Math.max(1,Math.min(1e4,Math.floor(Number(e.pageHint)||_A))),y={protocol:Qn,request_id:`${t}-reconcile`,archive_id:e.pairing.archive_id,namespace_id:e.pairing.namespace_id,client_id:e.pairing.client_id,client_epoch:e.pairing.client_epoch,sent_at_ms:Date.now(),mode:"state_bootstrap",after_checkpoint:null,known_checkpoint:null,page_hint:g};(l=e.onProgress)==null||l.call(e,{phase:"reconcile"});const b=await e.client.reconcile(y);kA(b,e.pairing),i=((c=e.databaseFactory)==null?void 0:c.call(e,n))??new tu({databaseName:n,publishActiveName:!1}),await i.whenReady();const k=new mA(b.namespace_id,b.source_checkpoint,b.target_checkpoint),S=new Set,M=new Set;let T=0,P,N=b.source_checkpoint.chain_hash,I=b.source_checkpoint.archive_seq+1,O=0;for(;;){const xe=await e.client.reconciliationPage(b.stream_id,P),G=await xA(xe,b,T,N,I,S,M);if(k.add(xe.items),O+=xe.items.length,N=G.nextChainHash,I=G.nextArchiveSequence,await i.applyGenerationProjection(SA(xe.items)),(h=e.onProgress)==null||h.call(e,{phase:"project",page_index:T,page_count:b.page_count,item_count:O}),T+=1,xe.final)break;It(typeof xe.next_cursor=="string"&&xe.next_cursor,"reconciliation page cursor is missing"),P=xe.next_cursor,It(T<b.page_count,"reconciliation stream exceeded its page count");}It(T===b.page_count,"reconciliation stream page count mismatch"),It(O===b.item_count,"reconciliation stream item count mismatch");const U=k.digestHex();It(U===b.manifest_hash,"reconciliation manifest hash mismatch"),It(b.target_checkpoint.archive_seq>=b.source_checkpoint.archive_seq,"reconciliation target checkpoint regressed"),await i.deleteGenerationPatchStubs(),(u=e.onProgress)==null||u.call(e,{phase:"derive",item_count:O}),await i.rebuildGenerationSearchDocuments(),await i.rebuildGenerationDerivedIndexes();const E=await i.generationProjectionHash(),v=await i.count();It(v!==null,"staged database statistics are unavailable");const L=iv({captures:v.captures,tweets:v.tweets,users:v.users,social_edges:v.social_edges,search_documents:v.search_documents}),$={schema_version:1,state:"active",verification:"verified",protocol_version:Qn,archive_schema_revision:Hn,browser_generation_revision:1,generation_id:t,database_name:n,previous_database_name:o,archive_id:e.pairing.archive_id,namespace_id:e.pairing.namespace_id,target_checkpoint:b.target_checkpoint,manifest_hash:b.manifest_hash,projection_hash:E,item_count:b.item_count,page_count:b.page_count,counts:L,verified_at_ms:Date.now(),activated_at_ms:Date.now()};return (m=e.onProgress)==null||m.call(e,{phase:"activate",item_count:O}),IT($),s=!0,AT(n),hf(),i.close(),i=null,{pointer:$,counts:L,previous_database_name:o}}catch(g){try{i==null||i.close();}catch{}if(!s)try{await wn.delete(n);}catch{}try{ff(sv(a,g));}catch{}throw g}}async function TA(){const e=RT();if(!e)return {recovered:false,database_name:null};const t=Gi();if((t==null?void 0:t.database_name)===e.database_name)return hf(),{recovered:false,database_name:e.database_name};try{return await wn.delete(e.database_name),hf(),{recovered:!0,database_name:e.database_name}}catch(n){try{ff(sv(e,n));}catch{}throw n}}async function MA(e){await TA();const t=Wi(e.pairing.archive_id,e.pairing.namespace_id);if(t)try{if(await wn.exists(t.database_name)){const r=new tu({databaseName:t.database_name,publishActiveName:!1});await r.whenReady();const o=await r.count();if(o){const a=iv({captures:o.captures,tweets:o.tweets,users:o.users,social_edges:o.social_edges,search_documents:o.search_documents}),i=await r.generationProjectionHash();if(r.close(),Sn(a)===Sn(t.counts)&&i===t.projection_hash){const s=await e.client.checkpoint(e.pairing.namespace_id);if(Sn(s)===Sn(t.target_checkpoint)&&mr(t.manifest_hash))return null}}else r.close();}}catch{}return Ih(e)}const IA={matrix_revision:"1.0.0"},RA=512,EA="b".repeat(64);class AA extends Error{constructor(n,r){super(n);be(this,"report");this.name="MigrationError",this.report=r;}}function DA(e,t){throw new AA(e,t)}function $r(e,t){e||DA(t);}function Oc(e,t=new Set){if(!e||typeof e!="object")return false;const n=e;if(t.has(n))return false;if(t.add(n),Array.isArray(e))return e.some(o=>Oc(o,t));const r=new Set(["dm","direct_message","direct_messages","conversation_id","recipient_ids","private_message","private_messages"]);return Object.entries(e).some(([o,a])=>{const i=o.trim().toLowerCase().replace(/-/g,"_");return r.has(i)||Oc(a,t)})}function PA(e,t){for(const n of t){const r=e[n];if(typeof r=="string"||typeof r=="number"){const o=String(r).trim();if(o)return o}}return ""}function Of(e){return `${e}-${Ab()}`}function au(e,t){return {source:e,source_event_id:t,extractor_rev:"browser-bootstrap-v1"}}function OA(e){const t=e.legacy,n=[e.created_at_ms,e.created_at,t&&typeof t=="object"?t.created_at_ms:void 0,t&&typeof t=="object"?t.created_at:void 0];for(const r of n){if(typeof r=="number"&&Number.isFinite(r))return Math.trunc(r);if(typeof r=="string"&&r.trim()){const o=Date.parse(r);if(Number.isFinite(o))return o}}return 0}async function Hg(e,t,n,r){const o=n,a=PA(o,["rest_id","id","id_str"]);$r(a,`browser bootstrap ${t} row has no stable id at index ${r}`),$r(!Oc(o),`browser bootstrap rejected private ${t} payload ${a}`);const i={mutation_id:`bootstrap-entity-${t}-${a}`,client_seq:0,kind:"entity_upsert",schema_revision:Hn,target:{namespace_id:e,kind:t,id:a},payload:o,provenance:au("browser-bootstrap-v1",`${t}:${a}`),observed_at_ms:OA(o)};return {...i,record_hash:await Fr(e,i)}}async function LA(e,t){const n=String(t.data_key||"").trim(),r=String(t.extension||"").trim();$r(n&&r,"browser bootstrap media reference has no stable key");const o={mutation_id:`bootstrap-media-${r}-${n}`,client_seq:0,kind:"entity_upsert",schema_revision:Hn,target:{namespace_id:e,kind:"media_reference",id:n},payload:{data_key:n,extension:r,type:"media_reference"},provenance:au("browser-bootstrap-v1",`media:${r}:${n}`),observed_at_ms:Number(t.created_at)||0};return {...o,record_hash:await Fr(e,o)}}async function NA(e,t){const n=String(t.data_key||"").trim(),r=String(t.extension||"").trim();$r(n&&r,"browser bootstrap capture has no stable key");const o=t.type==="user"?"user":t.type==="tweet"?"tweet":"media_reference",a={mutation_id:`bootstrap-capture-${t.id}`,client_seq:0,kind:"relationship_upsert",schema_revision:Hn,relationship_kind:"capture_membership",subject:{namespace_id:e,kind:o,id:n},object:{namespace_id:e,kind:"folder",id:`capture:${r}`},qualifier:{extension:r},payload:{extension:r,data_key:n,type:o,created_at:Number(t.created_at)||0},provenance:au("browser-bootstrap-v1",`capture:${t.id}`),observed_at_ms:Number(t.created_at)||0};return {...a,record_hash:await Fr(e,a)}}async function FA(e,t){const n=String(t.subject_user_id||"").trim(),r=String(t.related_user_id||"").trim(),o=String(t.extension||"").trim();$r(n&&r&&o,"browser bootstrap social edge is incomplete"),$r(t.relation_type==="follower"||t.relation_type==="following"||t.relation_type==="subscription","browser bootstrap social edge relation is unsupported");const a=t;$r(!Oc(a),`browser bootstrap rejected private social edge ${t.id}`);const i={mutation_id:`bootstrap-edge-${t.id}`,client_seq:0,kind:"relationship_upsert",schema_revision:Hn,relationship_kind:"social_edge",subject:{namespace_id:e,kind:"user",id:n},object:{namespace_id:e,kind:"user",id:r},qualifier:{extension:o},payload:a,provenance:au("browser-bootstrap-v1",`social-edge:${t.id}`),observed_at_ms:Number(t.observed_at)||0};return {...i,record_hash:await Fr(e,i)}}async function $A(e,t){const n=[];for(const[r,o]of t.tweets.entries())n.push(await Hg(e,"tweet",o,r));for(const[r,o]of t.users.entries())n.push(await Hg(e,"user",o,r));for(const r of t.captures)r.type!=="tweet"&&r.type!=="user"&&n.push(await LA(e,r)),n.push(await NA(e,r));for(const r of t.socialEdges)n.push(await FA(e,r));return n}function BA(e,t){return e.map((n,r)=>({...n,client_seq:t+r}))}async function UA(e){var r,o;const t={batch_id:Of("bootstrap-batch"),mutation_count:e.mutations.length,mutations:e.mutations,batch_hash:await Wy(e.pairing.namespace_id,{mutations:e.mutations})},n={protocol:Qn,request_id:Of("bootstrap-request"),archive_id:e.pairing.archive_id,namespace_id:e.pairing.namespace_id,client_id:e.pairing.client_id,client_epoch:e.pairing.client_epoch,sent_at_ms:Date.now(),client_sequence:{from:((r=e.mutations[0])==null?void 0:r.client_seq)??1,to:((o=e.mutations[e.mutations.length-1])==null?void 0:o.client_seq)??1},batch:t,known_checkpoint:e.knownCheckpoint};return e.client.commit(n)}function jA(e){return {schema_version:1,migration_id:e.migrationId,phase:e.phase,archive_id:e.pairing.archive_id,namespace_id:e.pairing.namespace_id,source_generation_id:e.sourceGenerationId,source_database_name:e.sourceDatabaseName,target_generation_id:null,target_database_name:null,source_protocol:Qn,target_protocol:Qn,source_schema_revision:Hn,target_schema_revision:Hn,transform_id:e.compatibility.transform_id,transform_hash:e.compatibility.transform_hash,source_checkpoint:e.sourceCheckpoint,target_checkpoint:null,event_id:1,updated_at_ms:Date.now(),compatibility:e.compatibility.status}}function To(e,t,n={}){return {...e,...n,phase:t,event_id:e.event_id+1,updated_at_ms:Date.now()}}async function HA(e){var i;const t=e.identity.observe(e.identityEvidence);$r(t.admitted,`browser bootstrap identity is not admitted: ${t.reason}`),$r(Number.isInteger(e.clientSequenceStart)&&e.clientSequenceStart>=1,"bootstrap client sequence start is invalid");const n={status:"compatible",reason:"explicit browser-only archive bootstrap",matrix_revision:IA.matrix_revision,transform_id:"browser-bootstrap-v1",transform_hash:EA},r=Wi(e.pairing.archive_id,e.pairing.namespace_id);let o=null,a=jA({migrationId:Of("bootstrap-migration"),pairing:e.pairing,compatibility:n,sourceGenerationId:(r==null?void 0:r.generation_id)??null,sourceDatabaseName:(r==null?void 0:r.database_name)??null,sourceCheckpoint:o,phase:"planned"});ho(a);try{const s=await e.client.capabilities();$r(s.protocol_versions.some(b=>b.major===Qn.major&&b.minor===Qn.minor),"companion does not advertise the declared bootstrap protocol");const l=await e.client.health();$r(((i=l.archive)==null?void 0:i.archive_id)===e.pairing.archive_id,"bootstrap archive binding is not proven"),o=await e.client.checkpoint(e.pairing.namespace_id),$r(o.archive_seq===0,"browser bootstrap requires an empty canonical archive"),a=To(a,"preflighted",{source_checkpoint:o}),ho(a);const c=await e.manager.readGenerationSourceRows(),h=BA(await $A(e.pairing.namespace_id,c),e.clientSequenceStart),u=Math.max(1,Math.min(4096,Math.floor(Number(e.batchSize)||RA)));let m=o;a=To(a,"staging"),ho(a);const g=[];for(let b=0;b<h.length;b+=u){const k=h.slice(b,b+u),S=await UA({pairing:e.pairing,client:e.client,mutations:k,knownCheckpoint:m});g.push({batch_id:S.batch_id,checkpoint:S.checkpoint}),m=S.checkpoint,a=To(a,"staging",{target_checkpoint:m}),ho(a);}a=To(a,"browser_rebuilding",{target_checkpoint:m}),ho(a);const y=await Ih({pairing:e.pairing,client:e.client});return a=To(a,"browser_verified",{target_generation_id:y.pointer.generation_id,target_database_name:y.pointer.database_name,target_checkpoint:y.pointer.target_checkpoint}),ho(a),a=To(a,"committed"),ho(a),{receipts:g,generation:y,source_counts:{tweets:c.tweets.length,users:c.users.length,captures:c.captures.length,social_edges:c.socialEdges.length}}}catch(s){try{ho(To(a,"rollback_required",{error:s instanceof Error?s.message:String(s)}));}catch{}throw s}}function qA(){return Pb()}function VA(e){return !!(e&&(e.tweets>0||e.users>0||e.captures>0||e.social_edges>0))}async function zA(e){const t=Gi(),n=Wi(e.pairing.archive_id,e.pairing.namespace_id);if(t&&!n)return {source_present:false,canonical_present:false,bootstrapped:false,result:null};if(n)return {source_present:false,canonical_present:true,bootstrapped:false,result:null};const r=e.manager;await r.whenReady();const o=await r.count();return VA(o)?(await e.client.checkpoint(e.pairing.namespace_id)).archive_seq>0?{source_present:true,canonical_present:true,bootstrapped:false,result:null}:{source_present:true,canonical_present:false,bootstrapped:true,result:await HA(e)}:{source_present:false,canonical_present:false,bootstrapped:false,result:null}}function KA(){const e=Pb();if(!e)return {action:"none",migration_id:null,reason:"migration-journal-missing"};if(e.phase==="committed")return {action:"none",migration_id:e.migration_id,reason:"migration-already-committed"};if(e.phase==="rolled_back"||e.phase==="rollback_required"||e.phase==="failed")return {action:"rollback_required",migration_id:e.migration_id,reason:e.phase};const t=Gi(),n=!!(t&&e.target_generation_id&&t.generation_id===e.target_generation_id&&t.archive_id===e.archive_id&&t.namespace_id===e.namespace_id);if(e.phase==="browser_verified"&&n){const o=To(e,"committed");return ho(o),{action:"committed",migration_id:e.migration_id,reason:"verified-target-pointer-resumed"}}const r=To(e,"rollback_required",{error:"interrupted migration has no unambiguous verified target pointer"});return ho(r),{action:"rollback_required",migration_id:e.migration_id,reason:"interrupted migration requires explicit recovery"}}class Hi extends Error{constructor(t){super(t),this.name="RecoveryOperationError";}}function cl(e){const t=Ki();if(!t)throw new Hi("Companion pairing is required");if(e){const n=sl().identity.observe();if(!n.admitted)throw new Hi(`Active identity proof is required: ${n.reason}`)}return {pairing:t,client:new Zc(t)}}async function GA(){return cl(false).client.listSnapshots()}async function WA(e=false){const{client:t}=cl(true),n=await t.createSnapshot(e);return await t.verifySnapshot(n.snapshot_id),n}async function YA(e){const{pairing:t,client:n}=cl(true),o=(await n.listSnapshots()).find(s=>s.snapshot_id===e);if(!o)throw new Hi("Selected snapshot is not verified and available");await n.verifySnapshot(e),await n.restoreSnapshot(e);const a=await Ih({pairing:t,client:n});_h();const i=await ji({force:true,acknowledgeCacheReset:true});if(i.phase==="recovery_required")throw new Hi(`Restored browser projection failed safety checks: ${i.reason}`);return {snapshot:o,generation:a,safety:i}}async function JA(e){const{pairing:t,client:n}=cl(true);if(qA())throw new Hi("Durable destruction is blocked while migration state exists");const r=sl(),[o,a]=await Promise.all([r.outbox.usage(),n.health()]),i=Array.isArray(a.active_namespace_ids)?a.active_namespace_ids.filter(s=>typeof s=="string"&&s.length>0).sort():[];if(!i.includes(t.namespace_id))throw new Hi("Paired namespace is not active in the canonical archive");return n.destroyPreflight({archive_id:t.archive_id,namespace_ids:i,migration_active:false,pending_count:o.pending_mutations,pending_acknowledged:e.pendingAcknowledged,explicit_loss_acknowledgement:e.explicitLossAcknowledgement})}async function XA(e,t){const{client:n}=cl(true),r=await n.destroyConfirm(e,t);await Ui().clear();const o=await ji({force:true,acknowledgeCacheReset:true});return {...r,safety:o}}const qg="CLEAR BROWSER CACHE";function ZA({snapshot:e,onRetry:t}){var u,m;const n=tn(false),r=tn(""),o=Ki()!==null,a=async()=>{if(!n.value){n.value=true,r.value="Rechecking browser persistence…";try{await t(),n.value=!1,r.value="Recovery remains required; no cache state was activated.";}catch(g){r.value=`Recheck failed: ${g instanceof Error?g.message:String(g)}`,n.value=false;}}},i=async()=>{if(!(n.value||e.storage_backend==="unavailable"||window.prompt(`This clears the disposable browser cache. Type ${qg} to continue.`)!==qg)){n.value=true,r.value="Clearing browser cache and rebuilding its continuity baseline…";try{await kw(),window.location.reload();}catch(y){r.value=`Cache clear failed: ${y instanceof Error?y.message:String(y)}`,n.value=false;}}},s=async()=>{if(n.value)return;const g=window.confirm("Create an encrypted snapshot? Cancel creates a verified plaintext snapshot.");n.value=true,r.value="Creating and verifying canonical snapshot…";try{const y=await WA(g);r.value=`Verified snapshot created: ${y.snapshot_id}`;}catch(y){r.value=`Snapshot creation failed: ${y instanceof Error?y.message:String(y)}`;}finally{n.value=false;}},l=async()=>{var g;if(!n.value){n.value=true,r.value="Loading verified snapshots…";try{const y=await GA();if(!y.length){r.value="No verified snapshots are available.";return}const b=((g=y[0])==null?void 0:g.snapshot_id)??"",k=window.prompt(`Restore a canonical snapshot and rebuild the browser cache. Available snapshots:
${y.map(M=>`${M.snapshot_id} (${new Date(M.verified_at_ms).toLocaleString()})`).join(`
`)}
Enter a snapshot id:`,b);if(!k||!y.some(M=>M.snapshot_id===k)){r.value="Snapshot restore cancelled.";return}if(window.prompt(`This replaces the canonical archive state, retains the previous database for rollback, and preserves the browser outbox. Type RESTORE ${k} to continue.`)!==`RESTORE ${k}`){r.value="Snapshot restore cancelled.";return}r.value="Restoring snapshot and rebuilding the browser projection…",await YA(k),window.location.reload();}catch(y){r.value=`Snapshot restore failed: ${y instanceof Error?y.message:String(y)}`;}finally{n.value=false;}}},c=async()=>{if(!(n.value||!window.confirm("Destroying the durable archive is irreversible unless a verified snapshot can be restored. Continue to guarded preflight?")||!window.confirm("Any browser outbox mutations not yet acknowledged by the companion may be lost. Acknowledge this risk and continue?"))){n.value=true,r.value="Preparing guarded durable archive destruction…";try{const b=await JA({pendingAcknowledged:!0,explicitLossAcknowledgement:!0}),k=b.namespace_disclosures.map(M=>`${M.namespace_id} (identity ${M.identity_fingerprint})`).join(`
`),S=window.prompt(`Canonical archive: ${b.archive_id}
Namespace/account bindings:
${k}
Pending mutations disclosed: ${b.pending_count}
Verified snapshot available: ${b.recent_verified_snapshot?"yes":"no"}
Type ${b.required_phrase} to continue.`);if(S!==b.required_phrase){r.value="Durable archive destruction cancelled.";return}if(!window.confirm("Final confirmation: permanently destroy the canonical archive now?")){r.value="Durable archive destruction cancelled.";return}r.value="Destroying canonical archive while preserving verified snapshots…",await XA(b,S),window.location.reload();}catch(b){r.value=`Durable archive destruction failed: ${b instanceof Error?b.message:String(b)}`;}finally{n.value=false;}}},h=e.current_counts;return f("div",{class:"fixed inset-0 z-[2147483647] flex items-center justify-center bg-base-300/90 p-4",children:f("section",{class:"card w-full max-w-xl border border-warning bg-base-100 shadow-2xl",children:f("div",{class:"card-body gap-3",children:[f("h1",{class:"card-title text-warning",children:"Scrollmark recovery required"}),f("p",{children:"Scrollmark found a browser-cache discontinuity. Capture is blocked until the archive state is verified or the disposable cache is explicitly cleared."}),f("div",{class:"rounded-box bg-base-200 p-3 font-mono text-xs",children:[f("div",{children:["Reason: ",e.reason]}),f("div",{children:["Storage: ",e.storage_backend]}),f("div",{children:["Persistence: ",((u=e.persistence)==null?void 0:u.state)||"unknown"]}),f("div",{children:["Database: ",((m=e.inventory)==null?void 0:m.active_db_name)||"unknown"]}),f("div",{children:["Current rows: ",h?h.total.toLocaleString():"unavailable"]}),e.error?f("div",{class:"mt-1 text-error",children:e.error}):null]}),f("p",{class:"text-sm opacity-70",children:["Browser cache clearing never deletes the companion archive. Snapshot restore changes the canonical archive and then rebuilds the disposable browser projection. Durable archive destruction uses a separate guarded, double-confirmed path and preserves snapshots.",o?"":" Companion recovery actions remain disabled until a local companion is paired."]}),r.value?f("p",{class:"text-sm text-warning",children:r.value}):null,f("div",{class:"card-actions justify-end gap-2",children:[f("button",{class:"btn btn-outline",disabled:n.value,onClick:()=>void a(),children:"Recheck and restart"}),f("button",{class:"btn btn-outline",disabled:n.value||!o,onClick:()=>void s(),children:"Create snapshot"}),f("button",{class:"btn btn-info",disabled:n.value||!o,onClick:()=>void l(),children:"Restore snapshot"}),f("button",{class:"btn btn-warning",disabled:n.value||e.storage_backend==="unavailable",onClick:()=>void i(),children:"Clear browser cache"}),f("button",{class:"btn btn-error",disabled:n.value||!o,onClick:()=>void c(),children:"Destroy durable archive"})]})]})})})}function QA(){const e=yr.value;return e.phase==="recovery_required"?f(ZA,{snapshot:e,onRetry:async()=>{(await ji({force:true})).phase!=="recovery_required"&&window.location.reload();}}):f(eD,{})}function eD(){var M;const{t:e}=er(),t=yr.value,{extensions:n,resolvedTheme:r,showControlPanel:o,hookStats:a,runtimeModes:i,rawCaptureStats:s,toggleControlPanel:l}=MS(e("Open Control Panel")),c=T=>e(typeof T=="boolean"?T?"on":"off":String(T||"unknown")),h=T=>T===null?"":e("{{seconds}}s ago",{seconds:T}),u=(()=>{const T=a.value;if(!T)return e("Hooks: {{status}}",{status:e("unknown")});const P=T.lastAt?Math.max(0,Math.floor((Date.now()-T.lastAt)/1e3)):null;let N=T.lastUrl||"";try{const O=new URL(N);N=`${O.hostname}${O.pathname}`;}catch{}N.length>48&&(N=N.slice(0,45)+"...");const I=h(P);return T.lastUrl?e("Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})",{xhr:T.xhrMessages,fetch:T.fetchMessages,url:N,age:I}):e("Hooks: xhr {{xhr}}, fetch {{fetch}}",{xhr:T.xhrMessages,fetch:T.fetchMessages})})(),m=(()=>{const T=i.value,P=s.value,N=c(T==null?void 0:T.safeMode),I=c(T==null?void 0:T.hookMode),O=c(T==null?void 0:T.repairMode),U=Number((P==null?void 0:P.total)||0),E=Number((P==null?void 0:P.spool_count)||0),v=c(P==null?void 0:P.daemon_online),L=c(P==null?void 0:P.monitor_role),$=P!=null&&P.last_at?Math.max(0,Math.floor((Date.now()-P.last_at)/1e3)):null,xe=h($);return xe?e("Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}",{safe:N,hook:I,repair:O,raw:U,spool:E,daemon:v,monitor:L,age:xe}):e("Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}",{safe:N,hook:I,repair:O,raw:U,spool:E,daemon:v,monitor:L})})(),g=`Persistence: ${((M=t.persistence)==null?void 0:M.state)||"unknown"} | continuity: ${t.phase} (${t.reason})`,y=n.value.slice().sort(pA),b=y.filter(T=>!Bg(T)),k=y.filter(Bg),S=T=>{const P=T.render();return T.enabled&&P?f(Ts,{children:f(P,{extension:T})},T.name):null};return f(sr,{children:[f(RS,{currentTheme:r.value,onToggle:l}),f(UM,{currentTheme:r.value,show:!!o.value,title:"Scrollmark",byline:"By Kyle McCleary",description:e("Browse around to capture more data."),hookLine:u,healthLine:m,persistenceLine:g,onToggle:l,children:f(Ts,{children:[b.map(S),f(Ts,{children:f(cA,{})}),k.length?f("div",{class:"divider mb-0 mt-1 opacity-60"}):null,k.map(S)]})})]})}const Lf="BookmarksModule",Ns="SyntheticUsersModule",tD="twe_enable_synthetic_db_tools_v1",Vg=2500,zg=1e4,Kg=1e3,nD=5e3,rD=1e4,oD=85e3,aD=87500,lv=997,iD={"1k":{count:1e3,folderDistribution:"mixed"},"10k":{count:1e4,folderDistribution:"mixed"},"50k":{count:5e4,folderDistribution:"mixed"},"100k":{count:1e5,folderDistribution:"mixed"},"250k":{count:25e4,folderDistribution:"mixed"},hugeFolder100k:{count:1e5,folderDistribution:"one-huge"},manyFolders100k:{count:1e5,folderDistribution:"many-small"},noFolders10k:{count:1e4,folderDistribution:"none"},captureScroll100k:{count:1e5,folderDistribution:"none",includeSearchDocuments:false}};function cv(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return Math.abs(t).toString(36)}function uv(e,t){if(t==="none")return {};if(t==="one-huge")return {id:"synthetic-folder-huge",name:"Synthetic Huge Folder",nameSource:"api"};const r=e%(t==="many-small"?2e3:48);return t==="mixed"&&e%7===0?{}:t==="mixed"&&e%5===0?{id:`synthetic-folder-${r}`}:{id:`synthetic-folder-${r}`,name:`Synthetic Folder ${r}`,nameSource:"api"}}function sD(e,t){const n=String(9e12+e);return {__typename:"User",id:n,rest_id:n,affiliates_highlighted_label:{},has_graduated_access:true,is_blue_verified:e%11===0,profile_image_shape:"Circle",legacy:{default_profile:false,default_profile_image:false,description:`Synthetic researcher ${e} writing about local archives, search, and browser performance.`,entities:{description:{urls:[]},url:{urls:[]}},fast_followers_count:e%1e3,favourites_count:e*3,followers_count:100+e*2,friends_count:50+e,has_custom_timelines:false,is_translator:false,listed_count:e%40,media_count:e%70,normal_followers_count:100+e*2,pinned_tweet_ids_str:[],possibly_sensitive:false,profile_interstitial_type:"",statuses_count:1e3+e,translator_type:"none",want_retweets:true,withheld_in_countries:[]},avatar:{image_url:`https://example.invalid/avatar-${e}.jpg`},core:{created_at:new Date(t-e*864e5).toUTCString(),name:`Synthetic Researcher ${e}`,screen_name:`synthetic_researcher_${e}`},dm_permissions:{can_dm:false},location:{location:"Synthetic Lab"},media_permissions:{can_media_tag:false},privacy:{protected:false},verification:{verified:e%13===0},relationship_perspectives:{following:false,followed_by:false},twe_private_fields:{created_at:t-e*864e5,updated_at:t}}}function lD(e,t,n,r,o){const a=String(8e12+e),i=n-e*6e4,s=uv(e,r),l=["local-first archive scaling","IndexedDB cursor pagination","advanced phrase search quality","bookmark folder recovery","virtual table row measurement","streaming export reliability"][e%6],c=o==="variable-heights"&&e%9===0?[`Synthetic bookmark ${e} about ${l}.`,`Exact phrase checkpoint ${e%97}.`,"This intentionally long row repeats enough local-archive context to force wrapped table content across several lines.","It exercises estimated source heights, measured row-height cache updates, translated header labels, and scroll spacer correction without requiring a full dataset load.","The row should remain readable and must not overlap adjacent rows when the virtual window moves."].join(" "):"",h=o==="variable-heights"&&e%7===0||o==="sparse-media"&&e%lv===0||o==="dense-media"?[{id_str:`synthetic-media-${e}`,media_key:`3_${8e12+e}`,type:"photo",media_url_https:`https://example.invalid/synthetic-media-${e}.jpg`,ext_alt_text:`Synthetic media thumbnail ${e}`,indices:[0,10]}]:[],u={__typename:"Tweet",rest_id:a,core:{user_results:{result:t}},edit_control:{edit_tweet_ids:[a],editable_until_msecs:String(i+36e5),is_edit_eligible:false,edits_remaining:"0"},is_translatable:false,views:{count:String(e%1e4),state:"EnabledWithCount"},source:"Scrollmark synthetic fixture",legacy:{bookmark_count:e%200,bookmarked:true,created_at:new Date(i).toUTCString(),conversation_id_str:a,display_text_range:[0,140],entities:{hashtags:[{indices:[0,9],text:"scrollmark"},{indices:[10,18],text:`topic${e%17}`}],media:h,symbols:[],timestamps:[],urls:[],user_mentions:[]},favorite_count:e%5e3,favorited:e%9===0,full_text:c||`Synthetic bookmark ${e} about ${l}. Exact phrase checkpoint ${e%97}. This row exists to test large local table performance.`,is_quote_status:false,lang:"en",possibly_sensitive:false,possibly_sensitive_editable:false,quote_count:e%30,reply_count:e%80,retweet_count:e%500,retweeted:false,user_id_str:t.rest_id,id_str:a},twe_private_fields:{created_at:i,updated_at:n,media_count:h.length||(e%3===0?1:0)}},m=u;return s.id&&(m.__bookmark_folder_id=s.id,m.__bookmark_folder_url=`https://x.com/i/bookmarks/${s.id}`),s.name&&(m.__bookmark_folder_name=s.name,m.__bookmark_folder_name_source=s.nameSource),u}function cD(e,t,n){const r=t,o=typeof r.__bookmark_folder_id=="string"?r.__bookmark_folder_id:"",a=typeof r.__bookmark_folder_name=="string"?r.__bookmark_folder_name:"",i=t.core.user_results.result,s=i.core.screen_name.toLowerCase(),l=[t.legacy.full_text,s,i.core.name,o,a].filter(Boolean).join(" "),c=Po(t).length;return {id:`live:${e}:tweet:${t.rest_id}`,source_key:`live:${e}`,source_kind:"live",entity_type:"tweet",entity_id:t.rest_id,extension_name:e,updated_at_ms:n,created_at_ms:t.twe_private_fields.created_at,observed_at_ms:n,primary_text:l,author_screen_name:s,author_id:i.rest_id,folder_id:o||void 0,folder_name:a||void 0,media_flag:c>0?1:0,route_type:"synthetic",lang:"en",flags_json:{has_media:c>0},exact_json:{author:[s,`@${s}`],folder:[o,a].filter(Boolean)},numeric_json:{favorite_count:t.legacy.favorite_count,retweet_count:t.legacy.retweet_count,reply_count:t.legacy.reply_count,bookmark_count:t.legacy.bookmark_count,media_count:c},raw_ref_table:"tweets",raw_ref_key:t.rest_id,doc_hash:cv(l)}}function uD(e,t,n){const r=[t.core.screen_name,t.core.name,t.legacy.description].filter(Boolean).join(" ");return {id:`live:${e}:user:${t.rest_id}`,source_key:`live:${e}`,source_kind:"live",entity_type:"user",entity_id:t.rest_id,extension_name:e,updated_at_ms:n,created_at_ms:t.twe_private_fields.created_at,observed_at_ms:n,primary_text:r,author_screen_name:t.core.screen_name.toLowerCase(),author_id:t.rest_id,flags_json:{is_blue_verified:t.is_blue_verified},exact_json:{author:[t.core.screen_name.toLowerCase(),`@${t.core.screen_name}`]},raw_ref_table:"users",raw_ref_key:t.rest_id,doc_hash:cv(r)}}function dD(e,t,n,r){return {id:`${e}-${t.rest_id}`,extension:e,type:mt.TWEET,data_key:t.rest_id,created_at:r-n*6e4}}function fD(e,t,n){return {id:`${Ns}-${e.rest_id}`,extension:Ns,type:mt.USER,data_key:e.rest_id,created_at:n-t*864e5}}async function hD(){await new Promise(e=>globalThis.setTimeout(e,0));}function Gg(e,t,n,r){n<zg&&t<n||t!==n&&t%zg!==0||console.info(`[scrollmark-synthetic-seed] ${e} ${t}/${n} elapsedMs=${Math.round(performance.now()-r)}`);}function pD(e,t,n,r){return n==="complete"||e<Kg||r==="dense-media"||r==="sparse-media"&&e%lv===0?true:t==="one-huge"?e%rD<nD||e>=oD&&e<aD:t==="many-small"?uv(e,t).id==="synthetic-folder-0"&&e/2e3<Kg:false}function mD(e={}){const t=Math.max(0,Math.floor(Number(e.count??1e4)));return {count:t,folderDistribution:e.folderDistribution??"mixed",rawRecordMode:e.rawRecordMode??"complete",contentProfile:e.contentProfile??"default",includeSearchDocuments:e.includeSearchDocuments??true,extensionName:e.extensionName||Lf,clearFirst:e.clearFirst??true,userCount:Math.max(1,Math.floor(Number(e.userCount??Math.min(500,t/10))))}}async function gD(e={}){const t=performance.now(),{count:n,folderDistribution:r,rawRecordMode:o,contentProfile:a,includeSearchDocuments:i,extensionName:s,userCount:l,clearFirst:c}=mD(e),h=Date.now();let u=0;const m=[];c&&await Ze.clear();const g=Array.from({length:l},(k,S)=>sD(S,h)),y=g.map((k,S)=>fD(k,S,h)),b=i?g.map((k,S)=>uD(Ns,k,h-S)):[];await Ze.putSyntheticSeedRows({users:g,captures:y,searchDocuments:b}),Gg("users",g.length,g.length,t);for(let k=0;k<n;k+=Vg){const S=Math.min(n,k+Vg),M=[],T=[],P=[];for(let N=k;N<S;N+=1){const I=lD(N,g[N%g.length],h,r,a);pD(N,r,o,a)&&(M.push(I),u+=1);const O=dD(s,I,N,h);T.push(O),m.push(O),i&&P.push(cD(s,I,h-N));}await Ze.putSyntheticSeedRows({tweets:M,captures:T,searchDocuments:P}),Gg("tweets",S,n,t),await hD();}return await Ze.publishKnownCaptureCountSnapshot(s,n),await Ze.publishKnownCaptureCountSnapshot(Ns,y.length),await Ze.extPutCaptureIndexPagesFromOrderedCaptures(s,mt.TWEET,m,n,"newest"),Pn({extension:s,operation:"seedSyntheticBookmarks",count:n,keys:Array.from({length:Math.min(20,n)},(k,S)=>String(8e12+S))}),Pn({extension:Ns,operation:"seedSyntheticUsers",count:l,keys:g.slice(0,20).map(k=>k.rest_id)}),{ok:true,extensionName:s,tweetCount:n,userCount:g.length,storedTweetCount:u,captureCount:n+y.length,searchDocumentCount:i?n+b.length:0,folderDistribution:r,rawRecordMode:o,contentProfile:a,includeSearchDocuments:i,elapsedMs:Number((performance.now()-t).toFixed(2))}}async function _D(){return await Ze.clear(),Pn({operation:"clearSyntheticDatabase"}),{ok:true}}async function yD(e){const t=performance.now();let n={completedRows:0,completedTables:0,totalTables:0};const r=await Ze.import(e,{progressCallback:s=>(n={completedRows:Number(s.completedRows||0),totalRows:typeof s.totalRows=="number"?Number(s.totalRows||0):void 0,completedTables:Number(s.completedTables||0),totalTables:Number(s.totalTables||0),done:!!s.done},(n.done||n.completedRows===0||n.completedRows%2500===0)&&console.info(`[scrollmark-synthetic-import] rows=${n.completedRows}/${n.totalRows??"?"} tables=${n.completedTables}/${n.totalTables} elapsedMs=${Math.round(performance.now()-t)}`),true)}),o=await Ze.count(),a=await Ze.extGetCaptureCount(Lf,mt.TWEET),i=await Ze.extGetSearchDocumentCount(Lf,{entityType:"tweet"});return {ok:true,counts:o,bookmarkCaptureCount:a,bookmarkSearchDocumentCount:i,importResult:r,progress:n,elapsedMs:Number((performance.now()-t).toFixed(2))}}function bD(){try{if(typeof location<"u"&&`${location.search} ${location.hash}`.includes("scrollmarkSyntheticDb=1"))return !0;if(typeof localStorage<"u")return localStorage.getItem(tD)==="1"}catch{return false}return false}function wD(){if(!bD())return false;const e={seedBookmarks:gD,importDbExport:yD,clearAll:_D,presets:iD};return globalThis.__scrollmarkSyntheticDb=e,true}const dv={id:{description:"The tweet ID",extractor:e=>e.rest_id},screen_name:{description:"The username of tweet author",extractor:e=>e.core.user_results.result.core.screen_name},name:{description:"The profile name of tweet author",extractor:e=>e.core.user_results.result.core.name},index:{description:"The media index in tweet (start from 0)",extractor:(e,t)=>String(tm(e,t))},num:{description:"The order of media in tweet (1/2/3/4)",extractor:(e,t)=>String(tm(e,t)+1)},date:{description:"The post date in YYYYMMDD format",extractor:e=>Jr(Ga(e),"YYYYMMDD")},time:{description:"The post time in HHmmss format",extractor:e=>Jr(Ga(e),"HHmmss")},type:{description:"The media type (photo/video/animated_gif)",extractor:(e,t)=>t.type},ext:{description:"The file extension of media (jpg/png/mp4)",extractor:(e,t)=>Zd(Wa(t))}},vD=["photo","video","animated_gif"];function Wg(e,t,n){var o;const r=new Map;for(const a of e){if(a.__typename==="Tweet"||typeof a.__typename>"u"&&"core"in a){if(!t&&((o=a.legacy)!=null&&o.retweeted_status_result))continue;const i=Po(a).map(s=>{let l=n;for(const[c,h]of Object.entries(dv))l=l.replace(`{${c}}`,h.extractor(a,s));return {filename:l,type:s.type,url:Wa(s)}});for(const s of i)r.set(s.filename,s);}if(a.__typename==="User"){if(a.avatar.image_url){const i=Zd(a.avatar.image_url),s=`${a.core.screen_name}_profile_image.${i}`;r.set(s,{filename:s,type:"photo",url:oh(a.avatar.image_url)});}if(a.legacy.profile_banner_url){const i=Zd(a.legacy.profile_banner_url),s=`${a.core.screen_name}_profile_banner.${i}`;r.set(s,{filename:s,type:"photo",url:a.legacy.profile_banner_url});}}}return Array.from(r.values())}function Yg(e){if(e==null||typeof e!="object")return e;if(typeof structuredClone=="function")try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Jg({title:e,resultRecords:t,selectedRecords:n,streamResultMediaRows:r,resultMediaSourceCount:o,selectionExcludedRecordIds:a=[],resultSetSnapshot:i,selectionMode:s,isTweet:l,show:c,onClose:h}){const{t:u}=er("exporter"),[m,g]=xn(false),[y,b]=xn(false),[k,S]=Tr(false),[M,T]=$e("75"),[P,N]=$e("10"),[I,O]=$e("8"),[U,E]=$e("3"),[v,L]=$e("3"),[$,xe]=xn(et.get("filenamePattern")),[G,le]=xn(0),[Q,ce]=xn(0),[me,pe]=xn(0),[we,z]=xn("result_set"),[ae,Le]=$e([]),[fe,Pe]=$e([]),[it,X]=$e([]),[ne,H]=$e(false),[se,_e]=$e(0),[ve,Ye]=$e(null),Xe=tn({}),Ie=bt(false),xt=bt(0),[Lt,Wt]=xn([...vD,...l?["retweet"]:[]]),Kt=Lt.includes("retweet"),Tt=!!r,Mt=St(()=>we==="selected"?fe:ae,[we,ae,fe]),Pt=St(()=>(we==="result_set"&&Tt?it:Wg(Mt,Kt,$??"")).filter(Ce=>Lt.includes(Ce.type)),[Mt,we,$,Lt,Kt,Tt,it]),zt=St(()=>Pt.slice(0,250),[Pt]),De=St(()=>new Set(zt.map(Fe=>Fe.filename)),[zt]);ot(()=>{if(!c){Ie.current=false,X([]),H(false),_e(0);return}if(Ie.current)return;Ie.current=true;const Fe=s==="all"&&a.length?new Set(a):null;Le(t.filter((Ce,A)=>!(Fe!=null&&Fe.has(oa(Ce,A)))).map(Ce=>Yg(Ce))),Pe(n.map(Ce=>Yg(Ce))),Ye({...i,ids:[...i.ids],warnings:[...i.warnings]}),z(n.length>0&&s==="explicit"?"selected":"result_set"),le(0),ce(0),pe(0),Xe.value={};},[t,i,n,a,s,le,z,ce,pe,c,Xe]),ot(()=>{if(!c||!r){X([]),H(false),_e(0);return}let Fe=false;const Ce=Ge(),A=new Map;let x=0;const R=()=>{Fe||(X([...A.values()]),_e(x));};return (async()=>{H(true),X([]),_e(0);try{for await(const V of r()){if(Fe)return;x+=1;for(const ke of Wg([V],Kt,$??""))A.set(ke.filename,ke);x%200===0&&(R(),await new Promise(ke=>globalThis.setTimeout(ke,0)));}R(),He({kind:"export",name:"media-export-source-scan",durationMs:Ge()-Ce,value:A.size,tags:{rowsScanned:x,sourceRows:o??0,includeRetweets:Kt}});}finally{Fe||H(false);}})().catch(V=>{Fe||H(false),He({kind:"export",name:"media-export-source-scan-error",durationMs:Ge()-Ce,tags:{error:V instanceof Error?V.message:String(V),rowsScanned:x}});}),()=>{Fe=true;}},[$,Kt,o,c,r]);const yt=(Fe,Ce,A)=>{const x=Date.now();if((Fe===Ce||x-xt.current>120)&&(xt.current=x,le(Fe),ce(Ce)),A!=null&&A.filename&&De.has(A.filename)){const R={...Xe.value,[A.filename]:100};Xe.value=R;}},lt=async()=>{try{const Fe={minDelayBetweenStartsMs:Math.max(0,parseInt(M,10)||0),globalConcurrency:Math.max(1,parseInt(P,10)||1),perHostConcurrency:Math.max(1,parseInt(I,10)||1),videoConcurrency:Math.max(1,parseInt(U,10)||1),maxRetries:Math.max(0,parseInt(v,10)||0),onZipProgress:Ce=>pe(Ce)};g(!0),xt.current=0,le(0),ce(Pt.length),pe(0),await XC(`twitter-${e}-${we==="selected"?"selected":"results"}-${Date.now()}-media.zip`,Pt,yt,Fe),g(!1);}catch(Fe){g(false),Ae.error(u("Failed to export media. Open DevTools for more details."),Fe);}},_t=(Fe=false)=>{const Ce=Pt.map(A=>k?`${A.url}
out=${A.filename}`:A.url).join(`
`);try{if(Fe){Js(new Blob([Ce],{type:"text/plain;charset=utf-8"}),"media-urls.txt");return}navigator.clipboard.writeText(Ce),b(!0),setTimeout(()=>b(!1),2e3);}catch(A){Ae.error(u("Failed to copy media URLs. Open DevTools for more details."),A);}};return f(vr,{class:"max-w-sm md:max-w-screen-sm sm:max-w-screen-sm max-h-full",title:`${e} ${u("Media")}`,show:c,onClose:h,children:[f("div",{class:"px-4 text-base overflow-y-scroll overscroll-none",children:[f("p",{class:"text-base-content text-opacity-60 leading-5 text-sm",children:u("Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).")}),f("div",{role:"alert",class:"alert text-sm py-2 mt-2 mb-2 grid-cols-[auto_minmax(auto,1fr)]",children:[f(Z_,{size:24}),f("span",{children:u("Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.")})]}),f("div",{class:"flex items-center gap-4 mb-1",children:[f("p",{class:"leading-8",children:u("Export scope:")}),f("label",{class:"label cursor-pointer gap-2 py-0",children:[f("input",{type:"radio",name:"media-export-scope",class:"radio radio-sm",checked:we==="result_set",onChange:()=>z("result_set")}),f("span",{children:u("All current results")}),f("span",{class:"font-mono opacity-60",children:["(",(ve==null?void 0:ve.totalMatches)??ae.length,")"]})]}),f("label",{class:on("label cursor-pointer gap-2 py-0",!fe.length&&"opacity-50"),children:[f("input",{type:"radio",name:"media-export-scope",class:"radio radio-sm",checked:we==="selected",disabled:!fe.length,onChange:()=>z("selected")}),f("span",{children:u("Selected rows")}),f("span",{class:"font-mono opacity-60",children:["(",fe.length,")"]})]})]}),Tt&&we==="result_set"?f("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 text-xs leading-5 mb-2",children:[f("div",{class:"font-semibold",children:u("Source-backed media")}),f("div",{children:[u("rows scanned:")," ",f("span",{class:"font-mono",children:[se,o?`/${o}`:""]})]}),f("div",{children:[u("media URLs:")," ",f("span",{class:"font-mono",children:[Pt.length,ne?` ${u("loading")}`:""]})]})]}):null,ve?f("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 text-xs leading-5 mb-2",children:[f("div",{class:"font-semibold",children:u("Pinned result set")}),f("div",{class:"font-mono opacity-70",children:ve.resultSetId}),f("div",{children:[u("Query"),":"," ",f("span",{class:"font-mono",children:ve.queryText||"-"})]}),f("div",{children:[u("Sort"),": ",f("span",{class:"font-mono",children:ve.sort})]})]}):null,l&&f("div",{class:"flex flex-wrap sm:grid grid-cols-4 sm:gap-2 items-center sm:h-9",children:[f("p",{class:"leading-8",children:u("Filename template:")}),f("div",{class:"tooltip tooltip-bottom col-span-3 before:whitespace-pre-line before:max-w-max","data-tip":Object.entries(dv).map(([Fe,Ce])=>`{${Fe}} - ${u(Ce.description)}`).reduce((Fe,Ce)=>Fe+Ce+`
`,""),children:f("input",{type:"text",class:"input input-bordered input-sm w-full",value:$,onChange:Fe=>{var A;const Ce=(A=Fe==null?void 0:Fe.target)==null?void 0:A.value;xe(Ce),et.set("filenamePattern",Ce);}})})]}),f("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 mt-2 mb-2",children:[f("div",{class:"mb-1 flex items-center justify-between gap-2",children:[f("p",{class:"font-semibold text-sm",children:u("Download scheduler")}),f("span",{class:"font-mono text-[10px] opacity-60",children:u("Faster defaults are intended for bulk CDN transfer.")})]}),f("div",{class:"grid grid-cols-2 sm:grid-cols-5 gap-2",children:[f("label",{class:"form-control",children:[f("span",{class:"label-text text-xs",children:u("Start delay (ms)")}),f("input",{type:"number",min:"0",class:"input input-bordered input-sm",value:M,onInput:Fe=>T(Fe.currentTarget.value)})]}),f("label",{class:"form-control",children:[f("span",{class:"label-text text-xs",children:u("Global parallel")}),f("input",{type:"number",min:"1",max:"32",class:"input input-bordered input-sm",value:P,onInput:Fe=>N(Fe.currentTarget.value)})]}),f("label",{class:"form-control",children:[f("span",{class:"label-text text-xs",children:u("Per host")}),f("input",{type:"number",min:"1",max:"32",class:"input input-bordered input-sm",value:I,onInput:Fe=>O(Fe.currentTarget.value)})]}),f("label",{class:"form-control",children:[f("span",{class:"label-text text-xs",children:u("Videos")}),f("input",{type:"number",min:"1",max:"16",class:"input input-bordered input-sm",value:U,onInput:Fe=>E(Fe.currentTarget.value)})]}),f("label",{class:"form-control",children:[f("span",{class:"label-text text-xs",children:u("Retries")}),f("input",{type:"number",min:"0",max:"8",class:"input input-bordered input-sm",value:v,onInput:Fe=>L(Fe.currentTarget.value)})]})]})]}),f("div",{class:"flex flex-wrap sm:grid grid-cols-4 sm:gap-2 items-center sm:h-9",children:[f("p",{class:"leading-8 col-span-1 whitespace-nowrap sm:pl-2",children:u("Use aria2 format:")}),f("div",{class:"col-span-1 flex items-center",children:[f("input",{type:"checkbox",class:"toggle toggle-primary",checked:k,onChange:S}),f("a",{href:"https://aria2.github.io/manual/en/html/aria2c.html#input-file",target:"_blank",rel:"noopener noreferrer",class:"tooltip tooltip-bottom before:max-w-40 ml-1","data-tip":u("Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2."),children:f(vi,{size:20})})]})]}),f("div",{class:"flex flex-wrap sm:grid grid-cols-4 sm:gap-2 items-center sm:h-9",children:[f("p",{class:"leading-8",children:u("Media Filter:")}),f(Ky,{class:"col-span-3",options:[{label:u("filter.photo"),value:"photo"},{label:u("filter.video"),value:"video"},{label:u("filter.animated_gif"),value:"animated_gif"},...l?[{label:u("filter.retweet"),value:"retweet"}]:[]],selected:Lt,onChange:Wt})]}),f("div",{class:"my-3 overflow-x-scroll",children:[f("table",{class:"table table-xs table-zebra",children:[f("thead",{children:f("tr",{children:[f("th",{}),f("th",{children:"#"}),f("th",{children:u("File Name")}),f("th",{children:u("Media Type")}),f("th",{children:u("Download URL")})]})}),f("tbody",{children:zt.map((Fe,Ce)=>f("tr",{children:[f("td",{children:Xe.value[Fe.filename]?f(vk,{class:"text-success",size:14}):f(kk,{size:14})}),f("th",{children:Ce+1}),f("td",{children:Fe.filename}),f("td",{children:u(`filter.${Fe.type}`)}),f("td",{children:f("a",{class:"link whitespace-nowrap",href:Fe.url,target:"_blank",rel:"noopener noreferrer",children:Fe.url})})]}))})]}),Pt.length>250?f("div",{class:"px-2 py-1 text-xs opacity-60",children:u("Preview limited to first 250 media items.")}):null,Pt.length>0?null:f("div",{class:"flex items-center justify-center h-28 w-full",children:f("p",{class:"text-base-content text-opacity-50",children:u(ne?"Loading media...":"No media selected.")})})]}),f("div",{class:"flex flex-col mt-6",children:[f("progress",{class:"progress progress-secondary w-full",value:G/(Q||1)*100,max:"100"}),f("span",{class:"text-sm h-4 leading-none mt-2 text-base-content text-opacity-60",children:me?`${u("Zipping")}: ${me}/${Pt.length}`:`${G}/${Pt.length}`})]})]}),f("div",{class:"flex space-x-2 mt-2",children:[f("span",{class:"flex-grow"}),f("button",{class:"btn",onClick:h,children:u("Cancel")}),f("div",{class:"join",children:[f("button",{class:on("btn join-item pr-2",ne&&"btn-disabled"),onClick:()=>_t(),disabled:ne,children:u(y?"Copied!":"Copy URLs")}),f("button",{class:on("btn join-item pl-2",ne&&"btn-disabled"),onClick:()=>_t(true),disabled:ne,children:f(Ck,{})})]}),f("button",{class:on("btn btn-secondary",(m||ne||Pt.length===0)&&"btn-disabled"),onClick:lt,disabled:m||ne||Pt.length===0,children:[m&&f("span",{class:"loading loading-spinner"}),u("Start Export")]})]})]})}/**
* Modified from `dexie-react-hooks` with some lines removed. The modified version
* is specifically designed for `Observable` and `liveQuery` from Dexie.js.
*
* @license Apache-2.0
* @see https://dexie.org/docs/dexie-react-hooks/useObservable()
* @see https://github.com/dexie/Dexie.js/blob/v4.0.4/libs/dexie-react-hooks/src/useObservable.ts
* @param observableFactory Function that returns an observable.
* @param deps The observableFactory function will be re-executed if deps change.
* @param defaultResult Result returned on initial render.
* @returns The current result of the observable.
*/function kD(e,t,n){const r=bt({hasResult:false,result:n,error:null}),[,o]=ny(i=>i+1,0),a=St(()=>{const i=e();if(!i||typeof i.subscribe!="function")throw new TypeError("Observable factory given to useObservable() did not return a valid observable.");return r.current.hasResult||(typeof i.hasValue!="function"||i.hasValue())&&typeof i.getValue=="function"&&(r.current.result=i.getValue(),r.current.hasResult=true),i},t);if(ot(()=>{const i=a.subscribe(s=>{const l=r.current;(l.error!==null||l.result!==s)&&(l.error=null,l.result=s,l.hasResult=true,o(1));},s=>{r.current.error!==s&&(r.current.error=s,o(1));});return i.unsubscribe.bind(i)},t),r.current.error)throw r.current.error;return r.current.result}/**
* A hook that subscribes to a live query and returns the current result.
* Copied from `dexie-react-hooks` with some function overloads removed.
*
* @license Apache-2.0
* @see https://dexie.org/docs/dexie-react-hooks/useLiveQuery()
* @see https://github.com/dexie/Dexie.js/blob/v4.0.4/libs/dexie-react-hooks/src/useLiveQuery.ts
* @see https://github.com/dexie/Dexie.js/blob/v4.0.4/src/live-query/live-query.ts
* @param querier Function that returns a final result (Promise).
* @param deps Variables that querier is dependent on.
* @param defaultResult Result returned on initial render.
* @returns The current result of the live query.
*/function fv(e,t,n){return kD(()=>_T(e),t||[],n)}const hv=80,pv=48,mv=240,Lc=5e4,gv="twe_allow_large_search_corpus_v1",xD="twe_search_document_full_load_count_override_v1",SD="twe_source_window_request_delay_ms_v1",CD=5e3,TD=12e3;function _v(){try{return localStorage.getItem(gv)==="1"}catch{return false}}function Xg(){try{const e=localStorage.getItem(xD);if(!e)return null;const t=Number(e);return !Number.isFinite(t)||t<=0?null:Math.floor(t)}catch{return null}}function MD(){try{const e=localStorage.getItem(SD);if(!e)return 0;const t=Number(e);return !Number.isFinite(t)||t<=0?0:Math.min(CD,Math.floor(t))}catch{return 0}}async function yv(){const e=MD();e<=0||await new Promise(t=>globalThis.setTimeout(t,e));}function ID(e){return e<=Lc||_v()?null:`Search corpus has ${e.toLocaleString()} indexed documents. Full in-memory search is blocked above ${Lc.toLocaleString()} documents; normal high-count search should use chunked DB-to-worker preparation instead. Set localStorage.${gv} = "1" to force the legacy path for local diagnostics.`}function Zg(e){return e===mt.USER?"user":"tweet"}function RD(e,t){const n=Lo(e),r=St(()=>aw({extensionName:e,extensionType:t}),[e,n,t]),o=bt(""),a=bt(false),i=bt(null),[s,l]=$e({records:[],loading:true,loadingWindow:false,loadedCount:0,totalCount:0,hasMore:false,windowStartIndex:0}),c=qn(async(m,g,y=false)=>{const b=Math.max(0,Math.floor(Number(m)||0)),k=Math.max(b+1,Math.floor(Number(g)||0)),S=Math.min(mv,Math.max(pv,k-b)),M=`${n}:${b}:${S}`;if(o.current===M)return;if(o.current=M,a.current&&!y){i.current={startIndex:b,endIndex:k},He({kind:"viewer",name:"source-window-request-coalesced",value:S,tags:{mode:"captures",extName:e,type:t,startIndex:b,limit:S}});return}a.current=true;const T=Ge();l(P=>({...P,loading:y?true:P.loading,loadingWindow:!y}));try{await yv();const P=await r.getWindow({startIndex:b,limit:S});if(o.current!==M){He({kind:"viewer",name:"source-window-stale-ignored",durationMs:Ge()-T,value:P.rows.length,tags:{mode:"captures",extName:e,type:t,startIndex:b,limit:S,totalCount:P.totalCount,initial:y}});return}l({records:P.rows,loading:!1,loadingWindow:!1,loadedCount:P.rows.length,totalCount:P.totalCount,hasMore:P.hasAfter,windowStartIndex:b}),He({kind:"viewer",name:"db-backed-capture-window",durationMs:Ge()-T,value:P.rows.length,tags:{extName:e,type:t,startIndex:b,limit:S,totalCount:P.totalCount,initial:y}});}finally{a.current=false;const P=i.current;i.current=null,P&&(o.current="",c(P.startIndex,P.endIndex,false).catch(N=>{Ae.warn("DB-backed queued capture window load failed",N),l(I=>({...I,loading:false,loadingWindow:false}));}));}},[e,n,r,t]),h=qn(async()=>{o.current="",await c(0,hv,true);},[c]);ot(()=>{h();},[h]);const u=qn((m,g)=>{c(m,g,false).catch(y=>{Ae.warn("DB-backed capture window load failed",y),l(b=>({...b,loading:false,loadingWindow:false}));});},[c]);return {sourceKey:r.key,sourceDescriptor:r.descriptor,...s,requestWindow:u,reload:h,streamRows:()=>r.streamRows()}}function ED(e,t,n,r,o){const a=Lo(e),i=St(()=>[...new Set((Array.isArray(n)?n:n?[n]:[]).map(S=>S.trim()).filter(Boolean))].sort(),[n]),s=i.join(","),l=St(()=>!r||!i.length?null:gf({extensionName:e,entityType:Zg(t),folderIds:i,knownTotalCount:o}),[r,e,o,a,i,t]),c=bt(""),h=bt(false),u=bt(null),[m,g]=$e({records:[],loading:false,loadingWindow:false,loadedCount:0,totalCount:0,hasMore:false,windowStartIndex:0}),y=qn(async(S,M,T=false)=>{if(!l||!r||!i.length)return;const P=Math.max(0,Math.floor(Number(S)||0)),N=Math.max(P+1,Math.floor(Number(M)||0)),I=Math.min(mv,Math.max(pv,N-P)),O=`${a}:${s}:${P}:${I}`;if(c.current===O)return;if(c.current=O,h.current&&!T){u.current={startIndex:P,endIndex:N},He({kind:"viewer",name:"source-window-request-coalesced",value:I,tags:{mode:"folder",extName:e,type:t,folderId:s,folderCount:i.length,startIndex:P,limit:I}});return}h.current=true;const U=Ge();g(E=>({...E,loading:T?true:E.loading,loadingWindow:!T}));try{await yv();const E=await l.getWindow({startIndex:P,limit:I});if(c.current!==O){He({kind:"viewer",name:"source-window-stale-ignored",durationMs:Ge()-U,value:E.rows.length,tags:{mode:"folder",extName:e,type:t,folderId:s,folderCount:i.length,startIndex:P,limit:I,totalCount:E.totalCount,initial:T}});return}g({records:E.rows,loading:!1,loadingWindow:!1,loadedCount:E.rows.length,totalCount:E.totalCount,hasMore:E.hasAfter,windowStartIndex:P}),He({kind:"viewer",name:"db-backed-folder-window",durationMs:Ge()-U,value:E.rows.length,tags:{extName:e,type:t,folderId:s,folderCount:i.length,startIndex:P,limit:I,totalCount:E.totalCount,initial:T}});}finally{h.current=false;const E=u.current;u.current=null,E&&(c.current="",y(E.startIndex,E.endIndex,false).catch(v=>{Ae.warn("DB-backed queued folder window load failed",v),g(L=>({...L,loading:false,loadingWindow:false}));}));}},[r,e,a,i.length,s,l,t]),b=qn(async()=>{if(c.current="",!l||!r||!i.length){g({records:[],loading:false,loadingWindow:false,loadedCount:0,totalCount:0,hasMore:false,windowStartIndex:0});return}await y(0,hv,true);},[r,y,i.length,l]);ot(()=>{b();},[b]);const k=qn((S,M)=>{!l||!r||!i.length||y(S,M,false).catch(T=>{Ae.warn("DB-backed folder window load failed",T),g(P=>({...P,loading:false,loadingWindow:false}));});},[r,y,i.length,l]);return {sourceKey:(l==null?void 0:l.key)??"",sourceDescriptor:(l==null?void 0:l.descriptor)??gf({extensionName:e,entityType:Zg(t),folderIds:i.length?i:["__inactive__"]}).descriptor,...m,active:!!(l&&r&&i.length),folderId:s,requestWindow:k,reload:b,streamRows:()=>(l==null?void 0:l.streamRows())??DD()}}function AD(e,t,n){const r=Lo(e),o=St(()=>[...new Set((t??[]).map(c=>c.trim()).filter(Boolean))].sort(),[t]),a=o.join(","),i=St(()=>n?iw({extensionName:e,folderIds:o}):null,[n,e,r,o]),[s,l]=$e(0);return ot(()=>{let c=false,h=null;if(!i){l(0);return}return h=globalThis.setTimeout(()=>{i.totalCount().then(u=>{c||l(u);});},TD),()=>{c=true,h!==null&&globalThis.clearTimeout(h);}},[a,i]),i?{sourceKey:i.key,sourceDescriptor:i.descriptor,totalCount:s,getWindow:async(c,h)=>{const u=await i.getWindow({startIndex:c,limit:h});return l(m=>Math.max(m,u.totalCount)),u},streamRows:()=>i.streamRows()}:null}async function*DD(){}function bv(e){const t=Lo(e),n=fv(async()=>(await Ze.whenReady(),Math.max(0,Math.floor(Number(await Ze.extGetCaptureCount(e)||0)))),[e,t],0);return Math.max(0,Math.floor(Number(n)||0))}function PD(e,t,n=true){const r=Lo(e),[o,a]=$e({documents:[],loading:n,loaded:false,totalCount:0}),i=bt(""),s=bt(null),l=bt(""),c=bt(0),h=qn(async()=>{if(s.current)return s.current;const m=`${r}:${e}:${t}:${c.current+1}`;c.current+=1,l.current=m,a(y=>({...y,loading:true}));const g=Ze.extGetSearchDocumentCount(e,{type:t}).then(async y=>{if(l.current!==m)return [];const b=Number(y)||0,k=Xg()??b;if(ID(k))return l.current===m&&a({documents:[],loading:false,loaded:true,totalCount:k}),He({kind:"search",name:"large-corpus-chunked-load-required",value:k,tags:{extName:e,type:t,limit:Lc}}),[];const[M,T]=await Promise.all([Ze.extGetSearchDocuments(e,t),Ze.extGetCaptureCount(e,t)]);if(l.current!==m)return [];const P=M??[];a({documents:P,loading:false,loaded:true,totalCount:k||P.length});const N=T??0,I=`${e}:${t}:${N}:${P.length}`,O=Math.max(50,Math.ceil(N*.02));return N>0&&P.length+O<N&&i.current!==I&&(i.current=I,Ze.extBackfillSearchDocuments(e,t).catch(U=>{Ae.warn("Search document backfill failed",U);})),P}).catch(y=>l.current!==m?[]:(Ae.warn("Search documents load failed",y),a({documents:[],loading:false,loaded:true,totalCount:0}),[])).finally(()=>{l.current===m&&(s.current=null);});return s.current=g,g},[e,r,t]),u=qn(async m=>{var P,N;const g=Ge(),y=Math.max(100,Math.min(5e3,Math.floor(m.chunkSize||1e3))),b=Number(await Ze.extGetSearchDocumentCount(e,{type:t}))||0,k=Xg()??b;let S=0,M=0,T=false;try{for(;M<b;){if((P=m.isCancelled)!=null&&P.call(m)){T=!0;break}const I=await Ze.extGetSearchDocumentPage(e,{type:t,offset:M,limit:y});if((N=m.isCancelled)!=null&&N.call(m)){T=!0;break}const O=I.documents??[];if(!O.length||(S+=O.length,m.onChunk(O,{loaded:S,totalCount:k}),He({kind:"search",name:"search-document-chunk-loaded",value:S,tags:{extName:e,type:t,chunkSize:y,chunkRows:O.length,totalCount:k,offset:M}}),M+=O.length,!I.hasAfter))break;await new Promise(U=>globalThis.setTimeout(U,0));}}finally{a(I=>({...I,documents:k>Lc&&!_v()?[]:I.documents,loading:false,loaded:I.loaded||!T,totalCount:k,blockedReason:void 0}));}return He({kind:"search",name:T?"search-document-chunk-load-cancelled":"search-document-chunk-load-complete",durationMs:Ge()-g,value:S,tags:{extName:e,type:t,chunkSize:y,totalCount:k}}),{loaded:S,totalCount:k,cancelled:T}},[e,t]);return ot(()=>{return s.current=null,l.current="",a({documents:[],loading:n,loaded:false,totalCount:0}),n&&h().then(()=>{}),()=>{}},[n,e,h,r,t]),{...o,load:h,loadChunks:u}}function OD(e,t,n=true){const r=Lo(e),[o,a]=$e({summary:null,loading:n});return ot(()=>{let i=false;if(!n){a({summary:null,loading:false});return}return a(s=>({...s,loading:true})),Ze.extGetSearchDocumentFolderFacets(e,{type:t}).then(s=>{i||a({summary:s,loading:false});}).catch(s=>{i||(Ae.warn("Search document folder facets failed",s),a({summary:null,loading:false}));}),()=>{i=true;}},[n,e,r,t]),o}function LD(e){return async()=>(Ae.debug("Clearing captures for extension:",e),Ze.extClearCaptures(e))}async function*Qg(){}function e_(e){const t=e,n=t==null?void 0:t.__bookmark_folder_name,r=t==null?void 0:t.__bookmark_folder_name_source,o=t==null?void 0:t.__bookmark_folder_id;return r==="api"&&typeof n=="string"&&n.trim().length>0?"api-name":typeof o=="string"&&o.trim().length>0?"id-only":"none"}function ND(e){const{isBookmarksModule:t,records:n,summary:r}=e,[o,a]=$e({latestStatus:"none",counts:{"api-name":0,"id-only":0,none:0}}),[i,s]=$e([]);return ot(()=>{if(!t){a({latestStatus:"none",counts:{"api-name":0,"id-only":0,none:0}}),s([]);return}let l=false,c=0,h=null;const u=()=>{if(l)return;const m=n??[],g={"api-name":0,"id-only":0,none:0},y=new Map;if(r){g["api-name"]=r.statusCounts["api-name"],g["id-only"]=r.statusCounts["id-only"],g.none=r.statusCounts.none;for(const b of r.facets)y.set(b.folderId,{label:b.label,count:b.count});}else for(const b of m){if(g[e_(b)]++,!b||typeof b!="object")continue;const k=b,S=typeof k.__bookmark_folder_id=="string"?k.__bookmark_folder_id:"";if(!S.trim())continue;const M=k.__bookmark_folder_name_source==="api"&&typeof k.__bookmark_folder_name=="string"?k.__bookmark_folder_name.trim():"",T=y.get(S);T?T.count+=1:y.set(S,{label:M?`${M}`:`Folder ${S}`,count:1});}a({latestStatus:r?g["api-name"]>0?"api-name":g["id-only"]>0?"id-only":"none":m.length>0?e_(m[m.length-1]):"none",counts:g}),s([...y.entries()].sort((b,k)=>k[1].count!==b[1].count?k[1].count-b[1].count:b[1].label.localeCompare(k[1].label)).map(([b,k])=>({value:b,label:`${k.label} (${k.count})`})));};return typeof window<"u"&&"requestIdleCallback"in window?c=window.requestIdleCallback(()=>u()):h=globalThis.setTimeout(u,80),()=>{l=true,c&&typeof window<"u"&&"cancelIdleCallback"in window&&window.cancelIdleCallback(c),h!==null&&globalThis.clearTimeout(h);}},[t,n,r]),{bookmarkStatus:o,bookmarkFolderOptions:i}}function FD({title:e,extension:t,fullscreen:n,onFullscreenChange:r}){return f($D,{title:e,extension:t,fullscreen:n,onFullscreenChange:r})}function $D({title:e,extension:t,fullscreen:n,onFullscreenChange:r}){const{t:o}=er(),{name:a,type:i}=t,s=RD(a,i),l=PD(a,i,false),c=OD(a,i,a==="BookmarksModule"&&i===mt.TWEET),h=LD(a),u=a==="BookmarksModule"&&i===mt.TWEET,[m,g]=$e([]),y=u&&m.length>0?m:void 0,b=St(()=>{if(!(y!=null&&y.length)||!c.summary)return;const v=new Map(c.summary.facets.map(L=>[L.folderId,L.count]));return y.reduce((L,$)=>L+(Number(v.get($))||0),0)},[c.summary,y]),k=ED(a,i,y,!!(y!=null&&y.length),b),S=AD(a,y,i===mt.TWEET),M=k.active?k:s,T=M.records,{bookmarkStatus:P,bookmarkFolderOptions:N}=ND({isBookmarksModule:u,records:T,summary:c.summary}),[I,O]=Tr(),U=[{id:"media-masonry",label:"Media masonry",icon:"grid",sourceBacked:true,component:av}],E=(v,L)=>{const $=u&&L.totalCount>1e4&&L.resultRecords.length<L.totalCount&&!S;return f("div",{class:"flex items-center gap-2",children:[L.loading?f("span",{class:"font-mono text-[10px] opacity-60",children:o("loading {{loaded}}/{{total}}",{loaded:L.loadedCount,total:L.totalCount})}):null,L.loadingMore?f("span",{class:"font-mono text-[10px] opacity-60",children:o("loading more {{loaded}}/{{total}}",{loaded:L.loadedCount,total:L.totalCount})}):null,u&&f("button",{class:"btn btn-sm btn-accent btn-outline",onClick:()=>{const xe=kh("bookmarks");hw({exported_at_ms:Date.now(),exported_at_iso:new Date().toISOString(),scope:"bookmarks",count:xe.length,history:xe},`twe-bookmarks-search-history-${Date.now()}.json`);},title:o("Export persisted bookmark search history"),children:o("Export Search History")}),u&&f("span",{class:"badge badge-outline badge-sm font-mono tooltip before:whitespace-pre-line before:max-w-40","data-tip":o(`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,{latest:o(P.latestStatus),apiName:P.counts["api-name"],idOnly:P.counts["id-only"],none:P.counts.none}),children:o("folder metadata: {{status}}",{status:o(P.latestStatus)})}),f("button",{class:"btn btn-sm btn-secondary",onClick:O,disabled:L.loading||$,title:L.loading?o("Wait for records to finish loading before exporting."):$?o("Media export is disabled for large result sets until media export has a source-backed stream."):void 0,children:o("Export Media")})]})};return i===mt.TWEET?f(Zs,{title:e,viewStateKey:`${a}:${i}`,searchHistoryScope:u?"bookmarks":void 0,fullscreen:n,onFullscreenChange:r,loading:M.loading,loadingMore:M.loadingWindow,loadedCount:M.loadedCount,totalCount:M.totalCount,hasMore:M.hasMore,sourceMode:true,sourceModeFiltersActive:k.active,sourceWindowStartIndex:M.windowStartIndex,resultSourceDescriptor:M.sourceDescriptor,resultEntityType:"tweet",onSourceWindowChange:M.requestWindow,streamSourceRows:()=>M.streamRows(),streamMediaRows:()=>(S==null?void 0:S.streamRows())??Qg(),mediaSourceKey:S==null?void 0:S.sourceKey,mediaSourceTotalCount:(S==null?void 0:S.totalCount)??void 0,getMediaWindow:S?(v,L)=>S.getWindow(v,L):void 0,onBookmarkFolderSelectionChange:g,hydrateRecordsByIds:v=>Ze.extGetTweetsByIds(v),records:T??[],searchDocuments:l.documents,searchDocumentsLoading:l.loading,searchDocumentsLoaded:l.loaded,searchDocumentTotalCount:l.totalCount,searchDocumentsBlockedReason:l.blockedReason,loadSearchDocuments:l.load,loadSearchDocumentChunks:l.loadChunks,columns:rv,clear:h,alternateViews:U,bookmarkFolderOptions:N,renderActions:E,renderExtra:(v,L)=>f(Jg,{title:e,resultRecords:L.resultRecords,selectedRecords:L.selectedRecords,streamResultMediaRows:()=>(S==null?void 0:S.streamRows())??Qg(),resultMediaSourceCount:(S==null?void 0:S.totalCount)??void 0,selectionExcludedRecordIds:L.selectionExcludedRecordIds,resultSetSnapshot:L.resultSetSnapshot,selectionMode:L.selectionMode,isTweet:true,show:I,onClose:O})}):f(Zs,{title:e,viewStateKey:`${a}:${i}`,searchHistoryScope:u?"bookmarks":void 0,fullscreen:n,onFullscreenChange:r,loading:M.loading,loadingMore:M.loadingWindow,loadedCount:M.loadedCount,totalCount:M.totalCount,hasMore:M.hasMore,sourceMode:true,sourceModeFiltersActive:k.active,sourceWindowStartIndex:M.windowStartIndex,resultSourceDescriptor:M.sourceDescriptor,resultEntityType:"user",onSourceWindowChange:M.requestWindow,streamSourceRows:()=>M.streamRows(),onBookmarkFolderSelectionChange:g,hydrateRecordsByIds:v=>Ze.extGetUsersByIds(v),records:T??[],searchDocuments:l.documents,searchDocumentsLoading:l.loading,searchDocumentsLoaded:l.loaded,searchDocumentTotalCount:l.totalCount,searchDocumentsBlockedReason:l.blockedReason,loadSearchDocuments:l.load,loadSearchDocumentChunks:l.loadChunks,columns:ov,clear:h,bookmarkFolderOptions:N,renderActions:E,renderExtra:(v,L)=>f(Jg,{title:e,resultRecords:L.resultRecords,selectedRecords:L.selectedRecords,selectionExcludedRecordIds:L.selectionExcludedRecordIds,resultSetSnapshot:L.resultSetSnapshot,selectionMode:L.selectionMode,isTweet:false,show:I,onClose:O})})}function Wn({extension:e}){const{t}=er(),[n,r]=Tr(),[o,a]=$e(false),i=bv(e.name);if(e.type!==mt.TWEET&&e.type!==mt.USER)throw new Error("Incorrect use of CommonModuleUI component.");const s=Pc(e),l=s.titleKey??e.name.replace("Module",""),c=t(l);return f(rl,{title:c,description:`${t("Captured:")} ${i}`,active:!!i&&i>0,onClick:r,indicatorColor:s.indicatorColor,panelClass:s.panelClass,children:f(vr,{class:o?"h-screen max-h-screen max-w-none":"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm h-[82vh] max-h-[calc(100vh-4rem)]",title:c,show:n,fullscreen:o,onClose:()=>{a(false),r();},children:f(FD,{title:c,extension:e,fullscreen:o,onFullscreenChange:a})})})}const BD="UserMediaModule";function UD(e,t){return e===BD||!Array.isArray(t)||!t.length?[]:t.filter(n=>p1(n)).map(n=>String(n.rest_id||"").trim()).filter(Boolean)}const t_="TweetIndexModule";async function yo(e,t){const n=Array.isArray(t)?t:[];await Ze.extAddTweets(e,n);const r=n.map(a=>String((a==null?void 0:a.rest_id)||"").trim()).filter(Boolean);e!==t_&&r.length&&await Ze.extAddTweetCaptureIds(t_,r);const o=UD(e,n);return o.length&&await Ze.extAddTweetCaptureIds("UserMediaModule",o),{kind:"tweets",count:n.length}}async function ul(e,t){const n=Array.isArray(t)?t:[];return await Ze.extAddUsers(e,n),{kind:"users",count:n.length}}async function wv(e,t,n){const r=Array.isArray(t)?t:[];return await Ze.extAddUsers(e,r),n.length&&await Ze.extAddSocialEdges(e,n),{kind:"users",count:r.length}}function vv(e,t){Ae.info(`${e}: ${t} items received`);}function kv(e,t,n,r){Ae.debug(t.method,t.url,n.status,n.responseText),Ae.errorWithBanner(`${e}: Failed to parse API response`,r);}function tr(e){return (t,n,r)=>{if(e.match(t,n))try{const o=e.parse(t,n,r),a=e.count?e.count(o):Array.isArray(o)?o.length:0,i=e.project?e.project(r.name,o,t,n):{kind:"none",count:a},s=l=>{var h;const c=l&&typeof l=="object"?l:{kind:"none",count:a};vv(e.moduleName,a),(h=e.onSuccess)==null||h.call(e,o,{ext:r,req:t,res:n,projection:c,count:a});};i&&typeof i.then=="function"?i.then(l=>s(l)).catch(l=>{Ae.errorWithBanner(`${e.moduleName}: Failed to write API response projection`,l instanceof Error?l:new Error(String(l)));}):s(i);}catch(o){kv(e.moduleName,t,n,o instanceof Error?o:new Error(String(o)));}}}const xv="twe_bookmark_folder_name_cache_v1",Sv=260,jD=1800,Nf=new Set,Id=new Set;function HD(){try{if(typeof localStorage>"u")return new Map;const e=localStorage.getItem(xv);if(!e)return new Map;const t=JSON.parse(e);if(!Array.isArray(t))return new Map;const n=[];for(const r of t)Array.isArray(r)&&r.length===2&&typeof r[0]=="string"&&typeof r[1]=="string"&&n.push([r[0],r[1]]);return new Map(n)}catch{return new Map}}function qD(e){try{if(typeof localStorage>"u")return;localStorage.setItem(xv,JSON.stringify([...e.entries()]));}catch{}}function VD(e){const t=[];for(const n of e){if(!n||typeof n!="object")continue;const r=String(n.rest_id||"").trim();if(r&&(t.push(r),t.length>=Sv))break}return t}function zD(e){for(const t of e){const n=String(t||"").trim();n&&Nf.add(n);}}function KD(e,t,n){if(!t||!Nf.has(t)||Id.has(t))return;const r=Fs.get(t);if(!r)return;const o=VD(n);Id.add(t),Ze.extBackfillRecentBookmarkFolderName(e,t,r,{candidateTweetIds:o,candidateLimit:Sv,recentCaptureScanLimit:jD}).then(a=>{((a==null?void 0:a.inspected)||0)>0&&Nf.delete(t),((a==null?void 0:a.updated)||0)>0&&Ae.info(`Bookmarks: folder-name backfill updated ${a.updated} rows for folder ${t}`);}).catch(()=>{}).finally(()=>{Id.delete(t);});}const Fs=HD();function GD(e){if(!e||typeof e!="object")return false;const t=e.timeline;if(!t||typeof t!="object")return false;const n=t.instructions;return Array.isArray(n)}function Ff(e,t=0,n=new Set){var o;if(!e||typeof e!="object"||t>5)return null;if(Array.isArray(e)){for(const a of e){const i=Ff(a,t+1,n);if(i)return i}return null}if(GD(e))return ((o=e.timeline)==null?void 0:o.instructions)||null;const r=e;if(n.has(r))return null;n.add(r);for(const a of Object.keys(r)){const i=Ff(r[a],t+1,n);if(i)return i}return null}function Nc(e){if(typeof e=="number"&&Number.isFinite(e)){const n=String(Math.trunc(e));return /^\d+$/.test(n)?n:null}if(typeof e!="string")return null;const t=e.trim();return /^\d+$/.test(t)?t:null}function WD(e){const t=e.toLowerCase().replace(/[^a-z0-9]/g,"");return /^(bookmarkcollectionid|bookmarkfolderid|bookmarkcollection|folderid|collectionid|folder)$/.test(t)}function Ya(e){const t=new Set;function n(r,o){const a=o&&WD(o)?Nc(r):null;if(a)return a;if(!r||typeof r!="object")return null;if(Array.isArray(r)){for(const s of r){const l=n(s);if(l)return l}return null}const i=r;if(t.has(i))return null;t.add(i);for(const[s,l]of Object.entries(i)){const c=n(l,s);if(c)return c}return null}return n(e)}function YD(e){var r,o,a,i,s,l;const t=((o=(r=e.data)==null?void 0:r.bookmark_timeline_v2)==null?void 0:o.timeline)||((i=(a=e.data)==null?void 0:a.bookmark_timeline)==null?void 0:i.timeline)||((l=(s=e.data)==null?void 0:s.bookmark_collection_timeline)==null?void 0:l.timeline)||e.timeline;if(t&&Array.isArray(t.instructions))return t.instructions;const n=Ff(e.data,0,new Set);if(n)return n;throw new Error("Bookmarks response missing timeline instructions")}const JD="__twe_bookmark_context_v1",XD="__twe_bookmark_strict_folder_id_v1",ZD="twe_bookmark_strict_folder_id_v1",QD="__twe_bookmark_strict_mode_v1",eP="twe_bookmark_strict_mode_v1",tP="__twe_hook_stats_v1",nP="__twe_runtime_v1";function Wl(e){const t=n=>{if(!n||typeof n!="object")return;const r=n,o=Number(r[e]);r[e]=Number.isFinite(o)?o+1:1;};try{const n=globalThis;t(n[tP]),t(n[nP]);}catch{}}function Fc(e){try{return JSON.parse(e)}catch{return null}}function rP(e){try{return new URLSearchParams(e)}catch{return null}}function Rh(e){if(typeof e>"u"||e===null)return null;if(typeof e=="string"){let t=Fc(e);if(t!==null)return t;const n=rP(e);if(n){const r=n.get("variables");if(r&&(t=Fc(r),t!==null))return t;const o=n.get("bookmark_collection_id")??n.get("folder_id");if(o)return {bookmark_collection_id:o,folder_id:o}}return null}if(typeof Blob<"u"&&e instanceof Blob)return null;if(typeof FormData<"u"&&e instanceof FormData)try{const t=new URLSearchParams;for(const[n,r]of e.entries())typeof r=="string"?t.set(n,r):t.set(n,String(r));return Rh(t.toString())}catch{return null}return null}function Rd(e){if(!e)return null;if(typeof e=="string"){const t=e.trim();if(!t)return null;if(/^\d+$/.test(t))return t;const n=Mo(t);if(n)return n;const r=Fc(t);return r?Ya(r):null}if(typeof e=="object"&&e!==null){const t=e;if(typeof t.folderId=="string"&&/^\d+$/.test(t.folderId))return t.folderId;if(typeof t.folderId=="number"&&Number.isFinite(t.folderId))return String(Math.trunc(t.folderId));if(typeof t.folder_id=="string"&&/^\d+$/.test(t.folder_id))return t.folder_id;if(typeof t.folder_id=="number"&&Number.isFinite(t.folder_id))return String(Math.trunc(t.folder_id));const n=Ya(e);if(n)return n;const r=[t.pageUrl,t.url,t.location,t.currentUrl,t.folderUrl].find(o=>typeof o=="string");if(typeof r=="string"){const o=Mo(r);if(o)return o}}return null}function Ed(){try{return globalThis[JD]??null}catch{return null}}function oP(){try{const e=globalThis;if(e[QD]===!1)return null;const t=Nc(e[XD]);if(t)return t}catch{}try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(eP);if(e&&/^(0|false|off|no)$/i.test(e.trim()))return null;const t=Nc(localStorage.getItem(ZD));if(t)return t}catch{}return null}function aP(e){const t=Cv(e.url);if(t)return t;if(e.body){const n=Rh(e.body);if(n){const r=Ya(n);if(r)return r}}return null}function iP(e){if(!e)return null;const t=Fc(e);return t?Ya(t):null}function Mo(e){try{const t=new URL(e,"https://x.com"),n=["bookmark_collection_id","bookmarkcollectionid","bookmarkCollectionId","folder_id","folderid","folderId","collection_id","collectionid","collectionId"],r=t.pathname.match(/\/bookmarks\/(\d+)/)||t.pathname.match(/\/bookmarks\/folders\/(\d+)/)||t.pathname.match(/\/bookmarks\/folder\/(\d+)/)||t.pathname.match(/\/bookmark_folders\/(\d+)/);if(r&&r[1])return r[1];for(const o of n){const a=t.searchParams.get(o);if(a&&/^\d+$/.test(a))return a}for(const[o,a]of t.searchParams.entries())if(/folder/i.test(o)&&/^\d+$/.test(a))return a;return null}catch{return null}}function Cv(e){try{const n=new URL(e,"https://x.com").searchParams.get("variables");if(!n)return null;let r;try{r=JSON.parse(decodeURIComponent(n));}catch{try{r=JSON.parse(n);}catch{return null}}const o=Ya(r);if(o)return o;if(r&&typeof r=="object"){const a=r;for(const i of ["bookmark_collection_id","bookmarkcollectionid","bookmarkCollectionId","folder_id","folderid","folderId","collection_id","collectionid","collectionId"]){const s=a[i],l=Nc(s);if(l)return l}}}catch{return null}return null}function sP(e){const t={folder_id:null,folder_name:null,folder_url:typeof location<"u"?location.href:""};if(!t.folder_id)try{const n=new URL(e.url,"https://x.com"),r=Cv(e.url);if(r)t.folder_id=r;else {const o=Mo(n.href);if(o)t.folder_id=o;else {const a=n.searchParams.get("variables");if(a){let i;try{i=JSON.parse(decodeURIComponent(a));}catch{i=JSON.parse(a);}const s=Ya(i);s&&(t.folder_id=s);}}}}catch{}if(!t.folder_id&&e.body){const n=Rh(e.body);if(n){const r=Ya(n);r&&(t.folder_id=r);}}if(!t.folder_id){const n=Rd(e.bookmarkContext);n&&(t.folder_id=n);}if(!t.folder_id){const n=Rd(Ed());n&&(t.folder_id=n);}if(!t.folder_id&&e.bookmarkContext&&typeof e.bookmarkContext=="object"){const n=e.bookmarkContext,r=[n.folderUrl,n.pageUrl,n.url,n.location,n.currentUrl].filter(o=>typeof o=="string"&&o.length>0).map(o=>Mo(o)).find(o=>!!o);r&&(t.folder_id=r);}if(e.bookmarkContext&&typeof e.bookmarkContext=="object"){const n=e.bookmarkContext;typeof n.folderUrl=="string"?t.folder_url=n.folderUrl:typeof n.pageUrl=="string"?t.folder_url=n.pageUrl:typeof n.url=="string"?t.folder_url=n.url:typeof n.location=="string"?t.folder_url=n.location:typeof n.currentUrl=="string"&&(t.folder_url=n.currentUrl);}else {const n=Ed();if(n&&typeof n=="object"){const r=n;typeof r.folderUrl=="string"?t.folder_url=r.folderUrl:typeof r.pageUrl=="string"?t.folder_url=r.pageUrl:typeof r.url=="string"?t.folder_url=r.url:typeof r.location=="string"?t.folder_url=r.location:typeof r.currentUrl=="string"&&(t.folder_url=r.currentUrl);}}if(!t.folder_id){const n=typeof location<"u"?location.href:"";if(n){const r=Mo(n);r&&(t.folder_id=r,t.folder_url=n);}}if(!t.folder_id&&e.responseText){const n=iP(e.responseText);n&&(t.folder_id=n);}if(!t.folder_id){const n=Rd(Ed());n&&(t.folder_id=n);}if(!t.folder_id&&typeof document<"u"&&(t.folder_id=Mo(document.URL)),!t.folder_id&&typeof document<"u"){const n=document.querySelector('link[rel="canonical"]');n!=null&&n.href&&(t.folder_id=Mo(n.href));}if(!t.folder_id&&typeof document<"u"){const n=document.querySelector('meta[property="og:url"]'),r=(n==null?void 0:n.content)??"";r&&(t.folder_id=Mo(r));}if(t.folder_id){try{const r=new URL(t.folder_url||"","https://x.com");/\/i\/bookmarks\/?$/.test(r.pathname)&&(t.folder_url=`https://x.com/i/bookmarks/${t.folder_id}`);}catch{(!t.folder_url||/\/i\/bookmarks\/?$/.test(t.folder_url))&&(t.folder_url=`https://x.com/i/bookmarks/${t.folder_id}`);}const n=Fs.get(t.folder_id);n&&(t.folder_name=n);}return t}function lP(e){var n,r,o,a,i;const t=new Set;try{const l=((i=(a=(o=(r=(n=JSON.parse(e).data)==null?void 0:n.viewer)==null?void 0:r.user_results)==null?void 0:o.result)==null?void 0:a.bookmark_collections_slice)==null?void 0:i.items)??[];let c=!1;for(const h of l)h.id&&typeof h.name=="string"&&Fs.get(h.id)!==h.name&&(Fs.set(h.id,h.name),t.add(h.id),c=!0);c&&qD(Fs);}catch{}return t}function cP(e){try{const n=new URL(e,"https://x.com").pathname.toLowerCase().match(/\/graphql\/[^/]+\/([^/?#]+)/),r=String((n==null?void 0:n[1])||"").toLowerCase();return r?r==="bookmarks"||r==="bookmarktimeline"||r==="bookmarkfoldertimeline"||r==="bookmarkcollectiontimeline"||r==="bookmarkcollectionstimeline"||r==="bookmarkfoldersslice"||r==="bookmarkfolderslice"||r==="bookmarkcollectionslice"||r==="bookmarkslice":!1}catch{return false}}const uP=(e,t,n)=>{if(/\/graphql\/.+\/BookmarkFoldersSlice/.test(e.url)){const r=typeof t.responseText=="string"?t.responseText:"";if(r){const o=lP(r);o.size>0&&zD(o);}return}if(cP(e.url))try{const r=aP(e),o=typeof location<"u"?Mo(location.href):null;if(o&&r&&r!==o){Wl("bookmarkDropsCrossFolder"),Ae.debug(`Bookmarks: skip cross-folder request pageFolder=${o}, requestFolder=${r}`);return}const a=sP({...e,responseText:t.responseText}),i=oP();if(i){const c=r||o||a.folder_id||null,h=r?"request":o?"page":a.folder_id?"context":"none";if(!c){Wl("bookmarkDropsStrictNoExplicitFolder"),Ae.debug(`Bookmarks(strict): skip request without folder evidence: ${e.url}`);return}if(c!==i){Wl("bookmarkDropsStrictFolderMismatch"),Ae.debug(`Bookmarks(strict): skip folder mismatch source=${h} candidateFolder=${c}, strictFolder=${i}`);return}!r&&h!=="none"&&Ae.debug(`Bookmarks(strict): allowing request without explicit folder id via ${h} context`),a.folder_id!==i&&(a.folder_id=i,a.folder_url=`https://x.com/i/bookmarks/${i}`);}a.folder_id||Wl("bookmarkContextUnresolved");const s=Xa(t,YD,c=>Gn(c.content.itemContent));for(const c of s)if(c&&typeof c=="object"){const h=c;a.folder_id&&(h.__bookmark_folder_id=a.folder_id),a.folder_name&&(h.__bookmark_folder_name=a.folder_name),a.folder_id&&(h.__bookmark_folder_name_source=a.folder_name?"api":"id-only"),a.folder_url&&(h.__bookmark_folder_url=a.folder_url);}const l=`Bookmarks${a.folder_id?` (folder: ${a.folder_name??a.folder_id})`:""}`;yo(n.name,s).then(()=>{KD(n.name,a.folder_id,s),vv(l,s.length);}).catch(c=>{Ae.errorWithBanner(`${l}: Failed to write API response projection`,c instanceof Error?c:new Error(String(c)));});}catch(r){kv("Bookmarks",e,t,r);}};class n_ extends Cn{constructor(){super(...arguments);be(this,"name","BookmarksModule");be(this,"type",mt.TWEET);}intercept(){return uP}render(){return Wn}}const dP=tr({moduleName:"CommunityMembers",match:e=>/\/graphql\/.+\/(members|moderators)SliceTimeline_Query/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.communityResults.result;return (r.members_slice??r.moderators_slice).items_results.map(o=>o.result).filter(o=>o.__typename==="User")},project:(e,t)=>ul(e,t)});class fP extends Cn{constructor(){super(...arguments);be(this,"name","CommunityMembersModule");be(this,"type",mt.USER);}intercept(){return dP}render(){return Wn}}const hP=tr({moduleName:"CommunityTimeline",match:e=>/\/graphql\/.+\/Community(Tweets|Media)Timeline/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.communityResults.result,a=(r.ranked_community_timeline??r.community_media_timeline).timeline.instructions,i=[],s=a.find(h=>h.type==="TimelineAddEntries"),l=(s==null?void 0:s.entries)??[];for(const h of l){if(qa(h)){const u=Gn(h.content.itemContent);u&&i.push(u);}if(f1(h)){const u=h.content.items.map(m=>Gn(m.item.itemContent)).filter(m=>!!m);i.push(...u);}}const c=a.find(h=>h.type==="TimelineAddToModule");if(c!=null&&c.moduleItems){const h=c.moduleItems.map(u=>Gn(u.item.itemContent)).filter(u=>!!u);i.push(...h);}return i},project:(e,t)=>yo(e,t)});class pP extends Cn{constructor(){super(...arguments);be(this,"name","CommunityTimelineModule");be(this,"type",mt.TWEET);}intercept(){return hP}render(){return Wn}}const $s=Oo([]),Tv=new Map,Mv=new Map,r_=[{test:e=>/\/dm\/inbox_initial_state\.json/.test(e),parse:e=>({entries:e.inbox_initial_state.entries,conversations:Object.values(e.inbox_initial_state.conversations),users:Object.values(e.inbox_initial_state.users)})},{test:e=>/\/dm\/inbox_timeline\/trusted\.json/.test(e),parse:e=>({entries:e.inbox_timeline.entries,conversations:Object.values(e.inbox_timeline.conversations),users:Object.values(e.inbox_timeline.users)})},{test:e=>/\/dm\/conversation\/\d+-?\d+\.json/.test(e),parse:e=>({entries:e.conversation_timeline.entries,conversations:Object.values(e.conversation_timeline.conversations),users:Object.values(e.conversation_timeline.users)})}],mP=tr({moduleName:"DirectMessages",match:e=>r_.some(t=>t.test(e.url)),parse:(e,t)=>{const n=r_.find(l=>l.test(e.url));if(!n)return {messages:[],conversations:[],users:[]};const r=JSON.parse(t.responseText),{entries:o,conversations:a,users:i}=n.parse(r);return {messages:o.map(l=>l.message).filter(l=>!!l),conversations:a,users:i}},count:e=>e.messages.length,onSuccess:e=>{$s.value=[...$s.value,...e.messages],e.conversations.filter(Boolean).forEach(t=>Tv.set(t.conversation_id,t)),e.users.filter(Boolean).forEach(t=>Mv.set(t.id_str,t));}});function o_(e){const t=e?Mv.get(e):null;return t?t.screen_name:""}function gP(e){const t=e?Tv.get(e):null;return t?t.type:""}function a_(e){var t,n,r;return [(t=e.message_data.attachment)==null?void 0:t.photo,(n=e.message_data.attachment)==null?void 0:n.video,(r=e.message_data.attachment)==null?void 0:r.animated_gif].filter(o=>!!o)}const lo=xh(),_P=[lo.display({id:"select",size:48,minSize:48,maxSize:48,meta:{exportable:false},header:({table:e})=>f("input",{type:"checkbox",class:"checkbox checkbox-sm align-middle",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>f("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:e.getToggleSelectedHandler()})}),lo.accessor("id",{size:112,minSize:112,meta:{exportKey:"id",exportHeader:"ID"},header:()=>f(gt,{i18nKey:"ID"}),cell:e=>f("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),lo.accessor("time",{size:136,minSize:128,meta:{exportKey:"time",exportHeader:"Date",exportValue:e=>Jr(zs(+e.original.time),et.get("dateTimeFormat"))},header:()=>f(gt,{i18nKey:"Date"}),cell:e=>f("p",{class:"w-24",children:Jr(+e.getValue(),et.get("dateTimeFormat"))})}),lo.accessor("message_data.text",{size:360,minSize:280,maxSize:520,meta:{exportKey:"text",exportHeader:"Content"},header:()=>f(gt,{i18nKey:"Content"}),cell:e=>{var t;return f("div",{children:f("p",{class:"w-60 whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:wc(e.row.original.message_data.text,(t=e.row.original.message_data.entities)==null?void 0:t.urls)}})})}}),lo.accessor(e=>a_(e),{id:"media",size:176,minSize:136,meta:{exportKey:"media",exportHeader:"Media",exportValue:e=>a_(e.original).map(t=>({type:t.type,url:t.url,thumbnail:$i(t.media_url_https,"thumb"),original:Wa(t),ext_alt_text:t.ext_alt_text}))},header:()=>f(gt,{i18nKey:"Media"}),cell:e=>f(Gy,{data:e.getValue().filter(t=>!!t),onClick:t=>{var n;return (n=e.table.options.meta)==null?void 0:n.setMediaPreview(Wa(t))}})}),lo.accessor(e=>o_(e.message_data.sender_id),{id:"sender",size:144,minSize:120,meta:{exportKey:"sender",exportHeader:"Sender"},header:()=>f(gt,{i18nKey:"Sender"}),cell:e=>f("p",{class:"whitespace-pre",children:f("a",{class:"link",target:"_blank",href:`https://twitter.com/${e.getValue()}`,children:["@",e.getValue()]})})}),lo.accessor(e=>o_(e.message_data.recipient_id),{id:"recipient",size:144,minSize:120,meta:{exportKey:"recipient",exportHeader:"Recipient"},header:()=>f(gt,{i18nKey:"Recipient"}),cell:e=>f("p",{class:"whitespace-pre",children:e.getValue()?f("a",{class:"link",target:"_blank",href:`https://twitter.com/${e.getValue()}`,children:["@",e.getValue()]}):"N/A"})}),lo.accessor("conversation_id",{size:144,minSize:128,meta:{exportKey:"conversation_id",exportHeader:"Conversation ID"},header:()=>f(gt,{i18nKey:"Conversation ID"}),cell:e=>f("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),lo.accessor(e=>gP(e.conversation_id),{id:"conversation_type",size:160,minSize:136,meta:{exportKey:"conversation_type",exportHeader:"Conversation Type"},header:()=>f(gt,{i18nKey:"Conversation Type"}),cell:e=>f("p",{class:"whitespace-pre",children:e.getValue()})}),lo.display({id:"actions",size:112,minSize:104,meta:{exportable:false},header:()=>f(gt,{i18nKey:"Actions"}),cell:e=>f("div",{class:"flex flex-row items-start space-x-1",children:f("button",{onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setRawDataPreview(e.row.original)},class:"btn btn-xs btn-neutral whitespace-nowrap",children:f(gt,{i18nKey:"Details"})})})})];function yP(){const{t:e}=er(),[t,n]=Tr(),r=e("DirectMessages"),o=$s.value.length;return f(rl,{title:r,description:`${e("Captured:")} ${o}`,active:!!o&&o>0,onClick:n,indicatorColor:"bg-accent",panelClass:"border-l-2 border-accent/50 pl-2",children:f(vr,{class:"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm min-h-[512px]",title:r,show:t,onClose:n,children:f(Zs,{title:r,records:$s.value,columns:_P,clear:()=>$s.value=[]})})})}class bP extends Cn{constructor(){super(...arguments);be(this,"name","DirectMessagesModule");be(this,"type",mt.CUSTOM);}intercept(){return mP}render(){return yP}}function wP(e){try{const n=new URL(e,"https://x.com").searchParams.get("variables");if(!n)return null;try{return JSON.parse(decodeURIComponent(n))}catch{return JSON.parse(n)}}catch{return null}}function vP(e){const t=wP(e.url),n=String((t==null?void 0:t.userId)||(t==null?void 0:t.user_id)||(t==null?void 0:t.rest_id)||(t==null?void 0:t.profileUserId)||"").trim(),r=String((t==null?void 0:t.screen_name)||(t==null?void 0:t.screenName)||(t==null?void 0:t.userScreenName)||"").trim();return {rest_id:n||void 0,screen_name:r||void 0}}function kP(e,t){var u,m,g,y,b,k;const n=JSON.parse(t.responseText),r=(m=(u=n==null?void 0:n.data)==null?void 0:u.user)==null?void 0:m.result,o=(y=(g=r==null?void 0:r.timeline)==null?void 0:g.timeline)==null?void 0:y.instructions;if(!Array.isArray(o))throw new Error("Followers response missing timeline instructions");const a=[];for(const S of o){if(S.type==="TimelineAddEntries")for(const M of S.entries||[]){if(nh(M)){const T=go(M.content.itemContent);T&&a.push(T);continue}if(wa(M))for(const T of M.content.items||[]){if(T.item.itemContent.__typename!=="TimelineUser")continue;const P=go(T.item.itemContent);P&&a.push(P);}}if(S.type==="TimelineAddToModule")for(const M of S.moduleItems||[]){if(M.item.itemContent.__typename!=="TimelineUser")continue;const T=go(M.item.itemContent);T&&a.push(T);}}const i=vP(e),s=r&&r.__typename==="User"?{...r,rest_id:String(r.rest_id||i.rest_id||"").trim(),core:{...r.core,screen_name:String(((b=r.core)==null?void 0:b.screen_name)||i.screen_name||"").trim()}}:null,l=String((s==null?void 0:s.rest_id)||i.rest_id||"").trim(),c=String(((k=s==null?void 0:s.core)==null?void 0:k.screen_name)||i.screen_name||"").trim(),h=l?a.map(S=>{var M;return {id:`FollowersModule-follower-${l}-${S.rest_id}`,extension:"FollowersModule",relation_type:"follower",subject_user_id:l,subject_screen_name:c||void 0,related_user_id:S.rest_id,related_screen_name:(M=S.core)==null?void 0:M.screen_name,observed_at:Date.now(),provenance_surface:"followers"}}):[];return {subject:s,users:a,edges:h}}const xP=tr({moduleName:"Followers",match:e=>/\/graphql\/.+\/(BlueVerified)*Followers/.test(e.url),parse:(e,t)=>kP(e,t),count:e=>e.users.length,project:(e,t)=>wv(e,t.users,t.edges)});class SP extends Cn{constructor(){super(...arguments);be(this,"name","FollowersModule");be(this,"type",mt.USER);}intercept(){return xP}render(){return Wn}}function CP(e){try{const n=new URL(e,"https://x.com").searchParams.get("variables");if(!n)return null;try{return JSON.parse(decodeURIComponent(n))}catch{return JSON.parse(n)}}catch{return null}}function TP(e){const t=CP(e.url),n=String((t==null?void 0:t.userId)||(t==null?void 0:t.user_id)||(t==null?void 0:t.rest_id)||(t==null?void 0:t.profileUserId)||"").trim(),r=String((t==null?void 0:t.screen_name)||(t==null?void 0:t.screenName)||(t==null?void 0:t.userScreenName)||"").trim();return {rest_id:n||void 0,screen_name:r||void 0}}function MP(e,t){var u,m,g,y,b,k;const n=JSON.parse(t.responseText),r=(m=(u=n==null?void 0:n.data)==null?void 0:u.user)==null?void 0:m.result,o=(y=(g=r==null?void 0:r.timeline)==null?void 0:g.timeline)==null?void 0:y.instructions;if(!Array.isArray(o))throw new Error("Following response missing timeline instructions");const a=[];for(const S of o){if(S.type==="TimelineAddEntries")for(const M of S.entries||[]){if(nh(M)){const T=go(M.content.itemContent);T&&a.push(T);continue}if(wa(M))for(const T of M.content.items||[]){if(T.item.itemContent.__typename!=="TimelineUser")continue;const P=go(T.item.itemContent);P&&a.push(P);}}if(S.type==="TimelineAddToModule")for(const M of S.moduleItems||[]){if(M.item.itemContent.__typename!=="TimelineUser")continue;const T=go(M.item.itemContent);T&&a.push(T);}}const i=TP(e),s=r&&r.__typename==="User"?{...r,rest_id:String(r.rest_id||i.rest_id||"").trim(),core:{...r.core,screen_name:String(((b=r.core)==null?void 0:b.screen_name)||i.screen_name||"").trim()}}:null,l=String((s==null?void 0:s.rest_id)||i.rest_id||"").trim(),c=String(((k=s==null?void 0:s.core)==null?void 0:k.screen_name)||i.screen_name||"").trim(),h=l?a.map(S=>{var M;return {id:`FollowingModule-following-${l}-${S.rest_id}`,extension:"FollowingModule",relation_type:"following",subject_user_id:l,subject_screen_name:c||void 0,related_user_id:S.rest_id,related_screen_name:(M=S.core)==null?void 0:M.screen_name,observed_at:Date.now(),provenance_surface:"following"}}):[];return {subject:s,users:a,edges:h}}const IP=tr({moduleName:"Following",match:e=>/\/graphql\/.+\/Following/.test(e.url),parse:(e,t)=>MP(e,t),count:e=>e.users.length,project:(e,t)=>wv(e,t.users,t.edges)});class RP extends Cn{constructor(){super(...arguments);be(this,"name","FollowingModule");be(this,"type",mt.USER);}intercept(){return IP}render(){return Wn}}const EP=tr({moduleName:"HomeTimeline",match:e=>/\/graphql\/.+\/Home(Latest)?Timeline/.test(e.url),parse:(e,t)=>Xa(t,n=>n.data.home.home_timeline_urt.instructions,n=>Gn(n.content.itemContent)),project:(e,t)=>yo(e,t)});class AP extends Cn{constructor(){super(...arguments);be(this,"name","HomeTimelineModule");be(this,"type",mt.TWEET);}intercept(){return EP}render(){return Wn}}function DP(e){if(!(e instanceof HTMLElement))return false;const t=e.getBoundingClientRect();return t.width>0&&t.height>0&&t.bottom>0&&t.top<window.innerHeight}function Iv(e){const t=new Set,n=[];for(const r of e){const o=String(r||"").trim();o&&(t.has(o)||(t.add(o),n.push(o)));}return n}function $f(e){return String(e||"").replace(/\s+/g," ").replace(/\u00a0/g," ").trim()}function PP(e){if(typeof document>"u"||!e)return null;const t=[...document.querySelectorAll(`a[href*="/status/${e}"]`)],n=t.map(o=>o.closest("article")).find(o=>DP(o));if(n instanceof HTMLElement)return n;const r=t.map(o=>o.closest("article")).find(Boolean);return r instanceof HTMLElement?r:null}function OP(e,t){const n=e.querySelector(`a[href*="/status/${t}"]`),o=((n==null?void 0:n.getAttribute("href"))||"").match(/^\/([^/?#]+)\/status\//);return (o==null?void 0:o[1])||"unknown"}function LP(e,t){var o;const n=((o=e.querySelector('[data-testid="User-Name"] span'))==null?void 0:o.textContent)||"",r=$f(n);return r?r.replace(/^@/,""):t}function NP(e){const t=Iv([...e.querySelectorAll('[data-testid="tweetText"], div[lang]')].map(r=>$f(r.textContent||"")));return t.length?t.join(`
`):$f(e.innerText||e.textContent||"")}function FP(e){if(!e)return new Date().toUTCString();const t=Date.parse(e);return Number.isFinite(t)?new Date(t).toUTCString():new Date().toUTCString()}function $P(e){const t=[...e.querySelectorAll("img")].find(n=>{const r=n.getAttribute("src")||"";return /profile_images/.test(r)});return (t==null?void 0:t.getAttribute("src"))||""}function BP(e,t){const n=[...e.querySelectorAll("img")].map(o=>({src:o.getAttribute("src")||"",width:o.naturalWidth||o.clientWidth||0,height:o.naturalHeight||o.clientHeight||0,alt:o.getAttribute("alt")||""})).filter(({src:o,alt:a})=>!o||/profile_images/.test(o)||/emoji/.test(o)||!/twimg\.com\//.test(o)?false:a==="Image"?true:/\/media\//.test(o)||/name=/.test(o));return Iv(n.map(o=>o.src)).slice(0,8).map((o,a)=>{const i=n.find(s=>s.src===o);return {type:"photo",media_url_https:o,media_url:o,id_str:`${t}${a}`,media_key:`dom:${t}:${a}`,indices:[0,0],url:o,display_url:o,expanded_url:o,sizes:{medium:{w:(i==null?void 0:i.width)||1200,h:(i==null?void 0:i.height)||675,resize:"fit"},large:{w:(i==null?void 0:i.width)||1200,h:(i==null?void 0:i.height)||675,resize:"fit"},small:{w:(i==null?void 0:i.width)||680,h:(i==null?void 0:i.height)||382,resize:"fit"},thumb:{w:150,h:150,resize:"crop"}},original_info:{width:(i==null?void 0:i.width)||1200,height:(i==null?void 0:i.height)||675},features:{}}})}function UP(e,t,n){return {__typename:"User",id:e||"unknown",rest_id:e||"unknown",affiliates_highlighted_label:null,has_graduated_access:false,is_blue_verified:false,profile_image_shape:"Circle",legacy:{default_profile:false,default_profile_image:!n,description:"",entities:{description:{urls:[]}},fast_followers_count:0,favourites_count:0,followers_count:0,friends_count:0,has_custom_timelines:false,is_translator:false,listed_count:0,media_count:0,normal_followers_count:0,pinned_tweet_ids_str:[],possibly_sensitive:false,profile_interstitial_type:"",statuses_count:0,translator_type:"",want_retweets:true,withheld_in_countries:[]},avatar:{image_url:n},core:{name:t||e||"unknown",screen_name:e||"unknown",created_at:new Date(0).toUTCString()},dm_permissions:{can_dm:false},location:{location:""},media_permissions:{can_media_tag:false},privacy:{protected:false},verification:{verified:false},relationship_perspectives:{following:false,followed_by:false},twe_private_fields:{created_at:0,updated_at:Date.now()}}}function jP(e){var y;const t=String(e.tweetId||"").trim();if(!t)return null;const n=PP(t);if(!n)return null;const r=OP(n,t),o=LP(n,r),a=a1(n),i=a||NP(n),s=((y=n.querySelector("time"))==null?void 0:y.getAttribute("datetime"))||null,l=FP(s),c=$P(n),h=BP(n,t),u=e.bookmarkFolderId?String(e.bookmarkFolderId):"",m=e.bookmarkFolderName?String(e.bookmarkFolderName).trim():"";return {__typename:"Tweet",rest_id:t,core:{user_results:{result:UP(r,o,c)}},edit_control:{edit_tweet_ids:[t],editable_until_msecs:"0",is_edit_eligible:false,edits_remaining:"0"},is_translatable:false,views:{count:"0",state:"Enabled"},source:"dom-snapshot",legacy:{bookmark_count:0,bookmarked:e.bookmarked===true,created_at:l,conversation_id_str:t,display_text_range:[0,i.length],entities:{media:h.length?h:void 0,user_mentions:[],urls:[],hashtags:[],symbols:[],timestamps:[]},extended_entities:h.length?{media:h}:void 0,favorite_count:0,favorited:false,full_text:i,is_quote_status:false,lang:"",possibly_sensitive:false,possibly_sensitive_editable:false,quote_count:0,reply_count:0,retweet_count:0,retweeted:false,user_id_str:r||"unknown",id_str:t},twe_private_fields:{created_at:Date.parse(l)||Date.now(),updated_at:Date.now(),media_count:h.length,...a?{article_markdown:a,article_markdown_version:eh}:{}},...u?{__bookmark_folder_id:u,__bookmark_folder_url:`https://x.com/i/bookmarks/${u}`,__bookmark_folder_name_source:m?"api":"id-only",...m?{__bookmark_folder_name:m}:{}}:{}}}const HP=/\/graphql\/[^/]+\/([^/?#]+)/i,i_=/^\d{5,25}$/,qP=new Set(["tweetid","tweetidstr","statusid","statusidstr","id","restid"]),VP=new Set(["userid","targetuserid","useridstr","sourceuserid"]),zP=new Set(["bookmarkcollectionid","bookmarkfolderid","bookmarkcollection","bookmarkfolder","folderid","collectionid"]),ac="BookmarksModule",s_="LikesModule",l_="FollowingModule",KP="twe_bookmark_folder_name_cache_v1";function GP(e){return String(e||"").toLowerCase().replace(/[^a-z0-9]/g,"")}function c_(e){if(typeof e=="number"&&Number.isFinite(e)){const n=String(Math.trunc(e));return i_.test(n)?n:null}const t=String(e??"").trim();return t&&i_.test(t)?t:null}function Rv(e){const t=String(e||"").match(HP);return (t==null?void 0:t[1])||""}function WP(e){const t=String(e||"").toLowerCase(),n=Rv(e).toLowerCase(),r=`${t} ${n}`;return /(bookmarktweettofolder|addbookmarktofolder|createbookmarktofolder|bookmarktofolder)/.test(r)?{kind:"bookmark_folder_add",targetType:"folder"}:/(createbookmark|addbookmark|bookmarkcreate|bookmark\/entries\/add)/.test(r)?{kind:"bookmark_add",targetType:"tweet"}:/(deletebookmark|removebookmark|destroybookmark|bookmark\/entries\/(remove|delete|destroy))/.test(r)?{kind:"bookmark_remove",targetType:"tweet"}:/(favoritetweet|createfavorite|like(add|tweet)?\b)/.test(r)?{kind:"like_add",targetType:"tweet"}:/(unfavoritetweet|deletefavorite|destroyfavorite|unlike(tweet)?\b)/.test(r)?{kind:"like_remove",targetType:"tweet"}:/(followuser|createfollow|friendships\/create(\.json)?\b)/.test(r)?{kind:"follow_add",targetType:"user"}:/(unfollowuser|destroyfollow|friendships\/destroy(\.json)?\b)/.test(r)?{kind:"follow_remove",targetType:"user"}:/(createretweet|statuses\/retweet\/)/.test(r)?{kind:"retweet_add",targetType:"tweet"}:/(deleteretweet|unretweet|statuses\/unretweet\/)/.test(r)?{kind:"retweet_remove",targetType:"tweet"}:null}function u_(e){try{return JSON.parse(e)}catch{return null}}function YP(e){if(!e)return {};const t=e.trim();if(!t)return {};if(t.startsWith("{")||t.startsWith("[")){const r=u_(t);return r&&typeof r=="object"?r:{}}const n={};try{const r=new URLSearchParams(t);for(const[o,a]of r.entries()){const i=a.startsWith("{")||a.startsWith("[")?u_(a)??a:a;if(o in n){const s=n[o];Array.isArray(s)?s.push(i):n[o]=[s,i];}else n[o]=i;}}catch{return {}}return n}function Bs(e,t,n,r=0,o=new Set){if(r>8||!e)return;if(Array.isArray(e)){for(const i of e)Bs(i,t,n,r+1,o);return}if(typeof e!="object")return;const a=e;if(!o.has(a)){o.add(a);for(const[i,s]of Object.entries(a)){const l=GP(i);if(t(l))if(Array.isArray(s))for(const c of s){const h=c_(c);h&&n.add(h);}else {const c=c_(s);c&&n.add(c);}Bs(s,t,n,r+1,o);}}}function JP(e,t){const n=new Set,r=new Set,o=new Set;Bs(e,s=>qP.has(s),n),Bs(e,s=>VP.has(s),r),Bs(e,s=>zP.has(s),o);const i=String(t||"").match(/\/(?:retweet|unretweet)\/(\d{5,25})/i);return i!=null&&i[1]&&n.add(i[1]),{tweetIds:[...n],userIds:[...r],folderIds:[...o]}}function XP(e,t){return e.targetType==="tweet"&&t.tweetIds.length?t.tweetIds:e.targetType==="user"&&t.userIds.length?t.userIds:e.targetType==="folder"&&t.folderIds.length?t.folderIds:t.tweetIds.length?t.tweetIds:t.userIds.length?t.userIds:t.folderIds.length?t.folderIds:["unknown"]}function Ad(e){return e.replace(/[^a-zA-Z0-9:_-]/g,"_").slice(0,128)}function ZP(e){if(!e)return null;try{if(typeof localStorage>"u")return null;const t=localStorage.getItem(KP);if(!t)return null;const n=JSON.parse(t);if(!Array.isArray(n))return null;for(const r of n)if(Array.isArray(r)&&r.length===2&&String(r[0]||"").trim()===e&&typeof r[1]=="string")return r[1]}catch{return null}return null}function ys(e,t){const n={...e,legacy:{...e.legacy}};return typeof t.bookmarked=="boolean"&&(n.legacy.bookmarked=t.bookmarked),typeof t.favorited=="boolean"&&(n.legacy.favorited=t.favorited),typeof t.retweeted=="boolean"&&(n.legacy.retweeted=t.retweeted),t.bookmarkFolderId!==void 0&&(t.bookmarkFolderId?(n.__bookmark_folder_id=t.bookmarkFolderId,n.__bookmark_folder_url=`https://x.com/i/bookmarks/${t.bookmarkFolderId}`,n.__bookmark_folder_name_source=t.bookmarkFolderName?"api":"id-only",t.bookmarkFolderName?n.__bookmark_folder_name=t.bookmarkFolderName:delete n.__bookmark_folder_name):(delete n.__bookmark_folder_id,delete n.__bookmark_folder_name,delete n.__bookmark_folder_name_source,delete n.__bookmark_folder_url)),n}function d_(e,t){return {...e,relationship_perspectives:{...e.relationship_perspectives||{},following:t}}}async function f_(e,t){const n=e.filter(Boolean);if(!n.length)return {hydratedIds:[],tasks:[]};const r=[];for(const o of n){const a=jP({tweetId:o,bookmarked:t.bookmarked,bookmarkFolderId:t.bookmarkFolderId,bookmarkFolderName:t.bookmarkFolderName});a&&r.push(a);}return r.length?(await Ze.extAddTweets(ac,r),{hydratedIds:r.map(o=>o.rest_id),tasks:[]}):{hydratedIds:[],tasks:[]}}async function QP(e,t){const n=t.folderIds[0]??null,r=ZP(n);switch(e.kind){case "bookmark_add":if(!t.tweetIds.length)return [];{const o=await f_(t.tweetIds,{bookmarked:true}),a=t.tweetIds.filter(i=>!o.hydratedIds.includes(i));return [...o.tasks,...a.length?[Ze.extAddTweetCaptureIds(ac,a,i=>ys(i,{bookmarked:true}))]:[]]}case "bookmark_folder_add":if(!t.tweetIds.length)return [];{const o=await f_(t.tweetIds,{bookmarked:true,bookmarkFolderId:n??void 0,bookmarkFolderName:r}),a=new Set(o.hydratedIds),i=t.tweetIds.filter(s=>!a.has(s));return [...o.tasks,...i.length?[Ze.extAddTweetCaptureIds(ac,i,s=>ys(s,{bookmarked:true,bookmarkFolderId:n??void 0,bookmarkFolderName:r}))]:[]]}case "bookmark_remove":return t.tweetIds.length?[Ze.extRemoveTweetCaptureIds(ac,t.tweetIds,o=>ys(o,{bookmarked:false,bookmarkFolderId:null}))]:[];case "like_add":return t.tweetIds.length?[Ze.extAddTweetCaptureIds(s_,t.tweetIds,o=>ys(o,{favorited:true}))]:[];case "like_remove":return t.tweetIds.length?[Ze.extRemoveTweetCaptureIds(s_,t.tweetIds,o=>ys(o,{favorited:false}))]:[];case "follow_add":return t.userIds.length?[Ze.extAddUserCaptureIds(l_,t.userIds,o=>d_(o,true))]:[];case "follow_remove":return t.userIds.length?[Ze.extRemoveUserCaptureIds(l_,t.userIds,o=>d_(o,false))]:[];default:return []}}const eO=(e,t,n)=>{const r=WP(e.url);if(!r||t.status<200||t.status>=300)return;const o=YP(e.body),a=JP(o,e.url),i=XP(r,a),s=Rv(e.url)||"none",l=Ad(e.requestId||`${Date.now()}-${Math.random().toString(36).slice(2,9)}`),c=Date.now(),h=i.map((m,g)=>{const y=Ad(m||"unknown"),b=`${l}-${r.kind}-${g}`,k=`${r.kind}|target:${y}|type:${r.targetType}|op:${Ad(s)}`;return {id:b,data_key:k,created_at:c}}),u=[Ze.extAddCustomCaptures(n.name,h)];Lx({ts:c,extension:n.name,kind:r.kind,target_type:r.targetType,operation:s,request_id:e.requestId,tweet_ids:a.tweetIds,user_ids:a.userIds,folder_ids:a.folderIds,targets:i,mirror_task_count:u.length}),QP(r,a).then(m=>Promise.allSettled([...u,...m])).then(m=>{for(const g of m)g.status==="rejected"&&Ae.warn("InteractionEvents: failed to mirror interaction state",g.reason);}),Ae.info(`InteractionEvents: ${h.length} items received`),Ae.debug(`InteractionEvents: kind=${r.kind} targetType=${r.targetType} op=${s}`);};function tO(e){return e.slice().sort((t,n)=>Number(n.created_at||0)-Number(t.created_at||0))}function nO(e){if(!Number.isFinite(e)||e<=0)return "-";try{return new Date(e).toLocaleString()}catch{return String(e)}}function rO(e){var a,i;const t=String(e||"").split("|"),n=t[0]||"unknown",r=((a=t.find(s=>s.startsWith("target:")))==null?void 0:a.slice(7))||"-",o=((i=t.find(s=>s.startsWith("op:")))==null?void 0:i.slice(3))||"-";return {kind:n,target:r,operation:o}}function oO({extension:e}){const{t}=er(),[n,r]=Tr(),o=bv(e.name),a=fv(()=>Ze.extGetCaptures(e.name),[e.name]),i=Array.isArray(a)?a:[],s=tO(i).slice(0,150);return f(rl,{title:t("Interaction Events"),description:`${t("Captured:")} ${o}`,active:o>0,onClick:r,indicatorColor:"bg-neutral",panelClass:"opacity-90",children:f(vr,{class:"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm min-h-[512px]",title:t("Interaction Events"),show:n,onClose:r,children:[f("div",{class:"text-xs text-base-content opacity-70 mb-2",children:["Captures request-level actions (like/bookmark/follow/repost). Showing latest"," ",s.length," events."]}),f("div",{class:"overflow-y-auto max-h-[460px] border rounded-box-half border-base-300",children:f("table",{class:"table table-xs w-full",children:[f("thead",{children:f("tr",{children:[f("th",{children:"Time"}),f("th",{children:"Action"}),f("th",{children:"Target"}),f("th",{children:"Op"})]})}),f("tbody",{children:s.map(l=>{const c=rO(l.data_key);return f("tr",{children:[f("td",{class:"font-mono",children:nO(Number(l.created_at||0))}),f("td",{class:"font-mono",children:c.kind}),f("td",{class:"font-mono break-all",children:c.target}),f("td",{class:"font-mono break-all",children:c.operation})]},l.id)})})]})})]})})}class aO extends Cn{constructor(){super(...arguments);be(this,"name","InteractionEventsModule");be(this,"type",mt.CUSTOM);}intercept(){return eO}render(){return oO}}const iO=tr({moduleName:"Likes",match:e=>/\/graphql\/.+\/Likes/.test(e.url),parse:(e,t)=>Xa(t,n=>n.data.user.result.timeline.timeline.instructions,n=>Gn(n.content.itemContent)),project:(e,t)=>yo(e,t)});class sO extends Cn{constructor(){super(...arguments);be(this,"name","LikesModule");be(this,"type",mt.TWEET);}intercept(){return iO}render(){return Wn}}const lO=tr({moduleName:"ListMembers",match:e=>/\/graphql\/.+\/ListMembers/.test(e.url),parse:(e,t)=>Xa(t,n=>n.data.list.members_timeline.timeline.instructions,n=>go(n.content.itemContent)),project:(e,t)=>ul(e,t)});class cO extends Cn{constructor(){super(...arguments);be(this,"name","ListMembersModule");be(this,"type",mt.USER);}intercept(){return lO}render(){return Wn}}const uO=tr({moduleName:"ListSubscribers",match:e=>/\/graphql\/.+\/ListSubscribers/.test(e.url),parse:(e,t)=>Xa(t,n=>n.data.list.subscribers_timeline.timeline.instructions,n=>go(n.content.itemContent)),project:(e,t)=>ul(e,t)});class dO extends Cn{constructor(){super(...arguments);be(this,"name","ListSubscribersModule");be(this,"type",mt.USER);}intercept(){return uO}render(){return Wn}}const fO=tr({moduleName:"ListTimeline",match:e=>/\/graphql\/.+\/ListLatestTweetsTimeline/.test(e.url),parse:(e,t)=>Xa(t,n=>n.data.list.tweets_timeline.timeline.instructions,n=>Gn(n.content.itemContent)),project:(e,t)=>yo(e,t)});class hO extends Cn{constructor(){super(...arguments);be(this,"name","ListTimelineModule");be(this,"type",mt.TWEET);}intercept(){return fO}render(){return Wn}}const pO={info:"text-base-content",warn:"text-warning",error:"text-error"},mO=[{pattern:/^Database connected: (.+)$/,key:"Database connected: {{name}}",map:e=>({name:e[1]})},{pattern:/^App options migrated from v(.+) to v(.+)$/,key:"App options migrated from v{{oldVersion}} to v{{newVersion}}",map:e=>({oldVersion:e[1],newVersion:e[2]})},{pattern:/^Hooked into XMLHttpRequest \(installed=(true|false)\)$/,key:"Hooked into XMLHttpRequest (installed={{installed}})",map:e=>({installed:e[1]})},{pattern:/^Hook safe mode enabled \((.+)\)$/,key:"Hook safe mode enabled ({{reason}})",map:e=>({reason:e[1]})},{pattern:/^Hook repair failed \((\d+)\/(\d+)\)$/,key:"Hook repair failed ({{failures}}/{{limit}})",map:e=>({failures:e[1],limit:e[2]})},{pattern:/^Bookmark context tracking install failed; continuing without tracker \((.+)\)$/,key:"Bookmark context tracking install failed; continuing without tracker ({{details}})",map:e=>({details:e[1]})},{pattern:/^TWE_DIAG (.+)$/,key:"TWE_DIAG {{phase}}",map:e=>({phase:e[1]})},{pattern:/^([A-Za-z]+): (\d+) items received$/,key:"{{module}}: {{count}} items received",map:e=>({module:e[1],count:e[2]})},{pattern:/^Exporting to ZIP file: (.+)$/,key:"Exporting to ZIP file: {{filename}}",map:e=>({filename:e[1]})},{pattern:/^Exporting to (.+) file: (.+)$/,key:"Exporting to {{format}} file: {{filename}}",map:e=>({format:e[1],filename:e[2]})},{pattern:/^Streaming export to (.+) file: (.+)$/,key:"Streaming export to {{format}} file: {{filename}}",map:e=>({format:e[1],filename:e[2]})},{pattern:/^Migration completed: (\d+) users and (\d+) tweets updated\.$/,key:"Migration completed: {{users}} users and {{tweets}} tweets updated.",map:e=>({users:e[1],tweets:e[2]})},{pattern:/^TweetTombstone received \(Reason: (.+)\)$/,key:"TweetTombstone received (Reason: {{reason}})",map:e=>({reason:e[1]})}],Ev="twe_raw_capture_daemon_url_v1",h_="twe_raw_search_query_v1",p_="twe_raw_search_sort_v1",m_="twe_raw_search_limit_v1",Av="twe_raw_search_saved_v1",Dv="twe_raw_search_ranking_v1";function gO({lines:e}){const{t}=er(),n=e.value.slice().reverse(),r=o=>{for(const a of mO){const i=o.match(a.pattern);if(i)return t(a.key,a.map(i))}return t(o)};return f("pre",{class:"leading-none text-xs max-h-48 bg-base-200 overflow-y-scroll m-0 px-1 py-2.5 no-scrollbar rounded-box-half",children:n.map(o=>f("span",{class:pO[o.type],children:["#",o.index," ",r(o.line),`
`]},o.index))})}function _O(){const{t:e}=er(),[t,n]=$e(()=>Ac()),r=o=>e(typeof o=="boolean"?o?"online":"offline":String(o||"unknown"));return ot(()=>{const o=()=>n(Ac());o();let a=null;const i=()=>{const s=document.hidden?9e3:2500;a=window.setTimeout(()=>{o(),i();},s);};return i(),window.addEventListener("twe:raw-event-v1",o),window.addEventListener("twe:raw-spool-state-v1",o),window.addEventListener("twe:raw-monitor-role-v1",o),()=>{a!==null&&window.clearTimeout(a),window.removeEventListener("twe:raw-event-v1",o),window.removeEventListener("twe:raw-spool-state-v1",o),window.removeEventListener("twe:raw-monitor-role-v1",o);}},[]),f("div",{class:"text-[11px] leading-tight bg-base-200 rounded-box-half px-2 py-1.5 mb-1",children:[f("div",{children:e("raw events: {{total}} | dropped: {{dropped}}",{total:Number(t.total||0),dropped:Number(t.dropped||0)})}),f("div",{children:e("spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed",{queued:Number(t.spool_count||0),enqueued:Number(t.spool_enqueued||0),flushed:Number(t.spool_flushed||0),failed:Number(t.spool_failed||0)})}),f("div",{children:e("spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms",{drops:Number(t.spool_drop_overflow||0),unavailable:Number(t.spool_unavailable||0),age:Number(t.oldest_pending_age_ms||0)})}),f("div",{children:t.daemon_last_error?e("daemon: {{status}} | last error: {{error}}",{status:r(t.daemon_online),error:t.daemon_last_error}):e("daemon: {{status}}",{status:r(t.daemon_online)})}),f("div",{children:e("monitor: {{role}} | leader: {{leader}} | lease: {{lease}}",{role:r(t.monitor_role),leader:t.monitor_leader_tab_id||"-",lease:Number(t.monitor_last_heartbeat_ms||0)})}),f("div",{children:e("monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}",{route:Number(t.monitor_ticks_route||0),viewport:Number(t.monitor_ticks_viewport||0),suppressedRoute:Number(t.monitor_suppressed_route||0),suppressedViewport:Number(t.monitor_suppressed_viewport||0)})})]})}function yO(){const{t:e}=er(),[t,n]=$e(false),[r,o]=$e(()=>Ur());ot(()=>{const i=()=>o(Ur());return window.addEventListener(Ip.eventName,i),()=>window.removeEventListener(Ip.eventName,i)},[]);const a=async()=>{if(!t){n(true);try{await bh();}finally{n(false);}}};return f("div",{class:"mb-1 grid min-w-0 grid-cols-2 items-center gap-2",children:[f("label",{class:"label min-w-0 cursor-pointer gap-2 py-0",children:[f("span",{class:"text-[11px]",children:e("Diagnostic capture")}),f("input",{type:"checkbox",class:"toggle toggle-xs",checked:r,onChange:i=>{const s=i.target.checked;my(s),o(s);}})]}),f("button",{class:"btn btn-xs h-auto min-h-6 max-w-full whitespace-normal break-words text-center leading-tight",onClick:()=>{gy();},children:e("Clear Buffers")}),f("button",{class:"btn btn-xs col-span-2 h-auto min-h-6 max-w-full whitespace-normal break-words text-center leading-tight",disabled:t,onClick:a,children:e(t?"Preparing diagnostics...":"Export Diagnostics Bundle")})]})}const ic={bm25:"",lexical:"",cover_density:"",recency:"",term_match:"",phrase_match:"",cover_bigram:"",cover_trigram:""};function Pi(e){try{return localStorage.getItem(e)}catch{return null}}function Mi(e,t){try{localStorage.setItem(e,t);}catch{}}function bO(){try{const e=Pi(Av);if(!e)return [];const t=JSON.parse(e);if(!Array.isArray(t))return [];const n=[];for(const r of t){if(!r||typeof r!="object")continue;const o=r,a=String(o.id||"").trim(),i=String(o.name||"").trim(),s=String(o.query||"").trim();!a||!i||n.push({id:a,name:i,query:s});}return n.slice(0,30)}catch{return []}}function wO(e){try{const t=JSON.stringify(e.slice(0,30));Mi(Av,t);}catch{}}function vO(){try{const e=Pi(Dv);if(!e)return {...ic};const t=JSON.parse(e);if(!t||typeof t!="object")return {...ic};const n=t;return {bm25:String(n.bm25||"").trim(),lexical:String(n.lexical||"").trim(),cover_density:String(n.cover_density||"").trim(),recency:String(n.recency||"").trim(),term_match:String(n.term_match||"").trim(),phrase_match:String(n.phrase_match||"").trim(),cover_bigram:String(n.cover_bigram||"").trim(),cover_trigram:String(n.cover_trigram||"").trim()}}catch{return {...ic}}}function kO(e){try{Mi(Dv,JSON.stringify({bm25:String(e.bm25||"").trim(),lexical:String(e.lexical||"").trim(),cover_density:String(e.cover_density||"").trim(),recency:String(e.recency||"").trim(),term_match:String(e.term_match||"").trim(),phrase_match:String(e.phrase_match||"").trim(),cover_bigram:String(e.cover_bigram||"").trim(),cover_trigram:String(e.cover_trigram||"").trim()}));}catch{}}function xO(e){const t=String(e||"").trim();if(!t)return "";const n=Number(t);return Number.isFinite(n)?String(n):""}function g_(e){const t={};for(const n of Object.keys(ic)){const r=xO(e[n]);r&&(t[n]=Number(r));}return t}function $c(e){const t=String(e||"").trim();return t?t.replace(/\/+$/g,""):""}function Dd(){const e=et.get("rawCaptureDaemonUrl",""),t=$c(String(e||""));if(t)return t;const n=$c(Pi(Ev)||"");return n||"http://127.0.0.1:8754"}function bs(e,t){const n=String(e||"").trim(),r=String(t||"").trim();return r?n?`${n} ${r}`:r:n}function SO(){return `saved-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function CO(e){const t=n=>{const r=new Map;for(const o of n){const a=String(o||"").trim();a&&r.set(a,(r.get(a)||0)+1);}return [...r.entries()].sort((o,a)=>a[1]!==o[1]?a[1]-o[1]:o[0].localeCompare(a[0])).slice(0,6).map(([o,a])=>({value:o,count:a}))};return {authors:t(e.map(n=>n.author_screen_name||"")),routes:t(e.map(n=>n.route_type||"")),folders:t(e.map(n=>n.bookmark_folder_id||""))}}function Pd(e,t){const n=[],r=String(e||"").trim();return r&&n.push(r),t.fromUser.trim()&&n.push(`from:${t.fromUser.trim().replace(/^@+/,"")}`),t.toUser.trim()&&n.push(`to:${t.toUser.trim().replace(/^@+/,"")}`),t.folderIdOrName.trim()&&n.push(`bookmark_folder:${t.folderIdOrName.trim()}`),t.sourceContains.trim()&&n.push(`source:${t.sourceContains.trim()}`),t.cardName.trim()&&n.push(`card_name:${t.cardName.trim()}`),t.bookmarkedOnly&&n.push("is:bookmarked"),t.likedOnly&&n.push("is:liked"),t.mediaOnly&&n.push("filter:media"),t.repliesOnly&&n.push("filter:replies"),t.excludeRetweets&&n.push("-filter:retweets"),t.verifiedOnly&&n.push("filter:verified"),t.blueVerifiedOnly&&n.push("filter:blue_verified"),n.join(" ").trim()}const TO=["filter:replies","-filter:replies","filter:media","-filter:retweets","id:","from_id:","in_reply_to_id:","domain:x.com","is:bookmarked","is:liked","filter:verified","filter:blue_verified","source:iphone","card_name:summary_large_image","min_faves:100","lang:en","since:2026-01-01","until:2026-12-31","OR"],__=["AND","OR","NOT","from:","from_id:","author_id:","to:","to_id:","in_reply_to_id:","id:","lang:","route:","bookmark_folder:","conversation_id:","source:","card_name:","url:","domain:","filter:replies","filter:retweets","-filter:retweets","filter:media","filter:links","filter:verified","filter:blue_verified","is:bookmarked","is:liked","is:verified","is:blue_verified","has:links","has:hashtags","has:mentions","has:cashtags","min_faves:","min_likes:","min_retweets:","min_replies:","min_bookmarks:","since:","until:"],MO="search.export.v1";function IO(e){const t=String(e||"");if(!t.trim())return "";const n=t.split(/\s+/g);return String(n[n.length-1]||"").trim()}function RO(e,t){const n=String(t||"").trim();if(!n)return String(e||"");const r=String(e||"");return r.trim()?/\s$/.test(r)?`${r}${n}`:r.replace(/\S+$/,n).trim():n}function EO(e){const t=IO(e).toLowerCase();return t?__.filter(n=>n.toLowerCase().startsWith(t)||n.toLowerCase().includes(t)).slice(0,10):__.slice(0,10)}function AO(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function DO(e,t){const n=String(e),r=[...new Set(t.map(i=>String(i||"").trim().toLowerCase()))].filter(i=>i.length>=2).sort((i,s)=>s.length-i.length).slice(0,24);if(!n||!r.length)return f(sr,{children:n});const o=new RegExp(`(${r.map(i=>AO(i)).join("|")})`,"ig"),a=n.split(o);return f(sr,{children:a.map((i,s)=>{const l=i.toLowerCase();return r.includes(l)?f("mark",{class:"bg-warning/30 px-[1px] rounded-[2px]",children:i},`hl-${s}`):f(sr,{children:i},`txt-${s}`)})})}function PO(e){const t=[];return e.author_screen_name&&t.push(`from:${e.author_screen_name}`),e.route_type&&t.push(`route:${e.route_type}`),e.bookmark_folder_id&&t.push(`bookmark_folder:${e.bookmark_folder_id}`),e.has_media&&t.push("filter:media"),e.has_links&&t.push("has:links"),e.bookmarked&&t.push("is:bookmarked"),e.favorited&&t.push("is:liked"),e.author_verified&&t.push("is:verified"),e.author_blue_verified&&t.push("is:blue_verified"),[...new Set(t)].slice(0,8)}function OO(e){const t=Date.now();return {schema_version:MO,generated_at_ms:t,generated_at_iso:new Date(t).toISOString(),producer:{name:"twitter-web-exporter.local-search",version:"1"},source:{daemon_base_url:e.daemonBaseUrl,page_url:typeof location<"u"?location.href:""},request:{query:e.effectiveQuery,sort:e.sort,limit:e.limit,offset:e.offset,ranking:e.ranking},response:e.payload}}function LO(){var ue,We,he,Me,je,At;const[e,t]=$e(()=>Dd()),[n,r]=$e(()=>Pi(h_)||""),[o,a]=$e(()=>{const K=Pi(p_);return K==="newest"||K==="oldest"||K==="relevance"?K:"relevance"}),[i,s]=$e(()=>{const K=Number(Pi(m_)||"50");return Number.isFinite(K)&&K>0&&K<=500?Math.floor(K):50}),[l,c]=$e(0),[h,u]=$e(()=>bO()),[m,g]=$e(""),[y,b]=$e(""),[k,S]=$e(""),[M,T]=$e(""),[P,N]=$e(""),[I,O]=$e(""),[U,E]=$e(""),[v,L]=$e(false),[$,xe]=$e(false),[G,le]=$e(false),[Q,ce]=$e(false),[me,pe]=$e(false),[we,z]=$e(false),[ae,Le]=$e(false),[fe,Pe]=$e(""),[it,X]=$e(""),[ne,H]=$e(""),[se,_e]=$e(""),[ve,Ye]=$e(""),[Xe,Ie]=$e(""),[xt,Lt]=$e(""),[Wt,Kt]=$e(""),[Tt,Mt]=$e(false),[Pt,zt]=$e(""),[De,yt]=$e(null),[lt,_t]=$e("");ot(()=>{const K=vO();Pe(K.bm25),X(K.lexical),H(K.cover_density),_e(K.recency),Ye(K.term_match),Ie(K.phrase_match),Lt(K.cover_bigram),Kt(K.cover_trigram);},[]),ot(()=>{Mi(h_,n);},[n]),ot(()=>{Mi(p_,o);},[o]),ot(()=>{Mi(m_,String(i));},[i]),ot(()=>{wO(h);},[h]),ot(()=>{kO({bm25:fe,lexical:it,cover_density:ne,recency:se,term_match:ve,phrase_match:Xe,cover_bigram:xt,cover_trigram:Wt});},[fe,it,ne,se,ve,Xe,xt,Wt]);const Fe=async(K=l)=>{if(Tt)return;const Ve=$c(e||Dd());if(!Ve){zt("Missing recorder daemon URL.");return}Mt(true),zt("");try{const Dt=Pd(n,{fromUser:k,toUser:M,folderIdOrName:P,sourceContains:I,cardName:U,bookmarkedOnly:v,likedOnly:$,mediaOnly:G,repliesOnly:Q,excludeRetweets:me,verifiedOnly:we,blueVerifiedOnly:ae}),Ee=new URLSearchParams;Dt.trim()&&Ee.set("q",Dt.trim()),Ee.set("sort",o),Ee.set("limit",String(i)),Ee.set("offset",String(Math.max(0,K)));const Ne=g_({bm25:fe,lexical:it,cover_density:ne,recency:se,term_match:ve,phrase_match:Xe,cover_bigram:xt,cover_trigram:Wt});for(const[ct,jt]of Object.entries(Ne))Ee.set(`rank_${ct}`,String(jt));const nt=await fetch(`${Ve}/query/search?${Ee.toString()}`),qe=await nt.json();if(!nt.ok||!(qe!=null&&qe.ok)||!qe.query)throw new Error((qe==null?void 0:qe.error)||`HTTP ${nt.status}`);yt(qe.query),c(Math.max(0,K)),_t(Dt);}catch(Dt){zt(Dt instanceof Error?Dt.message:String(Dt)),yt(null);}finally{Mt(false);}},Ce=K=>{const Ve=String(K||"").trim();if(!Ve)return;const Dt=`https://x.com/i/web/status/${Ve}`;window.open(Dt,"_blank","noopener,noreferrer");},A=()=>{const K=Math.max(0,l-i);Fe(K);},x=()=>{const K=l+i;Fe(K);},R=!!De&&l+i<De.total_matches,B=CO((De==null?void 0:De.rows)||[]),V=()=>{const K=Pd(n,{fromUser:k,toUser:M,folderIdOrName:P,sourceContains:I,cardName:U,bookmarkedOnly:v,likedOnly:$,mediaOnly:G,repliesOnly:Q,excludeRetweets:me,verifiedOnly:we,blueVerifiedOnly:ae}).trim();if(!K)return;const Ve=m.trim()||`Saved ${new Date().toLocaleString()}`;u(Dt=>[{id:SO(),name:Ve,query:K},...Dt.filter(Ne=>Ne.query!==K)].slice(0,30)),g("");},ke=K=>{const Ve=h.find(Dt=>Dt.id===K);Ve&&(r(Ve.query),b(K));},oe=()=>{const K=y.trim();K&&(u(Ve=>Ve.filter(Dt=>Dt.id!==K)),b(""));},Be=()=>{if(!De)return;const K=OO({daemonBaseUrl:$c(e||Dd()),effectiveQuery:lt||Pd(n,{fromUser:k,toUser:M,folderIdOrName:P,sourceContains:I,cardName:U,bookmarkedOnly:v,likedOnly:$,mediaOnly:G,repliesOnly:Q,excludeRetweets:me,verifiedOnly:we,blueVerifiedOnly:ae}),payload:De,sort:o,limit:i,offset:l,ranking:g_({bm25:fe,lexical:it,cover_density:ne,recency:se,term_match:ve,phrase_match:Xe,cover_bigram:xt,cover_trigram:Wt})});hw(K,`twe-search-export-${Date.now()}.json`);},Ue=EO(n),tt=((ue=De==null?void 0:De.parsed)==null?void 0:ue.positive_terms)||[];return f("div",{class:"text-[11px] leading-tight bg-base-200 rounded-box-half px-2 py-1.5 mb-1",children:[f("div",{class:"font-semibold mb-1",children:"Local Recorder Search"}),f("div",{class:"mb-1",children:[f("label",{class:"text-[10px] opacity-70",children:"Daemon URL"}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono mt-0.5",value:e,onInput:K=>{const Ve=K.target.value;t(Ve),Mi(Ev,Ve),et.set("rawCaptureDaemonUrl",Ve);}})]}),f("div",{class:"mb-1",children:[f("label",{class:"text-[10px] opacity-70",children:"Query (Twitter-style operators)"}),f("textarea",{class:"textarea textarea-bordered w-full min-h-16 mt-0.5 font-mono text-[11px]",value:n,onInput:K=>r(K.target.value),onKeyDown:K=>{K.key==="Enter"&&(K.metaKey||K.ctrlKey)&&(K.preventDefault(),Fe(0));}})]}),f("div",{class:"flex flex-wrap gap-1 mb-1",children:Ue.map(K=>f("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono opacity-80",onClick:()=>r(Ve=>RO(Ve,K)),children:K},`suggest-${K}`))}),f("details",{class:"mb-1",children:[f("summary",{class:"cursor-pointer text-[10px] opacity-70",children:"operator quick reference"}),f("div",{class:"text-[10px] font-mono mt-0.5 opacity-80 leading-tight",children:"boolean: `AND` `OR` `NOT` `(...)` | filters: global `AND` semantics"}),f("div",{class:"text-[10px] font-mono opacity-80 leading-tight",children:"core: `from:` `from_id:` `to:` `to_id:` `id:` `domain:` `filter:*` `is:*` `has:*` `lang:` `since:` `until:`"}),f("div",{class:"text-[10px] font-mono opacity-80 leading-tight",children:"ranking params: `rank_bm25` `rank_lexical` `rank_cover_density` `rank_recency`"}),f("div",{class:"text-[10px] font-mono opacity-80 leading-tight",children:"phrase/density: `rank_term_match` `rank_phrase_match` `rank_cover_bigram` `rank_cover_trigram`"})]}),f("div",{class:"flex flex-wrap gap-1 mb-1",children:TO.map(K=>f("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Ve=>bs(Ve,K)),children:K},K))}),f("div",{class:"flex flex-wrap items-center gap-1 mb-1",children:[f("select",{class:"select select-bordered select-xs flex-1 min-w-44",value:y,onChange:K=>ke(K.target.value),children:[f("option",{value:"",children:"saved searches"}),h.map(K=>f("option",{value:K.id,children:K.name},K.id))]}),f("input",{type:"text",class:"input input-bordered input-xs w-32",placeholder:"save name",value:m,onInput:K=>g(K.target.value)}),f("button",{class:"btn btn-ghost btn-xs",onClick:V,children:"Save"}),f("button",{class:"btn btn-ghost btn-xs",disabled:!y,onClick:oe,children:"Delete"})]}),f("div",{class:"grid grid-cols-2 gap-1 mb-1",children:[f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"from user (alice)",value:k,onInput:K=>S(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"to user (bob)",value:M,onInput:K=>T(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono col-span-2",placeholder:"bookmark folder id/name",value:P,onInput:K=>N(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"source contains (iphone)",value:I,onInput:K=>O(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"card name (summary_large_image)",value:U,onInput:K=>E(K.target.value)})]}),f("div",{class:"flex flex-wrap items-center gap-2 mb-1",children:[f("label",{class:"label cursor-pointer p-0 gap-1",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:v,onChange:K=>L(K.target.checked)}),f("span",{class:"label-text text-[10px]",children:"bookmarked"})]}),f("label",{class:"label cursor-pointer p-0 gap-1",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:$,onChange:K=>xe(K.target.checked)}),f("span",{class:"label-text text-[10px]",children:"liked"})]}),f("label",{class:"label cursor-pointer p-0 gap-1",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:G,onChange:K=>le(K.target.checked)}),f("span",{class:"label-text text-[10px]",children:"media"})]}),f("label",{class:"label cursor-pointer p-0 gap-1",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:Q,onChange:K=>ce(K.target.checked)}),f("span",{class:"label-text text-[10px]",children:"replies"})]}),f("label",{class:"label cursor-pointer p-0 gap-1",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:me,onChange:K=>pe(K.target.checked)}),f("span",{class:"label-text text-[10px]",children:"exclude retweets"})]}),f("label",{class:"label cursor-pointer p-0 gap-1",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:we,onChange:K=>z(K.target.checked)}),f("span",{class:"label-text text-[10px]",children:"verified"})]}),f("label",{class:"label cursor-pointer p-0 gap-1",children:[f("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:ae,onChange:K=>Le(K.target.checked)}),f("span",{class:"label-text text-[10px]",children:"blue verified"})]})]}),f("div",{class:"flex flex-wrap items-center gap-1 mb-1",children:[f("select",{class:"select select-bordered select-xs w-24",value:o,onChange:K=>a(K.target.value),children:[f("option",{value:"relevance",children:"relevance"}),f("option",{value:"newest",children:"newest"}),f("option",{value:"oldest",children:"oldest"})]}),f("select",{class:"select select-bordered select-xs w-20",value:String(i),onChange:K=>s(Number(K.target.value)),children:[f("option",{value:"25",children:"25"}),f("option",{value:"50",children:"50"}),f("option",{value:"100",children:"100"}),f("option",{value:"200",children:"200"})]}),f("button",{class:"btn btn-primary btn-xs",disabled:Tt,onClick:()=>void Fe(0),children:Tt?"Searching...":"Search"}),f("button",{class:"btn btn-ghost btn-xs",disabled:!De,onClick:Be,children:"Export Blob"}),f("button",{class:"btn btn-ghost btn-xs",disabled:Tt,onClick:A,children:"Prev"}),f("button",{class:"btn btn-ghost btn-xs",disabled:Tt||!R,onClick:x,children:"Next"})]}),f("details",{class:"mb-1",children:[f("summary",{class:"cursor-pointer text-[10px] opacity-70",children:"ranking overrides (blank = daemon defaults)"}),f("div",{class:"grid grid-cols-2 gap-1 mt-1",children:[f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"bm25",value:fe,onInput:K=>Pe(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"lexical",value:it,onInput:K=>X(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"cover_density",value:ne,onInput:K=>H(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"recency",value:se,onInput:K=>_e(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"term_match",value:ve,onInput:K=>Ye(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"phrase_match",value:Xe,onInput:K=>Ie(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"cover_bigram",value:xt,onInput:K=>Lt(K.target.value)}),f("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"cover_trigram",value:Wt,onInput:K=>Kt(K.target.value)})]})]}),f("div",{class:"text-[10px] opacity-70 mb-1",children:De?`rows ${De.count} / total ${De.total_matches} (offset ${De.offset}, sort ${De.sort})`:"No results yet."}),lt?f("div",{class:"text-[10px] font-mono opacity-70 mb-1",children:["effective: ",lt]}):null,(We=De==null?void 0:De.parsed)!=null&&We.lexical_expression?f("div",{class:"text-[10px] font-mono opacity-70 mb-1",children:["parse: ",De.parsed.lexical_expression,De.parsed.filter_boolean_semantics?` | filters=${De.parsed.filter_boolean_semantics}`:""]}):null,De!=null&&De.ranking?f("div",{class:"text-[10px] font-mono opacity-70 mb-1 leading-tight",children:["weights bm25=",Number(De.ranking.bm25||0).toFixed(2)," lexical=",Number(De.ranking.lexical||0).toFixed(2)," density=",Number(De.ranking.cover_density||0).toFixed(2)," recency=",Number(De.ranking.recency||0).toFixed(2),f("br",{}),"term=",Number(De.ranking.term_match||0).toFixed(2)," phrase=",Number(De.ranking.phrase_match||0).toFixed(2)," bigram=",Number(De.ranking.cover_bigram||0).toFixed(2)," trigram=",Number(De.ranking.cover_trigram||0).toFixed(2)]}):null,Pt?f("div",{class:"text-error mb-1",children:["search error: ",Pt]}):null,(he=De==null?void 0:De.warning_objects)!=null&&he.length?f("div",{class:"text-warning mb-1 space-y-0.5",children:De.warning_objects.map((K,Ve)=>f("div",{children:["[",K.code||"search_warning","] ",K.message||"search warning",K.token?` (${K.token})`:""]},`warn-${Ve}`))}):(Me=De==null?void 0:De.warnings)!=null&&Me.length?f("div",{class:"text-warning mb-1",children:["warnings: ",De.warnings.join(" | ")]}):null,(je=De==null?void 0:De.rows)!=null&&je.length?f("div",{class:"mb-1",children:[f("div",{class:"text-[10px] opacity-70 mb-0.5",children:"facets"}),f("div",{class:"flex flex-wrap gap-1 mb-0.5",children:B.authors.map(K=>f("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Ve=>bs(Ve,`from:${K.value}`)),children:["@",K.value," (",K.count,")"]},`author-${K.value}`))}),f("div",{class:"flex flex-wrap gap-1 mb-0.5",children:B.routes.map(K=>f("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Ve=>bs(Ve,`route:${K.value}`)),children:["route:",K.value," (",K.count,")"]},`route-${K.value}`))}),f("div",{class:"flex flex-wrap gap-1",children:B.folders.map(K=>f("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Ve=>bs(Ve,`bookmark_folder:${K.value}`)),children:["folder:",K.value," (",K.count,")"]},`folder-${K.value}`))})]}):null,f("div",{class:"max-h-56 overflow-y-auto space-y-1",children:(At=De==null?void 0:De.rows)!=null&&At.length?De.rows.map(K=>f("div",{class:"bg-base-100 rounded px-1.5 py-1",children:[f("div",{class:"flex items-center justify-between gap-1",children:[f("div",{class:"font-mono text-[10px]",children:["@",K.author_screen_name||"unknown"," · ",K.entity_id," · ",K.route_type]}),f("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1",onClick:()=>Ce(K.entity_id),children:"Open"})]}),f("div",{class:"text-[11px] whitespace-pre-line break-words",children:DO(K.text||"[no text available in snapshot]",tt)}),f("div",{class:"font-mono text-[10px] opacity-70 mt-0.5",children:["score=",Number(K.score||0).toFixed(3)," | fav=",Number(K.favorite_count||0)," ","rt=",Number(K.retweet_count||0)," rep=",Number(K.reply_count||0)," q=",Number(K.quote_count||0),K.bookmark_folder_id?` | folder=${K.bookmark_folder_id}`:"",K.source_text?` | src=${K.source_text}`:"",K.card_name?` | card=${K.card_name}`:"",K.author_verified?" | verified":"",K.author_blue_verified?" | blue":"",K.has_media?" | media":"",K.has_links?" | links":"",K.is_reply?" | reply":"",K.is_retweet?" | retweet":"",K.is_quote?" | quote":"",K.bookmarked?" | bookmarked":"",K.favorited?" | liked":""]}),f("div",{class:"flex flex-wrap gap-1 mt-0.5",children:PO(K).map(Ve=>f("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Dt=>bs(Dt,Ve)),children:Ve},`${K.entity_id}-${Ve}`))})]},K.entity_id)):f("div",{class:"text-[10px] opacity-70",children:"Run a query to load rows."})})]})}function NO(){return f(sr,{children:[f("div",{class:"divider mt-0 mb-1"}),f(yO,{}),f(_O,{}),f(gO,{lines:bc})]})}function FO(){const{t:e}=er(),[t,n]=Tr();return f(rl,{title:e("Local Search"),description:e("Search indexed tweets with Twitter-style operators"),active:true,onClick:n,indicatorColor:"bg-neutral",panelClass:"opacity-90",children:f(vr,{class:"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm min-h-[560px]",title:e("Local Recorder Search"),show:t,onClose:n,children:f(LO,{})})})}class $O extends Cn{constructor(){super(...arguments);be(this,"name","LocalSearchModule");be(this,"type",mt.CUSTOM);}render(){return FO}}const BO=tr({moduleName:"Retweeters",match:e=>/\/graphql\/.+\/Retweeters/.test(e.url),parse:(e,t)=>Xa(t,n=>n.data.retweeters_timeline.timeline.instructions,n=>go(n.content.itemContent)),project:(e,t)=>ul(e,t)});class UO extends Cn{constructor(){super(...arguments);be(this,"name","RetweetersModule");be(this,"type",mt.USER);}intercept(){return BO}render(){return Wn}}class jO extends Cn{constructor(){super(...arguments);be(this,"name","RuntimeLogsModule");}render(){return NO}}const HO={home:"public",bookmarks:"sensitive",tweet_detail:"public",notifications:"sensitive",search_top:"public",search_latest:"public",search_people:"public",search_media:"public",list:"public",list_members:"public",list_subscribers:"public",community:"public",community_members:"public",followers:"sensitive",following:"sensitive",user_profile_tweets:"public",user_profile_replies:"public",user_profile_media:"public",user_profile_likes:"sensitive",messages:"dm",unknown:"public"},qO={route_policies:HO},y_=qO;function VO(e){return String(e||"").trim()||"unknown"}function Pv(e){var r,o;const t=VO(e),n=((r=y_.route_policies)==null?void 0:r[t])||((o=y_.route_policies)==null?void 0:o.unknown);return n==="dm"||n==="sensitive"||n==="public"?n:"public"}function zO(e,t){return Pv(e)==="dm"?!!t.dmCaptureAllowed:true}const Eh="twe.raw.v1",b_="__twe_raw_events_v1",KO="twe:raw-event-v1",Ov="__twe_raw_capture_stats_v1",Bf="__twe_route_epoch_v1",iu="__twe_raw_capture_session_id_v1",Qa="__twe_raw_capture_tab_id_v1",GO=1,WO=48,YO=160,JO=4096,XO=32768,ZO="twitter-web-exporter-raw-spool-v1",jr="events",Lv=5e3,QO=50,eL=2500,tL=8,Od="__twe_raw_spool_flush_timer_v1",nL="twe:raw-spool-state-v1",w_="__twe_raw_spool_clear_v1",Uf="__twe_raw_route_monitor_timer_v1",jf="__twe_raw_viewport_monitor_timer_v1",Hf="__twe_raw_monitor_coord_timer_v1",Bc="__twe_raw_monitor_coordination_v1",Nv="__twe_raw_monitor_metrics_v1",Uc="__twe_raw_monitor_storage_listener_v1",jc="__twe_raw_monitor_beforeunload_v1",v_="__twe_raw_monitor_tick_v1",rL="twe:raw-monitor-role-v1",oL=2500,aL=4e3,Fv=6e4,iL=40,k_=48,$v=5e3,sL=2e4,lL="twe_raw_capture_daemon_url_v1",cL="twe_raw_capture_stream_enabled_v1",uL="twe_raw_capture_enabled_v1",dL="twe_raw_capture_encryption_ready_v1",Bv="twe_raw_capture_dm_session_armed_until_ms_v1",x_=900*1e3,su="twe_raw_monitor_leader_v1",fL=new Set(["s","t","cn","ref_src","ref_url","utm_source","utm_medium","utm_campaign","utm_term","utm_content"]),hL=/(token|auth|authorization|cookie|csrf|sig|signature|bearer|session|oauth)/i;let S_=0,C_="",bi=null,Ld=false,T_=0,ra=0,M_="",I_="",Yl="";const Qs=new Map;function Tn(){return globalThis}function sc(e){const t=Tn(),n=t[e];if(typeof n=="number"||typeof n=="object"){try{clearInterval(n);}catch{}delete t[e];}}function pL(){const t=Tn()[Nv],n=t&&typeof t=="object"?t:{},r={};for(const[o,a]of Object.entries(n))r[o]=ft(a,0);return r}function za(e,t=1){if(!e)return;const n=Tn(),r=pL();r[e]=ft(r[e],0)+Math.max(1,ft(t,1)),n[Nv]=r;}function ft(e,t=0){const n=Number(e);return Number.isFinite(n)?n:t}function qf(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return `fnv1a32:${(t>>>0).toString(16)}`}function lu(e){return S_+=1,`${e}-${Date.now().toString(36)}-${S_.toString(36)}-${Math.random().toString(36).slice(2,8)}`}function eo(e,t){const n=Tn(),r=n[e];if(typeof r=="string"&&r.length>0)return r;const o=lu(t);return n[e]=o,o}function R_(e,t){try{const n=new URL(e,location.href),r=new URL(n.toString()),o=[...r.searchParams.keys()];for(const i of o){if(hL.test(i)){r.searchParams.delete(i);continue}t&&fL.has(i.toLowerCase())&&r.searchParams.delete(i);}const a=[...r.searchParams.entries()].sort(([i,s],[l,c])=>i===l?s.localeCompare(c):i.localeCompare(l));r.search="";for(const[i,s]of a)r.searchParams.append(i,s);return r.toString()}catch{return e}}function Uv(e){try{const t=new URLSearchParams(e||""),n=(t.get("f")||t.get("src")||"").toLowerCase();if(n.includes("live")||n.includes("latest"))return "latest";if(n.includes("user")||n.includes("people"))return "people";if(n.includes("image")||n.includes("media"))return "media";if(n.includes("top"))return "top"}catch{}return "top"}function cu(e,t=""){if(/^\/home\/?$/.test(e))return "home";if(/^\/i\/bookmarks(\/|$)/.test(e))return "bookmarks";if(/\/status\/\d+/.test(e))return "tweet_detail";if(/^\/notifications(\/|$)/.test(e))return "notifications";if(/^\/search\/?$/.test(e)){const n=Uv(t);return n==="latest"?"search_latest":n==="people"?"search_people":n==="media"?"search_media":"search_top"}return /^\/i\/lists\/\d+\/(members)(\/|$)/.test(e)?"list_members":/^\/i\/lists\/\d+\/(followers|subscribers)(\/|$)/.test(e)?"list_subscribers":/^\/i\/lists\//.test(e)?"list":/^\/i\/communities\/\d+\/(members)(\/|$)/.test(e)?"community_members":/^\/i\/communities\//.test(e)?"community":/^\/[A-Za-z0-9_]+\/(followers)(\/|$)/.test(e)?"followers":/^\/[A-Za-z0-9_]+\/(following)(\/|$)/.test(e)?"following":/^\/[A-Za-z0-9_]+\/(with_replies)(\/|$)/.test(e)?"user_profile_replies":/^\/[A-Za-z0-9_]+\/(media)(\/|$)/.test(e)?"user_profile_media":/^\/[A-Za-z0-9_]+\/(likes)(\/|$)/.test(e)?"user_profile_likes":/^\/messages(\/|$)/.test(e)?"messages":/^\/[A-Za-z0-9_]+\/?$/.test(e)?"user_profile_tweets":"unknown"}function Ah(e,t=""){const n={},r=new Set(["home","search","notifications","messages","explore","i"]),o=e.match(/\/status\/(\d+)/);o!=null&&o[1]&&(n.tweetId=o[1]);const a=e.match(/\/i\/bookmarks\/(\d+)/);a!=null&&a[1]&&(n.folderId=a[1]);const i=e.match(/\/i\/lists\/(\d+)/);i!=null&&i[1]&&(n.listId=i[1]);const s=e.match(/\/i\/communities\/(\d+)/);s!=null&&s[1]&&(n.communityId=s[1]);const l=e.match(/^\/([A-Za-z0-9_]+)\/(with_replies|media|likes|followers|following)(\/|$)/);l!=null&&l[1]&&(n.screenName=l[1]),l!=null&&l[2]&&(n.profileTab=l[2]);const c=e.match(/^\/([A-Za-z0-9_]+)\/?$/);return c!=null&&c[1]&&!r.has(String(c[1]).toLowerCase())&&(n.screenName=c[1]),/^\/search\/?$/.test(e)&&(n.searchMode=Uv(t)),Object.keys(n).length?n:void 0}function mL(e){const t=e.trim();return t&&(t.startsWith("{")||t.startsWith("["))?"application/json":"text/plain"}function Dh(){const e=Yi(su);if(!e)return null;try{const t=JSON.parse(e);if(!t||typeof t!="object")return null;const n=typeof t.tab_id=="string"?t.tab_id:"";if(!n)return null;const r=ft(t.heartbeat_ms,0),o=ft(t.acquired_ms,0);return {tab_id:n,session_id:typeof t.session_id=="string"?t.session_id:void 0,heartbeat_ms:r,acquired_ms:o}}catch{return null}}function E_(e){try{if(typeof localStorage>"u")return null;localStorage.setItem(su,JSON.stringify(e));}catch{return null}return Dh()}function jv(e){if(e)try{if(typeof localStorage>"u")return;const t=Dh();if(!t||t.tab_id!==e)return;localStorage.removeItem(su);}catch{}}function Hv(e){const t=Vn();Hr({...t,...e});}function Nd(e,t,n){const r=Tn(),o={role:e,tab_id:eo(Qa,"tab"),leader_tab_id:t||void 0,lease_heartbeat_ms:n||0,updated_at_ms:Date.now()};r[Bc]=o,Hv({monitor_role:e,monitor_leader_tab_id:t||void 0,monitor_last_heartbeat_ms:n||0});const a=`${o.role}|${o.tab_id}|${o.leader_tab_id||""}|${o.lease_heartbeat_ms||0}`;if(a!==I_&&(I_=a,typeof window<"u"&&typeof window.dispatchEvent=="function"))try{window.dispatchEvent(new CustomEvent(rL,{detail:o}));}catch{}}function lc(e=false){const t=eo(Qa,"tab"),n=eo(iu,"session"),r=Date.now();let o=Dh();if(!o){const c=E_({tab_id:t,session_id:n,heartbeat_ms:r,acquired_ms:r});if(!c){Nd("single",t,r);return}o=c;}const a=ft(o.heartbeat_ms,0)<=0||r-ft(o.heartbeat_ms,0)>sL,i=o.tab_id===t;if((a||i)&&(e||!i||r-ft(o.heartbeat_ms,0)>=Math.floor($v/2))){const c={tab_id:t,session_id:n,acquired_ms:i?ft(o.acquired_ms,r):r,heartbeat_ms:r},h=E_(c);if((h==null?void 0:h.tab_id)===t){Nd("leader",t,ft(h.heartbeat_ms,r));return}o=h||o;}const s=typeof o.tab_id=="string"?o.tab_id:"";Nd("follower",s,ft(o.heartbeat_ms,0));}function qv(){const e=Tn(),t=e.__twe_raw_monitor_force_leader_v1;if(typeof t=="boolean")return t;const n=e[Bc],r=n&&typeof n=="object"?n:void 0;if(!r||typeof r.role!="string"){lc(true);const o=e[Bc],a=o&&typeof o=="object"?o:void 0;return (a==null?void 0:a.role)==="leader"||(a==null?void 0:a.role)==="single"}return r.role==="leader"||r.role==="single"}function Ph(){const e=Tn(),t=Vn(),n=e.__twe_runtime_modes_v1,r=e.__twe_runtime_v1,o=n&&typeof n=="object"?n:void 0,a=r&&typeof r=="object"?r:void 0,i=ft(a==null?void 0:a.revision,0)||ft(a==null?void 0:a.rev,0)||void 0,s=a==null?void 0:a.capabilities,l=s&&typeof s=="object"?s:void 0;return {recorder_rev:GO,hook_rev:i,modes:{safeMode:!!(o!=null&&o.safeMode),hookMode:typeof(o==null?void 0:o.hookMode)=="string"?o.hookMode:void 0,repairMode:typeof(o==null?void 0:o.repairMode)=="string"?o.repairMode:void 0},capabilities:{hasExportFunction:!!(l!=null&&l.hasExportFunction),hasWrappedJSObject:!!(l!=null&&l.hasWrappedJSObject)},spool:{queued:ft(t.spool_count,0),enqueued_total:ft(t.spool_enqueued,0),flushed_total:ft(t.spool_flushed,0),failed_total:ft(t.spool_failed,0),oldest_pending_age_ms:ft(t.oldest_pending_age_ms,0)},coordination:{role:t.monitor_role==="leader"||t.monitor_role==="follower"||t.monitor_role==="single"?t.monitor_role:void 0,leader_tab_id:typeof t.monitor_leader_tab_id=="string"?t.monitor_leader_tab_id:void 0,lease_heartbeat_ms:ft(t.monitor_last_heartbeat_ms,0)||void 0}}}function Vv(){const e=Tn(),t=ft(e[Bf],0)+1;return e[Bf]=t,t}function Oh(e,t,n){const r=C_||void 0,o=qf(`${r||""}|${e}|${t}|${n}`);return C_=o,{prevHash:r,eventHash:o}}function Lh(){const e=Tn().__META_DATA__,t=e&&typeof e=="object"?e:void 0,n=typeof(t==null?void 0:t.userId)=="string"?t.userId:void 0;return n?{user_rest_id:n}:void 0}function gL(e,t){const n=Date.now(),r=typeof performance<"u"?Number(performance.now()):0,o=typeof location<"u"?location.href:"",a=typeof location<"u"?location.pathname:"",i=typeof location<"u"?location.search:"",s=typeof e.body=="string"&&e.body?qf(e.body):void 0,l=typeof t.responseText=="string"?t.responseText:"",c=qf(l),h=_L(),u=l.length>h,m=u?l.slice(0,h):l,g=e.requestId&&e.requestId.length>0?e.requestId:lu("evt"),{prevHash:y,eventHash:b}=Oh(g,n,`${e.method}|${e.url}|${t.status}|${c}`);return {schema:Eh,event_id:g,prev_event_hash:y,event_hash:b,wall_time_ms:n,mono_time_ms:r,tz_offset_min:new Date().getTimezoneOffset(),page_url:o,route_type:cu(a,i),route_params:Ah(a,i),route_epoch:Vv(),kind:"net",session_id:eo(iu,"session"),tab_id:eo(Qa,"tab"),account_hint:Lh(),net:{transport:e.method.toUpperCase()==="GET"?"xhr":"fetch",phase:"response",method:e.method.toUpperCase(),url_raw_redacted:R_(e.url,false),url_norm:R_(e.url,true),status:t.status,req_body_hash:s,resp_content_type:mL(l),resp_body_ref:`sha:${c}`,resp_body_hash:c,resp_body_size:l.length,resp_truncated:u,resp_body_sample:m},recorder:Ph()}}function _L(){return Ur()||ei()?XO:JO}function yL(){return Ur()||ei()?YO:WO}function A_(e){const t=Date.now(),n=typeof performance<"u"?Number(performance.now()):0,r=typeof location<"u"?location.href:"",o=typeof location<"u"?location.pathname:"",a=typeof location<"u"?location.search:"",i=typeof location<"u"?location.hash:"",s=lu("route"),{prevHash:l,eventHash:c}=Oh(s,t,`route|${e}|${r}|${o}|${a}|${i}`);return {schema:Eh,event_id:s,prev_event_hash:l,event_hash:c,wall_time_ms:t,mono_time_ms:n,tz_offset_min:new Date().getTimezoneOffset(),page_url:r,route_type:cu(o,a),route_params:Ah(o,a),route_epoch:Vv(),kind:"route",session_id:eo(iu,"session"),tab_id:eo(Qa,"tab"),account_hint:Lh(),route:{source:e,pathname:o,search:a,hash:i},recorder:Ph()}}function bL(e,t="dom-scan"){const n=Date.now(),r=typeof performance<"u"?Number(performance.now()):0,o=typeof location<"u"?location.href:"",a=typeof location<"u"?location.pathname:"",i=typeof location<"u"?location.search:"",s=lu("vp"),{prevHash:l,eventHash:c}=Oh(s,n,`viewport|${t}|${e}|${o}|${a}`);return {schema:Eh,event_id:s,prev_event_hash:l,event_hash:c,wall_time_ms:n,mono_time_ms:r,tz_offset_min:new Date().getTimezoneOffset(),page_url:o,route_type:cu(a,i),route_params:Ah(a,i),route_epoch:ft(Tn()[Bf],0),kind:"viewport",session_id:eo(iu,"session"),tab_id:eo(Qa,"tab"),account_hint:Lh(),viewport:{tweet_id:e,source:t},recorder:Ph()}}function Vn(){const t=Tn()[Ov];if(!t||typeof t!="object")return {total:0,emitted:0,dropped:0,last_at:0,spool_count:0,spool_enqueued:0,spool_flushed:0,spool_failed:0,spool_drop_overflow:0,spool_unavailable:0,oldest_pending_age_ms:0,daemon_online:false,monitor_role:"single",monitor_leader_tab_id:void 0,monitor_last_heartbeat_ms:0,monitor_ticks_route:0,monitor_ticks_viewport:0,monitor_suppressed_route:0,monitor_suppressed_viewport:0};const n=t;return {total:ft(n.total,0),emitted:ft(n.emitted,0),dropped:ft(n.dropped,0),last_at:ft(n.last_at,0),last_event_id:typeof n.last_event_id=="string"?n.last_event_id:void 0,last_event_hash:typeof n.last_event_hash=="string"?n.last_event_hash:void 0,spool_count:ft(n.spool_count,0),spool_enqueued:ft(n.spool_enqueued,0),spool_flushed:ft(n.spool_flushed,0),spool_failed:ft(n.spool_failed,0),spool_drop_overflow:ft(n.spool_drop_overflow,0),spool_unavailable:ft(n.spool_unavailable,0),oldest_pending_age_ms:ft(n.oldest_pending_age_ms,0),daemon_online:!!n.daemon_online,daemon_last_flush_at:ft(n.daemon_last_flush_at,0)||void 0,daemon_last_error:typeof n.daemon_last_error=="string"?n.daemon_last_error:void 0,monitor_role:n.monitor_role==="leader"||n.monitor_role==="follower"||n.monitor_role==="single"?n.monitor_role:void 0,monitor_leader_tab_id:typeof n.monitor_leader_tab_id=="string"?n.monitor_leader_tab_id:void 0,monitor_last_heartbeat_ms:ft(n.monitor_last_heartbeat_ms,0),monitor_ticks_route:ft(n.monitor_ticks_route,0),monitor_ticks_viewport:ft(n.monitor_ticks_viewport,0),monitor_suppressed_route:ft(n.monitor_suppressed_route,0),monitor_suppressed_viewport:ft(n.monitor_suppressed_viewport,0)}}function Hr(e){const t=Tn();t[Ov]=e;const n=[ft(e.spool_count,0),ft(e.spool_enqueued,0),ft(e.spool_flushed,0),ft(e.spool_failed,0),ft(e.spool_drop_overflow,0),ft(e.spool_unavailable,0),ft(e.oldest_pending_age_ms,0),e.daemon_online?1:0].join("|");if(n!==M_&&(M_=n,typeof window<"u"&&typeof window.dispatchEvent=="function"))try{window.dispatchEvent(new CustomEvent(nL,{detail:{stats:e}}));}catch{}}function Cr(e){const t=Vn();Hr({...t,...e});}function zv(e){const t=Tn(),n=t[b_],r=Array.isArray(n)?n:[];r.push(e);let o=0;const a=yL();r.length>a&&(o=r.length-a),o>0&&r.splice(0,o),t[b_]=r;const i=Vn();if(Hr({...i,total:i.total+1,emitted:i.emitted+1,dropped:i.dropped+o,last_at:Date.now(),last_event_id:e.event_id,last_event_hash:e.event_hash}),typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(KO,{detail:e}));}catch{}}function Vf(e){zv(e),ei()&&(Yv(e),$h());}function Nh(){return !Fh()||typeof document<"u"&&document.visibilityState==="hidden"?false:ei()||Ur()||Kv()}function Fd(){if(!Nh()||typeof document<"u"&&document.visibilityState==="hidden")return;if(!qv()){za("route_suppressed_checks",1);const n=Vn();Hr({...n,monitor_suppressed_route:ft(n.monitor_suppressed_route,0)+1});return}const e=Vn();Hr({...e,monitor_ticks_route:ft(e.monitor_ticks_route,0)+1}),za("route_leader_checks",1);const t=typeof location<"u"?location.href:"";if(t){if(!Yl){Yl=t,Vf(A_("bootstrap")),za("route_emits",1);return}t!==Yl&&(Yl=t,Vf(A_("poll")),za("route_emits",1));}}function wL(e){const t=e.match(/\/status\/(\d+)/);return t!=null&&t[1]?t[1]:null}function vL(e){if(!(e instanceof Element))return false;const t=e.getBoundingClientRect();return !(t.width<=0||t.height<=0||t.bottom<k_||t.top>window.innerHeight-k_)}function kL(e=iL){if(typeof document>"u")return [];const t=[],n=new Set,r=document.querySelectorAll('article a[href*="/status/"]');for(const o of r){if(t.length>=e)break;if(!(o instanceof HTMLAnchorElement)||!vL(o))continue;const a=wL(o.getAttribute("href")||"");!a||n.has(a)||(n.add(a),t.push(a));}return t}function xL(e){for(const[t,n]of Qs.entries())e-n>Fv&&Qs.delete(t);}function D_(){if(!Nh()||typeof document<"u"&&document.visibilityState==="hidden")return;if(!qv()){za("viewport_suppressed_checks",1);const r=Vn();Hr({...r,monitor_suppressed_viewport:ft(r.monitor_suppressed_viewport,0)+1});return}const e=Vn();Hr({...e,monitor_ticks_viewport:ft(e.monitor_ticks_viewport,0)+1}),za("viewport_leader_checks",1);const t=Date.now();xL(t);const n=kL();for(const r of n){const o=ft(Qs.get(r),0);o>0&&t-o<Fv||(Qs.set(r,t),Vf(bL(r)),za("viewport_emits",1));}}function Fh(){const t=Tn().__twe_raw_capture_enabled_v1;if(typeof t=="boolean")return t;const n=et.get("rawCaptureEnabled",true);if(typeof n=="boolean")return n;const r=Yi(uL);return r?r!=="0"&&r!=="false":true}function Kv(){return Tn().__twe_raw_capture_dev_utils_v1===true?true:!!et.get("debug",false)}function SL(e){const t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="::1"?true:t.endsWith(".localhost")}function CL(e){if(!e)return false;try{const t=new URL(e,location.href),n=new URL(Wv(),location.href);return t.origin===n.origin&&/^\/(?:ingest|health|stats|query)(\/|$)/.test(t.pathname)?!0:SL(t.hostname)&&/^\/(?:ingest|health|stats|query)(\/|$)/.test(t.pathname)}catch{return false}}function P_(){return et.get("directMessagesCaptureEnabled",false)===true&&TL()&&ML()}function TL(){if(Tn().__twe_raw_capture_encryption_ready_v1===true||et.get("rawCaptureEncryptedStorageReady",false)===true)return true;const n=Yi(dL);if(!n)return false;const r=n.trim().toLowerCase();return r==="1"||r==="true"||r==="yes"||r==="on"}function ML(){const e=Tn(),t=ft(e.__twe_raw_capture_dm_session_armed_until_ms_v1,0),n=Date.now();if(t>n)return true;const r=Yi(Bv);return ft(r,0)>n}function O_(e){const t=Tn();t.__twe_raw_capture_dm_session_armed_until_ms_v1=e;try{localStorage.setItem(Bv,String(e));}catch{}}function IL(e){return e==="sensitive"?et.get("rawCapturePolicySensitiveEnabled",true)!==false:e==="dm"?et.get("rawCapturePolicyDmEnabled",true)!==false:et.get("rawCapturePolicyPublicEnabled",true)!==false}function RL(){let e="unknown";if(P_())return {blocked:false,routeType:e,policyClass:"dm"};try{e=cu(location.pathname||"/",location.search||"");const t=Pv(e);return IL(t)?{blocked:!zO(e,{dmCaptureAllowed:P_()}),routeType:e,policyClass:t}:{blocked:!0,routeType:e,policyClass:t}}catch{return {blocked:false,routeType:"unknown",policyClass:"public"}}}function EL(e,t){if(!e.url||!Fh()||CL(e.url))return false;const n=RL();if(n.blocked){const i=Vn();return Cr({dm_policy_blocks:ft(i.dm_policy_blocks,0)+1,dm_policy_last_route_type:n.routeType,dm_policy_last_policy_class:n.policyClass}),false}return !(!/\/graphql\/|\/api\/1\.1\//.test(e.url)||!String(t.responseText||""))}function va(){return Date.now()<ra?Promise.reject(new Error("raw spool unavailable")):typeof indexedDB>"u"?(ra=Date.now()+6e4,Cr({spool_unavailable:ft(Vn().spool_unavailable,0)+1,daemon_last_error:"raw-spool-indexeddb-unavailable"}),Promise.reject(new Error("indexeddb unavailable"))):bi||(bi=new Promise((e,t)=>{let n;try{n=indexedDB.open(ZO,1);}catch(r){bi=null,ra=Date.now()+6e4,Cr({spool_unavailable:ft(Vn().spool_unavailable,0)+1,daemon_last_error:`raw-spool-open-failed:${Ja(r)}`}),t(r);return}n.onupgradeneeded=()=>{const r=n.result;if(!r.objectStoreNames.contains(jr)){const o=r.createObjectStore(jr,{keyPath:"event_id"});o.createIndex("created_at","created_at",{unique:false}),o.createIndex("next_retry_at","next_retry_at",{unique:false}),o.createIndex("wall_time_ms","wall_time_ms",{unique:false});}},n.onsuccess=()=>{ra=0,e(n.result);},n.onerror=()=>{bi=null,ra=Date.now()+6e4,Cr({spool_unavailable:ft(Vn().spool_unavailable,0)+1,daemon_last_error:`raw-spool-open-error:${Ja(n.error??new Error("failed to open raw spool db"))}`}),t(n.error??new Error("failed to open raw spool db"));};}),bi)}function uu(e,t,n,r){return new Promise((o,a)=>{const i=e.transaction([jr],t),s=i.objectStore(jr);i.oncomplete=()=>{try{o(r());}catch(l){a(l);}},i.onerror=()=>a(i.error??new Error("raw spool transaction failed")),i.onabort=()=>a(i.error??new Error("raw spool transaction aborted")),n(s);})}async function AL(e){const t=await va();await uu(t,"readwrite",n=>{n.put(e);},()=>{});}async function du(){const e=await va();return await new Promise(t=>{const o=e.transaction([jr],"readonly").objectStore(jr).count();o.onsuccess=()=>t(ft(o.result,0)),o.onerror=()=>t(0);})}async function DL(){const e=await va();return await new Promise(t=>{const a=e.transaction([jr],"readonly").objectStore(jr).index("created_at").openCursor();a.onsuccess=()=>{const i=a.result;if(!i){t(0);return}const s=i.value;t(ft(s.created_at,0));},a.onerror=()=>t(0);})}async function Gv(e){const t=await va(),n=await du();if(n<=e)return 0;const r=n-e;return await new Promise((o,a)=>{const i=t.transaction([jr],"readwrite"),s=i.objectStore(jr),l=s.index("created_at"),c=[],h=l.openCursor();h.onsuccess=()=>{const u=h.result;if(!u||c.length>=r){for(const m of c)s.delete(m);return}c.push(u.primaryKey),u.continue();},h.onerror=()=>a(h.error??new Error("cursor read failed")),i.oncomplete=()=>o(c.length),i.onerror=()=>a(i.error??new Error("prune tx failed")),i.onabort=()=>a(i.error??new Error("prune tx aborted"));})}async function PL(e,t){const n=await va();return await new Promise((r,o)=>{const a=n.transaction([jr],"readonly"),s=a.objectStore(jr).index("created_at"),l=[],c=s.openCursor();c.onsuccess=()=>{const h=c.result;if(!h||l.length>=t){r(l);return}const u=h.value;ft(u.next_retry_at,0)<=e&&l.push(u),h.continue();},c.onerror=()=>o(c.error??new Error("list batch failed")),a.onerror=()=>o(a.error??new Error("list batch tx failed"));})}async function OL(e){if(!e.length)return;const t=await va();await uu(t,"readwrite",n=>{for(const r of e)n.delete(r);},()=>{});}async function L_(e){if(!e.length)return;const t=await va();await uu(t,"readwrite",n=>{for(const r of e)n.put(r);},()=>{});}async function LL(){const e=await va();return await uu(e,"readwrite",t=>{t.clear();},()=>{}),await du()}async function Ii(e=0){try{const t=await du(),n=await DL(),r=n?Math.max(0,Date.now()-n):0,o=Vn();Hr({...o,spool_count:t,oldest_pending_age_ms:r,dropped:o.dropped+Math.max(0,e),spool_drop_overflow:ft(o.spool_drop_overflow,0)+Math.max(0,e)});}catch{}}async function NL(){if(Date.now()<ra){Cr({spool_count:0,oldest_pending_age_ms:0});return}try{const e=await Gv(Lv);await Ii(e);}catch{}}function N_(e){const t=Math.max(0,Math.min(6,e));return Math.min(6e4,1e3*2**t)}function Yi(e){try{return typeof localStorage>"u"?null:localStorage.getItem(e)}catch{return null}}function ei(){const t=Tn().__twe_raw_capture_stream_enabled_v1;if(typeof t=="boolean")return t;const n=et.get("rawCaptureStreamEnabled",false);if(typeof n=="boolean")return n;const r=Yi(cL);return r?r==="1"||r==="true":false}function Wv(){const t=Tn().__twe_raw_capture_daemon_url_v1,n=et.get("rawCaptureDaemonUrl","http://127.0.0.1:8754");return (typeof t=="string"&&t.trim().length>0?t.trim():typeof n=="string"&&n.trim().length>0?n.trim():Yi(lL)||"http://127.0.0.1:8754").replace(/\/+$/,"")}async function Yv(e){if(Date.now()<ra){Cr({spool_unavailable:ft(Vn().spool_unavailable,0)+1});return}try{const t=Date.now(),n={event_id:e.event_id,wall_time_ms:e.wall_time_ms,created_at:t,attempts:0,next_retry_at:t,payload:e};await AL(n);const r=await Gv(Lv),o=Vn();Hr({...o,spool_enqueued:ft(o.spool_enqueued,0)+1,dropped:o.dropped+Math.max(0,r),spool_drop_overflow:ft(o.spool_drop_overflow,0)+Math.max(0,r)}),await Ii();}catch(t){Cr({spool_unavailable:ft(Vn().spool_unavailable,0)+1,daemon_last_error:`spool-enqueue-error:${Ja(t)}`});}}function FL(){const e=Tn();sc(Hf),sc(Uf),sc(jf),Qs.clear();const t=e[Uc];if(typeof t=="function"&&typeof window<"u")try{window.removeEventListener("storage",t);}catch{}delete e[Uc];const n=e[jc];if(typeof n=="function"&&typeof window<"u")try{window.removeEventListener("beforeunload",n);}catch{}delete e[jc];try{const r=eo(Qa,"tab");jv(r);}catch{}delete e[Bc],Hv({monitor_role:void 0,monitor_leader_tab_id:void 0,monitor_last_heartbeat_ms:0});}function $L(){if(ei()){const e=Tn(),t=e[Od];if(!(typeof t=="number"||typeof t=="object")){const n=setInterval(()=>{T_+=1,T_%tL===0&&NL(),$h();},eL);e[Od]=n;}return}sc(Od);}function BL(){const e=Tn();if(Kv()&&typeof e[w_]!="function"&&(e[w_]=async()=>{try{const t=await LL(),n=Vn();return Hr({...n,spool_count:t,oldest_pending_age_ms:0}),{ok:!0,remaining:t}}catch(t){const n=Ja(t);return Cr({daemon_last_error:`spool-clear-error:${n}`}),{ok:false,error:n}}}),typeof e[v_]!="function"&&(e[v_]=(t="both")=>{try{return (t==="both"||t==="route")&&Fd(),(t==="both"||t==="viewport")&&D_(),{ok:!0}}catch(n){return {ok:false,error:Ja(n)}}}),typeof e.__twe_arm_dm_capture_v1!="function"&&(e.__twe_arm_dm_capture_v1=(t=x_)=>{const r=Date.now()+Math.max(3e4,ft(t,x_));return O_(r),{ok:true,armed_until_ms:r}}),typeof e.__twe_disarm_dm_capture_v1!="function"&&(e.__twe_disarm_dm_capture_v1=()=>(O_(0),{ok:true,armed_until_ms:0})),Nh()){if(lc(true),typeof e[Uc]!="function"){const o=a=>{if(a.key===su)try{lc(!0);}catch{}};if(e[Uc]=o,typeof window<"u"&&typeof window.addEventListener=="function")try{window.addEventListener("storage",o);}catch{}}if(typeof e[jc]!="function"){const o=()=>{try{const a=eo(Qa,"tab");jv(a);}catch{}};if(e[jc]=o,typeof window<"u"&&typeof window.addEventListener=="function")try{window.addEventListener("beforeunload",o);}catch{}}const t=e[Hf];if(!(typeof t=="number"||typeof t=="object")){const o=setInterval(()=>{if(!(typeof document<"u"&&document.visibilityState==="hidden"))try{lc(!0);}catch{}},$v);e[Hf]=o;}const n=e[Uf];if(!(typeof n=="number"||typeof n=="object")){const o=setInterval(()=>{try{Fd();}catch{}},oL);e[Uf]=o;try{Fd();}catch{}}const r=e[jf];if(!(typeof r=="number"||typeof r=="object")){const o=setInterval(()=>{try{D_();}catch{}},aL);e[jf]=o;}}else FL();$L();}function Ja(e){return e instanceof Error?`${e.name}: ${e.message}`:String(e)}async function UL(e){const t=Wv(),n=await fetch(`${t}/ingest/events`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({events:e.map(a=>a.payload)})});if(!n.ok)throw new Error(`daemon-response-${n.status}`);let r=null;try{r=await n.json();}catch{return e.map(a=>a.event_id)}const o=r&&typeof r=="object"&&Array.isArray(r.accepted_ids)?r.accepted_ids.map(a=>typeof a=="string"?a:"").filter(a=>!!a):null;return !o||!o.length?e.map(a=>a.event_id):o}async function $h(){if(!Ld){Ld=true;try{if(Date.now()<ra){Cr({spool_count:0,oldest_pending_age_ms:0,daemon_online:!1});return}const e=await du();if(await Ii(),!ei()){Cr({daemon_online:!1});return}if(e<=0){Cr({daemon_online:!0,daemon_last_flush_at:Date.now(),oldest_pending_age_ms:0});return}const t=Date.now(),n=await PL(t,QO);if(!n.length){Cr({daemon_online:!0}),await Ii();return}try{const r=await UL(n),o=new Set(r),a=n.filter(s=>!o.has(s.event_id));if(r.length&&await OL(r),a.length){const s=Date.now(),l=a.map(c=>{const h=ft(c.attempts,0)+1;return {...c,attempts:h,next_retry_at:s+N_(h)}});await L_(l);}const i=Vn();Hr({...i,spool_flushed:ft(i.spool_flushed,0)+r.length,daemon_online:!0,daemon_last_flush_at:Date.now(),daemon_last_error:void 0}),await Ii();}catch(r){const o=Date.now(),a=n.map(s=>{const l=ft(s.attempts,0)+1;return {...s,attempts:l,next_retry_at:o+N_(l)}});await L_(a);const i=Vn();Hr({...i,spool_failed:ft(i.spool_failed,0)+n.length,daemon_online:!1,daemon_last_error:Ja(r)}),await Ii();}}catch(e){Cr({daemon_last_error:`flush-error:${Ja(e)}`});}finally{Ld=false;}}}const jL=(e,t)=>{try{if(!Fh())return;const n={method:typeof e.method=="string"&&e.method?e.method:"GET",url:typeof e.url=="string"?e.url:"",body:typeof e.body=="string"?e.body:void 0,requestId:typeof e.requestId=="string"?e.requestId:void 0},r={status:Number(t.status??0),responseText:String(t.responseText||"")};if(!EL(n,r))return;BL();const o=gL(n,r);zv(o),ei()&&(Yv(o),$h());}catch{}};class HL extends Cn{constructor(){super(...arguments);be(this,"name","RawCaptureModule");be(this,"type",mt.CUSTOM);}intercept(){return jL}}function qL(e){try{const n=new URL(e.url).searchParams.get("variables");if(!n)return null;const r=JSON.parse(n);return r&&typeof r=="object"?r:null}catch{return null}}function Jv(e){const t=qL(e),n=String((t==null?void 0:t.rawQuery)||"").trim().toLowerCase(),r=String((t==null?void 0:t.querySource)||"").trim().toLowerCase();return n.startsWith("quoted_tweet_id:")||r==="tdqt"}function Xv(e){const n=JSON.parse(e.responseText).data.search_by_raw_query.search_timeline.timeline.instructions,r=[],o=[],a=[],i=n.find(c=>c.type==="TimelineAddEntries"),s=n.find(c=>c.type==="TimelineAddToModule"),l=(i==null?void 0:i.entries)??[];for(const c of l){if(th(c)){const h=Gn(c.content.itemContent);h&&r.push(h);}if(u1(c)){const h=c.content.items.map(u=>Gn(u.item.itemContent)).filter(u=>!!u);r.push(...h);}if(nh(c)){const h=go(c.content.itemContent);h&&o.push(h);}if(d1(c)){const h=c.content.items.map(u=>u.item.itemContent.list);a.push(...h);}}if(s){const c=s.moduleItems.map(m=>m.item.itemContent),h=c.filter(m=>m.__typename==="TimelineTweet").map(m=>Gn(m)).filter(m=>!!m);r.push(...h);const u=c.filter(m=>m.__typename==="TimelineTwitterList").map(m=>m.list);a.push(...u);}return {tweets:r,users:o,lists:a}}const VL=tr({moduleName:"SearchTimeline",match:e=>/\/graphql\/.+\/SearchTimeline/.test(e.url)&&!Jv(e),parse:(e,t)=>Xv(t),count:e=>e.tweets.length,project:(e,t)=>yo(e,t.tweets),onSuccess:e=>{e.lists.length>0&&Ae.warn(`SearchList: ${e.lists.length} lists received but ignored (Reason: not implemented)`,e.lists),e.users.length>0&&Ae.warn(`SearchUser: ${e.users.length} users received but ignored (Reason: not implemented)`,e.users);}}),zL=tr({moduleName:"Quotes",match:e=>/\/graphql\/.+\/SearchTimeline/.test(e.url)&&Jv(e),parse:(e,t)=>({tweets:Xv(t).tweets}),count:e=>e.tweets.length,project:(e,t)=>yo(e,t.tweets),onSuccess:e=>{Ae.debug(`Quotes: projected ${e.tweets.length} quote-tweet rows`);}});class KL extends Cn{constructor(){super(...arguments);be(this,"name","QuotesModule");be(this,"type",mt.TWEET);}intercept(){return zL}render(){return Wn}}class GL extends Cn{constructor(){super(...arguments);be(this,"name","SearchTimelineModule");be(this,"type",mt.TWEET);}intercept(){return VL}render(){return Wn}}const WL="TweetIndexModule";class YL extends Cn{constructor(){super(...arguments);be(this,"name",WL);be(this,"type",mt.TWEET);}setup(){Ze.extBackfillTweetCapturesFromAllTweets(this.name);}render(){return Wn}}const JL=tr({moduleName:"TweetDetail",match:e=>/\/graphql\/.+\/TweetDetail/.test(e.url)||/\/graphql\/.+\/ModeratedTimeline/.test(e.url),parse:(e,t)=>{const n=/\/graphql\/.+\/TweetDetail/.test(e.url),r=/\/graphql\/.+\/ModeratedTimeline/.test(e.url),o=JSON.parse(t.responseText);let a=[];n?a=o.data.threaded_conversation_with_injections_v2.instructions:r&&(a=o.data.tweet.result.timeline_response.timeline.instructions);const i=[],s=a.find(h=>h.type==="TimelineAddEntries"),l=(s==null?void 0:s.entries)??[];for(const h of l){if(th(h)){const u=Gn(h.content.itemContent);u&&i.push(u);}if(n&&s1(h)){const u=h.content.items.map(m=>{if(m.entryId.includes("-tweet-"))return Gn(m.item.itemContent)});i.push(...u.filter(m=>!!m));}}const c=a.find(h=>h.type==="TimelineAddToModule");if(c){const h=c.moduleItems.map(u=>Gn(u.item.itemContent)).filter(u=>!!u);i.push(...h);}return i},project:(e,t)=>yo(e,t)});class XL extends Cn{constructor(){super(...arguments);be(this,"name","TweetDetailModule");be(this,"type",mt.TWEET);}intercept(){return JL}render(){return Wn}}const ZL=tr({moduleName:"UserDetail",match:e=>/\/graphql\/.+\/UserByScreenName/.test(e.url),parse:(e,t)=>[JSON.parse(t.responseText).data.user.result],project:(e,t)=>ul(e,t)});class QL extends Cn{constructor(){super(...arguments);be(this,"name","UserDetailModule");be(this,"type",mt.USER);}intercept(){return ZL}render(){return Wn}}const eN=tr({moduleName:"UserMedia",match:e=>/\/graphql\/.+\/UserMedia/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.user.result.timeline.timeline.instructions,o=[],a=r.find(l=>l.type==="TimelineAddEntries"),i=(a==null?void 0:a.entries)??[];for(const l of i)if(c1(l)){const c=l.content.items.map(h=>Gn(h.item.itemContent)).filter(h=>!!h);o.push(...c);}const s=r.find(l=>l.type==="TimelineAddToModule");if(s){const l=s.moduleItems.map(c=>Gn(c.item.itemContent)).filter(c=>!!c);o.push(...l);}return o},project:(e,t)=>yo(e,t)});class tN extends Cn{constructor(){super(...arguments);be(this,"name","UserMediaModule");be(this,"type",mt.TWEET);}intercept(){return eN}render(){return Wn}}const nN=tr({moduleName:"UserTweets",match:e=>/\/graphql\/.+\/UserTweets/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.user.result.timeline.timeline.instructions,o=[],a=r.find(l=>l.type==="TimelinePinEntry");if(a){const l=Gn(a.entry.content.itemContent);l&&o.push(l);}const i=r.find(l=>l.type==="TimelineAddEntries"),s=(i==null?void 0:i.entries)??[];for(const l of s){if(th(l)){const c=Gn(l.content.itemContent);c&&o.push(c);}if(l1(l)){const c=l.content.items.map(h=>Gn(h.item.itemContent)).filter(h=>!!h);o.push(...c);}}return o},project:(e,t)=>yo(e,t)});class rN extends Cn{constructor(){super(...arguments);be(this,"name","UserTweetsModule");be(this,"type",mt.TWEET);}intercept(){return nN}render(){return Wn}}const F_="twe-root",$d="__twe_root_mounted_v1",Bd=globalThis;function wi(e){const t=String(e??"");return t.includes("Twitter Web Exporter")||t.includes("Twitter%20Web%20Exporter")||t.includes("Scrollmark")||t.includes("twitter-web-exporter")||t.includes("moz-extension://")}function oN(){try{window.addEventListener("error",e=>{var t;try{if(!(wi(e.filename)||wi(e.message)||wi((t=e.error)==null?void 0:t.stack)))return;console.error("[twitter-web-exporter] suppressed global error",e.error||e.message),e.preventDefault(),e.stopImmediatePropagation();}catch{}},!0);}catch{}try{window.addEventListener("unhandledrejection",e=>{try{const t=e.reason;if(!(wi(t==null?void 0:t.stack)||wi(t==null?void 0:t.message)||wi(t)))return;console.error("[twitter-web-exporter] suppressed rejection",t),e.preventDefault(),e.stopImmediatePropagation();}catch{}},!0);}catch{}}function vn(e,t){try{e.add(t);}catch(n){console.error("[twitter-web-exporter] Failed to add extension",t==null?void 0:t.name,n);}}function $_(){try{const e=document.getElementById(F_);if(Bd[$d]){if(e)return;Bd[$d]=!1;}const t=e??document.createElement("div");e||(t.id=F_,document.body.append(t)),Bd[$d]=!0,qd(f(QA,{}),t);}catch(e){console.error("[twitter-web-exporter] mountApp failed",e);}}function B_(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",$_):$_();}async function aN(){var r;let e=false;try{const o=KA();e=o.action==="rollback_required",e&&console.warn("[twitter-web-exporter] interrupted migration requires explicit recovery",o);}catch(o){e=true,console.warn("[twitter-web-exporter] migration journal recovery failed closed",o);}const t=Ki();if(t&&!e){const o=new Mb(t),a=o.observe();if(!a.admitted)console.warn("[twitter-web-exporter] archive projection deferred; identity is not admitted",a);else {const i=!!Wi(t.archive_id,t.namespace_id);let s=false;if(!i)try{const l=await Ui().count();s=!!(l&&(l.tweets>0||l.users>0||l.captures>0||l.social_edges>0));}catch{s=false;}try{const l=new Zc(t),c=await zA({manager:Ui(),identity:o,pairing:t,client:l,clientSequenceStart:1});(c.bootstrapped?((r=c.result)==null?void 0:r.generation)??null:await MA({pairing:t,client:l}))&&(_h(),await ji({force:!0,acknowledgeCacheReset:!0}));}catch(l){console.warn(s?"[twitter-web-exporter] browser archive bootstrap deferred; existing cache preserved":"[twitter-web-exporter] canonical archive reconstruction deferred",l);}}}if(oN(),tM(),(await ji()).phase==="recovery_required"){B_();return}wD();try{const o=Cc();vn(o,SP),vn(o,RP),vn(o,QL),vn(o,cO),vn(o,dO),vn(o,fP),vn(o,UO),vn(o,AP),vn(o,hO),vn(o,pP),vn(o,n_),vn(o,KL),vn(o,sO),vn(o,YL),vn(o,rN),vn(o,tN),vn(o,XL),vn(o,GL),vn(o,aO),et.get("directMessagesCaptureEnabled",!1)&&vn(o,bP),vn(o,$O),vn(o,jO),et.get("rawCaptureEnabled",!0)&&vn(o,HL),hr.start();}catch(o){console.error("[twitter-web-exporter] bootstrap failed",o),setTimeout(()=>{try{const a=Cc();vn(a,n_),hr.start();}catch(a){console.error("[twitter-web-exporter] bootstrap retry failed",a);}},250);}B_();}aN();
})();