// ==UserScript== // @name PtToPtools-Dev // @namespace http://tampermonkey.net/ // @version 2023.09.06 // @author monkey // @icon https://vitejs.dev/logo.svg // @match https://ptchdbits.co/* // @match https://www.gamegamept.com/* // @match https://www.ptlsp.com/* // @match https://ptcafe.club/* // @match https://shadowflow.org/* // @match https://rousi.zip/* // @match https://www.torrentleech.org/* // @match https://hd-space.org/* // @match https://www.biho.xyz/* // @match https://pt.dhtclub.com/* // @match https://ubits.club/* // @match https://kufei.org/* // @match https://pandapt.net/* // @match https://www.okpt.net/* // @match https://share.ilolicon.com/* // @match https://hdfun.me/* // @match https://wukongwendao.top/* // @match https://1ptba.com/* // @match https://52pt.site/* // @match https://audiences.me/* // @match https://byr.pt/* // @match https://ccfbits.org/* // @match https://club.hares.top/* // @match https://discfan.net/* // @match https://et8.org/* // @match https://filelist.io/* // @match https://hdatmos.club/* // @match https://hdchina.org/* // @match https://hdcity.leniter.org/* // @match https://hdhome.org/* // @match https://hdmayi.com/* // @match https://hdsky.me/* // @match https://hdtime.org/* // @match https://hudbt.hust.edu.cn/* // @match https://iptorrents.com/t // @match https://xp.m-team.io/* // @match https://lemonhd.org/* // @match https://nanyangpt.com/* // @match https://npupt.com/* // @match https://ourbits.club/* // @match https://pt.btschool.club/* // @match https://pt.eastgame.org/* // @match https://pt.hdbd.us/* // @match https://pt.keepfrds.com/* // @match https://pterclub.com/* // @match https://pthome.net/* // @match https://springsunday.net/* // @match https://totheglory.im/* // @match https://u2.dmhy.org/* // @match https://www.beitai.pt/* // @match https://www.haidan.video/userdetails.php // @match https://www.haidan.video/usercp.php // @match https://www.hdarea.co/* // @match https://www.hddolby.com/* // @match https://www.htpt.cc/* // @match https://www.nicept.net/* // @match https://www.pthome.net/* // @match https://www.pttime.org // @match https://www.tjupt.org/* // @match https://www.torrentleech.org // @match https://www.carpet.net/* // @match https://wintersakura.net/* // @match https://hhanclub.top/* // @match https://www.hdpt.xyz/* // @match https://ptchina.org/* // @match http://www.oshen.win/* // @match https://www.hd.ai/* // @match http://ihdbits.me/* // @match https://zmpt.cc/* // @match https://leaves.red/* // @match https://piggo.me/* // @match https://pt.2xfree.org/* // @match https://sharkpt.net/* // @match https://www.dragonhd.xyz/* // @match https://oldtoons.world/* // @match http://hdmayi.com/* // @match https://www.3wmg.com/* // @match https://carpt.net/* // @match https://pt.0ff.cc/* // @match https://hdpt.xyz/* // @match https://azusa.wiki/* // @match https://pt.itzmx.com/* // @match https://gamegamept.cn/* // @match https://srvfi.top/* // @match https://www.icc2022.com/* // @match http://leaves.red/* // @match https://xingtan.one/* // @match http://uploads.ltd/* // @match https://cyanbug.net/* // @match https://ptsbao.club/* // @match https://greatposterwall.com/* // @match https://gainbound.net/* // @match http://hdzone.me/* // @match https://www.pttime.org/* // @match https://pt.msg.vg/* // @match https://pt.soulvoice.club/* // @match https://www.hitpt.com/* // @match https://hdfans.org/* // @match https://www.joyhd.net/* // @match https://hdzone.me/* // @match https://reelflix.xyz/* // @match https://pt.hdpost.top/* // @match https://monikadesign.uk/* // @match https://exoticaz.to/* // @match https://cinemaz.to/* // @match https://avistaz.to/* // @match https://iptorrents.com/* // @match https://pt.hdupt.com/* // @match https://www.oshen.win/* // @match https://hdcity.city/* // @match https://hdvideo.one/* // @match https://chdbits.co/* // @match https://kamept.com/* // @match https://ultrahd.net/* // @match http://pt.tu88.men/* // @match https://pt.hd4fans.org/* // @match https://hd-torrents.org/* // @match https://fsm.name/* // @match https://dajiao.cyou/* // @match https://hudbt.hust.edu.cn/* // @match https://dicmusic.com/* // @require https://cdn.jsdelivr.net/npm/vue@3.3.4/dist/vue.global.prod.js // @grant GM_addStyle // @grant GM_cookie // @grant GM_xmlhttpRequest // @description PT站点cookie等信息发送到Ptools // @downloadURL none // ==/UserScript== (t=>{if(typeof GM_addStyle=="function"){GM_addStyle(t);return}const e=document.createElement("style");e.textContent=t,document.head.append(e)})(' #app{padding:2rem;text-align:center;position:fixed;top:0;z-index:99999;width:100px;margin-right:0;margin-left:0;margin-top:240px;float:left;opacity:.8;font-size:12px;background-color:#fff}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}.wrap[data-v-ae03f8e0]{position:fixed;top:0;z-index:99999;width:110px;margin-right:0;margin-left:0;margin-top:240px;float:left;opacity:.8;font-size:12px;background-color:#fff}.wrap[data-v-ae03f8e0]:hover{opacity:1}.wrap>img[data-v-ae03f8e0],.image[data-v-ae03f8e0]{border-radius:2px;width:100%} '); (function (vue) { 'use strict'; var __getOwnPropNames = Object.getOwnPropertyNames; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var require_main_001 = __commonJS({ "main-6c77893f.js"(exports, module) { function _typeof(o2) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) { return typeof o3; } : function(o3) { return o3 && "function" == typeof Symbol && o3.constructor === Symbol && o3 !== Symbol.prototype ? "symbol" : typeof o3; }, _typeof(o2); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== void 0) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _toPropertyKey(arg) { var key2 = _toPrimitive(arg, "string"); return _typeof(key2) === "symbol" ? key2 : String(key2); } function _defineProperty$p(obj, key2, value) { key2 = _toPropertyKey(key2); if (key2 in obj) { Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key2] = value; } return obj; } function ownKeys(e2, r2) { var t2 = Object.keys(e2); if (Object.getOwnPropertySymbols) { var o2 = Object.getOwnPropertySymbols(e2); r2 && (o2 = o2.filter(function(r3) { return Object.getOwnPropertyDescriptor(e2, r3).enumerable; })), t2.push.apply(t2, o2); } return t2; } function _objectSpread2(e2) { for (var r2 = 1; r2 < arguments.length; r2++) { var t2 = null != arguments[r2] ? arguments[r2] : {}; r2 % 2 ? ownKeys(Object(t2), true).forEach(function(r3) { _defineProperty$p(e2, r3, t2[r3]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys(Object(t2)).forEach(function(r3) { Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); }); } return e2; } function _extends() { _extends = Object.assign ? Object.assign.bind() : function(target) { for (var i2 = 1; i2 < arguments.length; i2++) { var source = arguments[i2]; for (var key2 in source) { if (Object.prototype.hasOwnProperty.call(source, key2)) { target[key2] = source[key2]; } } } return target; }; return _extends.apply(this, arguments); } const isArray$2 = Array.isArray; const isString = (val) => typeof val === "string"; const isObject$1 = (val) => val !== null && typeof val === "object"; function getDataAndAriaProps(props) { return Object.keys(props).reduce((memo, key2) => { if (key2.startsWith("data-") || key2.startsWith("aria-")) { memo[key2] = props[key2]; } return memo; }, {}); } function renderHelper(v2) { let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; let defaultV = arguments.length > 2 ? arguments[2] : void 0; if (typeof v2 === "function") { return v2(props); } return v2 !== null && v2 !== void 0 ? v2 : defaultV; } function wrapPromiseFn(openFn) { let closeFn; const closePromise = new Promise((resolve) => { closeFn = openFn(() => { resolve(true); }); }); const result = () => { closeFn === null || closeFn === void 0 ? void 0 : closeFn(); }; result.then = (filled, rejected) => closePromise.then(filled, rejected); result.promise = closePromise; return result; } function classNames() { const classes = []; for (let i2 = 0; i2 < arguments.length; i2++) { const value = i2 < 0 || arguments.length <= i2 ? void 0 : arguments[i2]; if (!value) continue; if (isString(value)) { classes.push(value); } else if (isArray$2(value)) { for (let i3 = 0; i3 < value.length; i3++) { const inner = classNames(value[i3]); if (inner) { classes.push(inner); } } } else if (isObject$1(value)) { for (const name in value) { if (value[name]) { classes.push(name); } } } } return classes.join(" "); } const isValid = (value) => { return value !== void 0 && value !== null && value !== ""; }; const isValid$1 = isValid; const initDefaultProps = (types, defaultProps) => { const propTypes = _extends({}, types); Object.keys(defaultProps).forEach((k2) => { const prop = propTypes[k2]; if (prop) { if (prop.type || prop.default) { prop.default = defaultProps[k2]; } else if (prop.def) { prop.def(defaultProps[k2]); } else { propTypes[k2] = { type: prop, default: defaultProps[k2] }; } } else { throw new Error(`not have ${k2} prop`); } }); return propTypes; }; const initDefaultProps$1 = initDefaultProps; const skipFlattenKey = Symbol("skipFlatten"); const flattenChildren = function() { let children = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; let filterEmpty2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; const temp = Array.isArray(children) ? children : [children]; const res = []; temp.forEach((child) => { if (Array.isArray(child)) { res.push(...flattenChildren(child, filterEmpty2)); } else if (child && child.type === vue.Fragment) { if (child.key === skipFlattenKey) { res.push(child); } else { res.push(...flattenChildren(child.children, filterEmpty2)); } } else if (child && vue.isVNode(child)) { if (filterEmpty2 && !isEmptyElement(child)) { res.push(child); } else if (!filterEmpty2) { res.push(child); } } else if (isValid$1(child)) { res.push(child); } }); return res; }; const findDOMNode = (instance) => { var _a; let node2 = ((_a = instance === null || instance === void 0 ? void 0 : instance.vnode) === null || _a === void 0 ? void 0 : _a.el) || instance && (instance.$el || instance); while (node2 && !node2.tagName) { node2 = node2.nextSibling; } return node2; }; function isEmptyElement(c2) { return c2 && (c2.type === vue.Comment || c2.type === vue.Fragment && c2.children.length === 0 || c2.type === vue.Text && c2.children.trim() === ""); } function filterEmpty() { let children = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; const res = []; children.forEach((child) => { if (Array.isArray(child)) { res.push(...child); } else if ((child === null || child === void 0 ? void 0 : child.type) === vue.Fragment) { res.push(...filterEmpty(child.children)); } else { res.push(child); } }); return res.filter((c2) => !isEmptyElement(c2)); } function isValidElement(element) { if (Array.isArray(element) && element.length === 1) { element = element[0]; } return element && element.__v_isVNode && typeof element.type !== "symbol"; } let raf = (callback) => setTimeout(callback, 16); let caf = (num) => clearTimeout(num); if (typeof window !== "undefined" && "requestAnimationFrame" in window) { raf = (callback) => window.requestAnimationFrame(callback); caf = (handle) => window.cancelAnimationFrame(handle); } let rafUUID = 0; const rafIds = /* @__PURE__ */ new Map(); function cleanup(id) { rafIds.delete(id); } function wrapperRaf(callback) { let times = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; rafUUID += 1; const id = rafUUID; function callRef(leftTimes) { if (leftTimes === 0) { cleanup(id); callback(); } else { const realId = raf(() => { callRef(leftTimes - 1); }); rafIds.set(id, realId); } } callRef(times); return id; } wrapperRaf.cancel = (id) => { const realId = rafIds.get(id); cleanup(realId); return caf(realId); }; const tuple = function() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return args; }; const withInstall = (comp) => { const c2 = comp; c2.install = function(app) { app.component(c2.displayName || c2.name, comp); }; return comp; }; function eventType() { return { type: [Function, Array] }; } function objectType(defaultVal) { return { type: Object, default: defaultVal }; } function booleanType(defaultVal) { return { type: Boolean, default: defaultVal }; } function functionType(defaultVal) { return { type: Function, default: defaultVal }; } function anyType(defaultVal, required) { const type = { validator: () => true, default: defaultVal }; return required ? type : type; } function arrayType(defaultVal) { return { type: Array, default: defaultVal }; } function stringType(defaultVal) { return { type: String, default: defaultVal }; } function someType(types, defaultVal) { return types ? { type: types, default: defaultVal } : anyType(defaultVal); } let supportsPassive = false; try { const opts = Object.defineProperty({}, "passive", { get() { supportsPassive = true; } }); window.addEventListener("testPassive", null, opts); window.removeEventListener("testPassive", null, opts); } catch (e2) { } const supportsPassive$1 = supportsPassive; function addEventListenerWrap(target, eventType2, cb, option) { if (target && target.addEventListener) { let opt = option; if (opt === void 0 && supportsPassive$1 && (eventType2 === "touchstart" || eventType2 === "touchmove" || eventType2 === "wheel")) { opt = { passive: false }; } target.addEventListener(eventType2, cb, opt); } return { remove: () => { if (target && target.removeEventListener) { target.removeEventListener(eventType2, cb); } } }; } const defaultIconPrefixCls = "anticon"; const GlobalFormContextKey = Symbol("GlobalFormContextKey"); const useProvideGlobalForm = (state) => { vue.provide(GlobalFormContextKey, state); }; const configProviderProps = () => ({ iconPrefixCls: String, getTargetContainer: { type: Function }, getPopupContainer: { type: Function }, prefixCls: String, getPrefixCls: { type: Function }, renderEmpty: { type: Function }, transformCellText: { type: Function }, csp: objectType(), input: objectType(), autoInsertSpaceInButton: { type: Boolean, default: void 0 }, locale: objectType(), pageHeader: objectType(), componentSize: { type: String }, componentDisabled: { type: Boolean, default: void 0 }, direction: { type: String, default: "ltr" }, space: objectType(), virtual: { type: Boolean, default: void 0 }, dropdownMatchSelectWidth: { type: [Number, Boolean], default: true }, form: objectType(), pagination: objectType(), theme: objectType(), select: objectType() }); const configProviderKey = Symbol("configProvider"); const defaultConfigProvider = { getPrefixCls: (suffixCls, customizePrefixCls) => { if (customizePrefixCls) return customizePrefixCls; return suffixCls ? `ant-${suffixCls}` : "ant"; }, iconPrefixCls: vue.computed(() => defaultIconPrefixCls), getPopupContainer: vue.computed(() => () => document.body), direction: vue.computed(() => "ltr") }; const useConfigContextInject = () => { return vue.inject(configProviderKey, defaultConfigProvider); }; const useConfigContextProvider = (props) => { return vue.provide(configProviderKey, props); }; const DisabledContextKey = Symbol("DisabledContextKey"); const useInjectDisabled = () => { return vue.inject(DisabledContextKey, vue.ref(void 0)); }; const useProviderDisabled = (disabled) => { const parentDisabled = useInjectDisabled(); vue.provide(DisabledContextKey, vue.computed(() => { var _a; return (_a = disabled.value) !== null && _a !== void 0 ? _a : parentDisabled.value; })); return disabled; }; const enUS$1 = { // Options.jsx items_per_page: "/ page", jump_to: "Go to", jump_to_confirm: "confirm", page: "", // Pagination.jsx prev_page: "Previous Page", next_page: "Next Page", prev_5: "Previous 5 Pages", next_5: "Next 5 Pages", prev_3: "Previous 3 Pages", next_3: "Next 3 Pages" }; const locale$3 = { locale: "en_US", today: "Today", now: "Now", backToToday: "Back to today", ok: "Ok", clear: "Clear", month: "Month", year: "Year", timeSelect: "select time", dateSelect: "select date", weekSelect: "Choose a week", monthSelect: "Choose a month", yearSelect: "Choose a year", decadeSelect: "Choose a decade", yearFormat: "YYYY", dateFormat: "M/D/YYYY", dayFormat: "D", dateTimeFormat: "M/D/YYYY HH:mm:ss", monthBeforeYear: true, previousMonth: "Previous month (PageUp)", nextMonth: "Next month (PageDown)", previousYear: "Last year (Control + left)", nextYear: "Next year (Control + right)", previousDecade: "Last decade", nextDecade: "Next decade", previousCentury: "Last century", nextCentury: "Next century" }; const CalendarLocale = locale$3; const locale$2 = { placeholder: "Select time", rangePlaceholder: ["Start time", "End time"] }; const TimePicker = locale$2; const locale$1 = { lang: _extends({ placeholder: "Select date", yearPlaceholder: "Select year", quarterPlaceholder: "Select quarter", monthPlaceholder: "Select month", weekPlaceholder: "Select week", rangePlaceholder: ["Start date", "End date"], rangeYearPlaceholder: ["Start year", "End year"], rangeQuarterPlaceholder: ["Start quarter", "End quarter"], rangeMonthPlaceholder: ["Start month", "End month"], rangeWeekPlaceholder: ["Start week", "End week"] }, CalendarLocale), timePickerLocale: _extends({}, TimePicker) }; const enUS = locale$1; const typeTemplate = "${label} is not a valid ${type}"; const localeValues = { locale: "en", Pagination: enUS$1, DatePicker: enUS, TimePicker, Calendar: enUS, global: { placeholder: "Please select" }, Table: { filterTitle: "Filter menu", filterConfirm: "OK", filterReset: "Reset", filterEmptyText: "No filters", filterCheckall: "Select all items", filterSearchPlaceholder: "Search in filters", emptyText: "No data", selectAll: "Select current page", selectInvert: "Invert current page", selectNone: "Clear all data", selectionAll: "Select all data", sortTitle: "Sort", expand: "Expand row", collapse: "Collapse row", triggerDesc: "Click to sort descending", triggerAsc: "Click to sort ascending", cancelSort: "Click to cancel sorting" }, Tour: { Next: "Next", Previous: "Previous", Finish: "Finish" }, Modal: { okText: "OK", cancelText: "Cancel", justOkText: "OK" }, Popconfirm: { okText: "OK", cancelText: "Cancel" }, Transfer: { titles: ["", ""], searchPlaceholder: "Search here", itemUnit: "item", itemsUnit: "items", remove: "Remove", selectCurrent: "Select current page", removeCurrent: "Remove current page", selectAll: "Select all data", removeAll: "Remove all data", selectInvert: "Invert current page" }, Upload: { uploading: "Uploading...", removeFile: "Remove file", uploadError: "Upload error", previewFile: "Preview file", downloadFile: "Download file" }, Empty: { description: "No data" }, Icon: { icon: "icon" }, Text: { edit: "Edit", copy: "Copy", copied: "Copied", expand: "Expand" }, PageHeader: { back: "Back" }, Form: { optional: "(optional)", defaultValidateMessages: { default: "Field validation error for ${label}", required: "Please enter ${label}", enum: "${label} must be one of [${enum}]", whitespace: "${label} cannot be a blank character", date: { format: "${label} date format is invalid", parse: "${label} cannot be converted to a date", invalid: "${label} is an invalid date" }, types: { string: typeTemplate, method: typeTemplate, array: typeTemplate, object: typeTemplate, number: typeTemplate, date: typeTemplate, boolean: typeTemplate, integer: typeTemplate, float: typeTemplate, regexp: typeTemplate, email: typeTemplate, url: typeTemplate, hex: typeTemplate }, string: { len: "${label} must be ${len} characters", min: "${label} must be at least ${min} characters", max: "${label} must be up to ${max} characters", range: "${label} must be between ${min}-${max} characters" }, number: { len: "${label} must be equal to ${len}", min: "${label} must be minimum ${min}", max: "${label} must be maximum ${max}", range: "${label} must be between ${min}-${max}" }, array: { len: "Must be ${len} ${label}", min: "At least ${min} ${label}", max: "At most ${max} ${label}", range: "The amount of ${label} must be between ${min}-${max}" }, pattern: { mismatch: "${label} does not match the pattern ${pattern}" } } }, Image: { preview: "Preview" }, QRCode: { expired: "QR code expired", refresh: "Refresh" } }; const defaultLocale = localeValues; const LocaleReceiver = vue.defineComponent({ compatConfig: { MODE: 3 }, name: "LocaleReceiver", props: { componentName: String, defaultLocale: { type: [Object, Function] }, children: { type: Function } }, setup(props, _ref) { let { slots } = _ref; const localeData = vue.inject("localeData", {}); const locale2 = vue.computed(() => { const { componentName = "global", defaultLocale: defaultLocale$1 } = props; const locale3 = defaultLocale$1 || defaultLocale[componentName || "global"]; const { antLocale } = localeData; const localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return _extends(_extends({}, typeof locale3 === "function" ? locale3() : locale3), localeFromContext || {}); }); const localeCode = vue.computed(() => { const { antLocale } = localeData; const localeCode2 = antLocale && antLocale.locale; if (antLocale && antLocale.exist && !localeCode2) { return defaultLocale.locale; } return localeCode2; }); return () => { const children = props.children || slots.default; const { antLocale } = localeData; return children === null || children === void 0 ? void 0 : children(locale2.value, localeCode.value, antLocale); }; } }); function useLocaleReceiver(componentName, defaultLocale$1, propsLocale) { const localeData = vue.inject("localeData", {}); const componentLocale = vue.computed(() => { const { antLocale } = localeData; const locale2 = vue.unref(defaultLocale$1) || defaultLocale[componentName || "global"]; const localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return _extends(_extends(_extends({}, typeof locale2 === "function" ? locale2() : locale2), localeFromContext || {}), vue.unref(propsLocale) || {}); }); return [componentLocale]; } function murmur2(str) { var h2 = 0; var k2, i2 = 0, len = str.length; for (; len >= 4; ++i2, len -= 4) { k2 = str.charCodeAt(i2) & 255 | (str.charCodeAt(++i2) & 255) << 8 | (str.charCodeAt(++i2) & 255) << 16 | (str.charCodeAt(++i2) & 255) << 24; k2 = /* Math.imul(k, m): */ (k2 & 65535) * 1540483477 + ((k2 >>> 16) * 59797 << 16); k2 ^= /* k >>> r: */ k2 >>> 24; h2 = /* Math.imul(k, m): */ (k2 & 65535) * 1540483477 + ((k2 >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16); } switch (len) { case 3: h2 ^= (str.charCodeAt(i2 + 2) & 255) << 16; case 2: h2 ^= (str.charCodeAt(i2 + 1) & 255) << 8; case 1: h2 ^= str.charCodeAt(i2) & 255; h2 = /* Math.imul(h, m): */ (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16); } h2 ^= h2 >>> 13; h2 = /* Math.imul(h, m): */ (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16); return ((h2 ^ h2 >>> 15) >>> 0).toString(36); } class Entity { constructor() { this.cache = /* @__PURE__ */ new Map(); } get(keys) { return this.cache.get(Array.isArray(keys) ? keys.join("%") : keys) || null; } update(keys, valueFn) { const path = Array.isArray(keys) ? keys.join("%") : keys; const prevValue = this.cache.get(path); const nextValue = valueFn(prevValue); if (nextValue === null) { this.cache.delete(path); } else { this.cache.set(path, nextValue); } } } const CacheEntity = Entity; const ATTR_TOKEN = "data-token-hash"; const ATTR_MARK = "data-css-hash"; const CSS_IN_JS_INSTANCE = "__cssinjs_instance__"; const CSS_IN_JS_INSTANCE_ID = Math.random().toString(12).slice(2); function createCache() { if (typeof document !== "undefined" && document.head && document.body) { const styles = document.body.querySelectorAll(`style[${ATTR_MARK}]`) || []; const { firstChild } = document.head; Array.from(styles).forEach((style2) => { style2[CSS_IN_JS_INSTANCE] = style2[CSS_IN_JS_INSTANCE] || CSS_IN_JS_INSTANCE_ID; document.head.insertBefore(style2, firstChild); }); const styleHash = {}; Array.from(document.querySelectorAll(`style[${ATTR_MARK}]`)).forEach((style2) => { var _a; const hash = style2.getAttribute(ATTR_MARK); if (styleHash[hash]) { if (style2[CSS_IN_JS_INSTANCE] === CSS_IN_JS_INSTANCE_ID) { (_a = style2.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(style2); } } else { styleHash[hash] = true; } }); } return new CacheEntity(); } const StyleContextKey = Symbol("StyleContextKey"); const defaultStyleContext = { cache: createCache(), defaultCache: true, hashPriority: "low" }; const useStyleInject = () => { return vue.inject(StyleContextKey, vue.shallowRef(_extends({}, defaultStyleContext))); }; const useStyleProvider = (props) => { const parentContext = useStyleInject(); const context2 = vue.shallowRef(_extends({}, defaultStyleContext)); vue.watch([() => vue.unref(props), parentContext], () => { const mergedContext = _extends({}, parentContext.value); const propsValue = vue.unref(props); Object.keys(propsValue).forEach((key2) => { const value = propsValue[key2]; if (propsValue[key2] !== void 0) { mergedContext[key2] = value; } }); const { cache } = propsValue; mergedContext.cache = mergedContext.cache || createCache(); mergedContext.defaultCache = !cache && parentContext.value.defaultCache; context2.value = mergedContext; }, { immediate: true }); vue.provide(StyleContextKey, context2); return context2; }; const styleProviderProps = () => ({ autoClear: booleanType(), /** @private Test only. Not work in production. */ mock: stringType(), /** * Only set when you need ssr to extract style on you own. * If not provided, it will auto create