老司机修炼手册

支持网站 missav | jable.tv | pornhub | 18comic | 91porn | 91porna | xvideos。100+项功能、去除大部分广告(横幅、弹窗、视频内、新窗口)、自定义界面布局、隐私模式(模糊视频图片、标题)、显示完整标题、显示m3u8、自定义视频加载数量、自动登录、自动转跳无码片源、自动最高画质。支持 PC端 | 移动端。

  1. // ==UserScript==
  2. // @name 老司机修炼手册
  3. // @name:zh-HK 老司機修煉手冊
  4. // @name:zh-TW 老司機修煉手冊
  5. // @name:en PornEnhance
  6. // @namespace http://github.com/GangPeter
  7. // @version 4.0.2
  8. // @author GangPeter
  9. // @description 支持网站 missav | jable.tv | pornhub | 18comic | 91porn | 91porna | xvideos。100+项功能、去除大部分广告(横幅、弹窗、视频内、新窗口)、自定义界面布局、隐私模式(模糊视频图片、标题)、显示完整标题、显示m3u8、自定义视频加载数量、自动登录、自动转跳无码片源、自动最高画质。支持 PC端 | 移动端。
  10. // @description:zh-HK 支持網站 missav | jable.tv | pornhub | 18comic | 91porn | 91porna | xvideos。100+項功能、去除大部分廣告(橫幅、彈窗、視頻內、新窗口)、自定義界面布局、隱私模式(模糊視頻圖片、標題)、顯示完整標題、顯示m3u8、自定義視頻加載數量、自動登錄、自動轉跳無碼片源、自動最高畫質。支持 PC端 | 移動端。
  11. // @description:zh-TW 支持網站 missav | jable.tv | pornhub | 18comic | 91porn | 91porna | xvideos。100+項功能、去除大部分廣告(橫幅、彈窗、視頻內、新窗口)、自定義界面布局、隱私模式(模糊視頻圖片、標題)、顯示完整標題、顯示m3u8、自定義視頻加載數量、自動登錄、自動轉跳無碼片源、自動最高畫質。支持 PC端 | 移動端。
  12. // @description:en Supported missav | jable.tv | pornhub | 18comic | 91porn | 91porna | xvideos. 100+ features, Remove Most ads (banner, popup, video, window), Custom Layout, Privacy Mode (Blur Video Image, Title), Display Video Full-Title, Get and Display m3u8, Custom Video Load Number, Automatic Login, Automatic Switch Uncensored, Automatic Switch Highest Video Quality. Supported PC | mobile.
  13. // @license None
  14. // @icon https://missav.ws/favicon.ico
  15. // @homepageURL https://github.com/GangPeter/porn-enhance
  16. // @supportURL https://github.com/GangPeter/porn-enhance
  17. // @match *://*.missav.com/*
  18. // @match *://*.missav.ws/*
  19. // @match *://*.missav.ai/*
  20. // @match *://*.jable.tv/*
  21. // @match *://*.pornhub.com/*
  22. // @match *://*.18comic.org/*
  23. // @match *://*.18comic.vip/*
  24. // @match *://*.91porn.com/*
  25. // @match *://*.91porna.com/*
  26. // @match *://*.xvideos.com/*
  27. // @require https://registry.npmmirror.com/vue/3.5.13/files/dist/vue.global.prod.js
  28. // @grant GM_addStyle
  29. // @grant GM_getValue
  30. // @grant GM_registerMenuCommand
  31. // @grant GM_setValue
  32. // @grant unsafeWindow
  33. // @run-at document-start
  34. // ==/UserScript==
  35.  
  36. (o=>{if(typeof GM_addStyle=="function"){GM_addStyle(o);return}const e=document.createElement("style");e.textContent=o,document.head.append(e)})(" .m3u8-input-group[data-v-70ae07f7]{display:flex;align-items:center;height:50px;margin:15px 0;border-radius:999px;background-color:#1b1b1b;font-size:15px;border:none}.m3u8-span[data-v-70ae07f7]{align-content:center;width:10%;height:50px;color:#fff;padding:1em}.m3u8-input[data-v-70ae07f7]{width:75%;height:50px;color:#c6c6c6;border:none;background:transparent}.m3u8-button--copy[data-v-70ae07f7]{width:7.5%;height:50px;border-radius:0 999px 999px 0;background-color:#ff9000;color:#000;cursor:pointer;border:none}.m3u8-button--open[data-v-70ae07f7]{width:7.5%;height:50px;background-color:#ff9000;color:#000;cursor:pointer;border:none}.m3u8-button--open[data-v-70ae07f7]:hover,.m3u8-button--copy[data-v-70ae07f7]:hover{color:#fff} ");
  37.  
  38. (function (e$1) {
  39. 'use strict';
  40.  
  41. function _interopNamespaceDefault(e) {
  42. const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
  43. if (e) {
  44. for (const k in e) {
  45. if (k !== 'default') {
  46. const d = Object.getOwnPropertyDescriptor(e, k);
  47. Object.defineProperty(n, k, d.get ? d : {
  48. enumerable: true,
  49. get: () => e[k]
  50. });
  51. }
  52. }
  53. }
  54. n.default = e;
  55. return Object.freeze(n);
  56. }
  57.  
  58. const e$1__namespace = /*#__PURE__*/_interopNamespaceDefault(e$1);
  59.  
  60. var __defProp = Object.defineProperty;
  61. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  62. var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  63. var _GM_getValue = /* @__PURE__ */ (() => typeof GM_getValue != "undefined" ? GM_getValue : undefined)();
  64. var _GM_registerMenuCommand = /* @__PURE__ */ (() => typeof GM_registerMenuCommand != "undefined" ? GM_registerMenuCommand : undefined)();
  65. var _GM_setValue = /* @__PURE__ */ (() => typeof GM_setValue != "undefined" ? GM_setValue : undefined)();
  66. var _unsafeWindow = /* @__PURE__ */ (() => typeof unsafeWindow != "undefined" ? unsafeWindow : undefined)();
  67. /*!
  68. * pinia v2.3.1
  69. * (c) 2025 Eduardo San Martin Morote
  70. * @license MIT
  71. */
  72. let activePinia;
  73. const setActivePinia = (pinia) => activePinia = pinia;
  74. const piniaSymbol = (
  75. /* istanbul ignore next */
  76. Symbol()
  77. );
  78. function isPlainObject(o2) {
  79. return o2 && typeof o2 === "object" && Object.prototype.toString.call(o2) === "[object Object]" && typeof o2.toJSON !== "function";
  80. }
  81. var MutationType;
  82. (function(MutationType2) {
  83. MutationType2["direct"] = "direct";
  84. MutationType2["patchObject"] = "patch object";
  85. MutationType2["patchFunction"] = "patch function";
  86. })(MutationType || (MutationType = {}));
  87. function createPinia() {
  88. const scope = e$1.effectScope(true);
  89. const state = scope.run(() => e$1.ref({}));
  90. let _p = [];
  91. let toBeInstalled = [];
  92. const pinia = e$1.markRaw({
  93. install(app) {
  94. setActivePinia(pinia);
  95. {
  96. pinia._a = app;
  97. app.provide(piniaSymbol, pinia);
  98. app.config.globalProperties.$pinia = pinia;
  99. toBeInstalled.forEach((plugin) => _p.push(plugin));
  100. toBeInstalled = [];
  101. }
  102. },
  103. use(plugin) {
  104. if (!this._a && true) {
  105. toBeInstalled.push(plugin);
  106. } else {
  107. _p.push(plugin);
  108. }
  109. return this;
  110. },
  111. _p,
  112. // it's actually undefined here
  113. // @ts-expect-error
  114. _a: null,
  115. _e: scope,
  116. _s: /* @__PURE__ */ new Map(),
  117. state
  118. });
  119. return pinia;
  120. }
  121. const noop$1 = () => {
  122. };
  123. function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {
  124. subscriptions.push(callback);
  125. const removeSubscription = () => {
  126. const idx = subscriptions.indexOf(callback);
  127. if (idx > -1) {
  128. subscriptions.splice(idx, 1);
  129. onCleanup();
  130. }
  131. };
  132. if (!detached && e$1.getCurrentScope()) {
  133. e$1.onScopeDispose(removeSubscription);
  134. }
  135. return removeSubscription;
  136. }
  137. function triggerSubscriptions(subscriptions, ...args) {
  138. subscriptions.slice().forEach((callback) => {
  139. callback(...args);
  140. });
  141. }
  142. const fallbackRunWithContext = (fn) => fn();
  143. const ACTION_MARKER = Symbol();
  144. const ACTION_NAME = Symbol();
  145. function mergeReactiveObjects(target, patchToApply) {
  146. if (target instanceof Map && patchToApply instanceof Map) {
  147. patchToApply.forEach((value, key) => target.set(key, value));
  148. } else if (target instanceof Set && patchToApply instanceof Set) {
  149. patchToApply.forEach(target.add, target);
  150. }
  151. for (const key in patchToApply) {
  152. if (!patchToApply.hasOwnProperty(key))
  153. continue;
  154. const subPatch = patchToApply[key];
  155. const targetValue = target[key];
  156. if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !e$1.isRef(subPatch) && !e$1.isReactive(subPatch)) {
  157. target[key] = mergeReactiveObjects(targetValue, subPatch);
  158. } else {
  159. target[key] = subPatch;
  160. }
  161. }
  162. return target;
  163. }
  164. const skipHydrateSymbol = (
  165. /* istanbul ignore next */
  166. Symbol()
  167. );
  168. function shouldHydrate(obj) {
  169. return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  170. }
  171. const { assign } = Object;
  172. function isComputed(o2) {
  173. return !!(e$1.isRef(o2) && o2.effect);
  174. }
  175. function createOptionsStore(id, options, pinia, hot) {
  176. const { state, actions, getters } = options;
  177. const initialState = pinia.state.value[id];
  178. let store;
  179. function setup() {
  180. if (!initialState && true) {
  181. {
  182. pinia.state.value[id] = state ? state() : {};
  183. }
  184. }
  185. const localState = e$1.toRefs(pinia.state.value[id]);
  186. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  187. computedGetters[name] = e$1.markRaw(e$1.computed(() => {
  188. setActivePinia(pinia);
  189. const store2 = pinia._s.get(id);
  190. return getters[name].call(store2, store2);
  191. }));
  192. return computedGetters;
  193. }, {}));
  194. }
  195. store = createSetupStore(id, setup, options, pinia, hot, true);
  196. return store;
  197. }
  198. function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
  199. let scope;
  200. const optionsForPlugin = assign({ actions: {} }, options);
  201. const $subscribeOptions = { deep: true };
  202. let isListening;
  203. let isSyncListening;
  204. let subscriptions = [];
  205. let actionSubscriptions = [];
  206. let debuggerEvents;
  207. const initialState = pinia.state.value[$id];
  208. if (!isOptionsStore && !initialState && true) {
  209. {
  210. pinia.state.value[$id] = {};
  211. }
  212. }
  213. e$1.ref({});
  214. let activeListener;
  215. function $patch(partialStateOrMutator) {
  216. let subscriptionMutation;
  217. isListening = isSyncListening = false;
  218. if (typeof partialStateOrMutator === "function") {
  219. partialStateOrMutator(pinia.state.value[$id]);
  220. subscriptionMutation = {
  221. type: MutationType.patchFunction,
  222. storeId: $id,
  223. events: debuggerEvents
  224. };
  225. } else {
  226. mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
  227. subscriptionMutation = {
  228. type: MutationType.patchObject,
  229. payload: partialStateOrMutator,
  230. storeId: $id,
  231. events: debuggerEvents
  232. };
  233. }
  234. const myListenerId = activeListener = Symbol();
  235. e$1.nextTick().then(() => {
  236. if (activeListener === myListenerId) {
  237. isListening = true;
  238. }
  239. });
  240. isSyncListening = true;
  241. triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
  242. }
  243. const $reset = isOptionsStore ? function $reset2() {
  244. const { state } = options;
  245. const newState = state ? state() : {};
  246. this.$patch(($state) => {
  247. assign($state, newState);
  248. });
  249. } : (
  250. /* istanbul ignore next */
  251. noop$1
  252. );
  253. function $dispose() {
  254. scope.stop();
  255. subscriptions = [];
  256. actionSubscriptions = [];
  257. pinia._s.delete($id);
  258. }
  259. const action = (fn, name = "") => {
  260. if (ACTION_MARKER in fn) {
  261. fn[ACTION_NAME] = name;
  262. return fn;
  263. }
  264. const wrappedAction = function() {
  265. setActivePinia(pinia);
  266. const args = Array.from(arguments);
  267. const afterCallbackList = [];
  268. const onErrorCallbackList = [];
  269. function after(callback) {
  270. afterCallbackList.push(callback);
  271. }
  272. function onError(callback) {
  273. onErrorCallbackList.push(callback);
  274. }
  275. triggerSubscriptions(actionSubscriptions, {
  276. args,
  277. name: wrappedAction[ACTION_NAME],
  278. store,
  279. after,
  280. onError
  281. });
  282. let ret;
  283. try {
  284. ret = fn.apply(this && this.$id === $id ? this : store, args);
  285. } catch (error2) {
  286. triggerSubscriptions(onErrorCallbackList, error2);
  287. throw error2;
  288. }
  289. if (ret instanceof Promise) {
  290. return ret.then((value) => {
  291. triggerSubscriptions(afterCallbackList, value);
  292. return value;
  293. }).catch((error2) => {
  294. triggerSubscriptions(onErrorCallbackList, error2);
  295. return Promise.reject(error2);
  296. });
  297. }
  298. triggerSubscriptions(afterCallbackList, ret);
  299. return ret;
  300. };
  301. wrappedAction[ACTION_MARKER] = true;
  302. wrappedAction[ACTION_NAME] = name;
  303. return wrappedAction;
  304. };
  305. const partialStore = {
  306. _p: pinia,
  307. // _s: scope,
  308. $id,
  309. $onAction: addSubscription.bind(null, actionSubscriptions),
  310. $patch,
  311. $reset,
  312. $subscribe(callback, options2 = {}) {
  313. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  314. const stopWatcher = scope.run(() => e$1.watch(() => pinia.state.value[$id], (state) => {
  315. if (options2.flush === "sync" ? isSyncListening : isListening) {
  316. callback({
  317. storeId: $id,
  318. type: MutationType.direct,
  319. events: debuggerEvents
  320. }, state);
  321. }
  322. }, assign({}, $subscribeOptions, options2)));
  323. return removeSubscription;
  324. },
  325. $dispose
  326. };
  327. const store = e$1.reactive(partialStore);
  328. pinia._s.set($id, store);
  329. const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext;
  330. const setupStore = runWithContext(() => pinia._e.run(() => (scope = e$1.effectScope()).run(() => setup({ action }))));
  331. for (const key in setupStore) {
  332. const prop = setupStore[key];
  333. if (e$1.isRef(prop) && !isComputed(prop) || e$1.isReactive(prop)) {
  334. if (!isOptionsStore) {
  335. if (initialState && shouldHydrate(prop)) {
  336. if (e$1.isRef(prop)) {
  337. prop.value = initialState[key];
  338. } else {
  339. mergeReactiveObjects(prop, initialState[key]);
  340. }
  341. }
  342. {
  343. pinia.state.value[$id][key] = prop;
  344. }
  345. }
  346. } else if (typeof prop === "function") {
  347. const actionValue = action(prop, key);
  348. {
  349. setupStore[key] = actionValue;
  350. }
  351. optionsForPlugin.actions[key] = prop;
  352. } else ;
  353. }
  354. {
  355. assign(store, setupStore);
  356. assign(e$1.toRaw(store), setupStore);
  357. }
  358. Object.defineProperty(store, "$state", {
  359. get: () => pinia.state.value[$id],
  360. set: (state) => {
  361. $patch(($state) => {
  362. assign($state, state);
  363. });
  364. }
  365. });
  366. pinia._p.forEach((extender) => {
  367. {
  368. assign(store, scope.run(() => extender({
  369. store,
  370. app: pinia._a,
  371. pinia,
  372. options: optionsForPlugin
  373. })));
  374. }
  375. });
  376. if (initialState && isOptionsStore && options.hydrate) {
  377. options.hydrate(store.$state, initialState);
  378. }
  379. isListening = true;
  380. isSyncListening = true;
  381. return store;
  382. }
  383. /*! #__NO_SIDE_EFFECTS__ */
  384. // @__NO_SIDE_EFFECTS__
  385. function defineStore(idOrOptions, setup, setupOptions) {
  386. let id;
  387. let options;
  388. const isSetupStore = typeof setup === "function";
  389. if (typeof idOrOptions === "string") {
  390. id = idOrOptions;
  391. options = isSetupStore ? setupOptions : setup;
  392. } else {
  393. options = idOrOptions;
  394. id = idOrOptions.id;
  395. }
  396. function useStore(pinia, hot) {
  397. const hasContext = e$1.hasInjectionContext();
  398. pinia = // in test mode, ignore the argument provided as we can always retrieve a
  399. // pinia instance with getActivePinia()
  400. pinia || (hasContext ? e$1.inject(piniaSymbol, null) : null);
  401. if (pinia)
  402. setActivePinia(pinia);
  403. pinia = activePinia;
  404. if (!pinia._s.has(id)) {
  405. if (isSetupStore) {
  406. createSetupStore(id, setup, options, pinia);
  407. } else {
  408. createOptionsStore(id, options, pinia);
  409. }
  410. }
  411. const store = pinia._s.get(id);
  412. return store;
  413. }
  414. useStore.$id = id;
  415. return useStore;
  416. }
  417. function d$2(u2, e2, r2) {
  418. let i2 = e$1.ref(r2 == null ? undefined : r2.value), f2 = e$1.computed(() => u2.value !== undefined);
  419. return [e$1.computed(() => f2.value ? u2.value : i2.value), function(t2) {
  420. return f2.value || (i2.value = t2), e2 == null ? undefined : e2(t2);
  421. }];
  422. }
  423. var r$2;
  424. let n$3 = Symbol("headlessui.useid"), o$4 = 0;
  425. const i$4 = (r$2 = e$1__namespace.useId) != null ? r$2 : function() {
  426. return e$1__namespace.inject(n$3, () => `${++o$4}`)();
  427. };
  428. function o$3(e2) {
  429. var l2;
  430. if (e2 == null || e2.value == null) return null;
  431. let n2 = (l2 = e2.value.$el) != null ? l2 : e2.value;
  432. return n2 instanceof Node ? n2 : null;
  433. }
  434. function u$5(r2, n2, ...a2) {
  435. if (r2 in n2) {
  436. let e2 = n2[r2];
  437. return typeof e2 == "function" ? e2(...a2) : e2;
  438. }
  439. let t2 = new Error(`Tried to handle "${r2}" but there is no handler defined. Only defined handlers are: ${Object.keys(n2).map((e2) => `"${e2}"`).join(", ")}.`);
  440. throw Error.captureStackTrace && Error.captureStackTrace(t2, u$5), t2;
  441. }
  442. var i$3 = Object.defineProperty;
  443. var d$1 = (t2, e2, r2) => e2 in t2 ? i$3(t2, e2, { enumerable: true, configurable: true, writable: true, value: r2 }) : t2[e2] = r2;
  444. var n$2 = (t2, e2, r2) => (d$1(t2, typeof e2 != "symbol" ? e2 + "" : e2, r2), r2);
  445. let s$1 = class s {
  446. constructor() {
  447. n$2(this, "current", this.detect());
  448. n$2(this, "currentId", 0);
  449. }
  450. set(e2) {
  451. this.current !== e2 && (this.currentId = 0, this.current = e2);
  452. }
  453. reset() {
  454. this.set(this.detect());
  455. }
  456. nextId() {
  457. return ++this.currentId;
  458. }
  459. get isServer() {
  460. return this.current === "server";
  461. }
  462. get isClient() {
  463. return this.current === "client";
  464. }
  465. detect() {
  466. return typeof window == "undefined" || typeof document == "undefined" ? "server" : "client";
  467. }
  468. };
  469. let c$2 = new s$1();
  470. function i$2(r2) {
  471. if (c$2.isServer) return null;
  472. if (r2 instanceof Node) return r2.ownerDocument;
  473. if (r2 != null && r2.hasOwnProperty("value")) {
  474. let n2 = o$3(r2);
  475. if (n2) return n2.ownerDocument;
  476. }
  477. return document;
  478. }
  479. let c$1 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e2) => `${e2}:not([tabindex='-1'])`).join(",");
  480. var N$2 = ((n2) => (n2[n2.First = 1] = "First", n2[n2.Previous = 2] = "Previous", n2[n2.Next = 4] = "Next", n2[n2.Last = 8] = "Last", n2[n2.WrapAround = 16] = "WrapAround", n2[n2.NoScroll = 32] = "NoScroll", n2))(N$2 || {}), T$2 = ((o2) => (o2[o2.Error = 0] = "Error", o2[o2.Overflow = 1] = "Overflow", o2[o2.Success = 2] = "Success", o2[o2.Underflow = 3] = "Underflow", o2))(T$2 || {}), F = ((t2) => (t2[t2.Previous = -1] = "Previous", t2[t2.Next = 1] = "Next", t2))(F || {});
  481. var h = ((t2) => (t2[t2.Strict = 0] = "Strict", t2[t2.Loose = 1] = "Loose", t2))(h || {});
  482. function w$3(e2, r2 = 0) {
  483. var t2;
  484. return e2 === ((t2 = i$2(e2)) == null ? undefined : t2.body) ? false : u$5(r2, { [0]() {
  485. return e2.matches(c$1);
  486. }, [1]() {
  487. let l2 = e2;
  488. for (; l2 !== null; ) {
  489. if (l2.matches(c$1)) return true;
  490. l2 = l2.parentElement;
  491. }
  492. return false;
  493. } });
  494. }
  495. var y$1 = ((t2) => (t2[t2.Keyboard = 0] = "Keyboard", t2[t2.Mouse = 1] = "Mouse", t2))(y$1 || {});
  496. typeof window != "undefined" && typeof document != "undefined" && (document.addEventListener("keydown", (e2) => {
  497. e2.metaKey || e2.altKey || e2.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
  498. }, true), document.addEventListener("click", (e2) => {
  499. e2.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e2.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
  500. }, true));
  501. function O$1(e2, r2 = (t2) => t2) {
  502. return e2.slice().sort((t2, l2) => {
  503. let o2 = r2(t2), i2 = r2(l2);
  504. if (o2 === null || i2 === null) return 0;
  505. let n2 = o2.compareDocumentPosition(i2);
  506. return n2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
  507. });
  508. }
  509. function t$1() {
  510. return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
  511. }
  512. function i$1() {
  513. return /Android/gi.test(window.navigator.userAgent);
  514. }
  515. function n$1() {
  516. return t$1() || i$1();
  517. }
  518. function u$4(e2, t2, n2) {
  519. c$2.isServer || e$1.watchEffect((o2) => {
  520. document.addEventListener(e2, t2, n2), o2(() => document.removeEventListener(e2, t2, n2));
  521. });
  522. }
  523. function w$2(e2, n2, t2) {
  524. c$2.isServer || e$1.watchEffect((o2) => {
  525. window.addEventListener(e2, n2, t2), o2(() => window.removeEventListener(e2, n2, t2));
  526. });
  527. }
  528. function w$1(f2, m, l2 = e$1.computed(() => true)) {
  529. function a2(e2, r2) {
  530. if (!l2.value || e2.defaultPrevented) return;
  531. let t2 = r2(e2);
  532. if (t2 === null || !t2.getRootNode().contains(t2)) return;
  533. let c2 = function o2(n2) {
  534. return typeof n2 == "function" ? o2(n2()) : Array.isArray(n2) || n2 instanceof Set ? n2 : [n2];
  535. }(f2);
  536. for (let o2 of c2) {
  537. if (o2 === null) continue;
  538. let n2 = o2 instanceof HTMLElement ? o2 : o$3(o2);
  539. if (n2 != null && n2.contains(t2) || e2.composed && e2.composedPath().includes(n2)) return;
  540. }
  541. return !w$3(t2, h.Loose) && t2.tabIndex !== -1 && e2.preventDefault(), m(e2, t2);
  542. }
  543. let u2 = e$1.ref(null);
  544. u$4("pointerdown", (e2) => {
  545. var r2, t2;
  546. l2.value && (u2.value = ((t2 = (r2 = e2.composedPath) == null ? undefined : r2.call(e2)) == null ? undefined : t2[0]) || e2.target);
  547. }, true), u$4("mousedown", (e2) => {
  548. var r2, t2;
  549. l2.value && (u2.value = ((t2 = (r2 = e2.composedPath) == null ? undefined : r2.call(e2)) == null ? undefined : t2[0]) || e2.target);
  550. }, true), u$4("click", (e2) => {
  551. n$1() || u2.value && (a2(e2, () => u2.value), u2.value = null);
  552. }, true), u$4("touchend", (e2) => a2(e2, () => e2.target instanceof HTMLElement ? e2.target : null), true), w$2("blur", (e2) => a2(e2, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true);
  553. }
  554. function r$1(t2, e2) {
  555. if (t2) return t2;
  556. let n2 = e2 != null ? e2 : "button";
  557. if (typeof n2 == "string" && n2.toLowerCase() === "button") return "button";
  558. }
  559. function s2(t2, e2) {
  560. let n2 = e$1.ref(r$1(t2.value.type, t2.value.as));
  561. return e$1.onMounted(() => {
  562. n2.value = r$1(t2.value.type, t2.value.as);
  563. }), e$1.watchEffect(() => {
  564. var u2;
  565. n2.value || o$3(e2) && o$3(e2) instanceof HTMLButtonElement && !((u2 = o$3(e2)) != null && u2.hasAttribute("type")) && (n2.value = "button");
  566. }), n2;
  567. }
  568. function r(e2) {
  569. return [e2.screenX, e2.screenY];
  570. }
  571. function u$3() {
  572. let e2 = e$1.ref([-1, -1]);
  573. return { wasMoved(n2) {
  574. let t2 = r(n2);
  575. return e2.value[0] === t2[0] && e2.value[1] === t2[1] ? false : (e2.value = t2, true);
  576. }, update(n2) {
  577. e2.value = r(n2);
  578. } };
  579. }
  580. var N$1 = ((o2) => (o2[o2.None = 0] = "None", o2[o2.RenderStrategy = 1] = "RenderStrategy", o2[o2.Static = 2] = "Static", o2))(N$1 || {}), S = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(S || {});
  581. function A$1({ visible: r2 = true, features: t2 = 0, ourProps: e2, theirProps: o2, ...i2 }) {
  582. var a2;
  583. let n2 = j(o2, e2), l2 = Object.assign(i2, { props: n2 });
  584. if (r2 || t2 & 2 && n2.static) return y(l2);
  585. if (t2 & 1) {
  586. let d2 = (a2 = n2.unmount) == null || a2 ? 0 : 1;
  587. return u$5(d2, { [0]() {
  588. return null;
  589. }, [1]() {
  590. return y({ ...i2, props: { ...n2, hidden: true, style: { display: "none" } } });
  591. } });
  592. }
  593. return y(l2);
  594. }
  595. function y({ props: r2, attrs: t2, slots: e2, slot: o2, name: i2 }) {
  596. var m, h2;
  597. let { as: n2, ...l2 } = T$1(r2, ["unmount", "static"]), a2 = (m = e2.default) == null ? undefined : m.call(e2, o2), d2 = {};
  598. if (o2) {
  599. let u2 = false, c2 = [];
  600. for (let [p2, f2] of Object.entries(o2)) typeof f2 == "boolean" && (u2 = true), f2 === true && c2.push(p2);
  601. u2 && (d2["data-headlessui-state"] = c2.join(" "));
  602. }
  603. if (n2 === "template") {
  604. if (a2 = b(a2 != null ? a2 : []), Object.keys(l2).length > 0 || Object.keys(t2).length > 0) {
  605. let [u2, ...c2] = a2 != null ? a2 : [];
  606. if (!v(u2) || c2.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${i2} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(l2).concat(Object.keys(t2)).map((s3) => s3.trim()).filter((s3, g2, R) => R.indexOf(s3) === g2).sort((s3, g2) => s3.localeCompare(g2)).map((s3) => ` - ${s3}`).join(`
  607. `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((s3) => ` - ${s3}`).join(`
  608. `)].join(`
  609. `));
  610. let p2 = j((h2 = u2.props) != null ? h2 : {}, l2, d2), f2 = e$1.cloneVNode(u2, p2, true);
  611. for (let s3 in p2) s3.startsWith("on") && (f2.props || (f2.props = {}), f2.props[s3] = p2[s3]);
  612. return f2;
  613. }
  614. return Array.isArray(a2) && a2.length === 1 ? a2[0] : a2;
  615. }
  616. return e$1.h(n2, Object.assign({}, l2, d2), { default: () => a2 });
  617. }
  618. function b(r2) {
  619. return r2.flatMap((t2) => t2.type === e$1.Fragment ? b(t2.children) : [t2]);
  620. }
  621. function j(...r2) {
  622. if (r2.length === 0) return {};
  623. if (r2.length === 1) return r2[0];
  624. let t2 = {}, e2 = {};
  625. for (let i2 of r2) for (let n2 in i2) n2.startsWith("on") && typeof i2[n2] == "function" ? (e2[n2] != null || (e2[n2] = []), e2[n2].push(i2[n2])) : t2[n2] = i2[n2];
  626. if (t2.disabled || t2["aria-disabled"]) return Object.assign(t2, Object.fromEntries(Object.keys(e2).map((i2) => [i2, undefined])));
  627. for (let i2 in e2) Object.assign(t2, { [i2](n2, ...l2) {
  628. let a2 = e2[i2];
  629. for (let d2 of a2) {
  630. if (n2 instanceof Event && n2.defaultPrevented) return;
  631. d2(n2, ...l2);
  632. }
  633. } });
  634. return t2;
  635. }
  636. function E$1(r2) {
  637. let t2 = Object.assign({}, r2);
  638. for (let e2 in t2) t2[e2] === undefined && delete t2[e2];
  639. return t2;
  640. }
  641. function T$1(r2, t2 = []) {
  642. let e2 = Object.assign({}, r2);
  643. for (let o2 of t2) o2 in e2 && delete e2[o2];
  644. return e2;
  645. }
  646. function v(r2) {
  647. return r2 == null ? false : typeof r2.type == "string" || typeof r2.type == "object" || typeof r2.type == "function";
  648. }
  649. var u$2 = ((e2) => (e2[e2.None = 1] = "None", e2[e2.Focusable = 2] = "Focusable", e2[e2.Hidden = 4] = "Hidden", e2))(u$2 || {});
  650. let f$2 = e$1.defineComponent({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(t2, { slots: n2, attrs: i2 }) {
  651. return () => {
  652. var r2;
  653. let { features: e2, ...d2 } = t2, o2 = { "aria-hidden": (e2 & 2) === 2 ? true : (r2 = d2["aria-hidden"]) != null ? r2 : undefined, hidden: (e2 & 4) === 4 ? true : undefined, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(e2 & 4) === 4 && (e2 & 2) !== 2 && { display: "none" } } };
  654. return A$1({ ourProps: o2, theirProps: d2, slot: {}, attrs: i2, slots: n2, name: "Hidden" });
  655. };
  656. } });
  657. let n = Symbol("Context");
  658. var i = ((e2) => (e2[e2.Open = 1] = "Open", e2[e2.Closed = 2] = "Closed", e2[e2.Closing = 4] = "Closing", e2[e2.Opening = 8] = "Opening", e2))(i || {});
  659. function l() {
  660. return e$1.inject(n, null);
  661. }
  662. function t(o2) {
  663. e$1.provide(n, o2);
  664. }
  665. var o$2 = ((r2) => (r2.Space = " ", r2.Enter = "Enter", r2.Escape = "Escape", r2.Backspace = "Backspace", r2.Delete = "Delete", r2.ArrowLeft = "ArrowLeft", r2.ArrowUp = "ArrowUp", r2.ArrowRight = "ArrowRight", r2.ArrowDown = "ArrowDown", r2.Home = "Home", r2.End = "End", r2.PageUp = "PageUp", r2.PageDown = "PageDown", r2.Tab = "Tab", r2))(o$2 || {});
  666. function u$1(l2) {
  667. throw new Error("Unexpected object: " + l2);
  668. }
  669. var c = ((i2) => (i2[i2.First = 0] = "First", i2[i2.Previous = 1] = "Previous", i2[i2.Next = 2] = "Next", i2[i2.Last = 3] = "Last", i2[i2.Specific = 4] = "Specific", i2[i2.Nothing = 5] = "Nothing", i2))(c || {});
  670. function f$1(l2, n2) {
  671. let t2 = n2.resolveItems();
  672. if (t2.length <= 0) return null;
  673. let r2 = n2.resolveActiveIndex(), s3 = r2 != null ? r2 : -1;
  674. switch (l2.focus) {
  675. case 0: {
  676. for (let e2 = 0; e2 < t2.length; ++e2) if (!n2.resolveDisabled(t2[e2], e2, t2)) return e2;
  677. return r2;
  678. }
  679. case 1: {
  680. s3 === -1 && (s3 = t2.length);
  681. for (let e2 = s3 - 1; e2 >= 0; --e2) if (!n2.resolveDisabled(t2[e2], e2, t2)) return e2;
  682. return r2;
  683. }
  684. case 2: {
  685. for (let e2 = s3 + 1; e2 < t2.length; ++e2) if (!n2.resolveDisabled(t2[e2], e2, t2)) return e2;
  686. return r2;
  687. }
  688. case 3: {
  689. for (let e2 = t2.length - 1; e2 >= 0; --e2) if (!n2.resolveDisabled(t2[e2], e2, t2)) return e2;
  690. return r2;
  691. }
  692. case 4: {
  693. for (let e2 = 0; e2 < t2.length; ++e2) if (n2.resolveId(t2[e2], e2, t2) === l2.id) return e2;
  694. return r2;
  695. }
  696. case 5:
  697. return null;
  698. default:
  699. u$1(l2);
  700. }
  701. }
  702. function e(i2 = {}, s3 = null, t2 = []) {
  703. for (let [r2, n2] of Object.entries(i2)) o$1(t2, f(s3, r2), n2);
  704. return t2;
  705. }
  706. function f(i2, s3) {
  707. return i2 ? i2 + "[" + s3 + "]" : s3;
  708. }
  709. function o$1(i2, s3, t2) {
  710. if (Array.isArray(t2)) for (let [r2, n2] of t2.entries()) o$1(i2, f(s3, r2.toString()), n2);
  711. else t2 instanceof Date ? i2.push([s3, t2.toISOString()]) : typeof t2 == "boolean" ? i2.push([s3, t2 ? "1" : "0"]) : typeof t2 == "string" ? i2.push([s3, t2]) : typeof t2 == "number" ? i2.push([s3, `${t2}`]) : t2 == null ? i2.push([s3, ""]) : e(t2, s3, i2);
  712. }
  713. function p$1(i2) {
  714. var t2, r2;
  715. let s3 = (t2 = i2 == null ? undefined : i2.form) != null ? t2 : i2.closest("form");
  716. if (s3) {
  717. for (let n2 of s3.elements) if (n2 !== i2 && (n2.tagName === "INPUT" && n2.type === "submit" || n2.tagName === "BUTTON" && n2.type === "submit" || n2.nodeName === "INPUT" && n2.type === "image")) {
  718. n2.click();
  719. return;
  720. }
  721. (r2 = s3.requestSubmit) == null || r2.call(s3);
  722. }
  723. }
  724. let u = Symbol("DescriptionContext");
  725. function w() {
  726. let t2 = e$1.inject(u, null);
  727. if (t2 === null) throw new Error("Missing parent");
  728. return t2;
  729. }
  730. function k$1({ slot: t2 = e$1.ref({}), name: o2 = "Description", props: s3 = {} } = {}) {
  731. let e2 = e$1.ref([]);
  732. function r2(n2) {
  733. return e2.value.push(n2), () => {
  734. let i2 = e2.value.indexOf(n2);
  735. i2 !== -1 && e2.value.splice(i2, 1);
  736. };
  737. }
  738. return e$1.provide(u, { register: r2, slot: t2, name: o2, props: s3 }), e$1.computed(() => e2.value.length > 0 ? e2.value.join(" ") : undefined);
  739. }
  740. e$1.defineComponent({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: null } }, setup(t2, { attrs: o2, slots: s3 }) {
  741. var n2;
  742. let e2 = (n2 = t2.id) != null ? n2 : `headlessui-description-${i$4()}`, r2 = w();
  743. return e$1.onMounted(() => e$1.onUnmounted(r2.register(e2))), () => {
  744. let { name: i2 = "Description", slot: l2 = e$1.ref({}), props: d2 = {} } = r2, { ...c2 } = t2, f2 = { ...Object.entries(d2).reduce((a2, [g2, m]) => Object.assign(a2, { [g2]: e$1.unref(m) }), {}), id: e2 };
  745. return A$1({ ourProps: f2, theirProps: c2, slot: l2.value, attrs: o2, slots: s3, name: i2 });
  746. };
  747. } });
  748. var $$1 = ((o2) => (o2[o2.Open = 0] = "Open", o2[o2.Closed = 1] = "Closed", o2))($$1 || {});
  749. let T = Symbol("DisclosureContext");
  750. function O(t2) {
  751. let r2 = e$1.inject(T, null);
  752. if (r2 === null) {
  753. let o2 = new Error(`<${t2} /> is missing a parent <Disclosure /> component.`);
  754. throw Error.captureStackTrace && Error.captureStackTrace(o2, O), o2;
  755. }
  756. return r2;
  757. }
  758. let k = Symbol("DisclosurePanelContext");
  759. function U() {
  760. return e$1.inject(k, null);
  761. }
  762. let N = e$1.defineComponent({ name: "Disclosure", props: { as: { type: [Object, String], default: "template" }, defaultOpen: { type: [Boolean], default: false } }, setup(t$12, { slots: r2, attrs: o2 }) {
  763. let s3 = e$1.ref(t$12.defaultOpen ? 0 : 1), e2 = e$1.ref(null), i$12 = e$1.ref(null), n2 = { buttonId: e$1.ref(`headlessui-disclosure-button-${i$4()}`), panelId: e$1.ref(`headlessui-disclosure-panel-${i$4()}`), disclosureState: s3, panel: e2, button: i$12, toggleDisclosure() {
  764. s3.value = u$5(s3.value, { [0]: 1, [1]: 0 });
  765. }, closeDisclosure() {
  766. s3.value !== 1 && (s3.value = 1);
  767. }, close(l2) {
  768. n2.closeDisclosure();
  769. let a2 = (() => l2 ? l2 instanceof HTMLElement ? l2 : l2.value instanceof HTMLElement ? o$3(l2) : o$3(n2.button) : o$3(n2.button))();
  770. a2 == null || a2.focus();
  771. } };
  772. return e$1.provide(T, n2), t(e$1.computed(() => u$5(s3.value, { [0]: i.Open, [1]: i.Closed }))), () => {
  773. let { defaultOpen: l2, ...a2 } = t$12, c2 = { open: s3.value === 0, close: n2.close };
  774. return A$1({ theirProps: a2, ourProps: {}, slot: c2, slots: r2, attrs: o2, name: "Disclosure" });
  775. };
  776. } }), Q = e$1.defineComponent({ name: "DisclosureButton", props: { as: { type: [Object, String], default: "button" }, disabled: { type: [Boolean], default: false }, id: { type: String, default: null } }, setup(t2, { attrs: r2, slots: o2, expose: s$12 }) {
  777. let e2 = O("DisclosureButton"), i2 = U(), n2 = e$1.computed(() => i2 === null ? false : i2.value === e2.panelId.value);
  778. e$1.onMounted(() => {
  779. n2.value || t2.id !== null && (e2.buttonId.value = t2.id);
  780. }), e$1.onUnmounted(() => {
  781. n2.value || (e2.buttonId.value = null);
  782. });
  783. let l2 = e$1.ref(null);
  784. s$12({ el: l2, $el: l2 }), n2.value || e$1.watchEffect(() => {
  785. e2.button.value = l2.value;
  786. });
  787. let a2 = s2(e$1.computed(() => ({ as: t2.as, type: r2.type })), l2);
  788. function c2() {
  789. var u2;
  790. t2.disabled || (n2.value ? (e2.toggleDisclosure(), (u2 = o$3(e2.button)) == null || u2.focus()) : e2.toggleDisclosure());
  791. }
  792. function D(u2) {
  793. var S2;
  794. if (!t2.disabled) if (n2.value) switch (u2.key) {
  795. case o$2.Space:
  796. case o$2.Enter:
  797. u2.preventDefault(), u2.stopPropagation(), e2.toggleDisclosure(), (S2 = o$3(e2.button)) == null || S2.focus();
  798. break;
  799. }
  800. else switch (u2.key) {
  801. case o$2.Space:
  802. case o$2.Enter:
  803. u2.preventDefault(), u2.stopPropagation(), e2.toggleDisclosure();
  804. break;
  805. }
  806. }
  807. function v2(u2) {
  808. switch (u2.key) {
  809. case o$2.Space:
  810. u2.preventDefault();
  811. break;
  812. }
  813. }
  814. return () => {
  815. var C2;
  816. let u2 = { open: e2.disclosureState.value === 0 }, { id: S2, ...K2 } = t2, M = n2.value ? { ref: l2, type: a2.value, onClick: c2, onKeydown: D } : { id: (C2 = e2.buttonId.value) != null ? C2 : S2, ref: l2, type: a2.value, "aria-expanded": e2.disclosureState.value === 0, "aria-controls": e2.disclosureState.value === 0 || o$3(e2.panel) ? e2.panelId.value : undefined, disabled: t2.disabled ? true : undefined, onClick: c2, onKeydown: D, onKeyup: v2 };
  817. return A$1({ ourProps: M, theirProps: K2, slot: u2, attrs: r2, slots: o2, name: "DisclosureButton" });
  818. };
  819. } }), V = e$1.defineComponent({ name: "DisclosurePanel", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: null } }, setup(t2, { attrs: r2, slots: o2, expose: s3 }) {
  820. let e2 = O("DisclosurePanel");
  821. e$1.onMounted(() => {
  822. t2.id !== null && (e2.panelId.value = t2.id);
  823. }), e$1.onUnmounted(() => {
  824. e2.panelId.value = null;
  825. }), s3({ el: e2.panel, $el: e2.panel }), e$1.provide(k, e2.panelId);
  826. let i$12 = l(), n2 = e$1.computed(() => i$12 !== null ? (i$12.value & i.Open) === i.Open : e2.disclosureState.value === 0);
  827. return () => {
  828. var v2;
  829. let l2 = { open: e2.disclosureState.value === 0, close: e2.close }, { id: a2, ...c2 } = t2, D = { id: (v2 = e2.panelId.value) != null ? v2 : a2, ref: e2.panel };
  830. return A$1({ ourProps: D, theirProps: c2, slot: l2, attrs: r2, slots: o2, features: N$1.RenderStrategy | N$1.Static, visible: n2.value, name: "DisclosurePanel" });
  831. };
  832. } });
  833. let a$1 = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
  834. function o(e2) {
  835. var r2, i2;
  836. let n2 = (r2 = e2.innerText) != null ? r2 : "", t2 = e2.cloneNode(true);
  837. if (!(t2 instanceof HTMLElement)) return n2;
  838. let u2 = false;
  839. for (let f2 of t2.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) f2.remove(), u2 = true;
  840. let l2 = u2 ? (i2 = t2.innerText) != null ? i2 : "" : n2;
  841. return a$1.test(l2) && (l2 = l2.replace(a$1, "")), l2;
  842. }
  843. function g(e2) {
  844. let n2 = e2.getAttribute("aria-label");
  845. if (typeof n2 == "string") return n2.trim();
  846. let t2 = e2.getAttribute("aria-labelledby");
  847. if (t2) {
  848. let u2 = t2.split(" ").map((l2) => {
  849. let r2 = document.getElementById(l2);
  850. if (r2) {
  851. let i2 = r2.getAttribute("aria-label");
  852. return typeof i2 == "string" ? i2.trim() : o(r2).trim();
  853. }
  854. return null;
  855. }).filter(Boolean);
  856. if (u2.length > 0) return u2.join(", ");
  857. }
  858. return o(e2).trim();
  859. }
  860. function p(a2) {
  861. let t2 = e$1.ref(""), r2 = e$1.ref("");
  862. return () => {
  863. let e2 = o$3(a2);
  864. if (!e2) return "";
  865. let l2 = e2.innerText;
  866. if (t2.value === l2) return r2.value;
  867. let u2 = g(e2).trim().toLowerCase();
  868. return t2.value = l2, r2.value = u2, u2;
  869. };
  870. }
  871. function pe(o2, b2) {
  872. return o2 === b2;
  873. }
  874. var ce = ((r2) => (r2[r2.Open = 0] = "Open", r2[r2.Closed = 1] = "Closed", r2))(ce || {}), ve = ((r2) => (r2[r2.Single = 0] = "Single", r2[r2.Multi = 1] = "Multi", r2))(ve || {}), be = ((r2) => (r2[r2.Pointer = 0] = "Pointer", r2[r2.Other = 1] = "Other", r2))(be || {});
  875. function me(o2) {
  876. requestAnimationFrame(() => requestAnimationFrame(o2));
  877. }
  878. let $ = Symbol("ListboxContext");
  879. function A(o2) {
  880. let b2 = e$1.inject($, null);
  881. if (b2 === null) {
  882. let r2 = new Error(`<${o2} /> is missing a parent <Listbox /> component.`);
  883. throw Error.captureStackTrace && Error.captureStackTrace(r2, A), r2;
  884. }
  885. return b2;
  886. }
  887. let Ie = e$1.defineComponent({ name: "Listbox", emits: { "update:modelValue": (o2) => true }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: false }, by: { type: [String, Function], default: () => pe }, horizontal: { type: [Boolean], default: false }, modelValue: { type: [Object, String, Number, Boolean], default: undefined }, defaultValue: { type: [Object, String, Number, Boolean], default: undefined }, form: { type: String, optional: true }, name: { type: String, optional: true }, multiple: { type: [Boolean], default: false } }, inheritAttrs: false, setup(o2, { slots: b2, attrs: r2, emit: w2 }) {
  888. let n2 = e$1.ref(1), e$12 = e$1.ref(null), f2 = e$1.ref(null), v2 = e$1.ref(null), s3 = e$1.ref([]), m = e$1.ref(""), p2 = e$1.ref(null), a2 = e$1.ref(1);
  889. function u2(t2 = (i2) => i2) {
  890. let i2 = p2.value !== null ? s3.value[p2.value] : null, l2 = O$1(t2(s3.value.slice()), (O2) => o$3(O2.dataRef.domRef)), d2 = i2 ? l2.indexOf(i2) : null;
  891. return d2 === -1 && (d2 = null), { options: l2, activeOptionIndex: d2 };
  892. }
  893. let D = e$1.computed(() => o2.multiple ? 1 : 0), [y2, L] = d$2(e$1.computed(() => o2.modelValue), (t2) => w2("update:modelValue", t2), e$1.computed(() => o2.defaultValue)), M = e$1.computed(() => y2.value === undefined ? u$5(D.value, { [1]: [], [0]: undefined }) : y2.value), k2 = { listboxState: n2, value: M, mode: D, compare(t2, i2) {
  894. if (typeof o2.by == "string") {
  895. let l2 = o2.by;
  896. return (t2 == null ? undefined : t2[l2]) === (i2 == null ? undefined : i2[l2]);
  897. }
  898. return o2.by(t2, i2);
  899. }, orientation: e$1.computed(() => o2.horizontal ? "horizontal" : "vertical"), labelRef: e$12, buttonRef: f2, optionsRef: v2, disabled: e$1.computed(() => o2.disabled), options: s3, searchQuery: m, activeOptionIndex: p2, activationTrigger: a2, closeListbox() {
  900. o2.disabled || n2.value !== 1 && (n2.value = 1, p2.value = null);
  901. }, openListbox() {
  902. o2.disabled || n2.value !== 0 && (n2.value = 0);
  903. }, goToOption(t2, i2, l2) {
  904. if (o2.disabled || n2.value === 1) return;
  905. let d2 = u2(), O2 = f$1(t2 === c.Specific ? { focus: c.Specific, id: i2 } : { focus: t2 }, { resolveItems: () => d2.options, resolveActiveIndex: () => d2.activeOptionIndex, resolveId: (h2) => h2.id, resolveDisabled: (h2) => h2.dataRef.disabled });
  906. m.value = "", p2.value = O2, a2.value = l2 != null ? l2 : 1, s3.value = d2.options;
  907. }, search(t2) {
  908. if (o2.disabled || n2.value === 1) return;
  909. let l2 = m.value !== "" ? 0 : 1;
  910. m.value += t2.toLowerCase();
  911. let O2 = (p2.value !== null ? s3.value.slice(p2.value + l2).concat(s3.value.slice(0, p2.value + l2)) : s3.value).find((I) => I.dataRef.textValue.startsWith(m.value) && !I.dataRef.disabled), h2 = O2 ? s3.value.indexOf(O2) : -1;
  912. h2 === -1 || h2 === p2.value || (p2.value = h2, a2.value = 1);
  913. }, clearSearch() {
  914. o2.disabled || n2.value !== 1 && m.value !== "" && (m.value = "");
  915. }, registerOption(t2, i2) {
  916. let l2 = u2((d2) => [...d2, { id: t2, dataRef: i2 }]);
  917. s3.value = l2.options, p2.value = l2.activeOptionIndex;
  918. }, unregisterOption(t2) {
  919. let i2 = u2((l2) => {
  920. let d2 = l2.findIndex((O2) => O2.id === t2);
  921. return d2 !== -1 && l2.splice(d2, 1), l2;
  922. });
  923. s3.value = i2.options, p2.value = i2.activeOptionIndex, a2.value = 1;
  924. }, theirOnChange(t2) {
  925. o2.disabled || L(t2);
  926. }, select(t2) {
  927. o2.disabled || L(u$5(D.value, { [0]: () => t2, [1]: () => {
  928. let i2 = e$1.toRaw(k2.value.value).slice(), l2 = e$1.toRaw(t2), d2 = i2.findIndex((O2) => k2.compare(l2, e$1.toRaw(O2)));
  929. return d2 === -1 ? i2.push(l2) : i2.splice(d2, 1), i2;
  930. } }));
  931. } };
  932. w$1([f2, v2], (t2, i2) => {
  933. var l2;
  934. k2.closeListbox(), w$3(i2, h.Loose) || (t2.preventDefault(), (l2 = o$3(f2)) == null || l2.focus());
  935. }, e$1.computed(() => n2.value === 0)), e$1.provide($, k2), t(e$1.computed(() => u$5(n2.value, { [0]: i.Open, [1]: i.Closed })));
  936. let C2 = e$1.computed(() => {
  937. var t2;
  938. return (t2 = o$3(f2)) == null ? undefined : t2.closest("form");
  939. });
  940. return e$1.onMounted(() => {
  941. e$1.watch([C2], () => {
  942. if (!C2.value || o2.defaultValue === undefined) return;
  943. function t2() {
  944. k2.theirOnChange(o2.defaultValue);
  945. }
  946. return C2.value.addEventListener("reset", t2), () => {
  947. var i2;
  948. (i2 = C2.value) == null || i2.removeEventListener("reset", t2);
  949. };
  950. }, { immediate: true });
  951. }), () => {
  952. let { name: t2, modelValue: i2, disabled: l2, form: d2, ...O2 } = o2, h2 = { open: n2.value === 0, disabled: l2, value: M.value };
  953. return e$1.h(e$1.Fragment, [...t2 != null && M.value != null ? e({ [t2]: M.value }).map(([I, Q2]) => e$1.h(f$2, E$1({ features: u$2.Hidden, key: I, as: "input", type: "hidden", hidden: true, readOnly: true, form: d2, disabled: l2, name: I, value: Q2 }))) : [], A$1({ ourProps: {}, theirProps: { ...r2, ...T$1(O2, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: h2, slots: b2, attrs: r2, name: "Listbox" })]);
  954. };
  955. } });
  956. e$1.defineComponent({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(o2, { attrs: b2, slots: r2 }) {
  957. var f2;
  958. let w2 = (f2 = o2.id) != null ? f2 : `headlessui-listbox-label-${i$4()}`, n2 = A("ListboxLabel");
  959. function e2() {
  960. var v2;
  961. (v2 = o$3(n2.buttonRef)) == null || v2.focus({ preventScroll: true });
  962. }
  963. return () => {
  964. let v2 = { open: n2.listboxState.value === 0, disabled: n2.disabled.value }, { ...s3 } = o2, m = { id: w2, ref: n2.labelRef, onClick: e2 };
  965. return A$1({ ourProps: m, theirProps: s3, slot: v2, attrs: b2, slots: r2, name: "ListboxLabel" });
  966. };
  967. } });
  968. let je = e$1.defineComponent({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(o2, { attrs: b2, slots: r2, expose: w2 }) {
  969. var p2;
  970. let n2 = (p2 = o2.id) != null ? p2 : `headlessui-listbox-button-${i$4()}`, e2 = A("ListboxButton");
  971. w2({ el: e2.buttonRef, $el: e2.buttonRef });
  972. function f2(a2) {
  973. switch (a2.key) {
  974. case o$2.Space:
  975. case o$2.Enter:
  976. case o$2.ArrowDown:
  977. a2.preventDefault(), e2.openListbox(), e$1.nextTick(() => {
  978. var u2;
  979. (u2 = o$3(e2.optionsRef)) == null || u2.focus({ preventScroll: true }), e2.value.value || e2.goToOption(c.First);
  980. });
  981. break;
  982. case o$2.ArrowUp:
  983. a2.preventDefault(), e2.openListbox(), e$1.nextTick(() => {
  984. var u2;
  985. (u2 = o$3(e2.optionsRef)) == null || u2.focus({ preventScroll: true }), e2.value.value || e2.goToOption(c.Last);
  986. });
  987. break;
  988. }
  989. }
  990. function v2(a2) {
  991. switch (a2.key) {
  992. case o$2.Space:
  993. a2.preventDefault();
  994. break;
  995. }
  996. }
  997. function s$12(a2) {
  998. e2.disabled.value || (e2.listboxState.value === 0 ? (e2.closeListbox(), e$1.nextTick(() => {
  999. var u2;
  1000. return (u2 = o$3(e2.buttonRef)) == null ? undefined : u2.focus({ preventScroll: true });
  1001. })) : (a2.preventDefault(), e2.openListbox(), me(() => {
  1002. var u2;
  1003. return (u2 = o$3(e2.optionsRef)) == null ? undefined : u2.focus({ preventScroll: true });
  1004. })));
  1005. }
  1006. let m = s2(e$1.computed(() => ({ as: o2.as, type: b2.type })), e2.buttonRef);
  1007. return () => {
  1008. var y2, L;
  1009. let a2 = { open: e2.listboxState.value === 0, disabled: e2.disabled.value, value: e2.value.value }, { ...u2 } = o2, D = { ref: e2.buttonRef, id: n2, type: m.value, "aria-haspopup": "listbox", "aria-controls": (y2 = o$3(e2.optionsRef)) == null ? undefined : y2.id, "aria-expanded": e2.listboxState.value === 0, "aria-labelledby": e2.labelRef.value ? [(L = o$3(e2.labelRef)) == null ? undefined : L.id, n2].join(" ") : undefined, disabled: e2.disabled.value === true ? true : undefined, onKeydown: f2, onKeyup: v2, onClick: s$12 };
  1010. return A$1({ ourProps: D, theirProps: u2, slot: a2, attrs: b2, slots: r2, name: "ListboxButton" });
  1011. };
  1012. } }), Ae = e$1.defineComponent({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: null } }, setup(o2, { attrs: b2, slots: r2, expose: w2 }) {
  1013. var p2;
  1014. let n2 = (p2 = o2.id) != null ? p2 : `headlessui-listbox-options-${i$4()}`, e2 = A("ListboxOptions"), f2 = e$1.ref(null);
  1015. w2({ el: e2.optionsRef, $el: e2.optionsRef });
  1016. function v2(a2) {
  1017. switch (f2.value && clearTimeout(f2.value), a2.key) {
  1018. case o$2.Space:
  1019. if (e2.searchQuery.value !== "") return a2.preventDefault(), a2.stopPropagation(), e2.search(a2.key);
  1020. case o$2.Enter:
  1021. if (a2.preventDefault(), a2.stopPropagation(), e2.activeOptionIndex.value !== null) {
  1022. let u2 = e2.options.value[e2.activeOptionIndex.value];
  1023. e2.select(u2.dataRef.value);
  1024. }
  1025. e2.mode.value === 0 && (e2.closeListbox(), e$1.nextTick(() => {
  1026. var u2;
  1027. return (u2 = o$3(e2.buttonRef)) == null ? undefined : u2.focus({ preventScroll: true });
  1028. }));
  1029. break;
  1030. case u$5(e2.orientation.value, { vertical: o$2.ArrowDown, horizontal: o$2.ArrowRight }):
  1031. return a2.preventDefault(), a2.stopPropagation(), e2.goToOption(c.Next);
  1032. case u$5(e2.orientation.value, { vertical: o$2.ArrowUp, horizontal: o$2.ArrowLeft }):
  1033. return a2.preventDefault(), a2.stopPropagation(), e2.goToOption(c.Previous);
  1034. case o$2.Home:
  1035. case o$2.PageUp:
  1036. return a2.preventDefault(), a2.stopPropagation(), e2.goToOption(c.First);
  1037. case o$2.End:
  1038. case o$2.PageDown:
  1039. return a2.preventDefault(), a2.stopPropagation(), e2.goToOption(c.Last);
  1040. case o$2.Escape:
  1041. a2.preventDefault(), a2.stopPropagation(), e2.closeListbox(), e$1.nextTick(() => {
  1042. var u2;
  1043. return (u2 = o$3(e2.buttonRef)) == null ? undefined : u2.focus({ preventScroll: true });
  1044. });
  1045. break;
  1046. case o$2.Tab:
  1047. a2.preventDefault(), a2.stopPropagation();
  1048. break;
  1049. default:
  1050. a2.key.length === 1 && (e2.search(a2.key), f2.value = setTimeout(() => e2.clearSearch(), 350));
  1051. break;
  1052. }
  1053. }
  1054. let s3 = l(), m = e$1.computed(() => s3 !== null ? (s3.value & i.Open) === i.Open : e2.listboxState.value === 0);
  1055. return () => {
  1056. var y2, L;
  1057. let a2 = { open: e2.listboxState.value === 0 }, { ...u2 } = o2, D = { "aria-activedescendant": e2.activeOptionIndex.value === null || (y2 = e2.options.value[e2.activeOptionIndex.value]) == null ? undefined : y2.id, "aria-multiselectable": e2.mode.value === 1 ? true : undefined, "aria-labelledby": (L = o$3(e2.buttonRef)) == null ? undefined : L.id, "aria-orientation": e2.orientation.value, id: n2, onKeydown: v2, role: "listbox", tabIndex: 0, ref: e2.optionsRef };
  1058. return A$1({ ourProps: D, theirProps: u2, slot: a2, attrs: b2, slots: r2, features: N$1.RenderStrategy | N$1.Static, visible: m.value, name: "ListboxOptions" });
  1059. };
  1060. } }), Fe = e$1.defineComponent({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: false }, id: { type: String, default: null } }, setup(o2, { slots: b2, attrs: r2, expose: w2 }) {
  1061. var C2;
  1062. let n2 = (C2 = o2.id) != null ? C2 : `headlessui-listbox-option-${i$4()}`, e2 = A("ListboxOption"), f2 = e$1.ref(null);
  1063. w2({ el: f2, $el: f2 });
  1064. let v2 = e$1.computed(() => e2.activeOptionIndex.value !== null ? e2.options.value[e2.activeOptionIndex.value].id === n2 : false), s3 = e$1.computed(() => u$5(e2.mode.value, { [0]: () => e2.compare(e$1.toRaw(e2.value.value), e$1.toRaw(o2.value)), [1]: () => e$1.toRaw(e2.value.value).some((t2) => e2.compare(e$1.toRaw(t2), e$1.toRaw(o2.value))) })), m = e$1.computed(() => u$5(e2.mode.value, { [1]: () => {
  1065. var i2;
  1066. let t2 = e$1.toRaw(e2.value.value);
  1067. return ((i2 = e2.options.value.find((l2) => t2.some((d2) => e2.compare(e$1.toRaw(d2), e$1.toRaw(l2.dataRef.value))))) == null ? undefined : i2.id) === n2;
  1068. }, [0]: () => s3.value })), p$12 = p(f2), a2 = e$1.computed(() => ({ disabled: o2.disabled, value: o2.value, get textValue() {
  1069. return p$12();
  1070. }, domRef: f2 }));
  1071. e$1.onMounted(() => e2.registerOption(n2, a2)), e$1.onUnmounted(() => e2.unregisterOption(n2)), e$1.onMounted(() => {
  1072. e$1.watch([e2.listboxState, s3], () => {
  1073. e2.listboxState.value === 0 && s3.value && u$5(e2.mode.value, { [1]: () => {
  1074. m.value && e2.goToOption(c.Specific, n2);
  1075. }, [0]: () => {
  1076. e2.goToOption(c.Specific, n2);
  1077. } });
  1078. }, { immediate: true });
  1079. }), e$1.watchEffect(() => {
  1080. e2.listboxState.value === 0 && v2.value && e2.activationTrigger.value !== 0 && e$1.nextTick(() => {
  1081. var t2, i2;
  1082. return (i2 = (t2 = o$3(f2)) == null ? undefined : t2.scrollIntoView) == null ? undefined : i2.call(t2, { block: "nearest" });
  1083. });
  1084. });
  1085. function u2(t2) {
  1086. if (o2.disabled) return t2.preventDefault();
  1087. e2.select(o2.value), e2.mode.value === 0 && (e2.closeListbox(), e$1.nextTick(() => {
  1088. var i2;
  1089. return (i2 = o$3(e2.buttonRef)) == null ? undefined : i2.focus({ preventScroll: true });
  1090. }));
  1091. }
  1092. function D() {
  1093. if (o2.disabled) return e2.goToOption(c.Nothing);
  1094. e2.goToOption(c.Specific, n2);
  1095. }
  1096. let y2 = u$3();
  1097. function L(t2) {
  1098. y2.update(t2);
  1099. }
  1100. function M(t2) {
  1101. y2.wasMoved(t2) && (o2.disabled || v2.value || e2.goToOption(c.Specific, n2, 0));
  1102. }
  1103. function k2(t2) {
  1104. y2.wasMoved(t2) && (o2.disabled || v2.value && e2.goToOption(c.Nothing));
  1105. }
  1106. return () => {
  1107. let { disabled: t2 } = o2, i2 = { active: v2.value, selected: s3.value, disabled: t2 }, { value: l2, disabled: d2, ...O2 } = o2, h2 = { id: n2, ref: f2, role: "option", tabIndex: t2 === true ? undefined : -1, "aria-disabled": t2 === true ? true : undefined, "aria-selected": s3.value, disabled: undefined, onClick: u2, onFocus: D, onPointerenter: L, onMouseenter: L, onPointermove: M, onMousemove: M, onPointerleave: k2, onMouseleave: k2 };
  1108. return A$1({ ourProps: h2, theirProps: O2, slot: i2, attrs: r2, slots: b2, name: "ListboxOption" });
  1109. };
  1110. } });
  1111. let a = Symbol("LabelContext");
  1112. function d() {
  1113. let t2 = e$1.inject(a, null);
  1114. if (t2 === null) {
  1115. let n2 = new Error("You used a <Label /> component, but it is not inside a parent.");
  1116. throw Error.captureStackTrace && Error.captureStackTrace(n2, d), n2;
  1117. }
  1118. return t2;
  1119. }
  1120. function E({ slot: t2 = {}, name: n2 = "Label", props: i2 = {} } = {}) {
  1121. let e2 = e$1.ref([]);
  1122. function o2(r2) {
  1123. return e2.value.push(r2), () => {
  1124. let l2 = e2.value.indexOf(r2);
  1125. l2 !== -1 && e2.value.splice(l2, 1);
  1126. };
  1127. }
  1128. return e$1.provide(a, { register: o2, slot: t2, name: n2, props: i2 }), e$1.computed(() => e2.value.length > 0 ? e2.value.join(" ") : undefined);
  1129. }
  1130. let K = e$1.defineComponent({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: null } }, setup(t2, { slots: n2, attrs: i2 }) {
  1131. var r2;
  1132. let e2 = (r2 = t2.id) != null ? r2 : `headlessui-label-${i$4()}`, o2 = d();
  1133. return e$1.onMounted(() => e$1.onUnmounted(o2.register(e2))), () => {
  1134. let { name: l2 = "Label", slot: p2 = {}, props: c2 = {} } = o2, { passive: f2, ...s3 } = t2, u2 = { ...Object.entries(c2).reduce((b2, [g2, m]) => Object.assign(b2, { [g2]: e$1.unref(m) }), {}), id: e2 };
  1135. return f2 && (delete u2.onClick, delete u2.htmlFor, delete s3.onClick), A$1({ ourProps: u2, theirProps: s3, slot: p2, attrs: i2, slots: n2, name: l2 });
  1136. };
  1137. } });
  1138. let C = Symbol("GroupContext"), oe = e$1.defineComponent({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(l2, { slots: c2, attrs: i2 }) {
  1139. let r2 = e$1.ref(null), f2 = E({ name: "SwitchLabel", props: { htmlFor: e$1.computed(() => {
  1140. var t2;
  1141. return (t2 = r2.value) == null ? undefined : t2.id;
  1142. }), onClick(t2) {
  1143. r2.value && (t2.currentTarget.tagName === "LABEL" && t2.preventDefault(), r2.value.click(), r2.value.focus({ preventScroll: true }));
  1144. } } }), p2 = k$1({ name: "SwitchDescription" });
  1145. return e$1.provide(C, { switchRef: r2, labelledby: f2, describedby: p2 }), () => A$1({ theirProps: l2, ourProps: {}, slot: {}, slots: c2, attrs: i2, name: "SwitchGroup" });
  1146. } }), ue = e$1.defineComponent({ name: "Switch", emits: { "update:modelValue": (l2) => true }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: undefined }, defaultChecked: { type: Boolean, optional: true }, form: { type: String, optional: true }, name: { type: String, optional: true }, value: { type: String, optional: true }, id: { type: String, default: null }, disabled: { type: Boolean, default: false }, tabIndex: { type: Number, default: 0 } }, inheritAttrs: false, setup(l2, { emit: c2, attrs: i2, slots: r2, expose: f2 }) {
  1147. var h2;
  1148. let p2 = (h2 = l2.id) != null ? h2 : `headlessui-switch-${i$4()}`, n2 = e$1.inject(C, null), [t2, s$12] = d$2(e$1.computed(() => l2.modelValue), (e2) => c2("update:modelValue", e2), e$1.computed(() => l2.defaultChecked));
  1149. function m() {
  1150. s$12(!t2.value);
  1151. }
  1152. let E2 = e$1.ref(null), o2 = n2 === null ? E2 : n2.switchRef, L = s2(e$1.computed(() => ({ as: l2.as, type: i2.type })), o2);
  1153. f2({ el: o2, $el: o2 });
  1154. function D(e2) {
  1155. e2.preventDefault(), m();
  1156. }
  1157. function R(e2) {
  1158. e2.key === o$2.Space ? (e2.preventDefault(), m()) : e2.key === o$2.Enter && p$1(e2.currentTarget);
  1159. }
  1160. function x(e2) {
  1161. e2.preventDefault();
  1162. }
  1163. let d2 = e$1.computed(() => {
  1164. var e2, a2;
  1165. return (a2 = (e2 = o$3(o2)) == null ? undefined : e2.closest) == null ? undefined : a2.call(e2, "form");
  1166. });
  1167. return e$1.onMounted(() => {
  1168. e$1.watch([d2], () => {
  1169. if (!d2.value || l2.defaultChecked === undefined) return;
  1170. function e2() {
  1171. s$12(l2.defaultChecked);
  1172. }
  1173. return d2.value.addEventListener("reset", e2), () => {
  1174. var a2;
  1175. (a2 = d2.value) == null || a2.removeEventListener("reset", e2);
  1176. };
  1177. }, { immediate: true });
  1178. }), () => {
  1179. let { name: e2, value: a2, form: K2, tabIndex: y2, ...b2 } = l2, T2 = { checked: t2.value }, B = { id: p2, ref: o2, role: "switch", type: L.value, tabIndex: y2 === -1 ? 0 : y2, "aria-checked": t2.value, "aria-labelledby": n2 == null ? undefined : n2.labelledby.value, "aria-describedby": n2 == null ? undefined : n2.describedby.value, onClick: D, onKeyup: R, onKeypress: x };
  1180. return e$1.h(e$1.Fragment, [e2 != null && t2.value != null ? e$1.h(f$2, E$1({ features: u$2.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: t2.value, form: K2, disabled: b2.disabled, name: e2, value: a2 })) : null, A$1({ ourProps: B, theirProps: { ...i2, ...T$1(b2, ["modelValue", "defaultChecked"]) }, slot: T2, attrs: i2, slots: r2, name: "Switch" })]);
  1181. };
  1182. } }), de = K;
  1183. function render$2(_ctx, _cache) {
  1184. return e$1.openBlock(), e$1.createElementBlock("svg", {
  1185. xmlns: "http://www.w3.org/2000/svg",
  1186. viewBox: "0 0 20 20",
  1187. fill: "currentColor",
  1188. "aria-hidden": "true",
  1189. "data-slot": "icon"
  1190. }, [
  1191. e$1.createElementVNode("path", {
  1192. "fill-rule": "evenodd",
  1193. d: "M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",
  1194. "clip-rule": "evenodd"
  1195. })
  1196. ]);
  1197. }
  1198. function render$1(_ctx, _cache) {
  1199. return e$1.openBlock(), e$1.createElementBlock("svg", {
  1200. xmlns: "http://www.w3.org/2000/svg",
  1201. viewBox: "0 0 20 20",
  1202. fill: "currentColor",
  1203. "aria-hidden": "true",
  1204. "data-slot": "icon"
  1205. }, [
  1206. e$1.createElementVNode("path", {
  1207. "fill-rule": "evenodd",
  1208. d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
  1209. "clip-rule": "evenodd"
  1210. })
  1211. ]);
  1212. }
  1213. function render(_ctx, _cache) {
  1214. return e$1.openBlock(), e$1.createElementBlock("svg", {
  1215. xmlns: "http://www.w3.org/2000/svg",
  1216. viewBox: "0 0 20 20",
  1217. fill: "currentColor",
  1218. "aria-hidden": "true",
  1219. "data-slot": "icon"
  1220. }, [
  1221. e$1.createElementVNode("path", {
  1222. "fill-rule": "evenodd",
  1223. d: "M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",
  1224. "clip-rule": "evenodd"
  1225. })
  1226. ]);
  1227. }
  1228. const _hoisted_1$b = { class: "mt-2.5 h-auto w-full px-3.5 text-base font-bold text-[#c6c6c6]" };
  1229. const _hoisted_2$a = {
  1230. key: 0,
  1231. class: "absolute right-20 inline-block rounded-xl bg-[#ff9000] px-2 text-sm text-black"
  1232. };
  1233. const _sfc_main$c = /* @__PURE__ */ e$1.defineComponent({
  1234. __name: "DisclosureComp",
  1235. props: {
  1236. title: {},
  1237. isFold: { type: Boolean },
  1238. isSpecial: { type: Boolean },
  1239. specialName: {}
  1240. },
  1241. setup(__props) {
  1242. return (_ctx, _cache) => {
  1243. return e$1.openBlock(), e$1.createElementBlock("div", _hoisted_1$b, [
  1244. e$1.createVNode(e$1.unref(N), {
  1245. "default-open": !_ctx.isFold
  1246. }, {
  1247. default: e$1.withCtx(({ open }) => [
  1248. e$1.createVNode(e$1.unref(Q), {
  1249. class: e$1.normalizeClass(["flex min-h-12 w-full justify-between rounded-xl p-3.5 text-left outline-none", {
  1250. "bg-[#1b1b1b] hover:bg-[#292929]": !_ctx.isSpecial,
  1251. "bg-[#1f1f1f] hover:bg-[#2D2D2D]": _ctx.isSpecial,
  1252. "rounded-b-none": open
  1253. }])
  1254. }, {
  1255. default: e$1.withCtx(() => [
  1256. e$1.createElementVNode("span", null, e$1.toDisplayString(_ctx.title || "Disclosure Title"), 1),
  1257. _ctx.isSpecial ? (e$1.openBlock(), e$1.createElementBlock("span", _hoisted_2$a, e$1.toDisplayString(_ctx.specialName ? _ctx.specialName : "SPECIAL"), 1)) : e$1.createCommentVNode("", true),
  1258. e$1.createVNode(e$1.unref(render$1), {
  1259. class: e$1.normalizeClass([{
  1260. "rotate-180": open
  1261. }, "h-6 w-6"])
  1262. }, null, 8, ["class"])
  1263. ]),
  1264. _: 2
  1265. }, 1032, ["class"]),
  1266. e$1.createVNode(e$1.unref(V), {
  1267. unmount: false,
  1268. class: "rounded-b-xl bg-[#1e1e1e80] pb-2 pt-1"
  1269. }, {
  1270. default: e$1.withCtx(() => [
  1271. e$1.renderSlot(_ctx.$slots, "default")
  1272. ]),
  1273. _: 3
  1274. })
  1275. ]),
  1276. _: 3
  1277. }, 8, ["default-open"])
  1278. ]);
  1279. };
  1280. }
  1281. });
  1282. const PGStorage = {
  1283. get: (key, defaultValue) => {
  1284. return _GM_getValue(`PGS_${key}`, defaultValue);
  1285. },
  1286. set: (key, value) => {
  1287. _GM_setValue(`PGS_${key}`, value);
  1288. }
  1289. };
  1290. ({
  1291. enableDebugRules: !!PGStorage.get("debug-rules")
  1292. });
  1293. const startTime = performance.now();
  1294. let lastTime = startTime;
  1295. let currTime = startTime;
  1296. const wrapper = (loggingFunc, isEnable) => {
  1297. {
  1298. return (...innerArgs) => {
  1299. currTime = performance.now();
  1300. const during = (currTime - lastTime).toFixed(1);
  1301. loggingFunc(`[老司机] ${during} / ${currTime.toFixed(0)} ms |`, ...innerArgs);
  1302. lastTime = currTime;
  1303. };
  1304. }
  1305. };
  1306. const log = wrapper(console.log);
  1307. const error = wrapper(console.error);
  1308. const waitForEle = async (watchEle, selector, isTargetNode) => {
  1309. let ele = watchEle.querySelector(selector);
  1310. if (ele) {
  1311. return ele;
  1312. }
  1313. return await new Promise((resolve) => {
  1314. const observer = new MutationObserver((mutationList) => {
  1315. mutationList.forEach((mutation) => {
  1316. if (mutation.addedNodes) {
  1317. mutation.addedNodes.forEach((node) => {
  1318. if (isTargetNode(node)) {
  1319. observer.disconnect();
  1320. ele = watchEle.querySelector(selector);
  1321. resolve(ele);
  1322. }
  1323. });
  1324. }
  1325. });
  1326. });
  1327. observer.observe(watchEle, { childList: true, subtree: true });
  1328. });
  1329. };
  1330. const orderedUniq = (arr) => {
  1331. return Array.from(new Set(arr));
  1332. };
  1333. function tryOnScopeDispose(fn) {
  1334. if (e$1.getCurrentScope()) {
  1335. e$1.onScopeDispose(fn);
  1336. return true;
  1337. }
  1338. return false;
  1339. }
  1340. function toValue(r2) {
  1341. return typeof r2 === "function" ? r2() : e$1.unref(r2);
  1342. }
  1343. const isClient = typeof window !== "undefined" && typeof document !== "undefined";
  1344. typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
  1345. const notNullish = (val) => val != null;
  1346. const toString = Object.prototype.toString;
  1347. const isObject = (val) => toString.call(val) === "[object Object]";
  1348. const noop = () => {
  1349. };
  1350. function createFilterWrapper(filter, fn) {
  1351. function wrapper2(...args) {
  1352. return new Promise((resolve, reject) => {
  1353. Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
  1354. });
  1355. }
  1356. return wrapper2;
  1357. }
  1358. const bypassFilter = (invoke2) => {
  1359. return invoke2();
  1360. };
  1361. function throttleFilter(...args) {
  1362. let lastExec = 0;
  1363. let timer;
  1364. let isLeading = true;
  1365. let lastRejector = noop;
  1366. let lastValue;
  1367. let ms;
  1368. let trailing;
  1369. let leading;
  1370. let rejectOnCancel;
  1371. if (!e$1.isRef(args[0]) && typeof args[0] === "object")
  1372. ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);
  1373. else
  1374. [ms, trailing = true, leading = true, rejectOnCancel = false] = args;
  1375. const clear = () => {
  1376. if (timer) {
  1377. clearTimeout(timer);
  1378. timer = undefined;
  1379. lastRejector();
  1380. lastRejector = noop;
  1381. }
  1382. };
  1383. const filter = (_invoke) => {
  1384. const duration = toValue(ms);
  1385. const elapsed = Date.now() - lastExec;
  1386. const invoke2 = () => {
  1387. return lastValue = _invoke();
  1388. };
  1389. clear();
  1390. if (duration <= 0) {
  1391. lastExec = Date.now();
  1392. return invoke2();
  1393. }
  1394. if (elapsed > duration && (leading || !isLeading)) {
  1395. lastExec = Date.now();
  1396. invoke2();
  1397. } else if (trailing) {
  1398. lastValue = new Promise((resolve, reject) => {
  1399. lastRejector = rejectOnCancel ? reject : resolve;
  1400. timer = setTimeout(() => {
  1401. lastExec = Date.now();
  1402. isLeading = true;
  1403. resolve(invoke2());
  1404. clear();
  1405. }, Math.max(0, duration - elapsed));
  1406. });
  1407. }
  1408. if (!leading && !timer)
  1409. timer = setTimeout(() => isLeading = true, duration);
  1410. isLeading = false;
  1411. return lastValue;
  1412. };
  1413. return filter;
  1414. }
  1415. function pausableFilter(extendFilter = bypassFilter) {
  1416. const isActive = e$1.ref(true);
  1417. function pause() {
  1418. isActive.value = false;
  1419. }
  1420. function resume() {
  1421. isActive.value = true;
  1422. }
  1423. const eventFilter = (...args) => {
  1424. if (isActive.value)
  1425. extendFilter(...args);
  1426. };
  1427. return { isActive: e$1.readonly(isActive), pause, resume, eventFilter };
  1428. }
  1429. function getLifeCycleTarget(target) {
  1430. return e$1.getCurrentInstance();
  1431. }
  1432. function watchWithFilter(source, cb, options = {}) {
  1433. const {
  1434. eventFilter = bypassFilter,
  1435. ...watchOptions
  1436. } = options;
  1437. return e$1.watch(
  1438. source,
  1439. createFilterWrapper(
  1440. eventFilter,
  1441. cb
  1442. ),
  1443. watchOptions
  1444. );
  1445. }
  1446. function watchPausable(source, cb, options = {}) {
  1447. const {
  1448. eventFilter: filter,
  1449. ...watchOptions
  1450. } = options;
  1451. const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
  1452. const stop = watchWithFilter(
  1453. source,
  1454. cb,
  1455. {
  1456. ...watchOptions,
  1457. eventFilter
  1458. }
  1459. );
  1460. return { stop, pause, resume, isActive };
  1461. }
  1462. function toRefs(objectRef, options = {}) {
  1463. if (!e$1.isRef(objectRef))
  1464. return e$1.toRefs(objectRef);
  1465. const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};
  1466. for (const key in objectRef.value) {
  1467. result[key] = e$1.customRef(() => ({
  1468. get() {
  1469. return objectRef.value[key];
  1470. },
  1471. set(v2) {
  1472. var _a;
  1473. const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;
  1474. if (replaceRef) {
  1475. if (Array.isArray(objectRef.value)) {
  1476. const copy = [...objectRef.value];
  1477. copy[key] = v2;
  1478. objectRef.value = copy;
  1479. } else {
  1480. const newObject = { ...objectRef.value, [key]: v2 };
  1481. Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
  1482. objectRef.value = newObject;
  1483. }
  1484. } else {
  1485. objectRef.value[key] = v2;
  1486. }
  1487. }
  1488. }));
  1489. }
  1490. return result;
  1491. }
  1492. function tryOnMounted(fn, sync = true, target) {
  1493. const instance = getLifeCycleTarget();
  1494. if (instance)
  1495. e$1.onMounted(fn, target);
  1496. else if (sync)
  1497. fn();
  1498. else
  1499. e$1.nextTick(fn);
  1500. }
  1501. function watchThrottled(source, cb, options = {}) {
  1502. const {
  1503. throttle = 0,
  1504. trailing = true,
  1505. leading = true,
  1506. ...watchOptions
  1507. } = options;
  1508. return watchWithFilter(
  1509. source,
  1510. cb,
  1511. {
  1512. ...watchOptions,
  1513. eventFilter: throttleFilter(throttle, trailing, leading)
  1514. }
  1515. );
  1516. }
  1517. const defaultWindow = isClient ? window : undefined;
  1518. function unrefElement(elRef) {
  1519. var _a;
  1520. const plain = toValue(elRef);
  1521. return (_a = plain == null ? undefined : plain.$el) != null ? _a : plain;
  1522. }
  1523. function useEventListener(...args) {
  1524. let target;
  1525. let events2;
  1526. let listeners;
  1527. let options;
  1528. if (typeof args[0] === "string" || Array.isArray(args[0])) {
  1529. [events2, listeners, options] = args;
  1530. target = defaultWindow;
  1531. } else {
  1532. [target, events2, listeners, options] = args;
  1533. }
  1534. if (!target)
  1535. return noop;
  1536. if (!Array.isArray(events2))
  1537. events2 = [events2];
  1538. if (!Array.isArray(listeners))
  1539. listeners = [listeners];
  1540. const cleanups = [];
  1541. const cleanup = () => {
  1542. cleanups.forEach((fn) => fn());
  1543. cleanups.length = 0;
  1544. };
  1545. const register = (el, event, listener, options2) => {
  1546. el.addEventListener(event, listener, options2);
  1547. return () => el.removeEventListener(event, listener, options2);
  1548. };
  1549. const stopWatch = e$1.watch(
  1550. () => [unrefElement(target), toValue(options)],
  1551. ([el, options2]) => {
  1552. cleanup();
  1553. if (!el)
  1554. return;
  1555. const optionsClone = isObject(options2) ? { ...options2 } : options2;
  1556. cleanups.push(
  1557. ...events2.flatMap((event) => {
  1558. return listeners.map((listener) => register(el, event, listener, optionsClone));
  1559. })
  1560. );
  1561. },
  1562. { immediate: true, flush: "post" }
  1563. );
  1564. const stop = () => {
  1565. stopWatch();
  1566. cleanup();
  1567. };
  1568. tryOnScopeDispose(stop);
  1569. return stop;
  1570. }
  1571. function useMounted() {
  1572. const isMounted = e$1.ref(false);
  1573. const instance = e$1.getCurrentInstance();
  1574. if (instance) {
  1575. e$1.onMounted(() => {
  1576. isMounted.value = true;
  1577. }, instance);
  1578. }
  1579. return isMounted;
  1580. }
  1581. function useSupported(callback) {
  1582. const isMounted = useMounted();
  1583. return e$1.computed(() => {
  1584. isMounted.value;
  1585. return Boolean(callback());
  1586. });
  1587. }
  1588. function useMutationObserver(target, callback, options = {}) {
  1589. const { window: window2 = defaultWindow, ...mutationOptions } = options;
  1590. let observer;
  1591. const isSupported = useSupported(() => window2 && "MutationObserver" in window2);
  1592. const cleanup = () => {
  1593. if (observer) {
  1594. observer.disconnect();
  1595. observer = undefined;
  1596. }
  1597. };
  1598. const targets = e$1.computed(() => {
  1599. const value = toValue(target);
  1600. const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);
  1601. return new Set(items);
  1602. });
  1603. const stopWatch = e$1.watch(
  1604. () => targets.value,
  1605. (targets2) => {
  1606. cleanup();
  1607. if (isSupported.value && targets2.size) {
  1608. observer = new MutationObserver(callback);
  1609. targets2.forEach((el) => observer.observe(el, mutationOptions));
  1610. }
  1611. },
  1612. { immediate: true, flush: "post" }
  1613. );
  1614. const takeRecords = () => {
  1615. return observer == null ? undefined : observer.takeRecords();
  1616. };
  1617. const stop = () => {
  1618. stopWatch();
  1619. cleanup();
  1620. };
  1621. tryOnScopeDispose(stop);
  1622. return {
  1623. isSupported,
  1624. stop,
  1625. takeRecords
  1626. };
  1627. }
  1628. function useMediaQuery(query, options = {}) {
  1629. const { window: window2 = defaultWindow } = options;
  1630. const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
  1631. let mediaQuery;
  1632. const matches = e$1.ref(false);
  1633. const handler = (event) => {
  1634. matches.value = event.matches;
  1635. };
  1636. const cleanup = () => {
  1637. if (!mediaQuery)
  1638. return;
  1639. if ("removeEventListener" in mediaQuery)
  1640. mediaQuery.removeEventListener("change", handler);
  1641. else
  1642. mediaQuery.removeListener(handler);
  1643. };
  1644. const stopWatch = e$1.watchEffect(() => {
  1645. if (!isSupported.value)
  1646. return;
  1647. cleanup();
  1648. mediaQuery = window2.matchMedia(toValue(query));
  1649. if ("addEventListener" in mediaQuery)
  1650. mediaQuery.addEventListener("change", handler);
  1651. else
  1652. mediaQuery.addListener(handler);
  1653. matches.value = mediaQuery.matches;
  1654. });
  1655. tryOnScopeDispose(() => {
  1656. stopWatch();
  1657. cleanup();
  1658. mediaQuery = undefined;
  1659. });
  1660. return matches;
  1661. }
  1662. const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  1663. const globalKey = "__vueuse_ssr_handlers__";
  1664. const handlers = /* @__PURE__ */ getHandlers();
  1665. function getHandlers() {
  1666. if (!(globalKey in _global))
  1667. _global[globalKey] = _global[globalKey] || {};
  1668. return _global[globalKey];
  1669. }
  1670. function getSSRHandler(key, fallback) {
  1671. return handlers[key] || fallback;
  1672. }
  1673. function guessSerializerType(rawInit) {
  1674. return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
  1675. }
  1676. const StorageSerializers = {
  1677. boolean: {
  1678. read: (v2) => v2 === "true",
  1679. write: (v2) => String(v2)
  1680. },
  1681. object: {
  1682. read: (v2) => JSON.parse(v2),
  1683. write: (v2) => JSON.stringify(v2)
  1684. },
  1685. number: {
  1686. read: (v2) => Number.parseFloat(v2),
  1687. write: (v2) => String(v2)
  1688. },
  1689. any: {
  1690. read: (v2) => v2,
  1691. write: (v2) => String(v2)
  1692. },
  1693. string: {
  1694. read: (v2) => v2,
  1695. write: (v2) => String(v2)
  1696. },
  1697. map: {
  1698. read: (v2) => new Map(JSON.parse(v2)),
  1699. write: (v2) => JSON.stringify(Array.from(v2.entries()))
  1700. },
  1701. set: {
  1702. read: (v2) => new Set(JSON.parse(v2)),
  1703. write: (v2) => JSON.stringify(Array.from(v2))
  1704. },
  1705. date: {
  1706. read: (v2) => new Date(v2),
  1707. write: (v2) => v2.toISOString()
  1708. }
  1709. };
  1710. const customStorageEventName = "vueuse-storage";
  1711. function useStorage(key, defaults2, storage, options = {}) {
  1712. var _a;
  1713. const {
  1714. flush = "pre",
  1715. deep = true,
  1716. listenToStorageChanges = true,
  1717. writeDefaults = true,
  1718. mergeDefaults = false,
  1719. shallow,
  1720. window: window2 = defaultWindow,
  1721. eventFilter,
  1722. onError = (e2) => {
  1723. console.error(e2);
  1724. },
  1725. initOnMounted
  1726. } = options;
  1727. const data = (shallow ? e$1.shallowRef : e$1.ref)(typeof defaults2 === "function" ? defaults2() : defaults2);
  1728. if (!storage) {
  1729. try {
  1730. storage = getSSRHandler("getDefaultStorage", () => {
  1731. var _a2;
  1732. return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
  1733. })();
  1734. } catch (e2) {
  1735. onError(e2);
  1736. }
  1737. }
  1738. if (!storage)
  1739. return data;
  1740. const rawInit = toValue(defaults2);
  1741. const type = guessSerializerType(rawInit);
  1742. const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
  1743. const { pause: pauseWatch, resume: resumeWatch } = watchPausable(
  1744. data,
  1745. () => write(data.value),
  1746. { flush, deep, eventFilter }
  1747. );
  1748. if (window2 && listenToStorageChanges) {
  1749. tryOnMounted(() => {
  1750. if (storage instanceof Storage)
  1751. useEventListener(window2, "storage", update);
  1752. else
  1753. useEventListener(window2, customStorageEventName, updateFromCustomEvent);
  1754. if (initOnMounted)
  1755. update();
  1756. });
  1757. }
  1758. if (!initOnMounted)
  1759. update();
  1760. function dispatchWriteEvent(oldValue, newValue) {
  1761. if (window2) {
  1762. const payload = {
  1763. key,
  1764. oldValue,
  1765. newValue,
  1766. storageArea: storage
  1767. };
  1768. window2.dispatchEvent(storage instanceof Storage ? new StorageEvent("storage", payload) : new CustomEvent(customStorageEventName, {
  1769. detail: payload
  1770. }));
  1771. }
  1772. }
  1773. function write(v2) {
  1774. try {
  1775. const oldValue = storage.getItem(key);
  1776. if (v2 == null) {
  1777. dispatchWriteEvent(oldValue, null);
  1778. storage.removeItem(key);
  1779. } else {
  1780. const serialized = serializer.write(v2);
  1781. if (oldValue !== serialized) {
  1782. storage.setItem(key, serialized);
  1783. dispatchWriteEvent(oldValue, serialized);
  1784. }
  1785. }
  1786. } catch (e2) {
  1787. onError(e2);
  1788. }
  1789. }
  1790. function read(event) {
  1791. const rawValue = event ? event.newValue : storage.getItem(key);
  1792. if (rawValue == null) {
  1793. if (writeDefaults && rawInit != null)
  1794. storage.setItem(key, serializer.write(rawInit));
  1795. return rawInit;
  1796. } else if (!event && mergeDefaults) {
  1797. const value = serializer.read(rawValue);
  1798. if (typeof mergeDefaults === "function")
  1799. return mergeDefaults(value, rawInit);
  1800. else if (type === "object" && !Array.isArray(value))
  1801. return { ...rawInit, ...value };
  1802. return value;
  1803. } else if (typeof rawValue !== "string") {
  1804. return rawValue;
  1805. } else {
  1806. return serializer.read(rawValue);
  1807. }
  1808. }
  1809. function update(event) {
  1810. if (event && event.storageArea !== storage)
  1811. return;
  1812. if (event && event.key == null) {
  1813. data.value = rawInit;
  1814. return;
  1815. }
  1816. if (event && event.key !== key)
  1817. return;
  1818. pauseWatch();
  1819. try {
  1820. if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))
  1821. data.value = read(event);
  1822. } catch (e2) {
  1823. onError(e2);
  1824. } finally {
  1825. if (event)
  1826. e$1.nextTick(resumeWatch);
  1827. else
  1828. resumeWatch();
  1829. }
  1830. }
  1831. function updateFromCustomEvent(event) {
  1832. update(event.detail);
  1833. }
  1834. return data;
  1835. }
  1836. function useDraggable(target, options = {}) {
  1837. var _a, _b;
  1838. const {
  1839. pointerTypes,
  1840. preventDefault: preventDefault2,
  1841. stopPropagation,
  1842. exact,
  1843. onMove,
  1844. onEnd,
  1845. onStart,
  1846. initialValue,
  1847. axis = "both",
  1848. draggingElement = defaultWindow,
  1849. containerElement,
  1850. handle: draggingHandle = target,
  1851. buttons = [0]
  1852. } = options;
  1853. const position = e$1.ref(
  1854. (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }
  1855. );
  1856. const pressedDelta = e$1.ref();
  1857. const filterEvent = (e2) => {
  1858. if (pointerTypes)
  1859. return pointerTypes.includes(e2.pointerType);
  1860. return true;
  1861. };
  1862. const handleEvent = (e2) => {
  1863. if (toValue(preventDefault2))
  1864. e2.preventDefault();
  1865. if (toValue(stopPropagation))
  1866. e2.stopPropagation();
  1867. };
  1868. const start = (e2) => {
  1869. var _a2;
  1870. if (!toValue(buttons).includes(e2.button))
  1871. return;
  1872. if (toValue(options.disabled) || !filterEvent(e2))
  1873. return;
  1874. if (toValue(exact) && e2.target !== toValue(target))
  1875. return;
  1876. const container = toValue(containerElement);
  1877. const containerRect = (_a2 = container == null ? undefined : container.getBoundingClientRect) == null ? undefined : _a2.call(container);
  1878. const targetRect = toValue(target).getBoundingClientRect();
  1879. const pos = {
  1880. x: e2.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),
  1881. y: e2.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)
  1882. };
  1883. if ((onStart == null ? undefined : onStart(pos, e2)) === false)
  1884. return;
  1885. pressedDelta.value = pos;
  1886. handleEvent(e2);
  1887. };
  1888. const move = (e2) => {
  1889. if (toValue(options.disabled) || !filterEvent(e2))
  1890. return;
  1891. if (!pressedDelta.value)
  1892. return;
  1893. const container = toValue(containerElement);
  1894. const targetRect = toValue(target).getBoundingClientRect();
  1895. let { x, y: y2 } = position.value;
  1896. if (axis === "x" || axis === "both") {
  1897. x = e2.clientX - pressedDelta.value.x;
  1898. if (container)
  1899. x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);
  1900. }
  1901. if (axis === "y" || axis === "both") {
  1902. y2 = e2.clientY - pressedDelta.value.y;
  1903. if (container)
  1904. y2 = Math.min(Math.max(0, y2), container.scrollHeight - targetRect.height);
  1905. }
  1906. position.value = {
  1907. x,
  1908. y: y2
  1909. };
  1910. onMove == null ? undefined : onMove(position.value, e2);
  1911. handleEvent(e2);
  1912. };
  1913. const end = (e2) => {
  1914. if (toValue(options.disabled) || !filterEvent(e2))
  1915. return;
  1916. if (!pressedDelta.value)
  1917. return;
  1918. pressedDelta.value = undefined;
  1919. onEnd == null ? undefined : onEnd(position.value, e2);
  1920. handleEvent(e2);
  1921. };
  1922. if (isClient) {
  1923. const config = { capture: (_b = options.capture) != null ? _b : true };
  1924. useEventListener(draggingHandle, "pointerdown", start, config);
  1925. useEventListener(draggingElement, "pointermove", move, config);
  1926. useEventListener(draggingElement, "pointerup", end, config);
  1927. }
  1928. return {
  1929. ...toRefs(position),
  1930. position,
  1931. isDragging: e$1.computed(() => !!pressedDelta.value),
  1932. style: e$1.computed(
  1933. () => `left:${position.value.x}px;top:${position.value.y}px;`
  1934. )
  1935. };
  1936. }
  1937. function useResizeObserver(target, callback, options = {}) {
  1938. const { window: window2 = defaultWindow, ...observerOptions } = options;
  1939. let observer;
  1940. const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
  1941. const cleanup = () => {
  1942. if (observer) {
  1943. observer.disconnect();
  1944. observer = undefined;
  1945. }
  1946. };
  1947. const targets = e$1.computed(() => {
  1948. const _targets = toValue(target);
  1949. return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
  1950. });
  1951. const stopWatch = e$1.watch(
  1952. targets,
  1953. (els) => {
  1954. cleanup();
  1955. if (isSupported.value && window2) {
  1956. observer = new ResizeObserver(callback);
  1957. for (const _el of els) {
  1958. if (_el)
  1959. observer.observe(_el, observerOptions);
  1960. }
  1961. }
  1962. },
  1963. { immediate: true, flush: "post" }
  1964. );
  1965. const stop = () => {
  1966. cleanup();
  1967. stopWatch();
  1968. };
  1969. tryOnScopeDispose(stop);
  1970. return {
  1971. isSupported,
  1972. stop
  1973. };
  1974. }
  1975. function useElementBounding(target, options = {}) {
  1976. const {
  1977. reset = true,
  1978. windowResize = true,
  1979. windowScroll = true,
  1980. immediate = true,
  1981. updateTiming = "sync"
  1982. } = options;
  1983. const height = e$1.ref(0);
  1984. const bottom = e$1.ref(0);
  1985. const left = e$1.ref(0);
  1986. const right = e$1.ref(0);
  1987. const top2 = e$1.ref(0);
  1988. const width = e$1.ref(0);
  1989. const x = e$1.ref(0);
  1990. const y2 = e$1.ref(0);
  1991. function recalculate() {
  1992. const el = unrefElement(target);
  1993. if (!el) {
  1994. if (reset) {
  1995. height.value = 0;
  1996. bottom.value = 0;
  1997. left.value = 0;
  1998. right.value = 0;
  1999. top2.value = 0;
  2000. width.value = 0;
  2001. x.value = 0;
  2002. y2.value = 0;
  2003. }
  2004. return;
  2005. }
  2006. const rect = el.getBoundingClientRect();
  2007. height.value = rect.height;
  2008. bottom.value = rect.bottom;
  2009. left.value = rect.left;
  2010. right.value = rect.right;
  2011. top2.value = rect.top;
  2012. width.value = rect.width;
  2013. x.value = rect.x;
  2014. y2.value = rect.y;
  2015. }
  2016. function update() {
  2017. if (updateTiming === "sync")
  2018. recalculate();
  2019. else if (updateTiming === "next-frame")
  2020. requestAnimationFrame(() => recalculate());
  2021. }
  2022. useResizeObserver(target, update);
  2023. e$1.watch(() => unrefElement(target), (ele) => !ele && update());
  2024. useMutationObserver(target, update, {
  2025. attributeFilter: ["style", "class"]
  2026. });
  2027. if (windowScroll)
  2028. useEventListener("scroll", update, { capture: true, passive: true });
  2029. if (windowResize)
  2030. useEventListener("resize", update, { passive: true });
  2031. tryOnMounted(() => {
  2032. if (immediate)
  2033. update();
  2034. });
  2035. return {
  2036. height,
  2037. bottom,
  2038. left,
  2039. right,
  2040. top: top2,
  2041. width,
  2042. x,
  2043. y: y2,
  2044. update
  2045. };
  2046. }
  2047. function useWindowSize(options = {}) {
  2048. const {
  2049. window: window2 = defaultWindow,
  2050. initialWidth = Number.POSITIVE_INFINITY,
  2051. initialHeight = Number.POSITIVE_INFINITY,
  2052. listenOrientation = true,
  2053. includeScrollbar = true,
  2054. type = "inner"
  2055. } = options;
  2056. const width = e$1.ref(initialWidth);
  2057. const height = e$1.ref(initialHeight);
  2058. const update = () => {
  2059. if (window2) {
  2060. if (type === "outer") {
  2061. width.value = window2.outerWidth;
  2062. height.value = window2.outerHeight;
  2063. } else if (includeScrollbar) {
  2064. width.value = window2.innerWidth;
  2065. height.value = window2.innerHeight;
  2066. } else {
  2067. width.value = window2.document.documentElement.clientWidth;
  2068. height.value = window2.document.documentElement.clientHeight;
  2069. }
  2070. }
  2071. };
  2072. update();
  2073. tryOnMounted(update);
  2074. useEventListener("resize", update, { passive: true });
  2075. if (listenOrientation) {
  2076. const matches = useMediaQuery("(orientation: portrait)");
  2077. e$1.watch(matches, () => update());
  2078. }
  2079. return { width, height };
  2080. }
  2081. const _hoisted_1$a = { class: "font-serif text-xl text-white" };
  2082. const _hoisted_2$9 = { class: "mb-2 text-xl font-semibold" };
  2083. const _hoisted_3$4 = { class: "text-white" };
  2084. const _hoisted_4$4 = { class: "rounded-md bg-[#ff9000] p-1 text-black" };
  2085. const _hoisted_5$2 = { class: "no-scrollbar flex min-h-[calc(100%-2.5rem)] flex-1 flex-col p-2" };
  2086. const _sfc_main$b = /* @__PURE__ */ e$1.defineComponent({
  2087. __name: "PanelComp",
  2088. props: {
  2089. title: {},
  2090. widthPercent: {},
  2091. heightPercent: {},
  2092. minWidth: {},
  2093. minHeight: {}
  2094. },
  2095. emits: ["close"],
  2096. setup(__props, { emit: __emit }) {
  2097. const emit = __emit;
  2098. const props = __props;
  2099. const panel = e$1.ref(null);
  2100. const bar = e$1.ref(null);
  2101. const windowSize = useWindowSize({ includeScrollbar: false });
  2102. const { width, height } = useElementBounding(bar, { windowScroll: false });
  2103. const maxPos = e$1.computed(() => {
  2104. return {
  2105. x: windowSize.width.value - width.value,
  2106. y: windowSize.height.value - height.value
  2107. };
  2108. });
  2109. let rAF = 0;
  2110. const { style } = useDraggable(panel, {
  2111. initialValue: {
  2112. x: windowSize.width.value / 2 - Math.max(windowSize.width.value * props.widthPercent / 100, props.minWidth) / 2,
  2113. y: windowSize.height.value / 2 - Math.max(windowSize.height.value * props.heightPercent / 100, props.minHeight) / 2
  2114. },
  2115. handle: e$1.computed(() => bar.value),
  2116. preventDefault: true,
  2117. // 限制拖拽范围
  2118. onMove: (pos) => {
  2119. cancelAnimationFrame(rAF);
  2120. rAF = requestAnimationFrame(() => {
  2121. if (pos.x < 0) {
  2122. pos.x = 0;
  2123. }
  2124. if (pos.y < 0) {
  2125. pos.y = 0;
  2126. }
  2127. if (pos.x > maxPos.value.x) {
  2128. pos.x = maxPos.value.x;
  2129. }
  2130. if (pos.y > maxPos.value.y) {
  2131. pos.y = maxPos.value.y;
  2132. }
  2133. });
  2134. }
  2135. });
  2136. const panelStyle = e$1.computed(() => {
  2137. return {
  2138. width: props.widthPercent + "vw",
  2139. height: props.heightPercent + "vh",
  2140. minWidth: props.minWidth + "px",
  2141. minHeight: props.minHeight + "px"
  2142. };
  2143. });
  2144. return (_ctx, _cache) => {
  2145. return e$1.openBlock(), e$1.createElementBlock("div", {
  2146. ref_key: "panel",
  2147. ref: panel,
  2148. style: e$1.normalizeStyle([panelStyle.value, e$1.unref(style)]),
  2149. class: "no-scrollbar fixed z-[10000000] select-none overflow-auto overscroll-none rounded-xl bg-black shadow-lg will-change-[top,left]"
  2150. }, [
  2151. e$1.createElementVNode("div", {
  2152. ref_key: "bar",
  2153. ref: bar,
  2154. class: "sticky top-0 z-10 w-full cursor-move bg-[#0e0e0e] py-1.5 text-center"
  2155. }, [
  2156. e$1.createElementVNode("div", _hoisted_1$a, [
  2157. e$1.createElementVNode("h3", _hoisted_2$9, [
  2158. e$1.createElementVNode("span", _hoisted_3$4, e$1.toDisplayString(_ctx.title.split("&")[0]), 1),
  2159. e$1.createElementVNode("span", _hoisted_4$4, e$1.toDisplayString(_ctx.title.split("&")[1]), 1)
  2160. ])
  2161. ]),
  2162. e$1.createElementVNode("i", {
  2163. class: "absolute right-0 top-0 m-1 cursor-pointer text-[#c6c6c6] hover:text-white",
  2164. onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
  2165. }, _cache[1] || (_cache[1] = [
  2166. e$1.createElementVNode("svg", {
  2167. xmlns: "http://www.w3.org/2000/svg",
  2168. fill: "none",
  2169. viewBox: "0 0 24 24",
  2170. "stroke-width": "2.5",
  2171. stroke: "currentColor",
  2172. class: "size-8"
  2173. }, [
  2174. e$1.createElementVNode("path", {
  2175. "stroke-linecap": "round",
  2176. "stroke-linejoin": "round",
  2177. d: "M6 18 18 6M6 6l12 12"
  2178. })
  2179. ], -1)
  2180. ]))
  2181. ], 512),
  2182. e$1.createElementVNode("div", _hoisted_5$2, [
  2183. e$1.renderSlot(_ctx.$slots, "default")
  2184. ])
  2185. ], 4);
  2186. };
  2187. }
  2188. });
  2189. const _hoisted_1$9 = {
  2190. key: 0,
  2191. class: "mb-1.5"
  2192. };
  2193. const _hoisted_2$8 = { class: "text-sm leading-6 text-[#767676]" };
  2194. const _sfc_main$a = /* @__PURE__ */ e$1.defineComponent({
  2195. __name: "DescriptionComp",
  2196. props: {
  2197. description: {}
  2198. },
  2199. setup(__props) {
  2200. return (_ctx, _cache) => {
  2201. var _a;
  2202. return ((_a = _ctx.description) == null ? undefined : _a.length) ? (e$1.openBlock(), e$1.createElementBlock("div", _hoisted_1$9, [
  2203. e$1.createElementVNode("div", _hoisted_2$8, [
  2204. (e$1.openBlock(true), e$1.createElementBlock(e$1.Fragment, null, e$1.renderList(_ctx.description, (line, index) => {
  2205. return e$1.openBlock(), e$1.createElementBlock("div", { key: index }, [
  2206. e$1.createElementVNode("p", null, [
  2207. _cache[0] || (_cache[0] = e$1.createElementVNode("span", { class: "mr-1" }, "•", -1)),
  2208. e$1.createTextVNode(e$1.toDisplayString(line), 1)
  2209. ])
  2210. ]);
  2211. }), 128))
  2212. ])
  2213. ])) : e$1.createCommentVNode("", true);
  2214. };
  2215. }
  2216. });
  2217. const language$1 = {
  2218. title: "老司机&修炼手册",
  2219. menu: "快捷&菜单",
  2220. panel: "显示/隐藏 面板",
  2221. side_btn: "显示/隐藏 快捷键",
  2222. basic_settings: "全局 - 基本设置",
  2223. language: "language",
  2224. language_description: [
  2225. "刷新页面生效",
  2226. "刷新頁面生效",
  2227. "Refresh the page to take effect",
  2228. "ページをリフレッシュして有効になります",
  2229. "페이지를 새로고침하여 적용됩니다"
  2230. ],
  2231. editorBtn: "编辑",
  2232. editorPlaceholder: "请输入内容....",
  2233. editorSaveBtn: "保存",
  2234. editorCloseBtn: "关闭",
  2235. missav: {
  2236. common: {
  2237. basic: {
  2238. name: "全站通用 - 基本功能",
  2239. remove_ads: "移除 广告",
  2240. hide_footer: "隐藏 页底footer",
  2241. hide_new_site_banner: "隐藏 新站复活横幅",
  2242. redirect_new_url: "重定向 到新站点",
  2243. auto_login_email_password: "编辑 账号信息",
  2244. auto_login_email_password_description: ["自动登录所用账号信息"],
  2245. auto_login_email_password_editorTitle: "账号&信息",
  2246. auto_login_email_password_editorDescription: [
  2247. "格式如下:",
  2248. "第一行email, 第二行password"
  2249. ],
  2250. auto_login: "自动 登录"
  2251. },
  2252. header: {
  2253. name: "全站通用 - 顶栏",
  2254. hide_logo: "隐藏 LOGO",
  2255. hide_live_cam_sex: "隐藏 色色主播(广告)",
  2256. hide_comic: "隐藏 无广告免费漫画(广告)",
  2257. hide_subtitle: "隐藏 中文字幕",
  2258. hide_watch_jav: "隐藏 观看日本AV",
  2259. hide_amateur: "隐藏 素人",
  2260. hide_uncensored: "隐藏 无码影片",
  2261. hide_asia_av: "隐藏 国产AV",
  2262. hide_my_collection: "隐藏 我的收藏",
  2263. hide_upgrade_vip: "隐藏 升级VIP",
  2264. hide_upgrade_vip_description: [
  2265. "PC端(宽屏)在我的收藏中",
  2266. "移动端(窄屏)在选单中"
  2267. ],
  2268. hide_more_sites: "隐藏 更多好站(广告)",
  2269. hide_tg: "隐藏 官方电报群(广告)",
  2270. hide_search: "隐藏 搜寻",
  2271. hide_locale_switcher: "隐藏 切换语言",
  2272. hide_site_live: "隐藏 地址发布",
  2273. hide_site_live_description: ["仅在移动端(窄屏)选单中"],
  2274. hide_mobile_right_menu: "隐藏 选单",
  2275. hide_mobile_right_menu_description: [
  2276. "仅移动端(窄屏)显示选单按钮"
  2277. ]
  2278. }
  2279. },
  2280. home: {
  2281. basic: {
  2282. name: "主页 - 基本功能",
  2283. blur_video_image: "模糊 视频图片",
  2284. blur_video_image_description: [
  2285. "同步生效:首页、搜索页、视频页"
  2286. ],
  2287. blur_video_title: "模糊 视频标题",
  2288. blur_video_title_description: [
  2289. "同步生效:首页、搜索页、视频页"
  2290. ],
  2291. hide_search_title: "隐藏 搜索框上方文字",
  2292. hide_search_box: "隐藏 搜索框",
  2293. hide_search_history: "隐藏 搜索历史",
  2294. hide_video_genres: "隐藏 视频类型",
  2295. hide_video_genres_description: [
  2296. "同步生效:首页、搜索页、视频页"
  2297. ],
  2298. hide_video_duration: "隐藏 视频时长",
  2299. hide_video_duration_description: [
  2300. "同步生效:首页、搜索页、视频页"
  2301. ],
  2302. revert_full_title: "显示 完整标题",
  2303. revert_full_title_description: [
  2304. "同步生效:首页、搜索页、视频页"
  2305. ]
  2306. },
  2307. video: {
  2308. name: "主页 - 视频功能",
  2309. recommended_video_load_more: "加载 更多推荐视频",
  2310. recommended_video_quantity_load_number: "自定义 推荐视频数量"
  2311. }
  2312. },
  2313. search: {
  2314. basic: { name: "搜索页 - 基本功能" }
  2315. },
  2316. video: {
  2317. basic: {
  2318. name: "播放页 - 基本功能",
  2319. auto_switch_uncensored: "自动 切换无码",
  2320. auto_switch_uncensored_description: [
  2321. "仅在打开普通视频时生效",
  2322. "查找并自动切换"
  2323. ]
  2324. },
  2325. player: {
  2326. name: "播放页 - 播放器",
  2327. hide_new_site_banner: "隐藏 新域名通知",
  2328. auto_quality: "自动 最高画质",
  2329. speed: "修改 播放速度(-1 禁用)",
  2330. speed_addonText: "倍",
  2331. volume: "修改 播放音量(-1 禁用)",
  2332. volume_addonText: "%",
  2333. hide_play_btn: "隐藏 大播放键",
  2334. hide_play_btn_description: ["视频暂停时显示"],
  2335. cancel_focus_stop: "取消 失去焦点自动暂停",
  2336. hook_open_window: "拦截 播放时打开窗口"
  2337. },
  2338. playerContorl: {
  2339. name: "播放页 - 播放控制栏",
  2340. hide_prev: "隐藏 快退按钮",
  2341. hide_play: "隐藏 播放/暂停按钮",
  2342. hide_next: "隐藏 快进按钮",
  2343. hide_progress: "隐藏 进度条",
  2344. hide_subtitle: "隐藏 字幕按钮",
  2345. hide_volume: "隐藏 音量按钮",
  2346. hide_setting: "隐藏 视频设置按钮",
  2347. hide_pip: "隐藏 画中画按钮",
  2348. hide_full: "隐藏 全屏按钮",
  2349. hide_jump: "隐藏 快进控制栏",
  2350. hide_jump_description: ["仅移动端(窄屏)显示"],
  2351. hide_loop: "隐藏 循环播放控制栏"
  2352. },
  2353. toolbar: {
  2354. name: "播放页 - 视频下方",
  2355. hide_save: "隐藏 收藏",
  2356. hide_playlist: "隐藏 片单",
  2357. hide_download: "隐藏 下载",
  2358. hide_share: "隐藏 分享",
  2359. show_m3u8: "获取 M3U8",
  2360. show_m3u8_description: ["截取并显示m3u8, 可使用其他播放器播放"],
  2361. auto_show_more: "展开 显示更多"
  2362. }
  2363. }
  2364. },
  2365. jabletv: {
  2366. common: {
  2367. basic: {
  2368. name: "全站通用 - 基本功能",
  2369. remove_ads: "移除 广告",
  2370. hide_footer: "隐藏 页底footer"
  2371. },
  2372. header: {
  2373. name: "全站通用 - 顶栏",
  2374. hide_logo: "隐藏 LOGO",
  2375. hide_new: "隐藏 新作",
  2376. hide_blu_ray: "隐藏 藍光無碼(广告)",
  2377. hide_live_sex: "隐藏 成人直播(广告)",
  2378. hide_best_porns: "隐藏 色網大全(广告)",
  2379. hide_more_sites: "隐藏 更多好站(广告)",
  2380. hide_sex_chat: "隐藏 裸聊(广告)",
  2381. hide_javhd: "隐藏 無修正動画(广告)",
  2382. hide_search: "隐藏 搜索",
  2383. hide_lang: "隐藏 语言",
  2384. hide_settings: "隐藏 头像(登入/设置)"
  2385. }
  2386. },
  2387. home: {
  2388. basic: {
  2389. name: "主页 - 基本功能",
  2390. blur_video_image: "模糊 视频图片",
  2391. blur_video_image_description: [
  2392. "同步生效:首页、搜索页、视频页"
  2393. ],
  2394. blur_video_title: "模糊 视频标题",
  2395. blur_video_title_description: [
  2396. "同步生效:首页、搜索页、视频页"
  2397. ],
  2398. hide_video_like: "隐藏 视频点赞",
  2399. hide_video_like_description: ["同步生效:首页、搜索页、视频页"],
  2400. hide_video_duration: "隐藏 视频时长",
  2401. hide_video_duration_description: [
  2402. "同步生效:首页、搜索页、视频页"
  2403. ],
  2404. revert_full_title: "显示 完整标题",
  2405. revert_full_title_description: [
  2406. "同步生效:首页、搜索页、视频页"
  2407. ],
  2408. hide_video_data: "隐藏 视频数据",
  2409. hide_video_data_description: ["同步生效:首页、搜索页、视频页"],
  2410. hide_video_carousel: "隐藏 视频精选",
  2411. hide_section_sub_title: "隐藏 板块副标题"
  2412. }
  2413. },
  2414. search: {
  2415. basic: { name: "搜索页 - 基本功能" }
  2416. },
  2417. video: {
  2418. basic: {
  2419. name: "播放页 - 基本功能"
  2420. },
  2421. player: {
  2422. name: "播放页 - 播放器"
  2423. },
  2424. playerContorl: {
  2425. name: "播放页 - 播放控制栏"
  2426. },
  2427. toolbar: {
  2428. name: "播放页 - 视频下方"
  2429. }
  2430. }
  2431. }
  2432. };
  2433. const language = {
  2434. title: "Porn&Enhance",
  2435. menu: "Show&Menu",
  2436. panel: "Show/Hide Menu Panel",
  2437. side_btn: "Show/Hide Side Button",
  2438. basic_settings: "Global - Basic",
  2439. language: "language",
  2440. language_description: [
  2441. "刷新页面生效",
  2442. "刷新頁面生效",
  2443. "Refresh the page to take effect",
  2444. "ページをリフレッシュして有効になります",
  2445. "페이지를 새로고침하여 적용됩니다"
  2446. ],
  2447. editorBtn: "Edit",
  2448. editorPlaceholder: "Please enter the content...",
  2449. editorSaveBtn: "Save",
  2450. editorCloseBtn: "Close",
  2451. missav: {
  2452. common: {
  2453. basic: {
  2454. name: "Common - Basic",
  2455. remove_ads: "Remove Ads",
  2456. hide_footer: "Hide Footer",
  2457. hide_new_site_banner: "Hide New Site Banner",
  2458. redirect_new_url: "Redirect To New Site",
  2459. auto_login_email_password: "Edit Account Info",
  2460. auto_login_email_password_description: ["Auto Login Account Info"],
  2461. auto_login_email_password_editorTitle: "Account&Info",
  2462. auto_login_email_password_editorDescription: [
  2463. "The format is as follows :",
  2464. "email on the first line, password on the second line"
  2465. ],
  2466. auto_login: "Auto Login"
  2467. },
  2468. header: {
  2469. name: "Common - Header",
  2470. hide_logo: "Hide LOGO",
  2471. hide_live_cam_sex: "Hide Live Cam Sex(AD)",
  2472. hide_comic: "Hide Comic(AD)",
  2473. hide_subtitle: "Hide English subtitle",
  2474. hide_watch_jav: "Hide Watch JAV",
  2475. hide_amateur: "Hide Amateur",
  2476. hide_uncensored: "Hide Uncensored",
  2477. hide_asia_av: "Hide Asia AV",
  2478. hide_my_collection: "Hide My collection",
  2479. hide_upgrade_vip: "Hide Upgrade VIP",
  2480. hide_upgrade_vip_description: [
  2481. "PC (wide screen) In My collection",
  2482. "Mobile (narrow screen) In Right Menu"
  2483. ],
  2484. hide_more_sites: "Hide More sites(AD)",
  2485. hide_tg: "Hide Telegram Group(AD)",
  2486. hide_search: "Hide Search",
  2487. hide_locale_switcher: "Hide Locale Switcher",
  2488. hide_site_live: "Hide Website Publish",
  2489. hide_site_live_description: [
  2490. "Only Displayed In mobile (narrow screen) Right Menu",
  2491. "Not display when page is in English"
  2492. ],
  2493. hide_mobile_right_menu: "Hide Right Menu",
  2494. hide_mobile_right_menu_description: [
  2495. "Only Displayed On Mobile (narrow screen)"
  2496. ]
  2497. }
  2498. },
  2499. home: {
  2500. basic: {
  2501. name: "HomePage - Basic",
  2502. blur_video_image: "Blur Video Image",
  2503. blur_video_image_description: [
  2504. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2505. ],
  2506. blur_video_title: "Blur Video Title",
  2507. blur_video_title_description: [
  2508. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2509. ],
  2510. hide_search_title: "Hide Search Title",
  2511. hide_search_box: "Hide Search Box",
  2512. hide_search_history: "Hide Search History",
  2513. hide_video_genres: "Hide Video Genres",
  2514. hide_video_genres_description: [
  2515. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2516. ],
  2517. hide_video_duration: "Hide Video Duration",
  2518. hide_video_duration_description: [
  2519. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2520. ],
  2521. revert_full_title: "Revert Full Video Title",
  2522. revert_full_title_description: [
  2523. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2524. ]
  2525. },
  2526. video: {
  2527. name: "HomePage - Video",
  2528. recommended_video_load_more: "Load More Recommended Video",
  2529. recommended_video_quantity_load_number: "Customize Recommended Video Quantity"
  2530. }
  2531. },
  2532. search: {
  2533. basic: { name: "SearchPage - Basic" }
  2534. },
  2535. video: {
  2536. basic: {
  2537. name: "VideoPage - Basic",
  2538. auto_switch_uncensored: "Auto Switch Uncensored",
  2539. auto_switch_uncensored_description: [
  2540. "Effective only when opening a standard video"
  2541. ]
  2542. },
  2543. player: {
  2544. name: "VideoPage - Player",
  2545. hide_new_site_banner: "Hide New Site Banner",
  2546. auto_quality: "Auto Quality",
  2547. speed: "Modify Speed(-1 Disable)",
  2548. speed_addonText: "x",
  2549. volume: "Modify Volume(-1 Disable)",
  2550. volume_addonText: "%",
  2551. hide_play_btn: "Hide Play Button",
  2552. hide_play_btn_description: ["displayed when video is paused"],
  2553. cancel_focus_stop: "Cancel Auto-pause",
  2554. hook_open_window: "Block Open AD Window"
  2555. },
  2556. playerContorl: {
  2557. name: "VideoPage - PlayerContorl",
  2558. hide_prev: "Hide Prev Button",
  2559. hide_play: "Hide Play/Pause Button",
  2560. hide_next: "Hide Next Button",
  2561. hide_progress: "Hide Progress Bar",
  2562. hide_subtitle: "Hide Subtitle Button",
  2563. hide_volume: "Hide Volume Button",
  2564. hide_setting: "Hide Settings Button",
  2565. hide_pip: "Hide PIP Button",
  2566. hide_full: "Hide Full Screen Buttons ",
  2567. hide_jump: "Hide Jump Control",
  2568. hide_jump_description: [
  2569. "Only Displayed On Mobile (narrow screen)"
  2570. ],
  2571. hide_loop: "Hide Loop Control"
  2572. },
  2573. toolbar: {
  2574. name: "VideoPage - Toolbar",
  2575. hide_save: "Hide Saved",
  2576. hide_playlist: "Hide Playlist",
  2577. hide_download: "Hide Download",
  2578. hide_share: "Hide Share",
  2579. show_m3u8: "Show M3U8",
  2580. show_m3u8_description: [
  2581. "Capture and display m3u8 url",
  2582. "Can play with other media players"
  2583. ],
  2584. auto_show_more: "Auto Show More"
  2585. }
  2586. }
  2587. },
  2588. jabletv: {
  2589. common: {
  2590. basic: {
  2591. name: "Common - Basic",
  2592. remove_ads: "Remove Ads",
  2593. hide_footer: "Hide Footer"
  2594. },
  2595. header: {
  2596. name: "Common - Header",
  2597. hide_logo: "Hide LOGO",
  2598. hide_new: "Hide New",
  2599. hide_blu_ray: "Hide Blu Ray(AD)",
  2600. hide_live_sex: "Hide Live Sex(AD)",
  2601. hide_best_porns: "Hide Best Porns(AD)",
  2602. hide_more_sites: "Hide More Sites(AD)",
  2603. hide_sex_chat: "Hide Sex Chat(AD)",
  2604. hide_javhd: "Hide JavHD(AD)",
  2605. hide_search: "Hide Search",
  2606. hide_lang: "Hide Language",
  2607. hide_settings: "Hide Login/Settings"
  2608. }
  2609. },
  2610. home: {
  2611. basic: {
  2612. name: "HomePage - Basic",
  2613. blur_video_image: "Blur Video Image",
  2614. blur_video_image_description: [
  2615. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2616. ],
  2617. blur_video_title: "Blur Video Title",
  2618. blur_video_title_description: [
  2619. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2620. ],
  2621. hide_video_like: "Hide Video Like",
  2622. hide_video_like_description: [
  2623. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2624. ],
  2625. hide_video_duration: "Hide Video Duration",
  2626. hide_video_duration_description: [
  2627. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2628. ],
  2629. revert_full_title: "Revert Video Full Title",
  2630. revert_full_title_description: [
  2631. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2632. ],
  2633. hide_video_data: "Hide Video Data",
  2634. hide_video_data_description: [
  2635. "Synchronization takes effect: HomePage, SearchPage, VideoPage"
  2636. ],
  2637. hide_video_carousel: "Hide Video Carousel",
  2638. hide_section_sub_title: "Hide Section Sub-Title"
  2639. }
  2640. },
  2641. search: {
  2642. basic: { name: "SearchPage - Basic" }
  2643. },
  2644. video: {
  2645. basic: {
  2646. name: "VideoPage - Basic"
  2647. },
  2648. player: {
  2649. name: "VideoPage - Player"
  2650. },
  2651. playerContorl: {
  2652. name: "VideoPage - PlayerContorl"
  2653. },
  2654. toolbar: {
  2655. name: "VideoPage - Toolbar"
  2656. }
  2657. }
  2658. }
  2659. };
  2660. const host = location.host;
  2661. const pathname = location.pathname;
  2662. const missAvPage = () => {
  2663. if (/\/dm[0-9]{1,}\/[a-z]{2,3}$/.test(pathname) || pathname === "") {
  2664. return "missav-homepage";
  2665. }
  2666. const searchRegexps = [
  2667. `\\/search\\/`,
  2668. `\\/(chinese|english)-subtitle(\\?|)$`,
  2669. `\\/new(\\?|)$`,
  2670. `\\/release(\\?|)$`,
  2671. `\\/uncensored-leak(\\?|)$`,
  2672. `\\/genres\\/.*`,
  2673. `\\/makers\\/.*`,
  2674. `\\/today-hot(\\?|)$`,
  2675. `\\/weekly-hot(\\?|)$`,
  2676. `\\/monthly-hot(\\?|)$`,
  2677. `\\/siro(\\?|)$`,
  2678. `\\/luxu(\\?|)$`,
  2679. `\\/gana(\\?|)$`,
  2680. `\\/maan(\\?|)$`,
  2681. `\\/scute(\\?|)$`,
  2682. `\\/ara(\\?|)$`,
  2683. `\\/uncensored-leak(\\?|)$`,
  2684. `\\/fc2(\\?|)$`,
  2685. `\\/heyzo(\\?|)$`,
  2686. `\\/tokyohot(\\?|)$`,
  2687. `\\/1pondo(\\?|)$`,
  2688. `\\/caribbeancom(\\?|)$`,
  2689. `\\/caribbeancompr(\\?|)$`,
  2690. `\\/10musume(\\?|)$`,
  2691. `\\/pacopacomama(\\?|)$`,
  2692. `\\/gachinco(\\?|)$`,
  2693. `\\/xxxav(\\?|)$`,
  2694. `\\/marriedslash(\\?|)$`,
  2695. `\\/naughty4610(\\?|)$`,
  2696. `\\/naughty0930(\\?|)$`,
  2697. `\\/madou(\\?|)$`,
  2698. `\\/twav(\\?|)$`,
  2699. `\\/furuke(\\?|)$`
  2700. ];
  2701. for (let i2 = 0; i2 < searchRegexps.length; i2++) {
  2702. if (new RegExp(searchRegexps[i2]).test(pathname)) {
  2703. return "missav-search";
  2704. }
  2705. }
  2706. if (new RegExp(
  2707. `\\/[A-z].*[0-9](|-uncensored-leak|-(chinese|english)-subtitle)$`
  2708. ).test(pathname)) {
  2709. return "missav-video";
  2710. }
  2711. return "missav";
  2712. };
  2713. const jableTvPage = () => {
  2714. if (pathname === "/") {
  2715. return "jabletv-homepage";
  2716. }
  2717. if (pathname.includes("/videos/")) {
  2718. return "jabletv-video";
  2719. }
  2720. const searchRegexps = [
  2721. /\/search\//,
  2722. /\/categories\//,
  2723. /\/models\//,
  2724. /\/latest-updates\//,
  2725. /\/hot\//,
  2726. /\/tags\//
  2727. ];
  2728. for (let i2 = 0; i2 < searchRegexps.length; i2++) {
  2729. if (new RegExp(searchRegexps[i2]).test(pathname)) {
  2730. return "jabletv-search";
  2731. }
  2732. }
  2733. return "jabletv";
  2734. };
  2735. const _18ComicPage = () => {
  2736. return "18comic";
  2737. };
  2738. const _91PornPage = () => {
  2739. if (pathname === "/view_video.php") {
  2740. return "91porn-video";
  2741. }
  2742. if (pathname === "/v.php") {
  2743. return "91porn-v";
  2744. }
  2745. return "91porn";
  2746. };
  2747. const _91PornaPage = () => {
  2748. return "91porna";
  2749. };
  2750. const pornHubPage = () => {
  2751. if (pathname === "/view_video.php") {
  2752. return "pornhub-video";
  2753. }
  2754. if (pathname === "/video/search") {
  2755. return "pornhub-search";
  2756. }
  2757. return "pornhub";
  2758. };
  2759. const xVideosPage = () => {
  2760. return "xvideos";
  2761. };
  2762. const xHamsterPage = () => {
  2763. return "xhamster";
  2764. };
  2765. const ans = () => {
  2766. log(host);
  2767. switch (host) {
  2768. case "missav.ws":
  2769. case "missav.ai":
  2770. case "missav.com":
  2771. case "thisav.com":
  2772. return missAvPage();
  2773. case "jable.tv":
  2774. return jableTvPage();
  2775. case "pornhub.com":
  2776. case "cn.pornhub.com":
  2777. return pornHubPage();
  2778. case "18comic.org":
  2779. case "18comic.vip":
  2780. return _18ComicPage();
  2781. case "91porn.com":
  2782. return _91PornPage();
  2783. case "91porna.com":
  2784. return _91PornaPage();
  2785. case "www.xvideos.com":
  2786. return xVideosPage();
  2787. case "zh.xhamster.com":
  2788. return xHamsterPage();
  2789. default:
  2790. return "";
  2791. }
  2792. };
  2793. const isPageMissAvHomepage = () => ans() === "missav-homepage";
  2794. const isPageMissAvVideo = () => ans() === "missav-video";
  2795. const isPageMissAvSearch = () => ans() === "missav-search";
  2796. const isPageMissAv = () => ans() === "missav" || ans().startsWith("missav-");
  2797. const isPageJableTvHomepage = () => ans() === "jabletv-homepage";
  2798. const isPageJableTvVideo = () => ans() === "jabletv-video";
  2799. const isPageJableTvSearch = () => ans() === "jabletv-search";
  2800. const isPageJableTv = () => ans() === "jabletv" || ans().startsWith("jabletv-");
  2801. const isPagePornHubVideo = () => ans() === "pornhub-video";
  2802. const isPagePornHub = () => ans() === "pornhub" || ans().startsWith("pornhub-");
  2803. const isPage18Comic = () => ans() === "18comic" || ans().startsWith("18comic-");
  2804. const isPage91Porn = () => ans() === "91porn" || ans().startsWith("91porn-");
  2805. const isPage91PornVideo = () => ans() === "91porn-video";
  2806. const isPage91PornV = () => ans() === "91porn-v";
  2807. const isPage91Porna = () => ans() === "91porna" || ans().startsWith("91porna-");
  2808. const isPageXVideos = () => ans() === "xvideos" || ans().startsWith("xvideos-");
  2809. const languages = {
  2810. "zh-CN": language$1,
  2811. "en-US": language
  2812. };
  2813. class I18n {
  2814. constructor(lang2) {
  2815. __publicField(this, "_language");
  2816. this._language = e$1.ref(languages[lang2]);
  2817. }
  2818. get language() {
  2819. return this._language.value;
  2820. }
  2821. change(lang2) {
  2822. if (Object.keys(languages).includes(lang2)) {
  2823. this._language.value = languages[lang2];
  2824. } else {
  2825. console.log("not support language: ", lang2);
  2826. }
  2827. }
  2828. }
  2829. let lang = PGStorage.get("language", "zh-CN");
  2830. if (!Object.keys(languages).includes(lang)) {
  2831. lang = "zh-CN";
  2832. PGStorage.set("language", "zh-CN");
  2833. }
  2834. if (!isPageMissAv()) {
  2835. lang = "zh-CN";
  2836. }
  2837. const i18n = new I18n(lang);
  2838. const _hoisted_1$8 = { class: "flex w-full flex-1 flex-row rounded-xl p-3.5 hover:bg-[#2f2f2f]" };
  2839. const _hoisted_2$7 = { class: "ml-2 flex-1 self-center" };
  2840. const _hoisted_3$3 = { class: "mx-2 mb-2 flex flex-1 flex-col p-1 text-[#c6c6c6]" };
  2841. const _hoisted_4$3 = ["placeholder"];
  2842. const _hoisted_5$1 = { class: "mt-4 flex justify-around" };
  2843. const _sfc_main$9 = /* @__PURE__ */ e$1.defineComponent({
  2844. __name: "EditorComp",
  2845. props: {
  2846. type: {},
  2847. id: {},
  2848. name: {},
  2849. description: {},
  2850. editorTitle: {},
  2851. editorDescription: {},
  2852. saveFn: { type: Function }
  2853. },
  2854. setup(__props) {
  2855. const item = __props;
  2856. const panel = e$1.ref(null);
  2857. const isEditorShow = e$1.ref(false);
  2858. const saveSuccess = e$1.ref(false);
  2859. const editorData = e$1.ref("");
  2860. const updateData = () => {
  2861. const val = PGStorage.get(item.id, []).join("\n");
  2862. editorData.value = val ? val + "\n" : val;
  2863. };
  2864. const saveData = () => {
  2865. try {
  2866. const data = editorData.value.split("\n").filter((v2) => v2.trim() !== "");
  2867. PGStorage.set(item.id, orderedUniq(data));
  2868. saveSuccess.value = true;
  2869. item.saveFn();
  2870. setTimeout(() => {
  2871. saveSuccess.value = false;
  2872. }, 1500);
  2873. } catch (err) {
  2874. error(`EditorComp ${item.id} saveData error`, err);
  2875. }
  2876. };
  2877. return (_ctx, _cache) => {
  2878. var _a;
  2879. return e$1.openBlock(), e$1.createElementBlock(e$1.Fragment, null, [
  2880. e$1.createElementVNode("label", _hoisted_1$8, [
  2881. e$1.createElementVNode("span", _hoisted_2$7, e$1.toDisplayString(_ctx.name), 1),
  2882. e$1.createElementVNode("button", {
  2883. type: "button",
  2884. class: "relative inline-flex justify-center rounded border border-[#212121] bg-[#151515] px-2.5 py-1.5 text-sm outline-none hover:border-[#ff9000] hover:text-[#ff9000] focus:outline-none",
  2885. onClick: _cache[0] || (_cache[0] = () => {
  2886. isEditorShow.value = true;
  2887. updateData();
  2888. })
  2889. }, e$1.toDisplayString(e$1.unref(i18n).language.editorBtn), 1)
  2890. ]),
  2891. ((_a = _ctx.description) == null ? undefined : _a.length) ? (e$1.openBlock(), e$1.createBlock(_sfc_main$a, {
  2892. key: 0,
  2893. class: "pl-9",
  2894. description: _ctx.description
  2895. }, null, 8, ["description"])) : e$1.createCommentVNode("", true),
  2896. isEditorShow.value ? (e$1.openBlock(), e$1.createBlock(_sfc_main$b, e$1.mergeProps({
  2897. key: 1,
  2898. ref_key: "panel",
  2899. ref: panel
  2900. }, {
  2901. title: _ctx.editorTitle,
  2902. widthPercent: 28,
  2903. heightPercent: 85,
  2904. minWidth: 360,
  2905. minHeight: 600
  2906. }, {
  2907. onClose: _cache[4] || (_cache[4] = ($event) => isEditorShow.value = false)
  2908. }), {
  2909. default: e$1.withCtx(() => {
  2910. var _a2;
  2911. return [
  2912. e$1.createElementVNode("div", _hoisted_3$3, [
  2913. ((_a2 = _ctx.editorDescription) == null ? undefined : _a2.length) ? (e$1.openBlock(), e$1.createBlock(_sfc_main$a, {
  2914. key: 0,
  2915. class: "mb-3",
  2916. description: _ctx.editorDescription
  2917. }, null, 8, ["description"])) : e$1.createCommentVNode("", true),
  2918. e$1.withDirectives(e$1.createElementVNode("textarea", {
  2919. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => editorData.value = $event),
  2920. onKeydown: _cache[2] || (_cache[2] = e$1.withModifiers(() => {
  2921. }, ["stop"])),
  2922. class: "flex-1 resize-none overscroll-none rounded-xl border-2 border-[#252525] bg-[#252525] p-2 text-[14px] outline-none focus:border-[#2f2f2f]",
  2923. style: { "scrollbar-width": "thin", "scrollbar-color": "#999 #00000000" },
  2924. spellcheck: "false",
  2925. placeholder: e$1.unref(i18n).language.editorPlaceholder
  2926. }, null, 40, _hoisted_4$3), [
  2927. [e$1.vModelText, editorData.value]
  2928. ]),
  2929. e$1.createElementVNode("div", _hoisted_5$1, [
  2930. e$1.createElementVNode("button", {
  2931. class: e$1.normalizeClass([
  2932. "w-24 self-center rounded border border-white bg-[#2f2f2f] py-0.5 text-center hover:border-[#ff9000] hover:text-[#ff9000]",
  2933. saveSuccess.value ? "border-green-600 bg-green-950 hover:border-green-600 hover:bg-green-950" : ""
  2934. ]),
  2935. onClick: saveData
  2936. }, e$1.toDisplayString(e$1.unref(i18n).language.editorSaveBtn), 3),
  2937. e$1.createElementVNode("button", {
  2938. class: "w-24 self-center rounded border border-white bg-[#2f2f2f] py-0.5 text-center hover:border-[#ff9000] hover:text-[#ff9000]",
  2939. onClick: _cache[3] || (_cache[3] = ($event) => isEditorShow.value = false)
  2940. }, e$1.toDisplayString(e$1.unref(i18n).language.editorCloseBtn), 1)
  2941. ])
  2942. ])
  2943. ];
  2944. }),
  2945. _: 1
  2946. }, 16)) : e$1.createCommentVNode("", true)
  2947. ], 64);
  2948. };
  2949. }
  2950. });
  2951. const _hoisted_1$7 = { class: "flex items-center justify-between p-3.5 py-1" };
  2952. const _hoisted_2$6 = { class: "ml-2 text-white" };
  2953. const _hoisted_3$2 = { class: "relative w-2/5" };
  2954. const _hoisted_4$2 = { class: "block truncate text-gray-200" };
  2955. const _hoisted_5 = { class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2" };
  2956. const _hoisted_6 = {
  2957. key: 0,
  2958. class: "absolute inset-y-0 left-0 flex items-center pl-3 text-[#ff9000]"
  2959. };
  2960. const _sfc_main$8 = /* @__PURE__ */ e$1.defineComponent({
  2961. __name: "ListComp",
  2962. props: {
  2963. type: {},
  2964. id: {},
  2965. name: {},
  2966. description: {},
  2967. defaultValue: {},
  2968. disableValue: {},
  2969. options: {},
  2970. fn: { type: Function }
  2971. },
  2972. setup(__props) {
  2973. const item = __props;
  2974. const options = item.options;
  2975. const currValue = PGStorage.get(item.id, item.defaultValue);
  2976. const currOption = options.find((v2) => v2.id === currValue);
  2977. const selectedOption = e$1.ref(currOption ?? options[0]);
  2978. e$1.watch(selectedOption, (newSelected) => {
  2979. var _a;
  2980. try {
  2981. for (const option of options) {
  2982. if (option.id === newSelected.id && newSelected.id !== item.disableValue) {
  2983. document.documentElement.setAttribute(option.id, "");
  2984. if (item.fn) {
  2985. (_a = item.fn(newSelected.id)) == null ? void 0 : _a.then().catch((err) => {
  2986. throw err;
  2987. });
  2988. }
  2989. } else {
  2990. document.documentElement.removeAttribute(option.id);
  2991. }
  2992. }
  2993. PGStorage.set(item.id, newSelected.id);
  2994. } catch (err) {
  2995. error(`ListComp ${item.id} error`, err);
  2996. }
  2997. });
  2998. return (_ctx, _cache) => {
  2999. var _a;
  3000. return e$1.openBlock(), e$1.createElementBlock(e$1.Fragment, null, [
  3001. e$1.createElementVNode("div", _hoisted_1$7, [
  3002. e$1.createElementVNode("div", _hoisted_2$6, e$1.toDisplayString(_ctx.name), 1),
  3003. e$1.createVNode(e$1.unref(Ie), {
  3004. modelValue: selectedOption.value,
  3005. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedOption.value = $event)
  3006. }, {
  3007. default: e$1.withCtx(() => [
  3008. e$1.createElementVNode("div", _hoisted_3$2, [
  3009. e$1.createVNode(e$1.unref(je), { class: "relative w-full cursor-pointer rounded-2xl border-2 border-[#212121] bg-[#151515] px-2.5 py-1.5 text-left focus:bg-[#212121] focus:outline-none sm:text-sm" }, {
  3010. default: e$1.withCtx(() => [
  3011. e$1.createElementVNode("span", _hoisted_4$2, e$1.toDisplayString(selectedOption.value.name), 1),
  3012. e$1.createElementVNode("span", _hoisted_5, [
  3013. e$1.createVNode(e$1.unref(render), {
  3014. class: "h-5 w-5 text-gray-600",
  3015. "aria-hidden": "true"
  3016. })
  3017. ])
  3018. ]),
  3019. _: 1
  3020. }),
  3021. e$1.createVNode(e$1.Transition, {
  3022. "leave-active-class": "transition duration-100 ease-in",
  3023. "leave-from-class": "opacity-100",
  3024. "leave-to-class": "opacity-0"
  3025. }, {
  3026. default: e$1.withCtx(() => [
  3027. e$1.createVNode(e$1.unref(Ae), { class: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-xl bg-black shadow-lg focus:outline-none sm:text-sm" }, {
  3028. default: e$1.withCtx(() => [
  3029. (e$1.openBlock(true), e$1.createElementBlock(e$1.Fragment, null, e$1.renderList(e$1.unref(options), (option, index) => {
  3030. return e$1.openBlock(), e$1.createBlock(e$1.unref(Fe), {
  3031. key: index,
  3032. value: option,
  3033. as: "template"
  3034. }, {
  3035. default: e$1.withCtx(({ active, selected }) => [
  3036. e$1.createElementVNode("li", {
  3037. class: e$1.normalizeClass([
  3038. active ? "bg-[#1b1b1b] text-white" : "text-[#c6c6c6]",
  3039. "relative cursor-default rounded-xl py-2 pl-10 pr-4 transition-colors duration-200"
  3040. ])
  3041. }, [
  3042. e$1.createElementVNode("span", {
  3043. class: e$1.normalizeClass([selected ? "font-medium" : "font-normal", "block truncate"])
  3044. }, e$1.toDisplayString(option.name), 3),
  3045. selected ? (e$1.openBlock(), e$1.createElementBlock("span", _hoisted_6, [
  3046. e$1.createVNode(e$1.unref(render$2), {
  3047. class: "h-5 w-5",
  3048. "aria-hidden": "true"
  3049. })
  3050. ])) : e$1.createCommentVNode("", true)
  3051. ], 2)
  3052. ]),
  3053. _: 2
  3054. }, 1032, ["value"]);
  3055. }), 128))
  3056. ]),
  3057. _: 1
  3058. })
  3059. ]),
  3060. _: 1
  3061. })
  3062. ])
  3063. ]),
  3064. _: 1
  3065. }, 8, ["modelValue"])
  3066. ]),
  3067. ((_a = _ctx.description) == null ? undefined : _a.length) ? (e$1.openBlock(), e$1.createBlock(_sfc_main$a, {
  3068. key: 0,
  3069. class: "pl-9",
  3070. description: _ctx.description
  3071. }, null, 8, ["description"])) : e$1.createCommentVNode("", true)
  3072. ], 64);
  3073. };
  3074. }
  3075. });
  3076. const _hoisted_1$6 = { class: "flex items-center p-3.5" };
  3077. const _hoisted_2$5 = { class: "ml-2" };
  3078. const _hoisted_3$1 = ["step"];
  3079. const _hoisted_4$1 = {
  3080. key: 0,
  3081. class: "ml-2"
  3082. };
  3083. const _sfc_main$7 = /* @__PURE__ */ e$1.defineComponent({
  3084. __name: "NumberComp",
  3085. props: {
  3086. type: {},
  3087. id: {},
  3088. name: {},
  3089. description: {},
  3090. minValue: {},
  3091. maxValue: {},
  3092. step: {},
  3093. defaultValue: {},
  3094. disableValue: {},
  3095. addonText: {},
  3096. noStyle: { type: Boolean },
  3097. attrName: {},
  3098. fn: { type: Function }
  3099. },
  3100. setup(__props) {
  3101. const item = __props;
  3102. const currValue = e$1.ref(PGStorage.get(item.id, item.defaultValue));
  3103. watchThrottled(
  3104. currValue,
  3105. (newValue, oldValue) => {
  3106. var _a;
  3107. try {
  3108. if (newValue > item.maxValue) {
  3109. currValue.value = item.maxValue;
  3110. }
  3111. if (newValue < item.minValue) {
  3112. currValue.value = item.minValue;
  3113. }
  3114. if (oldValue === item.disableValue) {
  3115. if (!item.noStyle) {
  3116. document.documentElement.setAttribute(item.attrName ?? item.id, "");
  3117. }
  3118. }
  3119. if (newValue === item.disableValue) {
  3120. if (!item.noStyle) {
  3121. document.documentElement.removeAttribute(item.attrName ?? item.id);
  3122. }
  3123. } else if (currValue.value !== oldValue) {
  3124. (_a = item.fn(currValue.value)) == null ? void 0 : _a.then().catch((err) => {
  3125. throw err;
  3126. });
  3127. }
  3128. PGStorage.set(item.id, currValue.value);
  3129. } catch (err) {
  3130. error(`NumberComp ${item.id} error`, err);
  3131. }
  3132. },
  3133. { throttle: 50 }
  3134. );
  3135. return (_ctx, _cache) => {
  3136. var _a;
  3137. return e$1.openBlock(), e$1.createElementBlock(e$1.Fragment, null, [
  3138. e$1.createElementVNode("div", _hoisted_1$6, [
  3139. e$1.createElementVNode("div", _hoisted_2$5, e$1.toDisplayString(_ctx.name), 1),
  3140. e$1.withDirectives(e$1.createElementVNode("input", {
  3141. type: "number",
  3142. step: _ctx.step,
  3143. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currValue.value = $event),
  3144. onKeydown: _cache[1] || (_cache[1] = e$1.withModifiers(() => {
  3145. }, ["stop"])),
  3146. class: "ml-4 block flex-1 w-1/5 rounded-2xl border-2 border-[#212121] bg-[#151515] px-2.5 py-1.5 text-sm outline-none invalid:border-red-500 focus:bg-[#212121] focus:invalid:border-red-500"
  3147. }, null, 40, _hoisted_3$1), [
  3148. [e$1.vModelText, currValue.value]
  3149. ]),
  3150. _ctx.addonText ? (e$1.openBlock(), e$1.createElementBlock("div", _hoisted_4$1, e$1.toDisplayString(_ctx.addonText), 1)) : e$1.createCommentVNode("", true)
  3151. ]),
  3152. ((_a = _ctx.description) == null ? undefined : _a.length) ? (e$1.openBlock(), e$1.createBlock(_sfc_main$a, {
  3153. key: 0,
  3154. class: "pl-9",
  3155. description: _ctx.description
  3156. }, null, 8, ["description"])) : e$1.createCommentVNode("", true)
  3157. ], 64);
  3158. };
  3159. }
  3160. });
  3161. const _hoisted_1$5 = { class: "flex items-center p-3.5" };
  3162. const _hoisted_2$4 = { class: "ml-2" };
  3163. const _sfc_main$6 = /* @__PURE__ */ e$1.defineComponent({
  3164. __name: "StringComp",
  3165. props: {
  3166. type: {},
  3167. id: {},
  3168. name: {},
  3169. description: {},
  3170. defaultValue: {},
  3171. disableValue: {},
  3172. noStyle: { type: Boolean },
  3173. attrName: {},
  3174. fn: { type: Function }
  3175. },
  3176. setup(__props) {
  3177. const item = __props;
  3178. const currValue = e$1.ref(PGStorage.get(item.id, item.defaultValue));
  3179. watchThrottled(
  3180. currValue,
  3181. (newValue, oldValue) => {
  3182. var _a;
  3183. try {
  3184. if (oldValue === item.disableValue) {
  3185. if (!item.noStyle) {
  3186. document.documentElement.setAttribute(item.attrName ?? item.id, "");
  3187. }
  3188. }
  3189. if (newValue === item.disableValue) {
  3190. if (!item.noStyle) {
  3191. document.documentElement.removeAttribute(item.attrName ?? item.id);
  3192. }
  3193. } else if (currValue.value !== oldValue) {
  3194. (_a = item.fn(currValue.value)) == null ? void 0 : _a.then().catch((err) => {
  3195. throw err;
  3196. });
  3197. }
  3198. PGStorage.set(item.id, currValue.value);
  3199. } catch (err) {
  3200. error(`StringComp ${item.id} error`, err);
  3201. }
  3202. },
  3203. { throttle: 50 }
  3204. );
  3205. return (_ctx, _cache) => {
  3206. var _a;
  3207. return e$1.openBlock(), e$1.createElementBlock(e$1.Fragment, null, [
  3208. e$1.createElementVNode("div", _hoisted_1$5, [
  3209. e$1.createElementVNode("div", _hoisted_2$4, e$1.toDisplayString(_ctx.name), 1),
  3210. e$1.withDirectives(e$1.createElementVNode("input", {
  3211. type: "text",
  3212. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currValue.value = $event),
  3213. onKeydown: _cache[1] || (_cache[1] = e$1.withModifiers(() => {
  3214. }, ["stop"])),
  3215. class: "ml-4 block w-1/5 flex-1 rounded-2xl border-2 border-[#212121] bg-[#151515] px-2.5 py-1.5 text-sm outline-none invalid:border-red-500 focus:bg-[#212121] focus:invalid:border-red-500"
  3216. }, null, 544), [
  3217. [e$1.vModelText, currValue.value]
  3218. ])
  3219. ]),
  3220. ((_a = _ctx.description) == null ? undefined : _a.length) ? (e$1.openBlock(), e$1.createBlock(_sfc_main$a, {
  3221. key: 0,
  3222. description: _ctx.description
  3223. }, null, 8, ["description"])) : e$1.createCommentVNode("", true)
  3224. ], 64);
  3225. };
  3226. }
  3227. });
  3228. const _hoisted_1$4 = { class: "flex items-center" };
  3229. const _hoisted_2$3 = { class: "ml-2 flex-1" };
  3230. const _sfc_main$5 = /* @__PURE__ */ e$1.defineComponent({
  3231. __name: "SwitchComp",
  3232. props: {
  3233. type: {},
  3234. id: {},
  3235. name: {},
  3236. description: {},
  3237. defaultEnable: { type: Boolean },
  3238. noStyle: { type: Boolean },
  3239. attrName: {},
  3240. enableFn: { type: Function },
  3241. disableFn: { type: Function },
  3242. enableFnRunAt: {}
  3243. },
  3244. setup(__props) {
  3245. const item = __props;
  3246. const enabled = e$1.ref(PGStorage.get(item.id, item.defaultEnable));
  3247. e$1.watch(enabled, () => {
  3248. var _a, _b;
  3249. try {
  3250. if (enabled.value) {
  3251. if (!item.noStyle) {
  3252. document.documentElement.setAttribute(item.attrName ?? item.id, "");
  3253. }
  3254. if (item.enableFn) {
  3255. (_a = item.enableFn()) == null ? void 0 : _a.then().catch();
  3256. }
  3257. PGStorage.set(item.id, true);
  3258. } else {
  3259. if (!item.noStyle) {
  3260. document.documentElement.removeAttribute(item.attrName ?? item.id);
  3261. }
  3262. if (item.disableFn) {
  3263. (_b = item.disableFn()) == null ? void 0 : _b.then().catch((err) => {
  3264. throw err;
  3265. });
  3266. }
  3267. PGStorage.set(item.id, false);
  3268. }
  3269. } catch (err) {
  3270. error(`SwitchComp ${item.id} error`, err);
  3271. }
  3272. });
  3273. return (_ctx, _cache) => {
  3274. var _a;
  3275. return e$1.openBlock(), e$1.createElementBlock(e$1.Fragment, null, [
  3276. e$1.createVNode(e$1.unref(oe), { class: "w-full rounded-xl p-3.5 hover:bg-[#212121]" }, {
  3277. default: e$1.withCtx(() => [
  3278. e$1.createElementVNode("div", _hoisted_1$4, [
  3279. e$1.createVNode(e$1.unref(de), { class: "flex flex-1 flex-row" }, {
  3280. default: e$1.withCtx(() => [
  3281. e$1.createElementVNode("p", _hoisted_2$3, e$1.toDisplayString(_ctx.name), 1),
  3282. e$1.createVNode(e$1.unref(ue), {
  3283. modelValue: enabled.value,
  3284. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => enabled.value = $event),
  3285. class: e$1.normalizeClass([enabled.value ? "bg-[#ff9000]" : "bg-[#2f2f2f]", "relative inline-flex h-6 w-11 items-center rounded-full outline-none transition-colors"])
  3286. }, {
  3287. default: e$1.withCtx(() => [
  3288. e$1.createElementVNode("span", {
  3289. class: e$1.normalizeClass([enabled.value ? "translate-x-6" : "translate-x-1", "inline-block h-4 w-4 transform rounded-full bg-white transition-transform"])
  3290. }, null, 2)
  3291. ]),
  3292. _: 1
  3293. }, 8, ["modelValue", "class"])
  3294. ]),
  3295. _: 1
  3296. })
  3297. ])
  3298. ]),
  3299. _: 1
  3300. }),
  3301. ((_a = _ctx.description) == null ? undefined : _a.length) ? (e$1.openBlock(), e$1.createBlock(_sfc_main$a, {
  3302. key: 0,
  3303. class: "pl-9",
  3304. description: _ctx.description
  3305. }, null, 8, ["description"])) : e$1.createCommentVNode("", true)
  3306. ], 64);
  3307. };
  3308. }
  3309. });
  3310. const _hoisted_1$3 = { class: "mt-5 flex justify-center space-x-5" };
  3311. const _hoisted_2$2 = ["href"];
  3312. const _sfc_main$4 = /* @__PURE__ */ e$1.defineComponent({
  3313. __name: "AboutMeComp",
  3314. props: {
  3315. github: {},
  3316. greasyFork: {}
  3317. },
  3318. setup(__props) {
  3319. return (_ctx, _cache) => {
  3320. return e$1.openBlock(), e$1.createElementBlock("ul", _hoisted_1$3, [
  3321. e$1.createElementVNode("li", null, [
  3322. e$1.createElementVNode("a", {
  3323. href: _ctx.github,
  3324. target: "_blank",
  3325. class: "text-gray-400 hover:text-white"
  3326. }, _cache[0] || (_cache[0] = [
  3327. e$1.createElementVNode("svg", {
  3328. "aria-hidden": "true",
  3329. viewBox: "0 0 24 24",
  3330. fill: "currentColor",
  3331. class: "h-10 w-10"
  3332. }, [
  3333. e$1.createElementVNode("path", {
  3334. "clip-rule": "evenodd",
  3335. d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",
  3336. "fill-rule": "evenodd"
  3337. })
  3338. ], -1)
  3339. ]), 8, _hoisted_2$2)
  3340. ])
  3341. ]);
  3342. };
  3343. }
  3344. });
  3345. const useRulePanelStore = /* @__PURE__ */ defineStore("RulePanel", () => {
  3346. const isShow = e$1.ref(false);
  3347. const show = () => {
  3348. isShow.value = true;
  3349. };
  3350. const hide = () => {
  3351. isShow.value = false;
  3352. };
  3353. return { isShow, show, hide };
  3354. });
  3355. const useSideBtnStore = /* @__PURE__ */ defineStore("SideBtn", () => {
  3356. const isShow = useStorage("pg-side-btn-show", true, localStorage);
  3357. const show = () => {
  3358. isShow.value = true;
  3359. };
  3360. const hide = () => {
  3361. isShow.value = false;
  3362. };
  3363. return { isShow, show, hide };
  3364. });
  3365. const _sfc_main$3 = /* @__PURE__ */ e$1.defineComponent({
  3366. __name: "RulePanelView",
  3367. props: {
  3368. rules: {},
  3369. title: {},
  3370. github: {},
  3371. greasyFork: {}
  3372. },
  3373. setup(__props) {
  3374. const props = __props;
  3375. const store = useRulePanelStore();
  3376. const currRules = [];
  3377. for (const rule of props.rules) {
  3378. if (rule.checkFn()) {
  3379. currRules.push(rule);
  3380. }
  3381. }
  3382. return (_ctx, _cache) => {
  3383. return e$1.withDirectives((e$1.openBlock(), e$1.createBlock(_sfc_main$b, e$1.mergeProps({ title: _ctx.title, widthPercent: 28, heightPercent: 85, minWidth: 360, minHeight: 600 }, {
  3384. onClose: e$1.unref(store).hide
  3385. }), {
  3386. default: e$1.withCtx(() => [
  3387. (e$1.openBlock(), e$1.createElementBlock(e$1.Fragment, null, e$1.renderList(currRules, (rule, i2) => {
  3388. return e$1.createElementVNode("div", { key: i2 }, [
  3389. (e$1.openBlock(true), e$1.createElementBlock(e$1.Fragment, null, e$1.renderList(rule.groups, (group, j2) => {
  3390. return e$1.openBlock(), e$1.createElementBlock("div", { key: j2 }, [
  3391. e$1.createVNode(_sfc_main$c, e$1.mergeProps({ ref_for: true }, { title: group.name, isFold: group.fold, isSpecial: rule.isSpecial, specialName: rule.specialName }), {
  3392. default: e$1.withCtx(() => [
  3393. (e$1.openBlock(true), e$1.createElementBlock(e$1.Fragment, null, e$1.renderList(group.items, (item, innerIndex) => {
  3394. return e$1.openBlock(), e$1.createElementBlock("div", { key: innerIndex }, [
  3395. item.type === "switch" ? (e$1.openBlock(), e$1.createBlock(_sfc_main$5, e$1.mergeProps({
  3396. key: 0,
  3397. ref_for: true
  3398. }, item), null, 16)) : item.type === "number" ? (e$1.openBlock(), e$1.createBlock(_sfc_main$7, e$1.mergeProps({
  3399. key: 1,
  3400. ref_for: true
  3401. }, item), null, 16)) : item.type === "string" ? (e$1.openBlock(), e$1.createBlock(_sfc_main$6, e$1.mergeProps({
  3402. key: 2,
  3403. ref_for: true
  3404. }, item), null, 16)) : item.type === "editor" ? (e$1.openBlock(), e$1.createBlock(_sfc_main$9, e$1.mergeProps({
  3405. key: 3,
  3406. ref_for: true
  3407. }, item), null, 16)) : item.type === "list" ? (e$1.openBlock(), e$1.createBlock(_sfc_main$8, e$1.mergeProps({
  3408. key: 4,
  3409. ref_for: true
  3410. }, item), null, 16)) : e$1.createCommentVNode("", true)
  3411. ]);
  3412. }), 128))
  3413. ]),
  3414. _: 2
  3415. }, 1040)
  3416. ]);
  3417. }), 128))
  3418. ]);
  3419. }), 64)),
  3420. e$1.createVNode(_sfc_main$4, e$1.normalizeProps(e$1.guardReactiveProps({ github: _ctx.github, greasyFork: _ctx.greasyFork })), null, 16)
  3421. ]),
  3422. _: 1
  3423. }, 16, ["onClose"])), [
  3424. [e$1.vShow, e$1.unref(store).isShow]
  3425. ]);
  3426. };
  3427. }
  3428. });
  3429. const _hoisted_1$2 = { class: "select-none text-center text-[13px] leading-4" };
  3430. const _hoisted_2$1 = { class: "select-none text-center text-[13px] leading-4" };
  3431. const _sfc_main$2 = /* @__PURE__ */ e$1.defineComponent({
  3432. __name: "SideBtnView",
  3433. setup(__props) {
  3434. const ruleStore = useRulePanelStore();
  3435. const sideBtnStore = useSideBtnStore();
  3436. const target = e$1.ref(null);
  3437. const { width, height } = useElementBounding(target, { windowScroll: false });
  3438. const btnPos = useStorage("pg-side-btn-pos", { right: 10, bottom: 180 }, localStorage);
  3439. const isDragging = e$1.ref(false);
  3440. const windowSize = useWindowSize({ includeScrollbar: false });
  3441. const maxPos = e$1.computed(() => {
  3442. return {
  3443. x: windowSize.width.value - width.value,
  3444. y: windowSize.height.value - height.value
  3445. };
  3446. });
  3447. let rAF = 0;
  3448. useDraggable(target, {
  3449. initialValue: {
  3450. x: windowSize.width.value - btnPos.value.right,
  3451. y: windowSize.height.value - btnPos.value.bottom
  3452. },
  3453. preventDefault: true,
  3454. handle: e$1.computed(() => target.value),
  3455. onMove: (pos) => {
  3456. isDragging.value = true;
  3457. btnPos.value.right = maxPos.value.x - pos.x;
  3458. btnPos.value.bottom = maxPos.value.y - pos.y;
  3459. cancelAnimationFrame(rAF);
  3460. rAF = requestAnimationFrame(() => {
  3461. if (btnPos.value.right < 0) {
  3462. btnPos.value.right = 0;
  3463. }
  3464. if (btnPos.value.bottom < 0) {
  3465. btnPos.value.bottom = 0;
  3466. }
  3467. if (btnPos.value.bottom > maxPos.value.y) {
  3468. btnPos.value.bottom = maxPos.value.y;
  3469. }
  3470. if (btnPos.value.right > maxPos.value.x) {
  3471. btnPos.value.right = maxPos.value.x;
  3472. }
  3473. });
  3474. },
  3475. onEnd: () => {
  3476. setTimeout(() => {
  3477. isDragging.value = false;
  3478. }, 50);
  3479. }
  3480. });
  3481. return (_ctx, _cache) => {
  3482. return e$1.unref(sideBtnStore).isShow ? (e$1.openBlock(), e$1.createElementBlock("div", {
  3483. key: 0,
  3484. style: e$1.normalizeStyle({ right: e$1.unref(btnPos).right + "px", bottom: e$1.unref(btnPos).bottom + "px" }),
  3485. class: "group fixed z-[100] flex flex-col justify-end text-white will-change-[right,bottom] hover:text-opacity-100"
  3486. }, [
  3487. e$1.createElementVNode("div", {
  3488. ref_key: "target",
  3489. ref: target,
  3490. class: "mt-1 flex h-10 w-10 cursor-pointer items-center justify-center rounded-lg border border-[#212121] bg-[#151515] font-medium transition-colors hover:bg-[#212121]",
  3491. onClick: _cache[0] || (_cache[0] = ($event) => !isDragging.value && (e$1.unref(ruleStore).isShow ? e$1.unref(ruleStore).hide() : e$1.unref(ruleStore).show()))
  3492. }, [
  3493. e$1.createElementVNode("div", null, [
  3494. e$1.createElementVNode("p", _hoisted_1$2, e$1.toDisplayString(e$1.unref(i18n).language.menu.split("&")[0]), 1),
  3495. e$1.createElementVNode("p", _hoisted_2$1, e$1.toDisplayString(e$1.unref(i18n).language.menu.split("&")[1]), 1)
  3496. ])
  3497. ], 512)
  3498. ], 4)) : e$1.createCommentVNode("", true);
  3499. };
  3500. }
  3501. });
  3502. const originFetch = _unsafeWindow.fetch;
  3503. const FetchInterceptor = (input, init) => {
  3504. let requestInit = {
  3505. url: input instanceof Request ? input.url : input.toString(),
  3506. method: init == null ? undefined : init.method,
  3507. credentials: init == null ? undefined : init.credentials,
  3508. body: init == null ? undefined : init.body,
  3509. type: "RequestInit",
  3510. headers: parseHeaders(init == null ? undefined : init.headers)
  3511. };
  3512. let globalPromise = Promise.resolve(undefined);
  3513. for (let i2 = 0; i2 < beforeRequestFuncs.length; i2++) {
  3514. globalPromise = globalPromise.then((prev) => {
  3515. if (isHTTPResponse(prev)) {
  3516. throw prev;
  3517. }
  3518. requestInit = prev || requestInit;
  3519. return beforeRequestFuncs[i2](requestInit);
  3520. });
  3521. }
  3522. const getInitValue = (key) => {
  3523. return key in requestInit ? requestInit[key] : init == null ? undefined : init[key];
  3524. };
  3525. globalPromise = globalPromise.then((prev) => {
  3526. if (isHTTPResponse(prev)) {
  3527. throw prev;
  3528. }
  3529. requestInit = prev || requestInit;
  3530. }).catch((err) => {
  3531. if (isHTTPResponse(err)) {
  3532. return err;
  3533. }
  3534. console.error("Interceptor cause some err: ", err);
  3535. return undefined;
  3536. }).then((prevResponse) => {
  3537. if (isHTTPResponse(prevResponse)) {
  3538. return new Response(prevResponse.response, {
  3539. headers: prevResponse.headers,
  3540. status: prevResponse.status || 200,
  3541. statusText: prevResponse.statusText
  3542. });
  3543. }
  3544. return originFetch(requestInit.url, {
  3545. ...init,
  3546. method: getInitValue("method"),
  3547. body: getInitValue("body"),
  3548. credentials: getInitValue("credentials"),
  3549. headers: getInitValue("headers")
  3550. });
  3551. }).then((res) => {
  3552. if (!res.ok) {
  3553. console.log("error: ", requestInit);
  3554. throw new Error(`Unexpected status code: ${res.status}`);
  3555. }
  3556. const resClone = res.clone();
  3557. return resClone.blob().then((data) => {
  3558. let interceptorResponse = defineResponse({
  3559. response: data,
  3560. headers: parseHeaders(resClone.headers),
  3561. status: resClone.status || 200,
  3562. statusText: resClone.statusText
  3563. });
  3564. let globalPromise2 = Promise.resolve(undefined);
  3565. for (let i2 = 0; i2 < afterResponseFuncs.length; i2++) {
  3566. globalPromise2 = globalPromise2.then((prevResp) => {
  3567. interceptorResponse = prevResp || interceptorResponse;
  3568. return afterResponseFuncs[i2](
  3569. interceptorResponse,
  3570. requestInit
  3571. );
  3572. });
  3573. }
  3574. globalPromise2 = globalPromise2.then((prevResp) => {
  3575. interceptorResponse = prevResp || interceptorResponse;
  3576. return interceptorResponse;
  3577. });
  3578. return globalPromise2.then((prevResponse) => {
  3579. return new Response(prevResponse.response, {
  3580. headers: prevResponse.headers,
  3581. status: prevResponse.status || 200,
  3582. statusText: prevResponse.statusText
  3583. });
  3584. });
  3585. });
  3586. }).catch((err) => {
  3587. let errorOrResponse = {
  3588. type: "fetch",
  3589. cause: err
  3590. };
  3591. let globalPromise2 = Promise.resolve(undefined);
  3592. for (let i2 = 0; i2 < receiveErrorFuncs.length; i2++) {
  3593. globalPromise2 = globalPromise2.then((prevResponse) => {
  3594. errorOrResponse = prevResponse || errorOrResponse;
  3595. if (isHTTPResponse(errorOrResponse)) {
  3596. throw errorOrResponse;
  3597. }
  3598. return receiveErrorFuncs[i2](errorOrResponse, requestInit);
  3599. });
  3600. }
  3601. globalPromise2.then((prevResponse) => {
  3602. errorOrResponse = prevResponse || errorOrResponse;
  3603. if (isHTTPResponse(errorOrResponse)) {
  3604. return new Response(errorOrResponse.response || "", {
  3605. headers: errorOrResponse.headers,
  3606. status: errorOrResponse.status || 500,
  3607. statusText: errorOrResponse.statusText
  3608. });
  3609. }
  3610. throw errorOrResponse;
  3611. });
  3612. return globalPromise2;
  3613. });
  3614. return globalPromise;
  3615. };
  3616. const parseHeaders = (headers) => {
  3617. if (headers === undefined || !("forEach" in headers) || typeof headers["forEach"] !== "function")
  3618. return headers;
  3619. const ans2 = {};
  3620. headers.forEach((header) => {
  3621. ans2[header[0]] = header[1];
  3622. });
  3623. return ans2;
  3624. };
  3625. const XHRResponseKeys = ["status", "statusText", "response"];
  3626. class XHRInterceptor extends XMLHttpRequest {
  3627. constructor() {
  3628. super();
  3629. __publicField(this, "openConfig", {
  3630. type: "RequestInit",
  3631. headers: {}
  3632. });
  3633. __publicField(this, "returnCustomResponse", false);
  3634. __publicField(this, "customResponse", { type: "HTTPResponse" });
  3635. __publicField(this, "globalPromise", Promise.resolve({}));
  3636. __publicField(this, "customReadyState", 0);
  3637. __publicField(this, "hasOpened", false);
  3638. __publicField(this, "hasHandleAfterReponse", false);
  3639. const xhr = this;
  3640. let isIntercept = false;
  3641. xhr.addEventListener("readystatechange", function(event) {
  3642. if (xhr.readyState === 4) {
  3643. if (isIntercept) return;
  3644. isIntercept = !isIntercept;
  3645. event.stopImmediatePropagation();
  3646. xhr.handleAfterResponse();
  3647. xhr.globalPromise = xhr.globalPromise.then(() => {
  3648. xhr.dispatchEvent(
  3649. new Event("readystatechange", { bubbles: false })
  3650. );
  3651. });
  3652. }
  3653. });
  3654. let hasInterceptLoadend = false;
  3655. xhr.addEventListener("loadend", function(event) {
  3656. if (hasInterceptLoadend) return;
  3657. hasInterceptLoadend = !hasInterceptLoadend;
  3658. event.stopImmediatePropagation();
  3659. xhr.handleAfterResponse();
  3660. xhr.globalPromise = xhr.globalPromise.then(() => {
  3661. xhr.dispatchEvent(new Event("loadend", { bubbles: false }));
  3662. });
  3663. });
  3664. let onreadystatechangeFunc = () => {
  3665. };
  3666. Object.defineProperty(xhr, "onreadystatechange", {
  3667. set: (newFunc) => {
  3668. onreadystatechangeFunc = newFunc;
  3669. },
  3670. get: () => {
  3671. return onreadystatechangeFunc;
  3672. },
  3673. configurable: true,
  3674. enumerable: true
  3675. });
  3676. xhr.addEventListener("readystatechange", function(...args) {
  3677. if (onreadystatechangeFunc)
  3678. onreadystatechangeFunc.call(this, ...args);
  3679. });
  3680. let errHasCatched = false;
  3681. xhr.addEventListener("error", function(event) {
  3682. if (errHasCatched) return;
  3683. errHasCatched = true;
  3684. event.stopImmediatePropagation();
  3685. let errorOrResponse = {
  3686. type: event.type
  3687. };
  3688. xhr.globalPromise = xhr.globalPromise.then(() => undefined);
  3689. for (let i2 = 0; i2 < receiveErrorFuncs.length; i2++) {
  3690. xhr.globalPromise = xhr.globalPromise.then((prevResponse) => {
  3691. errorOrResponse = prevResponse || errorOrResponse;
  3692. if (isHTTPResponse(errorOrResponse)) {
  3693. throw errorOrResponse;
  3694. }
  3695. return receiveErrorFuncs[i2](
  3696. errorOrResponse,
  3697. xhr.openConfig
  3698. );
  3699. });
  3700. }
  3701. xhr.globalPromise.then((prevResponse) => {
  3702. errorOrResponse = prevResponse || errorOrResponse;
  3703. if (isHTTPResponse(errorOrResponse)) {
  3704. throw errorOrResponse;
  3705. }
  3706. xhr.dispatchEvent(
  3707. new Event(errorOrResponse.type, { bubbles: false })
  3708. );
  3709. }).catch((response) => {
  3710. xhr.customResponse = response;
  3711. xhr.returnCustomResponse = true;
  3712. xhr.dispatchEvent(
  3713. new Event("readystatechange", { bubbles: false })
  3714. );
  3715. });
  3716. });
  3717. let onerrorFunc = () => {
  3718. };
  3719. Object.defineProperty(xhr, "onerror", {
  3720. set: (newFunc) => {
  3721. onerrorFunc = newFunc;
  3722. },
  3723. get: () => {
  3724. return onerrorFunc;
  3725. },
  3726. configurable: true,
  3727. enumerable: true
  3728. });
  3729. xhr.addEventListener("error", function(...args) {
  3730. onerrorFunc.call(xhr, ...args);
  3731. });
  3732. let onloadendFunc = () => {
  3733. };
  3734. Object.defineProperty(xhr, "onloadend", {
  3735. set: (newFunc) => {
  3736. onloadendFunc = newFunc;
  3737. },
  3738. get: () => {
  3739. return onloadendFunc;
  3740. },
  3741. configurable: true,
  3742. enumerable: true
  3743. });
  3744. xhr.addEventListener("loadend", function(...args) {
  3745. onloadendFunc.call(xhr, ...args);
  3746. });
  3747. XHRResponseKeys.forEach((key) => {
  3748. const getOrigin = () => super[key];
  3749. Object.defineProperty(xhr, key, {
  3750. get: () => {
  3751. if (xhr.returnCustomResponse && key in xhr.customResponse) {
  3752. return xhr.customResponse[key];
  3753. }
  3754. return getOrigin();
  3755. },
  3756. configurable: true,
  3757. enumerable: true
  3758. });
  3759. });
  3760. }
  3761. handleAfterResponse() {
  3762. if (this.hasHandleAfterReponse) return;
  3763. this.hasHandleAfterReponse = true;
  3764. const xhr = this;
  3765. let response = {
  3766. response: xhr.response,
  3767. headers: XHRInterceptor.parseAllHeaders(
  3768. xhr.getAllResponseHeaders()
  3769. ),
  3770. status: xhr.status,
  3771. statusText: xhr.statusText,
  3772. type: "HTTPResponse"
  3773. };
  3774. xhr.globalPromise = xhr.globalPromise.then(
  3775. () => undefined
  3776. );
  3777. for (let i2 = 0; i2 < afterResponseFuncs.length; i2++) {
  3778. xhr.globalPromise = xhr.globalPromise.then((prevResponse) => {
  3779. if (isHTTPResponse(prevResponse)) {
  3780. xhr.returnCustomResponse = true;
  3781. }
  3782. response = prevResponse || response;
  3783. return afterResponseFuncs[i2](response, xhr.openConfig);
  3784. });
  3785. }
  3786. xhr.globalPromise = xhr.globalPromise.then((prevResponse) => {
  3787. if (isHTTPResponse(prevResponse)) {
  3788. xhr.returnCustomResponse = true;
  3789. }
  3790. response = prevResponse || response;
  3791. if (xhr.returnCustomResponse) {
  3792. xhr.customResponse = response;
  3793. }
  3794. if (xhr.status === 0) {
  3795. return;
  3796. }
  3797. });
  3798. }
  3799. open(method, url, async, username, password) {
  3800. this.openConfig = {
  3801. ...this.openConfig,
  3802. method,
  3803. url: url.toString(),
  3804. originConfig: {
  3805. async,
  3806. username,
  3807. password
  3808. }
  3809. };
  3810. this.hasOpened = true;
  3811. }
  3812. send(body) {
  3813. this.globalPromise = this.globalPromise.then(() => this.openConfig);
  3814. this.openConfig.body = body;
  3815. const xhr = this;
  3816. for (let i2 = 0; i2 < beforeRequestFuncs.length; i2++) {
  3817. this.globalPromise = this.globalPromise.then((prevReturn) => {
  3818. if (prevReturn && prevReturn["type"] === "HTTPResponse") {
  3819. throw prevReturn;
  3820. }
  3821. if (prevReturn && (prevReturn == null ? undefined : prevReturn["type"]) === "RequestInit") {
  3822. this.openConfig = prevReturn;
  3823. }
  3824. return beforeRequestFuncs[i2](this.openConfig, xhr);
  3825. });
  3826. }
  3827. this.globalPromise.then((prevReturn) => {
  3828. if (prevReturn && prevReturn["type"] === "RequestInit") {
  3829. this.openConfig = prevReturn;
  3830. }
  3831. if (this.openConfig.credentials === "include") {
  3832. super.withCredentials = true;
  3833. } else {
  3834. super.withCredentials = false;
  3835. }
  3836. if (this.openConfig.originConfig.async === undefined) {
  3837. super.open(this.openConfig.method, this.openConfig.url);
  3838. } else {
  3839. super.open(
  3840. this.openConfig.method,
  3841. this.openConfig.url,
  3842. this.openConfig.originConfig.async,
  3843. this.openConfig.originConfig.username,
  3844. this.openConfig.originConfig.password
  3845. );
  3846. }
  3847. if (this.openConfig.headers) {
  3848. for (const headerKey in this.openConfig.headers) {
  3849. super.setRequestHeader(
  3850. headerKey,
  3851. this.openConfig.headers[headerKey]
  3852. );
  3853. }
  3854. }
  3855. if (prevReturn && prevReturn["type"] === "HTTPResponse") {
  3856. throw prevReturn;
  3857. }
  3858. return prevReturn;
  3859. }).then(() => {
  3860. super.send(this.openConfig.body);
  3861. }).catch((customRes) => {
  3862. xhr.returnCustomResponse = true;
  3863. xhr.customResponse = customRes;
  3864. xhr.customReadyState = 4;
  3865. Object.defineProperty(xhr, "readyState", {
  3866. get: () => xhr.customReadyState,
  3867. configurable: true,
  3868. enumerable: true
  3869. });
  3870. xhr.dispatchEvent(
  3871. new Event("readystatechange", { bubbles: false })
  3872. );
  3873. });
  3874. }
  3875. setRequestHeader(name, value) {
  3876. if (!this.hasOpened) {
  3877. super.setRequestHeader(name, value);
  3878. return;
  3879. }
  3880. const headers = this.openConfig.headers || {};
  3881. this.openConfig.headers = {
  3882. ...headers
  3883. };
  3884. this.openConfig.headers[name] = value;
  3885. }
  3886. getAllResponseHeaders() {
  3887. if (this.returnCustomResponse && "headers" in this.customResponse) {
  3888. const headers = this.customResponse.headers;
  3889. if (headers === undefined) {
  3890. return "";
  3891. }
  3892. return Object.entries(headers).map((headerEntry) => `${headerEntry[0]}: ${headerEntry[1]}`).join("\n");
  3893. }
  3894. return super.getAllResponseHeaders();
  3895. }
  3896. getResponseHeader(name) {
  3897. if (this.returnCustomResponse && "headers" in this.customResponse) {
  3898. const headers = this.customResponse.headers;
  3899. if (headers === undefined) {
  3900. return null;
  3901. }
  3902. return headers[name] || null;
  3903. }
  3904. return super.getResponseHeader(name);
  3905. }
  3906. static parseAllHeaders(headers) {
  3907. const record = {};
  3908. headers.split("\n").forEach((header) => {
  3909. const [key, value] = header.split(":");
  3910. record[key] = value;
  3911. });
  3912. return record;
  3913. }
  3914. }
  3915. const beforeRequestFuncs = [];
  3916. const afterResponseFuncs = [];
  3917. const receiveErrorFuncs = [];
  3918. const defineResponse = (response) => {
  3919. return {
  3920. ...response,
  3921. type: "HTTPResponse"
  3922. };
  3923. };
  3924. const addAfterResponseInterceptor = (afterResponse) => {
  3925. afterResponseFuncs.push(afterResponse);
  3926. };
  3927. const isHTTPResponse = (obj) => {
  3928. return obj && obj.type === "HTTPResponse";
  3929. };
  3930. let originXHR = null;
  3931. const intercept = (win) => {
  3932. const global2 = win || window;
  3933. if (!originXHR) {
  3934. originXHR = global2.XMLHttpRequest;
  3935. }
  3936. global2.XMLHttpRequest = XHRInterceptor;
  3937. global2.fetch = FetchInterceptor;
  3938. };
  3939. const commonBasicItems$6 = [
  3940. {
  3941. type: "switch",
  3942. id: "jabletv-remove-ads",
  3943. name: i18n.language.jabletv.common.basic.remove_ads,
  3944. defaultEnable: true,
  3945. enableFn: () => {
  3946. _unsafeWindow.asgAdgptLoaded = true;
  3947. addAfterResponseInterceptor(
  3948. async (response, requestInit) => {
  3949. var _a;
  3950. if ((_a = requestInit.url) == null ? undefined : _a.includes(
  3951. "https://s.magsrv.com/splash.php"
  3952. )) {
  3953. return defineResponse({
  3954. ...response,
  3955. response: '{"data":[],"ext":[],"layout":{}}'
  3956. });
  3957. }
  3958. return defineResponse(response);
  3959. }
  3960. );
  3961. }
  3962. },
  3963. {
  3964. type: "switch",
  3965. id: "jabletv-hide-footer",
  3966. name: i18n.language.jabletv.common.basic.hide_footer,
  3967. defaultEnable: true
  3968. }
  3969. ];
  3970. const commonHeaderItems$5 = [
  3971. {
  3972. type: "switch",
  3973. id: "jabletv-common-header-hide-logo",
  3974. name: i18n.language.jabletv.common.header.hide_logo
  3975. },
  3976. {
  3977. type: "switch",
  3978. id: "jabletv-common-header-hide-new",
  3979. name: i18n.language.jabletv.common.header.hide_new
  3980. },
  3981. {
  3982. type: "switch",
  3983. id: "jabletv-common-header-hide-blu-ray",
  3984. name: i18n.language.jabletv.common.header.hide_blu_ray,
  3985. defaultEnable: true
  3986. },
  3987. {
  3988. type: "switch",
  3989. id: "jabletv-common-header-hide-live-sex",
  3990. name: i18n.language.jabletv.common.header.hide_live_sex,
  3991. defaultEnable: true
  3992. },
  3993. {
  3994. type: "switch",
  3995. id: "jabletv-common-header-hide-best-porns",
  3996. name: i18n.language.jabletv.common.header.hide_best_porns,
  3997. defaultEnable: true
  3998. },
  3999. {
  4000. type: "switch",
  4001. id: "jabletv-common-header-hide-more-sites",
  4002. name: i18n.language.jabletv.common.header.hide_more_sites,
  4003. defaultEnable: true
  4004. },
  4005. {
  4006. type: "switch",
  4007. id: "jabletv-common-header-hide-sex-chat",
  4008. name: i18n.language.jabletv.common.header.hide_sex_chat,
  4009. defaultEnable: true
  4010. },
  4011. {
  4012. type: "switch",
  4013. id: "jabletv-common-header-hide-javhd",
  4014. name: i18n.language.jabletv.common.header.hide_javhd,
  4015. defaultEnable: true
  4016. },
  4017. {
  4018. type: "switch",
  4019. id: "jabletv-common-header-hide-search",
  4020. name: i18n.language.jabletv.common.header.hide_search
  4021. },
  4022. {
  4023. type: "switch",
  4024. id: "jabletv-common-header-hide-lang",
  4025. name: i18n.language.jabletv.common.header.hide_lang
  4026. },
  4027. {
  4028. type: "switch",
  4029. id: "jabletv-common-header-hide-settings",
  4030. name: i18n.language.jabletv.common.header.hide_settings
  4031. }
  4032. ];
  4033. const commonGroups$6 = [
  4034. {
  4035. name: i18n.language.jabletv.common.basic.name,
  4036. fold: true,
  4037. items: commonBasicItems$6
  4038. },
  4039. {
  4040. name: i18n.language.jabletv.common.header.name,
  4041. fold: true,
  4042. items: commonHeaderItems$5
  4043. }
  4044. ];
  4045. const homepageBasicItems = [
  4046. {
  4047. type: "switch",
  4048. id: "jabletv-home-page-hide-video-carousel",
  4049. name: i18n.language.jabletv.home.basic.hide_video_carousel,
  4050. defaultEnable: true
  4051. },
  4052. {
  4053. type: "switch",
  4054. id: "jabletv-home-page-hide-section-sub-title",
  4055. name: i18n.language.jabletv.home.basic.hide_section_sub_title,
  4056. defaultEnable: true
  4057. },
  4058. {
  4059. type: "switch",
  4060. id: "jabletv-home-page-basic-blur-video-image",
  4061. name: i18n.language.jabletv.home.basic.blur_video_image,
  4062. description: i18n.language.jabletv.home.basic.blur_video_image_description
  4063. },
  4064. {
  4065. type: "switch",
  4066. id: "jabletv-home-page-basic-blur-video-title",
  4067. name: i18n.language.jabletv.home.basic.blur_video_title,
  4068. description: i18n.language.jabletv.home.basic.blur_video_title_description
  4069. },
  4070. {
  4071. type: "switch",
  4072. id: "jabletv-home-page-basic-hide-video-likes",
  4073. name: i18n.language.jabletv.home.basic.hide_video_like,
  4074. description: i18n.language.jabletv.home.basic.hide_video_like_description
  4075. },
  4076. {
  4077. type: "switch",
  4078. id: "jabletv-home-page-basic-hide-video-duration",
  4079. name: i18n.language.jabletv.home.basic.hide_video_duration,
  4080. description: i18n.language.jabletv.home.basic.hide_video_duration_description
  4081. },
  4082. {
  4083. type: "switch",
  4084. id: "jabletv-home-page-basic-revert-full-title",
  4085. name: i18n.language.jabletv.home.basic.revert_full_title,
  4086. description: i18n.language.jabletv.home.basic.revert_full_title_description,
  4087. defaultEnable: true
  4088. },
  4089. {
  4090. type: "switch",
  4091. id: "jabletv-home-page-basic-hide-video-data",
  4092. name: i18n.language.jabletv.home.basic.hide_video_data,
  4093. description: i18n.language.jabletv.home.basic.hide_video_data_description,
  4094. defaultEnable: true
  4095. }
  4096. ];
  4097. const homepageGroups = [
  4098. {
  4099. name: i18n.language.jabletv.home.basic.name,
  4100. items: homepageBasicItems
  4101. }
  4102. ];
  4103. const searchBasicItems$1 = [
  4104. {
  4105. type: "switch",
  4106. id: "jabletv-home-page-basic-blur-video-image",
  4107. name: i18n.language.jabletv.home.basic.blur_video_image,
  4108. description: i18n.language.jabletv.home.basic.blur_video_image_description
  4109. },
  4110. {
  4111. type: "switch",
  4112. id: "jabletv-home-page-basic-blur-video-title",
  4113. name: i18n.language.jabletv.home.basic.blur_video_title,
  4114. description: i18n.language.jabletv.home.basic.blur_video_title_description
  4115. },
  4116. {
  4117. type: "switch",
  4118. id: "jabletv-home-page-basic-hide-video-likes",
  4119. name: i18n.language.jabletv.home.basic.hide_video_like,
  4120. description: i18n.language.jabletv.home.basic.hide_video_like_description
  4121. },
  4122. {
  4123. type: "switch",
  4124. id: "jabletv-home-page-basic-hide-video-duration",
  4125. name: i18n.language.jabletv.home.basic.hide_video_duration,
  4126. description: i18n.language.jabletv.home.basic.hide_video_duration_description
  4127. },
  4128. {
  4129. type: "switch",
  4130. id: "jabletv-home-page-basic-revert-full-title",
  4131. name: i18n.language.jabletv.home.basic.revert_full_title,
  4132. description: i18n.language.jabletv.home.basic.revert_full_title_description,
  4133. defaultEnable: true
  4134. },
  4135. {
  4136. type: "switch",
  4137. id: "jabletv-home-page-basic-hide-video-data",
  4138. name: i18n.language.jabletv.home.basic.hide_video_data,
  4139. description: i18n.language.jabletv.home.basic.hide_video_data_description,
  4140. defaultEnable: true
  4141. }
  4142. ];
  4143. const searchGroups$1 = [
  4144. {
  4145. name: "搜索页-基本功能",
  4146. items: searchBasicItems$1
  4147. }
  4148. ];
  4149. const videoBasicItems$2 = [
  4150. {
  4151. type: "switch",
  4152. id: "jabletv-home-page-basic-blur-video-image",
  4153. name: i18n.language.jabletv.home.basic.blur_video_image,
  4154. description: i18n.language.jabletv.home.basic.blur_video_image_description
  4155. },
  4156. {
  4157. type: "switch",
  4158. id: "jabletv-home-page-basic-blur-video-title",
  4159. name: i18n.language.jabletv.home.basic.blur_video_title,
  4160. description: i18n.language.jabletv.home.basic.blur_video_title_description
  4161. },
  4162. {
  4163. type: "switch",
  4164. id: "jabletv-home-page-basic-hide-video-likes",
  4165. name: i18n.language.jabletv.home.basic.hide_video_like,
  4166. description: i18n.language.jabletv.home.basic.hide_video_like_description
  4167. },
  4168. {
  4169. type: "switch",
  4170. id: "jabletv-home-page-basic-hide-video-duration",
  4171. name: i18n.language.jabletv.home.basic.hide_video_duration,
  4172. description: i18n.language.jabletv.home.basic.hide_video_duration_description
  4173. },
  4174. {
  4175. type: "switch",
  4176. id: "jabletv-home-page-basic-revert-full-title",
  4177. name: i18n.language.jabletv.home.basic.revert_full_title,
  4178. description: i18n.language.jabletv.home.basic.revert_full_title_description,
  4179. defaultEnable: true
  4180. },
  4181. {
  4182. type: "switch",
  4183. id: "jabletv-home-page-basic-hide-video-data",
  4184. name: i18n.language.jabletv.home.basic.hide_video_data,
  4185. description: i18n.language.jabletv.home.basic.hide_video_data_description,
  4186. defaultEnable: true
  4187. }
  4188. ];
  4189. const videoPlayerItems$2 = [
  4190. {
  4191. type: "switch",
  4192. id: "jabletv-video-page-auto-fix-player",
  4193. name: "修补 播放器",
  4194. description: ["去除播放广告、开启更多控制"],
  4195. noStyle: true,
  4196. defaultEnable: true,
  4197. enableFn: () => {
  4198. var _a;
  4199. const video = document.querySelector("video");
  4200. const hlsUrl = _unsafeWindow.hlsUrl;
  4201. const hasVtt = _unsafeWindow.hasVtt;
  4202. const vttUrl = _unsafeWindow.vttUrl;
  4203. if ((_a = _unsafeWindow.Hls) == null ? undefined : _a.isSupported()) {
  4204. const hls = new _unsafeWindow.Hls({
  4205. autoStartLoad: true,
  4206. maxBufferSize: 1 * 1e3 * 1e3
  4207. });
  4208. hls.loadSource(hlsUrl);
  4209. hls.attachMedia(video);
  4210. } else {
  4211. video.src = hlsUrl;
  4212. }
  4213. const playerSettings = {
  4214. ratio: "16:9",
  4215. controls: [
  4216. "play-large",
  4217. "rewind",
  4218. "play",
  4219. "fast-forward",
  4220. "progress",
  4221. "current-time",
  4222. "duration",
  4223. "mute",
  4224. "captions",
  4225. "settings",
  4226. "pip",
  4227. "fullscreen",
  4228. "volume",
  4229. "quality"
  4230. ],
  4231. fullscreen: {
  4232. enabled: true,
  4233. fallback: true,
  4234. iosNative: true,
  4235. container: null
  4236. },
  4237. speed: {
  4238. selected: 1,
  4239. options: [
  4240. 0.25,
  4241. 0.5,
  4242. 1,
  4243. 1.25,
  4244. 1.5,
  4245. 2,
  4246. 2.5,
  4247. 3,
  4248. 3.5,
  4249. 4,
  4250. 4.5,
  4251. 5
  4252. ]
  4253. },
  4254. i18n: {
  4255. speed: "速度",
  4256. normal: "普通",
  4257. quality: "画质",
  4258. qualityLabel: {
  4259. 0: "自动"
  4260. }
  4261. },
  4262. previewThumbnails: { enabled: hasVtt, src: vttUrl },
  4263. keyboard: {
  4264. focused: true,
  4265. global: true
  4266. }
  4267. };
  4268. _unsafeWindow.player = new _unsafeWindow.Plyr(video, {
  4269. quality: {
  4270. forced: true
  4271. },
  4272. playerSettings
  4273. });
  4274. },
  4275. enableFnRunAt: "document-end"
  4276. },
  4277. {
  4278. type: "switch",
  4279. id: "jabletv-video-page-auto-bpx-player-quality",
  4280. name: "自动 最高画质",
  4281. defaultEnable: true,
  4282. enableFn: () => {
  4283. var _a, _b;
  4284. const player = _unsafeWindow.player;
  4285. if (!player) return;
  4286. if (!((_b = (_a = player.config) == null ? undefined : _a.quality) == null ? undefined : _b.options)) return;
  4287. const maxQuality = Math.max.apply(
  4288. null,
  4289. player.config.quality.options
  4290. );
  4291. player.quality = maxQuality;
  4292. player.config.quality.default = maxQuality;
  4293. player.config.quality.selected = maxQuality;
  4294. const plyr = localStorage.getItem("plyr");
  4295. if (plyr) {
  4296. const plyrData = JSON.parse(plyr);
  4297. plyrData["quality"] = player.quality;
  4298. localStorage.setItem("plyr", JSON.stringify(plyrData));
  4299. }
  4300. },
  4301. enableFnRunAt: "document-end"
  4302. },
  4303. {
  4304. type: "number",
  4305. id: "jabletv-video-page-bpx-player-speed",
  4306. name: "修改 播放速度(-1禁用)",
  4307. description: ["上下方向键快速调整"],
  4308. addonText: "倍",
  4309. minValue: 0.5,
  4310. maxValue: 10,
  4311. step: 0.5,
  4312. defaultValue: -1,
  4313. disableValue: -1,
  4314. fn: async (value) => {
  4315. const player = _unsafeWindow.player;
  4316. if (!player) return;
  4317. player.speed = value;
  4318. const plyr = localStorage.getItem("plyr");
  4319. if (plyr) {
  4320. const plyrData = JSON.parse(plyr);
  4321. plyrData["speed"] = player.speed;
  4322. localStorage.setItem("plyr", JSON.stringify(plyrData));
  4323. }
  4324. }
  4325. },
  4326. {
  4327. type: "number",
  4328. id: "jabletv-video-page-bpx-player-volume",
  4329. name: "修改 播放音量(-1禁用)",
  4330. description: ["上下方向键快速调整"],
  4331. addonText: "%",
  4332. minValue: 0,
  4333. maxValue: 100,
  4334. step: 5,
  4335. defaultValue: -1,
  4336. disableValue: -1,
  4337. fn: (value) => {
  4338. const player = _unsafeWindow.player;
  4339. if (!player) return;
  4340. player.volume = value / 100;
  4341. const plyr = localStorage.getItem("plyr");
  4342. if (plyr) {
  4343. const plyrData = JSON.parse(plyr);
  4344. plyrData["volume"] = player.volume;
  4345. localStorage.setItem("plyr", JSON.stringify(plyrData));
  4346. }
  4347. }
  4348. },
  4349. {
  4350. type: "switch",
  4351. id: "jabletv-video-page-hide-bpx-player-state-wrap",
  4352. name: "隐藏 视频暂停时大播放键"
  4353. }
  4354. ];
  4355. const videoPlayerControlItems$1 = [
  4356. {
  4357. type: "switch",
  4358. id: "jabletv-video-page-hide-bpx-player-ctrl-play",
  4359. name: "隐藏 播放/暂停按钮"
  4360. },
  4361. {
  4362. type: "switch",
  4363. id: "jabletv-video-page-hide-bpx-player-ctrl-progress",
  4364. name: "隐藏 进度条"
  4365. },
  4366. {
  4367. type: "switch",
  4368. id: "jabletv-video-page-hide-bpx-player-ctrl-time",
  4369. name: "隐藏 进度时间"
  4370. },
  4371. {
  4372. type: "switch",
  4373. id: "jabletv-video-page-hide-bpx-player-ctrl-volume",
  4374. name: "隐藏 音量按钮"
  4375. },
  4376. {
  4377. type: "switch",
  4378. id: "jabletv-video-page-hide-bpx-player-ctrl-setting",
  4379. name: "隐藏 视频设置按钮"
  4380. },
  4381. {
  4382. type: "switch",
  4383. id: "jabletv-video-page-hide-bpx-player-ctrl-pip",
  4384. name: "隐藏 画中画按钮"
  4385. },
  4386. {
  4387. type: "switch",
  4388. id: "jabletv-video-page-hide-bpx-player-ctrl-full",
  4389. name: "隐藏 全屏按钮"
  4390. }
  4391. ];
  4392. const _hoisted_1$1 = { class: "m3u8-span" };
  4393. const _hoisted_2 = ["onUpdate:modelValue"];
  4394. const _hoisted_3 = ["onClick"];
  4395. const _hoisted_4 = ["onClick"];
  4396. const _sfc_main$1 = /* @__PURE__ */ e$1.defineComponent({
  4397. __name: "M3U8Comp",
  4398. props: {
  4399. m3u8s: {}
  4400. },
  4401. setup(__props) {
  4402. const openUrl = (url) => {
  4403. window.open(url, "_blank");
  4404. };
  4405. const copyUrl = (url) => {
  4406. navigator.clipboard.writeText(url || "").then().catch();
  4407. };
  4408. return (_ctx, _cache) => {
  4409. return e$1.openBlock(true), e$1.createElementBlock(e$1.Fragment, null, e$1.renderList(_ctx.m3u8s, (m3u8, index) => {
  4410. return e$1.openBlock(), e$1.createElementBlock("div", {
  4411. class: "m3u8-input-group",
  4412. key: index
  4413. }, [
  4414. e$1.createElementVNode("span", _hoisted_1$1, e$1.toDisplayString(_ctx.m3u8s[index].title), 1),
  4415. e$1.withDirectives(e$1.createElementVNode("input", {
  4416. "onUpdate:modelValue": ($event) => _ctx.m3u8s[index].url = $event,
  4417. type: "text",
  4418. class: "m3u8-input"
  4419. }, null, 8, _hoisted_2), [
  4420. [e$1.vModelText, _ctx.m3u8s[index].url]
  4421. ]),
  4422. e$1.createElementVNode("input", {
  4423. class: "m3u8-button--open",
  4424. onClick: ($event) => openUrl(_ctx.m3u8s[index].url),
  4425. value: "Open",
  4426. type: "submit"
  4427. }, null, 8, _hoisted_3),
  4428. e$1.createElementVNode("input", {
  4429. class: "m3u8-button--copy",
  4430. onClick: ($event) => copyUrl(_ctx.m3u8s[index].url),
  4431. value: "Copy",
  4432. type: "submit"
  4433. }, null, 8, _hoisted_4)
  4434. ]);
  4435. }), 128);
  4436. };
  4437. }
  4438. });
  4439. const _export_sfc = (sfc, props) => {
  4440. const target = sfc.__vccOpts || sfc;
  4441. for (const [key, val] of props) {
  4442. target[key] = val;
  4443. }
  4444. return target;
  4445. };
  4446. const M3U8Comp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-70ae07f7"]]);
  4447. const videoToolbarItems$2 = [
  4448. {
  4449. type: "switch",
  4450. id: "jabletv-video-page-hide-below-info-data",
  4451. name: "隐藏 视频数据",
  4452. defaultEnable: true
  4453. },
  4454. {
  4455. type: "switch",
  4456. id: "jabletv-video-page-hide-below-info-tips",
  4457. name: "隐藏 视频发布提醒"
  4458. },
  4459. {
  4460. type: "switch",
  4461. id: "jabletv-video-page-hide-below-info-type-time",
  4462. name: "隐藏 视频类型&发布时间",
  4463. defaultEnable: true
  4464. },
  4465. {
  4466. type: "switch",
  4467. id: "jabletv-video-page-hide-below-info-fav",
  4468. name: "隐藏 视频点赞",
  4469. defaultEnable: true
  4470. },
  4471. {
  4472. type: "switch",
  4473. id: "jabletv-video-page-hide-below-info-mark",
  4474. name: "隐藏 视频收藏",
  4475. defaultEnable: true
  4476. },
  4477. {
  4478. type: "switch",
  4479. id: "jabletv-video-page-show-below-info-m3u8",
  4480. name: "获取 M3U8",
  4481. description: ["截取并显示m3u8, 可使用其他播放器播放"],
  4482. noStyle: true,
  4483. enableFnRunAt: "document-end",
  4484. enableFn: () => {
  4485. if (!_unsafeWindow.hlsUrl) return;
  4486. const m3u8Panle = e$1.createApp(M3U8Comp, {
  4487. m3u8s: [{ title: "m3u8", url: _unsafeWindow.hlsUrl }]
  4488. });
  4489. m3u8Panle.mount(
  4490. (() => {
  4491. var _a;
  4492. const node = document.createElement("div");
  4493. node.id = "div-m3u8s";
  4494. (_a = document.querySelector("section.video-info > div.text-center")) == null ? undefined : _a.appendChild(node);
  4495. return node;
  4496. })()
  4497. );
  4498. },
  4499. disableFn: () => {
  4500. const node = document.querySelector("#div-m3u8s");
  4501. if (node) node.remove();
  4502. }
  4503. },
  4504. {
  4505. type: "switch",
  4506. id: "jabletv-video-page-hide-below-info-more",
  4507. name: "隐藏 视频更多",
  4508. defaultEnable: true
  4509. },
  4510. {
  4511. type: "switch",
  4512. id: "jabletv-video-page-hide-below-info-tags",
  4513. name: "隐藏 视频标签"
  4514. },
  4515. {
  4516. type: "switch",
  4517. id: "jabletv-video-page-hide-below-info-new-comment",
  4518. name: "隐藏 发布新评论",
  4519. defaultEnable: true
  4520. },
  4521. {
  4522. type: "switch",
  4523. id: "jabletv-video-page-hide-below-info-comments",
  4524. name: "隐藏 视频留言"
  4525. }
  4526. ];
  4527. const videoGroups$3 = [
  4528. {
  4529. name: i18n.language.jabletv.video.basic.name,
  4530. fold: true,
  4531. items: videoBasicItems$2
  4532. },
  4533. {
  4534. name: i18n.language.jabletv.video.player.name,
  4535. fold: true,
  4536. items: videoPlayerItems$2
  4537. },
  4538. {
  4539. name: i18n.language.jabletv.video.playerContorl.name,
  4540. fold: true,
  4541. items: videoPlayerControlItems$1
  4542. },
  4543. {
  4544. name: i18n.language.jabletv.video.toolbar.name,
  4545. fold: true,
  4546. items: videoToolbarItems$2
  4547. }
  4548. ];
  4549. const commonStyle$6 = 'html[jabletv-remove-ads] div.plyr__ads,html[jabletv-remove-ads] div:has(>div>img[src="//cdn.tapioni.com/ab-banner.png"]),html[jabletv-remove-ads] div.asg-interstitial:has(>div>iframe),html[jabletv-remove-ads] section>div.row>div:has(>div>div.detail>h6>a[href^="https://go."]),html[jabletv-remove-ads] #site-content>div.container>section:has(>div>div>iframe),html[jabletv-remove-ads] #site-content>div.container>section:has(>div>div>img[src*=".afcdn.net"]),html[jabletv-remove-ads] div.row>div:has(div[id^=exo-native-widget-]),html[jabletv-remove-ads] section.video-info>div.text-center>ins,html[jabletv-remove-ads] section.video-info>div.text-center>div:has(>div>iframe),html[jabletv-remove-ads] div.text-center>a[href^="http://s."],html[jabletv-remove-ads] div.row>div:has(>div[id^=exoNativeWidget]),html[jabletv-remove-ads] div.row>div:has(h6>a[href^="https://r."]),html[jabletv-remove-ads] #site-content>div.container>section:has(>iframe),html[jabletv-remove-ads] section.video-info>div.text-center>iframe,html[jabletv-remove-ads] #site-content>div>div>div.col.right-sidebar>div.text-center>iframe,html[jabletv-remove-ads] body>div[class^=root--],html[jabletv-remove-ads] div[id^=asg-],html[jabletv-remove-ads] #site-content>div.container>section:has(>a[target=_blank]>img),html[jabletv-remove-ads] body>div.h5.text-center:has(>span):has(>a[target=_blank]){display:none!important}html[jabletv-hide-footer] #site-footer{display:none!important}html[jabletv-common-header-hide-logo] #site-header>div>div>div:has(>a.logo){visibility:hidden!important}html[jabletv-common-header-hide-new] #site-header>div>div>div>nav>div>ul>li:has(a[href="/new-release/"]){display:none!important}html[jabletv-common-header-hide-blu-ray] body>nav>div.container>div.row>div:has(a[href^="https://r."]),html[jabletv-common-header-hide-blu-ray] #site-header>div>div>div>nav>div>ul>li:has(a[href^="https://r."]){display:none!important}html[jabletv-common-header-hide-live-sex] body>nav>div.container>div.row>div:has(a[href^="https://go."]),html[jabletv-common-header-hide-live-sex] #site-header>div>div>div>nav>div>ul>li:has(a[href^="https://go."]){display:none!important}html[jabletv-common-header-hide-best-porns] body>nav>div.container>div.row>div:has(a[href="https://141jj.com"]),html[jabletv-common-header-hide-best-porns] #site-header>div>div>div>nav>div>ul>li:has(a[href="https://141jj.com"]){display:none!important}html[jabletv-common-header-hide-more-sites] body>nav>div.container>div.row>div:has(a[href^="https://theporndude.com"]),html[jabletv-common-header-hide-more-sites] #site-header>div>div>div>nav>div>ul>li:has(a[href^="https://theporndude.com"]){display:none!important}html[jabletv-common-header-hide-sex-chat] body>nav>div.container>div.row>div:has(a[href="https://uuw73.com"]),html[jabletv-common-header-hide-sex-chat] #site-header>div>div>div>nav>div>ul>li:has(a[href="https://uuw73.com"]){display:none!important}html[jabletv-common-header-hide-javhd] body>nav>div.container>div.row>div:has(a[href^="https://enter."]),html[jabletv-common-header-hide-javhd] #site-header>div>div>div>nav>div>ul>li:has(a[href^="https://enter."]){display:none!important}html[jabletv-common-header-hide-search] #site-header>div>div>div.col-auto.header-right>div.search{display:none!important}html[jabletv-common-header-hide-lang] #site-header>div>div>div.header-right>div.lang{display:none!important}html[jabletv-common-header-hide-settings] #site-header>div>div>div.header-right>div.settings{display:none!important}';
  4550. const homepageStyle = "html[jabletv-home-page-basic-blur-video-image] div.video-img-box>div.img-box>a>img{filter:blur(5px)}html[jabletv-home-page-basic-blur-video-title] div.video-img-box>div.detail>h6.title>a{filter:blur(5px)}html[jabletv-home-page-basic-hide-video-likes] div.video-img-box>div.img-box>a>div.absolute-bottom-left{display:none!important}html[jabletv-home-page-basic-hide-video-duration] div.video-img-box>div.img-box>a>div.absolute-bottom-right{display:none!important}html[jabletv-home-page-basic-revert-full-title] div.video-img-box>div.detail>h6.title:has(>a){white-space:normal!important;max-height:none!important}html[jabletv-home-page-basic-hide-video-data] div.video-img-box>div.detail>p.sub-title{display:none!important}html[jabletv-home-page-hide-video-carousel] #site-content>div.jable-carousel.jable-animate{display:none!important}html[jabletv-home-page-hide-section-sub-title] #site-content>div.container>section>div>div>div.title-with-more>div.title-box>h6.sub-title.inactive-color,html[jabletv-home-page-hide-section-sub-title] #site-content>div.container>section>div.title-with-more>div.title-box>h6.sub-title.inactive-color{display:none!important}";
  4551. const searchStyle$1 = "html[jabletv-home-page-basic-blur-video-image] div.video-img-box>div.img-box>a>img{filter:blur(5px)}html[jabletv-home-page-basic-blur-video-title] div.video-img-box>div.detail>h6.title>a{filter:blur(5px)}html[jabletv-home-page-basic-hide-video-likes] div.video-img-box>div.img-box>a>div.absolute-bottom-left{display:none!important}html[jabletv-home-page-basic-hide-video-duration] div.video-img-box>div.img-box>a>div.absolute-bottom-right{display:none!important}html[jabletv-home-page-basic-revert-full-title] div.video-img-box>div.detail>h6.title:has(>a){white-space:normal!important;max-height:none!important}html[jabletv-home-page-basic-hide-video-data] div.video-img-box>div.detail>p.sub-title{display:none!important}";
  4552. const videoStyle$3 = "html[jabletv-home-page-basic-blur-video-image] div.video-img-box>div.img-box>a>img{filter:blur(5px)}html[jabletv-home-page-basic-blur-video-title] div.video-img-box>div.detail>h6.title>a{filter:blur(5px)}html[jabletv-home-page-basic-hide-video-likes] div.video-img-box>div.img-box>a>div.absolute-bottom-left{display:none!important}html[jabletv-home-page-basic-hide-video-duration] div.video-img-box>div.img-box>a>div.absolute-bottom-right{display:none!important}html[jabletv-home-page-basic-revert-full-title] div.video-img-box>div.detail>h6.title:has(>a){white-space:normal!important;max-height:none!important}html[jabletv-home-page-basic-hide-video-data] div.video-img-box>div.detail>p.sub-title{display:none!important}html[jabletv-video-page-hide-bpx-player-state-wrap] div.plyr button.plyr__control--overlaid[data-plyr=play]:has(span.plyr__sr-only){display:none!important}html[jabletv-video-page-hide-bpx-player-ctrl-play] div.plyr__controls button.plyr__controls__item[data-plyr=play],html[jabletv-video-page-hide-bpx-player-ctrl-progress] div.plyr__controls div.plyr__controls__item.plyr__progress__container,html[jabletv-video-page-hide-bpx-player-ctrl-time] div.plyr__controls div.plyr__controls__item.plyr__time--current.plyr__time{display:none!important}html[jabletv-video-page-hide-bpx-player-ctrl-volume] div.plyr__controls div.plyr__controls__item.plyr__volume:has(button[data-plyr=mute]){display:none!important}html[jabletv-video-page-hide-bpx-player-ctrl-setting] div.plyr__controls div.plyr__controls__item.plyr__menu:has(button[data-plyr=settings]){display:none!important}html[jabletv-video-page-hide-bpx-player-ctrl-pip] div.plyr__controls button.plyr__controls__item[data-plyr=pip],html[jabletv-video-page-hide-bpx-player-ctrl-full] div.plyr__controls button.plyr__controls__item[data-plyr=fullscreen]{display:none!important}html[jabletv-video-page-hide-below-info-data] section.video-info>div.info-header>div.header-left>h6{display:none!important}html[jabletv-video-page-hide-below-info-tips] section.video-info>h5.desc{display:none!important}html[jabletv-video-page-hide-below-info-type-time] section.video-info>div.info-header>div.header-right{display:none!important}html[jabletv-video-page-hide-below-info-fav] section.video-info>div.text-center>div>button:has(>span.count){display:none!important}html[jabletv-video-page-hide-below-info-mark] section.video-info>div.text-center>div>button:nth-child(2){display:none!important}html[jabletv-video-page-hide-below-info-more] section.video-info>div.text-center>div>button[data-toggle=dropdown]{display:none!important}html[jabletv-video-page-hide-below-info-tags] section.video-info>div.text-center>h5.tags{display:none!important}html[jabletv-video-page-hide-below-info-new-comment] section.comments>div.new-comment{display:none!important}html[jabletv-video-page-hide-below-info-comments] #video_comments_video_comments{display:none!important}";
  4553. const rules$7 = [
  4554. {
  4555. name: "javletv-homepage",
  4556. groups: homepageGroups,
  4557. style: homepageStyle,
  4558. checkFn: () => isPageJableTvHomepage()
  4559. },
  4560. {
  4561. name: "javletv-video",
  4562. groups: videoGroups$3,
  4563. style: videoStyle$3,
  4564. checkFn: () => isPageJableTvVideo()
  4565. },
  4566. {
  4567. name: "javletv-search",
  4568. groups: searchGroups$1,
  4569. style: searchStyle$1,
  4570. checkFn: () => isPageJableTvSearch()
  4571. },
  4572. {
  4573. name: "javletv-common",
  4574. groups: commonGroups$6,
  4575. style: commonStyle$6,
  4576. isSpecial: true,
  4577. checkFn: () => isPageJableTv()
  4578. }
  4579. ];
  4580. const commonBasicItems$5 = [
  4581. {
  4582. type: "switch",
  4583. id: "missav-common-basic-remove-ads",
  4584. name: i18n.language.missav.common.basic.remove_ads,
  4585. defaultEnable: true,
  4586. enableFn: () => {
  4587. document.addEventListener("alpine:init", () => {
  4588. log("alpine:init");
  4589. });
  4590. document.addEventListener("alpine:initializing", () => {
  4591. log("alpine:initializing");
  4592. });
  4593. document.addEventListener("alpine:initialized", () => {
  4594. var _a;
  4595. log("alpine:initialized");
  4596. const iframes = document.querySelectorAll("iframe[data-src]");
  4597. for (const iframe of iframes) {
  4598. iframe.remove();
  4599. log("remove iframe");
  4600. }
  4601. (_a = document.querySelector("#html-ads")) == null ? undefined : _a.remove();
  4602. });
  4603. }
  4604. },
  4605. {
  4606. type: "switch",
  4607. id: "missav-common-basic-hide-footer",
  4608. name: i18n.language.missav.common.basic.hide_footer,
  4609. defaultEnable: true
  4610. },
  4611. {
  4612. type: "switch",
  4613. id: "missav-common-basic-hide-new-site-banner",
  4614. name: i18n.language.missav.common.basic.hide_new_site_banner,
  4615. defaultEnable: true
  4616. },
  4617. {
  4618. type: "switch",
  4619. id: "missav-common-basic-redirect-new-url",
  4620. name: i18n.language.missav.common.basic.redirect_new_url,
  4621. defaultEnable: true,
  4622. noStyle: true,
  4623. enableFn: () => {
  4624. if (location.host === "missav.com") {
  4625. const newHref = location.href.replace(
  4626. "missav.com",
  4627. "missav.ws"
  4628. );
  4629. location.href = newHref;
  4630. }
  4631. }
  4632. },
  4633. {
  4634. type: "editor",
  4635. id: "missav-common-basic-auto-login-email-password",
  4636. name: i18n.language.missav.common.basic.auto_login_email_password,
  4637. description: i18n.language.missav.common.basic.auto_login_email_password_description,
  4638. editorTitle: i18n.language.missav.common.basic.auto_login_email_password_editorTitle,
  4639. editorDescription: i18n.language.missav.common.basic.auto_login_email_password_editorDescription,
  4640. saveFn: () => {
  4641. }
  4642. },
  4643. {
  4644. type: "switch",
  4645. id: "missav-common-basic-auto-login",
  4646. name: i18n.language.missav.common.basic.auto_login,
  4647. noStyle: true,
  4648. enableFn: () => {
  4649. document.addEventListener("alpine:init", () => {
  4650. const div = document.querySelector(
  4651. `body > div > div[x-show="showModal.login"] > div[x-data]`
  4652. );
  4653. if (!div) return;
  4654. const info = PGStorage.get(
  4655. "missav-common-basic-auto-login-email-password",
  4656. []
  4657. );
  4658. if (!info) return;
  4659. const [email, password] = info;
  4660. if (!email || !password) return;
  4661. div.setAttribute(
  4662. "x-init",
  4663. `$nextTick(()=>{email=${email};password=${password};console.log('login',{email:email,password:password});login();});`
  4664. );
  4665. });
  4666. }
  4667. }
  4668. // {
  4669. // type: 'list',
  4670. // id: 'missav-common-basic-web-locale',
  4671. // name: '网站地区',
  4672. // defaultValue: 'en',
  4673. // disableValue: '',
  4674. // options: [
  4675. // {
  4676. // id: 'cn',
  4677. // name: 'cn',
  4678. // },
  4679. // {
  4680. // id: 'en',
  4681. // name: 'en',
  4682. // },
  4683. // {
  4684. // id: 'ja',
  4685. // name: 'ja',
  4686. // },
  4687. // {
  4688. // id: 'ko',
  4689. // name: 'ko',
  4690. // },
  4691. // {
  4692. // id: 'ms',
  4693. // name: 'ms',
  4694. // },
  4695. // {
  4696. // id: 'th',
  4697. // name: 'th',
  4698. // },
  4699. // {
  4700. // id: 'de',
  4701. // name: 'de',
  4702. // },
  4703. // {
  4704. // id: 'fr',
  4705. // name: 'fr',
  4706. // },
  4707. // {
  4708. // id: 'vi',
  4709. // name: 'vi',
  4710. // },
  4711. // {
  4712. // id: 'id',
  4713. // name: 'id',
  4714. // },
  4715. // {
  4716. // id: 'fil',
  4717. // name: 'fil',
  4718. // },
  4719. // {
  4720. // id: 'pt',
  4721. // name: 'pt',
  4722. // },
  4723. // ],
  4724. // fn: (id:string) => {
  4725. // // const fallbackLocale = 'zh';
  4726. // function removeTrailingSlash(url: string) {
  4727. // if (url.substr(url.length - 1) === '/') {
  4728. // return url.slice(0, -1);
  4729. // }
  4730. // return url.replace('/?', '?');
  4731. // }
  4732. // function localizedUrl(locale: string) {
  4733. // let path = window.location.pathname;
  4734. // if (!path.endsWith('/')) {
  4735. // path = `${path}/`;
  4736. // }
  4737. // path = path + window.location.search;
  4738. // // if (locale === this.fallbackLocale) {
  4739. // // return removeTrailingSlash(
  4740. // // path
  4741. // // .replace('/cn/', '/')
  4742. // // .replace('/en/', '/')
  4743. // // .replace('/ja/', '/')
  4744. // // .replace('/ko/', '/')
  4745. // // .replace('/ms/', '/')
  4746. // // .replace('/th/', '/')
  4747. // // .replace('/de/', '/')
  4748. // // .replace('/fr/', '/')
  4749. // // .replace('/vi/', '/')
  4750. // // .replace('/id/', '/')
  4751. // // .replace('/fil/', '/')
  4752. // // .replace('/pt/', '/'),
  4753. // // );
  4754. // // }
  4755. // if (
  4756. // path.includes('/cn/') ||
  4757. // path.includes('/en/') ||
  4758. // path.includes('/ja/') ||
  4759. // path.includes('/ko/') ||
  4760. // path.includes('/ms/') ||
  4761. // path.includes('/th/') ||
  4762. // path.includes('/de/') ||
  4763. // path.includes('/fr/') ||
  4764. // path.includes('/vi/') ||
  4765. // path.includes('/id/') ||
  4766. // path.includes('/fil/') ||
  4767. // path.includes('/pt/')
  4768. // ) {
  4769. // return removeTrailingSlash(
  4770. // path
  4771. // .replace('/cn/', `/${locale}/`)
  4772. // .replace('/en/', `/${locale}/`)
  4773. // .replace('/ja/', `/${locale}/`)
  4774. // .replace('/ko/', `/${locale}/`)
  4775. // .replace('/ms/', `/${locale}/`)
  4776. // .replace('/th/', `/${locale}/`)
  4777. // .replace('/de/', `/${locale}/`)
  4778. // .replace('/fr/', `/${locale}/`)
  4779. // .replace('/vi/', `/${locale}/`)
  4780. // .replace('/id/', `/${locale}/`)
  4781. // .replace('/fil/', `/${locale}/`)
  4782. // .replace('/pt/', `/${locale}/`),
  4783. // );
  4784. // }
  4785. // return removeTrailingSlash(`/${locale}${path}`);
  4786. // }
  4787. // window.location.href = localizedUrl(id);
  4788. // },
  4789. // },
  4790. // {
  4791. // type:'switch',
  4792. // id:'missav-common-basic-auto-web-locale',
  4793. // name:'自动 切换地区',
  4794. // noStyle:true,
  4795. // enableFn:()=> {
  4796. // function removeTrailingSlash(url: string) {
  4797. // if (url.substr(url.length - 1) === '/') {
  4798. // return url.slice(0, -1);
  4799. // }
  4800. // return url.replace('/?', '?');
  4801. // }
  4802. // function localizedUrl(locale: string) {
  4803. // let path = window.location.pathname;
  4804. // if (!path.endsWith('/')) {
  4805. // path = `${path}/`;
  4806. // }
  4807. // path = path + window.location.search;
  4808. // // if (locale === this.fallbackLocale) {
  4809. // // return removeTrailingSlash(
  4810. // // path
  4811. // // .replace('/cn/', '/')
  4812. // // .replace('/en/', '/')
  4813. // // .replace('/ja/', '/')
  4814. // // .replace('/ko/', '/')
  4815. // // .replace('/ms/', '/')
  4816. // // .replace('/th/', '/')
  4817. // // .replace('/de/', '/')
  4818. // // .replace('/fr/', '/')
  4819. // // .replace('/vi/', '/')
  4820. // // .replace('/id/', '/')
  4821. // // .replace('/fil/', '/')
  4822. // // .replace('/pt/', '/'),
  4823. // // );
  4824. // // }
  4825. // if (
  4826. // path.includes('/cn/') ||
  4827. // path.includes('/en/') ||
  4828. // path.includes('/ja/') ||
  4829. // path.includes('/ko/') ||
  4830. // path.includes('/ms/') ||
  4831. // path.includes('/th/') ||
  4832. // path.includes('/de/') ||
  4833. // path.includes('/fr/') ||
  4834. // path.includes('/vi/') ||
  4835. // path.includes('/id/') ||
  4836. // path.includes('/fil/') ||
  4837. // path.includes('/pt/')
  4838. // ) {
  4839. // return removeTrailingSlash(
  4840. // path
  4841. // .replace('/cn/', `/${locale}/`)
  4842. // .replace('/en/', `/${locale}/`)
  4843. // .replace('/ja/', `/${locale}/`)
  4844. // .replace('/ko/', `/${locale}/`)
  4845. // .replace('/ms/', `/${locale}/`)
  4846. // .replace('/th/', `/${locale}/`)
  4847. // .replace('/de/', `/${locale}/`)
  4848. // .replace('/fr/', `/${locale}/`)
  4849. // .replace('/vi/', `/${locale}/`)
  4850. // .replace('/id/', `/${locale}/`)
  4851. // .replace('/fil/', `/${locale}/`)
  4852. // .replace('/pt/', `/${locale}/`),
  4853. // );
  4854. // }
  4855. // return removeTrailingSlash(`/${locale}${path}`);
  4856. // }
  4857. // window.location.href = localizedUrl(PGStorage.get('missav-common-basic-web-locale','zh'));
  4858. // },
  4859. // }
  4860. ];
  4861. const commonHeaderRightItems = [
  4862. {
  4863. type: "switch",
  4864. id: "missav-common-header-hide-logo",
  4865. name: i18n.language.missav.common.header.hide_logo
  4866. },
  4867. {
  4868. type: "switch",
  4869. id: "missav-common-header-hide-live-cam-sex",
  4870. name: i18n.language.missav.common.header.hide_live_cam_sex,
  4871. defaultEnable: true
  4872. },
  4873. {
  4874. type: "switch",
  4875. id: "missav-common-header-hide-comic",
  4876. name: i18n.language.missav.common.header.hide_comic,
  4877. defaultEnable: true
  4878. },
  4879. {
  4880. type: "switch",
  4881. id: "missav-common-header-hide-subtitle",
  4882. name: i18n.language.missav.common.header.hide_subtitle
  4883. },
  4884. {
  4885. type: "switch",
  4886. id: "missav-common-header-hide-watch-jav",
  4887. name: i18n.language.missav.common.header.hide_watch_jav
  4888. },
  4889. {
  4890. type: "switch",
  4891. id: "missav-common-header-hide-amateur",
  4892. name: i18n.language.missav.common.header.hide_amateur
  4893. },
  4894. {
  4895. type: "switch",
  4896. id: "missav-common-header-hide-uncensored",
  4897. name: i18n.language.missav.common.header.hide_uncensored
  4898. },
  4899. {
  4900. type: "switch",
  4901. id: "missav-common-header-hide-asia-av",
  4902. name: i18n.language.missav.common.header.hide_asia_av
  4903. },
  4904. {
  4905. type: "switch",
  4906. id: "missav-common-header-hide-my-collection",
  4907. name: i18n.language.missav.common.header.hide_my_collection
  4908. },
  4909. {
  4910. type: "switch",
  4911. id: "missav-common-header-hide-upgrade-vip",
  4912. name: i18n.language.missav.common.header.hide_upgrade_vip,
  4913. description: i18n.language.missav.common.header.hide_upgrade_vip_description,
  4914. defaultEnable: true
  4915. },
  4916. {
  4917. type: "switch",
  4918. id: "missav-common-header-hide-more-sites",
  4919. name: i18n.language.missav.common.header.hide_more_sites,
  4920. defaultEnable: true
  4921. },
  4922. {
  4923. type: "switch",
  4924. id: "missav-common-header-hide-tg",
  4925. name: i18n.language.missav.common.header.hide_tg,
  4926. defaultEnable: true
  4927. },
  4928. {
  4929. type: "switch",
  4930. id: "missav-common-header-hide-search",
  4931. name: i18n.language.missav.common.header.hide_search
  4932. },
  4933. {
  4934. type: "switch",
  4935. id: "missav-common-header-hide-locale-switcher",
  4936. name: i18n.language.missav.common.header.hide_locale_switcher
  4937. },
  4938. {
  4939. type: "switch",
  4940. id: "missav-common-header-hide-site-live",
  4941. name: i18n.language.missav.common.header.hide_site_live,
  4942. description: i18n.language.missav.common.header.hide_site_live_description,
  4943. defaultEnable: true
  4944. },
  4945. {
  4946. type: "switch",
  4947. id: "missav-common-header-hide-mobile-right-menu",
  4948. name: i18n.language.missav.common.header.hide_mobile_right_menu,
  4949. description: i18n.language.missav.common.header.hide_mobile_right_menu_description
  4950. }
  4951. ];
  4952. const commonGroups$5 = [
  4953. {
  4954. name: i18n.language.missav.common.basic.name,
  4955. fold: true,
  4956. items: commonBasicItems$5
  4957. },
  4958. {
  4959. name: i18n.language.missav.common.header.name,
  4960. fold: true,
  4961. items: commonHeaderRightItems
  4962. }
  4963. ];
  4964. const homeBasicItems = [
  4965. {
  4966. type: "switch",
  4967. id: "missav-home-page-basic-hide-search-title",
  4968. name: i18n.language.missav.home.basic.hide_search_title,
  4969. defaultEnable: true
  4970. },
  4971. {
  4972. type: "switch",
  4973. id: "missav-home-page-basic-hide-search-box",
  4974. name: i18n.language.missav.home.basic.hide_search_box
  4975. },
  4976. {
  4977. type: "switch",
  4978. id: "missav-home-page-basic-hide-search-history",
  4979. name: i18n.language.missav.home.basic.hide_search_history
  4980. },
  4981. {
  4982. type: "switch",
  4983. id: "missav-home-page-basic-blur-video-image",
  4984. name: i18n.language.missav.home.basic.blur_video_image,
  4985. description: i18n.language.missav.home.basic.blur_video_image_description
  4986. },
  4987. {
  4988. type: "switch",
  4989. id: "missav-home-page-basic-blur-video-title",
  4990. name: i18n.language.missav.home.basic.blur_video_title,
  4991. description: i18n.language.missav.home.basic.blur_video_title_description
  4992. },
  4993. {
  4994. type: "switch",
  4995. id: "missav-home-page-basic-hide-video-genres",
  4996. name: i18n.language.missav.home.basic.hide_video_genres,
  4997. description: i18n.language.missav.home.basic.hide_video_genres_description
  4998. },
  4999. {
  5000. type: "switch",
  5001. id: "missav-home-page-basic-hide-video-duration",
  5002. name: i18n.language.missav.home.basic.hide_video_duration,
  5003. description: i18n.language.missav.home.basic.hide_video_duration_description
  5004. },
  5005. {
  5006. type: "switch",
  5007. id: "missav-home-page-basic-revert-full-title",
  5008. name: i18n.language.missav.home.basic.revert_full_title,
  5009. description: i18n.language.missav.home.basic.revert_full_title_description,
  5010. defaultEnable: true
  5011. }
  5012. ];
  5013. const homeVideoItems = [
  5014. {
  5015. type: "switch",
  5016. id: "missav-home-page-video-open-video-load-more",
  5017. name: i18n.language.missav.home.video.recommended_video_load_more,
  5018. noStyle: true,
  5019. enableFn: () => {
  5020. document.addEventListener("alpine:init", () => {
  5021. const quantity = PGStorage.get(
  5022. "missav-home-page-video-recommended-video-quantity-load-number"
  5023. );
  5024. _unsafeWindow.recommendedQuantity = parseInt(quantity) || 4;
  5025. });
  5026. }
  5027. },
  5028. {
  5029. type: "list",
  5030. id: "missav-home-page-video-recommended-video-quantity-load-number",
  5031. name: i18n.language.missav.home.video.recommended_video_quantity_load_number,
  5032. defaultValue: "4",
  5033. disableValue: "4",
  5034. options: [
  5035. {
  5036. id: "4",
  5037. name: "x4"
  5038. },
  5039. {
  5040. id: "8",
  5041. name: "x8"
  5042. },
  5043. {
  5044. id: "12",
  5045. name: "x12"
  5046. },
  5047. {
  5048. id: "16",
  5049. name: "x16"
  5050. }
  5051. ]
  5052. }
  5053. ];
  5054. const homeGroups = [
  5055. {
  5056. name: i18n.language.missav.home.basic.name,
  5057. items: homeBasicItems
  5058. },
  5059. {
  5060. name: i18n.language.missav.home.video.name,
  5061. items: homeVideoItems
  5062. }
  5063. ];
  5064. const searchBasicItems = [
  5065. {
  5066. type: "switch",
  5067. id: "missav-home-page-basic-blur-video-image",
  5068. name: i18n.language.missav.home.basic.blur_video_image,
  5069. description: i18n.language.missav.home.basic.blur_video_image_description
  5070. },
  5071. {
  5072. type: "switch",
  5073. id: "missav-home-page-basic-blur-video-title",
  5074. name: i18n.language.missav.home.basic.blur_video_title,
  5075. description: i18n.language.missav.home.basic.blur_video_title_description
  5076. },
  5077. {
  5078. type: "switch",
  5079. id: "missav-home-page-basic-hide-video-genres",
  5080. name: i18n.language.missav.home.basic.hide_video_genres,
  5081. description: i18n.language.missav.home.basic.hide_video_genres_description
  5082. },
  5083. {
  5084. type: "switch",
  5085. id: "missav-home-page-basic-hide-video-duration",
  5086. name: i18n.language.missav.home.basic.hide_video_duration,
  5087. description: i18n.language.missav.home.basic.hide_video_duration_description
  5088. },
  5089. {
  5090. type: "switch",
  5091. id: "missav-home-page-basic-revert-full-title",
  5092. name: i18n.language.missav.home.basic.revert_full_title,
  5093. description: i18n.language.missav.home.basic.revert_full_title_description,
  5094. defaultEnable: true
  5095. }
  5096. ];
  5097. const searchGroups = [
  5098. {
  5099. name: i18n.language.missav.search.basic.name,
  5100. items: searchBasicItems
  5101. }
  5102. ];
  5103. const videoBasicItems$1 = [
  5104. {
  5105. type: "switch",
  5106. id: "missav-video-page-basic-auto-switch-uncensored",
  5107. name: i18n.language.missav.video.basic.auto_switch_uncensored,
  5108. description: i18n.language.missav.video.basic.auto_switch_uncensored_description,
  5109. noStyle: true,
  5110. enableFn: () => {
  5111. if (location.pathname.includes("chinese-subtitle") || location.pathname.includes("english-subtitle")) {
  5112. log("跳过带字幕版本");
  5113. return;
  5114. }
  5115. const optionMenuItems = document.querySelectorAll(
  5116. "a[id^='option-menu-item'"
  5117. );
  5118. optionMenuItems.forEach((optionMenuItem) => {
  5119. const url = optionMenuItem.getAttribute("href");
  5120. if (url == null ? undefined : url.includes("uncensored")) {
  5121. optionMenuItem.click();
  5122. }
  5123. });
  5124. },
  5125. enableFnRunAt: "document-end"
  5126. },
  5127. {
  5128. type: "switch",
  5129. id: "missav-home-page-basic-blur-video-image",
  5130. name: i18n.language.missav.home.basic.blur_video_image,
  5131. description: i18n.language.missav.home.basic.blur_video_image_description
  5132. },
  5133. {
  5134. type: "switch",
  5135. id: "missav-home-page-basic-blur-video-title",
  5136. name: i18n.language.missav.home.basic.blur_video_title,
  5137. description: i18n.language.missav.home.basic.blur_video_title_description
  5138. },
  5139. {
  5140. type: "switch",
  5141. id: "missav-home-page-basic-hide-video-genres",
  5142. name: i18n.language.missav.home.basic.hide_video_genres,
  5143. description: i18n.language.missav.home.basic.hide_video_genres_description
  5144. },
  5145. {
  5146. type: "switch",
  5147. id: "missav-home-page-basic-hide-video-duration",
  5148. name: i18n.language.missav.home.basic.hide_video_duration,
  5149. description: i18n.language.missav.home.basic.hide_video_duration_description
  5150. },
  5151. {
  5152. type: "switch",
  5153. id: "missav-home-page-basic-revert-full-title",
  5154. name: i18n.language.missav.home.basic.revert_full_title,
  5155. description: i18n.language.missav.home.basic.revert_full_title_description,
  5156. defaultEnable: true
  5157. }
  5158. ];
  5159. const videoPlayerItems$1 = [
  5160. {
  5161. type: "switch",
  5162. id: "missav-video-page-player-hide-new-site-banner",
  5163. name: i18n.language.missav.video.player.hide_new_site_banner,
  5164. defaultEnable: true
  5165. },
  5166. {
  5167. type: "switch",
  5168. id: "missav-video-page-player-auto-quality",
  5169. name: i18n.language.missav.video.player.auto_quality,
  5170. defaultEnable: true,
  5171. enableFn: () => {
  5172. var _a, _b;
  5173. const player = _unsafeWindow.player;
  5174. if (!player) return;
  5175. if (!((_b = (_a = player.config) == null ? undefined : _a.quality) == null ? undefined : _b.options)) return;
  5176. const maxQuality = Math.max.apply(
  5177. null,
  5178. player.config.quality.options
  5179. );
  5180. player.quality = maxQuality;
  5181. player.config.quality.default = maxQuality;
  5182. player.config.quality.selected = maxQuality;
  5183. const plyr = localStorage.getItem("plyr");
  5184. if (plyr) {
  5185. const plyrData = JSON.parse(plyr);
  5186. plyrData["quality"] = player.quality;
  5187. localStorage.setItem("plyr", JSON.stringify(plyrData));
  5188. }
  5189. },
  5190. enableFnRunAt: "document-end"
  5191. },
  5192. {
  5193. type: "number",
  5194. id: "missav-video-page-player-speed",
  5195. name: i18n.language.missav.video.player.speed,
  5196. minValue: 0.5,
  5197. maxValue: 10,
  5198. step: 0.5,
  5199. defaultValue: 1,
  5200. disableValue: -1,
  5201. addonText: i18n.language.missav.video.player.speed_addonText,
  5202. fn: (value) => {
  5203. const player = _unsafeWindow.player;
  5204. if (!player) return;
  5205. player.speed = value;
  5206. const plyr = localStorage.getItem("plyr");
  5207. if (plyr) {
  5208. const plyrData = JSON.parse(plyr);
  5209. plyrData["speed"] = player.speed;
  5210. localStorage.setItem("plyr", JSON.stringify(plyrData));
  5211. }
  5212. }
  5213. },
  5214. {
  5215. type: "number",
  5216. id: "missav-video-page-player-volume",
  5217. name: i18n.language.missav.video.player.volume,
  5218. minValue: 0,
  5219. maxValue: 100,
  5220. step: 5,
  5221. defaultValue: 50,
  5222. disableValue: -1,
  5223. addonText: i18n.language.missav.video.player.volume_addonText,
  5224. fn: (value) => {
  5225. const player = _unsafeWindow.player;
  5226. if (!player) return;
  5227. player.volume = value / 100;
  5228. const plyr = localStorage.getItem("plyr");
  5229. if (plyr) {
  5230. const plyrData = JSON.parse(plyr);
  5231. plyrData["volume"] = player.volume;
  5232. localStorage.setItem("plyr", JSON.stringify(plyrData));
  5233. }
  5234. }
  5235. },
  5236. {
  5237. type: "switch",
  5238. id: "missav-video-page-player-hide-play-btn",
  5239. name: i18n.language.missav.video.player.hide_play_btn
  5240. },
  5241. {
  5242. type: "switch",
  5243. id: "missav-video-page-player-cancel-focus-stop",
  5244. name: i18n.language.missav.video.player.cancel_focus_stop,
  5245. defaultEnable: true,
  5246. noStyle: true,
  5247. enableFn: () => {
  5248. document.addEventListener("ready", () => {
  5249. if (!_unsafeWindow.player) return;
  5250. const originPause = _unsafeWindow.player.pause;
  5251. _unsafeWindow.player.pause = () => {
  5252. if (document.hasFocus()) {
  5253. return originPause();
  5254. }
  5255. };
  5256. });
  5257. }
  5258. },
  5259. {
  5260. type: "switch",
  5261. id: "missav-video-page-player-hook-open-window",
  5262. name: i18n.language.missav.video.player.hook_open_window,
  5263. defaultEnable: true,
  5264. noStyle: true,
  5265. enableFn: () => {
  5266. document.addEventListener("alpine:init", () => {
  5267. const div = document.querySelector(
  5268. `div.content-without-search > div > div.order-first > div[x-init]`
  5269. );
  5270. if (!div) return;
  5271. const x_init = div.getAttribute("x-init");
  5272. div.setAttribute(
  5273. "x-init",
  5274. (x_init == null ? undefined : x_init.replace(
  5275. "$nextTick(() => {",
  5276. `$nextTick(() => {pop=()=>{console.log('hook pop');};popOnce=true;directUrls=[];directUrlsIphone=[];`
  5277. )) || ""
  5278. );
  5279. });
  5280. document.addEventListener("DOMContentLoaded", () => {
  5281. const player = document.querySelector(
  5282. `div.order-first > div > div.relative > div`
  5283. );
  5284. if (!player) return;
  5285. player.removeAttribute("@click");
  5286. player.removeAttribute("@keyup.space.window");
  5287. });
  5288. }
  5289. }
  5290. ];
  5291. const videoPlayerControlItems = [
  5292. {
  5293. type: "switch",
  5294. id: "missav-video-page-player-ctrl-hide-prev",
  5295. name: i18n.language.missav.video.playerContorl.hide_prev
  5296. },
  5297. {
  5298. type: "switch",
  5299. id: "missav-video-page-player-ctrl-hide-play",
  5300. name: i18n.language.missav.video.playerContorl.hide_play
  5301. },
  5302. {
  5303. type: "switch",
  5304. id: "missav-video-page-player-ctrl-hide-next",
  5305. name: i18n.language.missav.video.playerContorl.hide_next
  5306. },
  5307. {
  5308. type: "switch",
  5309. id: "missav-video-page-player-ctrl-hide-progress",
  5310. name: i18n.language.missav.video.playerContorl.hide_progress
  5311. },
  5312. {
  5313. type: "switch",
  5314. id: "missav-video-page-player-ctrl-hide-subtitle",
  5315. name: i18n.language.missav.video.playerContorl.hide_subtitle
  5316. },
  5317. {
  5318. type: "switch",
  5319. id: "missav-video-page-player-ctrl-hide-volume",
  5320. name: i18n.language.missav.video.playerContorl.hide_volume
  5321. },
  5322. {
  5323. type: "switch",
  5324. id: "missav-video-page-player-ctrl-hide-setting",
  5325. name: i18n.language.missav.video.playerContorl.hide_setting
  5326. },
  5327. {
  5328. type: "switch",
  5329. id: "missav-video-page-player-ctrl-hide-pip",
  5330. name: i18n.language.missav.video.playerContorl.hide_pip
  5331. },
  5332. {
  5333. type: "switch",
  5334. id: "missav-video-page-player-ctrl-hide-full",
  5335. name: i18n.language.missav.video.playerContorl.hide_full
  5336. },
  5337. {
  5338. type: "switch",
  5339. id: "missav-video-page-player-ctrl-hide-jump",
  5340. name: i18n.language.missav.video.playerContorl.hide_jump,
  5341. description: i18n.language.missav.video.playerContorl.hide_jump_description,
  5342. defaultEnable: true
  5343. },
  5344. {
  5345. type: "switch",
  5346. id: "missav-video-page-player-ctrl-hide-loop",
  5347. name: i18n.language.missav.video.playerContorl.hide_loop,
  5348. defaultEnable: true
  5349. }
  5350. ];
  5351. const videoToolbarItems$1 = [
  5352. {
  5353. type: "switch",
  5354. id: "missav-video-page-toolbar-hide-save",
  5355. name: i18n.language.missav.video.toolbar.hide_save,
  5356. defaultEnable: true
  5357. },
  5358. {
  5359. type: "switch",
  5360. id: "missav-video-page-toolbar-hide-playlist",
  5361. name: i18n.language.missav.video.toolbar.hide_playlist
  5362. },
  5363. {
  5364. type: "switch",
  5365. id: "missav-video-page-toolbar-hide-download",
  5366. name: i18n.language.missav.video.toolbar.hide_download
  5367. },
  5368. {
  5369. type: "switch",
  5370. id: "missav-video-page-toolbar-hide-share",
  5371. name: i18n.language.missav.video.toolbar.hide_share
  5372. },
  5373. {
  5374. type: "switch",
  5375. id: "missav-video-page-toolbar-show-m3u8",
  5376. name: i18n.language.missav.video.toolbar.show_m3u8,
  5377. description: i18n.language.missav.video.toolbar.show_m3u8_description,
  5378. noStyle: true,
  5379. enableFn: async () => {
  5380. await new Promise((resolve) => {
  5381. const timer = setInterval(() => {
  5382. var _a, _b, _c, _d, _e, _f, _g;
  5383. if ((_a = _unsafeWindow.hls) == null ? undefined : _a.url) {
  5384. const m3u8s = [
  5385. { title: "playlist", url: (_b = _unsafeWindow.hls) == null ? undefined : _b.url }
  5386. ];
  5387. const baseUrl = (_d = (_c = _unsafeWindow.hls) == null ? undefined : _c.url) == null ? undefined : _d.split("playlist")[0];
  5388. const qualitys = (_g = (_f = (_e = _unsafeWindow.player) == null ? undefined : _e.config) == null ? undefined : _f.quality) == null ? undefined : _g.options;
  5389. qualitys == null ? undefined : qualitys.forEach((quality) => {
  5390. if (quality !== 0)
  5391. m3u8s.push({
  5392. title: `${quality}p`,
  5393. url: `${baseUrl}${quality}p/video.m3u8`
  5394. });
  5395. });
  5396. const m3u8Panle = e$1.createApp(M3U8Comp, {
  5397. m3u8s
  5398. });
  5399. m3u8Panle.mount(
  5400. (() => {
  5401. var _a2;
  5402. const node = document.createElement("div");
  5403. node.id = "div-m3u8s";
  5404. (_a2 = document.querySelector(
  5405. "div.flex-1.order-first div.mt-4:has(h1)"
  5406. )) == null ? undefined : _a2.appendChild(node);
  5407. return node;
  5408. })()
  5409. );
  5410. clearInterval(timer);
  5411. resolve(true);
  5412. }
  5413. }, 100);
  5414. });
  5415. },
  5416. disableFn: () => {
  5417. const node = document.querySelector("#div-m3u8s");
  5418. if (node) node.remove();
  5419. },
  5420. enableFnRunAt: "document-end"
  5421. },
  5422. {
  5423. type: "switch",
  5424. id: "missav-video-page-toolbar-auto-show-more",
  5425. name: i18n.language.missav.video.toolbar.auto_show_more
  5426. }
  5427. ];
  5428. const videoGroups$2 = [
  5429. {
  5430. name: i18n.language.missav.video.basic.name,
  5431. fold: true,
  5432. items: videoBasicItems$1
  5433. },
  5434. {
  5435. name: i18n.language.missav.video.player.name,
  5436. fold: true,
  5437. items: videoPlayerItems$1
  5438. },
  5439. {
  5440. name: i18n.language.missav.video.playerContorl.name,
  5441. fold: true,
  5442. items: videoPlayerControlItems
  5443. },
  5444. {
  5445. name: i18n.language.missav.video.toolbar.name,
  5446. fold: true,
  5447. items: videoToolbarItems$1
  5448. }
  5449. ];
  5450. const commonStyle$5 = `@charset "UTF-8";html[missav-common-basic-remove-ads] #html-ads,html[missav-common-basic-remove-ads] #ts_ad_video_aes67,html[missav-common-basic-remove-ads] div.pt-16.pb-4.px-4:has(div.hidden),html[missav-common-basic-remove-ads] div[class|=root]:has(div[class|=rootContent]),html[missav-common-basic-remove-ads] div.space-y-6.mb-6:has(div.hidden),html[missav-common-basic-remove-ads] div[x-show^="currentTab === 'video_details'"] div ul,html[missav-common-basic-remove-ads] div.-m-5.mb-2:has(iframe),html[missav-common-basic-remove-ads] html iframe[id|=container],html[missav-common-basic-remove-ads] html iframe[class|=container],html[missav-common-basic-remove-ads] body div.fixed:has(>a[href^="https://bit.ly"][target=_blank]),html[missav-common-basic-remove-ads] body>div[class|=pl]:has(link),html[missav-common-basic-remove-ads] div.flex-1.order-first div.under_player{display:none!important}html[missav-common-basic-hide-footer] footer[aria-labelledby=footerHeading],html[missav-common-basic-hide-footer] #footerHeading,html[missav-common-basic-hide-footer] div.space-y-5.mb-5{display:none!important}html[missav-common-basic-hide-new-site-banner] div:has(>div>div>img[alt="MissAV takeover Fanza"]){display:none!important}html[missav-common-header-hide-logo] div a[href^="https://missav.com"] span.font-serif:has(span),html[missav-common-header-hide-logo] div a[href^="https://missav.ws"] span.font-serif:has(span){visibility:hidden!important}html[missav-common-header-hide-live-cam-sex] a[href*=myavlive],html[missav-common-header-hide-site-live] a[href^="https://missav.live"],html[missav-common-header-hide-upgrade-vip] div a[href$="/vip"],html[missav-common-header-hide-comic] a[href*=mycomic],html[missav-common-header-hide-subtitle] a[href$=-subtitle]{display:none!important}html[missav-common-header-hide-watch-jav] nav div.relative:has(>a[href="#"]):has(>div[x-show$="'jav'"]),html[missav-common-header-hide-watch-jav] div a[href="#"]:has(svg[x-show$="'jav'"]){display:none!important}html[missav-common-header-hide-amateur] nav div.relative:has(>a[href="#"]):has(>div[x-show$="'amateur'"]),html[missav-common-header-hide-amateur] div a[href="#"]:has(svg[x-show$="'amateur'"]){display:none!important}html[missav-common-header-hide-uncensored] nav div.relative:has(>a[href="#"]):has(>div[x-show$="'uncensored'"]),html[missav-common-header-hide-uncensored] div a[href="#"]:has(svg[x-show$="'uncensored'"]){display:none!important}html[missav-common-header-hide-asia-av] nav div.relative:has(>a[href="#"]):has(>div[x-show$="'madou'"]),html[missav-common-header-hide-asia-av] div a[href="#"]:has(svg[x-show$="'madou'"]){display:none!important}html[missav-common-header-hide-my-collection] nav div.relative:has(>a[href="#"]):has(>div[x-show$="'saved'"]),html[missav-common-header-hide-my-collection] div a[href="#"]:has(svg[x-show$="'saved'"]){display:none!important}html[missav-common-header-hide-tg] div.relative>div>div>div>a[href*="https://bit.ly/3uTvrRM"]{display:none!important}html[missav-common-header-hide-more-sites] nav div.relative:has(>a[href="#"]):has(>div[x-show$="'partners'"]),html[missav-common-header-hide-more-sites] div a[href="#"]:has(svg[x-show$="'partners'"]){display:none!important}html[missav-common-header-hide-search] a[alt=検索],html[missav-common-header-hide-search] a[alt=수색],html[missav-common-header-hide-search] a[alt=Cari],html[missav-common-header-hide-search] a[alt=搜寻],html[missav-common-header-hide-search] a[alt=Search]{display:none!important}html[missav-common-header-hide-locale-switcher] div.relative:has(>a[href="#"]):has(>div[x-show$=showLocaleSwitcher]){display:none!important}html[missav-common-header-hide-mobile-right-menu] div div.relative:has(>a[href="#"]):has(>div[x-show$="'mobile'"]){display:none!important}`;
  5451. const homeStyle = 'html[missav-home-page-basic-hide-search-title] div.is-home.content-without-search div div h1:has(span.text-primary){display:none!important}html[missav-home-page-basic-hide-search-box] div.is-home.content-without-search div.flex.flex-col.justify-center.content-center.text-center,html[missav-home-page-basic-hide-search-history] div[x-show="searchHistory.length"],html[missav-home-page-basic-hide-video-genres] div a[x-show^="item.dvd_id &&"] span,html[missav-home-page-basic-hide-video-duration] div a[x-show="item.dvd_id"] span{display:none!important}html[missav-home-page-basic-revert-full-title] div.thumbnail.group div.truncate:has(a[x-text="item.full_title"]){white-space:normal!important}html[missav-home-page-basic-revert-full-title] div.flex-1 div div.max-h-14:has(a[x-text="item.full_title"]){max-height:none!important}html[missav-home-page-basic-blur-video-image] div.relative.rounded.overflow-hidden.shadow-lg,html[missav-home-page-basic-blur-video-title] div.text-sm a[x-text="item.full_title"]{filter:blur(5px)}';
  5452. const searchStyle = 'html[missav-home-page-basic-hide-video-genres] div a[x-show^="item.dvd_id &&"] span,html[missav-home-page-basic-hide-video-duration] div a[x-show="item.dvd_id"] span{display:none!important}html[missav-home-page-basic-revert-full-title] div.thumbnail.group div.truncate:has(>a),html[missav-home-page-basic-revert-full-title] div.thumbnail.group div.truncate:has(a[x-text="item.full_title"]){white-space:normal!important}html[missav-home-page-basic-revert-full-title] div.flex-1 div div.max-h-14:has(a[x-text="item.full_title"]){max-height:none!important}html[missav-home-page-basic-blur-video-image] div.relative.rounded.overflow-hidden.shadow-lg,html[missav-home-page-basic-blur-video-title] div.text-sm a[x-text="item.full_title"]{filter:blur(5px)}';
  5453. const videoStyle$2 = 'html[missav-home-page-basic-hide-video-genres] div a[x-show^="item.dvd_id &&"] span,html[missav-home-page-basic-hide-video-duration] div a[x-show="item.dvd_id"] span{display:none!important}html[missav-home-page-basic-revert-full-title] div.thumbnail.group div.truncate:has(a[x-text="item.full_title"]),html[missav-home-page-basic-revert-full-title] div.flex-1 div div.max-h-14:has(a[x-text="item.full_title"]){white-space:normal!important;max-height:none!important}html[missav-home-page-basic-blur-video-image] div.relative.rounded.overflow-hidden.shadow-lg,html[missav-home-page-basic-blur-video-title] div.text-sm a[x-text="item.full_title"]{filter:blur(5px)}html[missav-video-page-player-hide-new-site-banner] div>div[x-show=showNewDomainNotice]{display:none!important}html[missav-video-page-player-hide-play-btn] div.plyr button.plyr__control--overlaid[data-plyr=play]:has(span.plyr__sr-only){display:none!important}html[missav-video-page-player-ctrl-hide-prev] div.plyr__controls button.plyr__controls__item[data-plyr=rewind],html[missav-video-page-player-ctrl-hide-play] div.plyr__controls button.plyr__controls__item[data-plyr=play],html[missav-video-page-player-ctrl-hide-next] div.plyr__controls button.plyr__controls__item[data-plyr=fast-forward],html[missav-video-page-player-ctrl-hide-progress] div.plyr__controls div.plyr__controls__item.plyr__progress__container,html[missav-video-page-player-ctrl-hide-subtitle] div.plyr__controls button.plyr__controls__item[data-plyr=captions]{display:none!important}html[missav-video-page-player-ctrl-hide-volume] div.plyr__controls div.plyr__controls__item.plyr__volume:has(button[data-plyr=mute]){display:none!important}html[missav-video-page-player-ctrl-hide-setting] div.plyr__controls div.plyr__controls__item.plyr__menu:has(button[data-plyr=settings]){display:none!important}html[missav-video-page-player-ctrl-hide-pip] div.plyr__controls button.plyr__controls__item[data-plyr=pip],html[missav-video-page-player-ctrl-hide-full] div.plyr__controls button.plyr__controls__item[data-plyr=fullscreen]{display:none!important}html[missav-video-page-player-ctrl-hide-jump] div.content-without-search>div>div.order-first>div>div.justify-between.bg-black:has(>span.isolate){display:none!important}html[missav-video-page-player-ctrl-hide-loop] div.content-without-search>div>div.order-first>div>div.bg-black:has(>div.flex.items-center.flex-nowrap>div.grow){display:none!important}html[missav-video-page-toolbar-hide-save] div button:has(svg[x-show$=saved]){display:none!important}html[missav-video-page-toolbar-hide-playlist] div button.shadow-sm:has(svg[stroke-width]){display:none!important}html[missav-video-page-toolbar-hide-download] div a[href^="https://rapidgator.net"]:has(svg){display:none!important}html[missav-video-page-toolbar-hide-share] div button.shadow-sm:has(svg[aria-hidden]){display:none!important}html[missav-video-page-toolbar-auto-show-more] div[x-show^=currentTab] div div[x-data*=showMore] div.text-secondary.break-all{overflow:visible!important;display:block!important;-webkit-box-orient:horizontal!important;-webkit-line-clamp:none!important}html[missav-video-page-toolbar-auto-show-more] div[x-show^=currentTab] div div[x-data*=showMore] div:has(a[href="#"]){display:none!important}';
  5454. const rules$6 = [
  5455. {
  5456. name: "missav-home",
  5457. groups: homeGroups,
  5458. style: homeStyle,
  5459. checkFn: () => isPageMissAvHomepage()
  5460. },
  5461. {
  5462. name: "missav-video",
  5463. groups: videoGroups$2,
  5464. style: videoStyle$2,
  5465. checkFn: () => isPageMissAvVideo()
  5466. },
  5467. {
  5468. name: "missav-search",
  5469. groups: searchGroups,
  5470. style: searchStyle,
  5471. checkFn: () => isPageMissAvSearch()
  5472. },
  5473. {
  5474. name: "missav-common",
  5475. groups: commonGroups$5,
  5476. style: commonStyle$5,
  5477. isSpecial: true,
  5478. checkFn: () => isPageMissAv()
  5479. }
  5480. ];
  5481. const commonBasicItems$4 = [
  5482. {
  5483. type: "switch",
  5484. id: "pornhub-remove-ads",
  5485. name: "移除 广告",
  5486. defaultEnable: true,
  5487. enableFn: () => {
  5488. addAfterResponseInterceptor(
  5489. async (response, requestInit) => {
  5490. var _a;
  5491. const adsUrl = [
  5492. ".pornhub.com/_xa/ads",
  5493. "https://static.trafficjunky.com/ab/ads_test.js",
  5494. ".pornhub.com/_xa/ads_batch",
  5495. "https://video.ktkjmp.com/adsbygoogle.js",
  5496. "https://static.trafficjunky.com/invocation/embeddedads/production/embeddedads.es6.min.js"
  5497. ];
  5498. for (const url of adsUrl) {
  5499. if ((_a = requestInit.url) == null ? undefined : _a.includes(url)) {
  5500. console.log("hook:", requestInit.url);
  5501. return defineResponse({
  5502. ...response,
  5503. response: new Blob([""])
  5504. });
  5505. }
  5506. }
  5507. return defineResponse(response);
  5508. }
  5509. );
  5510. }
  5511. },
  5512. {
  5513. type: "switch",
  5514. id: "pornhub-hide-footer",
  5515. name: "隐藏 页底footer",
  5516. defaultEnable: true
  5517. },
  5518. {
  5519. type: "switch",
  5520. id: "pornhub-hide-adblock",
  5521. name: "隐藏 Adblock通知",
  5522. defaultEnable: true
  5523. }
  5524. ];
  5525. const commonHeaderItems$4 = [
  5526. {
  5527. type: "switch",
  5528. id: "pornhub-common-hide-nav-network-bar",
  5529. name: "隐藏 顶部横条",
  5530. defaultEnable: true
  5531. },
  5532. {
  5533. type: "switch",
  5534. id: "pornhub-common-hide-nav-desktop",
  5535. name: "隐藏 左侧菜单"
  5536. },
  5537. {
  5538. type: "switch",
  5539. id: "pornhub-common-hide-nav-logo",
  5540. name: "隐藏 Logo",
  5541. defaultEnable: true
  5542. },
  5543. {
  5544. type: "switch",
  5545. id: "pornhub-common-hide-nav-search",
  5546. name: "隐藏 搜索框"
  5547. },
  5548. {
  5549. type: "switch",
  5550. id: "pornhub-common-hide-nav-search-recent",
  5551. name: "隐藏 搜索框-历史搜索"
  5552. },
  5553. {
  5554. type: "switch",
  5555. id: "pornhub-common-hide-nav-search-trending",
  5556. name: "隐藏 搜索框-热门搜索"
  5557. },
  5558. {
  5559. type: "switch",
  5560. id: "pornhub-common-hide-nav-search-pornstar",
  5561. name: "隐藏 搜索框-明星搜索"
  5562. },
  5563. {
  5564. type: "switch",
  5565. id: "pornhub-common-hide-nav-upload-btn-spicevids",
  5566. name: "隐藏 AI JERK",
  5567. defaultEnable: true
  5568. },
  5569. {
  5570. type: "switch",
  5571. id: "pornhub-common-hide-nav-upload-btn",
  5572. name: "隐藏 上传图标",
  5573. defaultEnable: true
  5574. },
  5575. {
  5576. type: "switch",
  5577. id: "pornhub-common-hide-nav-login",
  5578. name: "隐藏 登录图标",
  5579. defaultEnable: true
  5580. },
  5581. {
  5582. type: "switch",
  5583. id: "pornhub-common-hide-nav-home",
  5584. name: "隐藏 首页"
  5585. },
  5586. {
  5587. type: "switch",
  5588. id: "pornhub-common-hide-nav-video",
  5589. name: "隐藏 视频"
  5590. },
  5591. {
  5592. type: "switch",
  5593. id: "pornhub-common-hide-nav-categories",
  5594. name: "隐藏 分类"
  5595. },
  5596. {
  5597. type: "switch",
  5598. id: "pornhub-common-hide-nav-live-cams",
  5599. name: "隐藏 LIVE CAMS",
  5600. defaultEnable: true
  5601. },
  5602. {
  5603. type: "switch",
  5604. id: "pornhub-common-hide-nav-pornstars",
  5605. name: "隐藏 色情明星"
  5606. },
  5607. {
  5608. type: "switch",
  5609. id: "pornhub-common-hide-nav-fuck-now",
  5610. name: "隐藏 FUCK NOW",
  5611. defaultEnable: true
  5612. },
  5613. {
  5614. type: "switch",
  5615. id: "pornhub-common-hide-nav-community",
  5616. name: "隐藏 社区"
  5617. },
  5618. {
  5619. type: "switch",
  5620. id: "pornhub-common-hide-nav-albums",
  5621. name: "隐藏 照片及动图"
  5622. }
  5623. ];
  5624. const commonDesktopItems = [
  5625. {
  5626. type: "switch",
  5627. id: "pornhub-common-hide-nav-desktop-video",
  5628. name: "隐藏 左侧菜单-精选色情片"
  5629. },
  5630. {
  5631. type: "switch",
  5632. id: "pornhub-common-hide-nav-desktop-shorties",
  5633. name: "隐藏 左侧菜单-Shorties"
  5634. },
  5635. {
  5636. type: "switch",
  5637. id: "pornhub-common-hide-nav-desktop-recommended",
  5638. name: "隐藏 左侧菜单-推荐视频"
  5639. },
  5640. {
  5641. type: "switch",
  5642. id: "pornhub-common-hide-nav-desktop-video-ht",
  5643. name: "隐藏 左侧菜单-热门视频"
  5644. },
  5645. {
  5646. type: "switch",
  5647. id: "pornhub-common-hide-nav-desktop-pornstar",
  5648. name: "隐藏 左侧菜单-色情明星和模特"
  5649. },
  5650. {
  5651. type: "switch",
  5652. id: "pornhub-common-hide-nav-desktop-active",
  5653. name: "隐藏 左侧菜单-异性恋"
  5654. },
  5655. {
  5656. type: "switch",
  5657. id: "pornhub-common-hide-nav-desktop-gayporn",
  5658. name: "隐藏 左侧菜单-男同"
  5659. },
  5660. {
  5661. type: "switch",
  5662. id: "pornhub-common-hide-nav-desktop-transgender",
  5663. name: "隐藏 左侧菜单-变性"
  5664. },
  5665. {
  5666. type: "switch",
  5667. id: "pornhub-common-hide-nav-desktop-video-27",
  5668. name: "隐藏 左侧菜单-女同"
  5669. },
  5670. {
  5671. type: "switch",
  5672. id: "pornhub-common-hide-nav-desktop-channels",
  5673. name: "隐藏 左侧菜单-频道"
  5674. },
  5675. {
  5676. type: "switch",
  5677. id: "pornhub-common-hide-nav-desktop-categories",
  5678. name: "隐藏 左侧菜单-热门类别"
  5679. },
  5680. {
  5681. type: "switch",
  5682. id: "pornhub-common-hide-nav-desktop-playlists",
  5683. name: "隐藏 左侧菜单-片单"
  5684. },
  5685. {
  5686. type: "switch",
  5687. id: "pornhub-common-hide-nav-desktop-gifs",
  5688. name: "隐藏 左侧菜单-色情片动图"
  5689. },
  5690. {
  5691. type: "switch",
  5692. id: "pornhub-common-hide-nav-desktop-albums",
  5693. name: "隐藏 左侧菜单-照片"
  5694. },
  5695. {
  5696. type: "switch",
  5697. id: "pornhub-common-hide-nav-desktop-community",
  5698. name: "隐藏 左侧菜单-社区"
  5699. },
  5700. {
  5701. type: "switch",
  5702. id: "pornhub-common-hide-nav-desktop-Full-SPICEVIDS",
  5703. name: "隐藏 左侧菜单-Full SPICEVIDS",
  5704. defaultEnable: true
  5705. },
  5706. {
  5707. type: "switch",
  5708. id: "pornhub-common-hide-nav-desktop-help",
  5709. name: "隐藏 左侧菜单-Trust & Safety",
  5710. defaultEnable: true
  5711. },
  5712. {
  5713. type: "switch",
  5714. id: "pornhub-common-hide-nav-desktop-uviu",
  5715. name: "隐藏 左侧菜单-UViU",
  5716. defaultEnable: true
  5717. },
  5718. {
  5719. type: "switch",
  5720. id: "pornhub-common-hide-nav-desktop-blog",
  5721. name: "隐藏 左侧菜单-博客",
  5722. defaultEnable: true
  5723. },
  5724. {
  5725. type: "switch",
  5726. id: "pornhub-common-hide-nav-desktop-insights",
  5727. name: "隐藏 左侧菜单-洞察",
  5728. defaultEnable: true
  5729. },
  5730. {
  5731. type: "switch",
  5732. id: "pornhub-common-hide-nav-desktop-sex",
  5733. name: "隐藏 左侧菜单-性健康",
  5734. defaultEnable: true
  5735. },
  5736. {
  5737. type: "switch",
  5738. id: "pornhub-common-hide-nav-desktop-pornhubapparel",
  5739. name: "隐藏 左侧菜单-商店",
  5740. defaultEnable: true
  5741. },
  5742. {
  5743. type: "switch",
  5744. name: "隐藏 左侧菜单-Personalized Recommendations",
  5745. id: "pornhub-common-hide-nav-desktop-recommend"
  5746. }
  5747. ];
  5748. const commonGroups$4 = [
  5749. {
  5750. name: "全站通用 - 基本功能",
  5751. fold: true,
  5752. items: commonBasicItems$4
  5753. },
  5754. {
  5755. name: "全站通用 - 顶栏",
  5756. fold: true,
  5757. items: commonHeaderItems$4
  5758. },
  5759. {
  5760. name: "全站通用 - 左侧菜单",
  5761. fold: true,
  5762. items: commonDesktopItems
  5763. }
  5764. ];
  5765. const videoPlayerItems = [
  5766. {
  5767. type: "switch",
  5768. id: "pornhub-video-page-auto-fix-player",
  5769. name: "修补 播放器",
  5770. description: ["去除播放广告、开启更多控制"],
  5771. defaultEnable: true,
  5772. enableFnRunAt: "document-end",
  5773. enableFn: async () => {
  5774. var _a;
  5775. const scripts = document.getElementsByTagName("script");
  5776. for (const script of scripts) {
  5777. if (script.src.indexOf("ads_batch") !== -1) {
  5778. script.remove();
  5779. }
  5780. if (script.innerHTML.indexOf("ads_batch") !== -1) {
  5781. script.remove();
  5782. }
  5783. }
  5784. (_a = document.querySelector(`head > meta[name="adsbytrafficjunkycontext"]`)) == null ? undefined : _a.remove();
  5785. _unsafeWindow.iframe_url = "";
  5786. const video = document.getElementById("player");
  5787. const videoId = video == null ? undefined : video.getAttribute("data-video-id");
  5788. let flashvars = _unsafeWindow["flashvars_" + videoId];
  5789. _unsafeWindow["VIDEO_SHOW"]["trafficJunkyurl"] = "";
  5790. flashvars = {
  5791. ...flashvars,
  5792. embedCode: "",
  5793. adRollGlobalConfig: []
  5794. };
  5795. _unsafeWindow["flashvars_" + videoId] = flashvars;
  5796. }
  5797. }
  5798. ];
  5799. const videoToolbarItems = [
  5800. {
  5801. type: "switch",
  5802. id: "pornhub-video-page-hide-below-info-rating-info",
  5803. name: "隐藏 视频数据",
  5804. defaultEnable: true
  5805. },
  5806. {
  5807. type: "switch",
  5808. id: "pornhub-video-page-hide-below-info-actions-container",
  5809. name: "隐藏 视频操作",
  5810. defaultEnable: true
  5811. },
  5812. {
  5813. type: "switch",
  5814. id: "pornhub-video-page-hide-below-info-user-info",
  5815. name: "隐藏 发布者信息"
  5816. },
  5817. {
  5818. type: "switch",
  5819. id: "pornhub-video-page-hide-below-info-action",
  5820. name: "隐藏 订阅"
  5821. },
  5822. {
  5823. type: "switch",
  5824. id: "pornhub-video-page-show-below-info-m3u8",
  5825. name: "获取 M3U8",
  5826. description: ["截取并显示m3u8, 可使用其他播放器播放"],
  5827. enableFnRunAt: "document-end",
  5828. enableFn: async () => {
  5829. const video = document.getElementById("player");
  5830. const videoId = video == null ? undefined : video.getAttribute("data-video-id");
  5831. if (!videoId) return;
  5832. const flashvars = _unsafeWindow["flashvars_" + videoId];
  5833. const mediaDefinitions = flashvars["mediaDefinitions"];
  5834. const m3u8urls = [];
  5835. mediaDefinitions.forEach((mediaDefinition) => {
  5836. if (typeof mediaDefinition.quality !== "string") return;
  5837. m3u8urls.push({
  5838. title: mediaDefinition.quality + "p",
  5839. url: mediaDefinition.videoUrl
  5840. });
  5841. });
  5842. const m3u8Panle = e$1.createApp(M3U8Comp, {
  5843. m3u8s: m3u8urls
  5844. });
  5845. m3u8Panle.mount(
  5846. (() => {
  5847. var _a;
  5848. const node = document.createElement("div");
  5849. node.id = "div-m3u8s";
  5850. (_a = document.querySelector(
  5851. "#hd-leftColVideoPage > div.topSectionGrid > div.videoWrapModelInfo.original > div > div.video-actions-menu"
  5852. )) == null ? undefined : _a.appendChild(node);
  5853. return node;
  5854. })()
  5855. );
  5856. },
  5857. disableFn: () => {
  5858. const node = document.querySelector("#div-m3u8s");
  5859. if (node) node.remove();
  5860. }
  5861. },
  5862. {
  5863. type: "switch",
  5864. id: "pornhub-video-page-hide-below-info-comments",
  5865. name: "隐藏 视频评论区",
  5866. defaultEnable: true
  5867. },
  5868. {
  5869. type: "switch",
  5870. id: "pornhub-video-page-hide-below-info-playlists",
  5871. name: "隐藏 视频收录片单"
  5872. }
  5873. ];
  5874. const videoGroups$1 = [
  5875. {
  5876. name: "播放页-播放器",
  5877. fold: true,
  5878. items: videoPlayerItems
  5879. },
  5880. {
  5881. name: "播放页-视频下方信息",
  5882. fold: true,
  5883. items: videoToolbarItems
  5884. }
  5885. ];
  5886. const commonStyle$4 = 'html[pornhub-remove-ads] #hd-leftColVideoPage>div.topSectionGrid>div.sideColumn.original>div.sideAds,html[pornhub-remove-ads] #relatedVideosListing>li.js-nativeTjVideoGrid.js_promoItem:has(>div>iframe),html[pornhub-remove-ads] #hd-leftColVideoPage>div.topSectionGrid>div.videoWrapModelInfo.original>div>div.hd.clear.original,html[pornhub-remove-ads] #videoSearchResult>li.sniperModeEngaged.alpha:has(>div),html[pornhub-remove-ads] #videoSearchResult>li.emptyBlockSpace,html[pornhub-remove-ads] #singleFeedSection>li.emptyBlockSpace,html[pornhub-remove-ads] #singleFeedSection>li.sniperModeEngaged.alpha:has(>div),html[pornhub-remove-ads] #pb_iframe,html[pornhub-remove-ads] #relatedVideosCenter>li.js_promoItem:has(>div>iframe),html[pornhub-remove-ads] #hd-leftColVideoPage>div>div.hd.clear.original:has(>div>iframe),html[pornhub-remove-ads] #hd-rightColVideoPage>div.clearfix:has(>div>div>iframe),html[pornhub-remove-ads] body>div:has(>iframe),html[pornhub-remove-ads] div:has(>ins[style="width:950px;height:250px;display:block;margin:0 auto;"]){display:none!important}html[pornhub-hide-footer] div.footerContentWrapper,html[pornhub-hide-footer] #footer,html[pornhub-hide-footer] div.logoFooterWrapper.homePageFooter,html[pornhub-hide-adblock] #js-abContainterMain{display:none!important}html[pornhub-common-hide-nav-network-bar] body>div.networkBarWrapper{display:none!important}html[pornhub-common-hide-nav-desktop] #desktopNavigation{display:none!important}html[pornhub-common-hide-nav-logo] #headerContainer>div>div>div.logoWrapper{visibility:hidden!important}html[pornhub-common-hide-nav-search] #headerSearchWrapperFree{display:none!important}html[pornhub-common-hide-nav-search-recent] #searchesWrapperScroll>search-list[type=recent]{display:none!important}html[pornhub-common-hide-nav-search-trending] #searchesWrapperScroll>search-list[type=trending]{display:none!important}html[pornhub-common-hide-nav-search-pornstar] #searchesWrapperScroll>search-list[type=pornstar]{display:none!important}html[pornhub-common-hide-nav-upload-btn-spicevids] #headerContainer>div.headerContainerColumn.withSearch.withCustomPromoBtn>div.uploadBtnContentSpicevids{display:none!important}html[pornhub-common-hide-nav-upload-btn] #headerContainer>div.headerContainerColumn.withSearch.withCustomPromoBtn>div.uploadBtnContent{display:none!important}html[pornhub-common-hide-nav-login] #headerLoginLink{display:none!important}html[pornhub-common-hide-nav-home] li[itemprop=name]:has(>a.js-topMenuLink[href="/"]){display:none!important}html[pornhub-common-hide-nav-video] li[itemprop=name]:has(>a.js-topMenuLink[href="/video"]){display:none!important}html[pornhub-common-hide-nav-categories] li[itemprop=name]:has(>a.js-topMenuLink[href="/categories"]){display:none!important}html[pornhub-common-hide-nav-live-cams] li[itemprop=name]:has(>a.js-topMenuLink[data-label2="Live Cams"]){display:none!important}html[pornhub-common-hide-nav-pornstars] li[itemprop=name]:has(>a.js-topMenuLink[href="/pornstars"]){display:none!important}html[pornhub-common-hide-nav-fuck-now] li:has(>a.js-topMenuLink[data-label2="Fuck Now"]){display:none!important}html[pornhub-common-hide-nav-community] li[itemprop=name]:has(>a.js-topMenuLink[href="/community"]){display:none!important}html[pornhub-common-hide-nav-albums] li[itemprop=name]:has(>a.js-topMenuLink[href="/albums"]){display:none!important}html[pornhub-common-hide-nav-desktop-video] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/video"]{display:none!important}html[pornhub-common-hide-nav-desktop-shorties] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/shorties"]{display:none!important}html[pornhub-common-hide-nav-desktop-recommended] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/recommended"]{display:none!important}html[pornhub-common-hide-nav-desktop-video-ht] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/video?o=ht"]{display:none!important}html[pornhub-common-hide-nav-desktop-pornstar] #leftMenuScroll>div.menuLink.subMenuTriggerwithLink.pornstarNavigation{display:none!important}html[pornhub-common-hide-nav-desktop-active] #leftMenuScroll>a.menuLink.js-menuAnalytics.active[href="/"]{display:none!important}html[pornhub-common-hide-nav-desktop-gayporn] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/gayporn"]{display:none!important}html[pornhub-common-hide-nav-desktop-transgender] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/transgender"]{display:none!important}html[pornhub-common-hide-nav-desktop-video-27] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/video?c=27"]{display:none!important}html[pornhub-common-hide-nav-desktop-channels] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/channels"]{display:none!important}html[pornhub-common-hide-nav-desktop-categories] #leftMenuScroll>div.menuLink.subMenuTriggerwithLink.categoriesNavigation{display:none!important}html[pornhub-common-hide-nav-desktop-playlists] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/playlists"]{display:none!important}html[pornhub-common-hide-nav-desktop-gifs] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/gifs"]{display:none!important}html[pornhub-common-hide-nav-desktop-albums] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/albums"]{display:none!important}html[pornhub-common-hide-nav-desktop-community] #leftMenuScroll>div.menuLink.subMenuTriggerwithLink.communityNavigation{display:none!important}html[pornhub-common-hide-nav-desktop-Full-SPICEVIDS] #leftMenuScroll>div.menuLinkDiv{display:none!important}html[pornhub-common-hide-nav-desktop-help] #leftMenuScroll>a[href^="https://help.pornhub.com/hc/en-us/categories/"]{display:none!important}html[pornhub-common-hide-nav-desktop-uviu] #leftMenuScroll>div:has(>a[data-menu-clog=ham-uviu]){display:none!important}html[pornhub-common-hide-nav-desktop-blog] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="/blog"]{display:none!important}html[pornhub-common-hide-nav-desktop-insights] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="https://www.pornhub.com/insights/"]{display:none!important}html[pornhub-common-hide-nav-desktop-sex] #leftMenuScroll>a.menuLink.js-menuAnalytics[href="https://www.pornhub.com/sex/"]{display:none!important}html[pornhub-common-hide-nav-desktop-pornhubapparel] #leftMenuScroll>div:has(>a[href="https://pornhubapparel.com/"]){display:none!important}html[pornhub-common-hide-nav-desktop-recommend] #leftMenuScroll>div.toggleSwitchWrapper:has(>div.toggleSwitch>#recommendSwitch){display:none!important}';
  5887. const videoStyle$1 = "html[jabletv-video-page-hide-bpx-player-state-wrap] div.plyr button.plyr__control--overlaid[data-plyr=play]:has(span.plyr__sr-only){display:none!important}html[pornhub-video-page-hide-below-info-rating-info] #hd-leftColVideoPage>div.topSectionGrid>div.videoWrapModelInfo.original>div>div.video-actions-menu>div.ratingInfo,html[pornhub-video-page-hide-below-info-rating-info] #hd-leftColVideoPage>div>div.video-actions-menu>div.ratingInfo{display:none!important}html[pornhub-video-page-hide-below-info-actions-container] #hd-leftColVideoPage>div.topSectionGrid>div.videoWrapModelInfo.original>div>div.video-actions-menu>div.allActionsContainer.tooltipWrapper,html[pornhub-video-page-hide-below-info-actions-container] #hd-leftColVideoPage>div>div.video-actions-menu>div.allActionsContainer.tooltipWrapper{display:none!important}html[pornhub-video-page-hide-below-info-user-info] #hd-leftColVideoPage>div.topSectionGrid>div.videoWrapModelInfo.original>div>div.video-actions-container>div.video-actions-tabs>div.video-action-tab.about-tab.active>div.video-detailed-info,html[pornhub-video-page-hide-below-info-user-info] #hd-leftColVideoPage>div>div.video-actions-container>div.video-actions-tabs>div.video-action-tab.about-tab.active>div.video-detailed-info{display:none!important}html[pornhub-video-page-hide-below-info-action] #hd-leftColVideoPage>div>div.video-actions-container>div.video-actions-tabs>div.video-action-tab.about-tab.active>div.video-detailed-info>div.video-info-row.userRow>div.userActions{display:none!important}html[pornhub-video-page-hide-below-info-comments] #under-player-comments,html[pornhub-video-page-hide-below-info-playlists] #under-player-playlists{display:none!important}";
  5888. const rules$5 = [
  5889. {
  5890. name: "pornhub-video",
  5891. groups: videoGroups$1,
  5892. style: videoStyle$1,
  5893. checkFn: isPagePornHubVideo
  5894. },
  5895. {
  5896. name: "pornhub-common",
  5897. groups: commonGroups$4,
  5898. style: commonStyle$4,
  5899. isSpecial: true,
  5900. checkFn: isPagePornHub
  5901. }
  5902. ];
  5903. const commonBasicItems$3 = [
  5904. {
  5905. type: "switch",
  5906. id: "91porn-remove-ads",
  5907. name: "移除 广告",
  5908. attrName: "remove-ads",
  5909. defaultEnable: true
  5910. },
  5911. {
  5912. type: "switch",
  5913. id: "91porn-hide-footer",
  5914. name: "隐藏 页底footer",
  5915. attrName: "hide-footer",
  5916. defaultEnable: true
  5917. },
  5918. {
  5919. type: "switch",
  5920. id: "91porn-skip-adult-verify",
  5921. name: "跳过 成年认证页",
  5922. noStyle: true,
  5923. defaultEnable: true,
  5924. enableFn: () => {
  5925. if (_unsafeWindow.location.pathname === "/") {
  5926. _unsafeWindow.location.href += "index.php";
  5927. }
  5928. }
  5929. },
  5930. {
  5931. type: "switch",
  5932. id: "91porn-show-video-full-title",
  5933. name: "显示 完整标题",
  5934. attrName: "show-video-full-title",
  5935. defaultEnable: true
  5936. }
  5937. ];
  5938. const commonHeaderItems$3 = [
  5939. {
  5940. type: "switch",
  5941. id: "91porn-hide-header-top-menu-language",
  5942. name: "隐藏 语言",
  5943. attrName: "hide-header-top-menu-language"
  5944. },
  5945. {
  5946. type: "switch",
  5947. id: "91porn-hide-header-top-menu-signup",
  5948. name: "隐藏 注册",
  5949. attrName: "hide-header-top-menu-signup"
  5950. },
  5951. {
  5952. type: "switch",
  5953. id: "91porn-hide-header-top-menu-login",
  5954. name: "隐藏 登录",
  5955. attrName: "hide-header-top-menu-login"
  5956. },
  5957. {
  5958. type: "switch",
  5959. id: "91porn-hide-header-navbar-header-logo",
  5960. name: "隐藏 LOGO",
  5961. attrName: "hide-header-navbar-header-logo"
  5962. },
  5963. {
  5964. type: "switch",
  5965. id: "91porn-hide-header-navbar-right-upload",
  5966. name: "隐藏 上传",
  5967. attrName: "hide-header-navbar-right-upload",
  5968. defaultEnable: true
  5969. },
  5970. {
  5971. type: "switch",
  5972. id: "91porn-hide-header-navbar-right-watch",
  5973. name: "隐藏 视频",
  5974. attrName: "hide-header-navbar-right-watch"
  5975. },
  5976. {
  5977. type: "switch",
  5978. id: "91porn-hide-header-navbar-right-forum",
  5979. name: "隐藏 自拍论坛",
  5980. attrName: "hide-header-navbar-right-forum",
  5981. defaultEnable: true
  5982. },
  5983. {
  5984. type: "switch",
  5985. id: "91porn-hide-header-navbar-right-webcam",
  5986. name: "隐藏 美女视频",
  5987. attrName: "hide-header-navbar-right-webcam",
  5988. defaultEnable: true
  5989. },
  5990. {
  5991. type: "switch",
  5992. id: "91porn-hide-header-navbar-right-ugatube",
  5993. name: "隐藏 电影中心",
  5994. attrName: "hide-header-navbar-right-ugatube",
  5995. defaultEnable: true
  5996. },
  5997. {
  5998. type: "switch",
  5999. id: "91porn-hide-header-navbar-right-pay",
  6000. name: "隐藏 VIP会员",
  6001. attrName: "hide-header-navbar-right-pay",
  6002. defaultEnable: true
  6003. },
  6004. {
  6005. type: "switch",
  6006. id: "91porn-hide-header-submenu-my-video",
  6007. name: "隐藏 我的视频",
  6008. attrName: "hide-header-submenu-my-video"
  6009. },
  6010. {
  6011. type: "switch",
  6012. id: "91porn-hide-header-submenu-my-favour",
  6013. name: "隐藏 我的收藏",
  6014. attrName: "hide-header-submenu-my-favour"
  6015. },
  6016. {
  6017. type: "switch",
  6018. id: "91porn-hide-header-submenu-my-subs-users",
  6019. name: "隐藏 我关注的用户",
  6020. attrName: "hide-header-submenu-my-subs-users"
  6021. },
  6022. {
  6023. type: "switch",
  6024. id: "91porn-hide-header-submenu-my-subs",
  6025. name: "隐藏 我关注用户的视频",
  6026. attrName: "hide-header-submenu-my-subs"
  6027. },
  6028. {
  6029. type: "switch",
  6030. id: "91porn-hide-header-submenu-my-comment",
  6031. name: "隐藏 我的留言",
  6032. attrName: "hide-header-submenu-my-comment",
  6033. defaultEnable: true
  6034. },
  6035. {
  6036. type: "switch",
  6037. id: "91porn-hide-header-submenu-yqm",
  6038. name: "隐藏 论坛邀请码",
  6039. attrName: "hide-header-submenu-yqm",
  6040. defaultEnable: true
  6041. },
  6042. {
  6043. type: "switch",
  6044. id: "91porn-hide-header-submenu-category-ori",
  6045. name: "隐藏 91原创",
  6046. attrName: "hide-header-submenu-category-ori"
  6047. },
  6048. {
  6049. type: "switch",
  6050. id: "91porn-hide-header-submenu-category-hot",
  6051. name: "隐藏 当前最热",
  6052. attrName: "hide-header-submenu-category-hot"
  6053. },
  6054. {
  6055. type: "switch",
  6056. id: "91porn-hide-header-submenu-category-top",
  6057. name: "隐藏 本月最热",
  6058. attrName: "hide-header-submenu-category-top"
  6059. },
  6060. {
  6061. type: "switch",
  6062. id: "91porn-hide-header-submenu-category-long",
  6063. name: "隐藏 10分钟以上 ",
  6064. attrName: "hide-header-submenu-category-long"
  6065. },
  6066. {
  6067. type: "switch",
  6068. id: "91porn-hide-header-submenu-category-longer",
  6069. name: "隐藏 20分钟以上 ",
  6070. attrName: "hide-header-submenu-category-longer"
  6071. },
  6072. {
  6073. type: "switch",
  6074. id: "91porn-hide-header-submenu-category-tf",
  6075. name: "隐藏 本月收藏",
  6076. attrName: "hide-header-submenu-category-tf"
  6077. },
  6078. {
  6079. type: "switch",
  6080. id: "91porn-hide-header-submenu-category-rf",
  6081. name: "隐藏 最近加精",
  6082. attrName: "hide-header-submenu-category-rf"
  6083. },
  6084. {
  6085. type: "switch",
  6086. id: "91porn-hide-header-submenu-category-hd",
  6087. name: "隐藏 高清",
  6088. attrName: "hide-header-submenu-category-hd"
  6089. },
  6090. {
  6091. type: "switch",
  6092. id: "91porn-hide-header-submenu-category-top-1",
  6093. name: "隐藏 每月最热",
  6094. attrName: "hide-header-submenu-category-top-1"
  6095. },
  6096. {
  6097. type: "switch",
  6098. id: "91porn-hide-header-submenu-category-md",
  6099. name: "隐藏 本月讨论",
  6100. attrName: "hide-header-submenu-category-md"
  6101. },
  6102. {
  6103. type: "switch",
  6104. id: "91porn-hide-header-submenu-category-mf",
  6105. name: "隐藏 收藏最多",
  6106. attrName: "hide-header-submenu-category-mf"
  6107. }
  6108. ];
  6109. const commonGroups$3 = [
  6110. {
  6111. name: "全站通用 - 基本功能",
  6112. fold: true,
  6113. items: commonBasicItems$3
  6114. },
  6115. {
  6116. name: "全站通用 - Header",
  6117. fold: true,
  6118. items: commonHeaderItems$3
  6119. }
  6120. ];
  6121. const vBasicItems = [];
  6122. const vHeaderItems = [
  6123. {
  6124. type: "switch",
  6125. id: "91porn-hide-header-submenu-category-ori",
  6126. name: "隐藏 91原创",
  6127. attrName: "hide-header-submenu-category-ori"
  6128. },
  6129. {
  6130. type: "switch",
  6131. id: "91porn-hide-header-submenu-category-hot",
  6132. name: "隐藏 当前最热",
  6133. attrName: "hide-header-submenu-category-hot"
  6134. },
  6135. {
  6136. type: "switch",
  6137. id: "91porn-hide-header-submenu-category-top",
  6138. name: "隐藏 本月最热",
  6139. attrName: "hide-header-submenu-category-top"
  6140. },
  6141. {
  6142. type: "switch",
  6143. id: "91porn-hide-header-submenu-category-long",
  6144. name: "隐藏 10分钟以上 ",
  6145. attrName: "hide-header-submenu-category-long"
  6146. },
  6147. {
  6148. type: "switch",
  6149. id: "91porn-hide-header-submenu-category-longer",
  6150. name: "隐藏 20分钟以上 ",
  6151. attrName: "hide-header-submenu-category-longer"
  6152. },
  6153. {
  6154. type: "switch",
  6155. id: "91porn-hide-header-submenu-category-tf",
  6156. name: "隐藏 本月收藏",
  6157. attrName: "hide-header-submenu-category-tf"
  6158. },
  6159. {
  6160. type: "switch",
  6161. id: "91porn-hide-header-submenu-category-rf",
  6162. name: "隐藏 最近加精",
  6163. attrName: "hide-header-submenu-category-rf"
  6164. },
  6165. {
  6166. type: "switch",
  6167. id: "91porn-hide-header-submenu-category-hd",
  6168. name: "隐藏 高清",
  6169. attrName: "hide-header-submenu-category-hd"
  6170. },
  6171. {
  6172. type: "switch",
  6173. id: "91porn-hide-header-submenu-category-top-1",
  6174. name: "隐藏 每月最热",
  6175. attrName: "hide-header-submenu-category-top-1"
  6176. },
  6177. {
  6178. type: "switch",
  6179. id: "91porn-hide-header-submenu-category-md",
  6180. name: "隐藏 本月讨论",
  6181. attrName: "hide-header-submenu-category-md"
  6182. },
  6183. {
  6184. type: "switch",
  6185. id: "91porn-hide-header-submenu-category-mf",
  6186. name: "隐藏 收藏最多",
  6187. attrName: "hide-header-submenu-category-mf"
  6188. }
  6189. ];
  6190. const vGroups = [
  6191. {
  6192. name: "搜索页 - 基本功能",
  6193. fold: true,
  6194. items: vBasicItems
  6195. },
  6196. {
  6197. name: "搜索页 - Header",
  6198. fold: true,
  6199. items: vHeaderItems
  6200. }
  6201. ];
  6202. const videoBasicItems = [
  6203. {
  6204. type: "switch",
  6205. id: "91porn-fix-player",
  6206. name: "修补 播放器",
  6207. noStyle: true,
  6208. defaultEnable: true,
  6209. enableFnRunAt: "document-start",
  6210. enableFn: () => {
  6211. waitForEle(
  6212. document,
  6213. "#videodetails > div.video-container",
  6214. (node) => {
  6215. if (!node) return false;
  6216. if (node instanceof HTMLScriptElement) {
  6217. if (node.tagName !== "SCRIPT") return false;
  6218. if (!node.innerText.includes(`videojs`)) return false;
  6219. node.parentNode.removeChild(node);
  6220. if (!window.videojs) return false;
  6221. window.player = window.videojs(
  6222. "player_one"
  6223. );
  6224. window.player.nuevo({
  6225. logotitle: "老司机修炼手册",
  6226. logo: "images/logo1.png",
  6227. logoposition: "RT",
  6228. logourl: "https://www.91porn.com"
  6229. });
  6230. window.player.pip();
  6231. window.player.seekButtons({
  6232. forward: 10,
  6233. back: 10
  6234. });
  6235. return true;
  6236. }
  6237. return false;
  6238. }
  6239. );
  6240. }
  6241. },
  6242. {
  6243. type: "switch",
  6244. id: "91porn-hide-video-details-data",
  6245. name: "移除 视频下方数据",
  6246. attrName: "hide-video-details-data"
  6247. },
  6248. {
  6249. type: "switch",
  6250. id: "91porn-hide-video-details-option",
  6251. name: "移除 视频下方操作栏",
  6252. attrName: "hide-video-details-option",
  6253. defaultEnable: true
  6254. },
  6255. {
  6256. type: "switch",
  6257. id: "91porn-hide-video-details-content",
  6258. name: "移除 视频下方声明",
  6259. attrName: "hide-video-details-content",
  6260. defaultEnable: true
  6261. },
  6262. {
  6263. type: "switch",
  6264. id: "91porn-hide-video-details-info",
  6265. name: "移除 视频信息",
  6266. attrName: "hide-video-details-info",
  6267. defaultEnable: true
  6268. },
  6269. {
  6270. type: "switch",
  6271. id: "91porn-hide-video-details-comment",
  6272. name: "移除 此视频留言",
  6273. attrName: "hide-video-details-comment"
  6274. }
  6275. ];
  6276. const videoHeaderItems = [
  6277. {
  6278. type: "switch",
  6279. id: "91porn-hide-header-submenu-category-ori",
  6280. name: "隐藏 91原创",
  6281. attrName: "hide-header-submenu-category-ori"
  6282. },
  6283. {
  6284. type: "switch",
  6285. id: "91porn-hide-header-submenu-category-hot",
  6286. name: "隐藏 当前最热",
  6287. attrName: "hide-header-submenu-category-hot"
  6288. },
  6289. {
  6290. type: "switch",
  6291. id: "91porn-hide-header-submenu-category-top",
  6292. name: "隐藏 本月最热",
  6293. attrName: "hide-header-submenu-category-top"
  6294. },
  6295. {
  6296. type: "switch",
  6297. id: "91porn-hide-header-submenu-category-long",
  6298. name: "隐藏 10分钟以上 ",
  6299. attrName: "hide-header-submenu-category-long"
  6300. },
  6301. {
  6302. type: "switch",
  6303. id: "91porn-hide-header-submenu-category-longer",
  6304. name: "隐藏 20分钟以上 ",
  6305. attrName: "hide-header-submenu-category-longer"
  6306. },
  6307. {
  6308. type: "switch",
  6309. id: "91porn-hide-header-submenu-category-tf",
  6310. name: "隐藏 本月收藏",
  6311. attrName: "hide-header-submenu-category-tf"
  6312. },
  6313. {
  6314. type: "switch",
  6315. id: "91porn-hide-header-submenu-category-rf",
  6316. name: "隐藏 最近加精",
  6317. attrName: "hide-header-submenu-category-rf"
  6318. },
  6319. {
  6320. type: "switch",
  6321. id: "91porn-hide-header-submenu-category-hd",
  6322. name: "隐藏 高清",
  6323. attrName: "hide-header-submenu-category-hd"
  6324. },
  6325. {
  6326. type: "switch",
  6327. id: "91porn-hide-header-submenu-category-top-1",
  6328. name: "隐藏 每月最热",
  6329. attrName: "hide-header-submenu-category-top-1"
  6330. },
  6331. {
  6332. type: "switch",
  6333. id: "91porn-hide-header-submenu-category-md",
  6334. name: "隐藏 本月讨论",
  6335. attrName: "hide-header-submenu-category-md"
  6336. },
  6337. {
  6338. type: "switch",
  6339. id: "91porn-hide-header-submenu-category-mf",
  6340. name: "隐藏 收藏最多",
  6341. attrName: "hide-header-submenu-category-mf"
  6342. }
  6343. ];
  6344. const videoGroups = [
  6345. {
  6346. name: "播放页 - 基本功能",
  6347. fold: true,
  6348. items: videoBasicItems
  6349. },
  6350. {
  6351. name: "播放页 - Header",
  6352. fold: true,
  6353. items: videoHeaderItems
  6354. }
  6355. ];
  6356. const commonStyle$3 = 'html[remove-ads] #row>iframe,html[remove-ads] #videodetails>div:has(>a>img.ad_img),html[remove-ads] #videodetails>iframe,html[remove-ads] body>div:has(>div[align=center]>div.cont6){display:none!important}html[hide-footer] #footer-container{display:none!important}html[show-video-full-title] #row>div.well>a>span.video-title,html[show-video-full-title] #wrapper>div.container.container-minheight>div.row>div>div.row>div>div.well>a>span.video-title{white-space:normal!important;max-height:none!important}html[hide-header-top-menu-language] div.top-nav>div>ul>div.pull-left>form[name=language_form]{display:none!important}html[hide-header-top-menu-signup] div.top-nav>div>ul>div.pull-right>li:has(>a[href="signup.php"]){display:none!important}html[hide-header-top-menu-login] div.top-nav>div>ul>div.pull-right>li:has(>a[href="login.php"]){display:none!important}html[hide-header-navbar-header-logo] div.navbar.navbar-inverse.navbar-fixed-top>div.container>div.navbar-header:has(>a>img[src="/images/logo.png"]){display:none!important}html[hide-header-navbar-right-upload] div.navbar.navbar-inverse.navbar-fixed-top>div.container>div.navbar-collapse.collapse.navbar-inverse-collapse>ul>li:has(>a[href^="https://up"]){display:none!important}html[hide-header-navbar-right-watch] div.navbar.navbar-inverse.navbar-fixed-top>div.container>div.navbar-collapse.collapse.navbar-inverse-collapse>ul>li:has(>a[href="https://91porn.com/v.php?next=watch"]){display:none!important}html[hide-header-navbar-right-forum] div.navbar.navbar-inverse.navbar-fixed-top>div.container>div.navbar-collapse.collapse.navbar-inverse-collapse>ul>li:has(>a[href="https://t1229.btc760.com"]){display:none!important}html[hide-header-navbar-right-webcam] div.navbar.navbar-inverse.navbar-fixed-top>div.container>div.navbar-collapse.collapse.navbar-inverse-collapse>ul>li:has(>a[href="webcam.php"]){display:none!important}html[hide-header-navbar-right-ugatube] div.navbar.navbar-inverse.navbar-fixed-top>div.container>div.navbar-collapse.collapse.navbar-inverse-collapse>ul>li:has(>a[href="https://www.ugatube.com"]){display:none!important}html[hide-header-navbar-right-pay] div.navbar.navbar-inverse.navbar-fixed-top>div.container>div.navbar-collapse.collapse.navbar-inverse-collapse>ul>li:has(>a[href="pay.php"]){display:none!important}html[hide-header-submenu-my-video] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/my_video.php"]){display:none!important}html[hide-header-submenu-my-favour] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/my_favour.php"]){display:none!important}html[hide-header-submenu-my-subs-users] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/my_subs_users.php"]){display:none!important}html[hide-header-submenu-my-subs] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/my_subs.php"]){display:none!important}html[hide-header-submenu-my-comment] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/my_comment.php"]){display:none!important}html[hide-header-submenu-yqm] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/yqm.php"]){display:none!important}html[hide-header-submenu-category-ori] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=ori&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-hot] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=hot&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-top] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=top&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-long] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=long&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-longer] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=longer&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-tf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=tf&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-rf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=rf&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-hd] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=hd&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-top-1] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=top&m=-1&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-md] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=md&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-mf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=mf&viewtype=basic"]){display:none!important}';
  6357. const videoStyle = 'html[hide-video-details-data] #useraction>div.boxPart:has(>span.info){display:none!important}html[hide-video-details-option] #useraction>div.boxPart:has(>div.floatmenu){display:none!important}html[hide-video-details-content] #useraction>div:has(>a[href="speed.php"]){display:none!important}html[hide-video-details-info] div.videodetails-yakov:has(>form>#fm-video_link){display:none!important}html[hide-video-details-comment] div.videodetails-yakov:has(>div>div.main_comment){display:none!important}html[hide-header-submenu-category-ori] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=ori&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-hot] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=hot&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-top] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=top&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-long] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=long&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-longer] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=longer&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-tf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=tf&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-rf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=rf&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-hd] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=hd&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-top-1] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=top&m=-1&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-md] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=md&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-mf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=mf&viewtype=basic"]){display:none!important}';
  6358. const vStyle = 'html[hide-header-submenu-category-ori] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=ori&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-hot] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=hot&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-top] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=top&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-long] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=long&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-longer] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=longer&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-tf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=tf&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-rf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=rf&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-hd] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=hd&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-top-1] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=top&m=-1&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-md] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=md&viewtype=basic"]){display:none!important}html[hide-header-submenu-category-mf] div.navbar.navbar-inverse.navbar-fixed-top>div.submenu>div>div>ul>li:has(>a[href="https://91porn.com/v.php?category=mf&viewtype=basic"]){display:none!important}';
  6359. const rules$4 = [
  6360. {
  6361. name: "common",
  6362. groups: commonGroups$3,
  6363. style: commonStyle$3,
  6364. isSpecial: true,
  6365. checkFn: isPage91Porn
  6366. },
  6367. {
  6368. name: "v",
  6369. groups: vGroups,
  6370. style: vStyle,
  6371. checkFn: isPage91PornV
  6372. },
  6373. {
  6374. name: "video",
  6375. groups: videoGroups,
  6376. style: videoStyle,
  6377. checkFn: isPage91PornVideo
  6378. }
  6379. ];
  6380. const commonBasicItems$2 = [
  6381. {
  6382. type: "switch",
  6383. id: "91porna-remove-ads",
  6384. name: "移除 广告",
  6385. attrName: "remove-ads",
  6386. defaultEnable: true
  6387. },
  6388. {
  6389. type: "switch",
  6390. id: "91porna-hide-footer",
  6391. name: "隐藏 页底footer",
  6392. attrName: "hide-footer",
  6393. defaultEnable: true
  6394. },
  6395. {
  6396. type: "switch",
  6397. id: "91porna-hide-footer-more-site",
  6398. name: "隐藏 精品推荐",
  6399. attrName: "hide-footer-more-site",
  6400. defaultEnable: true
  6401. },
  6402. {
  6403. type: "switch",
  6404. id: "91porna-hide-footer-more-site-1",
  6405. name: "友情链接",
  6406. attrName: "hide-footer-more-site-1",
  6407. defaultEnable: true
  6408. },
  6409. {
  6410. type: "switch",
  6411. id: "91porna-show-video-full-title",
  6412. name: "显示 完整标题",
  6413. attrName: "show-video-full-title",
  6414. defaultEnable: true
  6415. }
  6416. ];
  6417. const commonHeaderItems$2 = [
  6418. {
  6419. type: "switch",
  6420. id: "91porna-hide-header-logo",
  6421. name: "隐藏 LOGO",
  6422. attrName: "hide-header-logo"
  6423. },
  6424. {
  6425. type: "switch",
  6426. id: "91porna-hide-header-search",
  6427. name: "隐藏 搜索框",
  6428. attrName: "hide-header-search"
  6429. },
  6430. {
  6431. type: "switch",
  6432. id: "91porna-hide-header-login",
  6433. name: "隐藏 登录/注册",
  6434. attrName: "hide-header-login"
  6435. },
  6436. {
  6437. type: "switch",
  6438. id: "91porna-hide-header-nav-home",
  6439. name: "移除 首页",
  6440. attrName: "hide-header-nav-home"
  6441. },
  6442. {
  6443. type: "switch",
  6444. id: "91porna-hide-header-nav-video",
  6445. name: "移除 视频",
  6446. attrName: "hide-header-nav-video"
  6447. },
  6448. {
  6449. type: "switch",
  6450. id: "91porna-hide-header-nav-info",
  6451. name: "移除 黑料吃瓜",
  6452. attrName: "hide-header-nav-info"
  6453. },
  6454. {
  6455. type: "switch",
  6456. id: "91porna-hide-header-nav-av",
  6457. name: "移除 日本AV",
  6458. attrName: "hide-header-nav-av"
  6459. },
  6460. {
  6461. type: "switch",
  6462. id: "91porna-hide-header-nav-novel",
  6463. name: "移除 色情小说",
  6464. attrName: "hide-header-nav-novel"
  6465. },
  6466. {
  6467. type: "switch",
  6468. id: "91porna-hide-header-nav-g-video",
  6469. name: "移除 搜同G片",
  6470. attrName: "hide-header-nav-g-video"
  6471. },
  6472. {
  6473. type: "switch",
  6474. id: "91porna-hide-header-nav-app",
  6475. name: "移除 📱手机App",
  6476. attrName: "hide-header-nav-app"
  6477. },
  6478. {
  6479. type: "switch",
  6480. id: "91porna-hide-header-nav-more-site",
  6481. name: "移除 💖更多色站💖",
  6482. attrName: "hide-header-nav-more-site"
  6483. },
  6484. {
  6485. type: "switch",
  6486. id: "91porna-hide-header-nav-info-1",
  6487. name: "移除 黑料吃瓜网",
  6488. attrName: "hide-header-nav-info-1"
  6489. },
  6490. {
  6491. type: "switch",
  6492. id: "91porna-hide-header-nav-new-url",
  6493. name: "移除 最新地址",
  6494. attrName: "hide-header-nav-new-url"
  6495. }
  6496. ];
  6497. const commonVideoItems = [
  6498. {
  6499. type: "switch",
  6500. id: "91porna-hide-video-data",
  6501. name: "隐藏 视频数据",
  6502. attrName: "hide-video-data",
  6503. defaultEnable: true
  6504. },
  6505. {
  6506. type: "switch",
  6507. id: "91porna-hide-video-keyword",
  6508. name: "隐藏 视频关键词",
  6509. attrName: "hide-video-keyword",
  6510. defaultEnable: true
  6511. },
  6512. {
  6513. type: "switch",
  6514. id: "91porna-hide-video-uploader",
  6515. name: "隐藏 视频作者信息",
  6516. attrName: "hide-video-uploader",
  6517. defaultEnable: true
  6518. },
  6519. {
  6520. type: "switch",
  6521. id: "91porna-hide-video-info",
  6522. name: "隐藏 视频描述",
  6523. attrName: "hide-video-info",
  6524. defaultEnable: true
  6525. },
  6526. {
  6527. type: "switch",
  6528. id: "91porna-hide-video-more-site",
  6529. name: "隐藏 视频推广链接",
  6530. attrName: "hide-video-more-site",
  6531. defaultEnable: true
  6532. }
  6533. ];
  6534. const commonGroups$2 = [
  6535. {
  6536. name: "全站通用 - 基本功能",
  6537. fold: true,
  6538. items: commonBasicItems$2
  6539. },
  6540. {
  6541. name: "全站通用 - Header",
  6542. fold: true,
  6543. items: commonHeaderItems$2
  6544. },
  6545. {
  6546. name: "全站通用 - Video",
  6547. fold: true,
  6548. items: commonVideoItems
  6549. }
  6550. ];
  6551. const commonStyle$2 = '@charset "UTF-8";html[remove-ads] body>div.modal-backdrop.fade.in,html[remove-ads] body>main>div>div>div>ul>li:has(>a.checkNum[target=_blank]),html[remove-ads] body>main>div>div.flex-1>div:has(>div>div.swiper),html[remove-ads] #tip_modal,html[remove-ads] body>main>div:has(>div.grid>div.dx-banner-item),html[remove-ads] body>main>div.text-mini.mb-3:has(>ul.dx-recommend-icons){display:none!important}html[hide-footer] #app-footer{display:none!important}html[show-video-full-title] body>main.app-content>div.index-content>div>ul.video-items>li>div.video-item>div>a,html[show-video-full-title] body>main.app-content>div.grid>div>div>ul.video-items>li>div.video-item>div>a>div{white-space:normal!important;max-height:none!important;overflow:none!important;display:contents!important}html[hide-footer-more-site] body>main>div:has(>ul.grid>li:nth-child(1)>a[rel="external nofollow"]>img[_type=data-src]){display:none!important}html[hide-footer-more-site-1] body>main>div:has(>ul.flex>li:nth-child(1)>a[rel="external nofollow"]){display:none!important}html[hide-header-logo] #app-header>div>div>div.app-header>div:has(>a>picture>h1>img.app-logo){display:none!important}html[hide-header-search] #app-header>div>div>div.app-header>div.search-box{display:none!important}html[hide-header-login] #app-header>div>div>div.app-header>div>div.popover-container:has(>button.btn-login){display:none!important}html[hide-header-nav-home] #app-nav>ul.dx-container>li.flex:has(>a[href="/"]){display:none!important}html[hide-header-nav-video] #app-nav>ul.dx-container>li.flex:has(>a[href="https://91porna.com/comic/index/video?category=play"]){display:none!important}html[hide-header-nav-info] #app-nav>ul.dx-container>li.flex:has(>a[href="https://91porna.com/黑料吃瓜"]){display:none!important}html[hide-header-nav-av] #app-nav>ul.dx-container>li.flex:has(>a[href="https://91porna.com/comic/index/av"]){display:none!important}html[hide-header-nav-novel] #app-nav>ul.dx-container>li.flex:has(>a[href="https://91porna.com/comic/index/postNovel"]){display:none!important}html[hide-header-nav-g-video] #app-nav>ul.dx-container>li.flex:has(>a[href$=".tcuwpcyu.cc?ref=91porna"]){display:none!important}html[hide-header-nav-app] #app-nav>ul.dx-container>li.flex:has(>a[href="https://103.mrkcnifa.cc/chan-1907/aff-kz8RU"]),html[hide-header-nav-app] #app-nav>ul.dx-container>li.flex:has(>a[href="https://5cde2.josojuri.cc/?code=hFQ&c=2663"]){display:none!important}html[hide-header-nav-more-site] #app-nav>ul.dx-container>li.flex:has(>a[href$=".gjsvuqtp.cc?ref=91porna"]),html[hide-header-nav-more-site] #app-nav>ul.dx-container>li.flex:has(>a[href$=".qcmvoilg.cc?ref=91porna"]){display:none!important}html[hide-header-nav-info-1] #app-nav>ul.dx-container>li.flex:has(>a[href$=".fjobeijt.cc?ref=91porna"]){display:none!important}html[hide-header-nav-new-url] #app-nav>ul.dx-container>li.flex:has(>a[href="https://91porna.com/comic/index/links?key=home"]){display:none!important}html[hide-video-data] body>main>div>div>div>div:has(>div>svg>use[href="/static/web/icons/icons.svg#time"]){display:none!important}html[hide-video-keyword] body>main>div>div>div>div.dx-tabs>div.dx-tab-content.dx-tab-content--active>ul.text-default:has(>li.items-center>a.link[href^="https://91porna.com/comic/index/search?keyword="]){display:none!important}html[hide-video-uploader] body>main>div>div>div>div.dx-tabs>div.dx-tab-content.dx-tab-content--active>div.dx-hairline--bottom>div.items-center:has(>div>div>a[href^="https://91porna.com/comic/index/publicvideo?user_id="]){display:none!important}html[hide-video-info] body>main>div>div>div>div.dx-tabs>div.dx-tab-content.dx-tab-content--active>div.dx-hairline--bottom>h2{display:none!important}html[hide-video-more-site] body>main>div>div>div>div.dx-tabs>div.dx-tab-content.dx-tab-content--active>div.dx-hairline--bottom>div[style="color:#ccc;line-height:24px"],html[hide-video-more-site] body>main>div>div>div>div.dx-tabs>div.dx-tab-content.dx-tab-content--active>div:has(>strong.dx-subtitle),html[hide-video-more-site] body>main>div>div>div.mt-2.md\\:mt-3>div.dx-tabs.text-xl>div.dx-tab-content.dx-tab-content--active>ul.grid.items-center:has(>li.w-full>a.checkNum[target=_blank]){display:none!important}';
  6552. const rules$3 = [
  6553. {
  6554. name: "common",
  6555. groups: commonGroups$2,
  6556. style: commonStyle$2,
  6557. isSpecial: true,
  6558. checkFn: isPage91Porna
  6559. }
  6560. ];
  6561. const commonBasicItems$1 = [
  6562. {
  6563. type: "switch",
  6564. id: "18comic-hide-top-menu-link",
  6565. name: "移除 上方推广链接",
  6566. attrName: "hide-top-menu-link",
  6567. defaultEnable: true
  6568. },
  6569. {
  6570. type: "switch",
  6571. id: "18comic-remove-ads",
  6572. name: "移除 广告",
  6573. attrName: "remove-ads",
  6574. defaultEnable: true
  6575. },
  6576. {
  6577. type: "switch",
  6578. id: "18comic-hide-footer",
  6579. name: "隐藏 页底footer",
  6580. attrName: "hide-footer",
  6581. defaultEnable: true
  6582. },
  6583. {
  6584. type: "switch",
  6585. id: "18comic-hide-adblock",
  6586. name: "隐藏 Adblock通知",
  6587. attrName: "hide-adblock",
  6588. defaultEnable: true
  6589. },
  6590. {
  6591. type: "switch",
  6592. id: "18comic-hide-adult-verify",
  6593. name: "隐藏 成年确认",
  6594. attrName: "hide-adult-verify",
  6595. defaultEnable: true
  6596. },
  6597. {
  6598. type: "switch",
  6599. id: "18comic-hide-float-right-daily",
  6600. name: "隐藏 每日签到浮窗",
  6601. attrName: "hide-float-right-daily",
  6602. defaultEnable: true
  6603. },
  6604. {
  6605. type: "switch",
  6606. id: "18comic-hide-float-right-image",
  6607. name: "隐藏 右下角浮窗",
  6608. attrName: "hide-float-right-image",
  6609. defaultEnable: true
  6610. }
  6611. ];
  6612. const commonHeaderItems$1 = [
  6613. {
  6614. type: "switch",
  6615. id: "18comic-hide-header-logo",
  6616. name: "隐藏 LOGO",
  6617. attrName: "hide-header-logo"
  6618. },
  6619. {
  6620. type: "switch",
  6621. id: "18comic-hide-header-btn-adulta",
  6622. name: "隐藏 成人A漫",
  6623. attrName: "hide-header-btn-adulta"
  6624. },
  6625. {
  6626. type: "switch",
  6627. id: "18comic-hide-header-btn-theme",
  6628. name: "隐藏 分類",
  6629. attrName: "hide-header-btn-theme"
  6630. },
  6631. {
  6632. type: "switch",
  6633. id: "18comic-hide-header-btn-hmovies",
  6634. name: "隐藏 H動漫",
  6635. attrName: "hide-header-btn-hmovies",
  6636. defaultEnable: true
  6637. },
  6638. {
  6639. type: "switch",
  6640. id: "18comic-hide-header-btn-games",
  6641. name: "隐藏 遊戲",
  6642. attrName: "hide-header-btn-games",
  6643. defaultEnable: true
  6644. },
  6645. {
  6646. type: "switch",
  6647. id: "18comic-hide-header-btn-blogs",
  6648. name: "隐藏 紳夜食堂",
  6649. attrName: "hide-header-btn-blogs",
  6650. defaultEnable: true
  6651. },
  6652. {
  6653. type: "switch",
  6654. id: "18comic-hide-header-btn-forum",
  6655. name: "隐藏 評論區",
  6656. attrName: "hide-header-btn-forum",
  6657. defaultEnable: true
  6658. },
  6659. {
  6660. type: "switch",
  6661. id: "18comic-hide-header-btn-ai-chat",
  6662. name: "隐藏 AI Chat",
  6663. attrName: "hide-header-btn-ai-chat",
  6664. defaultEnable: true
  6665. },
  6666. {
  6667. type: "switch",
  6668. id: "18comic-hide-header-btn-veteran",
  6669. name: "隐藏 好站推薦",
  6670. attrName: "hide-header-btn-veteran",
  6671. defaultEnable: true
  6672. },
  6673. {
  6674. type: "switch",
  6675. id: "18comic-hide-header-btn-theme-toggle",
  6676. name: "隐藏 夜间模式切换",
  6677. attrName: "hide-header-btn-theme-toggle"
  6678. },
  6679. {
  6680. type: "switch",
  6681. id: "18comic-hide-header-btn-bonus",
  6682. name: "隐藏 禁漫一番賞",
  6683. attrName: "hide-header-btn-bonus",
  6684. defaultEnable: true
  6685. },
  6686. {
  6687. type: "switch",
  6688. id: "18comic-hide-header-btn-week",
  6689. name: "隐藏 每周必看",
  6690. attrName: "hide-header-btn-week"
  6691. },
  6692. {
  6693. type: "switch",
  6694. id: "18comic-hide-header-btn-phone",
  6695. name: "隐藏 手机版安装",
  6696. attrName: "hide-header-btn-phone",
  6697. defaultEnable: true
  6698. },
  6699. {
  6700. type: "switch",
  6701. id: "18comic-hide-header-btn-album",
  6702. name: "隐藏 随机漫画",
  6703. attrName: "hide-header-btn-album"
  6704. },
  6705. {
  6706. type: "switch",
  6707. id: "18comic-hide-header-btn-user",
  6708. name: "隐藏 登录注册",
  6709. attrName: "hide-header-btn-user"
  6710. },
  6711. {
  6712. type: "switch",
  6713. id: "18comic-hide-header-btn-search",
  6714. name: "隐藏 搜索",
  6715. attrName: "hide-header-btn-search"
  6716. },
  6717. {
  6718. type: "switch",
  6719. id: "18comic-hide-header-btn-notice",
  6720. name: "隐藏 JM公告",
  6721. attrName: "hide-header-btn-notice"
  6722. },
  6723. {
  6724. type: "switch",
  6725. id: "18comic-hide-header-btn-up-comic",
  6726. name: "隐藏 上傳漫畫",
  6727. attrName: "hide-header-btn-up-comic"
  6728. },
  6729. {
  6730. type: "switch",
  6731. id: "18comic-hide-header-btn-ad-mail",
  6732. name: "隐藏 廣告洽詢",
  6733. attrName: "hide-header-btn-ad-mail",
  6734. defaultEnable: true
  6735. },
  6736. {
  6737. type: "switch",
  6738. id: "18comic-hide-header-btn-pay",
  6739. name: "隐藏 打賞JM",
  6740. attrName: "hide-header-btn-pay",
  6741. defaultEnable: true
  6742. },
  6743. {
  6744. type: "switch",
  6745. id: "18comic-hide-header-btn-shunt",
  6746. name: "隐藏 分流",
  6747. attrName: "hide-header-btn-shunt"
  6748. },
  6749. {
  6750. type: "switch",
  6751. id: "18comic-hide-header-btn-language",
  6752. name: "隐藏 选择语言",
  6753. attrName: "hide-header-btn-language"
  6754. },
  6755. {
  6756. type: "switch",
  6757. id: "18comic-hide-header-btn-url-copy",
  6758. name: "隐藏 收藏永久網域",
  6759. attrName: "hide-header-btn-url-copy",
  6760. defaultEnable: true
  6761. }
  6762. ];
  6763. const commonAlbumItems = [
  6764. {
  6765. type: "switch",
  6766. id: "18comic-hide-thumb-albums-latest",
  6767. name: "隐藏 更新",
  6768. attrName: "hide-thumb-albums-latest"
  6769. },
  6770. {
  6771. type: "switch",
  6772. id: "18comic-hide-thumb-albums-category",
  6773. name: "隐藏 类型",
  6774. attrName: "hide-thumb-albums-category"
  6775. },
  6776. {
  6777. type: "switch",
  6778. id: "18comic-hide-thumb-albums-likes",
  6779. name: "隐藏 喜欢数",
  6780. attrName: "hide-thumb-albums-likes",
  6781. defaultEnable: true
  6782. },
  6783. {
  6784. type: "switch",
  6785. id: "18comic-hide-thumb-albums-bookmark",
  6786. name: "隐藏 收藏",
  6787. attrName: "hide-thumb-albums-bookmark",
  6788. defaultEnable: true
  6789. },
  6790. {
  6791. type: "switch",
  6792. id: "18comic-hide-thumb-albums-title",
  6793. name: "隐藏 标题",
  6794. attrName: "hide-thumb-albums-title"
  6795. },
  6796. {
  6797. type: "switch",
  6798. id: "18comic-show-thumb-albums-full-title",
  6799. name: "显示 完整标题",
  6800. attrName: "show-thumb-albums-full-title",
  6801. defaultEnable: true
  6802. },
  6803. {
  6804. type: "switch",
  6805. id: "18comic-hide-thumb-albums-author",
  6806. name: "隐藏 作者",
  6807. attrName: "hide-thumb-albums-author",
  6808. defaultEnable: true
  6809. },
  6810. {
  6811. type: "switch",
  6812. id: "18comic-hide-thumb-albums-tags",
  6813. name: "隐藏 标签",
  6814. attrName: "hide-thumb-albums-tags",
  6815. defaultEnable: true
  6816. }
  6817. ];
  6818. const commonGroups$1 = [
  6819. {
  6820. name: "全站通用 - 基本功能",
  6821. fold: true,
  6822. items: commonBasicItems$1
  6823. },
  6824. {
  6825. name: "全站通用 - Header",
  6826. fold: true,
  6827. items: commonHeaderItems$1
  6828. },
  6829. {
  6830. name: "全站通用 - Album",
  6831. fold: true,
  6832. items: commonAlbumItems
  6833. }
  6834. ];
  6835. const commonStyle$1 = 'html[hide-top-menu-link] div.top-nav>div>ul>div.center>li.top-menu-m:has(>a[target=_blank]),html[hide-top-menu-link] div.top-nav>div>ul>div.pull-left>li.top-menu-link:has(>a[target=_blank]){display:none!important}html[remove-ads] #wrapper>div.hidden-lg:has(>div[class$=_sticky2]),html[remove-ads] div.panel-body>div>div.center.scramble-page.thewayhome>a[href="https://jmcomicgo.me"],html[remove-ads] #wrapper>div>div>div>div>div:has(>div.photo_center_div>div.e8c78e-4_b>div.group-notice),html[remove-ads] div.panel-body>div>div>div.e8c78e-4_b:has(>div.group-notice),html[remove-ads] #wrapper>div.container>div.row:has(>div>div.e8c78e-4_b>div.group-notice),html[remove-ads] #wrapper>div.container>div.row>div:has(>div.e8c78e-4_b>div.group-notice){display:none!important}html[hide-footer] #wrapper>div.footer-container{display:none!important}html[hide-adblock] #wrapper>div>div>div>div>div[style="font-size: 10px;text-align: center;margin: 5px;"]{display:none!important}html[hide-adult-verify] body>div.modal-backdrop.fade.in,html[hide-adult-verify] #billboard-modal{display:none!important}html[hide-float-right-daily] #wrapper>div.float-right-daily{display:none!important}html[hide-float-right-image] #wrapper>div.float-right-image{display:none!important}html[hide-header-logo] div.navbar-header>a[href="/"]>img[alt=logo]{display:none!important}html[hide-header-btn-adulta] #adulta{display:none!important}html[hide-header-btn-theme] #wrapper>div.ph-bottom>ul>li:has(>a[href="/theme"]),html[hide-header-btn-theme] ul.nav.navbar-nav.navbar-left>li:has(>a[href="/theme/"]){display:none!important}html[hide-header-btn-hmovies] #hmovies{display:none!important}html[hide-header-btn-games] #wrapper>div.ph-bottom>ul>li:has(>a[href="/games"]),html[hide-header-btn-games] ul.nav.navbar-nav.navbar-left>li:has(>a[href="/games"]){display:none!important}html[hide-header-btn-blogs] ul.nav.navbar-nav.navbar-left>li:has(>a[href="/blogs"]){display:none!important}html[hide-header-btn-forum] #wrapper>div.ph-bottom>ul>li:has(>a[href="/forum"]),html[hide-header-btn-forum] #sns,html[hide-header-btn-forum] ul.nav.navbar-nav.navbar-left>li:has(>a[href="/forum/"]){display:none!important}html[hide-header-btn-ai-chat] #wrapper>div.ph-bottom>ul>li:has(>a[href="https://s.zlinkp.com/d.php?z=5278412"]),html[hide-header-btn-ai-chat] ul.nav.navbar-nav.navbar-left>li:has(>a[href="https://s.zlinkp.com/d.php?z=5278412"]){display:none!important}html[hide-header-btn-veteran] #wrapper>div.ph-bottom>ul>li:has(>a[href="/veteran"]),html[hide-header-btn-veteran] ul.nav.navbar-nav.navbar-left>li:has(>a[href="/veteran"]){display:none!important}html[hide-header-btn-theme-toggle] div.navbar-header>div.head-right>label.switch:has(>#theme-toggle-m),html[hide-header-btn-theme-toggle] ul.nav.navbar-nav.navbar-right>li:has(>label.switch){display:none!important}html[hide-header-btn-bonus] ul.nav.navbar-nav.navbar-left>div.adult-class-main>div>a[href="/bonus"],html[hide-header-btn-bonus] ul.nav.navbar-nav.navbar-right>li:has(>a[href="/bonus"]){display:none!important}html[hide-header-btn-week] ul.nav.navbar-nav.navbar-left>div.adult-class-main>div>a[href="/week"],html[hide-header-btn-week] ul.nav.navbar-nav.navbar-right>li:has(>a[href="/week"]){display:none!important}html[hide-header-btn-phone] ul.nav.navbar-nav.navbar-right>li:has(>a[target=_blank]>i.fa-mobile-alt){display:none!important}html[hide-header-btn-album] ul.nav.navbar-nav.navbar-right>li:has(>a[href^="/album/"]){display:none!important}html[hide-header-btn-user] ul.nav.navbar-nav.navbar-right>li:has(>a[data-toggle=modal]>i.fa-user-circle),html[hide-header-btn-user] ul.nav.navbar-nav.navbar-right>li:has(>a[href="#login-modal"]){display:none!important}html[hide-header-btn-search] div.navbar-header>div.head-right>div.dropdown:has(>a>i.fa-search),html[hide-header-btn-search] ul.nav.navbar-nav.navbar-right>li:has(>a[href="#"]>i.fa-search){display:none!important}html[hide-header-btn-notice] div.navbar-collapse>div>ul>li:has(>a[href="https://jmc8763.one/mpSWW7"]){display:none!important}html[hide-header-btn-up-comic] div.navbar-collapse>div>ul>li:has(>a[href="/"]){display:none!important}html[hide-header-btn-ad-mail] ul.nav.navbar-nav.navbar-left>div.adult-class-main>div>li:has(>a[href="mailto:www18comic@gmail.com"]),html[hide-header-btn-ad-mail] div.navbar-collapse>div>ul>li:has(>a[href="mailto:www18comic@gmail.com"]){display:none!important}html[hide-header-btn-pay] div.navbar-collapse>div>ul>li:has(>a[href="https://jmc8763.one/dFTN82"]){display:none!important}html[hide-header-btn-shunt] #click_fl2,html[hide-header-btn-shunt] div.navbar-collapse>div>ul>li:has(>a[href="#shunt-modal"]){display:none!important}html[hide-header-btn-language] ul.nav.navbar-nav.navbar-left>div.adult-class-main>div>li:has(>span[href="#language-modal"]),html[hide-header-btn-language] div.navbar-collapse>div>ul>li:has(>a[href="#language-modal"]){display:none!important}html[hide-header-btn-url-copy] ul.nav.navbar-nav.navbar-left>li.copy-block:has(>#copy){display:none!important}html[hide-thumb-albums-latest] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>div.thumb-overlay-albums>div.label-latest,html[hide-thumb-albums-latest] #wrapper>div.container>div.row>div>div.row>div>div>div.thumb-overlay-albums>div.label-latest{display:none!important}html[hide-thumb-albums-category] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>div.thumb-overlay-albums>div.category-icon,html[hide-thumb-albums-category] #wrapper>div.container>div.row>div>div.row>div>div>div.thumb-overlay-albums>div.category-icon{display:none!important}html[hide-thumb-albums-likes] #related_comics>div.row>div>div.owl-stage-outer>div>div>div>div.gamelib_block_footer>span:has(>a.blog-like),html[hide-thumb-albums-likes] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>div.thumb-overlay-albums>div.label-loveicon,html[hide-thumb-albums-likes] #wrapper>div.container>div.row>div>div.row>div>div>div.thumb-overlay-albums>div.label-loveicon{display:none!important}html[hide-thumb-albums-bookmark] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>div.thumb-overlay-albums>div.label-star,html[hide-thumb-albums-bookmark] #wrapper>div.container>div.row>div>div.row>div>div>div.thumb-overlay-albums>div.label-star{display:none!important}html[hide-thumb-albums-title] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>span.video-title,html[hide-thumb-albums-title] #wrapper>div.container>div.row>div>div.row>div>div>span.video-title{display:none!important}html[show-thumb-albums-full-title] #related_comics>div.row>div>div.owl-stage-outer>div>div>div>a>div.title,html[show-thumb-albums-full-title] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>span.video-title,html[show-thumb-albums-full-title] #wrapper>div.container>div.row>div>div.row>div>div>span.video-title{white-space:normal!important;max-height:none!important}html[hide-thumb-albums-author] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>div:has(>a[href*="&main_tag"]),html[hide-thumb-albums-author] #wrapper>div.container>div.row>div>div.row>div>div>div:has(>a[href*="&main_tag"]){display:none!important}html[hide-thumb-albums-tags] #related_comics>div.row>ul>div.owl-stage-outer>div>div>div>div.title-truncate.tags,html[hide-thumb-albums-tags] #wrapper>div.container>div.row>div>div.row>div>div>div.title-truncate.tags{display:none!important}';
  6836. const rules$2 = [
  6837. {
  6838. name: "common",
  6839. groups: commonGroups$1,
  6840. style: commonStyle$1,
  6841. isSpecial: true,
  6842. checkFn: isPage18Comic
  6843. }
  6844. ];
  6845. const commonBasicItems = [
  6846. {
  6847. type: "switch",
  6848. id: "xvideos-remove-ads",
  6849. name: "移除 广告",
  6850. attrName: "remove-ads",
  6851. defaultEnable: true
  6852. },
  6853. {
  6854. type: "switch",
  6855. id: "xvideos-hide-footer",
  6856. name: "隐藏 页底footer",
  6857. attrName: "hide-footer",
  6858. defaultEnable: true
  6859. }
  6860. ];
  6861. const commonHeaderItems = [
  6862. {
  6863. type: "switch",
  6864. id: "xvideos-hide-header-logo",
  6865. name: "隐藏 LOGO",
  6866. attrName: "hide-header-logo"
  6867. },
  6868. {
  6869. type: "switch",
  6870. id: "xvideos-hide-header-btn-language",
  6871. name: "隐藏 选择语言",
  6872. attrName: "hide-header-btn-language"
  6873. },
  6874. {
  6875. type: "switch",
  6876. id: "xvideos-hide-header-btn-localisation",
  6877. name: "隐藏 选择地区",
  6878. attrName: "hide-header-btn-localisation"
  6879. },
  6880. {
  6881. type: "switch",
  6882. id: "xvideos-hide-header-btn-main-cat",
  6883. name: "隐藏 性别喜好",
  6884. attrName: "hide-header-btn-main-cat"
  6885. },
  6886. {
  6887. type: "switch",
  6888. id: "xvideos-hide-header-btn-search",
  6889. name: "隐藏 搜索框",
  6890. attrName: "hide-header-btn-search"
  6891. },
  6892. {
  6893. type: "switch",
  6894. id: "xvideos-hide-header-btn-user",
  6895. name: "隐藏 user",
  6896. attrName: "hide-header-btn-user"
  6897. },
  6898. {
  6899. type: "switch",
  6900. id: "xvideos-hide-header-btn-theme-switch",
  6901. name: "隐藏 主题切换",
  6902. attrName: "hide-header-btn-theme-switch"
  6903. },
  6904. {
  6905. type: "switch",
  6906. id: "xvideos-hide-header-btn-setting",
  6907. name: "隐藏 设置",
  6908. attrName: "hide-header-btn-setting"
  6909. }
  6910. ];
  6911. const commonNavItems = [
  6912. {
  6913. type: "switch",
  6914. id: "xvideos-hide-nav-best",
  6915. name: "隐藏 最佳影片",
  6916. attrName: "hide-nav-best"
  6917. },
  6918. {
  6919. type: "switch",
  6920. id: "xvideos-hide-nav-tags",
  6921. name: "隐藏 分类",
  6922. attrName: "hide-nav-tags"
  6923. },
  6924. {
  6925. type: "switch",
  6926. id: "xvideos-hide-nav-channels",
  6927. name: "隐藏 頻道",
  6928. attrName: "hide-nav-channels"
  6929. },
  6930. {
  6931. type: "switch",
  6932. id: "xvideos-hide-nav-pornstars",
  6933. name: "隐藏 色情明星",
  6934. attrName: "hide-nav-pornstars"
  6935. },
  6936. {
  6937. type: "switch",
  6938. id: "xvideos-hide-nav-red-ticket",
  6939. name: "隐藏 RED视频",
  6940. attrName: "hide-nav-red-ticket"
  6941. },
  6942. {
  6943. type: "switch",
  6944. id: "xvideos-hide-nav-live-cams",
  6945. name: "隐藏 现场直播摄影机(广告)",
  6946. attrName: "hide-nav-live-cams",
  6947. defaultEnable: true
  6948. },
  6949. {
  6950. type: "switch",
  6951. id: "xvideos-hide-nav-games",
  6952. name: "隐藏 遊戲(广告)",
  6953. attrName: "hide-nav-games",
  6954. defaultEnable: true
  6955. },
  6956. {
  6957. type: "switch",
  6958. id: "xvideos-hide-nav-logo",
  6959. name: "隐藏 约会(广告)",
  6960. attrName: "hide-nav-logo",
  6961. defaultEnable: true
  6962. },
  6963. {
  6964. type: "switch",
  6965. id: "xvideos-hide-nav-profileslist",
  6966. name: "隐藏 簡介",
  6967. attrName: "hide-nav-profileslist"
  6968. }
  6969. ];
  6970. const commonGroups = [
  6971. {
  6972. name: "全站通用 - 基本功能",
  6973. fold: true,
  6974. items: commonBasicItems
  6975. },
  6976. {
  6977. name: "全站通用 - Header",
  6978. fold: true,
  6979. items: commonHeaderItems
  6980. },
  6981. {
  6982. name: "全站通用 - Nav",
  6983. fold: true,
  6984. items: commonNavItems
  6985. }
  6986. ];
  6987. const commonStyle = 'html[remove-ads] #hlsplayer>div.videoad-base,html[remove-ads] #ad-header-mobile-contener,html[remove-ads] div.exo-ad-ins-div.exo-ad-playersiderectangle,html[remove-ads] div.exo-ad-ins-container.ad-support-desktop,html[remove-ads] #ad-footer,html[remove-ads] div.thumb-ad.thumb-nat-ad.thumb-nat-exo-ad{display:none!important}html[hide-footer] #page>div.remove-ads,html[hide-footer] #footer{display:none!important}html[hide-header-logo] #site-logo-link,html[hide-header-btn-language] #site-language,html[hide-header-btn-localisation] #site-localisation,html[hide-header-btn-main-cat] #site-main-cat{display:none!important}html[hide-header-btn-search] body>div.head__top.width-full-body>header>div.head__search{display:none!important}html[hide-header-btn-user] #header-mobile-right>button.head__btn:has(>span.icf-user-o){display:none!important}html[hide-header-btn-theme-switch] #site-theme-switch{display:none!important}html[hide-header-btn-setting] #header-mobile-right>button.head__btn:has(>span.icf-cog-o){display:none!important}html[hide-nav-best] #nav>nav>ul>li:has(>a[href="/best"]){display:none!important}html[hide-nav-tags] #nav>nav>ul>li:has(>#main-cats-sub-list-btn){display:none!important}html[hide-nav-channels] #nav>nav>ul>li:has(>a[href="/channels-index"]){display:none!important}html[hide-nav-pornstars] #nav>nav>ul>li:has(>a[href="/pornstars-index"]){display:none!important}html[hide-nav-red-ticket] #nav>nav>ul>li:has(>a[href="https://www.xvideos.red/red/videos"]){display:none!important}html[hide-nav-live-cams] #nav>nav>ul>li:has(>a[href="https://www.xvlivecams.com/female-cams/"]){display:none!important}html[hide-nav-games] #nav>nav>ul>li:has(>a[href="https://xvideos.nutaku.net/wl/gate/"]){display:none!important}html[hide-nav-logo] #nav>nav>ul>li:has(>a.ignore-popunder>span.icf-hearts-o),html[hide-nav-logo] #nav>nav>ul>li:has(>a[href="https://s.zlinkp.com/d.php?z=5421034"]){display:none!important}html[hide-nav-profileslist] #nav>nav>ul>li:has(>a[href="/profileslist"]){display:none!important}';
  6988. const rules$1 = [
  6989. {
  6990. name: "common",
  6991. groups: commonGroups,
  6992. style: commonStyle,
  6993. isSpecial: true,
  6994. checkFn: isPageXVideos
  6995. }
  6996. ];
  6997. const basicItems = [
  6998. {
  6999. type: "list",
  7000. id: "language",
  7001. name: i18n.language.language,
  7002. description: i18n.language.language_description,
  7003. defaultValue: "zh-CN",
  7004. disableValue: "null",
  7005. options: [
  7006. {
  7007. id: "zh-CN",
  7008. name: "简体中文"
  7009. },
  7010. {
  7011. id: "en-US",
  7012. name: "English"
  7013. }
  7014. ],
  7015. fn: (id) => {
  7016. i18n.change(id);
  7017. }
  7018. }
  7019. ];
  7020. const basicRules = {
  7021. name: "basic-rules",
  7022. groups: [
  7023. {
  7024. name: i18n.language.basic_settings,
  7025. items: basicItems
  7026. }
  7027. ],
  7028. isSpecial: true,
  7029. specialName: "SETTINGS",
  7030. checkFn: isPageMissAv
  7031. };
  7032. const rules = [
  7033. ...rules$7,
  7034. ...rules$6,
  7035. ...rules$5,
  7036. ...rules$4,
  7037. ...rules$3,
  7038. ...rules$2,
  7039. ...rules$1,
  7040. // ...xHamsterRules,
  7041. basicRules
  7042. ];
  7043. const _hoisted_1 = { class: "text-base" };
  7044. const _sfc_main = /* @__PURE__ */ e$1.defineComponent({
  7045. __name: "App",
  7046. setup(__props) {
  7047. return (_ctx, _cache) => {
  7048. return e$1.openBlock(), e$1.createElementBlock("div", _hoisted_1, [
  7049. e$1.createVNode(_sfc_main$3, e$1.normalizeProps(e$1.guardReactiveProps({
  7050. rules: e$1.unref(rules),
  7051. title: e$1.unref(i18n).language.title,
  7052. github: "http://github.com/GangPeter",
  7053. greasyFork: "https://greasyfork.org/users/105051"
  7054. })), null, 16),
  7055. e$1.createVNode(_sfc_main$2)
  7056. ]);
  7057. };
  7058. }
  7059. });
  7060. const waitForHead = () => {
  7061. return new Promise((resolve) => {
  7062. if (document.head) {
  7063. resolve();
  7064. }
  7065. const observer = new MutationObserver(() => {
  7066. if (document.head) {
  7067. observer.disconnect();
  7068. resolve();
  7069. }
  7070. });
  7071. observer.observe(document, { childList: true, subtree: true });
  7072. });
  7073. };
  7074. const waitForBody = () => {
  7075. return new Promise((resolve) => {
  7076. if (document.body) {
  7077. resolve();
  7078. }
  7079. const observer = new MutationObserver(() => {
  7080. if (document.body) {
  7081. observer.disconnect();
  7082. resolve();
  7083. }
  7084. });
  7085. observer.observe(document, { childList: true, subtree: true });
  7086. });
  7087. };
  7088. const loadRules = (rules2) => {
  7089. for (const rule of rules2) {
  7090. if (!rule.checkFn()) continue;
  7091. for (const group of rule.groups) {
  7092. for (const item of group.items) {
  7093. try {
  7094. switch (item.type) {
  7095. case "switch":
  7096. loadSwitchItem(item);
  7097. break;
  7098. case "number":
  7099. loadNumberItem(item);
  7100. break;
  7101. case "list":
  7102. loadListItem(item);
  7103. break;
  7104. case "string":
  7105. loadStringItem(item);
  7106. break;
  7107. }
  7108. } catch (err) {
  7109. error(
  7110. `loadRules load item failed, id=${item.id}, name=${item.name}, type=${item.type}`,
  7111. err
  7112. );
  7113. }
  7114. }
  7115. }
  7116. }
  7117. };
  7118. const loadStyles = (rules2) => {
  7119. var _a;
  7120. for (const rule of rules2) {
  7121. if (!rule.checkFn() || !rule.style) continue;
  7122. try {
  7123. const style = document.createElement("style");
  7124. style.className = `pg-css ${rule.name}`;
  7125. style.textContent = rule.style;
  7126. (_a = document.documentElement) == null ? void 0 : _a.appendChild(style);
  7127. } catch (err) {
  7128. error(`loadStyles error, name=${rule.name}`, err);
  7129. }
  7130. }
  7131. };
  7132. const loadSwitchItem = (item) => {
  7133. var _a;
  7134. const enable = PGStorage.get(item.id, item.defaultEnable);
  7135. if (!enable) return;
  7136. if (!item.noStyle) {
  7137. document.documentElement.setAttribute(item.attrName ?? item.id, "");
  7138. }
  7139. if (!item.enableFn) return;
  7140. if (item.enableFnRunAt === "document-end" && document.readyState === "loading") {
  7141. document.addEventListener("DOMContentLoaded", () => {
  7142. var _a2;
  7143. (_a2 = item.enableFn()) == null ? undefined : _a2.then().catch();
  7144. });
  7145. } else {
  7146. (_a = item.enableFn()) == null ? undefined : _a.then().catch();
  7147. }
  7148. };
  7149. const loadNumberItem = (item) => {
  7150. var _a;
  7151. const value = PGStorage.get(item.id, item.defaultValue);
  7152. if (value === item.disableValue) return;
  7153. if (!item.noStyle) {
  7154. document.documentElement.setAttribute(item.attrName ?? item.id, "");
  7155. }
  7156. (_a = item.fn(value)) == null ? undefined : _a.then().catch();
  7157. };
  7158. const loadStringItem = (item) => {
  7159. var _a;
  7160. const value = PGStorage.get(item.id, item.defaultValue);
  7161. if (value === item.disableValue) return;
  7162. if (!item.noStyle) {
  7163. document.documentElement.setAttribute(item.attrName ?? item.id, "");
  7164. }
  7165. (_a = item.fn(value)) == null ? undefined : _a.then().catch();
  7166. };
  7167. const loadListItem = (item) => {
  7168. const value = PGStorage.get(item.id, item.defaultValue);
  7169. if (value === item.disableValue) return;
  7170. document.documentElement.setAttribute(value, "");
  7171. };
  7172. const loadModules = () => {
  7173. waitForHead().then(() => {
  7174. loadStyles(rules);
  7175. log("loadStyles done");
  7176. });
  7177. loadRules(rules);
  7178. log("loadRules done");
  7179. };
  7180. const css = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:host{font-family:Arial,Helvetica,sans-serif!important}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-y-0{top:0;bottom:0}.left-0{left:0}.right-0{right:0}.right-20{right:80px}.top-0{top:0}.isolate{isolation:isolate}.z-10{z-index:10}.z-\\[10000000\\]{z-index:10000000}.z-\\[100\\]{z-index:100}.order-first{order:-9999}.m-1{margin:4px}.mx-2{margin-left:8px;margin-right:8px}.mb-1\\.5{margin-bottom:6px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.ml-2{margin-left:8px}.ml-4{margin-left:16px}.mr-1{margin-right:4px}.mt-1{margin-top:4px}.mt-2\\.5{margin-top:10px}.mt-4{margin-top:16px}.mt-5{margin-top:20px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.size-8{width:32px;height:32px}.h-10{height:40px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-auto{height:auto}.max-h-60{max-height:240px}.min-h-12{min-height:48px}.min-h-\\[calc\\(100\\%-2\\.5rem\\)\\]{min-height:calc(100% - 40px)}.w-1\\/5{width:20%}.w-10{width:40px}.w-11{width:44px}.w-2\\/5{width:40%}.w-24{width:96px}.w-4{width:16px}.w-5{width:20px}.w-6{width:24px}.w-full{width:100%}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.translate-x-1{--tw-translate-x: 4px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 24px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(20px * var(--tw-space-x-reverse));margin-left:calc(20px * calc(1 - var(--tw-space-x-reverse)))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overscroll-none{overscroll-behavior:none}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:4px}.rounded-2xl{border-radius:16px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-xl{border-radius:12px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-b-xl{border-bottom-right-radius:12px;border-bottom-left-radius:12px}.border{border-width:1px}.border-2{border-width:2px}.border-\\[\\#212121\\]{--tw-border-opacity: 1;border-color:rgb(33 33 33 / var(--tw-border-opacity, 1))}.border-\\[\\#252525\\]{--tw-border-opacity: 1;border-color:rgb(37 37 37 / var(--tw-border-opacity, 1))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-\\[\\#0e0e0e\\]{--tw-bg-opacity: 1;background-color:rgb(14 14 14 / var(--tw-bg-opacity, 1))}.bg-\\[\\#151515\\]{--tw-bg-opacity: 1;background-color:rgb(21 21 21 / var(--tw-bg-opacity, 1))}.bg-\\[\\#1b1b1b\\]{--tw-bg-opacity: 1;background-color:rgb(27 27 27 / var(--tw-bg-opacity, 1))}.bg-\\[\\#1e1e1e80\\]{background-color:#1e1e1e80}.bg-\\[\\#1f1f1f\\]{--tw-bg-opacity: 1;background-color:rgb(31 31 31 / var(--tw-bg-opacity, 1))}.bg-\\[\\#252525\\]{--tw-bg-opacity: 1;background-color:rgb(37 37 37 / var(--tw-bg-opacity, 1))}.bg-\\[\\#2f2f2f\\]{--tw-bg-opacity: 1;background-color:rgb(47 47 47 / var(--tw-bg-opacity, 1))}.bg-\\[\\#ff9000\\]{--tw-bg-opacity: 1;background-color:rgb(255 144 0 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-green-950{--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-1{padding:4px}.p-2{padding:8px}.p-3\\.5{padding:14px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3\\.5{padding-left:14px;padding-right:14px}.py-0\\.5{padding-top:2px;padding-bottom:2px}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.pb-2{padding-bottom:8px}.pl-10{padding-left:40px}.pl-3{padding-left:12px}.pl-9{padding-left:36px}.pr-2{padding-right:8px}.pr-4{padding-right:16px}.pt-1{padding-top:4px}.text-left{text-align:left}.text-center{text-align:center}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-base{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-4{line-height:16px}.leading-6{line-height:24px}.text-\\[\\#767676\\]{--tw-text-opacity: 1;color:rgb(118 118 118 / var(--tw-text-opacity, 1))}.text-\\[\\#c6c6c6\\]{--tw-text-opacity: 1;color:rgb(198 198 198 / var(--tw-text-opacity, 1))}.text-\\[\\#ff9000\\]{--tw-text-opacity: 1;color:rgb(255 144 0 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.will-change-\\[right\\,bottom\\]{will-change:right,bottom}.will-change-\\[top\\,left\\]{will-change:top,left}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.invalid\\:border-red-500:invalid{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.hover\\:border-\\[\\#ff9000\\]:hover{--tw-border-opacity: 1;border-color:rgb(255 144 0 / var(--tw-border-opacity, 1))}.hover\\:border-green-600:hover{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.hover\\:bg-\\[\\#212121\\]:hover{--tw-bg-opacity: 1;background-color:rgb(33 33 33 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#292929\\]:hover{--tw-bg-opacity: 1;background-color:rgb(41 41 41 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#2D2D2D\\]:hover{--tw-bg-opacity: 1;background-color:rgb(45 45 45 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#2f2f2f\\]:hover{--tw-bg-opacity: 1;background-color:rgb(47 47 47 / var(--tw-bg-opacity, 1))}.hover\\:bg-green-950:hover{--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#ff9000\\]:hover{--tw-text-opacity: 1;color:rgb(255 144 0 / var(--tw-text-opacity, 1))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:text-opacity-100:hover{--tw-text-opacity: 1}.focus\\:border-\\[\\#2f2f2f\\]:focus{--tw-border-opacity: 1;border-color:rgb(47 47 47 / var(--tw-border-opacity, 1))}.focus\\:bg-\\[\\#212121\\]:focus{--tw-bg-opacity: 1;background-color:rgb(33 33 33 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:invalid\\:border-red-500:invalid:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.sm\\:text-sm{font-size:14px;line-height:20px}}';
  7181. const main = () => {
  7182. const wrap = document.createElement("div");
  7183. wrap.id = "porn-enhance";
  7184. const root = wrap.attachShadow({ mode: "open" });
  7185. const style = document.createElement("style");
  7186. style.textContent = css;
  7187. root.appendChild(style);
  7188. waitForBody().then(() => document.body.appendChild(wrap));
  7189. const app = e$1.createApp(_sfc_main);
  7190. app.config.errorHandler = (err, vm, info) => {
  7191. error("Vue:", err);
  7192. error("Component:", vm);
  7193. error("Info:", info);
  7194. };
  7195. const pinia = createPinia();
  7196. app.use(pinia);
  7197. app.mount(
  7198. (() => {
  7199. const node = document.createElement("div");
  7200. root.appendChild(node);
  7201. return node;
  7202. })()
  7203. );
  7204. };
  7205. const menu = () => {
  7206. if (self !== top) {
  7207. log("skip iframe");
  7208. return;
  7209. }
  7210. const ruleStore = useRulePanelStore();
  7211. const sideBtnStore = useSideBtnStore();
  7212. _GM_registerMenuCommand(i18n.language.panel, () => {
  7213. ruleStore.isShow ? ruleStore.hide() : ruleStore.show();
  7214. });
  7215. _GM_registerMenuCommand(i18n.language.side_btn, () => {
  7216. sideBtnStore.isShow ? sideBtnStore.hide() : sideBtnStore.show();
  7217. });
  7218. };
  7219. try {
  7220. log(`script start, mode: ${"production"}, url: ${location.href}`);
  7221. intercept(_unsafeWindow);
  7222. log("intercept done");
  7223. loadModules();
  7224. main();
  7225. menu();
  7226. log(`script end`);
  7227. } catch (err) {
  7228. error("main.ts error", err);
  7229. }
  7230.  
  7231. })(Vue);