diff --git a/README.md b/README.md index 81c171b..68681a3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Please report any issue you have with those (only for mainstream browsers) Also, use this if you plan to use b4k's archive. - [Install 4chanX (recommended)](https://www.4chan-x.net/builds/4chan-X.user.js) -- Install the correct WebExtension for your Browser ([Firefox](https://git.coom.tech/coomdev/PEE/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.233.xpi) or [Chrome-based](https://chrome.google.com/webstore/detail/pngextraembedder/bfhpobiikighljcapcfmfganodihbicj)) +- Install the correct WebExtension for your Browser ([Firefox](https://git.coom.tech/coomdev/PEE/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.241.xpi) or [Chrome-based](https://chrome.google.com/webstore/detail/pngextraembedder/bfhpobiikighljcapcfmfganodihbicj)) For FF users, the extension is signed so you can just drag and drop it on your about:addons tab. diff --git a/chrome/dist/main.js b/chrome/dist/main.js index 09d6cad..1776473 100644 --- a/chrome/dist/main.js +++ b/chrome/dist/main.js @@ -53,7 +53,7 @@ var define_BUILD_VERSION_default; var init_define_BUILD_VERSION = __esm({ ""() { - define_BUILD_VERSION_default = [0, 239]; + define_BUILD_VERSION_default = [0, 241]; } }); @@ -16120,7 +16120,7 @@ const target = +pid.slice(pid.match(/\d/).index); const cachedData = cthreadDataCache[target]; if (!cachedData) - return []; + return; const ret = []; if ("pee" in cachedData.data) { const files = await decodeCoom3Payload(import_buffer2.Buffer.from(cachedData.data.pee.join(" "))); @@ -16165,7 +16165,7 @@ const { domain, file } = m.groups; const headers = await getHeaders(pee); const res = await ifetch(pee, { - headers: { range: "bytes=0-16383", "user-agent": "" }, + headers: { range: "bytes=0-32767", "user-agent": "" }, mode: "cors", referrerPolicy: "no-referrer" }); diff --git a/chrome/manifest.json b/chrome/manifest.json index a505a4e..2c7689e 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "PngExtraEmbedder", "description": "Discover embedded files on 4chan and archives!", - "version": "0.239", + "version": "0.241", "icons": { "64": "1449696017588.png" }, diff --git a/dist/main.js b/dist/main.js index 8a84caf..45aabc8 100644 --- a/dist/main.js +++ b/dist/main.js @@ -53,7 +53,7 @@ var define_BUILD_VERSION_default; var init_define_BUILD_VERSION = __esm({ ""() { - define_BUILD_VERSION_default = [0, 233]; + define_BUILD_VERSION_default = [0, 241]; } }); @@ -4033,18 +4033,18 @@ }); } var lastPromise = this[kLastPromise]; - var promise; + var promise2; if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); + promise2 = new Promise(wrapForNext(lastPromise, this)); } else { var data = this[kStream].read(); if (data !== null) { return Promise.resolve(createIterResult(data, false)); } - promise = new Promise(this[kHandlePromise]); + promise2 = new Promise(this[kHandlePromise]); } - this[kLastPromise] = promise; - return promise; + this[kLastPromise] = promise2; + return promise2; } }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { return this; @@ -12653,6 +12653,7 @@ init_esbuild_inject(); function noop() { } + var identity = (x) => x; function assign(tar, src) { for (const k in src) tar[k] = src[k]; @@ -12745,6 +12746,33 @@ store.set(value); return ret; } + var is_client = typeof window !== "undefined"; + var now = is_client ? () => window.performance.now() : () => Date.now(); + var raf = is_client ? (cb) => requestAnimationFrame(cb) : noop; + var tasks = /* @__PURE__ */ new Set(); + function run_tasks(now2) { + tasks.forEach((task) => { + if (!task.c(now2)) { + tasks.delete(task); + task.f(); + } + }); + if (tasks.size !== 0) + raf(run_tasks); + } + function loop(callback) { + let task; + if (tasks.size === 0) + raf(run_tasks); + return { + promise: new Promise((fulfill) => { + tasks.add(task = { c: callback, f: fulfill }); + }), + abort() { + tasks.delete(task); + } + }; + } var is_hydrating = false; function start_hydrating() { is_hydrating = true; @@ -12773,6 +12801,11 @@ } return node.ownerDocument; } + function append_empty_stylesheet(node) { + const style_element = element("style"); + append_stylesheet(get_root_for_style(node), style_element); + return style_element; + } function append_stylesheet(node, style) { append(node.head || node, style); } @@ -12882,6 +12915,64 @@ this.n.forEach(detach); } }; + var active_docs = /* @__PURE__ */ new Set(); + var active = 0; + function hash(str) { + let hash2 = 5381; + let i = str.length; + while (i--) + hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i); + return hash2 >>> 0; + } + function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { + const step = 16.666 / duration; + let keyframes = "{\n"; + for (let p = 0; p <= 1; p += step) { + const t = a + (b - a) * ease(p); + keyframes += p * 100 + `%{${fn(t, 1 - t)}} +`; + } + const rule = keyframes + `100% {${fn(b, 1 - b)}} +}`; + const name = `__svelte_${hash(rule)}_${uid}`; + const doc = get_root_for_style(node); + active_docs.add(doc); + const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet); + const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {}); + if (!current_rules[name]) { + current_rules[name] = true; + stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); + } + const animation = node.style.animation || ""; + node.style.animation = `${animation ? `${animation}, ` : ""}${name} ${duration}ms linear ${delay}ms 1 both`; + active += 1; + return name; + } + function delete_rule(node, name) { + const previous = (node.style.animation || "").split(", "); + const next = previous.filter(name ? (anim) => anim.indexOf(name) < 0 : (anim) => anim.indexOf("__svelte") === -1); + const deleted = previous.length - next.length; + if (deleted) { + node.style.animation = next.join(", "); + active -= deleted; + if (!active) + clear_rules(); + } + } + function clear_rules() { + raf(() => { + if (active) + return; + active_docs.forEach((doc) => { + const stylesheet = doc.__svelte_stylesheet; + let i = stylesheet.cssRules.length; + while (i--) + stylesheet.deleteRule(i); + doc.__svelte_rules = {}; + }); + active_docs.clear(); + }); + } var current_component; function set_current_component(component) { current_component = component; @@ -12981,6 +13072,19 @@ $$.after_update.forEach(add_render_callback); } } + var promise; + function wait() { + if (!promise) { + promise = Promise.resolve(); + promise.then(() => { + promise = null; + }); + } + return promise; + } + function dispatch(node, direction, kind) { + node.dispatchEvent(custom_event(`${direction ? "intro" : "outro"}${kind}`)); + } var outroing = /* @__PURE__ */ new Set(); var outros; function group_outros() { @@ -13018,6 +13122,101 @@ block.o(local); } } + var null_transition = { duration: 0 }; + function create_bidirectional_transition(node, fn, params, intro) { + let config = fn(node, params); + let t = intro ? 0 : 1; + let running_program = null; + let pending_program = null; + let animation_name = null; + function clear_animation() { + if (animation_name) + delete_rule(node, animation_name); + } + function init4(program, duration) { + const d = program.b - t; + duration *= Math.abs(d); + return { + a: t, + b: program.b, + d, + duration, + start: program.start, + end: program.start + duration, + group: program.group + }; + } + function go(b) { + const { delay = 0, duration = 300, easing = identity, tick: tick2 = noop, css } = config || null_transition; + const program = { + start: now() + delay, + b + }; + if (!b) { + program.group = outros; + outros.r += 1; + } + if (running_program || pending_program) { + pending_program = program; + } else { + if (css) { + clear_animation(); + animation_name = create_rule(node, t, b, duration, delay, easing, css); + } + if (b) + tick2(0, 1); + running_program = init4(program, duration); + add_render_callback(() => dispatch(node, b, "start")); + loop((now2) => { + if (pending_program && now2 > pending_program.start) { + running_program = init4(pending_program, duration); + pending_program = null; + dispatch(node, running_program.b, "start"); + if (css) { + clear_animation(); + animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css); + } + } + if (running_program) { + if (now2 >= running_program.end) { + tick2(t = running_program.b, 1 - t); + dispatch(node, running_program.b, "end"); + if (!pending_program) { + if (running_program.b) { + clear_animation(); + } else { + if (!--running_program.group.r) + run_all(running_program.group.c); + } + } + running_program = null; + } else if (now2 >= running_program.start) { + const p = now2 - running_program.start; + t = running_program.a + running_program.d * easing(p / running_program.duration); + tick2(t, 1 - t); + } + } + return !!(running_program || pending_program); + }); + } + } + return { + run(b) { + if (is_function(config)) { + wait().then(() => { + config = config(); + go(b); + }); + } else { + go(b); + } + }, + end() { + clear_animation(); + running_program = pending_program = null; + } + }; + } var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : window; function destroy_block(block, lookup) { block.d(1); @@ -13391,13 +13590,13 @@ init_esbuild_inject(); var nativeMax = Math.max; var nativeMin = Math.min; - function debounce(func, wait, options) { + function debounce(func, wait2, options) { let lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; - wait = Number(wait) || 0; + wait2 = Number(wait2) || 0; if (typeof options === "object") { leading = !!options.leading; maxing = "maxWait" in options; - maxWait = maxing ? nativeMax(Number(options.maxWait) || 0, wait) : maxWait; + maxWait = maxing ? nativeMax(Number(options.maxWait) || 0, wait2) : maxWait; trailing = "trailing" in options ? !!options.trailing : trailing; } function invokeFunc(time) { @@ -13409,17 +13608,17 @@ } function leadingEdge(time) { lastInvokeTime = time; - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); return leading ? invokeFunc(time) : result; } function remainingWait(time) { - const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall; + const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait2 - timeSinceLastCall; console.log("remainingWait"); return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2; } function shouldInvoke(time) { const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; - return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + return lastCallTime === void 0 || timeSinceLastCall >= wait2 || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { const time = Date.now(); @@ -13456,12 +13655,12 @@ return leadingEdge(lastCallTime); } if (maxing) { - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); return invokeFunc(lastCallTime); } } if (timerId === void 0) { - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); } return result; } @@ -15670,8 +15869,6 @@ }); var generateThumbnail = async (f) => { const can = document.createElement("canvas"); - can.width = 125; - can.height = 125; const [sw, sh] = [125, 125]; const url = URL.createObjectURL(f); let source; @@ -15703,7 +15900,7 @@ if (!ctx) return import_buffer2.Buffer.alloc(0); ctx.drawImage(source, 0, 0, dims[0], dims[1]); - const blob = await new Promise((_) => can.toBlob(_, "image/jpg")); + const blob = await new Promise((_) => can.toBlob(_)); if (!blob) return import_buffer2.Buffer.alloc(0); return import_buffer2.Buffer.from(await blob.arrayBuffer()); @@ -15754,7 +15951,7 @@ const target = +pid.slice(pid.match(/\d/).index); const cachedData = cthreadDataCache[target]; if (!cachedData) - return []; + return; const ret = []; if ("pee" in cachedData.data) { const files = await decodeCoom3Payload(import_buffer2.Buffer.from(cachedData.data.pee.join(" "))); @@ -15799,7 +15996,7 @@ const { domain, file } = m.groups; const headers = await getHeaders(pee); const res = await ifetch(pee, { - headers: { range: "bytes=0-16383", "user-agent": "" }, + headers: { range: "bytes=0-32767", "user-agent": "" }, mode: "cors", referrerPolicy: "no-referrer" }); @@ -16650,6 +16847,37 @@ init_define_BUILD_VERSION(); init_esbuild_inject(); + // node_modules/svelte/transition/index.mjs + init_define_BUILD_VERSION(); + init_esbuild_inject(); + + // node_modules/svelte/easing/index.mjs + init_define_BUILD_VERSION(); + init_esbuild_inject(); + function cubicOut(t) { + const f = t - 1; + return f * f * f + 1; + } + + // node_modules/svelte/transition/index.mjs + function slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) { + const style = getComputedStyle(node); + const opacity = +style.opacity; + const height = parseFloat(style.height); + const padding_top = parseFloat(style.paddingTop); + const padding_bottom = parseFloat(style.paddingBottom); + const margin_top = parseFloat(style.marginTop); + const margin_bottom = parseFloat(style.marginBottom); + const border_top_width = parseFloat(style.borderTopWidth); + const border_bottom_width = parseFloat(style.borderBottomWidth); + return { + delay, + duration, + easing, + css: (t) => `overflow: hidden;opacity: ${Math.min(t * 20, 1) * opacity};height: ${t * height}px;padding-top: ${t * padding_top}px;padding-bottom: ${t * padding_bottom}px;margin-top: ${t * margin_top}px;margin-bottom: ${t * margin_bottom}px;border-top-width: ${t * border_top_width}px;border-bottom-width: ${t * border_bottom_width}px;` + }; + } + // src/Components/Dialog.svelte init_define_BUILD_VERSION(); init_esbuild_inject(); @@ -16900,9 +17128,9 @@ let { tag } = $$props; let { toggleable = false } = $$props; let { toggled = false } = $$props; - const dispatch = createEventDispatcher(); - const click_handler2 = (e) => (e.preventDefault(), dispatch("remove")); - const click_handler_1 = () => dispatch("toggle"); + const dispatch2 = createEventDispatcher(); + const click_handler2 = (e) => (e.preventDefault(), dispatch2("remove")); + const click_handler_1 = () => dispatch2("toggle"); $$self.$$set = ($$props2) => { if ("tag" in $$props2) $$invalidate(0, tag = $$props2.tag); @@ -16911,7 +17139,7 @@ if ("toggled" in $$props2) $$invalidate(2, toggled = $$props2.toggled); }; - return [tag, toggleable, toggled, dispatch, click_handler2, click_handler_1]; + return [tag, toggleable, toggled, dispatch2, click_handler2, click_handler_1]; } var Tag = class extends SvelteComponent { constructor(options) { @@ -17117,8 +17345,8 @@ let current; let mounted; let dispose; - const default_slot_template = ctx[5].default; - const default_slot = create_slot(default_slot_template, ctx, ctx[4], null); + const default_slot_template = ctx[6].default; + const default_slot = create_slot(default_slot_template, ctx, ctx[5], null); return { c() { button = element("button"); @@ -17134,14 +17362,14 @@ } current = true; if (!mounted) { - dispose = listen(button, "click", ctx[6]); + dispose = listen(button, "click", ctx[7]); mounted = true; } }, p(ctx2, [dirty]) { if (default_slot) { - if (default_slot.p && (!current || dirty & 16)) { - update_slot_base(default_slot, default_slot_template, ctx2, ctx2[4], !current ? get_all_dirty_from_scope(ctx2[4]) : get_slot_changes(default_slot_template, ctx2[4], dirty, null), null); + if (default_slot.p && (!current || dirty & 32)) { + update_slot_base(default_slot, default_slot_template, ctx2, ctx2[5], !current ? get_all_dirty_from_scope(ctx2[5]) : get_slot_changes(default_slot_template, ctx2[5], dirty, null), null); } } if (dirty & 3) { @@ -17174,13 +17402,26 @@ const tab = {}; const { registerTab, selectTab, selectedTab } = getContext(TABS); component_subscribe($$self, selectedTab, (value) => $$invalidate(0, $selectedTab = value)); + const dispatch2 = createEventDispatcher(); registerTab(tab); - const click_handler2 = () => selectTab(tab); + const click_handler2 = () => { + selectTab(tab); + dispatch2("select"); + }; $$self.$$set = ($$props2) => { if ("$$scope" in $$props2) - $$invalidate(4, $$scope = $$props2.$$scope); + $$invalidate(5, $$scope = $$props2.$$scope); }; - return [$selectedTab, tab, selectTab, selectedTab, $$scope, slots, click_handler2]; + return [ + $selectedTab, + tab, + selectTab, + selectedTab, + dispatch2, + $$scope, + slots, + click_handler2 + ]; } var Tab = class extends SvelteComponent { constructor(options) { @@ -17816,7 +18057,7 @@ let $appState; component_subscribe($$self, settings, ($$value) => $$invalidate(19, $settings = $$value)); component_subscribe($$self, appState, ($$value) => $$invalidate(38, $appState = $$value)); - const dispatch = createEventDispatcher(); + const dispatch2 = createEventDispatcher(); let { file } = $$props; let isVideo = false; let isImage = false; @@ -17874,7 +18115,7 @@ $$invalidate(4, isAudio = type.mime.startsWith("audio/")); $$invalidate(3, isImage = type.mime.startsWith("image/")); $$invalidate(5, isText = type.mime.startsWith("text/plain")); - dispatch("fileinfo", { type }); + dispatch2("fileinfo", { type }); if (isImage) { $$invalidate(7, contracted = !$settings.xpi); } @@ -17940,7 +18181,7 @@ $$invalidate(3, isImage = type.mime.startsWith("image/")); $$invalidate(5, isText = type.mime.startsWith("text/plain")); $$invalidate(17, unzipping = false); - dispatch("fileinfo", { type }); + dispatch2("fileinfo", { type }); if (hovering) { setTimeout(async () => { do { @@ -17952,7 +18193,7 @@ } let { inhibitExpand = false } = $$props; async function bepis(ev) { - dispatch("click"); + dispatch2("click"); if (inhibitExpand) return; if ($appState.isCatalog) @@ -18142,7 +18383,7 @@ hoverStop, hoverUpdate, adjustAudio, - dispatch, + dispatch2, isNotChrome, id, isContracted, @@ -18583,31 +18824,106 @@ // src/Components/App.svelte function add_css8(target) { - append_styles(target, "svelte-1epvqgf", '.bepis.svelte-1epvqgf.svelte-1epvqgf{max-height:260px;overflow-y:auto}.tagcont.svelte-1epvqgf.svelte-1epvqgf{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}label.svelte-1epvqgf>input[type="text"].svelte-1epvqgf,label.svelte-1epvqgf>input[type="number"].svelte-1epvqgf{width:95%}.enabled.svelte-1epvqgf.svelte-1epvqgf{display:block}.disabled.svelte-1epvqgf.svelte-1epvqgf{display:none}.content.svelte-1epvqgf.svelte-1epvqgf{display:flex;flex-direction:column}.error.svelte-1epvqgf.svelte-1epvqgf{color:red}hr.svelte-1epvqgf.svelte-1epvqgf{width:100%}h1.svelte-1epvqgf.svelte-1epvqgf{text-align:center}.form.svelte-1epvqgf.svelte-1epvqgf{display:flex;flex-direction:column;gap:20px;position:absolute;padding:15px;border:1px solid white;background-color:inherit;border-radius:10px}.form.svelte-1epvqgf>label.svelte-1epvqgf{display:flex;flex-direction:column;gap:10px}.backpanel.svelte-1epvqgf.svelte-1epvqgf{position:absolute;right:32px;padding:10px;width:15%;top:32px;border:1px solid;border-radius:5px;background-color:rgba(0, 0, 0, 0.2);pointer-events:all;backdrop-filter:blur(9px);max-height:80vh;min-width:321px}'); + append_styles(target, "svelte-129vfxz", '.bepis.svelte-129vfxz.svelte-129vfxz{max-height:260px;overflow-y:auto}.tagcont.svelte-129vfxz.svelte-129vfxz{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}label.svelte-129vfxz>input[type="text"].svelte-129vfxz,label.svelte-129vfxz>input[type="number"].svelte-129vfxz{width:95%}.content.svelte-129vfxz.svelte-129vfxz{display:flex;flex-direction:column}.error.svelte-129vfxz.svelte-129vfxz{color:red}hr.svelte-129vfxz.svelte-129vfxz{width:100%}h1.svelte-129vfxz.svelte-129vfxz{text-align:center}.form.svelte-129vfxz.svelte-129vfxz{display:flex;flex-direction:column;gap:20px;position:absolute;padding:15px;border:1px solid white;background-color:inherit;border-radius:10px}.form.svelte-129vfxz>label.svelte-129vfxz{display:flex;flex-direction:column;gap:10px}.backpanel.svelte-129vfxz.svelte-129vfxz{position:absolute;right:32px;padding:10px;width:15%;top:32px;border:1px solid;border-radius:5px;background-color:rgba(0, 0, 0, 0.8);pointer-events:all;backdrop-filter:blur(9px);max-height:80vh;min-width:321px}'); } function get_each_context2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[52] = list[i]; + child_ctx[53] = list[i]; return child_ctx; } function get_each_context_12(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[55] = list[i]; - child_ctx[57] = i; + child_ctx[56] = list[i]; + child_ctx[58] = i; return child_ctx; } function get_each_context_2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[58] = list[i]; - child_ctx[57] = i; + child_ctx[59] = list[i]; + child_ctx[58] = i; return child_ctx; } function get_each_context_3(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[60] = list[i]; - child_ctx[57] = i; + child_ctx[61] = list[i]; + child_ctx[58] = i; return child_ctx; } + function create_if_block6(ctx) { + let div1; + let div0; + let h1; + let t1; + let hr; + let t2; + let tabs; + let div1_transition; + let current; + tabs = new Tabs_default({ + props: { + $$slots: { default: [create_default_slot] }, + $$scope: { ctx } + } + }); + return { + c() { + div1 = element("div"); + div0 = element("div"); + h1 = element("h1"); + h1.textContent = "PEE Settings"; + t1 = space(); + hr = element("hr"); + t2 = space(); + create_component(tabs.$$.fragment); + attr(h1, "class", "svelte-129vfxz"); + attr(hr, "class", "svelte-129vfxz"); + attr(div0, "class", "content svelte-129vfxz"); + attr(div1, "class", "backpanel svelte-129vfxz"); + }, + m(target, anchor) { + insert(target, div1, anchor); + append(div1, div0); + append(div0, h1); + append(div0, t1); + append(div0, hr); + append(div0, t2); + mount_component(tabs, div0, null); + current = true; + }, + p(ctx2, dirty) { + const tabs_changes = {}; + if (dirty[0] & 251 | dirty[2] & 2) { + tabs_changes.$$scope = { dirty, ctx: ctx2 }; + } + tabs.$set(tabs_changes); + }, + i(local) { + if (current) + return; + transition_in(tabs.$$.fragment, local); + add_render_callback(() => { + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, slide, {}, true); + div1_transition.run(1); + }); + current = true; + }, + o(local) { + transition_out(tabs.$$.fragment, local); + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, slide, {}, false); + div1_transition.run(0); + current = false; + }, + d(detaching) { + if (detaching) + detach(div1); + destroy_component(tabs); + if (detaching && div1_transition) + div1_transition.end(); + } + }; + } function create_default_slot_12(ctx) { let t; return { @@ -18668,7 +18984,7 @@ } }; } - function create_if_block_8(ctx) { + function create_if_block_9(ctx) { let tab; let current; tab = new Tab_default({ @@ -18750,7 +19066,8 @@ $$scope: { ctx } } }); - let if_block = ctx[6].akValid && create_if_block_8(ctx); + tab3.$on("select", ctx[15]); + let if_block = ctx[6].akValid && create_if_block_9(ctx); return { c() { create_component(tab0.$$.fragment); @@ -18781,22 +19098,22 @@ }, p(ctx2, dirty) { const tab0_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab0_changes.$$scope = { dirty, ctx: ctx2 }; } tab0.$set(tab0_changes); const tab1_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab1_changes.$$scope = { dirty, ctx: ctx2 }; } tab1.$set(tab1_changes); const tab2_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab2_changes.$$scope = { dirty, ctx: ctx2 }; } tab2.$set(tab2_changes); const tab3_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab3_changes.$$scope = { dirty, ctx: ctx2 }; } tab3.$set(tab3_changes); @@ -18806,7 +19123,7 @@ transition_in(if_block, 1); } } else { - if_block = create_if_block_8(ctx2); + if_block = create_if_block_9(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -18857,7 +19174,7 @@ } }; } - function create_if_block_72(ctx) { + function create_if_block_8(ctx) { let label; let input; let t; @@ -18867,7 +19184,7 @@ c() { label = element("label"); input = element("input"); - t = text("\n Hide original content when hidden content is visible."); + t = text("\n Hide original content when hidden content is visible."); attr(input, "type", "checkbox"); }, m(target, anchor) { @@ -18876,7 +19193,7 @@ input.checked = ctx[5].ho; append(label, t); if (!mounted) { - dispose = listen(input, "change", ctx[23]); + dispose = listen(input, "change", ctx[24]); mounted = true; } }, @@ -18893,7 +19210,7 @@ } }; } - function create_if_block_42(ctx) { + function create_if_block_52(ctx) { let t0; let label; let t1; @@ -18904,15 +19221,15 @@ let if_block1_anchor; let mounted; let dispose; - let if_block0 = ctx[6].herror && create_if_block_62(ctx); - let if_block1 = ctx[6].akValid && create_if_block_52(ctx); + let if_block0 = ctx[6].herror && create_if_block_72(ctx); + let if_block1 = ctx[6].akValid && create_if_block_62(ctx); return { c() { if (if_block0) if_block0.c(); t0 = space(); label = element("label"); - t1 = text("Hydrus Access Key\n \n "); + t1 = text("Hydrus Access Key\n \n "); a = element("a"); a.textContent = "?"; t3 = space(); @@ -18923,8 +19240,8 @@ if_block1_anchor = empty(); attr(a, "title", "Only requires Search Files permission. See Hydrus docs on where to set this up."); attr(input, "type", "text"); - attr(input, "class", "svelte-1epvqgf"); - attr(label, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { if (if_block0) @@ -18941,7 +19258,7 @@ if_block1.m(target, anchor); insert(target, if_block1_anchor, anchor); if (!mounted) { - dispose = listen(input, "input", ctx[31]); + dispose = listen(input, "input", ctx[32]); mounted = true; } }, @@ -18950,7 +19267,7 @@ if (if_block0) { if_block0.p(ctx2, dirty); } else { - if_block0 = create_if_block_62(ctx2); + if_block0 = create_if_block_72(ctx2); if_block0.c(); if_block0.m(t0.parentNode, t0); } @@ -18965,7 +19282,7 @@ if (if_block1) { if_block1.p(ctx2, dirty); } else { - if_block1 = create_if_block_52(ctx2); + if_block1 = create_if_block_62(ctx2); if_block1.c(); if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); } @@ -18992,7 +19309,7 @@ } }; } - function create_if_block_62(ctx) { + function create_if_block_72(ctx) { let span; let t_value = ctx[6].herror + ""; let t; @@ -19000,7 +19317,7 @@ c() { span = element("span"); t = text(t_value); - attr(span, "class", "error svelte-1epvqgf"); + attr(span, "class", "error svelte-129vfxz"); }, m(target, anchor) { insert(target, span, anchor); @@ -19016,7 +19333,7 @@ } }; } - function create_if_block_52(ctx) { + function create_if_block_62(ctx) { let label0; let t0; let input0; @@ -19031,18 +19348,18 @@ label0 = element("label"); t0 = text("Auto-embed "); input0 = element("input"); - t1 = text("\n random files"); + t1 = text("\n random files"); t2 = space(); label1 = element("label"); input1 = element("input"); set_style(input0, "width", "5ch"); attr(input0, "type", "number"); - attr(input0, "class", "svelte-1epvqgf"); - attr(label0, "class", "svelte-1epvqgf"); + attr(input0, "class", "svelte-129vfxz"); + attr(label0, "class", "svelte-129vfxz"); attr(input1, "placeholder", "Restrict to these tags (space to separate tags, _ to separate words)"); attr(input1, "type", "text"); - attr(input1, "class", "svelte-1epvqgf"); - attr(label1, "class", "svelte-1epvqgf"); + attr(input1, "class", "svelte-129vfxz"); + attr(label1, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, label0, anchor); @@ -19056,8 +19373,8 @@ set_input_value(input1, ctx[5].auto_tags); if (!mounted) { dispose = [ - listen(input0, "input", ctx[32]), - listen(input1, "input", ctx[33]) + listen(input0, "input", ctx[33]), + listen(input1, "input", ctx[34]) ]; mounted = true; } @@ -19148,74 +19465,74 @@ let if_block1_anchor; let mounted; let dispose; - let if_block0 = ctx[5].eye && create_if_block_72(ctx); - let if_block1 = ctx[5].hyd && create_if_block_42(ctx); + let if_block0 = ctx[5].eye && create_if_block_8(ctx); + let if_block1 = ctx[5].hyd && create_if_block_52(ctx); return { c() { label0 = element("label"); input0 = element("input"); - t0 = text("\n Try to load embeds from server cache"); + t0 = text("\n Try to load embeds from server cache"); t1 = space(); label1 = element("label"); input1 = element("input"); - t2 = text("\n Display view counts"); + t2 = text("\n Display view counts"); t3 = space(); label2 = element("label"); input2 = element("input"); - t4 = text("\n Check for new versions at startup."); + t4 = text("\n Check for new versions at startup."); t5 = space(); label3 = element("label"); input3 = element("input"); - t6 = text("\n Autoexpand Images on opening."); + t6 = text("\n Autoexpand Images on opening."); t7 = space(); label4 = element("label"); input4 = element("input"); - t8 = text("\n Autoexpand Videos on opening."); + t8 = text("\n Autoexpand Videos on opening."); t9 = space(); label5 = element("label"); input5 = element("input"); - t10 = text("\n Loop media content."); + t10 = text("\n Loop media content."); t11 = space(); label6 = element("label"); input6 = element("input"); - t12 = text("\n Disable hover preview."); + t12 = text("\n Disable hover preview."); t13 = space(); label7 = element("label"); input7 = element("input"); - t14 = text("\n Hide embedded content behind an eye."); + t14 = text("\n Hide embedded content behind an eye."); t15 = space(); if (if_block0) if_block0.c(); t16 = space(); label8 = element("label"); input8 = element("input"); - t17 = text("\n Preload external files."); + t17 = text("\n Preload external files."); t18 = space(); label9 = element("label"); input9 = element("input"); - t19 = text("\n Preload external files when they are in view."); + t19 = text("\n Preload external files when they are in view."); t20 = space(); label10 = element("label"); input10 = element("input"); - t21 = text("\n Hotlink content."); + t21 = text("\n Hotlink content."); t22 = space(); label11 = element("label"); input11 = element("input"); - t23 = text("\n Control audio on videos with mouse wheel."); + t23 = text("\n Control audio on videos with mouse wheel."); t24 = space(); label12 = element("label"); input12 = element("input"); - t25 = text("\n Show Minimap"); + t25 = text("\n Show Minimap"); t26 = space(); label13 = element("label"); input13 = element("input"); - t27 = text("\n \n Disable embedded file preloading"); + t27 = text("\n \n Disable embedded file preloading"); a = element("a"); a.textContent = "?"; t29 = space(); label14 = element("label"); input14 = element("input"); - t30 = text("\n \n Enable Hydrus Integration"); + t30 = text("\n \n Enable Hydrus Integration"); t31 = space(); if (if_block1) if_block1.c(); @@ -19322,21 +19639,21 @@ insert(target, if_block1_anchor, anchor); if (!mounted) { dispose = [ - listen(input0, "change", ctx[15]), - listen(input1, "change", ctx[16]), - listen(input2, "change", ctx[17]), - listen(input3, "change", ctx[18]), - listen(input4, "change", ctx[19]), - listen(input5, "change", ctx[20]), - listen(input6, "change", ctx[21]), - listen(input7, "change", ctx[22]), - listen(input8, "change", ctx[24]), - listen(input9, "change", ctx[25]), - listen(input10, "change", ctx[26]), - listen(input11, "change", ctx[27]), - listen(input12, "change", ctx[28]), - listen(input13, "change", ctx[29]), - listen(input14, "change", ctx[30]) + listen(input0, "change", ctx[16]), + listen(input1, "change", ctx[17]), + listen(input2, "change", ctx[18]), + listen(input3, "change", ctx[19]), + listen(input4, "change", ctx[20]), + listen(input5, "change", ctx[21]), + listen(input6, "change", ctx[22]), + listen(input7, "change", ctx[23]), + listen(input8, "change", ctx[25]), + listen(input9, "change", ctx[26]), + listen(input10, "change", ctx[27]), + listen(input11, "change", ctx[28]), + listen(input12, "change", ctx[29]), + listen(input13, "change", ctx[30]), + listen(input14, "change", ctx[31]) ]; mounted = true; } @@ -19370,7 +19687,7 @@ if (if_block0) { if_block0.p(ctx2, dirty); } else { - if_block0 = create_if_block_72(ctx2); + if_block0 = create_if_block_8(ctx2); if_block0.c(); if_block0.m(t16.parentNode, t16); } @@ -19403,7 +19720,7 @@ if (if_block1) { if_block1.p(ctx2, dirty); } else { - if_block1 = create_if_block_42(ctx2); + if_block1 = create_if_block_52(ctx2); if_block1.c(); if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); } @@ -19486,7 +19803,7 @@ } }; } - function create_if_block_22(ctx) { + function create_if_block_32(ctx) { let label; let input0; let t0; @@ -19510,7 +19827,7 @@ let current; let mounted; let dispose; - let if_block = ctx[5].phash && create_if_block_32(ctx); + let if_block = ctx[5].phash && create_if_block_42(ctx); let each_value_3 = ctx[5].rsources; let each_blocks_1 = []; for (let i = 0; i < each_value_3.length; i += 1) { @@ -19524,7 +19841,7 @@ $$scope: { ctx } }; dialog = new Dialog_default({ props: dialog_props }); - ctx[45](dialog); + ctx[46](dialog); let each_value_2 = ctx[5].blacklist; let each_blocks = []; for (let i = 0; i < each_value_2.length; i += 1) { @@ -19537,7 +19854,7 @@ c() { label = element("label"); input0 = element("input"); - t0 = text("\n Enable perceptual hash-based filtering"); + t0 = text("\n Enable perceptual hash-based filtering"); t1 = space(); if (if_block) if_block.c(); @@ -19567,9 +19884,9 @@ t12 = space(); input1 = element("input"); attr(input0, "type", "checkbox"); - attr(div0, "class", "tagcont svelte-1epvqgf"); - attr(hr, "class", "svelte-1epvqgf"); - attr(div1, "class", "tagcont svelte-1epvqgf"); + attr(div0, "class", "tagcont svelte-129vfxz"); + attr(hr, "class", "svelte-129vfxz"); + attr(div1, "class", "tagcont svelte-129vfxz"); attr(input1, "placeholder", "Press enter after typing your tag"); }, m(target, anchor) { @@ -19605,9 +19922,9 @@ current = true; if (!mounted) { dispose = [ - listen(input0, "change", ctx[35]), - listen(button, "click", ctx[40]), - listen(input1, "keydown", ctx[47]) + listen(input0, "change", ctx[36]), + listen(button, "click", ctx[41]), + listen(input1, "keydown", ctx[48]) ]; mounted = true; } @@ -19620,7 +19937,7 @@ if (if_block) { if_block.p(ctx2, dirty); } else { - if_block = create_if_block_32(ctx2); + if_block = create_if_block_42(ctx2); if_block.c(); if_block.m(t2.parentNode, t2); } @@ -19650,7 +19967,7 @@ check_outros(); } const dialog_changes = {}; - if (dirty[0] & 1 | dirty[2] & 1) { + if (dirty[0] & 1 | dirty[2] & 2) { dialog_changes.$$scope = { dirty, ctx: ctx2 }; } dialog.$set(dialog_changes); @@ -19722,7 +20039,7 @@ detach(button); if (detaching) detach(t7); - ctx[45](null); + ctx[46](null); destroy_component(dialog, detaching); if (detaching) detach(t8); @@ -19746,7 +20063,7 @@ } }; } - function create_if_block_32(ctx) { + function create_if_block_42(ctx) { let label; let input; let t0; @@ -19757,13 +20074,13 @@ c() { label = element("label"); input = element("input"); - t0 = text("\n Minimum distance required (5 recommended)\n \n "); + t0 = text("\n Minimum distance required (5 recommended)\n \n "); a = element("a"); a.textContent = "?"; attr(input, "type", "number"); - attr(input, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); attr(a, "title", "Higher will filter more potentially different images, lower will let more identical images through"); - attr(label, "class", "svelte-1epvqgf"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, label, anchor); @@ -19772,7 +20089,7 @@ append(label, t0); append(label, a); if (!mounted) { - dispose = listen(input, "input", ctx[36]); + dispose = listen(input, "input", ctx[37]); mounted = true; } }, @@ -19793,17 +20110,17 @@ let tag; let current; function func(...args) { - return ctx[37](ctx[60], ...args); + return ctx[38](ctx[61], ...args); } function remove_handler() { - return ctx[38](ctx[60]); + return ctx[39](ctx[61]); } function toggle_handler() { - return ctx[39](ctx[60]); + return ctx[40](ctx[61]); } tag = new Tag_default({ props: { - tag: ctx[60].name, + tag: ctx[61].name, toggleable: true, toggled: !ctx[5].rsources.find(func)?.disabled } @@ -19822,7 +20139,7 @@ ctx = new_ctx; const tag_changes = {}; if (dirty[0] & 32) - tag_changes.tag = ctx[60].name; + tag_changes.tag = ctx[61].name; if (dirty[0] & 32) tag_changes.toggled = !ctx[5].rsources.find(func)?.disabled; tag.$set(tag_changes); @@ -19867,40 +20184,40 @@ c() { div = element("div"); label0 = element("label"); - t0 = text("Name\n "); + t0 = text("Name\n "); input0 = element("input"); t1 = space(); label1 = element("label"); - t2 = text("Domain\n "); + t2 = text("Domain\n "); input1 = element("input"); t3 = space(); label2 = element("label"); - t4 = text("API Endpoint\n "); + t4 = text("API Endpoint\n "); input2 = element("input"); t5 = space(); label3 = element("label"); - t6 = text("Post page prefix (for sources)\n "); + t6 = text("Post page prefix (for sources)\n "); input3 = element("input"); t7 = space(); button = element("button"); button.textContent = "Add"; attr(input0, "type", "text"); attr(input0, "placeholder", "Gelbooru"); - attr(input0, "class", "svelte-1epvqgf"); - attr(label0, "class", "svelte-1epvqgf"); + attr(input0, "class", "svelte-129vfxz"); + attr(label0, "class", "svelte-129vfxz"); attr(input1, "type", "text"); attr(input1, "placeholder", "gelbooru.com"); - attr(input1, "class", "svelte-1epvqgf"); - attr(label1, "class", "svelte-1epvqgf"); + attr(input1, "class", "svelte-129vfxz"); + attr(label1, "class", "svelte-129vfxz"); attr(input2, "type", "text"); attr(input2, "placeholder", "/post.json?tags=md5:"); - attr(input2, "class", "svelte-1epvqgf"); - attr(label2, "class", "svelte-1epvqgf"); + attr(input2, "class", "svelte-129vfxz"); + attr(label2, "class", "svelte-129vfxz"); attr(input3, "type", "text"); attr(input3, "placeholder", "https://yande.re/post/show/"); - attr(input3, "class", "svelte-1epvqgf"); - attr(label3, "class", "svelte-1epvqgf"); - attr(div, "class", "form svelte-1epvqgf"); + attr(input3, "class", "svelte-129vfxz"); + attr(label3, "class", "svelte-129vfxz"); + attr(div, "class", "form svelte-129vfxz"); }, m(target, anchor) { insert(target, div, anchor); @@ -19927,10 +20244,10 @@ append(div, button); if (!mounted) { dispose = [ - listen(input0, "input", ctx[41]), - listen(input1, "input", ctx[42]), - listen(input2, "input", ctx[43]), - listen(input3, "input", ctx[44]), + listen(input0, "input", ctx[42]), + listen(input1, "input", ctx[43]), + listen(input2, "input", ctx[44]), + listen(input3, "input", ctx[45]), listen(button, "click", ctx[8]) ]; mounted = true; @@ -19962,9 +20279,9 @@ let tag; let current; function toggle_handler_1() { - return ctx[46](ctx[58]); + return ctx[47](ctx[59]); } - tag = new Tag_default({ props: { tag: ctx[58] } }); + tag = new Tag_default({ props: { tag: ctx[59] } }); tag.$on("toggle", toggle_handler_1); return { c() { @@ -19978,7 +20295,7 @@ ctx = new_ctx; const tag_changes = {}; if (dirty[0] & 32) - tag_changes.tag = ctx[58]; + tag_changes.tag = ctx[59]; tag.$set(tag_changes); }, i(local) { @@ -20005,12 +20322,12 @@ let current; let mounted; let dispose; - let if_block = !ctx[5].te && create_if_block_22(ctx); + let if_block = !ctx[5].te && create_if_block_32(ctx); return { c() { label = element("label"); input = element("input"); - t0 = text("\n Disable third-eye."); + t0 = text("\n Disable third-eye."); t1 = space(); if (if_block) if_block.c(); @@ -20028,7 +20345,7 @@ insert(target, if_block_anchor, anchor); current = true; if (!mounted) { - dispose = listen(input, "change", ctx[34]); + dispose = listen(input, "change", ctx[35]); mounted = true; } }, @@ -20043,7 +20360,7 @@ transition_in(if_block, 1); } } else { - if_block = create_if_block_22(ctx2); + if_block = create_if_block_32(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -20082,14 +20399,14 @@ } function create_each_block_12(ctx) { let option; - let t_value = ctx[55].domain + ""; + let t_value = ctx[56].domain + ""; let t; let option_value_value; return { c() { option = element("option"); t = text(t_value); - option.__value = option_value_value = ctx[57]; + option.__value = option_value_value = ctx[58]; option.value = option.__value; }, m(target, anchor) { @@ -20129,13 +20446,13 @@ } t2 = space(); label = element("label"); - t3 = text("Maximum number of embedded links to display\n "); + t3 = text("Maximum number of embedded links to display\n "); input = element("input"); if (ctx[5].fhost === void 0) - add_render_callback(() => ctx[48].call(select)); + add_render_callback(() => ctx[49].call(select)); attr(input, "type", "number"); - attr(input, "class", "svelte-1epvqgf"); - attr(label, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, p, anchor); @@ -20152,8 +20469,8 @@ set_input_value(input, ctx[5].maxe); if (!mounted) { dispose = [ - listen(select, "change", ctx[48]), - listen(input, "input", ctx[49]) + listen(select, "change", ctx[49]), + listen(input, "input", ctx[50]) ]; mounted = true; } @@ -20218,8 +20535,10 @@ } }; } - function create_if_block_12(ctx) { + function create_if_block_22(ctx) { let div; + let p; + let t1; let each_value = ctx[4]; let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { @@ -20228,13 +20547,18 @@ return { c() { div = element("div"); + p = element("p"); + p.textContent = "Format is (embedded links / link in filename)"; + t1 = space(); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - attr(div, "class", "bepis svelte-1epvqgf"); + attr(div, "class", "bepis svelte-129vfxz"); }, m(target, anchor) { insert(target, div, anchor); + append(div, p); + append(div, t1); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(div, null); } @@ -20270,23 +20594,28 @@ let div; let a; let t0; - let t1_value = ctx[52].id + ""; + let t1_value = ctx[53].id + ""; let t1; let a_href_value; let t2; - let t3_value = ctx[52].cnt + ""; + let t3_value = ctx[53].pees + ""; let t3; let t4; + let t5_value = ctx[53].eyes + ctx[53].other + ""; + let t5; + let t6; return { c() { div = element("div"); a = element("a"); t0 = text(">>"); t1 = text(t1_value); - t2 = text("\n ("); + t2 = text("\n ("); t3 = text(t3_value); - t4 = text(" embeds)\n "); - attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[11] + "/thread/" + ctx[52].id); + t4 = text(" / "); + t5 = text(t5_value); + t6 = text(")\n "); + attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[11] + "/thread/" + ctx[53].id); attr(div, "class", "mbepis"); }, m(target, anchor) { @@ -20297,15 +20626,19 @@ append(div, t2); append(div, t3); append(div, t4); + append(div, t5); + append(div, t6); }, p(ctx2, dirty) { - if (dirty[0] & 16 && t1_value !== (t1_value = ctx2[52].id + "")) + if (dirty[0] & 16 && t1_value !== (t1_value = ctx2[53].id + "")) set_data(t1, t1_value); - if (dirty[0] & 16 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[11] + "/thread/" + ctx2[52].id)) { + if (dirty[0] & 16 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[11] + "/thread/" + ctx2[53].id)) { attr(a, "href", a_href_value); } - if (dirty[0] & 16 && t3_value !== (t3_value = ctx2[52].cnt + "")) + if (dirty[0] & 16 && t3_value !== (t3_value = ctx2[53].pees + "")) set_data(t3, t3_value); + if (dirty[0] & 16 && t5_value !== (t5_value = ctx2[53].eyes + ctx2[53].other + "")) + set_data(t5, t5_value); }, d(detaching) { if (detaching) @@ -20320,15 +20653,12 @@ let a; let t2; let t3; - let button; - let t4; - let t5; let if_block_anchor; let mounted; let dispose; function select_block_type(ctx2, dirty) { if (!ctx2[3]) - return create_if_block_12; + return create_if_block_22; return create_else_block2; } let current_block_type = select_block_type(ctx, [-1, -1, -1]); @@ -20337,19 +20667,15 @@ c() { label = element("label"); input = element("input"); - t0 = text("\n \n Contribute to help keep this list up to date. ["); + t0 = text("\n \n Contribute to help keep this list up to date. ["); a = element("a"); a.textContent = "?"; t2 = text("]"); t3 = space(); - button = element("button"); - t4 = text("Refresh"); - t5 = space(); if_block.c(); if_block_anchor = empty(); attr(input, "type", "checkbox"); attr(a, "title", "This will make PEE automatically send the\n post number of posts you find with embedded content"); - button.disabled = ctx[3]; }, m(target, anchor) { insert(target, label, anchor); @@ -20359,16 +20685,10 @@ append(label, a); append(label, t2); insert(target, t3, anchor); - insert(target, button, anchor); - append(button, t4); - insert(target, t5, anchor); if_block.m(target, anchor); insert(target, if_block_anchor, anchor); if (!mounted) { - dispose = [ - listen(input, "change", ctx[50]), - listen(button, "click", ctx[12]) - ]; + dispose = listen(input, "change", ctx[51]); mounted = true; } }, @@ -20376,9 +20696,6 @@ if (dirty[0] & 32) { input.checked = ctx2[5].tm; } - if (dirty[0] & 8) { - button.disabled = ctx2[3]; - } if (current_block_type === (current_block_type = select_block_type(ctx2, dirty)) && if_block) { if_block.p(ctx2, dirty); } else { @@ -20395,19 +20712,15 @@ detach(label); if (detaching) detach(t3); - if (detaching) - detach(button); - if (detaching) - detach(t5); if_block.d(detaching); if (detaching) detach(if_block_anchor); mounted = false; - run_all(dispose); + dispose(); } }; } - function create_if_block6(ctx) { + function create_if_block_12(ctx) { let tabpanel; let current; tabpanel = new TabPanel_default({ @@ -20509,7 +20822,7 @@ $$scope: { ctx } } }); - let if_block = ctx[6].akValid && create_if_block6(ctx); + let if_block = ctx[6].akValid && create_if_block_12(ctx); return { c() { create_component(tablist.$$.fragment); @@ -20544,27 +20857,27 @@ }, p(ctx2, dirty) { const tablist_changes = {}; - if (dirty[0] & 64 | dirty[2] & 1) { + if (dirty[0] & 64 | dirty[2] & 2) { tablist_changes.$$scope = { dirty, ctx: ctx2 }; } tablist.$set(tablist_changes); const tabpanel0_changes = {}; - if (dirty[0] & 224 | dirty[2] & 1) { + if (dirty[0] & 224 | dirty[2] & 2) { tabpanel0_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel0.$set(tabpanel0_changes); const tabpanel1_changes = {}; - if (dirty[0] & 35 | dirty[2] & 1) { + if (dirty[0] & 35 | dirty[2] & 2) { tabpanel1_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel1.$set(tabpanel1_changes); const tabpanel2_changes = {}; - if (dirty[0] & 32 | dirty[2] & 1) { + if (dirty[0] & 32 | dirty[2] & 2) { tabpanel2_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel2.$set(tabpanel2_changes); const tabpanel3_changes = {}; - if (dirty[0] & 56 | dirty[2] & 1) { + if (dirty[0] & 56 | dirty[2] & 2) { tabpanel3_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel3.$set(tabpanel3_changes); @@ -20574,7 +20887,7 @@ transition_in(if_block, 1); } } else { - if_block = create_if_block6(ctx2); + if_block = create_if_block_12(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -20631,74 +20944,57 @@ }; } function create_fragment9(ctx) { - let div1; - let div0; - let h1; - let t1; - let hr; - let t2; - let tabs; + let if_block_anchor; let current; - tabs = new Tabs_default({ - props: { - $$slots: { default: [create_default_slot] }, - $$scope: { ctx } - } - }); + let if_block = ctx[2] && create_if_block6(ctx); return { c() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - h1.textContent = "PEE Settings"; - t1 = space(); - hr = element("hr"); - t2 = space(); - create_component(tabs.$$.fragment); - attr(h1, "class", "svelte-1epvqgf"); - attr(hr, "class", "svelte-1epvqgf"); - attr(div0, "class", "content svelte-1epvqgf"); - attr(div1, "class", "backpanel svelte-1epvqgf"); - toggle_class(div1, "enabled", ctx[2]); - toggle_class(div1, "disabled", !ctx[2]); + if (if_block) + if_block.c(); + if_block_anchor = empty(); }, m(target, anchor) { - insert(target, div1, anchor); - append(div1, div0); - append(div0, h1); - append(div0, t1); - append(div0, hr); - append(div0, t2); - mount_component(tabs, div0, null); + if (if_block) + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); current = true; }, p(ctx2, dirty) { - const tabs_changes = {}; - if (dirty[0] & 251 | dirty[2] & 1) { - tabs_changes.$$scope = { dirty, ctx: ctx2 }; - } - tabs.$set(tabs_changes); - if (dirty[0] & 4) { - toggle_class(div1, "enabled", ctx2[2]); - } - if (dirty[0] & 4) { - toggle_class(div1, "disabled", !ctx2[2]); + if (ctx2[2]) { + if (if_block) { + if_block.p(ctx2, dirty); + if (dirty[0] & 4) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block6(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); } }, i(local) { if (current) return; - transition_in(tabs.$$.fragment, local); + transition_in(if_block); current = true; }, o(local) { - transition_out(tabs.$$.fragment, local); + transition_out(if_block); current = false; }, d(detaching) { + if (if_block) + if_block.d(detaching); if (detaching) - detach(div1); - destroy_component(tabs); + detach(if_block_anchor); } }; } @@ -20763,6 +21059,7 @@ cached.subscribe((v) => { set_store_value(settings, $settings.cache = v, $settings); }); + const select_handler = () => updateThreads(); function input0_change_handler() { $cached = this.checked; cached.set($cached); @@ -20915,6 +21212,7 @@ updateThreads, toggleBooru, cached, + select_handler, input0_change_handler, input1_change_handler, input2_change_handler, @@ -21662,7 +21960,7 @@ }; } function instance13($$self, $$props, $$invalidate) { - const dispatch = createEventDispatcher(); + const dispatch2 = createEventDispatcher(); let { files } = $$props; let { id = "" } = $$props; let children2 = {}; @@ -21685,7 +21983,7 @@ if ("id" in $$props2) $$invalidate(1, id = $$props2.id); }; - return [files, id, children2, dispatch, bepis, embedding_binding, fileinfo_handler]; + return [files, id, children2, dispatch2, bepis, embedding_binding, fileinfo_handler]; } var Embeddings = class extends SvelteComponent { constructor(options) { @@ -23587,12 +23885,11 @@ appState.subscribe((v) => { cappState = v; }); - var processImage = async (srcs, fn, hex, prevurl, onfound) => { + var processImage = async (srcs, fn, hex, prevurl) => { const ret = await Promise.all(processors.filter((e) => e.match(fn)).map(async (proc) => { if (proc.skip) { const md5 = import_buffer11.Buffer.from(hex, "base64"); if (await proc.has_embed(md5, fn, prevurl) === true) { - onfound(); return [await proc.extract(md5, fn), true]; } return; @@ -23625,7 +23922,6 @@ if (found === false) { return; } - onfound(); return [await proc.extract(cumul), false]; } catch { } @@ -23668,26 +23964,28 @@ if (!thumbLink) return; let res2 = void 0; + const reportEmbed = () => { + if (csettings5.tm) { + if (["boards.4chan.org", "boards.4channel.org"].includes(location.host)) { + if (!cappState.isCatalog) { + const op = +location.pathname.match(/\/thread\/(.*)/)[1]; + pendingPosts.push({ id: +post.id.match(/([0-9]+)/)[1], op }); + signalNewEmbeds(); + } + } + } + }; if (shouldUseCache()) { res2 = await getEmbedsFromCache(qp.getCurrentBoard(), +qp.getCurrentThread(), post.id); } if (!res2) { - res2 = await processImage(origlink, qp.getFilename(post), qp.getMD5(post), thumbLink, () => { - if (csettings5.tm) { - if (["boards.4chan.org", "boards.4channel.org"].includes(location.host)) { - if (!cappState.isCatalog) { - const op = +location.pathname.match(/\/thread\/(.*)/)[1]; - pendingPosts.push({ id: +post.id.match(/([0-9]+)/)[1], op }); - signalNewEmbeds(); - } - } - } - post.querySelector(".post")?.classList.add("embedfound"); - }); + res2 = await processImage(origlink, qp.getFilename(post), qp.getMD5(post), thumbLink); res2 = res2?.filter((e) => e); } if (!res2 || res2.length == 0) return; + reportEmbed(); + post.querySelector(".post")?.classList.add("embedfound"); processAttachments(post, res2?.flatMap((e) => e[0].map((k) => [k, e[1]]))); }; var versionCheck = async () => { @@ -24131,5 +24429,19 @@ * @author Feross Aboukhadijeh * @license MIT */ +/*! ***************************************************************************** +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. +***************************************************************************** */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ diff --git a/firefox/dist/main.js b/firefox/dist/main.js index 7f314f7..3fc580c 100644 --- a/firefox/dist/main.js +++ b/firefox/dist/main.js @@ -53,7 +53,7 @@ var define_BUILD_VERSION_default; var init_define_BUILD_VERSION = __esm({ ""() { - define_BUILD_VERSION_default = [0, 235]; + define_BUILD_VERSION_default = [0, 241]; } }); @@ -4033,18 +4033,18 @@ }); } var lastPromise = this[kLastPromise]; - var promise; + var promise2; if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); + promise2 = new Promise(wrapForNext(lastPromise, this)); } else { var data = this[kStream].read(); if (data !== null) { return Promise.resolve(createIterResult(data, false)); } - promise = new Promise(this[kHandlePromise]); + promise2 = new Promise(this[kHandlePromise]); } - this[kLastPromise] = promise; - return promise; + this[kLastPromise] = promise2; + return promise2; } }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { return this; @@ -12653,6 +12653,7 @@ init_esbuild_inject(); function noop() { } + var identity = (x) => x; function assign(tar, src) { for (const k in src) tar[k] = src[k]; @@ -12745,6 +12746,33 @@ store.set(value); return ret; } + var is_client = typeof window !== "undefined"; + var now = is_client ? () => window.performance.now() : () => Date.now(); + var raf = is_client ? (cb) => requestAnimationFrame(cb) : noop; + var tasks = /* @__PURE__ */ new Set(); + function run_tasks(now2) { + tasks.forEach((task) => { + if (!task.c(now2)) { + tasks.delete(task); + task.f(); + } + }); + if (tasks.size !== 0) + raf(run_tasks); + } + function loop(callback) { + let task; + if (tasks.size === 0) + raf(run_tasks); + return { + promise: new Promise((fulfill) => { + tasks.add(task = { c: callback, f: fulfill }); + }), + abort() { + tasks.delete(task); + } + }; + } var is_hydrating = false; function start_hydrating() { is_hydrating = true; @@ -12773,6 +12801,11 @@ } return node.ownerDocument; } + function append_empty_stylesheet(node) { + const style_element = element("style"); + append_stylesheet(get_root_for_style(node), style_element); + return style_element; + } function append_stylesheet(node, style) { append(node.head || node, style); } @@ -12882,6 +12915,64 @@ this.n.forEach(detach); } }; + var active_docs = /* @__PURE__ */ new Set(); + var active = 0; + function hash(str) { + let hash2 = 5381; + let i = str.length; + while (i--) + hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i); + return hash2 >>> 0; + } + function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { + const step = 16.666 / duration; + let keyframes = "{\n"; + for (let p = 0; p <= 1; p += step) { + const t = a + (b - a) * ease(p); + keyframes += p * 100 + `%{${fn(t, 1 - t)}} +`; + } + const rule = keyframes + `100% {${fn(b, 1 - b)}} +}`; + const name = `__svelte_${hash(rule)}_${uid}`; + const doc = get_root_for_style(node); + active_docs.add(doc); + const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet); + const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {}); + if (!current_rules[name]) { + current_rules[name] = true; + stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); + } + const animation = node.style.animation || ""; + node.style.animation = `${animation ? `${animation}, ` : ""}${name} ${duration}ms linear ${delay}ms 1 both`; + active += 1; + return name; + } + function delete_rule(node, name) { + const previous = (node.style.animation || "").split(", "); + const next = previous.filter(name ? (anim) => anim.indexOf(name) < 0 : (anim) => anim.indexOf("__svelte") === -1); + const deleted = previous.length - next.length; + if (deleted) { + node.style.animation = next.join(", "); + active -= deleted; + if (!active) + clear_rules(); + } + } + function clear_rules() { + raf(() => { + if (active) + return; + active_docs.forEach((doc) => { + const stylesheet = doc.__svelte_stylesheet; + let i = stylesheet.cssRules.length; + while (i--) + stylesheet.deleteRule(i); + doc.__svelte_rules = {}; + }); + active_docs.clear(); + }); + } var current_component; function set_current_component(component) { current_component = component; @@ -12981,6 +13072,19 @@ $$.after_update.forEach(add_render_callback); } } + var promise; + function wait() { + if (!promise) { + promise = Promise.resolve(); + promise.then(() => { + promise = null; + }); + } + return promise; + } + function dispatch(node, direction, kind) { + node.dispatchEvent(custom_event(`${direction ? "intro" : "outro"}${kind}`)); + } var outroing = /* @__PURE__ */ new Set(); var outros; function group_outros() { @@ -13018,6 +13122,101 @@ block.o(local); } } + var null_transition = { duration: 0 }; + function create_bidirectional_transition(node, fn, params, intro) { + let config = fn(node, params); + let t = intro ? 0 : 1; + let running_program = null; + let pending_program = null; + let animation_name = null; + function clear_animation() { + if (animation_name) + delete_rule(node, animation_name); + } + function init4(program, duration) { + const d = program.b - t; + duration *= Math.abs(d); + return { + a: t, + b: program.b, + d, + duration, + start: program.start, + end: program.start + duration, + group: program.group + }; + } + function go(b) { + const { delay = 0, duration = 300, easing = identity, tick: tick2 = noop, css } = config || null_transition; + const program = { + start: now() + delay, + b + }; + if (!b) { + program.group = outros; + outros.r += 1; + } + if (running_program || pending_program) { + pending_program = program; + } else { + if (css) { + clear_animation(); + animation_name = create_rule(node, t, b, duration, delay, easing, css); + } + if (b) + tick2(0, 1); + running_program = init4(program, duration); + add_render_callback(() => dispatch(node, b, "start")); + loop((now2) => { + if (pending_program && now2 > pending_program.start) { + running_program = init4(pending_program, duration); + pending_program = null; + dispatch(node, running_program.b, "start"); + if (css) { + clear_animation(); + animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css); + } + } + if (running_program) { + if (now2 >= running_program.end) { + tick2(t = running_program.b, 1 - t); + dispatch(node, running_program.b, "end"); + if (!pending_program) { + if (running_program.b) { + clear_animation(); + } else { + if (!--running_program.group.r) + run_all(running_program.group.c); + } + } + running_program = null; + } else if (now2 >= running_program.start) { + const p = now2 - running_program.start; + t = running_program.a + running_program.d * easing(p / running_program.duration); + tick2(t, 1 - t); + } + } + return !!(running_program || pending_program); + }); + } + } + return { + run(b) { + if (is_function(config)) { + wait().then(() => { + config = config(); + go(b); + }); + } else { + go(b); + } + }, + end() { + clear_animation(); + running_program = pending_program = null; + } + }; + } var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : window; function destroy_block(block, lookup) { block.d(1); @@ -13391,13 +13590,13 @@ init_esbuild_inject(); var nativeMax = Math.max; var nativeMin = Math.min; - function debounce(func, wait, options) { + function debounce(func, wait2, options) { let lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; - wait = Number(wait) || 0; + wait2 = Number(wait2) || 0; if (typeof options === "object") { leading = !!options.leading; maxing = "maxWait" in options; - maxWait = maxing ? nativeMax(Number(options.maxWait) || 0, wait) : maxWait; + maxWait = maxing ? nativeMax(Number(options.maxWait) || 0, wait2) : maxWait; trailing = "trailing" in options ? !!options.trailing : trailing; } function invokeFunc(time) { @@ -13409,17 +13608,17 @@ } function leadingEdge(time) { lastInvokeTime = time; - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); return leading ? invokeFunc(time) : result; } function remainingWait(time) { - const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall; + const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait2 - timeSinceLastCall; console.log("remainingWait"); return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2; } function shouldInvoke(time) { const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; - return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + return lastCallTime === void 0 || timeSinceLastCall >= wait2 || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { const time = Date.now(); @@ -13456,12 +13655,12 @@ return leadingEdge(lastCallTime); } if (maxing) { - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); return invokeFunc(lastCallTime); } } if (timerId === void 0) { - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); } return result; } @@ -13720,8 +13919,6 @@ const rs = new ReadableStream({ start(controller) { gcontroller = controller; - if (false) - cleanupSerialized(init4.body); buffer.forEach((b) => gcontroller?.enqueue(b)); buffer = []; if (finished) { @@ -13732,7 +13929,12 @@ let s; s = 0; const cmdbuff = []; + let cleaned = false; lqueue[id] = async (e) => { + if (!cleaned && false) { + cleanupSerialized(init4.body); + cleaned = true; + } if (e.progress) { if (lsn) lsn.dispatchEvent(new CustomEvent("progress", { detail: e.progress })); @@ -15768,8 +15970,6 @@ }); var generateThumbnail = async (f) => { const can = document.createElement("canvas"); - can.width = 125; - can.height = 125; const [sw, sh] = [125, 125]; const url = URL.createObjectURL(f); let source; @@ -15801,7 +16001,7 @@ if (!ctx) return import_buffer2.Buffer.alloc(0); ctx.drawImage(source, 0, 0, dims[0], dims[1]); - const blob = await new Promise((_) => can.toBlob(_, "image/jpg")); + const blob = await new Promise((_) => can.toBlob(_)); if (!blob) return import_buffer2.Buffer.alloc(0); return import_buffer2.Buffer.from(await blob.arrayBuffer()); @@ -15876,7 +16076,7 @@ const target = +pid.slice(pid.match(/\d/).index); const cachedData = cthreadDataCache[target]; if (!cachedData) - return []; + return; const ret = []; if ("pee" in cachedData.data) { const files = await decodeCoom3Payload(import_buffer2.Buffer.from(cachedData.data.pee.join(" "))); @@ -15921,7 +16121,7 @@ const { domain, file } = m.groups; const headers = await getHeaders(pee); const res = await ifetch(pee, { - headers: { range: "bytes=0-16383", "user-agent": "" }, + headers: { range: "bytes=0-32767", "user-agent": "" }, mode: "cors", referrerPolicy: "no-referrer" }); @@ -16772,6 +16972,37 @@ init_define_BUILD_VERSION(); init_esbuild_inject(); + // node_modules/svelte/transition/index.mjs + init_define_BUILD_VERSION(); + init_esbuild_inject(); + + // node_modules/svelte/easing/index.mjs + init_define_BUILD_VERSION(); + init_esbuild_inject(); + function cubicOut(t) { + const f = t - 1; + return f * f * f + 1; + } + + // node_modules/svelte/transition/index.mjs + function slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) { + const style = getComputedStyle(node); + const opacity = +style.opacity; + const height = parseFloat(style.height); + const padding_top = parseFloat(style.paddingTop); + const padding_bottom = parseFloat(style.paddingBottom); + const margin_top = parseFloat(style.marginTop); + const margin_bottom = parseFloat(style.marginBottom); + const border_top_width = parseFloat(style.borderTopWidth); + const border_bottom_width = parseFloat(style.borderBottomWidth); + return { + delay, + duration, + easing, + css: (t) => `overflow: hidden;opacity: ${Math.min(t * 20, 1) * opacity};height: ${t * height}px;padding-top: ${t * padding_top}px;padding-bottom: ${t * padding_bottom}px;margin-top: ${t * margin_top}px;margin-bottom: ${t * margin_bottom}px;border-top-width: ${t * border_top_width}px;border-bottom-width: ${t * border_bottom_width}px;` + }; + } + // src/Components/Dialog.svelte init_define_BUILD_VERSION(); init_esbuild_inject(); @@ -17022,9 +17253,9 @@ let { tag } = $$props; let { toggleable = false } = $$props; let { toggled = false } = $$props; - const dispatch = createEventDispatcher(); - const click_handler2 = (e) => (e.preventDefault(), dispatch("remove")); - const click_handler_1 = () => dispatch("toggle"); + const dispatch2 = createEventDispatcher(); + const click_handler2 = (e) => (e.preventDefault(), dispatch2("remove")); + const click_handler_1 = () => dispatch2("toggle"); $$self.$$set = ($$props2) => { if ("tag" in $$props2) $$invalidate(0, tag = $$props2.tag); @@ -17033,7 +17264,7 @@ if ("toggled" in $$props2) $$invalidate(2, toggled = $$props2.toggled); }; - return [tag, toggleable, toggled, dispatch, click_handler2, click_handler_1]; + return [tag, toggleable, toggled, dispatch2, click_handler2, click_handler_1]; } var Tag = class extends SvelteComponent { constructor(options) { @@ -17239,8 +17470,8 @@ let current; let mounted; let dispose; - const default_slot_template = ctx[5].default; - const default_slot = create_slot(default_slot_template, ctx, ctx[4], null); + const default_slot_template = ctx[6].default; + const default_slot = create_slot(default_slot_template, ctx, ctx[5], null); return { c() { button = element("button"); @@ -17256,14 +17487,14 @@ } current = true; if (!mounted) { - dispose = listen(button, "click", ctx[6]); + dispose = listen(button, "click", ctx[7]); mounted = true; } }, p(ctx2, [dirty]) { if (default_slot) { - if (default_slot.p && (!current || dirty & 16)) { - update_slot_base(default_slot, default_slot_template, ctx2, ctx2[4], !current ? get_all_dirty_from_scope(ctx2[4]) : get_slot_changes(default_slot_template, ctx2[4], dirty, null), null); + if (default_slot.p && (!current || dirty & 32)) { + update_slot_base(default_slot, default_slot_template, ctx2, ctx2[5], !current ? get_all_dirty_from_scope(ctx2[5]) : get_slot_changes(default_slot_template, ctx2[5], dirty, null), null); } } if (dirty & 3) { @@ -17296,13 +17527,26 @@ const tab = {}; const { registerTab, selectTab, selectedTab } = getContext(TABS); component_subscribe($$self, selectedTab, (value) => $$invalidate(0, $selectedTab = value)); + const dispatch2 = createEventDispatcher(); registerTab(tab); - const click_handler2 = () => selectTab(tab); + const click_handler2 = () => { + selectTab(tab); + dispatch2("select"); + }; $$self.$$set = ($$props2) => { if ("$$scope" in $$props2) - $$invalidate(4, $$scope = $$props2.$$scope); + $$invalidate(5, $$scope = $$props2.$$scope); }; - return [$selectedTab, tab, selectTab, selectedTab, $$scope, slots, click_handler2]; + return [ + $selectedTab, + tab, + selectTab, + selectedTab, + dispatch2, + $$scope, + slots, + click_handler2 + ]; } var Tab = class extends SvelteComponent { constructor(options) { @@ -17938,7 +18182,7 @@ let $appState; component_subscribe($$self, settings, ($$value) => $$invalidate(19, $settings = $$value)); component_subscribe($$self, appState, ($$value) => $$invalidate(38, $appState = $$value)); - const dispatch = createEventDispatcher(); + const dispatch2 = createEventDispatcher(); let { file } = $$props; let isVideo = false; let isImage = false; @@ -17996,7 +18240,7 @@ $$invalidate(4, isAudio = type.mime.startsWith("audio/")); $$invalidate(3, isImage = type.mime.startsWith("image/")); $$invalidate(5, isText = type.mime.startsWith("text/plain")); - dispatch("fileinfo", { type }); + dispatch2("fileinfo", { type }); if (isImage) { $$invalidate(7, contracted = !$settings.xpi); } @@ -18062,7 +18306,7 @@ $$invalidate(3, isImage = type.mime.startsWith("image/")); $$invalidate(5, isText = type.mime.startsWith("text/plain")); $$invalidate(17, unzipping = false); - dispatch("fileinfo", { type }); + dispatch2("fileinfo", { type }); if (hovering) { setTimeout(async () => { do { @@ -18074,7 +18318,7 @@ } let { inhibitExpand = false } = $$props; async function bepis(ev) { - dispatch("click"); + dispatch2("click"); if (inhibitExpand) return; if ($appState.isCatalog) @@ -18264,7 +18508,7 @@ hoverStop, hoverUpdate, adjustAudio, - dispatch, + dispatch2, isNotChrome, id, isContracted, @@ -18705,31 +18949,106 @@ // src/Components/App.svelte function add_css8(target) { - append_styles(target, "svelte-1epvqgf", '.bepis.svelte-1epvqgf.svelte-1epvqgf{max-height:260px;overflow-y:auto}.tagcont.svelte-1epvqgf.svelte-1epvqgf{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}label.svelte-1epvqgf>input[type="text"].svelte-1epvqgf,label.svelte-1epvqgf>input[type="number"].svelte-1epvqgf{width:95%}.enabled.svelte-1epvqgf.svelte-1epvqgf{display:block}.disabled.svelte-1epvqgf.svelte-1epvqgf{display:none}.content.svelte-1epvqgf.svelte-1epvqgf{display:flex;flex-direction:column}.error.svelte-1epvqgf.svelte-1epvqgf{color:red}hr.svelte-1epvqgf.svelte-1epvqgf{width:100%}h1.svelte-1epvqgf.svelte-1epvqgf{text-align:center}.form.svelte-1epvqgf.svelte-1epvqgf{display:flex;flex-direction:column;gap:20px;position:absolute;padding:15px;border:1px solid white;background-color:inherit;border-radius:10px}.form.svelte-1epvqgf>label.svelte-1epvqgf{display:flex;flex-direction:column;gap:10px}.backpanel.svelte-1epvqgf.svelte-1epvqgf{position:absolute;right:32px;padding:10px;width:15%;top:32px;border:1px solid;border-radius:5px;background-color:rgba(0, 0, 0, 0.2);pointer-events:all;backdrop-filter:blur(9px);max-height:80vh;min-width:321px}'); + append_styles(target, "svelte-129vfxz", '.bepis.svelte-129vfxz.svelte-129vfxz{max-height:260px;overflow-y:auto}.tagcont.svelte-129vfxz.svelte-129vfxz{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}label.svelte-129vfxz>input[type="text"].svelte-129vfxz,label.svelte-129vfxz>input[type="number"].svelte-129vfxz{width:95%}.content.svelte-129vfxz.svelte-129vfxz{display:flex;flex-direction:column}.error.svelte-129vfxz.svelte-129vfxz{color:red}hr.svelte-129vfxz.svelte-129vfxz{width:100%}h1.svelte-129vfxz.svelte-129vfxz{text-align:center}.form.svelte-129vfxz.svelte-129vfxz{display:flex;flex-direction:column;gap:20px;position:absolute;padding:15px;border:1px solid white;background-color:inherit;border-radius:10px}.form.svelte-129vfxz>label.svelte-129vfxz{display:flex;flex-direction:column;gap:10px}.backpanel.svelte-129vfxz.svelte-129vfxz{position:absolute;right:32px;padding:10px;width:15%;top:32px;border:1px solid;border-radius:5px;background-color:rgba(0, 0, 0, 0.8);pointer-events:all;backdrop-filter:blur(9px);max-height:80vh;min-width:321px}'); } function get_each_context2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[52] = list[i]; + child_ctx[53] = list[i]; return child_ctx; } function get_each_context_12(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[55] = list[i]; - child_ctx[57] = i; + child_ctx[56] = list[i]; + child_ctx[58] = i; return child_ctx; } function get_each_context_2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[58] = list[i]; - child_ctx[57] = i; + child_ctx[59] = list[i]; + child_ctx[58] = i; return child_ctx; } function get_each_context_3(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[60] = list[i]; - child_ctx[57] = i; + child_ctx[61] = list[i]; + child_ctx[58] = i; return child_ctx; } + function create_if_block6(ctx) { + let div1; + let div0; + let h1; + let t1; + let hr; + let t2; + let tabs; + let div1_transition; + let current; + tabs = new Tabs_default({ + props: { + $$slots: { default: [create_default_slot] }, + $$scope: { ctx } + } + }); + return { + c() { + div1 = element("div"); + div0 = element("div"); + h1 = element("h1"); + h1.textContent = "PEE Settings"; + t1 = space(); + hr = element("hr"); + t2 = space(); + create_component(tabs.$$.fragment); + attr(h1, "class", "svelte-129vfxz"); + attr(hr, "class", "svelte-129vfxz"); + attr(div0, "class", "content svelte-129vfxz"); + attr(div1, "class", "backpanel svelte-129vfxz"); + }, + m(target, anchor) { + insert(target, div1, anchor); + append(div1, div0); + append(div0, h1); + append(div0, t1); + append(div0, hr); + append(div0, t2); + mount_component(tabs, div0, null); + current = true; + }, + p(ctx2, dirty) { + const tabs_changes = {}; + if (dirty[0] & 251 | dirty[2] & 2) { + tabs_changes.$$scope = { dirty, ctx: ctx2 }; + } + tabs.$set(tabs_changes); + }, + i(local) { + if (current) + return; + transition_in(tabs.$$.fragment, local); + add_render_callback(() => { + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, slide, {}, true); + div1_transition.run(1); + }); + current = true; + }, + o(local) { + transition_out(tabs.$$.fragment, local); + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, slide, {}, false); + div1_transition.run(0); + current = false; + }, + d(detaching) { + if (detaching) + detach(div1); + destroy_component(tabs); + if (detaching && div1_transition) + div1_transition.end(); + } + }; + } function create_default_slot_12(ctx) { let t; return { @@ -18790,7 +19109,7 @@ } }; } - function create_if_block_8(ctx) { + function create_if_block_9(ctx) { let tab; let current; tab = new Tab_default({ @@ -18872,7 +19191,8 @@ $$scope: { ctx } } }); - let if_block = ctx[6].akValid && create_if_block_8(ctx); + tab3.$on("select", ctx[15]); + let if_block = ctx[6].akValid && create_if_block_9(ctx); return { c() { create_component(tab0.$$.fragment); @@ -18903,22 +19223,22 @@ }, p(ctx2, dirty) { const tab0_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab0_changes.$$scope = { dirty, ctx: ctx2 }; } tab0.$set(tab0_changes); const tab1_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab1_changes.$$scope = { dirty, ctx: ctx2 }; } tab1.$set(tab1_changes); const tab2_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab2_changes.$$scope = { dirty, ctx: ctx2 }; } tab2.$set(tab2_changes); const tab3_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab3_changes.$$scope = { dirty, ctx: ctx2 }; } tab3.$set(tab3_changes); @@ -18928,7 +19248,7 @@ transition_in(if_block, 1); } } else { - if_block = create_if_block_8(ctx2); + if_block = create_if_block_9(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -18979,7 +19299,7 @@ } }; } - function create_if_block_72(ctx) { + function create_if_block_8(ctx) { let label; let input; let t; @@ -18989,7 +19309,7 @@ c() { label = element("label"); input = element("input"); - t = text("\n Hide original content when hidden content is visible."); + t = text("\n Hide original content when hidden content is visible."); attr(input, "type", "checkbox"); }, m(target, anchor) { @@ -18998,7 +19318,7 @@ input.checked = ctx[5].ho; append(label, t); if (!mounted) { - dispose = listen(input, "change", ctx[23]); + dispose = listen(input, "change", ctx[24]); mounted = true; } }, @@ -19015,7 +19335,7 @@ } }; } - function create_if_block_42(ctx) { + function create_if_block_52(ctx) { let t0; let label; let t1; @@ -19026,15 +19346,15 @@ let if_block1_anchor; let mounted; let dispose; - let if_block0 = ctx[6].herror && create_if_block_62(ctx); - let if_block1 = ctx[6].akValid && create_if_block_52(ctx); + let if_block0 = ctx[6].herror && create_if_block_72(ctx); + let if_block1 = ctx[6].akValid && create_if_block_62(ctx); return { c() { if (if_block0) if_block0.c(); t0 = space(); label = element("label"); - t1 = text("Hydrus Access Key\n \n "); + t1 = text("Hydrus Access Key\n \n "); a = element("a"); a.textContent = "?"; t3 = space(); @@ -19045,8 +19365,8 @@ if_block1_anchor = empty(); attr(a, "title", "Only requires Search Files permission. See Hydrus docs on where to set this up."); attr(input, "type", "text"); - attr(input, "class", "svelte-1epvqgf"); - attr(label, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { if (if_block0) @@ -19063,7 +19383,7 @@ if_block1.m(target, anchor); insert(target, if_block1_anchor, anchor); if (!mounted) { - dispose = listen(input, "input", ctx[31]); + dispose = listen(input, "input", ctx[32]); mounted = true; } }, @@ -19072,7 +19392,7 @@ if (if_block0) { if_block0.p(ctx2, dirty); } else { - if_block0 = create_if_block_62(ctx2); + if_block0 = create_if_block_72(ctx2); if_block0.c(); if_block0.m(t0.parentNode, t0); } @@ -19087,7 +19407,7 @@ if (if_block1) { if_block1.p(ctx2, dirty); } else { - if_block1 = create_if_block_52(ctx2); + if_block1 = create_if_block_62(ctx2); if_block1.c(); if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); } @@ -19114,7 +19434,7 @@ } }; } - function create_if_block_62(ctx) { + function create_if_block_72(ctx) { let span; let t_value = ctx[6].herror + ""; let t; @@ -19122,7 +19442,7 @@ c() { span = element("span"); t = text(t_value); - attr(span, "class", "error svelte-1epvqgf"); + attr(span, "class", "error svelte-129vfxz"); }, m(target, anchor) { insert(target, span, anchor); @@ -19138,7 +19458,7 @@ } }; } - function create_if_block_52(ctx) { + function create_if_block_62(ctx) { let label0; let t0; let input0; @@ -19153,18 +19473,18 @@ label0 = element("label"); t0 = text("Auto-embed "); input0 = element("input"); - t1 = text("\n random files"); + t1 = text("\n random files"); t2 = space(); label1 = element("label"); input1 = element("input"); set_style(input0, "width", "5ch"); attr(input0, "type", "number"); - attr(input0, "class", "svelte-1epvqgf"); - attr(label0, "class", "svelte-1epvqgf"); + attr(input0, "class", "svelte-129vfxz"); + attr(label0, "class", "svelte-129vfxz"); attr(input1, "placeholder", "Restrict to these tags (space to separate tags, _ to separate words)"); attr(input1, "type", "text"); - attr(input1, "class", "svelte-1epvqgf"); - attr(label1, "class", "svelte-1epvqgf"); + attr(input1, "class", "svelte-129vfxz"); + attr(label1, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, label0, anchor); @@ -19178,8 +19498,8 @@ set_input_value(input1, ctx[5].auto_tags); if (!mounted) { dispose = [ - listen(input0, "input", ctx[32]), - listen(input1, "input", ctx[33]) + listen(input0, "input", ctx[33]), + listen(input1, "input", ctx[34]) ]; mounted = true; } @@ -19270,74 +19590,74 @@ let if_block1_anchor; let mounted; let dispose; - let if_block0 = ctx[5].eye && create_if_block_72(ctx); - let if_block1 = ctx[5].hyd && create_if_block_42(ctx); + let if_block0 = ctx[5].eye && create_if_block_8(ctx); + let if_block1 = ctx[5].hyd && create_if_block_52(ctx); return { c() { label0 = element("label"); input0 = element("input"); - t0 = text("\n Try to load embeds from server cache"); + t0 = text("\n Try to load embeds from server cache"); t1 = space(); label1 = element("label"); input1 = element("input"); - t2 = text("\n Display view counts"); + t2 = text("\n Display view counts"); t3 = space(); label2 = element("label"); input2 = element("input"); - t4 = text("\n Check for new versions at startup."); + t4 = text("\n Check for new versions at startup."); t5 = space(); label3 = element("label"); input3 = element("input"); - t6 = text("\n Autoexpand Images on opening."); + t6 = text("\n Autoexpand Images on opening."); t7 = space(); label4 = element("label"); input4 = element("input"); - t8 = text("\n Autoexpand Videos on opening."); + t8 = text("\n Autoexpand Videos on opening."); t9 = space(); label5 = element("label"); input5 = element("input"); - t10 = text("\n Loop media content."); + t10 = text("\n Loop media content."); t11 = space(); label6 = element("label"); input6 = element("input"); - t12 = text("\n Disable hover preview."); + t12 = text("\n Disable hover preview."); t13 = space(); label7 = element("label"); input7 = element("input"); - t14 = text("\n Hide embedded content behind an eye."); + t14 = text("\n Hide embedded content behind an eye."); t15 = space(); if (if_block0) if_block0.c(); t16 = space(); label8 = element("label"); input8 = element("input"); - t17 = text("\n Preload external files."); + t17 = text("\n Preload external files."); t18 = space(); label9 = element("label"); input9 = element("input"); - t19 = text("\n Preload external files when they are in view."); + t19 = text("\n Preload external files when they are in view."); t20 = space(); label10 = element("label"); input10 = element("input"); - t21 = text("\n Hotlink content."); + t21 = text("\n Hotlink content."); t22 = space(); label11 = element("label"); input11 = element("input"); - t23 = text("\n Control audio on videos with mouse wheel."); + t23 = text("\n Control audio on videos with mouse wheel."); t24 = space(); label12 = element("label"); input12 = element("input"); - t25 = text("\n Show Minimap"); + t25 = text("\n Show Minimap"); t26 = space(); label13 = element("label"); input13 = element("input"); - t27 = text("\n \n Disable embedded file preloading"); + t27 = text("\n \n Disable embedded file preloading"); a = element("a"); a.textContent = "?"; t29 = space(); label14 = element("label"); input14 = element("input"); - t30 = text("\n \n Enable Hydrus Integration"); + t30 = text("\n \n Enable Hydrus Integration"); t31 = space(); if (if_block1) if_block1.c(); @@ -19444,21 +19764,21 @@ insert(target, if_block1_anchor, anchor); if (!mounted) { dispose = [ - listen(input0, "change", ctx[15]), - listen(input1, "change", ctx[16]), - listen(input2, "change", ctx[17]), - listen(input3, "change", ctx[18]), - listen(input4, "change", ctx[19]), - listen(input5, "change", ctx[20]), - listen(input6, "change", ctx[21]), - listen(input7, "change", ctx[22]), - listen(input8, "change", ctx[24]), - listen(input9, "change", ctx[25]), - listen(input10, "change", ctx[26]), - listen(input11, "change", ctx[27]), - listen(input12, "change", ctx[28]), - listen(input13, "change", ctx[29]), - listen(input14, "change", ctx[30]) + listen(input0, "change", ctx[16]), + listen(input1, "change", ctx[17]), + listen(input2, "change", ctx[18]), + listen(input3, "change", ctx[19]), + listen(input4, "change", ctx[20]), + listen(input5, "change", ctx[21]), + listen(input6, "change", ctx[22]), + listen(input7, "change", ctx[23]), + listen(input8, "change", ctx[25]), + listen(input9, "change", ctx[26]), + listen(input10, "change", ctx[27]), + listen(input11, "change", ctx[28]), + listen(input12, "change", ctx[29]), + listen(input13, "change", ctx[30]), + listen(input14, "change", ctx[31]) ]; mounted = true; } @@ -19492,7 +19812,7 @@ if (if_block0) { if_block0.p(ctx2, dirty); } else { - if_block0 = create_if_block_72(ctx2); + if_block0 = create_if_block_8(ctx2); if_block0.c(); if_block0.m(t16.parentNode, t16); } @@ -19525,7 +19845,7 @@ if (if_block1) { if_block1.p(ctx2, dirty); } else { - if_block1 = create_if_block_42(ctx2); + if_block1 = create_if_block_52(ctx2); if_block1.c(); if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); } @@ -19608,7 +19928,7 @@ } }; } - function create_if_block_22(ctx) { + function create_if_block_32(ctx) { let label; let input0; let t0; @@ -19632,7 +19952,7 @@ let current; let mounted; let dispose; - let if_block = ctx[5].phash && create_if_block_32(ctx); + let if_block = ctx[5].phash && create_if_block_42(ctx); let each_value_3 = ctx[5].rsources; let each_blocks_1 = []; for (let i = 0; i < each_value_3.length; i += 1) { @@ -19646,7 +19966,7 @@ $$scope: { ctx } }; dialog = new Dialog_default({ props: dialog_props }); - ctx[45](dialog); + ctx[46](dialog); let each_value_2 = ctx[5].blacklist; let each_blocks = []; for (let i = 0; i < each_value_2.length; i += 1) { @@ -19659,7 +19979,7 @@ c() { label = element("label"); input0 = element("input"); - t0 = text("\n Enable perceptual hash-based filtering"); + t0 = text("\n Enable perceptual hash-based filtering"); t1 = space(); if (if_block) if_block.c(); @@ -19689,9 +20009,9 @@ t12 = space(); input1 = element("input"); attr(input0, "type", "checkbox"); - attr(div0, "class", "tagcont svelte-1epvqgf"); - attr(hr, "class", "svelte-1epvqgf"); - attr(div1, "class", "tagcont svelte-1epvqgf"); + attr(div0, "class", "tagcont svelte-129vfxz"); + attr(hr, "class", "svelte-129vfxz"); + attr(div1, "class", "tagcont svelte-129vfxz"); attr(input1, "placeholder", "Press enter after typing your tag"); }, m(target, anchor) { @@ -19727,9 +20047,9 @@ current = true; if (!mounted) { dispose = [ - listen(input0, "change", ctx[35]), - listen(button, "click", ctx[40]), - listen(input1, "keydown", ctx[47]) + listen(input0, "change", ctx[36]), + listen(button, "click", ctx[41]), + listen(input1, "keydown", ctx[48]) ]; mounted = true; } @@ -19742,7 +20062,7 @@ if (if_block) { if_block.p(ctx2, dirty); } else { - if_block = create_if_block_32(ctx2); + if_block = create_if_block_42(ctx2); if_block.c(); if_block.m(t2.parentNode, t2); } @@ -19772,7 +20092,7 @@ check_outros(); } const dialog_changes = {}; - if (dirty[0] & 1 | dirty[2] & 1) { + if (dirty[0] & 1 | dirty[2] & 2) { dialog_changes.$$scope = { dirty, ctx: ctx2 }; } dialog.$set(dialog_changes); @@ -19844,7 +20164,7 @@ detach(button); if (detaching) detach(t7); - ctx[45](null); + ctx[46](null); destroy_component(dialog, detaching); if (detaching) detach(t8); @@ -19868,7 +20188,7 @@ } }; } - function create_if_block_32(ctx) { + function create_if_block_42(ctx) { let label; let input; let t0; @@ -19879,13 +20199,13 @@ c() { label = element("label"); input = element("input"); - t0 = text("\n Minimum distance required (5 recommended)\n \n "); + t0 = text("\n Minimum distance required (5 recommended)\n \n "); a = element("a"); a.textContent = "?"; attr(input, "type", "number"); - attr(input, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); attr(a, "title", "Higher will filter more potentially different images, lower will let more identical images through"); - attr(label, "class", "svelte-1epvqgf"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, label, anchor); @@ -19894,7 +20214,7 @@ append(label, t0); append(label, a); if (!mounted) { - dispose = listen(input, "input", ctx[36]); + dispose = listen(input, "input", ctx[37]); mounted = true; } }, @@ -19915,17 +20235,17 @@ let tag; let current; function func(...args) { - return ctx[37](ctx[60], ...args); + return ctx[38](ctx[61], ...args); } function remove_handler() { - return ctx[38](ctx[60]); + return ctx[39](ctx[61]); } function toggle_handler() { - return ctx[39](ctx[60]); + return ctx[40](ctx[61]); } tag = new Tag_default({ props: { - tag: ctx[60].name, + tag: ctx[61].name, toggleable: true, toggled: !ctx[5].rsources.find(func)?.disabled } @@ -19944,7 +20264,7 @@ ctx = new_ctx; const tag_changes = {}; if (dirty[0] & 32) - tag_changes.tag = ctx[60].name; + tag_changes.tag = ctx[61].name; if (dirty[0] & 32) tag_changes.toggled = !ctx[5].rsources.find(func)?.disabled; tag.$set(tag_changes); @@ -19989,40 +20309,40 @@ c() { div = element("div"); label0 = element("label"); - t0 = text("Name\n "); + t0 = text("Name\n "); input0 = element("input"); t1 = space(); label1 = element("label"); - t2 = text("Domain\n "); + t2 = text("Domain\n "); input1 = element("input"); t3 = space(); label2 = element("label"); - t4 = text("API Endpoint\n "); + t4 = text("API Endpoint\n "); input2 = element("input"); t5 = space(); label3 = element("label"); - t6 = text("Post page prefix (for sources)\n "); + t6 = text("Post page prefix (for sources)\n "); input3 = element("input"); t7 = space(); button = element("button"); button.textContent = "Add"; attr(input0, "type", "text"); attr(input0, "placeholder", "Gelbooru"); - attr(input0, "class", "svelte-1epvqgf"); - attr(label0, "class", "svelte-1epvqgf"); + attr(input0, "class", "svelte-129vfxz"); + attr(label0, "class", "svelte-129vfxz"); attr(input1, "type", "text"); attr(input1, "placeholder", "gelbooru.com"); - attr(input1, "class", "svelte-1epvqgf"); - attr(label1, "class", "svelte-1epvqgf"); + attr(input1, "class", "svelte-129vfxz"); + attr(label1, "class", "svelte-129vfxz"); attr(input2, "type", "text"); attr(input2, "placeholder", "/post.json?tags=md5:"); - attr(input2, "class", "svelte-1epvqgf"); - attr(label2, "class", "svelte-1epvqgf"); + attr(input2, "class", "svelte-129vfxz"); + attr(label2, "class", "svelte-129vfxz"); attr(input3, "type", "text"); attr(input3, "placeholder", "https://yande.re/post/show/"); - attr(input3, "class", "svelte-1epvqgf"); - attr(label3, "class", "svelte-1epvqgf"); - attr(div, "class", "form svelte-1epvqgf"); + attr(input3, "class", "svelte-129vfxz"); + attr(label3, "class", "svelte-129vfxz"); + attr(div, "class", "form svelte-129vfxz"); }, m(target, anchor) { insert(target, div, anchor); @@ -20049,10 +20369,10 @@ append(div, button); if (!mounted) { dispose = [ - listen(input0, "input", ctx[41]), - listen(input1, "input", ctx[42]), - listen(input2, "input", ctx[43]), - listen(input3, "input", ctx[44]), + listen(input0, "input", ctx[42]), + listen(input1, "input", ctx[43]), + listen(input2, "input", ctx[44]), + listen(input3, "input", ctx[45]), listen(button, "click", ctx[8]) ]; mounted = true; @@ -20084,9 +20404,9 @@ let tag; let current; function toggle_handler_1() { - return ctx[46](ctx[58]); + return ctx[47](ctx[59]); } - tag = new Tag_default({ props: { tag: ctx[58] } }); + tag = new Tag_default({ props: { tag: ctx[59] } }); tag.$on("toggle", toggle_handler_1); return { c() { @@ -20100,7 +20420,7 @@ ctx = new_ctx; const tag_changes = {}; if (dirty[0] & 32) - tag_changes.tag = ctx[58]; + tag_changes.tag = ctx[59]; tag.$set(tag_changes); }, i(local) { @@ -20127,12 +20447,12 @@ let current; let mounted; let dispose; - let if_block = !ctx[5].te && create_if_block_22(ctx); + let if_block = !ctx[5].te && create_if_block_32(ctx); return { c() { label = element("label"); input = element("input"); - t0 = text("\n Disable third-eye."); + t0 = text("\n Disable third-eye."); t1 = space(); if (if_block) if_block.c(); @@ -20150,7 +20470,7 @@ insert(target, if_block_anchor, anchor); current = true; if (!mounted) { - dispose = listen(input, "change", ctx[34]); + dispose = listen(input, "change", ctx[35]); mounted = true; } }, @@ -20165,7 +20485,7 @@ transition_in(if_block, 1); } } else { - if_block = create_if_block_22(ctx2); + if_block = create_if_block_32(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -20204,14 +20524,14 @@ } function create_each_block_12(ctx) { let option; - let t_value = ctx[55].domain + ""; + let t_value = ctx[56].domain + ""; let t; let option_value_value; return { c() { option = element("option"); t = text(t_value); - option.__value = option_value_value = ctx[57]; + option.__value = option_value_value = ctx[58]; option.value = option.__value; }, m(target, anchor) { @@ -20251,13 +20571,13 @@ } t2 = space(); label = element("label"); - t3 = text("Maximum number of embedded links to display\n "); + t3 = text("Maximum number of embedded links to display\n "); input = element("input"); if (ctx[5].fhost === void 0) - add_render_callback(() => ctx[48].call(select)); + add_render_callback(() => ctx[49].call(select)); attr(input, "type", "number"); - attr(input, "class", "svelte-1epvqgf"); - attr(label, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, p, anchor); @@ -20274,8 +20594,8 @@ set_input_value(input, ctx[5].maxe); if (!mounted) { dispose = [ - listen(select, "change", ctx[48]), - listen(input, "input", ctx[49]) + listen(select, "change", ctx[49]), + listen(input, "input", ctx[50]) ]; mounted = true; } @@ -20340,8 +20660,10 @@ } }; } - function create_if_block_12(ctx) { + function create_if_block_22(ctx) { let div; + let p; + let t1; let each_value = ctx[4]; let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { @@ -20350,13 +20672,18 @@ return { c() { div = element("div"); + p = element("p"); + p.textContent = "Format is (embedded links / link in filename)"; + t1 = space(); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - attr(div, "class", "bepis svelte-1epvqgf"); + attr(div, "class", "bepis svelte-129vfxz"); }, m(target, anchor) { insert(target, div, anchor); + append(div, p); + append(div, t1); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(div, null); } @@ -20392,23 +20719,28 @@ let div; let a; let t0; - let t1_value = ctx[52].id + ""; + let t1_value = ctx[53].id + ""; let t1; let a_href_value; let t2; - let t3_value = ctx[52].cnt + ""; + let t3_value = ctx[53].pees + ""; let t3; let t4; + let t5_value = ctx[53].eyes + ctx[53].other + ""; + let t5; + let t6; return { c() { div = element("div"); a = element("a"); t0 = text(">>"); t1 = text(t1_value); - t2 = text("\n ("); + t2 = text("\n ("); t3 = text(t3_value); - t4 = text(" embeds)\n "); - attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[11] + "/thread/" + ctx[52].id); + t4 = text(" / "); + t5 = text(t5_value); + t6 = text(")\n "); + attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[11] + "/thread/" + ctx[53].id); attr(div, "class", "mbepis"); }, m(target, anchor) { @@ -20419,15 +20751,19 @@ append(div, t2); append(div, t3); append(div, t4); + append(div, t5); + append(div, t6); }, p(ctx2, dirty) { - if (dirty[0] & 16 && t1_value !== (t1_value = ctx2[52].id + "")) + if (dirty[0] & 16 && t1_value !== (t1_value = ctx2[53].id + "")) set_data(t1, t1_value); - if (dirty[0] & 16 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[11] + "/thread/" + ctx2[52].id)) { + if (dirty[0] & 16 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[11] + "/thread/" + ctx2[53].id)) { attr(a, "href", a_href_value); } - if (dirty[0] & 16 && t3_value !== (t3_value = ctx2[52].cnt + "")) + if (dirty[0] & 16 && t3_value !== (t3_value = ctx2[53].pees + "")) set_data(t3, t3_value); + if (dirty[0] & 16 && t5_value !== (t5_value = ctx2[53].eyes + ctx2[53].other + "")) + set_data(t5, t5_value); }, d(detaching) { if (detaching) @@ -20442,15 +20778,12 @@ let a; let t2; let t3; - let button; - let t4; - let t5; let if_block_anchor; let mounted; let dispose; function select_block_type(ctx2, dirty) { if (!ctx2[3]) - return create_if_block_12; + return create_if_block_22; return create_else_block2; } let current_block_type = select_block_type(ctx, [-1, -1, -1]); @@ -20459,19 +20792,15 @@ c() { label = element("label"); input = element("input"); - t0 = text("\n \n Contribute to help keep this list up to date. ["); + t0 = text("\n \n Contribute to help keep this list up to date. ["); a = element("a"); a.textContent = "?"; t2 = text("]"); t3 = space(); - button = element("button"); - t4 = text("Refresh"); - t5 = space(); if_block.c(); if_block_anchor = empty(); attr(input, "type", "checkbox"); attr(a, "title", "This will make PEE automatically send the\n post number of posts you find with embedded content"); - button.disabled = ctx[3]; }, m(target, anchor) { insert(target, label, anchor); @@ -20481,16 +20810,10 @@ append(label, a); append(label, t2); insert(target, t3, anchor); - insert(target, button, anchor); - append(button, t4); - insert(target, t5, anchor); if_block.m(target, anchor); insert(target, if_block_anchor, anchor); if (!mounted) { - dispose = [ - listen(input, "change", ctx[50]), - listen(button, "click", ctx[12]) - ]; + dispose = listen(input, "change", ctx[51]); mounted = true; } }, @@ -20498,9 +20821,6 @@ if (dirty[0] & 32) { input.checked = ctx2[5].tm; } - if (dirty[0] & 8) { - button.disabled = ctx2[3]; - } if (current_block_type === (current_block_type = select_block_type(ctx2, dirty)) && if_block) { if_block.p(ctx2, dirty); } else { @@ -20517,19 +20837,15 @@ detach(label); if (detaching) detach(t3); - if (detaching) - detach(button); - if (detaching) - detach(t5); if_block.d(detaching); if (detaching) detach(if_block_anchor); mounted = false; - run_all(dispose); + dispose(); } }; } - function create_if_block6(ctx) { + function create_if_block_12(ctx) { let tabpanel; let current; tabpanel = new TabPanel_default({ @@ -20631,7 +20947,7 @@ $$scope: { ctx } } }); - let if_block = ctx[6].akValid && create_if_block6(ctx); + let if_block = ctx[6].akValid && create_if_block_12(ctx); return { c() { create_component(tablist.$$.fragment); @@ -20666,27 +20982,27 @@ }, p(ctx2, dirty) { const tablist_changes = {}; - if (dirty[0] & 64 | dirty[2] & 1) { + if (dirty[0] & 64 | dirty[2] & 2) { tablist_changes.$$scope = { dirty, ctx: ctx2 }; } tablist.$set(tablist_changes); const tabpanel0_changes = {}; - if (dirty[0] & 224 | dirty[2] & 1) { + if (dirty[0] & 224 | dirty[2] & 2) { tabpanel0_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel0.$set(tabpanel0_changes); const tabpanel1_changes = {}; - if (dirty[0] & 35 | dirty[2] & 1) { + if (dirty[0] & 35 | dirty[2] & 2) { tabpanel1_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel1.$set(tabpanel1_changes); const tabpanel2_changes = {}; - if (dirty[0] & 32 | dirty[2] & 1) { + if (dirty[0] & 32 | dirty[2] & 2) { tabpanel2_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel2.$set(tabpanel2_changes); const tabpanel3_changes = {}; - if (dirty[0] & 56 | dirty[2] & 1) { + if (dirty[0] & 56 | dirty[2] & 2) { tabpanel3_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel3.$set(tabpanel3_changes); @@ -20696,7 +21012,7 @@ transition_in(if_block, 1); } } else { - if_block = create_if_block6(ctx2); + if_block = create_if_block_12(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -20753,74 +21069,57 @@ }; } function create_fragment9(ctx) { - let div1; - let div0; - let h1; - let t1; - let hr; - let t2; - let tabs; + let if_block_anchor; let current; - tabs = new Tabs_default({ - props: { - $$slots: { default: [create_default_slot] }, - $$scope: { ctx } - } - }); + let if_block = ctx[2] && create_if_block6(ctx); return { c() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - h1.textContent = "PEE Settings"; - t1 = space(); - hr = element("hr"); - t2 = space(); - create_component(tabs.$$.fragment); - attr(h1, "class", "svelte-1epvqgf"); - attr(hr, "class", "svelte-1epvqgf"); - attr(div0, "class", "content svelte-1epvqgf"); - attr(div1, "class", "backpanel svelte-1epvqgf"); - toggle_class(div1, "enabled", ctx[2]); - toggle_class(div1, "disabled", !ctx[2]); + if (if_block) + if_block.c(); + if_block_anchor = empty(); }, m(target, anchor) { - insert(target, div1, anchor); - append(div1, div0); - append(div0, h1); - append(div0, t1); - append(div0, hr); - append(div0, t2); - mount_component(tabs, div0, null); + if (if_block) + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); current = true; }, p(ctx2, dirty) { - const tabs_changes = {}; - if (dirty[0] & 251 | dirty[2] & 1) { - tabs_changes.$$scope = { dirty, ctx: ctx2 }; - } - tabs.$set(tabs_changes); - if (dirty[0] & 4) { - toggle_class(div1, "enabled", ctx2[2]); - } - if (dirty[0] & 4) { - toggle_class(div1, "disabled", !ctx2[2]); + if (ctx2[2]) { + if (if_block) { + if_block.p(ctx2, dirty); + if (dirty[0] & 4) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block6(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); } }, i(local) { if (current) return; - transition_in(tabs.$$.fragment, local); + transition_in(if_block); current = true; }, o(local) { - transition_out(tabs.$$.fragment, local); + transition_out(if_block); current = false; }, d(detaching) { + if (if_block) + if_block.d(detaching); if (detaching) - detach(div1); - destroy_component(tabs); + detach(if_block_anchor); } }; } @@ -20885,6 +21184,7 @@ cached.subscribe((v) => { set_store_value(settings, $settings.cache = v, $settings); }); + const select_handler = () => updateThreads(); function input0_change_handler() { $cached = this.checked; cached.set($cached); @@ -21037,6 +21337,7 @@ updateThreads, toggleBooru, cached, + select_handler, input0_change_handler, input1_change_handler, input2_change_handler, @@ -21784,7 +22085,7 @@ }; } function instance13($$self, $$props, $$invalidate) { - const dispatch = createEventDispatcher(); + const dispatch2 = createEventDispatcher(); let { files } = $$props; let { id = "" } = $$props; let children2 = {}; @@ -21807,7 +22108,7 @@ if ("id" in $$props2) $$invalidate(1, id = $$props2.id); }; - return [files, id, children2, dispatch, bepis, embedding_binding, fileinfo_handler]; + return [files, id, children2, dispatch2, bepis, embedding_binding, fileinfo_handler]; } var Embeddings = class extends SvelteComponent { constructor(options) { @@ -23709,12 +24010,11 @@ appState.subscribe((v) => { cappState = v; }); - var processImage = async (srcs, fn, hex, prevurl, onfound) => { + var processImage = async (srcs, fn, hex, prevurl) => { const ret = await Promise.all(processors.filter((e) => e.match(fn)).map(async (proc) => { if (proc.skip) { const md5 = import_buffer11.Buffer.from(hex, "base64"); if (await proc.has_embed(md5, fn, prevurl) === true) { - onfound(); return [await proc.extract(md5, fn), true]; } return; @@ -23747,7 +24047,6 @@ if (found === false) { return; } - onfound(); return [await proc.extract(cumul), false]; } catch { } @@ -23790,26 +24089,28 @@ if (!thumbLink) return; let res2 = void 0; + const reportEmbed = () => { + if (csettings5.tm) { + if (["boards.4chan.org", "boards.4channel.org"].includes(location.host)) { + if (!cappState.isCatalog) { + const op = +location.pathname.match(/\/thread\/(.*)/)[1]; + pendingPosts.push({ id: +post.id.match(/([0-9]+)/)[1], op }); + signalNewEmbeds(); + } + } + } + }; if (shouldUseCache()) { res2 = await getEmbedsFromCache(qp.getCurrentBoard(), +qp.getCurrentThread(), post.id); } if (!res2) { - res2 = await processImage(origlink, qp.getFilename(post), qp.getMD5(post), thumbLink, () => { - if (csettings5.tm) { - if (["boards.4chan.org", "boards.4channel.org"].includes(location.host)) { - if (!cappState.isCatalog) { - const op = +location.pathname.match(/\/thread\/(.*)/)[1]; - pendingPosts.push({ id: +post.id.match(/([0-9]+)/)[1], op }); - signalNewEmbeds(); - } - } - } - post.querySelector(".post")?.classList.add("embedfound"); - }); + res2 = await processImage(origlink, qp.getFilename(post), qp.getMD5(post), thumbLink); res2 = res2?.filter((e) => e); } if (!res2 || res2.length == 0) return; + reportEmbed(); + post.querySelector(".post")?.classList.add("embedfound"); processAttachments(post, res2?.flatMap((e) => e[0].map((k) => [k, e[1]]))); }; var versionCheck = async () => { @@ -24253,5 +24554,19 @@ * @author Feross Aboukhadijeh * @license MIT */ +/*! ***************************************************************************** +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. +***************************************************************************** */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ diff --git a/firefox/manifest.json b/firefox/manifest.json index 53df449..aff2117 100644 --- a/firefox/manifest.json +++ b/firefox/manifest.json @@ -7,7 +7,7 @@ }, "name": "PngExtraEmbedder", "description": "Discover embedded files on 4chan and archives!", - "version": "0.235", + "version": "0.241", "icons": { "64": "1449696017588.png" }, diff --git a/firefox_update.json b/firefox_update.json index 79f7d5f..10304fb 100644 --- a/firefox_update.json +++ b/firefox_update.json @@ -1 +1 @@ -{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.235","update_link":"https://github.com/coomdev/pngextraembedder/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pee-firefox.zip"}]}}} \ No newline at end of file +{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.241","update_link":"https://github.com/coomdev/pngextraembedder/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pee-firefox.zip"}]}}} \ No newline at end of file diff --git a/main.meta.js b/main.meta.js index 3c70720..5649d20 100644 --- a/main.meta.js +++ b/main.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed // @namespace https://coom.tech/ -// @version 0.233 +// @version 0.241 // @description uhh // @author You // @match https://boards.4channel.org/* diff --git a/main.user.js b/main.user.js index 602dccb..3c0145f 100644 --- a/main.user.js +++ b/main.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed // @namespace https://coom.tech/ -// @version 0.233 +// @version 0.241 // @description uhh // @author You // @match https://boards.4channel.org/* @@ -89,7 +89,7 @@ const _DOMParser = DOMParser; var define_BUILD_VERSION_default; var init_define_BUILD_VERSION = __esm({ ""() { - define_BUILD_VERSION_default = [0, 233]; + define_BUILD_VERSION_default = [0, 241]; } }); @@ -4069,18 +4069,18 @@ const _DOMParser = DOMParser; }); } var lastPromise = this[kLastPromise]; - var promise; + var promise2; if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); + promise2 = new Promise(wrapForNext(lastPromise, this)); } else { var data = this[kStream].read(); if (data !== null) { return Promise.resolve(createIterResult(data, false)); } - promise = new Promise(this[kHandlePromise]); + promise2 = new Promise(this[kHandlePromise]); } - this[kLastPromise] = promise; - return promise; + this[kLastPromise] = promise2; + return promise2; } }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { return this; @@ -12689,6 +12689,7 @@ const _DOMParser = DOMParser; init_esbuild_inject(); function noop() { } + var identity = (x) => x; function assign(tar, src) { for (const k in src) tar[k] = src[k]; @@ -12781,6 +12782,33 @@ const _DOMParser = DOMParser; store.set(value); return ret; } + var is_client = typeof window !== "undefined"; + var now = is_client ? () => window.performance.now() : () => Date.now(); + var raf = is_client ? (cb) => requestAnimationFrame(cb) : noop; + var tasks = /* @__PURE__ */ new Set(); + function run_tasks(now2) { + tasks.forEach((task) => { + if (!task.c(now2)) { + tasks.delete(task); + task.f(); + } + }); + if (tasks.size !== 0) + raf(run_tasks); + } + function loop(callback) { + let task; + if (tasks.size === 0) + raf(run_tasks); + return { + promise: new Promise((fulfill) => { + tasks.add(task = { c: callback, f: fulfill }); + }), + abort() { + tasks.delete(task); + } + }; + } var is_hydrating = false; function start_hydrating() { is_hydrating = true; @@ -12809,6 +12837,11 @@ const _DOMParser = DOMParser; } return node.ownerDocument; } + function append_empty_stylesheet(node) { + const style_element = element("style"); + append_stylesheet(get_root_for_style(node), style_element); + return style_element; + } function append_stylesheet(node, style) { append(node.head || node, style); } @@ -12918,6 +12951,64 @@ const _DOMParser = DOMParser; this.n.forEach(detach); } }; + var active_docs = /* @__PURE__ */ new Set(); + var active = 0; + function hash(str) { + let hash2 = 5381; + let i = str.length; + while (i--) + hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i); + return hash2 >>> 0; + } + function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { + const step = 16.666 / duration; + let keyframes = "{\n"; + for (let p = 0; p <= 1; p += step) { + const t = a + (b - a) * ease(p); + keyframes += p * 100 + `%{${fn(t, 1 - t)}} +`; + } + const rule = keyframes + `100% {${fn(b, 1 - b)}} +}`; + const name = `__svelte_${hash(rule)}_${uid}`; + const doc = get_root_for_style(node); + active_docs.add(doc); + const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet); + const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {}); + if (!current_rules[name]) { + current_rules[name] = true; + stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); + } + const animation = node.style.animation || ""; + node.style.animation = `${animation ? `${animation}, ` : ""}${name} ${duration}ms linear ${delay}ms 1 both`; + active += 1; + return name; + } + function delete_rule(node, name) { + const previous = (node.style.animation || "").split(", "); + const next = previous.filter(name ? (anim) => anim.indexOf(name) < 0 : (anim) => anim.indexOf("__svelte") === -1); + const deleted = previous.length - next.length; + if (deleted) { + node.style.animation = next.join(", "); + active -= deleted; + if (!active) + clear_rules(); + } + } + function clear_rules() { + raf(() => { + if (active) + return; + active_docs.forEach((doc) => { + const stylesheet = doc.__svelte_stylesheet; + let i = stylesheet.cssRules.length; + while (i--) + stylesheet.deleteRule(i); + doc.__svelte_rules = {}; + }); + active_docs.clear(); + }); + } var current_component; function set_current_component(component) { current_component = component; @@ -13017,6 +13108,19 @@ const _DOMParser = DOMParser; $$.after_update.forEach(add_render_callback); } } + var promise; + function wait() { + if (!promise) { + promise = Promise.resolve(); + promise.then(() => { + promise = null; + }); + } + return promise; + } + function dispatch(node, direction, kind) { + node.dispatchEvent(custom_event(`${direction ? "intro" : "outro"}${kind}`)); + } var outroing = /* @__PURE__ */ new Set(); var outros; function group_outros() { @@ -13054,6 +13158,101 @@ const _DOMParser = DOMParser; block.o(local); } } + var null_transition = { duration: 0 }; + function create_bidirectional_transition(node, fn, params, intro) { + let config = fn(node, params); + let t = intro ? 0 : 1; + let running_program = null; + let pending_program = null; + let animation_name = null; + function clear_animation() { + if (animation_name) + delete_rule(node, animation_name); + } + function init4(program, duration) { + const d = program.b - t; + duration *= Math.abs(d); + return { + a: t, + b: program.b, + d, + duration, + start: program.start, + end: program.start + duration, + group: program.group + }; + } + function go(b) { + const { delay = 0, duration = 300, easing = identity, tick: tick2 = noop, css } = config || null_transition; + const program = { + start: now() + delay, + b + }; + if (!b) { + program.group = outros; + outros.r += 1; + } + if (running_program || pending_program) { + pending_program = program; + } else { + if (css) { + clear_animation(); + animation_name = create_rule(node, t, b, duration, delay, easing, css); + } + if (b) + tick2(0, 1); + running_program = init4(program, duration); + add_render_callback(() => dispatch(node, b, "start")); + loop((now2) => { + if (pending_program && now2 > pending_program.start) { + running_program = init4(pending_program, duration); + pending_program = null; + dispatch(node, running_program.b, "start"); + if (css) { + clear_animation(); + animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css); + } + } + if (running_program) { + if (now2 >= running_program.end) { + tick2(t = running_program.b, 1 - t); + dispatch(node, running_program.b, "end"); + if (!pending_program) { + if (running_program.b) { + clear_animation(); + } else { + if (!--running_program.group.r) + run_all(running_program.group.c); + } + } + running_program = null; + } else if (now2 >= running_program.start) { + const p = now2 - running_program.start; + t = running_program.a + running_program.d * easing(p / running_program.duration); + tick2(t, 1 - t); + } + } + return !!(running_program || pending_program); + }); + } + } + return { + run(b) { + if (is_function(config)) { + wait().then(() => { + config = config(); + go(b); + }); + } else { + go(b); + } + }, + end() { + clear_animation(); + running_program = pending_program = null; + } + }; + } var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : window; function destroy_block(block, lookup) { block.d(1); @@ -13427,13 +13626,13 @@ const _DOMParser = DOMParser; init_esbuild_inject(); var nativeMax = Math.max; var nativeMin = Math.min; - function debounce(func, wait, options) { + function debounce(func, wait2, options) { let lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; - wait = Number(wait) || 0; + wait2 = Number(wait2) || 0; if (typeof options === "object") { leading = !!options.leading; maxing = "maxWait" in options; - maxWait = maxing ? nativeMax(Number(options.maxWait) || 0, wait) : maxWait; + maxWait = maxing ? nativeMax(Number(options.maxWait) || 0, wait2) : maxWait; trailing = "trailing" in options ? !!options.trailing : trailing; } function invokeFunc(time) { @@ -13445,17 +13644,17 @@ const _DOMParser = DOMParser; } function leadingEdge(time) { lastInvokeTime = time; - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); return leading ? invokeFunc(time) : result; } function remainingWait(time) { - const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall; + const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait2 - timeSinceLastCall; console.log("remainingWait"); return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2; } function shouldInvoke(time) { const timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; - return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + return lastCallTime === void 0 || timeSinceLastCall >= wait2 || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { const time = Date.now(); @@ -13492,12 +13691,12 @@ const _DOMParser = DOMParser; return leadingEdge(lastCallTime); } if (maxing) { - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); return invokeFunc(lastCallTime); } } if (timerId === void 0) { - timerId = setTimeout(timerExpired, wait); + timerId = setTimeout(timerExpired, wait2); } return result; } @@ -15706,8 +15905,6 @@ const _DOMParser = DOMParser; }); var generateThumbnail = async (f) => { const can = document.createElement("canvas"); - can.width = 125; - can.height = 125; const [sw, sh] = [125, 125]; const url = URL.createObjectURL(f); let source; @@ -15739,7 +15936,7 @@ const _DOMParser = DOMParser; if (!ctx) return import_buffer2.Buffer.alloc(0); ctx.drawImage(source, 0, 0, dims[0], dims[1]); - const blob = await new Promise((_) => can.toBlob(_, "image/jpg")); + const blob = await new Promise((_) => can.toBlob(_)); if (!blob) return import_buffer2.Buffer.alloc(0); return import_buffer2.Buffer.from(await blob.arrayBuffer()); @@ -15790,7 +15987,7 @@ const _DOMParser = DOMParser; const target = +pid.slice(pid.match(/\d/).index); const cachedData = cthreadDataCache[target]; if (!cachedData) - return []; + return; const ret = []; if ("pee" in cachedData.data) { const files = await decodeCoom3Payload(import_buffer2.Buffer.from(cachedData.data.pee.join(" "))); @@ -15835,7 +16032,7 @@ const _DOMParser = DOMParser; const { domain, file } = m.groups; const headers = await getHeaders(pee); const res = await ifetch(pee, { - headers: { range: "bytes=0-16383", "user-agent": "" }, + headers: { range: "bytes=0-32767", "user-agent": "" }, mode: "cors", referrerPolicy: "no-referrer" }); @@ -16686,6 +16883,37 @@ const _DOMParser = DOMParser; init_define_BUILD_VERSION(); init_esbuild_inject(); + // node_modules/svelte/transition/index.mjs + init_define_BUILD_VERSION(); + init_esbuild_inject(); + + // node_modules/svelte/easing/index.mjs + init_define_BUILD_VERSION(); + init_esbuild_inject(); + function cubicOut(t) { + const f = t - 1; + return f * f * f + 1; + } + + // node_modules/svelte/transition/index.mjs + function slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) { + const style = getComputedStyle(node); + const opacity = +style.opacity; + const height = parseFloat(style.height); + const padding_top = parseFloat(style.paddingTop); + const padding_bottom = parseFloat(style.paddingBottom); + const margin_top = parseFloat(style.marginTop); + const margin_bottom = parseFloat(style.marginBottom); + const border_top_width = parseFloat(style.borderTopWidth); + const border_bottom_width = parseFloat(style.borderBottomWidth); + return { + delay, + duration, + easing, + css: (t) => `overflow: hidden;opacity: ${Math.min(t * 20, 1) * opacity};height: ${t * height}px;padding-top: ${t * padding_top}px;padding-bottom: ${t * padding_bottom}px;margin-top: ${t * margin_top}px;margin-bottom: ${t * margin_bottom}px;border-top-width: ${t * border_top_width}px;border-bottom-width: ${t * border_bottom_width}px;` + }; + } + // src/Components/Dialog.svelte init_define_BUILD_VERSION(); init_esbuild_inject(); @@ -16936,9 +17164,9 @@ const _DOMParser = DOMParser; let { tag } = $$props; let { toggleable = false } = $$props; let { toggled = false } = $$props; - const dispatch = createEventDispatcher(); - const click_handler2 = (e) => (e.preventDefault(), dispatch("remove")); - const click_handler_1 = () => dispatch("toggle"); + const dispatch2 = createEventDispatcher(); + const click_handler2 = (e) => (e.preventDefault(), dispatch2("remove")); + const click_handler_1 = () => dispatch2("toggle"); $$self.$$set = ($$props2) => { if ("tag" in $$props2) $$invalidate(0, tag = $$props2.tag); @@ -16947,7 +17175,7 @@ const _DOMParser = DOMParser; if ("toggled" in $$props2) $$invalidate(2, toggled = $$props2.toggled); }; - return [tag, toggleable, toggled, dispatch, click_handler2, click_handler_1]; + return [tag, toggleable, toggled, dispatch2, click_handler2, click_handler_1]; } var Tag = class extends SvelteComponent { constructor(options) { @@ -17153,8 +17381,8 @@ const _DOMParser = DOMParser; let current; let mounted; let dispose; - const default_slot_template = ctx[5].default; - const default_slot = create_slot(default_slot_template, ctx, ctx[4], null); + const default_slot_template = ctx[6].default; + const default_slot = create_slot(default_slot_template, ctx, ctx[5], null); return { c() { button = element("button"); @@ -17170,14 +17398,14 @@ const _DOMParser = DOMParser; } current = true; if (!mounted) { - dispose = listen(button, "click", ctx[6]); + dispose = listen(button, "click", ctx[7]); mounted = true; } }, p(ctx2, [dirty]) { if (default_slot) { - if (default_slot.p && (!current || dirty & 16)) { - update_slot_base(default_slot, default_slot_template, ctx2, ctx2[4], !current ? get_all_dirty_from_scope(ctx2[4]) : get_slot_changes(default_slot_template, ctx2[4], dirty, null), null); + if (default_slot.p && (!current || dirty & 32)) { + update_slot_base(default_slot, default_slot_template, ctx2, ctx2[5], !current ? get_all_dirty_from_scope(ctx2[5]) : get_slot_changes(default_slot_template, ctx2[5], dirty, null), null); } } if (dirty & 3) { @@ -17210,13 +17438,26 @@ const _DOMParser = DOMParser; const tab = {}; const { registerTab, selectTab, selectedTab } = getContext(TABS); component_subscribe($$self, selectedTab, (value) => $$invalidate(0, $selectedTab = value)); + const dispatch2 = createEventDispatcher(); registerTab(tab); - const click_handler2 = () => selectTab(tab); + const click_handler2 = () => { + selectTab(tab); + dispatch2("select"); + }; $$self.$$set = ($$props2) => { if ("$$scope" in $$props2) - $$invalidate(4, $$scope = $$props2.$$scope); + $$invalidate(5, $$scope = $$props2.$$scope); }; - return [$selectedTab, tab, selectTab, selectedTab, $$scope, slots, click_handler2]; + return [ + $selectedTab, + tab, + selectTab, + selectedTab, + dispatch2, + $$scope, + slots, + click_handler2 + ]; } var Tab = class extends SvelteComponent { constructor(options) { @@ -17852,7 +18093,7 @@ const _DOMParser = DOMParser; let $appState; component_subscribe($$self, settings, ($$value) => $$invalidate(19, $settings = $$value)); component_subscribe($$self, appState, ($$value) => $$invalidate(38, $appState = $$value)); - const dispatch = createEventDispatcher(); + const dispatch2 = createEventDispatcher(); let { file } = $$props; let isVideo = false; let isImage = false; @@ -17910,7 +18151,7 @@ const _DOMParser = DOMParser; $$invalidate(4, isAudio = type.mime.startsWith("audio/")); $$invalidate(3, isImage = type.mime.startsWith("image/")); $$invalidate(5, isText = type.mime.startsWith("text/plain")); - dispatch("fileinfo", { type }); + dispatch2("fileinfo", { type }); if (isImage) { $$invalidate(7, contracted = !$settings.xpi); } @@ -17976,7 +18217,7 @@ const _DOMParser = DOMParser; $$invalidate(3, isImage = type.mime.startsWith("image/")); $$invalidate(5, isText = type.mime.startsWith("text/plain")); $$invalidate(17, unzipping = false); - dispatch("fileinfo", { type }); + dispatch2("fileinfo", { type }); if (hovering) { setTimeout(async () => { do { @@ -17988,7 +18229,7 @@ const _DOMParser = DOMParser; } let { inhibitExpand = false } = $$props; async function bepis(ev) { - dispatch("click"); + dispatch2("click"); if (inhibitExpand) return; if ($appState.isCatalog) @@ -18178,7 +18419,7 @@ const _DOMParser = DOMParser; hoverStop, hoverUpdate, adjustAudio, - dispatch, + dispatch2, isNotChrome, id, isContracted, @@ -18619,31 +18860,106 @@ const _DOMParser = DOMParser; // src/Components/App.svelte function add_css8(target) { - append_styles(target, "svelte-1epvqgf", '.bepis.svelte-1epvqgf.svelte-1epvqgf{max-height:260px;overflow-y:auto}.tagcont.svelte-1epvqgf.svelte-1epvqgf{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}label.svelte-1epvqgf>input[type="text"].svelte-1epvqgf,label.svelte-1epvqgf>input[type="number"].svelte-1epvqgf{width:95%}.enabled.svelte-1epvqgf.svelte-1epvqgf{display:block}.disabled.svelte-1epvqgf.svelte-1epvqgf{display:none}.content.svelte-1epvqgf.svelte-1epvqgf{display:flex;flex-direction:column}.error.svelte-1epvqgf.svelte-1epvqgf{color:red}hr.svelte-1epvqgf.svelte-1epvqgf{width:100%}h1.svelte-1epvqgf.svelte-1epvqgf{text-align:center}.form.svelte-1epvqgf.svelte-1epvqgf{display:flex;flex-direction:column;gap:20px;position:absolute;padding:15px;border:1px solid white;background-color:inherit;border-radius:10px}.form.svelte-1epvqgf>label.svelte-1epvqgf{display:flex;flex-direction:column;gap:10px}.backpanel.svelte-1epvqgf.svelte-1epvqgf{position:absolute;right:32px;padding:10px;width:15%;top:32px;border:1px solid;border-radius:5px;background-color:rgba(0, 0, 0, 0.2);pointer-events:all;backdrop-filter:blur(9px);max-height:80vh;min-width:321px}'); + append_styles(target, "svelte-129vfxz", '.bepis.svelte-129vfxz.svelte-129vfxz{max-height:260px;overflow-y:auto}.tagcont.svelte-129vfxz.svelte-129vfxz{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}label.svelte-129vfxz>input[type="text"].svelte-129vfxz,label.svelte-129vfxz>input[type="number"].svelte-129vfxz{width:95%}.content.svelte-129vfxz.svelte-129vfxz{display:flex;flex-direction:column}.error.svelte-129vfxz.svelte-129vfxz{color:red}hr.svelte-129vfxz.svelte-129vfxz{width:100%}h1.svelte-129vfxz.svelte-129vfxz{text-align:center}.form.svelte-129vfxz.svelte-129vfxz{display:flex;flex-direction:column;gap:20px;position:absolute;padding:15px;border:1px solid white;background-color:inherit;border-radius:10px}.form.svelte-129vfxz>label.svelte-129vfxz{display:flex;flex-direction:column;gap:10px}.backpanel.svelte-129vfxz.svelte-129vfxz{position:absolute;right:32px;padding:10px;width:15%;top:32px;border:1px solid;border-radius:5px;background-color:rgba(0, 0, 0, 0.8);pointer-events:all;backdrop-filter:blur(9px);max-height:80vh;min-width:321px}'); } function get_each_context2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[52] = list[i]; + child_ctx[53] = list[i]; return child_ctx; } function get_each_context_12(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[55] = list[i]; - child_ctx[57] = i; + child_ctx[56] = list[i]; + child_ctx[58] = i; return child_ctx; } function get_each_context_2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[58] = list[i]; - child_ctx[57] = i; + child_ctx[59] = list[i]; + child_ctx[58] = i; return child_ctx; } function get_each_context_3(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[60] = list[i]; - child_ctx[57] = i; + child_ctx[61] = list[i]; + child_ctx[58] = i; return child_ctx; } + function create_if_block6(ctx) { + let div1; + let div0; + let h1; + let t1; + let hr; + let t2; + let tabs; + let div1_transition; + let current; + tabs = new Tabs_default({ + props: { + $$slots: { default: [create_default_slot] }, + $$scope: { ctx } + } + }); + return { + c() { + div1 = element("div"); + div0 = element("div"); + h1 = element("h1"); + h1.textContent = "PEE Settings"; + t1 = space(); + hr = element("hr"); + t2 = space(); + create_component(tabs.$$.fragment); + attr(h1, "class", "svelte-129vfxz"); + attr(hr, "class", "svelte-129vfxz"); + attr(div0, "class", "content svelte-129vfxz"); + attr(div1, "class", "backpanel svelte-129vfxz"); + }, + m(target, anchor) { + insert(target, div1, anchor); + append(div1, div0); + append(div0, h1); + append(div0, t1); + append(div0, hr); + append(div0, t2); + mount_component(tabs, div0, null); + current = true; + }, + p(ctx2, dirty) { + const tabs_changes = {}; + if (dirty[0] & 251 | dirty[2] & 2) { + tabs_changes.$$scope = { dirty, ctx: ctx2 }; + } + tabs.$set(tabs_changes); + }, + i(local) { + if (current) + return; + transition_in(tabs.$$.fragment, local); + add_render_callback(() => { + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, slide, {}, true); + div1_transition.run(1); + }); + current = true; + }, + o(local) { + transition_out(tabs.$$.fragment, local); + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, slide, {}, false); + div1_transition.run(0); + current = false; + }, + d(detaching) { + if (detaching) + detach(div1); + destroy_component(tabs); + if (detaching && div1_transition) + div1_transition.end(); + } + }; + } function create_default_slot_12(ctx) { let t; return { @@ -18704,7 +19020,7 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_8(ctx) { + function create_if_block_9(ctx) { let tab; let current; tab = new Tab_default({ @@ -18786,7 +19102,8 @@ const _DOMParser = DOMParser; $$scope: { ctx } } }); - let if_block = ctx[6].akValid && create_if_block_8(ctx); + tab3.$on("select", ctx[15]); + let if_block = ctx[6].akValid && create_if_block_9(ctx); return { c() { create_component(tab0.$$.fragment); @@ -18817,22 +19134,22 @@ const _DOMParser = DOMParser; }, p(ctx2, dirty) { const tab0_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab0_changes.$$scope = { dirty, ctx: ctx2 }; } tab0.$set(tab0_changes); const tab1_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab1_changes.$$scope = { dirty, ctx: ctx2 }; } tab1.$set(tab1_changes); const tab2_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab2_changes.$$scope = { dirty, ctx: ctx2 }; } tab2.$set(tab2_changes); const tab3_changes = {}; - if (dirty[2] & 1) { + if (dirty[2] & 2) { tab3_changes.$$scope = { dirty, ctx: ctx2 }; } tab3.$set(tab3_changes); @@ -18842,7 +19159,7 @@ const _DOMParser = DOMParser; transition_in(if_block, 1); } } else { - if_block = create_if_block_8(ctx2); + if_block = create_if_block_9(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -18893,7 +19210,7 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_72(ctx) { + function create_if_block_8(ctx) { let label; let input; let t; @@ -18903,7 +19220,7 @@ const _DOMParser = DOMParser; c() { label = element("label"); input = element("input"); - t = text("\n Hide original content when hidden content is visible."); + t = text("\n Hide original content when hidden content is visible."); attr(input, "type", "checkbox"); }, m(target, anchor) { @@ -18912,7 +19229,7 @@ const _DOMParser = DOMParser; input.checked = ctx[5].ho; append(label, t); if (!mounted) { - dispose = listen(input, "change", ctx[23]); + dispose = listen(input, "change", ctx[24]); mounted = true; } }, @@ -18929,7 +19246,7 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_42(ctx) { + function create_if_block_52(ctx) { let t0; let label; let t1; @@ -18940,15 +19257,15 @@ const _DOMParser = DOMParser; let if_block1_anchor; let mounted; let dispose; - let if_block0 = ctx[6].herror && create_if_block_62(ctx); - let if_block1 = ctx[6].akValid && create_if_block_52(ctx); + let if_block0 = ctx[6].herror && create_if_block_72(ctx); + let if_block1 = ctx[6].akValid && create_if_block_62(ctx); return { c() { if (if_block0) if_block0.c(); t0 = space(); label = element("label"); - t1 = text("Hydrus Access Key\n \n "); + t1 = text("Hydrus Access Key\n \n "); a = element("a"); a.textContent = "?"; t3 = space(); @@ -18959,8 +19276,8 @@ const _DOMParser = DOMParser; if_block1_anchor = empty(); attr(a, "title", "Only requires Search Files permission. See Hydrus docs on where to set this up."); attr(input, "type", "text"); - attr(input, "class", "svelte-1epvqgf"); - attr(label, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { if (if_block0) @@ -18977,7 +19294,7 @@ const _DOMParser = DOMParser; if_block1.m(target, anchor); insert(target, if_block1_anchor, anchor); if (!mounted) { - dispose = listen(input, "input", ctx[31]); + dispose = listen(input, "input", ctx[32]); mounted = true; } }, @@ -18986,7 +19303,7 @@ const _DOMParser = DOMParser; if (if_block0) { if_block0.p(ctx2, dirty); } else { - if_block0 = create_if_block_62(ctx2); + if_block0 = create_if_block_72(ctx2); if_block0.c(); if_block0.m(t0.parentNode, t0); } @@ -19001,7 +19318,7 @@ const _DOMParser = DOMParser; if (if_block1) { if_block1.p(ctx2, dirty); } else { - if_block1 = create_if_block_52(ctx2); + if_block1 = create_if_block_62(ctx2); if_block1.c(); if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); } @@ -19028,7 +19345,7 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_62(ctx) { + function create_if_block_72(ctx) { let span; let t_value = ctx[6].herror + ""; let t; @@ -19036,7 +19353,7 @@ const _DOMParser = DOMParser; c() { span = element("span"); t = text(t_value); - attr(span, "class", "error svelte-1epvqgf"); + attr(span, "class", "error svelte-129vfxz"); }, m(target, anchor) { insert(target, span, anchor); @@ -19052,7 +19369,7 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_52(ctx) { + function create_if_block_62(ctx) { let label0; let t0; let input0; @@ -19067,18 +19384,18 @@ const _DOMParser = DOMParser; label0 = element("label"); t0 = text("Auto-embed "); input0 = element("input"); - t1 = text("\n random files"); + t1 = text("\n random files"); t2 = space(); label1 = element("label"); input1 = element("input"); set_style(input0, "width", "5ch"); attr(input0, "type", "number"); - attr(input0, "class", "svelte-1epvqgf"); - attr(label0, "class", "svelte-1epvqgf"); + attr(input0, "class", "svelte-129vfxz"); + attr(label0, "class", "svelte-129vfxz"); attr(input1, "placeholder", "Restrict to these tags (space to separate tags, _ to separate words)"); attr(input1, "type", "text"); - attr(input1, "class", "svelte-1epvqgf"); - attr(label1, "class", "svelte-1epvqgf"); + attr(input1, "class", "svelte-129vfxz"); + attr(label1, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, label0, anchor); @@ -19092,8 +19409,8 @@ const _DOMParser = DOMParser; set_input_value(input1, ctx[5].auto_tags); if (!mounted) { dispose = [ - listen(input0, "input", ctx[32]), - listen(input1, "input", ctx[33]) + listen(input0, "input", ctx[33]), + listen(input1, "input", ctx[34]) ]; mounted = true; } @@ -19184,74 +19501,74 @@ const _DOMParser = DOMParser; let if_block1_anchor; let mounted; let dispose; - let if_block0 = ctx[5].eye && create_if_block_72(ctx); - let if_block1 = ctx[5].hyd && create_if_block_42(ctx); + let if_block0 = ctx[5].eye && create_if_block_8(ctx); + let if_block1 = ctx[5].hyd && create_if_block_52(ctx); return { c() { label0 = element("label"); input0 = element("input"); - t0 = text("\n Try to load embeds from server cache"); + t0 = text("\n Try to load embeds from server cache"); t1 = space(); label1 = element("label"); input1 = element("input"); - t2 = text("\n Display view counts"); + t2 = text("\n Display view counts"); t3 = space(); label2 = element("label"); input2 = element("input"); - t4 = text("\n Check for new versions at startup."); + t4 = text("\n Check for new versions at startup."); t5 = space(); label3 = element("label"); input3 = element("input"); - t6 = text("\n Autoexpand Images on opening."); + t6 = text("\n Autoexpand Images on opening."); t7 = space(); label4 = element("label"); input4 = element("input"); - t8 = text("\n Autoexpand Videos on opening."); + t8 = text("\n Autoexpand Videos on opening."); t9 = space(); label5 = element("label"); input5 = element("input"); - t10 = text("\n Loop media content."); + t10 = text("\n Loop media content."); t11 = space(); label6 = element("label"); input6 = element("input"); - t12 = text("\n Disable hover preview."); + t12 = text("\n Disable hover preview."); t13 = space(); label7 = element("label"); input7 = element("input"); - t14 = text("\n Hide embedded content behind an eye."); + t14 = text("\n Hide embedded content behind an eye."); t15 = space(); if (if_block0) if_block0.c(); t16 = space(); label8 = element("label"); input8 = element("input"); - t17 = text("\n Preload external files."); + t17 = text("\n Preload external files."); t18 = space(); label9 = element("label"); input9 = element("input"); - t19 = text("\n Preload external files when they are in view."); + t19 = text("\n Preload external files when they are in view."); t20 = space(); label10 = element("label"); input10 = element("input"); - t21 = text("\n Hotlink content."); + t21 = text("\n Hotlink content."); t22 = space(); label11 = element("label"); input11 = element("input"); - t23 = text("\n Control audio on videos with mouse wheel."); + t23 = text("\n Control audio on videos with mouse wheel."); t24 = space(); label12 = element("label"); input12 = element("input"); - t25 = text("\n Show Minimap"); + t25 = text("\n Show Minimap"); t26 = space(); label13 = element("label"); input13 = element("input"); - t27 = text("\n \n Disable embedded file preloading"); + t27 = text("\n \n Disable embedded file preloading"); a = element("a"); a.textContent = "?"; t29 = space(); label14 = element("label"); input14 = element("input"); - t30 = text("\n \n Enable Hydrus Integration"); + t30 = text("\n \n Enable Hydrus Integration"); t31 = space(); if (if_block1) if_block1.c(); @@ -19358,21 +19675,21 @@ const _DOMParser = DOMParser; insert(target, if_block1_anchor, anchor); if (!mounted) { dispose = [ - listen(input0, "change", ctx[15]), - listen(input1, "change", ctx[16]), - listen(input2, "change", ctx[17]), - listen(input3, "change", ctx[18]), - listen(input4, "change", ctx[19]), - listen(input5, "change", ctx[20]), - listen(input6, "change", ctx[21]), - listen(input7, "change", ctx[22]), - listen(input8, "change", ctx[24]), - listen(input9, "change", ctx[25]), - listen(input10, "change", ctx[26]), - listen(input11, "change", ctx[27]), - listen(input12, "change", ctx[28]), - listen(input13, "change", ctx[29]), - listen(input14, "change", ctx[30]) + listen(input0, "change", ctx[16]), + listen(input1, "change", ctx[17]), + listen(input2, "change", ctx[18]), + listen(input3, "change", ctx[19]), + listen(input4, "change", ctx[20]), + listen(input5, "change", ctx[21]), + listen(input6, "change", ctx[22]), + listen(input7, "change", ctx[23]), + listen(input8, "change", ctx[25]), + listen(input9, "change", ctx[26]), + listen(input10, "change", ctx[27]), + listen(input11, "change", ctx[28]), + listen(input12, "change", ctx[29]), + listen(input13, "change", ctx[30]), + listen(input14, "change", ctx[31]) ]; mounted = true; } @@ -19406,7 +19723,7 @@ const _DOMParser = DOMParser; if (if_block0) { if_block0.p(ctx2, dirty); } else { - if_block0 = create_if_block_72(ctx2); + if_block0 = create_if_block_8(ctx2); if_block0.c(); if_block0.m(t16.parentNode, t16); } @@ -19439,7 +19756,7 @@ const _DOMParser = DOMParser; if (if_block1) { if_block1.p(ctx2, dirty); } else { - if_block1 = create_if_block_42(ctx2); + if_block1 = create_if_block_52(ctx2); if_block1.c(); if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); } @@ -19522,7 +19839,7 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_22(ctx) { + function create_if_block_32(ctx) { let label; let input0; let t0; @@ -19546,7 +19863,7 @@ const _DOMParser = DOMParser; let current; let mounted; let dispose; - let if_block = ctx[5].phash && create_if_block_32(ctx); + let if_block = ctx[5].phash && create_if_block_42(ctx); let each_value_3 = ctx[5].rsources; let each_blocks_1 = []; for (let i = 0; i < each_value_3.length; i += 1) { @@ -19560,7 +19877,7 @@ const _DOMParser = DOMParser; $$scope: { ctx } }; dialog = new Dialog_default({ props: dialog_props }); - ctx[45](dialog); + ctx[46](dialog); let each_value_2 = ctx[5].blacklist; let each_blocks = []; for (let i = 0; i < each_value_2.length; i += 1) { @@ -19573,7 +19890,7 @@ const _DOMParser = DOMParser; c() { label = element("label"); input0 = element("input"); - t0 = text("\n Enable perceptual hash-based filtering"); + t0 = text("\n Enable perceptual hash-based filtering"); t1 = space(); if (if_block) if_block.c(); @@ -19603,9 +19920,9 @@ const _DOMParser = DOMParser; t12 = space(); input1 = element("input"); attr(input0, "type", "checkbox"); - attr(div0, "class", "tagcont svelte-1epvqgf"); - attr(hr, "class", "svelte-1epvqgf"); - attr(div1, "class", "tagcont svelte-1epvqgf"); + attr(div0, "class", "tagcont svelte-129vfxz"); + attr(hr, "class", "svelte-129vfxz"); + attr(div1, "class", "tagcont svelte-129vfxz"); attr(input1, "placeholder", "Press enter after typing your tag"); }, m(target, anchor) { @@ -19641,9 +19958,9 @@ const _DOMParser = DOMParser; current = true; if (!mounted) { dispose = [ - listen(input0, "change", ctx[35]), - listen(button, "click", ctx[40]), - listen(input1, "keydown", ctx[47]) + listen(input0, "change", ctx[36]), + listen(button, "click", ctx[41]), + listen(input1, "keydown", ctx[48]) ]; mounted = true; } @@ -19656,7 +19973,7 @@ const _DOMParser = DOMParser; if (if_block) { if_block.p(ctx2, dirty); } else { - if_block = create_if_block_32(ctx2); + if_block = create_if_block_42(ctx2); if_block.c(); if_block.m(t2.parentNode, t2); } @@ -19686,7 +20003,7 @@ const _DOMParser = DOMParser; check_outros(); } const dialog_changes = {}; - if (dirty[0] & 1 | dirty[2] & 1) { + if (dirty[0] & 1 | dirty[2] & 2) { dialog_changes.$$scope = { dirty, ctx: ctx2 }; } dialog.$set(dialog_changes); @@ -19758,7 +20075,7 @@ const _DOMParser = DOMParser; detach(button); if (detaching) detach(t7); - ctx[45](null); + ctx[46](null); destroy_component(dialog, detaching); if (detaching) detach(t8); @@ -19782,7 +20099,7 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_32(ctx) { + function create_if_block_42(ctx) { let label; let input; let t0; @@ -19793,13 +20110,13 @@ const _DOMParser = DOMParser; c() { label = element("label"); input = element("input"); - t0 = text("\n Minimum distance required (5 recommended)\n \n "); + t0 = text("\n Minimum distance required (5 recommended)\n \n "); a = element("a"); a.textContent = "?"; attr(input, "type", "number"); - attr(input, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); attr(a, "title", "Higher will filter more potentially different images, lower will let more identical images through"); - attr(label, "class", "svelte-1epvqgf"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, label, anchor); @@ -19808,7 +20125,7 @@ const _DOMParser = DOMParser; append(label, t0); append(label, a); if (!mounted) { - dispose = listen(input, "input", ctx[36]); + dispose = listen(input, "input", ctx[37]); mounted = true; } }, @@ -19829,17 +20146,17 @@ const _DOMParser = DOMParser; let tag; let current; function func(...args) { - return ctx[37](ctx[60], ...args); + return ctx[38](ctx[61], ...args); } function remove_handler() { - return ctx[38](ctx[60]); + return ctx[39](ctx[61]); } function toggle_handler() { - return ctx[39](ctx[60]); + return ctx[40](ctx[61]); } tag = new Tag_default({ props: { - tag: ctx[60].name, + tag: ctx[61].name, toggleable: true, toggled: !ctx[5].rsources.find(func)?.disabled } @@ -19858,7 +20175,7 @@ const _DOMParser = DOMParser; ctx = new_ctx; const tag_changes = {}; if (dirty[0] & 32) - tag_changes.tag = ctx[60].name; + tag_changes.tag = ctx[61].name; if (dirty[0] & 32) tag_changes.toggled = !ctx[5].rsources.find(func)?.disabled; tag.$set(tag_changes); @@ -19903,40 +20220,40 @@ const _DOMParser = DOMParser; c() { div = element("div"); label0 = element("label"); - t0 = text("Name\n "); + t0 = text("Name\n "); input0 = element("input"); t1 = space(); label1 = element("label"); - t2 = text("Domain\n "); + t2 = text("Domain\n "); input1 = element("input"); t3 = space(); label2 = element("label"); - t4 = text("API Endpoint\n "); + t4 = text("API Endpoint\n "); input2 = element("input"); t5 = space(); label3 = element("label"); - t6 = text("Post page prefix (for sources)\n "); + t6 = text("Post page prefix (for sources)\n "); input3 = element("input"); t7 = space(); button = element("button"); button.textContent = "Add"; attr(input0, "type", "text"); attr(input0, "placeholder", "Gelbooru"); - attr(input0, "class", "svelte-1epvqgf"); - attr(label0, "class", "svelte-1epvqgf"); + attr(input0, "class", "svelte-129vfxz"); + attr(label0, "class", "svelte-129vfxz"); attr(input1, "type", "text"); attr(input1, "placeholder", "gelbooru.com"); - attr(input1, "class", "svelte-1epvqgf"); - attr(label1, "class", "svelte-1epvqgf"); + attr(input1, "class", "svelte-129vfxz"); + attr(label1, "class", "svelte-129vfxz"); attr(input2, "type", "text"); attr(input2, "placeholder", "/post.json?tags=md5:"); - attr(input2, "class", "svelte-1epvqgf"); - attr(label2, "class", "svelte-1epvqgf"); + attr(input2, "class", "svelte-129vfxz"); + attr(label2, "class", "svelte-129vfxz"); attr(input3, "type", "text"); attr(input3, "placeholder", "https://yande.re/post/show/"); - attr(input3, "class", "svelte-1epvqgf"); - attr(label3, "class", "svelte-1epvqgf"); - attr(div, "class", "form svelte-1epvqgf"); + attr(input3, "class", "svelte-129vfxz"); + attr(label3, "class", "svelte-129vfxz"); + attr(div, "class", "form svelte-129vfxz"); }, m(target, anchor) { insert(target, div, anchor); @@ -19963,10 +20280,10 @@ const _DOMParser = DOMParser; append(div, button); if (!mounted) { dispose = [ - listen(input0, "input", ctx[41]), - listen(input1, "input", ctx[42]), - listen(input2, "input", ctx[43]), - listen(input3, "input", ctx[44]), + listen(input0, "input", ctx[42]), + listen(input1, "input", ctx[43]), + listen(input2, "input", ctx[44]), + listen(input3, "input", ctx[45]), listen(button, "click", ctx[8]) ]; mounted = true; @@ -19998,9 +20315,9 @@ const _DOMParser = DOMParser; let tag; let current; function toggle_handler_1() { - return ctx[46](ctx[58]); + return ctx[47](ctx[59]); } - tag = new Tag_default({ props: { tag: ctx[58] } }); + tag = new Tag_default({ props: { tag: ctx[59] } }); tag.$on("toggle", toggle_handler_1); return { c() { @@ -20014,7 +20331,7 @@ const _DOMParser = DOMParser; ctx = new_ctx; const tag_changes = {}; if (dirty[0] & 32) - tag_changes.tag = ctx[58]; + tag_changes.tag = ctx[59]; tag.$set(tag_changes); }, i(local) { @@ -20041,12 +20358,12 @@ const _DOMParser = DOMParser; let current; let mounted; let dispose; - let if_block = !ctx[5].te && create_if_block_22(ctx); + let if_block = !ctx[5].te && create_if_block_32(ctx); return { c() { label = element("label"); input = element("input"); - t0 = text("\n Disable third-eye."); + t0 = text("\n Disable third-eye."); t1 = space(); if (if_block) if_block.c(); @@ -20064,7 +20381,7 @@ const _DOMParser = DOMParser; insert(target, if_block_anchor, anchor); current = true; if (!mounted) { - dispose = listen(input, "change", ctx[34]); + dispose = listen(input, "change", ctx[35]); mounted = true; } }, @@ -20079,7 +20396,7 @@ const _DOMParser = DOMParser; transition_in(if_block, 1); } } else { - if_block = create_if_block_22(ctx2); + if_block = create_if_block_32(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -20118,14 +20435,14 @@ const _DOMParser = DOMParser; } function create_each_block_12(ctx) { let option; - let t_value = ctx[55].domain + ""; + let t_value = ctx[56].domain + ""; let t; let option_value_value; return { c() { option = element("option"); t = text(t_value); - option.__value = option_value_value = ctx[57]; + option.__value = option_value_value = ctx[58]; option.value = option.__value; }, m(target, anchor) { @@ -20165,13 +20482,13 @@ const _DOMParser = DOMParser; } t2 = space(); label = element("label"); - t3 = text("Maximum number of embedded links to display\n "); + t3 = text("Maximum number of embedded links to display\n "); input = element("input"); if (ctx[5].fhost === void 0) - add_render_callback(() => ctx[48].call(select)); + add_render_callback(() => ctx[49].call(select)); attr(input, "type", "number"); - attr(input, "class", "svelte-1epvqgf"); - attr(label, "class", "svelte-1epvqgf"); + attr(input, "class", "svelte-129vfxz"); + attr(label, "class", "svelte-129vfxz"); }, m(target, anchor) { insert(target, p, anchor); @@ -20188,8 +20505,8 @@ const _DOMParser = DOMParser; set_input_value(input, ctx[5].maxe); if (!mounted) { dispose = [ - listen(select, "change", ctx[48]), - listen(input, "input", ctx[49]) + listen(select, "change", ctx[49]), + listen(input, "input", ctx[50]) ]; mounted = true; } @@ -20254,8 +20571,10 @@ const _DOMParser = DOMParser; } }; } - function create_if_block_12(ctx) { + function create_if_block_22(ctx) { let div; + let p; + let t1; let each_value = ctx[4]; let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { @@ -20264,13 +20583,18 @@ const _DOMParser = DOMParser; return { c() { div = element("div"); + p = element("p"); + p.textContent = "Format is (embedded links / link in filename)"; + t1 = space(); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - attr(div, "class", "bepis svelte-1epvqgf"); + attr(div, "class", "bepis svelte-129vfxz"); }, m(target, anchor) { insert(target, div, anchor); + append(div, p); + append(div, t1); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(div, null); } @@ -20306,23 +20630,28 @@ const _DOMParser = DOMParser; let div; let a; let t0; - let t1_value = ctx[52].id + ""; + let t1_value = ctx[53].id + ""; let t1; let a_href_value; let t2; - let t3_value = ctx[52].cnt + ""; + let t3_value = ctx[53].pees + ""; let t3; let t4; + let t5_value = ctx[53].eyes + ctx[53].other + ""; + let t5; + let t6; return { c() { div = element("div"); a = element("a"); t0 = text(">>"); t1 = text(t1_value); - t2 = text("\n ("); + t2 = text("\n ("); t3 = text(t3_value); - t4 = text(" embeds)\n "); - attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[11] + "/thread/" + ctx[52].id); + t4 = text(" / "); + t5 = text(t5_value); + t6 = text(")\n "); + attr(a, "href", a_href_value = "https://boards.4chan.org/" + ctx[11] + "/thread/" + ctx[53].id); attr(div, "class", "mbepis"); }, m(target, anchor) { @@ -20333,15 +20662,19 @@ const _DOMParser = DOMParser; append(div, t2); append(div, t3); append(div, t4); + append(div, t5); + append(div, t6); }, p(ctx2, dirty) { - if (dirty[0] & 16 && t1_value !== (t1_value = ctx2[52].id + "")) + if (dirty[0] & 16 && t1_value !== (t1_value = ctx2[53].id + "")) set_data(t1, t1_value); - if (dirty[0] & 16 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[11] + "/thread/" + ctx2[52].id)) { + if (dirty[0] & 16 && a_href_value !== (a_href_value = "https://boards.4chan.org/" + ctx2[11] + "/thread/" + ctx2[53].id)) { attr(a, "href", a_href_value); } - if (dirty[0] & 16 && t3_value !== (t3_value = ctx2[52].cnt + "")) + if (dirty[0] & 16 && t3_value !== (t3_value = ctx2[53].pees + "")) set_data(t3, t3_value); + if (dirty[0] & 16 && t5_value !== (t5_value = ctx2[53].eyes + ctx2[53].other + "")) + set_data(t5, t5_value); }, d(detaching) { if (detaching) @@ -20356,15 +20689,12 @@ const _DOMParser = DOMParser; let a; let t2; let t3; - let button; - let t4; - let t5; let if_block_anchor; let mounted; let dispose; function select_block_type(ctx2, dirty) { if (!ctx2[3]) - return create_if_block_12; + return create_if_block_22; return create_else_block2; } let current_block_type = select_block_type(ctx, [-1, -1, -1]); @@ -20373,19 +20703,15 @@ const _DOMParser = DOMParser; c() { label = element("label"); input = element("input"); - t0 = text("\n \n Contribute to help keep this list up to date. ["); + t0 = text("\n \n Contribute to help keep this list up to date. ["); a = element("a"); a.textContent = "?"; t2 = text("]"); t3 = space(); - button = element("button"); - t4 = text("Refresh"); - t5 = space(); if_block.c(); if_block_anchor = empty(); attr(input, "type", "checkbox"); attr(a, "title", "This will make PEE automatically send the\n post number of posts you find with embedded content"); - button.disabled = ctx[3]; }, m(target, anchor) { insert(target, label, anchor); @@ -20395,16 +20721,10 @@ const _DOMParser = DOMParser; append(label, a); append(label, t2); insert(target, t3, anchor); - insert(target, button, anchor); - append(button, t4); - insert(target, t5, anchor); if_block.m(target, anchor); insert(target, if_block_anchor, anchor); if (!mounted) { - dispose = [ - listen(input, "change", ctx[50]), - listen(button, "click", ctx[12]) - ]; + dispose = listen(input, "change", ctx[51]); mounted = true; } }, @@ -20412,9 +20732,6 @@ const _DOMParser = DOMParser; if (dirty[0] & 32) { input.checked = ctx2[5].tm; } - if (dirty[0] & 8) { - button.disabled = ctx2[3]; - } if (current_block_type === (current_block_type = select_block_type(ctx2, dirty)) && if_block) { if_block.p(ctx2, dirty); } else { @@ -20431,19 +20748,15 @@ const _DOMParser = DOMParser; detach(label); if (detaching) detach(t3); - if (detaching) - detach(button); - if (detaching) - detach(t5); if_block.d(detaching); if (detaching) detach(if_block_anchor); mounted = false; - run_all(dispose); + dispose(); } }; } - function create_if_block6(ctx) { + function create_if_block_12(ctx) { let tabpanel; let current; tabpanel = new TabPanel_default({ @@ -20545,7 +20858,7 @@ const _DOMParser = DOMParser; $$scope: { ctx } } }); - let if_block = ctx[6].akValid && create_if_block6(ctx); + let if_block = ctx[6].akValid && create_if_block_12(ctx); return { c() { create_component(tablist.$$.fragment); @@ -20580,27 +20893,27 @@ const _DOMParser = DOMParser; }, p(ctx2, dirty) { const tablist_changes = {}; - if (dirty[0] & 64 | dirty[2] & 1) { + if (dirty[0] & 64 | dirty[2] & 2) { tablist_changes.$$scope = { dirty, ctx: ctx2 }; } tablist.$set(tablist_changes); const tabpanel0_changes = {}; - if (dirty[0] & 224 | dirty[2] & 1) { + if (dirty[0] & 224 | dirty[2] & 2) { tabpanel0_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel0.$set(tabpanel0_changes); const tabpanel1_changes = {}; - if (dirty[0] & 35 | dirty[2] & 1) { + if (dirty[0] & 35 | dirty[2] & 2) { tabpanel1_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel1.$set(tabpanel1_changes); const tabpanel2_changes = {}; - if (dirty[0] & 32 | dirty[2] & 1) { + if (dirty[0] & 32 | dirty[2] & 2) { tabpanel2_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel2.$set(tabpanel2_changes); const tabpanel3_changes = {}; - if (dirty[0] & 56 | dirty[2] & 1) { + if (dirty[0] & 56 | dirty[2] & 2) { tabpanel3_changes.$$scope = { dirty, ctx: ctx2 }; } tabpanel3.$set(tabpanel3_changes); @@ -20610,7 +20923,7 @@ const _DOMParser = DOMParser; transition_in(if_block, 1); } } else { - if_block = create_if_block6(ctx2); + if_block = create_if_block_12(ctx2); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); @@ -20667,74 +20980,57 @@ const _DOMParser = DOMParser; }; } function create_fragment9(ctx) { - let div1; - let div0; - let h1; - let t1; - let hr; - let t2; - let tabs; + let if_block_anchor; let current; - tabs = new Tabs_default({ - props: { - $$slots: { default: [create_default_slot] }, - $$scope: { ctx } - } - }); + let if_block = ctx[2] && create_if_block6(ctx); return { c() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - h1.textContent = "PEE Settings"; - t1 = space(); - hr = element("hr"); - t2 = space(); - create_component(tabs.$$.fragment); - attr(h1, "class", "svelte-1epvqgf"); - attr(hr, "class", "svelte-1epvqgf"); - attr(div0, "class", "content svelte-1epvqgf"); - attr(div1, "class", "backpanel svelte-1epvqgf"); - toggle_class(div1, "enabled", ctx[2]); - toggle_class(div1, "disabled", !ctx[2]); + if (if_block) + if_block.c(); + if_block_anchor = empty(); }, m(target, anchor) { - insert(target, div1, anchor); - append(div1, div0); - append(div0, h1); - append(div0, t1); - append(div0, hr); - append(div0, t2); - mount_component(tabs, div0, null); + if (if_block) + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); current = true; }, p(ctx2, dirty) { - const tabs_changes = {}; - if (dirty[0] & 251 | dirty[2] & 1) { - tabs_changes.$$scope = { dirty, ctx: ctx2 }; - } - tabs.$set(tabs_changes); - if (dirty[0] & 4) { - toggle_class(div1, "enabled", ctx2[2]); - } - if (dirty[0] & 4) { - toggle_class(div1, "disabled", !ctx2[2]); + if (ctx2[2]) { + if (if_block) { + if_block.p(ctx2, dirty); + if (dirty[0] & 4) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block6(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); } }, i(local) { if (current) return; - transition_in(tabs.$$.fragment, local); + transition_in(if_block); current = true; }, o(local) { - transition_out(tabs.$$.fragment, local); + transition_out(if_block); current = false; }, d(detaching) { + if (if_block) + if_block.d(detaching); if (detaching) - detach(div1); - destroy_component(tabs); + detach(if_block_anchor); } }; } @@ -20799,6 +21095,7 @@ const _DOMParser = DOMParser; cached.subscribe((v) => { set_store_value(settings, $settings.cache = v, $settings); }); + const select_handler = () => updateThreads(); function input0_change_handler() { $cached = this.checked; cached.set($cached); @@ -20951,6 +21248,7 @@ const _DOMParser = DOMParser; updateThreads, toggleBooru, cached, + select_handler, input0_change_handler, input1_change_handler, input2_change_handler, @@ -21698,7 +21996,7 @@ const _DOMParser = DOMParser; }; } function instance13($$self, $$props, $$invalidate) { - const dispatch = createEventDispatcher(); + const dispatch2 = createEventDispatcher(); let { files } = $$props; let { id = "" } = $$props; let children2 = {}; @@ -21721,7 +22019,7 @@ const _DOMParser = DOMParser; if ("id" in $$props2) $$invalidate(1, id = $$props2.id); }; - return [files, id, children2, dispatch, bepis, embedding_binding, fileinfo_handler]; + return [files, id, children2, dispatch2, bepis, embedding_binding, fileinfo_handler]; } var Embeddings = class extends SvelteComponent { constructor(options) { @@ -23623,12 +23921,11 @@ const _DOMParser = DOMParser; appState.subscribe((v) => { cappState = v; }); - var processImage = async (srcs, fn, hex, prevurl, onfound) => { + var processImage = async (srcs, fn, hex, prevurl) => { const ret = await Promise.all(processors.filter((e) => e.match(fn)).map(async (proc) => { if (proc.skip) { const md5 = import_buffer11.Buffer.from(hex, "base64"); if (await proc.has_embed(md5, fn, prevurl) === true) { - onfound(); return [await proc.extract(md5, fn), true]; } return; @@ -23661,7 +23958,6 @@ const _DOMParser = DOMParser; if (found === false) { return; } - onfound(); return [await proc.extract(cumul), false]; } catch { } @@ -23704,26 +24000,28 @@ const _DOMParser = DOMParser; if (!thumbLink) return; let res2 = void 0; + const reportEmbed = () => { + if (csettings5.tm) { + if (["boards.4chan.org", "boards.4channel.org"].includes(location.host)) { + if (!cappState.isCatalog) { + const op = +location.pathname.match(/\/thread\/(.*)/)[1]; + pendingPosts.push({ id: +post.id.match(/([0-9]+)/)[1], op }); + signalNewEmbeds(); + } + } + } + }; if (shouldUseCache()) { res2 = await getEmbedsFromCache(qp.getCurrentBoard(), +qp.getCurrentThread(), post.id); } if (!res2) { - res2 = await processImage(origlink, qp.getFilename(post), qp.getMD5(post), thumbLink, () => { - if (csettings5.tm) { - if (["boards.4chan.org", "boards.4channel.org"].includes(location.host)) { - if (!cappState.isCatalog) { - const op = +location.pathname.match(/\/thread\/(.*)/)[1]; - pendingPosts.push({ id: +post.id.match(/([0-9]+)/)[1], op }); - signalNewEmbeds(); - } - } - } - post.querySelector(".post")?.classList.add("embedfound"); - }); + res2 = await processImage(origlink, qp.getFilename(post), qp.getMD5(post), thumbLink); res2 = res2?.filter((e) => e); } if (!res2 || res2.length == 0) return; + reportEmbed(); + post.querySelector(".post")?.classList.add("embedfound"); processAttachments(post, res2?.flatMap((e) => e[0].map((k) => [k, e[1]]))); }; var versionCheck = async () => { @@ -24167,5 +24465,19 @@ const _DOMParser = DOMParser; * @author Feross Aboukhadijeh * @license MIT */ +/*! ***************************************************************************** +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. +***************************************************************************** */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ diff --git a/pngextraembedder-0.233.xpi b/pngextraembedder-0.241.xpi similarity index 65% rename from pngextraembedder-0.233.xpi rename to pngextraembedder-0.241.xpi index 0e51aac..9afb194 100644 Binary files a/pngextraembedder-0.233.xpi and b/pngextraembedder-0.241.xpi differ