if (typeof Promise !== "undefined" && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor; return this.then( (value) => promise.resolve(callback()).then(() => value), (reason) => promise.resolve(callback()).then(() => { throw reason; }) ); }; } ; if (typeof uni !== "undefined" && uni && uni.requireGlobal) { const global2 = uni.requireGlobal(); ArrayBuffer = global2.ArrayBuffer; Int8Array = global2.Int8Array; Uint8Array = global2.Uint8Array; Uint8ClampedArray = global2.Uint8ClampedArray; Int16Array = global2.Int16Array; Uint16Array = global2.Uint16Array; Int32Array = global2.Int32Array; Uint32Array = global2.Uint32Array; Float32Array = global2.Float32Array; Float64Array = global2.Float64Array; BigInt64Array = global2.BigInt64Array; BigUint64Array = global2.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue) { "use strict"; const ON_SHOW = "onShow"; const ON_LAUNCH = "onLaunch"; const ON_LOAD = "onLoad"; const ON_REACH_BOTTOM = "onReachBottom"; const ON_PULL_DOWN_REFRESH = "onPullDownRefresh"; function requireNativePlugin(name) { return weex.requireModule(name); } function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); } else { console[type].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom) { return typeof component === "string" ? easycom : component; } const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); }; const onShow = /* @__PURE__ */ createHook(ON_SHOW); const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH); const onLoad = /* @__PURE__ */ createHook(ON_LOAD); const onReachBottom = /* @__PURE__ */ createHook(ON_REACH_BOTTOM); const onPullDownRefresh = /* @__PURE__ */ createHook(ON_PULL_DOWN_REFRESH); const _imports_0$7 = "/static/login/logo.png"; const _imports_1$5 = "/static/login/phone.png"; const _imports_2$3 = "/static/login/pwd.png"; const _imports_3 = "/static/login/eye.png"; const _imports_4 = "/static/login/eye-off.png"; const _imports_1$4 = "/static/login/nocheck.png"; const _imports_0$6 = "/static/login/checked.png"; let baseUrl$1 = "https://36.112.48.190/jeecg-boot"; let loading = false; function https(config) { if (loading) return; if (uni.getStorageSync("logintime") && uni.getStorageSync("logintime") + 36e5 <= Date.now()) { loading = true; formatAppLog("log", "at utils/http.js:11", "token超时"); uni.removeStorageSync("logintime"); uni.navigateTo({ url: "/pages/login/login" }); loading = false; return; } config.url = baseUrl$1 + config.url; let token = uni.getStorageSync("token") || ""; config.header = { //返回数据类型 "content-type": "application/json;charset=utf-8", //设置用户访问的token信息 "X-Access-Token": token }; let promise = new Promise(function(resolve, reject) { uni.request(config).then((res) => { wx.hideLoading(); if (res[0]) { uni.showToast({ title: "数据获取失败", icon: "none", duration: 1500 }); resolve(false); } else { let data = res.data; resolve(data); if (loading) return; if (data.code == 500) { uni.showToast({ title: data.message, icon: "none", duration: 1500 }); } if (data.code == 510) { loading = true; uni.showToast({ title: data.message, icon: "none", duration: 1500 }); uni.removeStorageSync("token"); uni.removeStorageSync("user"); uni.removeStorageSync("role"); uni.navigateTo({ url: "/pages/login/login" }); uni.removeStorageSync("logintime"); loading = false; } } }).catch((error) => { uni.hideLoading(); reject(error); }); }); return promise; } function localLoginApi(config) { return https({ url: "/sys/login", method: "post", data: config }); } function queryRoleApi(config) { return https({ url: "/appConnet/app/queryRoleByRoleIds", method: "get", data: config }); } function getUserPermissionApi(config) { return https({ url: "/sys/permission/getUserPermissionByToken", method: "get", data: config }); } function taskListApi(config) { return https({ url: "/act/task/list", method: "get", data: config }); } function taskHistoryListApi(config) { return https({ url: "/act/task/taskHistoryList", method: "get", data: config }); } function myApplyProcessListApi(config) { return https({ url: "/act/task/myApplyProcessList", method: "get", data: config }); } function taskEntrustApi(config) { return https({ url: "/act/task/taskEntrust", method: "put", data: config }); } function getProcessNodeInfoApi(config) { return https({ url: "/process/extActProcessNode/getProcessNodeInfo", method: "get", data: config }); } function getHisProcessNodeInfoApi(config) { return https({ url: "/process/extActProcessNode/getHisProcessNodeInfo", method: "get", data: config }); } function queryMyDeptTreeListApi(config) { return https({ url: "/sys/sysDepart/queryTreeList", method: "get", data: config }); } function queryUserByDepIdApi(config) { return https({ url: "/sys/user/queryUserByDepId", method: "get", data: config }); } function bpmlistApi(config) { return https({ url: "/cxcoagwfb/cxcOaGwfb/bpmlist", method: "get", data: config }); } function gonggaolistApi(config) { return https({ url: "/cxctz/cxcTz/list", method: "get", data: config }); } function zhibanQueryApi(config) { return https({ url: "/zhgl_zbgl/zhglZbglZbb/list", method: "get", data: config }); } function zhibanApi(config) { return https({ url: "/zhgl_zbgl/zhglZbglZbb/homepageList", method: "get", data: config }); } function faguiApi(config) { return https({ url: "/cxcoaflgf/cxcOaFlgf/zslist", method: "get", data: config }); } function cjzhiduApi(config) { return https({ url: "/cxcjyglsjzdgl/cxcJyglSjzdgl/zslist", method: "get", data: config }); } function zhiduApi(config) { return https({ url: "/cxczd/cxcZdgl/list", method: "get", data: config }); } function huiyiDetailApi(config) { return https({ url: "/zhgl_hygl/zhglHyglHyyc/listbymainid", method: "get", data: config }); } function userEditApi(config) { return https({ url: "/sys/user/editApp", method: "PUT", data: config }); } function extActFlowDataApi(config) { return https({ url: "/process/extActFlowData/getProcessInfo", method: "get", data: config }); } function processHistoryListApi(config) { return https({ url: "/act/task/processHistoryList", method: "get", data: config }); } function startMutilProcessApi(config) { return https({ url: "/process/extActProcess/startMutilProcess", method: "post", data: config }); } function processCompleteApi(config) { return https({ url: "/act/task/processComplete", method: "post", data: config }); } function claimApi(config) { return https({ url: "/act/task/claim", method: "put", data: config }); } function callBackProcessApi(config) { return https({ url: "/act/task/callBackProcess", method: "put", data: config }); } function invalidProcessApi(config) { return https({ url: "/act/task/invalidProcess", method: "put", data: config }); } function getCategoryItemsApi(pid) { return https({ url: "/sys/category/findtree", method: "get", data: { pid } }); } function getProcessTaskTransInfoApi(config) { return https({ url: "/act/task/getProcessTaskTransInfo", method: "get", data: config }); } function upDateAppApi(config) { return https({ url: "/sys/common/upDateApp", method: "get", data: config }); } function cxcDapingApi(config) { return https({ url: "/CxcDaping/cxcDaping/list", method: "get", data: config }); } function dbSxxqQueryByIdApi(config) { return https({ url: "/cxcdbxt/dbSxxq/queryById", method: "get", data: config }); } function dbJbxxQueryByIdApi(config) { return https({ url: "/cxcdbxt/dbJbxx/queryById", method: "get", data: config }); } function cxcJurisdictionApi(config) { return https({ url: "/CxcJurisdiction/cxcJurisdiction/queryById", method: "get", data: config }); } var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs$1(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } var base64 = { exports: {} }; /*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */ base64.exports; (function(module, exports) { (function(root) { var freeExports = exports; var freeModule = module && module.exports == freeExports && module; var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal; if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { root = freeGlobal; } var InvalidCharacterError = function(message) { this.message = message; }; InvalidCharacterError.prototype = new Error(); InvalidCharacterError.prototype.name = "InvalidCharacterError"; var error = function(message) { throw new InvalidCharacterError(message); }; var TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g; var decode = function(input) { input = String(input).replace(REGEX_SPACE_CHARACTERS, ""); var length = input.length; if (length % 4 == 0) { input = input.replace(/==?$/, ""); length = input.length; } if (length % 4 == 1 || // http://whatwg.org/C#alphanumeric-ascii-characters /[^+a-zA-Z0-9/]/.test(input)) { error( "Invalid character: the string to be decoded is not correctly encoded." ); } var bitCounter = 0; var bitStorage; var buffer; var output = ""; var position = -1; while (++position < length) { buffer = TABLE.indexOf(input.charAt(position)); bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer; if (bitCounter++ % 4) { output += String.fromCharCode( 255 & bitStorage >> (-2 * bitCounter & 6) ); } } return output; }; var encode = function(input) { input = String(input); if (/[^\0-\xFF]/.test(input)) { error( "The string to be encoded contains characters outside of the Latin1 range." ); } var padding = input.length % 3; var output = ""; var position = -1; var a2; var b2; var c2; var buffer; var length = input.length - padding; while (++position < length) { a2 = input.charCodeAt(position) << 16; b2 = input.charCodeAt(++position) << 8; c2 = input.charCodeAt(++position); buffer = a2 + b2 + c2; output += TABLE.charAt(buffer >> 18 & 63) + TABLE.charAt(buffer >> 12 & 63) + TABLE.charAt(buffer >> 6 & 63) + TABLE.charAt(buffer & 63); } if (padding == 2) { a2 = input.charCodeAt(position) << 8; b2 = input.charCodeAt(++position); buffer = a2 + b2; output += TABLE.charAt(buffer >> 10) + TABLE.charAt(buffer >> 4 & 63) + TABLE.charAt(buffer << 2 & 63) + "="; } else if (padding == 1) { buffer = input.charCodeAt(position); output += TABLE.charAt(buffer >> 2) + TABLE.charAt(buffer << 4 & 63) + "=="; } return output; }; var base642 = { "encode": encode, "decode": decode, "version": "1.0.0" }; if (freeExports && !freeExports.nodeType) { if (freeModule) { freeModule.exports = base642; } else { for (var key in base642) { base642.hasOwnProperty(key) && (freeExports[key] = base642[key]); } } } else { root.base64 = base642; } })(commonjsGlobal); })(base64, base64.exports); var base64Exports = base64.exports; const Base64 = /* @__PURE__ */ getDefaultExportFromCjs$1(base64Exports); var isVue2 = false; function set(target, key, val) { if (Array.isArray(target)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val; } target[key] = val; return val; } function del(target, key) { if (Array.isArray(target)) { target.splice(key, 1); return; } delete target[key]; } function getDevtoolsGlobalHook() { return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget() { return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; } const isProxyAvailable = typeof Proxy === "function"; const HOOK_SETUP = "devtools-plugin:setup"; const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; let supported; let perf; function isPerformanceSupported() { var _a; if (supported !== void 0) { return supported; } if (typeof window !== "undefined" && window.performance) { supported = true; perf = window.performance; } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) { supported = true; perf = global.perf_hooks.performance; } else { supported = false; } return supported; } function now() { return isPerformanceSupported() ? perf.now() : Date.now(); } class ApiProxy { constructor(plugin, hook) { this.target = null; this.targetQueue = []; this.onQueue = []; this.plugin = plugin; this.hook = hook; const defaultSettings = {}; if (plugin.settings) { for (const id in plugin.settings) { const item = plugin.settings[id]; defaultSettings[id] = item.defaultValue; } } const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; let currentSettings = Object.assign({}, defaultSettings); try { const raw = localStorage.getItem(localSettingsSaveId); const data = JSON.parse(raw); Object.assign(currentSettings, data); } catch (e2) { } this.fallbacks = { getSettings() { return currentSettings; }, setSettings(value) { try { localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); } catch (e2) { } currentSettings = value; }, now() { return now(); } }; if (hook) { hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => { if (pluginId === this.plugin.id) { this.fallbacks.setSettings(value); } }); } this.proxiedOn = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target.on[prop]; } else { return (...args) => { this.onQueue.push({ method: prop, args }); }; } } }); this.proxiedTarget = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target[prop]; } else if (prop === "on") { return this.proxiedOn; } else if (Object.keys(this.fallbacks).includes(prop)) { return (...args) => { this.targetQueue.push({ method: prop, args, resolve: () => { } }); return this.fallbacks[prop](...args); }; } else { return (...args) => { return new Promise((resolve) => { this.targetQueue.push({ method: prop, args, resolve }); }); }; } } }); } async setRealTarget(target) { this.target = target; for (const item of this.onQueue) { this.target.on[item.method](...item.args); } for (const item of this.targetQueue) { item.resolve(await this.target[item.method](...item.args)); } } } function setupDevtoolsPlugin(pluginDescriptor, setupFn) { const descriptor = pluginDescriptor; const target = getTarget(); const hook = getDevtoolsGlobalHook(); const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null; const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list.push({ pluginDescriptor: descriptor, setupFn, proxy }); if (proxy) setupFn(proxy.proxiedTarget); } } /*! * pinia v2.1.7 * (c) 2023 Eduardo San Martin Morote * @license MIT */ let activePinia; const setActivePinia = (pinia2) => activePinia = pinia2; const piniaSymbol = Symbol("pinia"); function isPlainObject(o2) { return o2 && typeof o2 === "object" && Object.prototype.toString.call(o2) === "[object Object]" && typeof o2.toJSON !== "function"; } var MutationType; (function(MutationType2) { MutationType2["direct"] = "direct"; MutationType2["patchObject"] = "patch object"; MutationType2["patchFunction"] = "patch function"; })(MutationType || (MutationType = {})); const IS_CLIENT = typeof window !== "undefined"; const USE_DEVTOOLS = IS_CLIENT; const _global = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })(); function bom(blob, { autoBom = false } = {}) { if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { return new Blob([String.fromCharCode(65279), blob], { type: blob.type }); } return blob; } function download(url, name, opts) { const xhr = new XMLHttpRequest(); xhr.open("GET", url); xhr.responseType = "blob"; xhr.onload = function() { saveAs(xhr.response, name, opts); }; xhr.onerror = function() { console.error("could not download file"); }; xhr.send(); } function corsEnabled(url) { const xhr = new XMLHttpRequest(); xhr.open("HEAD", url, false); try { xhr.send(); } catch (e2) { } return xhr.status >= 200 && xhr.status <= 299; } function click(node) { try { node.dispatchEvent(new MouseEvent("click")); } catch (e2) { const evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); node.dispatchEvent(evt); } } const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" }; const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))(); const saveAs = !IS_CLIENT ? () => { } : ( // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : ( // Use msSaveOrOpenBlob as a second approach "msSaveOrOpenBlob" in _navigator ? msSaveAs : ( // Fallback to using FileReader and a popup fileSaverSaveAs ) ) ); function downloadSaveAs(blob, name = "download", opts) { const a2 = document.createElement("a"); a2.download = name; a2.rel = "noopener"; if (typeof blob === "string") { a2.href = blob; if (a2.origin !== location.origin) { if (corsEnabled(a2.href)) { download(blob, name, opts); } else { a2.target = "_blank"; click(a2); } } else { click(a2); } } else { a2.href = URL.createObjectURL(blob); setTimeout(function() { URL.revokeObjectURL(a2.href); }, 4e4); setTimeout(function() { click(a2); }, 0); } } function msSaveAs(blob, name = "download", opts) { if (typeof blob === "string") { if (corsEnabled(blob)) { download(blob, name, opts); } else { const a2 = document.createElement("a"); a2.href = blob; a2.target = "_blank"; setTimeout(function() { click(a2); }); } } else { navigator.msSaveOrOpenBlob(bom(blob, opts), name); } } function fileSaverSaveAs(blob, name, opts, popup) { popup = popup || open("", "_blank"); if (popup) { popup.document.title = popup.document.body.innerText = "downloading..."; } if (typeof blob === "string") return download(blob, name, opts); const force = blob.type === "application/octet-stream"; const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global; const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent); if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") { const reader = new FileReader(); reader.onloadend = function() { let url = reader.result; if (typeof url !== "string") { popup = null; throw new Error("Wrong reader.result type"); } url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;"); if (popup) { popup.location.href = url; } else { location.assign(url); } popup = null; }; reader.readAsDataURL(blob); } else { const url = URL.createObjectURL(blob); if (popup) popup.location.assign(url); else location.href = url; popup = null; setTimeout(function() { URL.revokeObjectURL(url); }, 4e4); } } function toastMessage(message, type) { const piniaMessage = "🍍 " + message; if (typeof __VUE_DEVTOOLS_TOAST__ === "function") { __VUE_DEVTOOLS_TOAST__(piniaMessage, type); } else if (type === "error") { console.error(piniaMessage); } else if (type === "warn") { console.warn(piniaMessage); } else { console.log(piniaMessage); } } function isPinia(o2) { return "_a" in o2 && "install" in o2; } function checkClipboardAccess() { if (!("clipboard" in navigator)) { toastMessage(`Your browser doesn't support the Clipboard API`, "error"); return true; } } function checkNotFocusedError(error) { if (error instanceof Error && error.message.toLowerCase().includes("document is not focused")) { toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"); return true; } return false; } async function actionGlobalCopyState(pinia2) { if (checkClipboardAccess()) return; try { await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value)); toastMessage("Global state copied to clipboard."); } catch (error) { if (checkNotFocusedError(error)) return; toastMessage(`Failed to serialize the state. Check the console for more details.`, "error"); console.error(error); } } async function actionGlobalPasteState(pinia2) { if (checkClipboardAccess()) return; try { loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText())); toastMessage("Global state pasted from clipboard."); } catch (error) { if (checkNotFocusedError(error)) return; toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error"); console.error(error); } } async function actionGlobalSaveState(pinia2) { try { saveAs(new Blob([JSON.stringify(pinia2.state.value)], { type: "text/plain;charset=utf-8" }), "pinia-state.json"); } catch (error) { toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); console.error(error); } } let fileInput; function getFileOpener() { if (!fileInput) { fileInput = document.createElement("input"); fileInput.type = "file"; fileInput.accept = ".json"; } function openFile() { return new Promise((resolve, reject) => { fileInput.onchange = async () => { const files = fileInput.files; if (!files) return resolve(null); const file = files.item(0); if (!file) return resolve(null); return resolve({ text: await file.text(), file }); }; fileInput.oncancel = () => resolve(null); fileInput.onerror = reject; fileInput.click(); }); } return openFile; } async function actionGlobalOpenStateFile(pinia2) { try { const open2 = getFileOpener(); const result = await open2(); if (!result) return; const { text, file } = result; loadStoresState(pinia2, JSON.parse(text)); toastMessage(`Global state imported from "${file.name}".`); } catch (error) { toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error"); console.error(error); } } function loadStoresState(pinia2, state) { for (const key in state) { const storeState = pinia2.state.value[key]; if (storeState) { Object.assign(storeState, state[key]); } else { pinia2.state.value[key] = state[key]; } } } function formatDisplay(display) { return { _custom: { display } }; } const PINIA_ROOT_LABEL = "🍍 Pinia (root)"; const PINIA_ROOT_ID = "_root"; function formatStoreForInspectorTree(store) { return isPinia(store) ? { id: PINIA_ROOT_ID, label: PINIA_ROOT_LABEL } : { id: store.$id, label: store.$id }; } function formatStoreForInspectorState(store) { if (isPinia(store)) { const storeNames = Array.from(store._s.keys()); const storeMap = store._s; const state2 = { state: storeNames.map((storeId) => ({ editable: true, key: storeId, value: store.state.value[storeId] })), getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => { const store2 = storeMap.get(id); return { editable: false, key: id, value: store2._getters.reduce((getters, key) => { getters[key] = store2[key]; return getters; }, {}) }; }) }; return state2; } const state = { state: Object.keys(store.$state).map((key) => ({ editable: true, key, value: store.$state[key] })) }; if (store._getters && store._getters.length) { state.getters = store._getters.map((getterName) => ({ editable: false, key: getterName, value: store[getterName] })); } if (store._customProperties.size) { state.customProperties = Array.from(store._customProperties).map((key) => ({ editable: true, key, value: store[key] })); } return state; } function formatEventData(events) { if (!events) return {}; if (Array.isArray(events)) { return events.reduce((data, event) => { data.keys.push(event.key); data.operations.push(event.type); data.oldValue[event.key] = event.oldValue; data.newValue[event.key] = event.newValue; return data; }, { oldValue: {}, keys: [], operations: [], newValue: {} }); } else { return { operation: formatDisplay(events.type), key: formatDisplay(events.key), oldValue: events.oldValue, newValue: events.newValue }; } } function formatMutationType(type) { switch (type) { case MutationType.direct: return "mutation"; case MutationType.patchFunction: return "$patch"; case MutationType.patchObject: return "$patch"; default: return "unknown"; } } let isTimelineActive = true; const componentStateTypes = []; const MUTATIONS_LAYER_ID = "pinia:mutations"; const INSPECTOR_ID = "pinia"; const { assign: assign$1 } = Object; const getStoreType = (id) => "🍍 " + id; function registerPiniaDevtools(app, pinia2) { setupDevtoolsPlugin({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app }, (api) => { if (typeof api.now !== "function") { toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."); } api.addTimelineLayer({ id: MUTATIONS_LAYER_ID, label: `Pinia 🍍`, color: 15064968 }); api.addInspector({ id: INSPECTOR_ID, label: "Pinia 🍍", icon: "storage", treeFilterPlaceholder: "Search stores", actions: [ { icon: "content_copy", action: () => { actionGlobalCopyState(pinia2); }, tooltip: "Serialize and copy the state" }, { icon: "content_paste", action: async () => { await actionGlobalPasteState(pinia2); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }, tooltip: "Replace the state with the content of your clipboard" }, { icon: "save", action: () => { actionGlobalSaveState(pinia2); }, tooltip: "Save the state as a JSON file" }, { icon: "folder_open", action: async () => { await actionGlobalOpenStateFile(pinia2); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }, tooltip: "Import the state from a JSON file" } ], nodeActions: [ { icon: "restore", tooltip: 'Reset the state (with "$reset")', action: (nodeId) => { const store = pinia2._s.get(nodeId); if (!store) { toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn"); } else if (typeof store.$reset !== "function") { toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn"); } else { store.$reset(); toastMessage(`Store "${nodeId}" reset.`); } } } ] }); api.on.inspectComponent((payload, ctx) => { const proxy = payload.componentInstance && payload.componentInstance.proxy; if (proxy && proxy._pStores) { const piniaStores = payload.componentInstance.proxy._pStores; Object.values(piniaStores).forEach((store) => { payload.instanceData.state.push({ type: getStoreType(store.$id), key: "state", editable: true, value: store._isOptionsAPI ? { _custom: { value: vue.toRaw(store.$state), actions: [ { icon: "restore", tooltip: "Reset the state of this store", action: () => store.$reset() } ] } } : ( // NOTE: workaround to unwrap transferred refs Object.keys(store.$state).reduce((state, key) => { state[key] = store.$state[key]; return state; }, {}) ) }); if (store._getters && store._getters.length) { payload.instanceData.state.push({ type: getStoreType(store.$id), key: "getters", editable: false, value: store._getters.reduce((getters, key) => { try { getters[key] = store[key]; } catch (error) { getters[key] = error; } return getters; }, {}) }); } }); } }); api.on.getInspectorTree((payload) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { let stores = [pinia2]; stores = stores.concat(Array.from(pinia2._s.values())); payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree); } }); api.on.getInspectorState((payload) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId); if (!inspectedStore) { return; } if (inspectedStore) { payload.state = formatStoreForInspectorState(inspectedStore); } } }); api.on.editInspectorState((payload, ctx) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId); if (!inspectedStore) { return toastMessage(`store "${payload.nodeId}" not found`, "error"); } const { path } = payload; if (!isPinia(inspectedStore)) { if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) { path.unshift("$state"); } } else { path.unshift("state"); } isTimelineActive = false; payload.set(inspectedStore, path, payload.state.value); isTimelineActive = true; } }); api.on.editComponentState((payload) => { if (payload.type.startsWith("🍍")) { const storeId = payload.type.replace(/^🍍\s*/, ""); const store = pinia2._s.get(storeId); if (!store) { return toastMessage(`store "${storeId}" not found`, "error"); } const { path } = payload; if (path[0] !== "state") { return toastMessage(`Invalid path for store "${storeId}": ${path} Only state can be modified.`); } path[0] = "$state"; isTimelineActive = false; payload.set(store, path, payload.state.value); isTimelineActive = true; } }); }); } function addStoreToDevtools(app, store) { if (!componentStateTypes.includes(getStoreType(store.$id))) { componentStateTypes.push(getStoreType(store.$id)); } setupDevtoolsPlugin({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app, settings: { logStoreChanges: { label: "Notify about new/deleted stores", type: "boolean", defaultValue: true } // useEmojis: { // label: 'Use emojis in messages ⚡️', // type: 'boolean', // defaultValue: true, // }, } }, (api) => { const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now; store.$onAction(({ after, onError, name, args }) => { const groupId = runningActionId++; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛫 " + name, subtitle: "start", data: { store: formatDisplay(store.$id), action: formatDisplay(name), args }, groupId } }); after((result) => { activeAction = void 0; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛬 " + name, subtitle: "end", data: { store: formatDisplay(store.$id), action: formatDisplay(name), args, result }, groupId } }); }); onError((error) => { activeAction = void 0; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), logType: "error", title: "💥 " + name, subtitle: "end", data: { store: formatDisplay(store.$id), action: formatDisplay(name), args, error }, groupId } }); }); }, true); store._customProperties.forEach((name) => { vue.watch(() => vue.unref(store[name]), (newValue, oldValue) => { api.notifyComponentUpdate(); api.sendInspectorState(INSPECTOR_ID); if (isTimelineActive) { api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "Change", subtitle: name, data: { newValue, oldValue }, groupId: activeAction } }); } }, { deep: true }); }); store.$subscribe(({ events, type }, state) => { api.notifyComponentUpdate(); api.sendInspectorState(INSPECTOR_ID); if (!isTimelineActive) return; const eventData = { time: now2(), title: formatMutationType(type), data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)), groupId: activeAction }; if (type === MutationType.patchFunction) { eventData.subtitle = "⤵️"; } else if (type === MutationType.patchObject) { eventData.subtitle = "🧩"; } else if (events && !Array.isArray(events)) { eventData.subtitle = events.type; } if (events) { eventData.data["rawEvent(s)"] = { _custom: { display: "DebuggerEvent", type: "object", tooltip: "raw DebuggerEvent[]", value: events } }; } api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: eventData }); }, { detached: true, flush: "sync" }); const hotUpdate = store._hotUpdate; store._hotUpdate = vue.markRaw((newStore) => { hotUpdate(newStore); api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🔥 " + store.$id, subtitle: "HMR update", data: { store: formatDisplay(store.$id), info: formatDisplay(`HMR update`) } } }); api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }); const { $dispose } = store; store.$dispose = () => { $dispose(); api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`); }; api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`); }); } let runningActionId = 0; let activeAction; function patchActionForGrouping(store, actionNames, wrapWithProxy) { const actions = actionNames.reduce((storeActions, actionName) => { storeActions[actionName] = vue.toRaw(store)[actionName]; return storeActions; }, {}); for (const actionName in actions) { store[actionName] = function() { const _actionId = runningActionId; const trackedStore = wrapWithProxy ? new Proxy(store, { get(...args) { activeAction = _actionId; return Reflect.get(...args); }, set(...args) { activeAction = _actionId; return Reflect.set(...args); } }) : store; activeAction = _actionId; const retValue = actions[actionName].apply(trackedStore, arguments); activeAction = void 0; return retValue; }; } } function devtoolsPlugin({ app, store, options }) { if (store.$id.startsWith("__hot:")) { return; } store._isOptionsAPI = !!options.state; patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI); const originalHotUpdate = store._hotUpdate; vue.toRaw(store)._hotUpdate = function(newStore) { originalHotUpdate.apply(this, arguments); patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI); }; addStoreToDevtools( app, // FIXME: is there a way to allow the assignment from Store to StoreGeneric? store ); } function createPinia() { const scope = vue.effectScope(true); const state = scope.run(() => vue.ref({})); let _p = []; let toBeInstalled = []; const pinia2 = vue.markRaw({ install(app) { setActivePinia(pinia2); { pinia2._a = app; app.provide(piniaSymbol, pinia2); app.config.globalProperties.$pinia = pinia2; if (USE_DEVTOOLS) { registerPiniaDevtools(app, pinia2); } toBeInstalled.forEach((plugin) => _p.push(plugin)); toBeInstalled = []; } }, use(plugin) { if (!this._a && !isVue2) { toBeInstalled.push(plugin); } else { _p.push(plugin); } return this; }, _p, // it's actually undefined here // @ts-expect-error _a: null, _e: scope, _s: /* @__PURE__ */ new Map(), state }); if (USE_DEVTOOLS && typeof Proxy !== "undefined") { pinia2.use(devtoolsPlugin); } return pinia2; } function patchObject(newState, oldState) { for (const key in oldState) { const subPatch = oldState[key]; if (!(key in newState)) { continue; } const targetValue = newState[key]; if (isPlainObject(targetValue) && isPlainObject(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { newState[key] = patchObject(targetValue, subPatch); } else { { newState[key] = subPatch; } } } return newState; } const noop = () => { }; function addSubscription(subscriptions, callback, detached, onCleanup = noop) { subscriptions.push(callback); const removeSubscription = () => { const idx = subscriptions.indexOf(callback); if (idx > -1) { subscriptions.splice(idx, 1); onCleanup(); } }; if (!detached && vue.getCurrentScope()) { vue.onScopeDispose(removeSubscription); } return removeSubscription; } function triggerSubscriptions(subscriptions, ...args) { subscriptions.slice().forEach((callback) => { callback(...args); }); } const fallbackRunWithContext = (fn) => fn(); function mergeReactiveObjects(target, patchToApply) { if (target instanceof Map && patchToApply instanceof Map) { patchToApply.forEach((value, key) => target.set(key, value)); } if (target instanceof Set && patchToApply instanceof Set) { patchToApply.forEach(target.add, target); } for (const key in patchToApply) { if (!patchToApply.hasOwnProperty(key)) continue; const subPatch = patchToApply[key]; const targetValue = target[key]; if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { target[key] = mergeReactiveObjects(targetValue, subPatch); } else { target[key] = subPatch; } } return target; } const skipHydrateSymbol = Symbol("pinia:skipHydration"); function shouldHydrate(obj) { return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol); } const { assign } = Object; function isComputed(o2) { return !!(vue.isRef(o2) && o2.effect); } function createOptionsStore(id, options, pinia2, hot) { const { state, actions, getters } = options; const initialState = pinia2.state.value[id]; let store; function setup() { if (!initialState && !hot) { { pinia2.state.value[id] = state ? state() : {}; } } const localState = hot ? ( // use ref() to unwrap refs inside state TODO: check if this is still necessary vue.toRefs(vue.ref(state ? state() : {}).value) ) : vue.toRefs(pinia2.state.value[id]); return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => { if (name in localState) { console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`); } computedGetters[name] = vue.markRaw(vue.computed(() => { setActivePinia(pinia2); const store2 = pinia2._s.get(id); return getters[name].call(store2, store2); })); return computedGetters; }, {})); } store = createSetupStore(id, setup, options, pinia2, hot, true); return store; } function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) { let scope; const optionsForPlugin = assign({ actions: {} }, options); if (!pinia2._e.active) { throw new Error("Pinia destroyed"); } const $subscribeOptions = { deep: true // flush: 'post', }; { $subscribeOptions.onTrigger = (event) => { if (isListening) { debuggerEvents = event; } else if (isListening == false && !store._hotUpdating) { if (Array.isArray(debuggerEvents)) { debuggerEvents.push(event); } else { console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."); } } }; } let isListening; let isSyncListening; let subscriptions = []; let actionSubscriptions = []; let debuggerEvents; const initialState = pinia2.state.value[$id]; if (!isOptionsStore && !initialState && !hot) { { pinia2.state.value[$id] = {}; } } const hotState = vue.ref({}); let activeListener; function $patch(partialStateOrMutator) { let subscriptionMutation; isListening = isSyncListening = false; { debuggerEvents = []; } if (typeof partialStateOrMutator === "function") { partialStateOrMutator(pinia2.state.value[$id]); subscriptionMutation = { type: MutationType.patchFunction, storeId: $id, events: debuggerEvents }; } else { mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator); subscriptionMutation = { type: MutationType.patchObject, payload: partialStateOrMutator, storeId: $id, events: debuggerEvents }; } const myListenerId = activeListener = Symbol(); vue.nextTick().then(() => { if (activeListener === myListenerId) { isListening = true; } }); isSyncListening = true; triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]); } const $reset = isOptionsStore ? function $reset2() { const { state } = options; const newState = state ? state() : {}; this.$patch(($state) => { assign($state, newState); }); } : ( /* istanbul ignore next */ () => { throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`); } ); function $dispose() { scope.stop(); subscriptions = []; actionSubscriptions = []; pinia2._s.delete($id); } function wrapAction(name, action) { return function() { setActivePinia(pinia2); const args = Array.from(arguments); const afterCallbackList = []; const onErrorCallbackList = []; function after(callback) { afterCallbackList.push(callback); } function onError(callback) { onErrorCallbackList.push(callback); } triggerSubscriptions(actionSubscriptions, { args, name, store, after, onError }); let ret; try { ret = action.apply(this && this.$id === $id ? this : store, args); } catch (error) { triggerSubscriptions(onErrorCallbackList, error); throw error; } if (ret instanceof Promise) { return ret.then((value) => { triggerSubscriptions(afterCallbackList, value); return value; }).catch((error) => { triggerSubscriptions(onErrorCallbackList, error); return Promise.reject(error); }); } triggerSubscriptions(afterCallbackList, ret); return ret; }; } const _hmrPayload = /* @__PURE__ */ vue.markRaw({ actions: {}, getters: {}, state: [], hotState }); const partialStore = { _p: pinia2, // _s: scope, $id, $onAction: addSubscription.bind(null, actionSubscriptions), $patch, $reset, $subscribe(callback, options2 = {}) { const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher()); const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => { if (options2.flush === "sync" ? isSyncListening : isListening) { callback({ storeId: $id, type: MutationType.direct, events: debuggerEvents }, state); } }, assign({}, $subscribeOptions, options2))); return removeSubscription; }, $dispose }; const store = vue.reactive(assign( { _hmrPayload, _customProperties: vue.markRaw(/* @__PURE__ */ new Set()) // devtools custom properties }, partialStore // must be added later // setupStore )); pinia2._s.set($id, store); const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext; const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup))); for (const key in setupStore) { const prop = setupStore[key]; if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) { if (hot) { set(hotState.value, key, vue.toRef(setupStore, key)); } else if (!isOptionsStore) { if (initialState && shouldHydrate(prop)) { if (vue.isRef(prop)) { prop.value = initialState[key]; } else { mergeReactiveObjects(prop, initialState[key]); } } { pinia2.state.value[$id][key] = prop; } } { _hmrPayload.state.push(key); } } else if (typeof prop === "function") { const actionValue = hot ? prop : wrapAction(key, prop); { setupStore[key] = actionValue; } { _hmrPayload.actions[key] = prop; } optionsForPlugin.actions[key] = prop; } else { if (isComputed(prop)) { _hmrPayload.getters[key] = isOptionsStore ? ( // @ts-expect-error options.getters[key] ) : prop; if (IS_CLIENT) { const getters = setupStore._getters || // @ts-expect-error: same (setupStore._getters = vue.markRaw([])); getters.push(key); } } } } { assign(store, setupStore); assign(vue.toRaw(store), setupStore); } Object.defineProperty(store, "$state", { get: () => hot ? hotState.value : pinia2.state.value[$id], set: (state) => { if (hot) { throw new Error("cannot set hotState"); } $patch(($state) => { assign($state, state); }); } }); { store._hotUpdate = vue.markRaw((newStore) => { store._hotUpdating = true; newStore._hmrPayload.state.forEach((stateKey) => { if (stateKey in store.$state) { const newStateTarget = newStore.$state[stateKey]; const oldStateSource = store.$state[stateKey]; if (typeof newStateTarget === "object" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) { patchObject(newStateTarget, oldStateSource); } else { newStore.$state[stateKey] = oldStateSource; } } set(store, stateKey, vue.toRef(newStore.$state, stateKey)); }); Object.keys(store.$state).forEach((stateKey) => { if (!(stateKey in newStore.$state)) { del(store, stateKey); } }); isListening = false; isSyncListening = false; pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState"); isSyncListening = true; vue.nextTick().then(() => { isListening = true; }); for (const actionName in newStore._hmrPayload.actions) { const action = newStore[actionName]; set(store, actionName, wrapAction(actionName, action)); } for (const getterName in newStore._hmrPayload.getters) { const getter = newStore._hmrPayload.getters[getterName]; const getterValue = isOptionsStore ? ( // special handling of options api vue.computed(() => { setActivePinia(pinia2); return getter.call(store, store); }) ) : getter; set(store, getterName, getterValue); } Object.keys(store._hmrPayload.getters).forEach((key) => { if (!(key in newStore._hmrPayload.getters)) { del(store, key); } }); Object.keys(store._hmrPayload.actions).forEach((key) => { if (!(key in newStore._hmrPayload.actions)) { del(store, key); } }); store._hmrPayload = newStore._hmrPayload; store._getters = newStore._getters; store._hotUpdating = false; }); } if (USE_DEVTOOLS) { const nonEnumerable = { writable: true, configurable: true, // avoid warning on devtools trying to display this property enumerable: false }; ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p2) => { Object.defineProperty(store, p2, assign({ value: store[p2] }, nonEnumerable)); }); } pinia2._p.forEach((extender) => { if (USE_DEVTOOLS) { const extensions = scope.run(() => extender({ store, app: pinia2._a, pinia: pinia2, options: optionsForPlugin })); Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key)); assign(store, extensions); } else { assign(store, scope.run(() => extender({ store, app: pinia2._a, pinia: pinia2, options: optionsForPlugin }))); } }); if (store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) { console.warn(`[🍍]: The "state" must be a plain object. It cannot be state: () => new MyClass() Found in store "${store.$id}".`); } if (initialState && isOptionsStore && options.hydrate) { options.hydrate(store.$state, initialState); } isListening = true; isSyncListening = true; return store; } function defineStore(idOrOptions, setup, setupOptions) { let id; let options; const isSetupStore = typeof setup === "function"; if (typeof idOrOptions === "string") { id = idOrOptions; options = isSetupStore ? setupOptions : setup; } else { options = idOrOptions; id = idOrOptions.id; if (typeof id !== "string") { throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`); } } function useStore2(pinia2, hot) { const hasContext = vue.hasInjectionContext(); pinia2 = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null); if (pinia2) setActivePinia(pinia2); if (!activePinia) { throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. This will fail in production.`); } pinia2 = activePinia; if (!pinia2._s.has(id)) { if (isSetupStore) { createSetupStore(id, setup, options, pinia2); } else { createOptionsStore(id, options, pinia2); } { useStore2._pinia = pinia2; } } const store = pinia2._s.get(id); if (hot) { const hotId = "__hot:" + id; const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true); hot._hotUpdate(newStore); delete pinia2.state.value[hotId]; pinia2._s.delete(hotId); } if (IS_CLIENT) { const currentInstance = vue.getCurrentInstance(); if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement !hot) { const vm = currentInstance.proxy; const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {}; cache[id] = store; } } return store; } useStore2.$id = id; return useStore2; } const useStore = defineStore("user", { state: () => ({ userinfo: uni.getStorageSync("user") && JSON.parse(uni.getStorageSync("user")) || {}, token: uni.getStorageSync("token") || null, role: uni.getStorageSync("role") || null, allowPage: uni.getStorageSync("allowPage") || null, position: uni.getStorageSync("position") || null, positionSwitch: uni.getStorageSync("positionSwitch") || null, wendu: uni.getStorageSync("wendu") || null, wenduIcon: uni.getStorageSync("wenduIcon") || null, isgray: uni.getStorageSync("isgray") || 0 //是否灰化 }), getters: { // uid: (state) => state.userinfo?.id }, actions: { setUserInfo(val) { this.userinfo = val; }, setToken(val) { this.token = val; }, setRole(val) { this.role = val; }, /**设置定位信息*/ setPosition(val) { this.position = val; }, /**设置定位开关*/ setPositionSwitch(val) { this.positionSwitch = val; }, /**设置天气*/ setWeather(wendu, wenduIcon) { this.wendu = wendu; this.wenduIcon = wenduIcon; }, setAllowPage(val) { this.allowPage = val; }, setIsgray(val) { this.isgray = val; } } }); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const _sfc_main$O = { __name: "login", setup(__props) { const store = useStore(); const { proxy } = vue.getCurrentInstance(); const showpwd = vue.ref(false); const savePwd = () => { let localObj = { un: username.value }; if (check.value) { localObj.pw = password.value; } uni.setStorageSync("accountObj", JSON.stringify(localObj)); }; const check = vue.ref(true); const username = vue.ref(""); const password = vue.ref(""); const login = () => { if (!username.value.trim()) return proxy.$toast("请输入账号"); if (!password.value.trim()) return proxy.$toast("请输入密码"); Base64.encode(encodeURIComponent(username.value)); Base64.encode(encodeURIComponent(password.value)); uni.showLoading({ title: "登录中..." }); localLoginApi({ username: username.value, password: password.value, captcha: "app" /*开发环境 end */ }).then((loginres) => { if (loginres.success) { uni.setStorageSync("token", loginres.result.token); store.setToken(loginres.result.token); savePwd(); queryRoleApi({ roles: loginres.result.userInfo.roles }).then((roleres) => { uni.setStorageSync("logintime", Date.now()); uni.setStorageSync("role", roleres); store.setRole(roleres); uni.setStorageSync("user", JSON.stringify(loginres.result.userInfo)); store.setUserInfo(loginres.result.userInfo); loadBadge(); uni.switchTab({ url: "/pages/tab/index" }); }); } }).catch((err) => { formatAppLog("log", "at pages/login/login.vue:142", err); }); }; vue.ref([]); onLoad(() => { if (uni.getStorageSync("accountObj")) { let obj = JSON.parse(uni.getStorageSync("accountObj")); username.value = obj.un ? obj.un : ""; password.value = obj.pw ? obj.pw : ""; } }); const loadBadge = () => { taskListApi().then((res) => { if (res.success) { if (res.result.total > 0) { uni.setTabBarBadge({ index: "1", text: res.result.total // 角标内容 }); } else { uni.removeTabBarBadge({ // 移除角标 index: "1" }); } } }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createElementVNode("view", { class: "logo f-col aic" }, [ vue.createElementVNode("image", { src: _imports_0$7 }) ]), vue.createElementVNode("view", { class: "form f-col aic" }, [ vue.createElementVNode("view", { class: "box f-row aic" }, [ vue.createElementVNode("image", { src: _imports_1$5 }), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => username.value = $event), type: "text", placeholder: "请输入统一身份认证", "placeholder-style": "font-size: 28rpx;color: #999999;" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, username.value] ]) ]), vue.createElementVNode("view", { class: "box f-row aic" }, [ vue.createElementVNode("image", { src: _imports_2$3 }), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => password.value = $event), type: !showpwd.value ? "password" : "text", placeholder: "请输入密码", "placeholder-style": "font-size: 28rpx;color: #999999;" }, null, 8, ["type"]), [ [vue.vModelDynamic, password.value] ]), showpwd.value ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_3, onClick: _cache[2] || (_cache[2] = ($event) => showpwd.value = !showpwd.value) })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_4, onClick: _cache[3] || (_cache[3] = ($event) => showpwd.value = !showpwd.value) })) ]) ]), vue.createElementVNode("view", { class: "pwd f-row aic" }, [ vue.createElementVNode("view", { style: { "display": "inline-block" }, onClick: _cache[4] || (_cache[4] = ($event) => check.value = !check.value) }, [ vue.createElementVNode("view", { class: "f-row aic" }, [ !check.value ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_1$4 })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_0$6 })), vue.createElementVNode("text", null, "记住密码") ]) ]) ]), vue.createElementVNode("view", { class: "login f-col aic" }, [ vue.createElementVNode("view", { onClick: login }, " 登录 ") ]), vue.createElementVNode("view", { class: "login f-col aic" }, [ vue.createElementVNode("text", { style: { "font-size": "10px" } }, "Copyright (c) 2022 天然气产销厂 信息化支持中心"), vue.createElementVNode("text", { style: { "font-size": "10px" } }, "版本号:1.0.3") ]) ], 2 /* CLASS */ ); }; } }; const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-e4e4508d"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/login/login.vue"]]); const fontData = [ { "font_class": "arrow-down", "unicode": "" }, { "font_class": "arrow-left", "unicode": "" }, { "font_class": "arrow-right", "unicode": "" }, { "font_class": "arrow-up", "unicode": "" }, { "font_class": "auth", "unicode": "" }, { "font_class": "auth-filled", "unicode": "" }, { "font_class": "back", "unicode": "" }, { "font_class": "bars", "unicode": "" }, { "font_class": "calendar", "unicode": "" }, { "font_class": "calendar-filled", "unicode": "" }, { "font_class": "camera", "unicode": "" }, { "font_class": "camera-filled", "unicode": "" }, { "font_class": "cart", "unicode": "" }, { "font_class": "cart-filled", "unicode": "" }, { "font_class": "chat", "unicode": "" }, { "font_class": "chat-filled", "unicode": "" }, { "font_class": "chatboxes", "unicode": "" }, { "font_class": "chatboxes-filled", "unicode": "" }, { "font_class": "chatbubble", "unicode": "" }, { "font_class": "chatbubble-filled", "unicode": "" }, { "font_class": "checkbox", "unicode": "" }, { "font_class": "checkbox-filled", "unicode": "" }, { "font_class": "checkmarkempty", "unicode": "" }, { "font_class": "circle", "unicode": "" }, { "font_class": "circle-filled", "unicode": "" }, { "font_class": "clear", "unicode": "" }, { "font_class": "close", "unicode": "" }, { "font_class": "closeempty", "unicode": "" }, { "font_class": "cloud-download", "unicode": "" }, { "font_class": "cloud-download-filled", "unicode": "" }, { "font_class": "cloud-upload", "unicode": "" }, { "font_class": "cloud-upload-filled", "unicode": "" }, { "font_class": "color", "unicode": "" }, { "font_class": "color-filled", "unicode": "" }, { "font_class": "compose", "unicode": "" }, { "font_class": "contact", "unicode": "" }, { "font_class": "contact-filled", "unicode": "" }, { "font_class": "down", "unicode": "" }, { "font_class": "bottom", "unicode": "" }, { "font_class": "download", "unicode": "" }, { "font_class": "download-filled", "unicode": "" }, { "font_class": "email", "unicode": "" }, { "font_class": "email-filled", "unicode": "" }, { "font_class": "eye", "unicode": "" }, { "font_class": "eye-filled", "unicode": "" }, { "font_class": "eye-slash", "unicode": "" }, { "font_class": "eye-slash-filled", "unicode": "" }, { "font_class": "fire", "unicode": "" }, { "font_class": "fire-filled", "unicode": "" }, { "font_class": "flag", "unicode": "" }, { "font_class": "flag-filled", "unicode": "" }, { "font_class": "folder-add", "unicode": "" }, { "font_class": "folder-add-filled", "unicode": "" }, { "font_class": "font", "unicode": "" }, { "font_class": "forward", "unicode": "" }, { "font_class": "gear", "unicode": "" }, { "font_class": "gear-filled", "unicode": "" }, { "font_class": "gift", "unicode": "" }, { "font_class": "gift-filled", "unicode": "" }, { "font_class": "hand-down", "unicode": "" }, { "font_class": "hand-down-filled", "unicode": "" }, { "font_class": "hand-up", "unicode": "" }, { "font_class": "hand-up-filled", "unicode": "" }, { "font_class": "headphones", "unicode": "" }, { "font_class": "heart", "unicode": "" }, { "font_class": "heart-filled", "unicode": "" }, { "font_class": "help", "unicode": "" }, { "font_class": "help-filled", "unicode": "" }, { "font_class": "home", "unicode": "" }, { "font_class": "home-filled", "unicode": "" }, { "font_class": "image", "unicode": "" }, { "font_class": "image-filled", "unicode": "" }, { "font_class": "images", "unicode": "" }, { "font_class": "images-filled", "unicode": "" }, { "font_class": "info", "unicode": "" }, { "font_class": "info-filled", "unicode": "" }, { "font_class": "left", "unicode": "" }, { "font_class": "link", "unicode": "" }, { "font_class": "list", "unicode": "" }, { "font_class": "location", "unicode": "" }, { "font_class": "location-filled", "unicode": "" }, { "font_class": "locked", "unicode": "" }, { "font_class": "locked-filled", "unicode": "" }, { "font_class": "loop", "unicode": "" }, { "font_class": "mail-open", "unicode": "" }, { "font_class": "mail-open-filled", "unicode": "" }, { "font_class": "map", "unicode": "" }, { "font_class": "map-filled", "unicode": "" }, { "font_class": "map-pin", "unicode": "" }, { "font_class": "map-pin-ellipse", "unicode": "" }, { "font_class": "medal", "unicode": "" }, { "font_class": "medal-filled", "unicode": "" }, { "font_class": "mic", "unicode": "" }, { "font_class": "mic-filled", "unicode": "" }, { "font_class": "micoff", "unicode": "" }, { "font_class": "micoff-filled", "unicode": "" }, { "font_class": "minus", "unicode": "" }, { "font_class": "minus-filled", "unicode": "" }, { "font_class": "more", "unicode": "" }, { "font_class": "more-filled", "unicode": "" }, { "font_class": "navigate", "unicode": "" }, { "font_class": "navigate-filled", "unicode": "" }, { "font_class": "notification", "unicode": "" }, { "font_class": "notification-filled", "unicode": "" }, { "font_class": "paperclip", "unicode": "" }, { "font_class": "paperplane", "unicode": "" }, { "font_class": "paperplane-filled", "unicode": "" }, { "font_class": "person", "unicode": "" }, { "font_class": "person-filled", "unicode": "" }, { "font_class": "personadd", "unicode": "" }, { "font_class": "personadd-filled", "unicode": "" }, { "font_class": "personadd-filled-copy", "unicode": "" }, { "font_class": "phone", "unicode": "" }, { "font_class": "phone-filled", "unicode": "" }, { "font_class": "plus", "unicode": "" }, { "font_class": "plus-filled", "unicode": "" }, { "font_class": "plusempty", "unicode": "" }, { "font_class": "pulldown", "unicode": "" }, { "font_class": "pyq", "unicode": "" }, { "font_class": "qq", "unicode": "" }, { "font_class": "redo", "unicode": "" }, { "font_class": "redo-filled", "unicode": "" }, { "font_class": "refresh", "unicode": "" }, { "font_class": "refresh-filled", "unicode": "" }, { "font_class": "refreshempty", "unicode": "" }, { "font_class": "reload", "unicode": "" }, { "font_class": "right", "unicode": "" }, { "font_class": "scan", "unicode": "" }, { "font_class": "search", "unicode": "" }, { "font_class": "settings", "unicode": "" }, { "font_class": "settings-filled", "unicode": "" }, { "font_class": "shop", "unicode": "" }, { "font_class": "shop-filled", "unicode": "" }, { "font_class": "smallcircle", "unicode": "" }, { "font_class": "smallcircle-filled", "unicode": "" }, { "font_class": "sound", "unicode": "" }, { "font_class": "sound-filled", "unicode": "" }, { "font_class": "spinner-cycle", "unicode": "" }, { "font_class": "staff", "unicode": "" }, { "font_class": "staff-filled", "unicode": "" }, { "font_class": "star", "unicode": "" }, { "font_class": "star-filled", "unicode": "" }, { "font_class": "starhalf", "unicode": "" }, { "font_class": "trash", "unicode": "" }, { "font_class": "trash-filled", "unicode": "" }, { "font_class": "tune", "unicode": "" }, { "font_class": "tune-filled", "unicode": "" }, { "font_class": "undo", "unicode": "" }, { "font_class": "undo-filled", "unicode": "" }, { "font_class": "up", "unicode": "" }, { "font_class": "top", "unicode": "" }, { "font_class": "upload", "unicode": "" }, { "font_class": "upload-filled", "unicode": "" }, { "font_class": "videocam", "unicode": "" }, { "font_class": "videocam-filled", "unicode": "" }, { "font_class": "vip", "unicode": "" }, { "font_class": "vip-filled", "unicode": "" }, { "font_class": "wallet", "unicode": "" }, { "font_class": "wallet-filled", "unicode": "" }, { "font_class": "weibo", "unicode": "" }, { "font_class": "weixin", "unicode": "" } ]; const getVal = (val) => { const reg = /^[0-9]*$/g; return typeof val === "number" || reg.test(val) ? val + "px" : val; }; const _sfc_main$N = { name: "UniIcons", emits: ["click"], props: { type: { type: String, default: "" }, color: { type: String, default: "#333333" }, size: { type: [Number, String], default: 16 }, customPrefix: { type: String, default: "" }, fontFamily: { type: String, default: "" } }, data() { return { icons: fontData }; }, computed: { unicode() { let code = this.icons.find((v2) => v2.font_class === this.type); if (code) { return code.unicode; } return ""; }, iconSize() { return getVal(this.size); }, styleObj() { if (this.fontFamily !== "") { return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`; } return `color: ${this.color}; font-size: ${this.iconSize};`; } }, methods: { _onClick() { this.$emit("click"); } } }; function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { style: vue.normalizeStyle($options.styleObj), class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]), onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$d], ["__scopeId", "data-v-d31e1c47"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]); let Calendar$1 = class Calendar { constructor({ selected, startDate, endDate, range } = {}) { this.date = this.getDateObj(/* @__PURE__ */ new Date()); this.selected = selected || []; this.startDate = startDate; this.endDate = endDate; this.range = range; this.cleanMultipleStatus(); this.weeks = {}; this.lastHover = false; } /** * 设置日期 * @param {Object} date */ setDate(date) { const selectDate = this.getDateObj(date); this.getWeeks(selectDate.fullDate); } /** * 清理多选状态 */ cleanMultipleStatus() { this.multipleStatus = { before: "", after: "", data: [] }; } setStartDate(startDate) { this.startDate = startDate; } setEndDate(endDate) { this.endDate = endDate; } getPreMonthObj(date) { date = fixIosDateFormat(date); date = new Date(date); const oldMonth = date.getMonth(); date.setMonth(oldMonth - 1); const newMonth = date.getMonth(); if (oldMonth !== 0 && newMonth - oldMonth === 0) { date.setMonth(newMonth - 1); } return this.getDateObj(date); } getNextMonthObj(date) { date = fixIosDateFormat(date); date = new Date(date); const oldMonth = date.getMonth(); date.setMonth(oldMonth + 1); const newMonth = date.getMonth(); if (newMonth - oldMonth > 1) { date.setMonth(newMonth - 1); } return this.getDateObj(date); } /** * 获取指定格式Date对象 */ getDateObj(date) { date = fixIosDateFormat(date); date = new Date(date); return { fullDate: getDate(date), year: date.getFullYear(), month: addZero(date.getMonth() + 1), date: addZero(date.getDate()), day: date.getDay() }; } /** * 获取上一个月日期集合 */ getPreMonthDays(amount, dateObj) { const result = []; for (let i2 = amount - 1; i2 >= 0; i2--) { const month = dateObj.month - 1; result.push({ date: new Date(dateObj.year, month, -i2).getDate(), month, disable: true }); } return result; } /** * 获取本月日期集合 */ getCurrentMonthDays(amount, dateObj) { const result = []; const fullDate = this.date.fullDate; for (let i2 = 1; i2 <= amount; i2++) { const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i2)}`; const isToday = fullDate === currentDate; const info = this.selected && this.selected.find((item) => { if (this.dateEqual(currentDate, item.date)) { return item; } }); if (this.startDate) { dateCompare(this.startDate, currentDate); } if (this.endDate) { dateCompare(currentDate, this.endDate); } let multiples = this.multipleStatus.data; let multiplesStatus = -1; if (this.range && multiples) { multiplesStatus = multiples.findIndex((item) => { return this.dateEqual(item, currentDate); }); } const checked = multiplesStatus !== -1; result.push({ fullDate: currentDate, year: dateObj.year, date: i2, multiple: this.range ? checked : false, beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after), afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after), month: dateObj.month, disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare( currentDate, this.endDate ), isToday, userChecked: false, extraInfo: info }); } return result; } /** * 获取下一个月日期集合 */ _getNextMonthDays(amount, dateObj) { const result = []; const month = dateObj.month + 1; for (let i2 = 1; i2 <= amount; i2++) { result.push({ date: i2, month, disable: true }); } return result; } /** * 获取当前日期详情 * @param {Object} date */ getInfo(date) { if (!date) { date = /* @__PURE__ */ new Date(); } return this.calendar.find((item) => item.fullDate === this.getDateObj(date).fullDate); } /** * 比较时间是否相等 */ dateEqual(before, after) { before = new Date(fixIosDateFormat(before)); after = new Date(fixIosDateFormat(after)); return before.valueOf() === after.valueOf(); } /** * 比较真实起始日期 */ isLogicBefore(currentDate, before, after) { let logicBefore = before; if (before && after) { logicBefore = dateCompare(before, after) ? before : after; } return this.dateEqual(logicBefore, currentDate); } isLogicAfter(currentDate, before, after) { let logicAfter = after; if (before && after) { logicAfter = dateCompare(before, after) ? after : before; } return this.dateEqual(logicAfter, currentDate); } /** * 获取日期范围内所有日期 * @param {Object} begin * @param {Object} end */ geDateAll(begin, end) { var arr = []; var ab = begin.split("-"); var ae2 = end.split("-"); var db = /* @__PURE__ */ new Date(); db.setFullYear(ab[0], ab[1] - 1, ab[2]); var de2 = /* @__PURE__ */ new Date(); de2.setFullYear(ae2[0], ae2[1] - 1, ae2[2]); var unixDb = db.getTime() - 24 * 60 * 60 * 1e3; var unixDe = de2.getTime() - 24 * 60 * 60 * 1e3; for (var k = unixDb; k <= unixDe; ) { k = k + 24 * 60 * 60 * 1e3; arr.push(this.getDateObj(new Date(parseInt(k))).fullDate); } return arr; } /** * 获取多选状态 */ setMultiple(fullDate) { if (!this.range) return; let { before, after } = this.multipleStatus; if (before && after) { if (!this.lastHover) { this.lastHover = true; return; } this.multipleStatus.before = fullDate; this.multipleStatus.after = ""; this.multipleStatus.data = []; this.multipleStatus.fulldate = ""; this.lastHover = false; } else { if (!before) { this.multipleStatus.before = fullDate; this.multipleStatus.after = void 0; this.lastHover = false; } else { this.multipleStatus.after = fullDate; if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after); } else { this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before); } this.lastHover = true; } } this.getWeeks(fullDate); } /** * 鼠标 hover 更新多选状态 */ setHoverMultiple(fullDate) { if (!this.range || this.lastHover) return; const { before } = this.multipleStatus; if (!before) { this.multipleStatus.before = fullDate; } else { this.multipleStatus.after = fullDate; if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after); } else { this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before); } } this.getWeeks(fullDate); } /** * 更新默认值多选状态 */ setDefaultMultiple(before, after) { this.multipleStatus.before = before; this.multipleStatus.after = after; if (before && after) { if (dateCompare(before, after)) { this.multipleStatus.data = this.geDateAll(before, after); this.getWeeks(after); } else { this.multipleStatus.data = this.geDateAll(after, before); this.getWeeks(before); } } } /** * 获取每周数据 * @param {Object} dateData */ getWeeks(dateData) { const { year, month } = this.getDateObj(dateData); const preMonthDayAmount = new Date(year, month - 1, 1).getDay(); const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData)); const currentMonthDayAmount = new Date(year, month, 0).getDate(); const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData)); const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount; const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData)); const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays]; const weeks = new Array(6); for (let i2 = 0; i2 < calendarDays.length; i2++) { const index = Math.floor(i2 / 7); if (!weeks[index]) { weeks[index] = new Array(7); } weeks[index][i2 % 7] = calendarDays[i2]; } this.calendar = calendarDays; this.weeks = weeks; } }; function getDateTime(date, hideSecond) { return `${getDate(date)} ${getTime$1(date, hideSecond)}`; } function getDate(date) { date = fixIosDateFormat(date); date = new Date(date); const year = date.getFullYear(); const month = date.getMonth() + 1; const day = date.getDate(); return `${year}-${addZero(month)}-${addZero(day)}`; } function getTime$1(date, hideSecond) { date = fixIosDateFormat(date); date = new Date(date); const hour = date.getHours(); const minute = date.getMinutes(); const second = date.getSeconds(); return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`; } function addZero(num) { if (num < 10) { num = `0${num}`; } return num; } function getDefaultSecond(hideSecond) { return hideSecond ? "00:00" : "00:00:00"; } function dateCompare(startDate, endDate) { startDate = new Date(fixIosDateFormat(startDate)); endDate = new Date(fixIosDateFormat(endDate)); return startDate <= endDate; } function checkDate(date) { const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g; return date.match(dateReg); } const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?)?$/; function fixIosDateFormat(value) { if (typeof value === "string" && dateTimeReg.test(value)) { value = value.replace(/-/g, "/"); } return value; } const _sfc_main$M = { props: { weeks: { type: Object, default() { return {}; } }, calendar: { type: Object, default: () => { return {}; } }, selected: { type: Array, default: () => { return []; } }, checkHover: { type: Boolean, default: false } }, methods: { choiceDate(weeks) { this.$emit("change", weeks); }, handleMousemove(weeks) { this.$emit("handleMouse", weeks); } } }; function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-calendar-item__weeks-box", { "uni-calendar-item--disable": $props.weeks.disable, "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple, "uni-calendar-item--multiple": $props.weeks.multiple, "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple }]), onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)), onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks)) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", { "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover), "uni-calendar-item--checked-range-text": $props.checkHover, "uni-calendar-item--before-checked": $props.weeks.beforeMultiple, "uni-calendar-item--multiple": $props.weeks.multiple, "uni-calendar-item--after-checked": $props.weeks.afterMultiple, "uni-calendar-item--disable": $props.weeks.disable }]) }, [ $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "uni-calendar-item__weeks-box-circle" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" }, vue.toDisplayString($props.weeks.date), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday }) }, null, 2 /* CLASS */ ) ], 34 /* CLASS, NEED_HYDRATION */ ); } const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$c], ["__scopeId", "data-v-3c762a01"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]); const isObject = (val) => val !== null && typeof val === "object"; const defaultDelimiters = ["{", "}"]; class BaseFormatter { constructor() { this._caches = /* @__PURE__ */ Object.create(null); } interpolate(message, values, delimiters = defaultDelimiters) { if (!values) { return [message]; } let tokens = this._caches[message]; if (!tokens) { tokens = parse(message, delimiters); this._caches[message] = tokens; } return compile(tokens, values); } } const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; function parse(format, [startDelimiter, endDelimiter]) { const tokens = []; let position = 0; let text = ""; while (position < format.length) { let char = format[position++]; if (char === startDelimiter) { if (text) { tokens.push({ type: "text", value: text }); } text = ""; let sub = ""; char = format[position++]; while (char !== void 0 && char !== endDelimiter) { sub += char; char = format[position++]; } const isClosed = char === endDelimiter; const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown"; tokens.push({ value: sub, type }); } else { text += char; } } text && tokens.push({ type: "text", value: text }); return tokens; } function compile(tokens, values) { const compiled = []; let index = 0; const mode = Array.isArray(values) ? "list" : isObject(values) ? "named" : "unknown"; if (mode === "unknown") { return compiled; } while (index < tokens.length) { const token = tokens[index]; switch (token.type) { case "text": compiled.push(token.value); break; case "list": compiled.push(values[parseInt(token.value, 10)]); break; case "named": if (mode === "named") { compiled.push(values[token.value]); } else { { console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`); } } break; case "unknown": { console.warn(`Detect 'unknown' type of token!`); } break; } index++; } return compiled; } const LOCALE_ZH_HANS = "zh-Hans"; const LOCALE_ZH_HANT = "zh-Hant"; const LOCALE_EN = "en"; const LOCALE_FR = "fr"; const LOCALE_ES = "es"; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const defaultFormatter = new BaseFormatter(); function include(str, parts) { return !!parts.find((part) => str.indexOf(part) !== -1); } function startsWith(str, parts) { return parts.find((part) => str.indexOf(part) === 0); } function normalizeLocale(locale, messages2) { if (!locale) { return; } locale = locale.trim().replace(/_/g, "-"); if (messages2 && messages2[locale]) { return locale; } locale = locale.toLowerCase(); if (locale === "chinese") { return LOCALE_ZH_HANS; } if (locale.indexOf("zh") === 0) { if (locale.indexOf("-hans") > -1) { return LOCALE_ZH_HANS; } if (locale.indexOf("-hant") > -1) { return LOCALE_ZH_HANT; } if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) { return LOCALE_ZH_HANT; } return LOCALE_ZH_HANS; } let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES]; if (messages2 && Object.keys(messages2).length > 0) { locales = Object.keys(messages2); } const lang = startsWith(locale, locales); if (lang) { return lang; } } class I18n { constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) { this.locale = LOCALE_EN; this.fallbackLocale = LOCALE_EN; this.message = {}; this.messages = {}; this.watchers = []; if (fallbackLocale) { this.fallbackLocale = fallbackLocale; } this.formater = formater2 || defaultFormatter; this.messages = messages2 || {}; this.setLocale(locale || LOCALE_EN); if (watcher) { this.watchLocale(watcher); } } setLocale(locale) { const oldLocale = this.locale; this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; if (!this.messages[this.locale]) { this.messages[this.locale] = {}; } this.message = this.messages[this.locale]; if (oldLocale !== this.locale) { this.watchers.forEach((watcher) => { watcher(this.locale, oldLocale); }); } } getLocale() { return this.locale; } watchLocale(fn) { const index = this.watchers.push(fn) - 1; return () => { this.watchers.splice(index, 1); }; } add(locale, message, override = true) { const curMessages = this.messages[locale]; if (curMessages) { if (override) { Object.assign(curMessages, message); } else { Object.keys(message).forEach((key) => { if (!hasOwn(curMessages, key)) { curMessages[key] = message[key]; } }); } } else { this.messages[locale] = message; } } f(message, values, delimiters) { return this.formater.interpolate(message, values, delimiters).join(""); } t(key, locale, values) { let message = this.message; if (typeof locale === "string") { locale = normalizeLocale(locale, this.messages); locale && (message = this.messages[locale]); } else { values = locale; } if (!hasOwn(message, key)) { console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`); return key; } return this.formater.interpolate(message[key], values).join(""); } } function watchAppLocale(appVm, i18n) { if (appVm.$watchLocale) { appVm.$watchLocale((newLocale) => { i18n.setLocale(newLocale); }); } else { appVm.$watch(() => appVm.$locale, (newLocale) => { i18n.setLocale(newLocale); }); } } function getDefaultLocale() { if (typeof uni !== "undefined" && uni.getLocale) { return uni.getLocale(); } if (typeof global !== "undefined" && global.getLocale) { return global.getLocale(); } return LOCALE_EN; } function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) { if (typeof locale !== "string") { const options = [ messages2, locale ]; locale = options[0]; messages2 = options[1]; } if (typeof locale !== "string") { locale = getDefaultLocale(); } if (typeof fallbackLocale !== "string") { fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN; } const i18n = new I18n({ locale, fallbackLocale, messages: messages2, watcher }); let t2 = (key, values) => { if (typeof getApp !== "function") { t2 = function(key2, values2) { return i18n.t(key2, values2); }; } else { let isWatchedAppLocale = false; t2 = function(key2, values2) { const appVm = getApp().$vm; if (appVm) { appVm.$locale; if (!isWatchedAppLocale) { isWatchedAppLocale = true; watchAppLocale(appVm, i18n); } } return i18n.t(key2, values2); }; } return t2(key, values); }; return { i18n, f(message, values, delimiters) { return i18n.f(message, values, delimiters); }, t(key, values) { return t2(key, values); }, add(locale2, message, override = true) { return i18n.add(locale2, message, override); }, watch(fn) { return i18n.watchLocale(fn); }, getLocale() { return i18n.getLocale(); }, setLocale(newLocale) { return i18n.setLocale(newLocale); } }; } const en$1 = { "uni-datetime-picker.selectDate": "select date", "uni-datetime-picker.selectTime": "select time", "uni-datetime-picker.selectDateTime": "select date and time", "uni-datetime-picker.startDate": "start date", "uni-datetime-picker.endDate": "end date", "uni-datetime-picker.startTime": "start time", "uni-datetime-picker.endTime": "end time", "uni-datetime-picker.ok": "ok", "uni-datetime-picker.clear": "clear", "uni-datetime-picker.cancel": "cancel", "uni-datetime-picker.year": "-", "uni-datetime-picker.month": "", "uni-calender.MON": "MON", "uni-calender.TUE": "TUE", "uni-calender.WED": "WED", "uni-calender.THU": "THU", "uni-calender.FRI": "FRI", "uni-calender.SAT": "SAT", "uni-calender.SUN": "SUN", "uni-calender.confirm": "confirm" }; const zhHans$1 = { "uni-datetime-picker.selectDate": "选择日期", "uni-datetime-picker.selectTime": "选择时间", "uni-datetime-picker.selectDateTime": "选择日期时间", "uni-datetime-picker.startDate": "开始日期", "uni-datetime-picker.endDate": "结束日期", "uni-datetime-picker.startTime": "开始时间", "uni-datetime-picker.endTime": "结束时间", "uni-datetime-picker.ok": "确定", "uni-datetime-picker.clear": "清除", "uni-datetime-picker.cancel": "取消", "uni-datetime-picker.year": "年", "uni-datetime-picker.month": "月", "uni-calender.SUN": "日", "uni-calender.MON": "一", "uni-calender.TUE": "二", "uni-calender.WED": "三", "uni-calender.THU": "四", "uni-calender.FRI": "五", "uni-calender.SAT": "六", "uni-calender.confirm": "确认" }; const zhHant$1 = { "uni-datetime-picker.selectDate": "選擇日期", "uni-datetime-picker.selectTime": "選擇時間", "uni-datetime-picker.selectDateTime": "選擇日期時間", "uni-datetime-picker.startDate": "開始日期", "uni-datetime-picker.endDate": "結束日期", "uni-datetime-picker.startTime": "開始时间", "uni-datetime-picker.endTime": "結束时间", "uni-datetime-picker.ok": "確定", "uni-datetime-picker.clear": "清除", "uni-datetime-picker.cancel": "取消", "uni-datetime-picker.year": "年", "uni-datetime-picker.month": "月", "uni-calender.SUN": "日", "uni-calender.MON": "一", "uni-calender.TUE": "二", "uni-calender.WED": "三", "uni-calender.THU": "四", "uni-calender.FRI": "五", "uni-calender.SAT": "六", "uni-calender.confirm": "確認" }; const i18nMessages = { en: en$1, "zh-Hans": zhHans$1, "zh-Hant": zhHant$1 }; const { t: t$3 } = initVueI18n(i18nMessages); const _sfc_main$L = { name: "UniDatetimePicker", data() { return { indicatorStyle: `height: 50px;`, visible: false, fixNvueBug: {}, dateShow: true, timeShow: true, title: "日期和时间", // 输入框当前时间 time: "", // 当前的年月日时分秒 year: 1920, month: 0, day: 0, hour: 0, minute: 0, second: 0, // 起始时间 startYear: 1920, startMonth: 1, startDay: 1, startHour: 0, startMinute: 0, startSecond: 0, // 结束时间 endYear: 2120, endMonth: 12, endDay: 31, endHour: 23, endMinute: 59, endSecond: 59 }; }, options: { virtualHost: true }, props: { type: { type: String, default: "datetime" }, value: { type: [String, Number], default: "" }, modelValue: { type: [String, Number], default: "" }, start: { type: [Number, String], default: "" }, end: { type: [Number, String], default: "" }, returnType: { type: String, default: "string" }, disabled: { type: [Boolean, String], default: false }, border: { type: [Boolean, String], default: true }, hideSecond: { type: [Boolean, String], default: false } }, watch: { modelValue: { handler(newVal) { if (newVal) { this.parseValue(fixIosDateFormat(newVal)); this.initTime(false); } else { this.time = ""; this.parseValue(Date.now()); } }, immediate: true }, type: { handler(newValue) { if (newValue === "date") { this.dateShow = true; this.timeShow = false; this.title = "日期"; } else if (newValue === "time") { this.dateShow = false; this.timeShow = true; this.title = "时间"; } else { this.dateShow = true; this.timeShow = true; this.title = "日期和时间"; } }, immediate: true }, start: { handler(newVal) { this.parseDatetimeRange(fixIosDateFormat(newVal), "start"); }, immediate: true }, end: { handler(newVal) { this.parseDatetimeRange(fixIosDateFormat(newVal), "end"); }, immediate: true }, // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项 months(newVal) { this.checkValue("month", this.month, newVal); }, days(newVal) { this.checkValue("day", this.day, newVal); }, hours(newVal) { this.checkValue("hour", this.hour, newVal); }, minutes(newVal) { this.checkValue("minute", this.minute, newVal); }, seconds(newVal) { this.checkValue("second", this.second, newVal); } }, computed: { // 当前年、月、日、时、分、秒选择范围 years() { return this.getCurrentRange("year"); }, months() { return this.getCurrentRange("month"); }, days() { return this.getCurrentRange("day"); }, hours() { return this.getCurrentRange("hour"); }, minutes() { return this.getCurrentRange("minute"); }, seconds() { return this.getCurrentRange("second"); }, // picker 当前值数组 ymd() { return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay]; }, hms() { return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond]; }, // 当前 date 是 start currentDateIsStart() { return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay; }, // 当前 date 是 end currentDateIsEnd() { return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay; }, // 当前年、月、日、时、分、秒的最小值和最大值 minYear() { return this.startYear; }, maxYear() { return this.endYear; }, minMonth() { if (this.year === this.startYear) { return this.startMonth; } else { return 1; } }, maxMonth() { if (this.year === this.endYear) { return this.endMonth; } else { return 12; } }, minDay() { if (this.year === this.startYear && this.month === this.startMonth) { return this.startDay; } else { return 1; } }, maxDay() { if (this.year === this.endYear && this.month === this.endMonth) { return this.endDay; } else { return this.daysInMonth(this.year, this.month); } }, minHour() { if (this.type === "datetime") { if (this.currentDateIsStart) { return this.startHour; } else { return 0; } } if (this.type === "time") { return this.startHour; } }, maxHour() { if (this.type === "datetime") { if (this.currentDateIsEnd) { return this.endHour; } else { return 23; } } if (this.type === "time") { return this.endHour; } }, minMinute() { if (this.type === "datetime") { if (this.currentDateIsStart && this.hour === this.startHour) { return this.startMinute; } else { return 0; } } if (this.type === "time") { if (this.hour === this.startHour) { return this.startMinute; } else { return 0; } } }, maxMinute() { if (this.type === "datetime") { if (this.currentDateIsEnd && this.hour === this.endHour) { return this.endMinute; } else { return 59; } } if (this.type === "time") { if (this.hour === this.endHour) { return this.endMinute; } else { return 59; } } }, minSecond() { if (this.type === "datetime") { if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) { return this.startSecond; } else { return 0; } } if (this.type === "time") { if (this.hour === this.startHour && this.minute === this.startMinute) { return this.startSecond; } else { return 0; } } }, maxSecond() { if (this.type === "datetime") { if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) { return this.endSecond; } else { return 59; } } if (this.type === "time") { if (this.hour === this.endHour && this.minute === this.endMinute) { return this.endSecond; } else { return 59; } } }, /** * for i18n */ selectTimeText() { return t$3("uni-datetime-picker.selectTime"); }, okText() { return t$3("uni-datetime-picker.ok"); }, clearText() { return t$3("uni-datetime-picker.clear"); }, cancelText() { return t$3("uni-datetime-picker.cancel"); } }, mounted() { }, methods: { /** * @param {Object} item * 小于 10 在前面加个 0 */ lessThanTen(item) { return item < 10 ? "0" + item : item; }, /** * 解析时分秒字符串,例如:00:00:00 * @param {String} timeString */ parseTimeType(timeString) { if (timeString) { let timeArr = timeString.split(":"); this.hour = Number(timeArr[0]); this.minute = Number(timeArr[1]); this.second = Number(timeArr[2]); } }, /** * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000 * @param {String | Number} datetime */ initPickerValue(datetime) { let defaultValue = null; if (datetime) { defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end); } else { defaultValue = Date.now(); defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end); } this.parseValue(defaultValue); }, /** * 初始值规则: * - 用户设置初始值 value * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end * - 无起始终止时间,则初始值为 value * - 无初始值 value,则初始值为当前本地时间 Date.now() * @param {Object} value * @param {Object} dateBase */ compareValueWithStartAndEnd(value, start, end) { let winner = null; value = this.superTimeStamp(value); start = this.superTimeStamp(start); end = this.superTimeStamp(end); if (start && end) { if (value < start) { winner = new Date(start); } else if (value > end) { winner = new Date(end); } else { winner = new Date(value); } } else if (start && !end) { winner = start <= value ? new Date(value) : new Date(start); } else if (!start && end) { winner = value <= end ? new Date(value) : new Date(end); } else { winner = new Date(value); } return winner; }, /** * 转换为可比较的时间戳,接受日期、时分秒、时间戳 * @param {Object} value */ superTimeStamp(value) { let dateBase = ""; if (this.type === "time" && value && typeof value === "string") { const now2 = /* @__PURE__ */ new Date(); const year = now2.getFullYear(); const month = now2.getMonth() + 1; const day = now2.getDate(); dateBase = year + "/" + month + "/" + day + " "; } if (Number(value)) { value = parseInt(value); dateBase = 0; } return this.createTimeStamp(dateBase + value); }, /** * 解析默认值 value,字符串、时间戳 * @param {Object} defaultTime */ parseValue(value) { if (!value) { return; } if (this.type === "time" && typeof value === "string") { this.parseTimeType(value); } else { let defaultDate = null; defaultDate = new Date(value); if (this.type !== "time") { this.year = defaultDate.getFullYear(); this.month = defaultDate.getMonth() + 1; this.day = defaultDate.getDate(); } if (this.type !== "date") { this.hour = defaultDate.getHours(); this.minute = defaultDate.getMinutes(); this.second = defaultDate.getSeconds(); } } if (this.hideSecond) { this.second = 0; } }, /** * 解析可选择时间范围 start、end,年月日字符串、时间戳 * @param {Object} defaultTime */ parseDatetimeRange(point, pointType) { if (!point) { if (pointType === "start") { this.startYear = 1920; this.startMonth = 1; this.startDay = 1; this.startHour = 0; this.startMinute = 0; this.startSecond = 0; } if (pointType === "end") { this.endYear = 2120; this.endMonth = 12; this.endDay = 31; this.endHour = 23; this.endMinute = 59; this.endSecond = 59; } return; } if (this.type === "time") { const pointArr = point.split(":"); this[pointType + "Hour"] = Number(pointArr[0]); this[pointType + "Minute"] = Number(pointArr[1]); this[pointType + "Second"] = Number(pointArr[2]); } else { if (!point) { pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60; return; } if (Number(point)) { point = parseInt(point); } const hasTime = /[0-9]:[0-9]/; if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test( point )) { point = point + " 23:59:59"; } const pointDate = new Date(point); this[pointType + "Year"] = pointDate.getFullYear(); this[pointType + "Month"] = pointDate.getMonth() + 1; this[pointType + "Day"] = pointDate.getDate(); if (this.type === "datetime") { this[pointType + "Hour"] = pointDate.getHours(); this[pointType + "Minute"] = pointDate.getMinutes(); this[pointType + "Second"] = pointDate.getSeconds(); } } }, // 获取 年、月、日、时、分、秒 当前可选范围 getCurrentRange(value) { const range = []; for (let i2 = this["min" + this.capitalize(value)]; i2 <= this["max" + this.capitalize(value)]; i2++) { range.push(i2); } return range; }, // 字符串首字母大写 capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); }, // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项 checkValue(name, value, values) { if (values.indexOf(value) === -1) { this[name] = values[0]; } }, // 每个月的实际天数 daysInMonth(year, month) { return new Date(year, month, 0).getDate(); }, /** * 生成时间戳 * @param {Object} time */ createTimeStamp(time) { if (!time) return; if (typeof time === "number") { return time; } else { time = time.replace(/-/g, "/"); if (this.type === "date") { time = time + " 00:00:00"; } return Date.parse(time); } }, /** * 生成日期或时间的字符串 */ createDomSting() { const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day); let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute); if (!this.hideSecond) { hhmmss = hhmmss + ":" + this.lessThanTen(this.second); } if (this.type === "date") { return yymmdd; } else if (this.type === "time") { return hhmmss; } else { return yymmdd + " " + hhmmss; } }, /** * 初始化返回值,并抛出 change 事件 */ initTime(emit = true) { this.time = this.createDomSting(); if (!emit) return; if (this.returnType === "timestamp" && this.type !== "time") { this.$emit("change", this.createTimeStamp(this.time)); this.$emit("input", this.createTimeStamp(this.time)); this.$emit("update:modelValue", this.createTimeStamp(this.time)); } else { this.$emit("change", this.time); this.$emit("input", this.time); this.$emit("update:modelValue", this.time); } }, /** * 用户选择日期或时间更新 data * @param {Object} e */ bindDateChange(e2) { const val = e2.detail.value; this.year = this.years[val[0]]; this.month = this.months[val[1]]; this.day = this.days[val[2]]; }, bindTimeChange(e2) { const val = e2.detail.value; this.hour = this.hours[val[0]]; this.minute = this.minutes[val[1]]; this.second = this.seconds[val[2]]; }, /** * 初始化弹出层 */ initTimePicker() { if (this.disabled) return; const value = fixIosDateFormat(this.time); this.initPickerValue(value); this.visible = !this.visible; }, /** * 触发或关闭弹框 */ tiggerTimePicker(e2) { this.visible = !this.visible; }, /** * 用户点击“清空”按钮,清空当前值 */ clearTime() { this.time = ""; this.$emit("change", this.time); this.$emit("input", this.time); this.$emit("update:modelValue", this.time); this.tiggerTimePicker(); }, /** * 用户点击“确定”按钮 */ setTime() { this.initTime(); this.tiggerTimePicker(); } } }; function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [ vue.createElementVNode("view", { onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }]) }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-text" }, vue.toDisplayString($data.time), 1 /* TEXT */ ), !$data.time ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-datetime-picker-time" }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-text" }, vue.toDisplayString($options.selectTimeText), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ) ], true) ]), $data.visible ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, id: "mask", class: "uni-datetime-picker-mask", onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args)) })) : vue.createCommentVNode("v-if", true), $data.visible ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]), style: vue.normalizeStyle($data.fixNvueBug) }, [ vue.createElementVNode("view", { class: "uni-title" }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-text" }, vue.toDisplayString($options.selectTimeText), 1 /* TEXT */ ) ]), $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-datetime-picker__container-box" }, [ vue.createElementVNode("picker-view", { class: "uni-datetime-picker-view", "indicator-style": $data.indicatorStyle, value: $options.ymd, onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args)) }, [ vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.years, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-item" }, vue.toDisplayString($options.lessThanTen(item)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.months, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-item" }, vue.toDisplayString($options.lessThanTen(item)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.days, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-item" }, vue.toDisplayString($options.lessThanTen(item)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 40, ["indicator-style", "value"]), vue.createCommentVNode(" 兼容 nvue 不支持伪类 "), vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"), vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-") ])) : vue.createCommentVNode("v-if", true), $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-datetime-picker__container-box" }, [ vue.createElementVNode("picker-view", { class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]), "indicator-style": $data.indicatorStyle, value: $options.hms, onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args)) }, [ vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.hours, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-item" }, vue.toDisplayString($options.lessThanTen(item)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.minutes, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-item" }, vue.toDisplayString($options.lessThanTen(item)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.seconds, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-item" }, vue.toDisplayString($options.lessThanTen(item)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 42, ["indicator-style", "value"]), vue.createCommentVNode(" 兼容 nvue 不支持伪类 "), vue.createElementVNode( "text", { class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]]) }, ":", 2 /* CLASS */ ), !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "uni-datetime-picker-sign sign-right" }, ":")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [ vue.createElementVNode("view", { onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args)) }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-btn-text" }, vue.toDisplayString($options.clearText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [ vue.createElementVNode("view", { class: "uni-datetime-picker-cancel", onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args)) }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-btn-text" }, vue.toDisplayString($options.cancelText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args)) }, [ vue.createElementVNode( "text", { class: "uni-datetime-picker-btn-text" }, vue.toDisplayString($options.okText), 1 /* TEXT */ ) ]) ]) ]) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$b], ["__scopeId", "data-v-1d532b70"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]); const { t: t$2 } = initVueI18n(i18nMessages); const _sfc_main$K = { components: { calendarItem, timePicker: TimePicker }, options: { virtualHost: true }, props: { date: { type: String, default: "" }, defTime: { type: [String, Object], default: "" }, selectableTimes: { type: [Object], default() { return {}; } }, selected: { type: Array, default() { return []; } }, startDate: { type: String, default: "" }, endDate: { type: String, default: "" }, startPlaceholder: { type: String, default: "" }, endPlaceholder: { type: String, default: "" }, range: { type: Boolean, default: false }, hasTime: { type: Boolean, default: false }, insert: { type: Boolean, default: true }, showMonth: { type: Boolean, default: true }, clearDate: { type: Boolean, default: true }, checkHover: { type: Boolean, default: true }, hideSecond: { type: [Boolean], default: false }, pleStatus: { type: Object, default() { return { before: "", after: "", data: [], fulldate: "" }; } }, defaultValue: { type: [String, Object, Array], default: "" } }, data() { return { show: false, weeks: [], calendar: {}, nowDate: {}, aniMaskShow: false, firstEnter: true, time: "", timeRange: { startTime: "", endTime: "" }, tempSingleDate: "", tempRange: { before: "", after: "" } }; }, watch: { date: { immediate: true, handler(newVal) { if (!this.range) { this.tempSingleDate = newVal; setTimeout(() => { this.init(newVal); }, 100); } } }, defTime: { immediate: true, handler(newVal) { if (!this.range) { this.time = newVal; } else { this.timeRange.startTime = newVal.start; this.timeRange.endTime = newVal.end; } } }, startDate(val) { if (!this.cale) { return; } this.cale.setStartDate(val); this.cale.setDate(this.nowDate.fullDate); this.weeks = this.cale.weeks; }, endDate(val) { if (!this.cale) { return; } this.cale.setEndDate(val); this.cale.setDate(this.nowDate.fullDate); this.weeks = this.cale.weeks; }, selected(newVal) { if (!this.cale) { return; } this.cale.setSelectInfo(this.nowDate.fullDate, newVal); this.weeks = this.cale.weeks; }, pleStatus: { immediate: true, handler(newVal) { const { before, after, fulldate, which } = newVal; this.tempRange.before = before; this.tempRange.after = after; setTimeout(() => { if (fulldate) { this.cale.setHoverMultiple(fulldate); if (before && after) { this.cale.lastHover = true; if (this.rangeWithinMonth(after, before)) return; this.setDate(before); } else { this.cale.setMultiple(fulldate); this.setDate(this.nowDate.fullDate); this.calendar.fullDate = ""; this.cale.lastHover = false; } } else { if (!this.cale) { return; } this.cale.setDefaultMultiple(before, after); if (which === "left" && before) { this.setDate(before); this.weeks = this.cale.weeks; } else if (after) { this.setDate(after); this.weeks = this.cale.weeks; } this.cale.lastHover = true; } }, 16); } } }, computed: { timepickerStartTime() { const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate; return activeDate === this.startDate ? this.selectableTimes.start : ""; }, timepickerEndTime() { const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate; return activeDate === this.endDate ? this.selectableTimes.end : ""; }, /** * for i18n */ selectDateText() { return t$2("uni-datetime-picker.selectDate"); }, startDateText() { return this.startPlaceholder || t$2("uni-datetime-picker.startDate"); }, endDateText() { return this.endPlaceholder || t$2("uni-datetime-picker.endDate"); }, okText() { return t$2("uni-datetime-picker.ok"); }, yearText() { return t$2("uni-datetime-picker.year"); }, monthText() { return t$2("uni-datetime-picker.month"); }, MONText() { return t$2("uni-calender.MON"); }, TUEText() { return t$2("uni-calender.TUE"); }, WEDText() { return t$2("uni-calender.WED"); }, THUText() { return t$2("uni-calender.THU"); }, FRIText() { return t$2("uni-calender.FRI"); }, SATText() { return t$2("uni-calender.SAT"); }, SUNText() { return t$2("uni-calender.SUN"); }, confirmText() { return t$2("uni-calender.confirm"); } }, created() { this.cale = new Calendar$1({ selected: this.selected, startDate: this.startDate, endDate: this.endDate, range: this.range }); this.init(this.date); }, methods: { leaveCale() { this.firstEnter = true; }, handleMouse(weeks) { if (weeks.disable) return; if (this.cale.lastHover) return; let { before, after } = this.cale.multipleStatus; if (!before) return; this.calendar = weeks; this.cale.setHoverMultiple(this.calendar.fullDate); this.weeks = this.cale.weeks; if (this.firstEnter) { this.$emit("firstEnterCale", this.cale.multipleStatus); this.firstEnter = false; } }, rangeWithinMonth(A2, B2) { const [yearA, monthA] = A2.split("-"); const [yearB, monthB] = B2.split("-"); return yearA === yearB && monthA === monthB; }, // 蒙版点击事件 maskClick() { this.close(); this.$emit("maskClose"); }, clearCalender() { if (this.range) { this.timeRange.startTime = ""; this.timeRange.endTime = ""; this.tempRange.before = ""; this.tempRange.after = ""; this.cale.multipleStatus.before = ""; this.cale.multipleStatus.after = ""; this.cale.multipleStatus.data = []; this.cale.lastHover = false; } else { this.time = ""; this.tempSingleDate = ""; } this.calendar.fullDate = ""; this.setDate(/* @__PURE__ */ new Date()); }, bindDateChange(e2) { const value = e2.detail.value + "-1"; this.setDate(value); }, /** * 初始化日期显示 * @param {Object} date */ init(date) { if (!this.cale) { return; } this.cale.setDate(date || /* @__PURE__ */ new Date()); this.weeks = this.cale.weeks; this.nowDate = this.cale.getInfo(date); this.calendar = { ...this.nowDate }; if (!date) { this.calendar.fullDate = ""; if (this.defaultValue && !this.range) { const defaultDate = new Date(this.defaultValue); const fullDate = getDate(defaultDate); const year = defaultDate.getFullYear(); const month = defaultDate.getMonth() + 1; const date2 = defaultDate.getDate(); const day = defaultDate.getDay(); this.calendar = { fullDate, year, month, date: date2, day }, this.tempSingleDate = fullDate; this.time = getTime$1(defaultDate, this.hideSecond); } } }, /** * 打开日历弹窗 */ open() { if (this.clearDate && !this.insert) { this.cale.cleanMultipleStatus(); this.init(this.date); } this.show = true; this.$nextTick(() => { setTimeout(() => { this.aniMaskShow = true; }, 50); }); }, /** * 关闭日历弹窗 */ close() { this.aniMaskShow = false; this.$nextTick(() => { setTimeout(() => { this.show = false; this.$emit("close"); }, 300); }); }, /** * 确认按钮 */ confirm() { this.setEmit("confirm"); this.close(); }, /** * 变化触发 */ change(isSingleChange) { if (!this.insert && !isSingleChange) return; this.setEmit("change"); }, /** * 选择月份触发 */ monthSwitch() { let { year, month } = this.nowDate; this.$emit("monthSwitch", { year, month: Number(month) }); }, /** * 派发事件 * @param {Object} name */ setEmit(name) { if (!this.range) { if (!this.calendar.fullDate) { this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date()); this.tempSingleDate = this.calendar.fullDate; } if (this.hasTime && !this.time) { this.time = getTime$1(/* @__PURE__ */ new Date(), this.hideSecond); } } let { year, month, date, fullDate, extraInfo } = this.calendar; this.$emit(name, { range: this.cale.multipleStatus, year, month, date, time: this.time, timeRange: this.timeRange, fulldate: fullDate, extraInfo: extraInfo || {} }); }, /** * 选择天触发 * @param {Object} weeks */ choiceDate(weeks) { if (weeks.disable) return; this.calendar = weeks; this.calendar.userChecked = true; this.cale.setMultiple(this.calendar.fullDate, true); this.weeks = this.cale.weeks; this.tempSingleDate = this.calendar.fullDate; const beforeDate = new Date(this.cale.multipleStatus.before).getTime(); const afterDate = new Date(this.cale.multipleStatus.after).getTime(); if (beforeDate > afterDate && afterDate) { this.tempRange.before = this.cale.multipleStatus.after; this.tempRange.after = this.cale.multipleStatus.before; } else { this.tempRange.before = this.cale.multipleStatus.before; this.tempRange.after = this.cale.multipleStatus.after; } this.change(true); }, changeMonth(type) { let newDate; if (type === "pre") { newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate; } else if (type === "next") { newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate; } this.setDate(newDate); this.monthSwitch(); }, /** * 设置日期 * @param {Object} date */ setDate(date) { this.cale.setDate(date); this.weeks = this.cale.weeks; this.nowDate = this.cale.getInfo(date); } } }; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { const _component_calendar_item = vue.resolveComponent("calendar-item"); const _component_time_picker = vue.resolveComponent("time-picker"); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: "uni-calendar", onMouseleave: _cache[8] || (_cache[8] = (...args) => $options.leaveCale && $options.leaveCale(...args)) }, [ !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]), onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args)) }, null, 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }]) }, [ vue.createElementVNode("view", { class: "uni-calendar__header-btn-box", onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"])) }, [ vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" }) ]), vue.createElementVNode("picker", { mode: "date", value: $props.date, fields: "month", onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args)) }, [ vue.createElementVNode( "text", { class: "uni-calendar__header-text" }, vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText), 1 /* TEXT */ ) ], 40, ["value"]), vue.createElementVNode("view", { class: "uni-calendar__header-btn-box", onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"])) }, [ vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" }) ]), !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "dialog-close", onClick: _cache[4] || (_cache[4] = (...args) => $options.maskClick && $options.maskClick(...args)) }, [ vue.createElementVNode("view", { class: "dialog-close-plus", "data-id": "close" }), vue.createElementVNode("view", { class: "dialog-close-plus dialog-close-rotate", "data-id": "close" }) ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "uni-calendar__box" }, [ $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-calendar__box-bg" }, [ vue.createElementVNode( "text", { class: "uni-calendar__box-bg-text" }, vue.toDisplayString($data.nowDate.month), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "uni-calendar__weeks", style: { "padding-bottom": "7px" } }, [ vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ vue.createElementVNode( "text", { class: "uni-calendar__weeks-day-text" }, vue.toDisplayString($options.SUNText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ vue.createElementVNode( "text", { class: "uni-calendar__weeks-day-text" }, vue.toDisplayString($options.MONText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ vue.createElementVNode( "text", { class: "uni-calendar__weeks-day-text" }, vue.toDisplayString($options.TUEText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ vue.createElementVNode( "text", { class: "uni-calendar__weeks-day-text" }, vue.toDisplayString($options.WEDText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ vue.createElementVNode( "text", { class: "uni-calendar__weeks-day-text" }, vue.toDisplayString($options.THUText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ vue.createElementVNode( "text", { class: "uni-calendar__weeks-day-text" }, vue.toDisplayString($options.FRIText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ vue.createElementVNode( "text", { class: "uni-calendar__weeks-day-text" }, vue.toDisplayString($options.SATText), 1 /* TEXT */ ) ]) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.weeks, (item, weekIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-calendar__weeks", key: weekIndex }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item, (weeks, weeksIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-calendar__weeks-item", key: weeksIndex }, [ vue.createVNode(_component_calendar_item, { class: "uni-calendar-item--hook", weeks, calendar: $data.calendar, selected: $props.selected, checkHover: $props.range, onChange: $options.choiceDate, onHandleMouse: $options.handleMouse }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-date-changed uni-calendar--fixed-top", style: { "padding": "0 80px" } }, [ vue.createElementVNode( "view", { class: "uni-date-changed--time-date" }, vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText), 1 /* TEXT */ ), vue.createVNode(_component_time_picker, { type: "time", start: $options.timepickerStartTime, end: $options.timepickerEndTime, modelValue: $data.time, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event), disabled: !$data.tempSingleDate, border: false, "hide-second": $props.hideSecond, class: "time-picker-style" }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"]) ])) : vue.createCommentVNode("v-if", true), !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-date-changed uni-calendar--fixed-top" }, [ vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [ vue.createElementVNode( "view", { class: "uni-date-changed--time-date" }, vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText), 1 /* TEXT */ ), vue.createVNode(_component_time_picker, { type: "time", start: $options.timepickerStartTime, modelValue: $data.timeRange.startTime, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event), border: false, "hide-second": $props.hideSecond, disabled: !$data.tempRange.before, class: "time-picker-style" }, null, 8, ["start", "modelValue", "hide-second", "disabled"]) ]), vue.createElementVNode("view", { style: { "line-height": "50px" } }, [ vue.createVNode(_component_uni_icons, { type: "arrowthinright", color: "#999" }) ]), vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [ vue.createElementVNode( "view", { class: "uni-date-changed--time-date" }, vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText), 1 /* TEXT */ ), vue.createVNode(_component_time_picker, { type: "time", end: $options.timepickerEndTime, modelValue: $data.timeRange.endTime, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event), border: false, "hide-second": $props.hideSecond, disabled: !$data.tempRange.after, class: "time-picker-style" }, null, 8, ["end", "modelValue", "hide-second", "disabled"]) ]) ])) : vue.createCommentVNode("v-if", true), !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "uni-date-changed uni-date-btn--ok" }, [ vue.createCommentVNode(' {{confirmText}}by xxl ') ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ); } const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$a], ["__scopeId", "data-v-1d379219"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]); const _sfc_main$J = { name: "UniDatetimePicker", options: { virtualHost: true }, components: { Calendar, TimePicker }, data() { return { isRange: false, hasTime: false, displayValue: "", inputDate: "", calendarDate: "", pickerTime: "", calendarRange: { startDate: "", startTime: "", endDate: "", endTime: "" }, displayRangeValue: { startDate: "", endDate: "" }, tempRange: { startDate: "", startTime: "", endDate: "", endTime: "" }, // 左右日历同步数据 startMultipleStatus: { before: "", after: "", data: [], fulldate: "" }, endMultipleStatus: { before: "", after: "", data: [], fulldate: "" }, pickerVisible: false, pickerPositionStyle: null, isEmitValue: false, isPhone: false, isFirstShow: true, i18nT: () => { } }; }, props: { type: { type: String, default: "datetime" }, value: { type: [String, Number, Array, Date], default: "" }, modelValue: { type: [String, Number, Array, Date], default: "" }, start: { type: [Number, String], default: "" }, end: { type: [Number, String], default: "" }, returnType: { type: String, default: "string" }, placeholder: { type: String, default: "" }, startPlaceholder: { type: String, default: "" }, endPlaceholder: { type: String, default: "" }, rangeSeparator: { type: String, default: "-" }, border: { type: [Boolean], default: true }, disabled: { type: [Boolean], default: false }, clearIcon: { type: [Boolean], default: true }, hideSecond: { type: [Boolean], default: false }, defaultValue: { type: [String, Object, Array], default: "" } }, watch: { type: { immediate: true, handler(newVal) { this.hasTime = newVal.indexOf("time") !== -1; this.isRange = newVal.indexOf("range") !== -1; } }, modelValue: { immediate: true, handler(newVal) { if (this.isEmitValue) { this.isEmitValue = false; return; } this.initPicker(newVal); } }, start: { immediate: true, handler(newVal) { if (!newVal) return; this.calendarRange.startDate = getDate(newVal); if (this.hasTime) { this.calendarRange.startTime = getTime$1(newVal); } } }, end: { immediate: true, handler(newVal) { if (!newVal) return; this.calendarRange.endDate = getDate(newVal); if (this.hasTime) { this.calendarRange.endTime = getTime$1(newVal, this.hideSecond); } } } }, computed: { timepickerStartTime() { const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate; return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : ""; }, timepickerEndTime() { const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate; return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : ""; }, mobileCalendarTime() { const timeRange = { start: this.tempRange.startTime, end: this.tempRange.endTime }; return this.isRange ? timeRange : this.pickerTime; }, mobSelectableTime() { return { start: this.calendarRange.startTime, end: this.calendarRange.endTime }; }, datePopupWidth() { return this.isRange ? 653 : 301; }, /** * for i18n */ singlePlaceholderText() { return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText); }, startPlaceholderText() { return this.startPlaceholder || this.startDateText; }, endPlaceholderText() { return this.endPlaceholder || this.endDateText; }, selectDateText() { return this.i18nT("uni-datetime-picker.selectDate"); }, selectDateTimeText() { return this.i18nT("uni-datetime-picker.selectDateTime"); }, selectTimeText() { return this.i18nT("uni-datetime-picker.selectTime"); }, startDateText() { return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate"); }, startTimeText() { return this.i18nT("uni-datetime-picker.startTime"); }, endDateText() { return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate"); }, endTimeText() { return this.i18nT("uni-datetime-picker.endTime"); }, okText() { return this.i18nT("uni-datetime-picker.ok"); }, clearText() { return this.i18nT("uni-datetime-picker.clear"); }, showClearIcon() { return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate); } }, created() { this.initI18nT(); this.platform(); }, methods: { initI18nT() { const vueI18n = initVueI18n(i18nMessages); this.i18nT = vueI18n.t; }, initPicker(newVal) { if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) { this.$nextTick(() => { this.clear(false); }); return; } if (!Array.isArray(newVal) && !this.isRange) { if (newVal) { this.displayValue = this.inputDate = this.calendarDate = getDate(newVal); if (this.hasTime) { this.pickerTime = getTime$1(newVal, this.hideSecond); this.displayValue = `${this.displayValue} ${this.pickerTime}`; } } else if (this.defaultValue) { this.inputDate = this.calendarDate = getDate(this.defaultValue); if (this.hasTime) { this.pickerTime = getTime$1(this.defaultValue, this.hideSecond); } } } else { const [before, after] = newVal; if (!before && !after) return; const beforeDate = getDate(before); const beforeTime = getTime$1(before, this.hideSecond); const afterDate = getDate(after); const afterTime = getTime$1(after, this.hideSecond); const startDate = beforeDate; const endDate = afterDate; this.displayRangeValue.startDate = this.tempRange.startDate = startDate; this.displayRangeValue.endDate = this.tempRange.endDate = endDate; if (this.hasTime) { this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`; this.displayRangeValue.endDate = `${afterDate} ${afterTime}`; this.tempRange.startTime = beforeTime; this.tempRange.endTime = afterTime; } const defaultRange = { before: beforeDate, after: afterDate }; this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, { which: "right" }); this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, { which: "left" }); } }, updateLeftCale(e2) { const left = this.$refs.left; left.cale.setHoverMultiple(e2.after); left.setDate(this.$refs.left.nowDate.fullDate); }, updateRightCale(e2) { const right = this.$refs.right; right.cale.setHoverMultiple(e2.after); right.setDate(this.$refs.right.nowDate.fullDate); }, platform() { if (typeof navigator !== "undefined") { this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1; return; } const { windowWidth } = uni.getSystemInfoSync(); this.isPhone = windowWidth <= 500; this.windowWidth = windowWidth; }, show() { this.$emit("show"); if (this.disabled) { return; } this.platform(); if (this.isPhone) { setTimeout(() => { this.$refs.mobile.open(); }, 0); return; } this.pickerPositionStyle = { top: "10px" }; const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor"); dateEditor.boundingClientRect((rect) => { if (this.windowWidth - rect.left < this.datePopupWidth) { this.pickerPositionStyle.right = 0; } }).exec(); setTimeout(() => { this.pickerVisible = !this.pickerVisible; if (!this.isPhone && this.isRange && this.isFirstShow) { this.isFirstShow = false; const { startDate, endDate } = this.calendarRange; if (startDate && endDate) { if (this.diffDate(startDate, endDate) < 30) { this.$refs.right.changeMonth("pre"); } } else { if (this.isPhone) { this.$refs.right.cale.lastHover = false; } } } }, 50); }, close() { setTimeout(() => { this.pickerVisible = false; this.$emit("maskClick", this.value); this.$refs.mobile && this.$refs.mobile.close(); }, 20); }, setEmit(value) { if (this.returnType === "timestamp" || this.returnType === "date") { if (!Array.isArray(value)) { if (!this.hasTime) { value = value + " 00:00:00"; } value = this.createTimestamp(value); if (this.returnType === "date") { value = new Date(value); } } else { if (!this.hasTime) { value[0] = value[0] + " 00:00:00"; value[1] = value[1] + " 00:00:00"; } value[0] = this.createTimestamp(value[0]); value[1] = this.createTimestamp(value[1]); if (this.returnType === "date") { value[0] = new Date(value[0]); value[1] = new Date(value[1]); } } } this.$emit("update:modelValue", value); this.$emit("input", value); this.$emit("change", value); this.isEmitValue = true; }, createTimestamp(date) { date = fixIosDateFormat(date); return Date.parse(new Date(date)); }, singleChange(e2) { this.calendarDate = this.inputDate = e2.fulldate; if (this.hasTime) return; this.confirmSingleChange(); }, confirmSingleChange() { if (!checkDate(this.inputDate)) { const now2 = /* @__PURE__ */ new Date(); this.calendarDate = this.inputDate = getDate(now2); this.pickerTime = getTime$1(now2, this.hideSecond); } let startLaterInputDate = false; let startDate, startTime; if (this.start) { let startString = this.start; if (typeof this.start === "number") { startString = getDateTime(this.start, this.hideSecond); } [startDate, startTime] = startString.split(" "); if (this.start && !dateCompare(startDate, this.inputDate)) { startLaterInputDate = true; this.inputDate = startDate; } } let endEarlierInputDate = false; let endDate, endTime; if (this.end) { let endString = this.end; if (typeof this.end === "number") { endString = getDateTime(this.end, this.hideSecond); } [endDate, endTime] = endString.split(" "); if (this.end && !dateCompare(this.inputDate, endDate)) { endEarlierInputDate = true; this.inputDate = endDate; } } if (this.hasTime) { if (startLaterInputDate) { this.pickerTime = startTime || getDefaultSecond(this.hideSecond); } if (endEarlierInputDate) { this.pickerTime = endTime || getDefaultSecond(this.hideSecond); } if (!this.pickerTime) { this.pickerTime = getTime$1(Date.now(), this.hideSecond); } this.displayValue = `${this.inputDate} ${this.pickerTime}`; } else { this.displayValue = this.inputDate; } this.setEmit(this.displayValue); this.pickerVisible = false; }, leftChange(e2) { const { before, after } = e2.range; this.rangeChange(before, after); const obj = { before: e2.range.before, after: e2.range.after, data: e2.range.data, fulldate: e2.fulldate }; this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj); this.$emit("calendarClick", e2); }, rightChange(e2) { const { before, after } = e2.range; this.rangeChange(before, after); const obj = { before: e2.range.before, after: e2.range.after, data: e2.range.data, fulldate: e2.fulldate }; this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj); this.$emit("calendarClick", e2); }, mobileChange(e2) { if (this.isRange) { const { before, after } = e2.range; if (!before) { return; } this.handleStartAndEnd(before, after, true); if (this.hasTime) { const { startTime, endTime } = e2.timeRange; this.tempRange.startTime = startTime; this.tempRange.endTime = endTime; } this.confirmRangeChange(); } else { if (this.hasTime) { this.displayValue = e2.fulldate + " " + e2.time; } else { this.displayValue = e2.fulldate; } this.setEmit(this.displayValue); } this.$refs.mobile.close(); }, rangeChange(before, after) { if (!(before && after)) return; this.handleStartAndEnd(before, after, true); if (this.hasTime) return; this.confirmRangeChange(); }, confirmRangeChange() { if (!this.tempRange.startDate || !this.tempRange.endDate) { this.pickerVisible = false; return; } if (!checkDate(this.tempRange.startDate)) { this.tempRange.startDate = getDate(Date.now()); } if (!checkDate(this.tempRange.endDate)) { this.tempRange.endDate = getDate(Date.now()); } let start, end; let startDateLaterRangeStartDate = false; let startDateLaterRangeEndDate = false; let startDate, startTime; if (this.start) { let startString = this.start; if (typeof this.start === "number") { startString = getDateTime(this.start, this.hideSecond); } [startDate, startTime] = startString.split(" "); if (this.start && !dateCompare(this.start, this.tempRange.startDate)) { startDateLaterRangeStartDate = true; this.tempRange.startDate = startDate; } if (this.start && !dateCompare(this.start, this.tempRange.endDate)) { startDateLaterRangeEndDate = true; this.tempRange.endDate = startDate; } } let endDateEarlierRangeStartDate = false; let endDateEarlierRangeEndDate = false; let endDate, endTime; if (this.end) { let endString = this.end; if (typeof this.end === "number") { endString = getDateTime(this.end, this.hideSecond); } [endDate, endTime] = endString.split(" "); if (this.end && !dateCompare(this.tempRange.startDate, this.end)) { endDateEarlierRangeStartDate = true; this.tempRange.startDate = endDate; } if (this.end && !dateCompare(this.tempRange.endDate, this.end)) { endDateEarlierRangeEndDate = true; this.tempRange.endDate = endDate; } } if (!this.hasTime) { start = this.displayRangeValue.startDate = this.tempRange.startDate; end = this.displayRangeValue.endDate = this.tempRange.endDate; } else { if (startDateLaterRangeStartDate) { this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond); } else if (endDateEarlierRangeStartDate) { this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond); } if (!this.tempRange.startTime) { this.tempRange.startTime = getTime$1(Date.now(), this.hideSecond); } if (startDateLaterRangeEndDate) { this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond); } else if (endDateEarlierRangeEndDate) { this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond); } if (!this.tempRange.endTime) { this.tempRange.endTime = getTime$1(Date.now(), this.hideSecond); } start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`; end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`; } if (!dateCompare(start, end)) { [start, end] = [end, start]; } this.displayRangeValue.startDate = start; this.displayRangeValue.endDate = end; const displayRange = [start, end]; this.setEmit(displayRange); this.pickerVisible = false; }, handleStartAndEnd(before, after, temp = false) { if (!before) return; if (!after) after = before; const type = temp ? "tempRange" : "range"; const isStartEarlierEnd = dateCompare(before, after); this[type].startDate = isStartEarlierEnd ? before : after; this[type].endDate = isStartEarlierEnd ? after : before; }, /** * 比较时间大小 */ dateCompare(startDate, endDate) { startDate = new Date(startDate.replace("-", "/").replace("-", "/")); endDate = new Date(endDate.replace("-", "/").replace("-", "/")); return startDate <= endDate; }, /** * 比较时间差 */ diffDate(startDate, endDate) { startDate = new Date(startDate.replace("-", "/").replace("-", "/")); endDate = new Date(endDate.replace("-", "/").replace("-", "/")); const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3); return Math.abs(diff); }, clear(needEmit = true) { if (!this.isRange) { this.displayValue = ""; this.inputDate = ""; this.pickerTime = ""; if (this.isPhone) { this.$refs.mobile && this.$refs.mobile.clearCalender(); } else { this.$refs.pcSingle && this.$refs.pcSingle.clearCalender(); } if (needEmit) { this.$emit("change", ""); this.$emit("input", ""); this.$emit("update:modelValue", ""); } } else { this.displayRangeValue.startDate = ""; this.displayRangeValue.endDate = ""; this.tempRange.startDate = ""; this.tempRange.startTime = ""; this.tempRange.endDate = ""; this.tempRange.endTime = ""; if (this.isPhone) { this.$refs.mobile && this.$refs.mobile.clearCalender(); } else { this.$refs.left && this.$refs.left.clearCalender(); this.$refs.right && this.$refs.right.clearCalender(); this.$refs.right && this.$refs.right.changeMonth("next"); } if (needEmit) { this.$emit("change", []); this.$emit("input", []); this.$emit("update:modelValue", []); } } }, calendarClick(e2) { this.$emit("calendarClick", e2); } } }; function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); const _component_time_picker = vue.resolveComponent("time-picker"); const _component_Calendar = vue.resolveComponent("Calendar"); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [ vue.createElementVNode("view", { class: "uni-date-editor", onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }]) }, [ !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-date-x uni-date-single" }, [ vue.createVNode(_component_uni_icons, { class: "icon-calendar", type: "calendar", color: "#c0c4cc", size: "22" }), vue.createElementVNode( "view", { class: "uni-date__x-input" }, vue.toDisplayString($data.displayValue || $options.singlePlaceholderText), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-date-x uni-date-range" }, [ vue.createVNode(_component_uni_icons, { class: "icon-calendar", type: "calendar", color: "#c0c4cc", size: "22" }), vue.createElementVNode( "view", { class: "uni-date__x-input text-center" }, vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "range-separator" }, vue.toDisplayString($props.rangeSeparator), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "uni-date__x-input text-center" }, vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText), 1 /* TEXT */ ) ])), $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "uni-date__icon-clear", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"])) }, [ vue.createVNode(_component_uni_icons, { type: "clear", color: "#c0c4cc", size: "22" }) ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ) ], true) ]), vue.withDirectives(vue.createElementVNode( "view", { class: "uni-date-mask--pc", onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args)) }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.pickerVisible] ]), !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock( "view", { key: 0, ref: "datePicker", class: "uni-date-picker__container" }, [ !$data.isRange ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "uni-date-single--x", style: vue.normalizeStyle($data.pickerPositionStyle) }, [ vue.createElementVNode("view", { class: "uni-popper__arrow" }), $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-date-changed popup-x-header" }, [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__input text-center", type: "text", "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event), placeholder: $options.selectDateText }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.inputDate] ]), vue.createVNode(_component_time_picker, { type: "time", modelValue: $data.pickerTime, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event), border: false, disabled: !$data.inputDate, start: $options.timepickerStartTime, end: $options.timepickerEndTime, hideSecond: $props.hideSecond, style: { "width": "100%" } }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__input text-center", type: "text", "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event), placeholder: $options.selectTimeText, disabled: !$data.inputDate }, null, 8, ["placeholder", "disabled"]), [ [vue.vModelText, $data.pickerTime] ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_Calendar, { ref: "pcSingle", showMonth: false, "start-date": $data.calendarRange.startDate, "end-date": $data.calendarRange.endDate, date: $data.calendarDate, onChange: $options.singleChange, "default-value": $props.defaultValue, style: { "padding": "0 8px" } }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]), $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "popup-x-footer" }, [ vue.createElementVNode( "text", { class: "confirm-text", onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args)) }, vue.toDisplayString($options.okText), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "uni-date-range--x", style: vue.normalizeStyle($data.pickerPositionStyle) }, [ vue.createElementVNode("view", { class: "uni-popper__arrow" }), $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "popup-x-header uni-date-changed" }, [ vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__input uni-date-range__input", type: "text", "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event), placeholder: $options.startDateText }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.tempRange.startDate] ]), vue.createVNode(_component_time_picker, { type: "time", modelValue: $data.tempRange.startTime, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event), start: $options.timepickerStartTime, border: false, disabled: !$data.tempRange.startDate, hideSecond: $props.hideSecond }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__input uni-date-range__input", type: "text", "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event), placeholder: $options.startTimeText, disabled: !$data.tempRange.startDate }, null, 8, ["placeholder", "disabled"]), [ [vue.vModelText, $data.tempRange.startTime] ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "start", "disabled", "hideSecond"]) ]), vue.createVNode(_component_uni_icons, { type: "arrowthinright", color: "#999", style: { "line-height": "40px" } }), vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__input uni-date-range__input", type: "text", "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event), placeholder: $options.endDateText }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.tempRange.endDate] ]), vue.createVNode(_component_time_picker, { type: "time", modelValue: $data.tempRange.endTime, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event), end: $options.timepickerEndTime, border: false, disabled: !$data.tempRange.endDate, hideSecond: $props.hideSecond }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__input uni-date-range__input", type: "text", "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event), placeholder: $options.endTimeText, disabled: !$data.tempRange.endDate }, null, 8, ["placeholder", "disabled"]), [ [vue.vModelText, $data.tempRange.endTime] ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "end", "disabled", "hideSecond"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "popup-x-body" }, [ vue.createVNode(_component_Calendar, { ref: "left", showMonth: false, "start-date": $data.calendarRange.startDate, "end-date": $data.calendarRange.endDate, range: true, pleStatus: $data.endMultipleStatus, onChange: $options.leftChange, onFirstEnterCale: $options.updateRightCale, style: { "padding": "0 8px" } }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]), vue.createVNode(_component_Calendar, { ref: "right", showMonth: false, "start-date": $data.calendarRange.startDate, "end-date": $data.calendarRange.endDate, range: true, onChange: $options.rightChange, pleStatus: $data.startMultipleStatus, onFirstEnterCale: $options.updateLeftCale, style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" } }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"]) ]), $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "popup-x-footer" }, [ vue.createElementVNode( "text", { onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args)) }, vue.toDisplayString($options.clearText), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "confirm-text", onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args)) }, vue.toDisplayString($options.okText), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) ], 512 /* NEED_PATCH */ )), [ [vue.vShow, $data.pickerVisible] ]) : vue.createCommentVNode("v-if", true), $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, { key: 1, ref: "mobile", clearDate: false, date: $data.calendarDate, defTime: $options.mobileCalendarTime, "start-date": $data.calendarRange.startDate, "end-date": $data.calendarRange.endDate, selectableTimes: $options.mobSelectableTime, startPlaceholder: $props.startPlaceholder, endPlaceholder: $props.endPlaceholder, "default-value": $props.defaultValue, pleStatus: $data.endMultipleStatus, showMonth: false, range: $data.isRange, hasTime: $data.hasTime, insert: false, hideSecond: $props.hideSecond, onConfirm: $options.mobileChange, onMaskClose: $options.close, onChange: $options.calendarClick }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose", "onChange"])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$9], ["__scopeId", "data-v-9802168a"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]); const _imports_0$5 = "/static/index/position.png"; const _imports_1$3 = "/static/index/calendar.png"; const _imports_2$2 = "/static/index/back.png"; const _sfc_main$I = { __name: "customNav", setup(__props) { vue.useCssVars((_ctx) => ({ "420daeb5-cusnavbarheight": cusnavbarheight })); const res = wx.getSystemInfoSync(); const statusHeight = res.statusBarHeight; const cusnavbarheight = statusHeight + 44 + "px"; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "nav" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), vue.createElementVNode("view", { class: "place" }) ]); }; } }; const customNav = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-420daeb5"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/customNav.vue"]]); const baseurl = "https://36.112.48.190/jeecg-boot/sys/common/static/"; const toast = (title, icon, duration) => { uni.showToast({ title, icon: icon || "none", duration: duration || 2e3 }); }; const beforeJump = (url, callback) => { const store = useStore(); getUserPermissionApi({ token: store.token, type: "mobile" }).then((res) => { var _a; if (res.success) { let page = handleAllowPage(((_a = res.result) == null ? void 0 : _a.menu) || []); if (page.some((item) => url.indexOf(item) !== -1)) { callback(); } else { toast("无查看权限!"); } } }).catch((err) => { formatAppLog("log", "at utils/index.js:35", "err@", err); }); }; const handleAllowPage = (menu, arr = []) => { if (!menu.length) { return []; } menu.forEach((item) => { if (item.children) { arr.push(...handleAllowPage(item.children)); } arr.push(item.path); }); return arr; }; const hasNewVersion = (version, isWgt = false) => { return new Promise((resolve) => { const transfer = (str) => str.replace(/\./g, ""); if (isWgt) { plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => { const currentVersion = widgetInfo.version; resolve(+transfer(version) > +transfer(currentVersion)); }); } else { const currentVersion = plus.runtime.version; resolve(+transfer(version) > +transfer(currentVersion)); } }); }; function downloadApp(url) { formatAppLog("log", "at utils/index.js:78", "url", url); var dtask = plus.downloader.createDownload(url, { filename: `_downloads/wgt-${Date.now()}.wgt` //利用保存路径,实现下载文件的重命名 }, function(d2, status) { if (status == 200) { var fileSaveUrl = plus.io.convertLocalFileSystemURL(d2.filename); formatAppLog("log", "at utils/index.js:86", "fileSaveUrl", fileSaveUrl); installApp(fileSaveUrl); } else { plus.downloader.clear(); uni.showToast({ title: "App下载失败!", icon: "error" }); } }); let showLoading = plus.nativeUI.showWaiting("正在下載"); dtask.start(); dtask.addEventListener("statechanged", (task, status) => { switch (task.state) { case 1: showLoading.setTitle("正在下载"); break; case 2: showLoading.setTitle("已连接到服务器"); break; case 3: parseInt( parseFloat(task.downloadedSize) / parseFloat(task.totalSize) * 100 ); showLoading.setTitle(" 正在下载"); break; case 4: plus.nativeUI.closeWaiting(); break; } }); } function installApp(tempFilePath) { plus.runtime.install( tempFilePath, { force: true }, () => { uni.showModal({ title: "更新", content: "更新成功,请点击确认后重启", showCancel: false, success(res) { if (res.confirm) { plus.runtime.restart(); } } }); }, () => uni.showToast({ title: "安装失败!", icon: "error" }) ); } function onClickUpdate(updateType, url) { if (updateType != "wgt") plus.runtime.openURL(url.apkUrl); else downloadApp(url.wgtUrl); } const getTime = () => { let date = /* @__PURE__ */ new Date(); (/* @__PURE__ */ new Date()).getTime(); let y2 = date.getFullYear(); let m2 = (date.getMonth() + 1).toString().padStart(2, 0); let d2 = date.getDate().toString().padStart(2, 0); return `${y2}-${m2}-${d2}`; }; const getLocation = () => { const store = useStore(); if (!store.positionSwitch) { uni.setStorageSync("position", "濮阳市"); store.setPosition("濮阳市"); getWeather(); } else { toast("定位刷新中"); uni.getLocation({ type: "wgs84", success: function(position) { uni.request({ url: "http://api.tianditu.gov.cn/geocoder", method: "GET", data: { postStr: JSON.stringify({ lon: position.longitude, lat: position.latitude, ver: 1 }), type: "geocode", tk: "30fe0f0c1b2320e112bde797f3ddaff4" }, success: function(res) { let data = res.data; if (data.status == 0) { const obj = data.result.addressComponent; let info = obj.city ? obj.city : obj.province; uni.setStorageSync("position", info); store.setPosition(info); getWeather(position.latitude, position.longitude); } else { formatAppLog("log", "at utils/index.js:223", data.message); } }, fail: function(err) { toast("获取定位失败"); } }); } }); } }; const getWeather = (lat, lon) => { const store = useStore(); let params = {}; if (!store.positionSwitch) { params.q = "濮阳市"; weatherRequest(params); } else { params.lat = lat; params.lon = lon; weatherRequest(params); } }; const weatherRequest = (params) => { const store = useStore(); uni.request({ url: "https://api.openweathermap.org/data/2.5/weather", method: "GET", data: { ...params, appid: "600a60694b0e453dfbaafa862f1d1482", lang: "zh_cn" }, success: function(res) { uni.setStorageSync("wendu", Math.round(res.data.main.temp - 273.15)); uni.setStorageSync("wenduIcon", res.data.weather[0].icon); store.setWeather(Math.round(res.data.main.temp - 273.15), res.data.weather[0].icon); }, fail: function(err) { toast("天气获取失败"); } }); }; const opendocument = (url) => { uni.downloadFile({ url: baseurl + url, success: function(res) { var filePath = res.tempFilePath; uni.openDocument({ filePath, showMenu: true, fail: function(err) { toast(err.errMsg); } }); }, fail: function(err) { formatAppLog("error", "at utils/index.js:282", "文件下载失败", err); } }); }; const imgUrl = (url) => { return baseurl + `/${url}`; }; const _sfc_main$H = { __name: "index", setup(__props) { vue.useCssVars((_ctx) => ({ "ae0729d5-cusnavbarheight": cusnavbarheight })); const baseurl2 = "https://36.112.48.190/jeecg-boot"; const store = useStore(); onLoad(() => { cxcDaping(); zhiban(); getlist(); }); const banner = vue.ref([]); const cxcDaping = () => { cxcDapingApi({ zslb: 6 }).then((res2) => { if (res2.success) { let arr = res2.result.records[0].wenjian.split(","); banner.value = arr.map((item) => { return baseurl2 + "/sys/common/static/" + item; }); } }); }; const current = vue.ref(0); const current_zhidu = vue.ref(0); const tabArr = ["公文", "公告", "制度", "法规"]; const changeTab = (i2) => { current.value = i2; pageNo = 1; list.value = []; getlist(); }; const changeZhidu = (i2) => { current_zhidu.value = i2; pageNo = 1; list.value = []; zhidu(); }; const res = wx.getSystemInfoSync(); const statusHeight = res.statusBarHeight; const cusnavbarheight = statusHeight + 44 + "px"; vue.ref(null); const jump = (url, type, item, page) => { if (type && type == 1 && page == "detail") return; if (type && type == 3 && item) { return opendocument(item.mingcheng); } if (type && type == 2) { url = url + `&zhiduid=${current_zhidu.value}`; } beforeJump(url, () => { uni.navigateTo({ url }); }); }; let pageNo = 1; let pageSize = 5; const list = vue.ref([]); const bpmlist = () => { bpmlistApi({ pageNo, pageSize }).then((res2) => { if (res2.success) { list.value = [...list.value, ...formatObj(res2.result.records, "fwbt", "fwtime", null)]; } }).catch((err) => { formatAppLog("log", "at pages/tab/index.vue:273", "err", err); }); }; const gonggaolist = () => { gonggaolistApi({ pageNo, pageSize }).then((res2) => { if (res2.success) { list.value = [...list.value, ...formatObj(res2.result.records, "neirong", "fbdw", "createTime")]; } }).catch((err) => { formatAppLog("log", "at pages/tab/index.vue:288", "err", err); }); }; const zhibanArr = vue.ref([]); const zhiban = () => { zhibanApi().then((res2) => { if (res2.success) { zhibanArr.value = res2.result.records.slice(0, 2); } }).catch((err) => { formatAppLog("log", "at pages/tab/index.vue:299", "err", err); }); }; const fagui = () => { faguiApi({ pageNo, pageSize }).then((res2) => { if (res2.success) { list.value = [...list.value, ...formatObj(res2.result.records, "flfgmc", "ssbm", null)]; } }).catch((err) => { formatAppLog("log", "at pages/tab/index.vue:315", "err", err); }); }; const zhidu = () => { let getzhidu = current_zhidu.value == 0 ? zhiduApi : cjzhiduApi; getzhidu({ pageNo, pageSize }).then((res2) => { if (res2.success) { let str = current_zhidu.value == 0 ? "zbbm_dictText" : "sbbm"; list.value = [...list.value, ...formatObj(res2.result.records, "zdmc", str, null)]; } }).catch((err) => { formatAppLog("log", "at pages/tab/index.vue:332", "err", err); }); }; const formatObj = (arr, title, time, depart) => { arr.map((item) => { item["_title"] = item[title]; item["_time"] = item[time]; item["_depart"] = item[depart]; }); return arr; }; onPullDownRefresh(() => { list.value = []; cxcDaping(); zhiban(); getlist(); uni.stopPullDownRefresh(); }); const getlist = () => { if (current.value == 0) { bpmlist(); } else if (current.value == 1) { gonggaolist(); } else if (current.value == 2) { zhidu(); } else if (current.value == 3) { fagui(); } }; return (_ctx, _cache) => { const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "nav" }, [ vue.createElementVNode("view", { class: "nav_box f-row aic jcb" }, [ vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode("view", { class: "weather_calender f-row aic" }, [ vue.createElementVNode("view", { class: "position f-row aic" }, [ vue.createElementVNode("image", { src: _imports_0$5, mode: "" }), vue.createElementVNode( "text", null, vue.toDisplayString(!vue.unref(store).position ? "暂未定位" : vue.unref(store).position), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "position f-row aic" }, [ vue.createElementVNode("image", { style: { "height": "80rpx", "width": "80rpx" }, src: `http://openweathermap.org/img/w/${vue.unref(store).wenduIcon}.png`, mode: "" }, null, 8, ["src"]), vue.createElementVNode( "text", null, vue.toDisplayString(vue.unref(store).wendu) + "℃", 1 /* TEXT */ ) ]), vue.createVNode(_component_uni_datetime_picker, { type: "date" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "position f-row aic" }, [ vue.createElementVNode("image", { src: _imports_1$3, mode: "" }), vue.createElementVNode( "text", null, vue.toDisplayString(vue.unref(getTime)()), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }) ]) ]) ]), vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("swiper", { class: "swiper", autoplay: "" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(banner.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: i2, class: "swiper-item" }, [ vue.createElementVNode("image", { src: item, mode: "aspectFill" }, null, 8, ["src"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "wrapper f-col aic" }, [ vue.createElementVNode("view", { class: "onduty" }, [ vue.createElementVNode("view", { class: "title f-row aic jcb" }, [ vue.createTextVNode(" 值班信息 "), vue.createElementVNode("view", { class: "more", onClick: _cache[0] || (_cache[0] = ($event) => jump(`/pages/zhiban/index`)) }, [ vue.createTextVNode(" 查看更多 "), vue.createElementVNode("image", { src: _imports_2$2, mode: "" }) ]) ]), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "info_title f-row aic" }, [ vue.createElementVNode("view", { class: "" }, " 日期 "), vue.createElementVNode("view", { class: "" }, " 带班领导 "), vue.createElementVNode("view", { class: "" }, " 值班领导 "), vue.createElementVNode("view", { class: "" }, " 值班干部 ") ]), vue.createElementVNode("view", { class: "data_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(zhibanArr.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["data", " f-row", "aic", { "first": i2 == 0 }]) }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.date), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.dbld_dictText), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.zbld_dictText), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.zbgbrealname), 1 /* TEXT */ ) ], 2 /* CLASS */ ); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]), vue.createElementVNode("view", { class: "list_wrapper" }, [ vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "list_title f-row aic jca" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(tabArr, (item, i2) => { return vue.createElementVNode("view", { class: vue.normalizeClass({ "active": current.value == i2 }), onClick: ($event) => changeTab(i2) }, vue.toDisplayString(item), 11, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]), current.value == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "f-row aic zhidu" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass({ "active": current_zhidu.value == 0 }), onClick: _cache[1] || (_cache[1] = ($event) => changeZhidu(0)) }, " 厂级制度 ", 2 /* CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass({ "active": current_zhidu.value == 1 }), onClick: _cache[2] || (_cache[2] = ($event) => changeZhidu(1)) }, " 上级制度 ", 2 /* CLASS */ ) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { style: { "padding-top": "24rpx" }, class: "more", onClick: _cache[3] || (_cache[3] = ($event) => jump(`/pages/document/index?id=${current.value}`, current.value)) }, [ vue.createTextVNode(" 查看更多 "), vue.createElementVNode("image", { src: _imports_2$2, mode: "" }) ]), vue.createElementVNode("view", { class: "list_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(list.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list", key: i2, onClick: ($event) => jump(`/pages/document/detail?data=${JSON.stringify(item)}&id=${current.value}`, current.value, item, "detail") }, [ vue.createElementVNode( "view", { class: "topic" }, vue.toDisplayString(item._title), 1 /* TEXT */ ), item._time || item._depart ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "time_Box f-row aic" }, [ item._time ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time" }, vue.toDisplayString(item._time), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item._depart ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "look f-row aic" }, vue.toDisplayString(item._depart), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]), vue.createCommentVNode(' \r\n \r\n \r\n {{item.text}}\r\n \r\n \r\n \r\n ') ], 2 /* CLASS */ ); }; } }; const PagesTabIndex = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-ae0729d5"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/tab/index.vue"]]); const _sfc_main$G = { __name: "extendCom", props: { title: { type: String, default: "" }, img: { type: String, default: "" }, list: { type: Array, default: function() { return []; } }, total: { type: Number, default: 0 }, type: { type: String, default: "" } }, setup(__props) { vue.useCssVars((_ctx) => ({ "e40cd242-moreHeight": moreHeight.value })); const props = __props; const open2 = vue.ref(false); const moreHeight = vue.ref(null); const CurrentInstance = vue.getCurrentInstance(); vue.watch(() => props.list, () => { vue.nextTick(() => { uni.createSelectorQuery().in(CurrentInstance.proxy).select(".item_box").boundingClientRect((data) => { moreHeight.value = (data == null ? void 0 : data.height) + "px"; }).exec(); }); }, { immediate: true }); const tolist = (title) => { let id = null; beforeJump("/pages/task/index", () => { if (props.type == "0") { id = 0; } if (props.type == "1") { id = 1; } if (props.type == "2") { return uni.navigateTo({ url: `/pages/task/self?title=${title}` }); } uni.navigateTo({ url: `/pages/task/index?id=${id}&title=${title}` }); }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "todo f-col aic" }, [ vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "title_box f-row aic jcb", onClick: _cache[0] || (_cache[0] = ($event) => tolist("")) }, [ vue.createElementVNode("view", { class: "title f-row aic" }, [ vue.createElementVNode("image", { src: `/static/my/${__props.img}.png`, mode: "" }, null, 8, ["src"]), vue.createTextVNode( " " + vue.toDisplayString(__props.title), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(__props.total), 1 /* TEXT */ ) ]), __props.list.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "list" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["box", { "close": __props.list.length > 5 && open2.value }]) }, [ vue.createElementVNode("view", { class: "item_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(__props.list, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => tolist(item.title), class: "item f-row aic", key: i2 }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString(item.num), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "more", onClick: _cache[1] || (_cache[1] = ($event) => open2.value = !open2.value) }, vue.toDisplayString(!open2.value ? "显示更多" : "收起"), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, __props.list.length > 5] ]) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); }; } }; const extendCom = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-e40cd242"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/extendCom.vue"]]); const _sfc_main$F = { __name: "todotask", setup(__props) { vue.useCssVars((_ctx) => ({ "fc853b6f-cusnavbarheight": cusnavbarheight })); const res = wx.getSystemInfoSync(); const statusHeight = res.statusBarHeight; const cusnavbarheight = statusHeight + 44 + "px"; const store = useStore(); onShow(() => { initArr(); taskList(); taskHistoryList(); myApplyProcessList(); uni.removeTabBarBadge({ // 移除角标 index: "1" }); }); const todoArr = vue.ref([]); const todoTotal = vue.ref(0); const taskList = () => { taskListApi({ pageNo: 1, pageSize: 4, _t: (/* @__PURE__ */ new Date()).getTime() }).then((res2) => { var _a, _b, _c, _d; if (res2 == null ? void 0 : res2.success) { if (((_a = res2 == null ? void 0 : res2.result) == null ? void 0 : _a.total) > 4) { taskListApi({ pageNo: 1, pageSize: (_b = res2 == null ? void 0 : res2.result) == null ? void 0 : _b.total, _t: (/* @__PURE__ */ new Date()).getTime() }).then((res1) => { var _a2, _b2; formatAppLog("log", "at pages/task/todotask.vue:60", "---", res1); if (res1 == null ? void 0 : res1.success) { todoArr.value = [...todoArr.value, ...handleData((_a2 = res1 == null ? void 0 : res1.result) == null ? void 0 : _a2.records)]; todoTotal.value = (_b2 = res1 == null ? void 0 : res1.result) == null ? void 0 : _b2.total; } }).catch((err) => { formatAppLog("log", "at pages/task/todotask.vue:66", "err", err); }); } else { todoArr.value = [...todoArr.value, ...handleData((_c = res2 == null ? void 0 : res2.result) == null ? void 0 : _c.records)]; todoTotal.value = (_d = res2 == null ? void 0 : res2.result) == null ? void 0 : _d.total; } } }).catch((err) => { formatAppLog("log", "at pages/task/todotask.vue:75", err); }); }; const doneArr = vue.ref([]); const doneTotal = vue.ref(0); const taskHistoryList = () => { taskHistoryListApi().then((res2) => { if (res2.success) { if (res2.result.total > 4) { taskHistoryListApi({ pageNo: 1, pageSize: res2.result.total, _t: (/* @__PURE__ */ new Date()).getTime() }).then((res1) => { if (res1.success) { doneArr.value = [...doneArr.value, ...handleData(res1.result.records)]; doneTotal.value = res1.result.total; } }).catch((err) => { formatAppLog("log", "at pages/task/todotask.vue:96", err); }); } else { doneArr.value = [...doneArr.value, ...handleData(res2.result.records)]; doneTotal.value = res2.result.total; } } }).catch((err) => { formatAppLog("log", "at pages/task/todotask.vue:105", err); }); }; const selfArr = vue.ref([]); const selfTotal = vue.ref(0); const myApplyProcessList = () => { myApplyProcessListApi().then((res2) => { if (res2.success) { if (res2.result.total > 4) { myApplyProcessListApi({ pageNo: 1, pageSize: res2.result.total, _t: (/* @__PURE__ */ new Date()).getTime() }).then((res1) => { if (res1.success) { selfArr.value = [...selfArr.value, ...handleData(res1.result.records)]; selfTotal.value = res1.result.total; } }).catch((err) => { formatAppLog("log", "at pages/task/todotask.vue:125", err); }); } else { selfArr.value = [...selfArr.value, ...handleData(res2.result.records)]; selfTotal.value = res2.result.total; } } }).catch((err) => { formatAppLog("log", "at pages/task/todotask.vue:135", err); }); }; const handleData = (titlearr) => { let titleArr = titlearr.length ? titlearr.map((item) => item.processDefinitionName || item.prcocessDefinitionName) : []; let res2 = titleArr.reduce((obj, title) => { if (title in obj) { obj[title]++; } else { obj[title] = 1; } return obj; }, {}); return Object.entries(res2).map(([k, v2]) => ({ title: k, num: v2 })); }; const initArr = () => { todoArr.value = []; selfArr.value = []; doneArr.value = []; todoTotal.value = 0; doneTotal.value = 0; selfTotal.value = 0; }; onPullDownRefresh(() => { initArr(); taskList(); taskHistoryList(); myApplyProcessList(); uni.stopPullDownRefresh(); }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass([{ "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "nav" }), vue.createElementVNode("view", { class: "placeholder" }), vue.createElementVNode("view", { class: "content" }, [ vue.createVNode(extendCom, { title: "我的任务", img: "process", list: todoArr.value, total: todoTotal.value, type: "0" }, null, 8, ["list", "total"]), vue.createVNode(extendCom, { title: "历史任务", img: "done", list: doneArr.value, total: doneTotal.value, type: "1" }, null, 8, ["list", "total"]), vue.createVNode(extendCom, { title: "本人发起", img: "self", list: selfArr.value, total: selfTotal.value, type: "2" }, null, 8, ["list", "total"]) ]) ], 2 /* CLASS */ ); }; } }; const PagesTaskTodotask = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-fc853b6f"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/task/todotask.vue"]]); const _sfc_main$E = { __name: "office", setup(__props) { vue.useCssVars((_ctx) => ({ "305a3c9f-cusnavbarheight": cusnavbarheight })); const store = useStore(); new Array(7).fill(0).map((v2, i2) => i2); vue.ref([]); const res = wx.getSystemInfoSync(); const statusHeight = res.statusBarHeight; const cusnavbarheight = statusHeight + 44 + "px"; const jump = (url) => { beforeJump(url, () => { uni.navigateTo({ url }); }); }; onLoad(() => { getUserPermission(); }); const arr = vue.ref([]); const listorder = vue.ref([]); const listtitle = vue.ref([]); const getUserPermission = () => { getUserPermissionApi({ token: store.token, type: "mobile" }).then((res2) => { var _a, _b, _c; if (res2.success) { let data = res2.result.menu; data.map((item) => item.children = item == null ? void 0 : item.children.filter((e2) => { var _a2; return (_a2 = e2 == null ? void 0 : e2.meta) == null ? void 0 : _a2.icon; })); data = data.filter((item) => { var _a2; return (_a2 = item == null ? void 0 : item.children) == null ? void 0 : _a2.length; }); listtitle.value = (_b = (_a = data[0]) == null ? void 0 : _a.meta) == null ? void 0 : _b.title; arr.value = data; listorder.value = (_c = data.slice(0, 1)[0]) == null ? void 0 : _c.children; } }).catch((err) => { formatAppLog("log", "at pages/tab/office.vue:103", err); }); }; return (_ctx, _cache) => { var _a, _b, _c; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createElementVNode("view", { class: "nav" }), vue.createElementVNode("view", { class: "placeholder" }), vue.createCommentVNode(' //20240929 yzq 注释 这部分是拖拽组件\r\n \r\n {{ listtitle}}\r\n \r\n \r\n \r\n \r\n '), !((_a = listorder.value) == null ? void 0 : _a.length) && !((_b = arr.value) == null ? void 0 : _b.length) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title f-col aic", style: { "padding-top": "30rpx" } }, " 暂无权限,请联系管理员! ")) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "content" }, [ ((_c = arr.value) == null ? void 0 : _c.length) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(arr.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: i2 }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.meta.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info_box f-row aic" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.children, (e2, i3) => { return vue.openBlock(), vue.createElementBlock("view", { class: "info f-col aic", onClick: ($event) => jump(e2.path), key: i3 }, [ vue.createElementVNode("view", { class: "img f-row aic" }, [ vue.createElementVNode("image", { src: `../../static/office/${e2.meta.icon}.png` }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "text" }, vue.toDisplayString(e2.meta.title), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]) ], 2 /* CLASS */ ); }; } }; const PagesTabOffice = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-305a3c9f"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/tab/office.vue"]]); const _imports_0$4 = "/static/tab/scan.png"; const _imports_1$2 = "/static/my/open.png"; const _imports_2$1 = "/static/my/close.png"; const _sfc_main$D = { __name: "my", setup(__props) { const store = useStore(); const currentVersion = vue.ref(plus.runtime.version); const arr = vue.ref([ // { // img: '../../static/my/biao.png', // text: '值班表查询', // path: '/pages/zhiban/index' // }, // { // img: '../../static/my/xiaoxi.png', // text: '接受消息推送', // path: '' // } // , { // img: '../../static/my/dingwei.png', // text: '开启定位', // path: '' // }, { // img: '../../static/my/shengji.png', // text: '软件升级', // path: '' // }, ]); const messageSwitch = vue.ref(false); const positionSwitch = vue.ref(store.positionSwitch); const jump = (url) => { if (!url) return; beforeJump(url, () => { uni.navigateTo({ url }); }); }; const toProfile = (url) => { uni.navigateTo({ url }); }; const position = () => { positionSwitch.value = !positionSwitch.value; uni.setStorageSync("positionSwitch", positionSwitch.value); store.setPositionSwitch(positionSwitch.value); if (!positionSwitch.value) { toast("定位已关闭"); } getLocation(); }; const scan = () => { uni.scanCode({ success: function(res) { plus.runtime.openWeb(res.result); } }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createElementVNode("view", { class: "nav" }, [ vue.createElementVNode("view", { class: "user f-row aic" }, [ vue.createElementVNode("view", { class: "avatar" }, [ vue.createElementVNode("image", { onClick: _cache[0] || (_cache[0] = ($event) => toProfile("/pages/useredit/useredit")), src: vue.unref(imgUrl)(vue.unref(store).userinfo.avatar), mode: "" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "f-row aic jcb right" }, [ vue.createElementVNode("view", { class: "name_job", onClick: _cache[1] || (_cache[1] = ($event) => toProfile("/pages/useredit/useredit")) }, [ vue.createElementVNode("view", { class: "f-row aic" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(vue.unref(store).userinfo.realname), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "job" }, vue.toDisplayString(vue.unref(store).role), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "shezhi" }, [ vue.createElementVNode("image", { onClick: scan, style: { "width": "50rpx", "height": "50rpx", "margin-right": "20rpx" }, src: _imports_0$4 }), vue.createCommentVNode(` \r `) ]) ]) ]), vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "msg f-row aic jca" }, [ vue.createCommentVNode(` \r \r {{todoNum}}\r \r 个人办公\r `), vue.createElementVNode("view", { class: "box f-col aic" }, [ vue.createElementVNode("view", { class: "num" }, vue.toDisplayString(0)), vue.createElementVNode("text", null, "步数") ]), vue.createElementVNode("view", { class: "box f-col aic", onClick: _cache[2] || (_cache[2] = ($event) => jump("/pages/useredit/addressbook")) }, [ vue.createElementVNode("view", { class: "num" }, " 0 "), vue.createElementVNode("text", null, "通讯录") ]) ]) ]) ]), vue.createElementVNode("view", { class: "operate" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(arr.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "f-row aic jcb item", key: i2, onClick: ($event) => jump(item.path) }, [ vue.createElementVNode("view", { class: "left f-row aic" }, [ vue.createElementVNode("image", { src: item.img, mode: "" }, null, 8, ["src"]), vue.createElementVNode( "text", null, vue.toDisplayString(item.text), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right f-row aic" }, [ vue.createCommentVNode(' \r\n \r\n '), vue.withDirectives(vue.createElementVNode( "view", { class: "switch", onClick: _cache[3] || (_cache[3] = ($event) => messageSwitch.value = !messageSwitch.value) }, [ vue.withDirectives(vue.createElementVNode( "image", { src: _imports_1$2, mode: "" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, messageSwitch.value] ]), vue.withDirectives(vue.createElementVNode( "image", { src: _imports_2$1, mode: "" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, !messageSwitch.value] ]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, i2 == 0] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "switch", onClick: position }, [ vue.withDirectives(vue.createElementVNode( "image", { src: _imports_1$2, mode: "" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, positionSwitch.value] ]), vue.withDirectives(vue.createElementVNode( "image", { src: _imports_2$1, mode: "" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, !positionSwitch.value] ]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, i2 == 2] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "version" }, " 当前版本v" + vue.toDisplayString(currentVersion.value), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, i2 == 3] ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 2 /* CLASS */ ); }; } }; const PagesTabMy = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-2086c871"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/tab/my.vue"]]); const _sfc_main$C = { __name: "tasklistCom", props: { taskArr: { type: Array, default: () => [] }, currentIndex: { type: Number, default: 0 } }, emits: ["jump"], setup(__props, { emit: __emit }) { const { proxy } = vue.getCurrentInstance(); const emit = __emit; const tojump = (url) => { emit("jump", url); }; const handleClaim = (id) => { claimApi({ taskId: id }).then((res) => { if (res.success) { uni.redirectTo({ url: "./index?id=0" }); proxy.$toast(res.message); } }); }; const callBackProcess = (id) => { callBackProcessApi({ processInstanceId: id }).then((res) => { if (res.success) { uni.redirectTo({ url: "./self" }); proxy.$toast(res.message); } }); }; const invalidProcess = (id) => { invalidProcessApi({ processInstanceId: id }).then((res) => { if (res.success) { uni.redirectTo({ url: "./self" }); proxy.$toast(res.message); } }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(__props.taskArr, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list", key: i2, onClick: ($event) => tojump(`/pages/task/handle?info=${JSON.stringify(item)}&type=${__props.currentIndex}`) }, [ vue.createElementVNode("view", { class: "title f-row aic jcb" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", null, vue.toDisplayString(item.bpmBizTitle), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", null, vue.toDisplayString(item.durationStr), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode( "view", null, " 申请理由:" + vue.toDisplayString(item.bpmBizTitle), 1 /* TEXT */ ), __props.currentIndex != 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, " 当前环节:" + vue.toDisplayString(item.taskName), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", null, " 流程名称:" + vue.toDisplayString(item.processDefinitionName), 1 /* TEXT */ ), vue.createElementVNode( "view", null, " 发起人:" + vue.toDisplayString(item.processApplyUserName), 1 /* TEXT */ ), vue.createElementVNode( "view", null, " 开始时间:" + vue.toDisplayString(item.taskBeginTime), 1 /* TEXT */ ), item.taskEndTime ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, " 结束时间:" + vue.toDisplayString(item.taskEndTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), __props.currentIndex == 0 && item.taskAssigneeName ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn f-row aic jcb" }, [ vue.createElementVNode("view", { class: "entrust", onClick: vue.withModifiers(($event) => tojump(`/pages/userlist/index?isradio=1&id=${item.id}`), ["stop"]) }, " 委托 ", 8, ["onClick"]), vue.createElementVNode("view", { class: "handle", onClick: ($event) => tojump(`/pages/task/handle?info=${JSON.stringify(item)}&type=${__props.currentIndex}`) }, " 办理 ", 8, ["onClick"]) ])) : vue.createCommentVNode("v-if", true), __props.currentIndex == 0 && !item.taskAssigneeName ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn f-row aic jcb" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "handle", onClick: vue.withModifiers(($event) => handleClaim(item.id), ["stop"]) }, " 签收 ", 8, ["onClick"]) ])) : vue.createCommentVNode("v-if", true), __props.currentIndex == 2 && !item.endTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "btn f-row aic jcb" }, [ vue.createElementVNode("view", { class: "entrust", onClick: vue.withModifiers(($event) => invalidProcess(item.processInstanceId), ["stop"]) }, " 作废流程 ", 8, ["onClick"]), vue.createElementVNode("view", { class: "handle", onClick: vue.withModifiers(($event) => callBackProcess(item.processInstanceId), ["stop"]) }, " 取回流程 ", 8, ["onClick"]) ])) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]); }; } }; const tasklistCom = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-a83f61d7"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/tasklistCom.vue"]]); const _sfc_main$B = { __name: "index", setup(__props) { const store = useStore(); let processDefinitionName = ""; onLoad((options) => { currentIndex.value = +options.id; processDefinitionName = options.title; }); onShow(() => { taskArr.value = []; pageNo = 1; pageSize = 10; loading2 = false; taskList(); }); const tabArr = vue.ref([ { text: "我的任务", id: 0 }, { text: "历史任务", id: 1 } ]); vue.ref(""); const currentIndex = vue.ref(0); let pageNo = 1; let pageSize = 10; let loading2 = false; const taskArr = vue.ref([]); const taskList = () => { loading2 = true; uni.showLoading({ title: "加载中..." }); let getlist = currentIndex.value == 0 ? taskListApi : taskHistoryListApi; getlist({ // createTime: date.value ? date.value + ' 00:00:00' : '', pageNo, pageSize, _t: (/* @__PURE__ */ new Date()).getTime(), processDefinitionName }).then((res) => { var _a; if (res.success) { if (!res.result.records.length) return toast("没有更多了~"); taskArr.value = [...taskArr.value, ...((_a = res == null ? void 0 : res.result) == null ? void 0 : _a.records) || []]; loading2 = false; } }).catch((err) => { formatAppLog("log", "at pages/task/index.vue:84", err); }); }; const change = (i2) => { taskArr.value = []; pageNo = 1; pageSize = 10; loading2 = false; currentIndex.value = i2; taskList(); }; onReachBottom(() => { if (loading2) return; pageNo++; taskList(); }); onPullDownRefresh(() => { pageNo = 1; pageSize = 10; loading2 = false; taskArr.value = []; taskList(); uni.stopPullDownRefresh(); }); const jump = (url) => { beforeJump(url, () => { uni.navigateTo({ url }); }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createElementVNode("view", { class: "nav" }, [ vue.createElementVNode("view", { class: "tab_box f-row aic jca" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(tabArr.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass({ "active": i2 == currentIndex.value }), key: i2, onClick: ($event) => change(i2) }, vue.toDisplayString(item.text), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "tasklist" }, [ vue.createVNode(tasklistCom, { onJump: jump, taskArr: taskArr.value, currentIndex: currentIndex.value }, null, 8, ["taskArr", "currentIndex"]) ]) ], 2 /* CLASS */ ); }; } }; const PagesTaskIndex = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-3dabfb60"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/task/index.vue"]]); class MPAnimation { constructor(options, _this) { this.options = options; this.animation = uni.createAnimation({ ...options }); this.currentStepAnimates = {}; this.next = 0; this.$ = _this; } _nvuePushAnimates(type, args) { let aniObj = this.currentStepAnimates[this.next]; let styles = {}; if (!aniObj) { styles = { styles: {}, config: {} }; } else { styles = aniObj; } if (animateTypes1.includes(type)) { if (!styles.styles.transform) { styles.styles.transform = ""; } let unit = ""; if (type === "rotate") { unit = "deg"; } styles.styles.transform += `${type}(${args + unit}) `; } else { styles.styles[type] = `${args}`; } this.currentStepAnimates[this.next] = styles; } _animateRun(styles = {}, config = {}) { let ref = this.$.$refs["ani"].ref; if (!ref) return; return new Promise((resolve, reject) => { nvueAnimation.transition(ref, { styles, ...config }, (res) => { resolve(); }); }); } _nvueNextAnimate(animates, step = 0, fn) { let obj = animates[step]; if (obj) { let { styles, config } = obj; this._animateRun(styles, config).then(() => { step += 1; this._nvueNextAnimate(animates, step, fn); }); } else { this.currentStepAnimates = {}; typeof fn === "function" && fn(); this.isEnd = true; } } step(config = {}) { this.animation.step(config); return this; } run(fn) { this.$.animationData = this.animation.export(); this.$.timer = setTimeout(() => { typeof fn === "function" && fn(); }, this.$.durationTime); } } const animateTypes1 = [ "matrix", "matrix3d", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "skew", "skewX", "skewY", "translate", "translate3d", "translateX", "translateY", "translateZ" ]; const animateTypes2 = ["opacity", "backgroundColor"]; const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"]; animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => { MPAnimation.prototype[type] = function(...args) { this.animation[type](...args); return this; }; }); function createAnimation(option, _this) { if (!_this) return; clearTimeout(_this.timer); return new MPAnimation(option, _this); } const _sfc_main$A = { name: "uniTransition", emits: ["click", "change"], props: { show: { type: Boolean, default: false }, modeClass: { type: [Array, String], default() { return "fade"; } }, duration: { type: Number, default: 300 }, styles: { type: Object, default() { return {}; } }, customClass: { type: String, default: "" }, onceRender: { type: Boolean, default: false } }, data() { return { isShow: false, transform: "", opacity: 1, animationData: {}, durationTime: 300, config: {} }; }, watch: { show: { handler(newVal) { if (newVal) { this.open(); } else { if (this.isShow) { this.close(); } } }, immediate: true } }, computed: { // 生成样式数据 stylesObject() { let styles = { ...this.styles, "transition-duration": this.duration / 1e3 + "s" }; let transform = ""; for (let i2 in styles) { let line = this.toLine(i2); transform += line + ":" + styles[i2] + ";"; } return transform; }, // 初始化动画条件 transformStyles() { return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject; } }, created() { this.config = { duration: this.duration, timingFunction: "ease", transformOrigin: "50% 50%", delay: 0 }; this.durationTime = this.duration; }, methods: { /** * ref 触发 初始化动画 */ init(obj = {}) { if (obj.duration) { this.durationTime = obj.duration; } this.animation = createAnimation(Object.assign(this.config, obj), this); }, /** * 点击组件触发回调 */ onClick() { this.$emit("click", { detail: this.isShow }); }, /** * ref 触发 动画分组 * @param {Object} obj */ step(obj, config = {}) { if (!this.animation) return; for (let i2 in obj) { try { if (typeof obj[i2] === "object") { this.animation[i2](...obj[i2]); } else { this.animation[i2](obj[i2]); } } catch (e2) { formatAppLog("error", "at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:148", `方法 ${i2} 不存在`); } } this.animation.step(config); return this; }, /** * ref 触发 执行动画 */ run(fn) { if (!this.animation) return; this.animation.run(fn); }, // 开始过度动画 open() { clearTimeout(this.timer); this.transform = ""; this.isShow = true; let { opacity, transform } = this.styleInit(false); if (typeof opacity !== "undefined") { this.opacity = opacity; } this.transform = transform; this.$nextTick(() => { this.timer = setTimeout(() => { this.animation = createAnimation(this.config, this); this.tranfromInit(false).step(); this.animation.run(); this.$emit("change", { detail: this.isShow }); }, 20); }); }, // 关闭过度动画 close(type) { if (!this.animation) return; this.tranfromInit(true).step().run(() => { this.isShow = false; this.animationData = null; this.animation = null; let { opacity, transform } = this.styleInit(false); this.opacity = opacity || 1; this.transform = transform; this.$emit("change", { detail: this.isShow }); }); }, // 处理动画开始前的默认样式 styleInit(type) { let styles = { transform: "" }; let buildStyle = (type2, mode) => { if (mode === "fade") { styles.opacity = this.animationType(type2)[mode]; } else { styles.transform += this.animationType(type2)[mode] + " "; } }; if (typeof this.modeClass === "string") { buildStyle(type, this.modeClass); } else { this.modeClass.forEach((mode) => { buildStyle(type, mode); }); } return styles; }, // 处理内置组合动画 tranfromInit(type) { let buildTranfrom = (type2, mode) => { let aniNum = null; if (mode === "fade") { aniNum = type2 ? 0 : 1; } else { aniNum = type2 ? "-100%" : "0"; if (mode === "zoom-in") { aniNum = type2 ? 0.8 : 1; } if (mode === "zoom-out") { aniNum = type2 ? 1.2 : 1; } if (mode === "slide-right") { aniNum = type2 ? "100%" : "0"; } if (mode === "slide-bottom") { aniNum = type2 ? "100%" : "0"; } } this.animation[this.animationMode()[mode]](aniNum); }; if (typeof this.modeClass === "string") { buildTranfrom(type, this.modeClass); } else { this.modeClass.forEach((mode) => { buildTranfrom(type, mode); }); } return this.animation; }, animationType(type) { return { fade: type ? 0 : 1, "slide-top": `translateY(${type ? "0" : "-100%"})`, "slide-right": `translateX(${type ? "0" : "100%"})`, "slide-bottom": `translateY(${type ? "0" : "100%"})`, "slide-left": `translateX(${type ? "0" : "-100%"})`, "zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`, "zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})` }; }, // 内置动画类型与实际动画对应字典 animationMode() { return { fade: "opacity", "slide-top": "translateY", "slide-right": "translateX", "slide-bottom": "translateY", "slide-left": "translateX", "zoom-in": "scale", "zoom-out": "scale" }; }, // 驼峰转中横线 toLine(name) { return name.replace(/([A-Z])/g, "-$1").toLowerCase(); } } }; function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", { ref: "ani", animation: $data.animationData, class: vue.normalizeClass($props.customClass), style: vue.normalizeStyle($options.transformStyles), onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "default") ], 14, ["animation"])), [ [vue.vShow, $data.isShow] ]); } const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$8], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]); const _sfc_main$z = { name: "uniPopup", components: {}, emits: ["change", "maskClick"], props: { // 开启动画 animation: { type: Boolean, default: true }, // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层 // message: 消息提示 ; dialog : 对话框 type: { type: String, default: "center" }, // maskClick isMaskClick: { type: Boolean, default: null }, // TODO 2 个版本后废弃属性 ,使用 isMaskClick maskClick: { type: Boolean, default: null }, backgroundColor: { type: String, default: "none" }, safeArea: { type: Boolean, default: true }, maskBackgroundColor: { type: String, default: "rgba(0, 0, 0, 0.4)" }, borderRadius: { type: String } }, watch: { /** * 监听type类型 */ type: { handler: function(type) { if (!this.config[type]) return; this[this.config[type]](true); }, immediate: true }, isDesktop: { handler: function(newVal) { if (!this.config[newVal]) return; this[this.config[this.type]](true); }, immediate: true }, /** * 监听遮罩是否可点击 * @param {Object} val */ maskClick: { handler: function(val) { this.mkclick = val; }, immediate: true }, isMaskClick: { handler: function(val) { this.mkclick = val; }, immediate: true }, // H5 下禁止底部滚动 showPopup(show) { } }, data() { return { duration: 300, ani: [], showPopup: false, showTrans: false, popupWidth: 0, popupHeight: 0, config: { top: "top", bottom: "bottom", center: "center", left: "left", right: "right", message: "top", dialog: "center", share: "bottom" }, maskClass: { position: "fixed", bottom: 0, top: 0, left: 0, right: 0, backgroundColor: "rgba(0, 0, 0, 0.4)" }, transClass: { backgroundColor: "transparent", borderRadius: this.borderRadius || "0", position: "fixed", left: 0, right: 0 }, maskShow: true, mkclick: true, popupstyle: "top" }; }, computed: { getStyles() { let res = { backgroundColor: this.bg }; if (this.borderRadius || "0") { res = Object.assign(res, { borderRadius: this.borderRadius }); } return res; }, isDesktop() { return this.popupWidth >= 500 && this.popupHeight >= 500; }, bg() { if (this.backgroundColor === "" || this.backgroundColor === "none") { return "transparent"; } return this.backgroundColor; } }, mounted() { const fixSize = () => { const { windowWidth, windowHeight, windowTop, safeArea, screenHeight, safeAreaInsets } = uni.getSystemInfoSync(); this.popupWidth = windowWidth; this.popupHeight = windowHeight + (windowTop || 0); if (safeArea && this.safeArea) { this.safeAreaInsets = safeAreaInsets.bottom; } else { this.safeAreaInsets = 0; } }; fixSize(); }, // TODO vue3 unmounted() { this.setH5Visible(); }, activated() { this.setH5Visible(!this.showPopup); }, deactivated() { this.setH5Visible(true); }, created() { if (this.isMaskClick === null && this.maskClick === null) { this.mkclick = true; } else { this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick; } if (this.animation) { this.duration = 300; } else { this.duration = 0; } this.messageChild = null; this.clearPropagation = false; this.maskClass.backgroundColor = this.maskBackgroundColor; }, methods: { setH5Visible(visible = true) { }, /** * 公用方法,不显示遮罩层 */ closeMask() { this.maskShow = false; }, /** * 公用方法,遮罩层禁止点击 */ disableMask() { this.mkclick = false; }, // TODO nvue 取消冒泡 clear(e2) { e2.stopPropagation(); this.clearPropagation = true; }, open(direction) { if (this.showPopup) { return; } let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"]; if (!(direction && innerType.indexOf(direction) !== -1)) { direction = this.type; } if (!this.config[direction]) { formatAppLog("error", "at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:298", "缺少类型:", direction); return; } this[this.config[direction]](); this.$emit("change", { show: true, type: direction }); }, close(type) { this.showTrans = false; this.$emit("change", { show: false, type: this.type }); clearTimeout(this.timer); this.timer = setTimeout(() => { this.showPopup = false; }, 300); }, // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容 touchstart() { this.clearPropagation = false; }, onTap() { if (this.clearPropagation) { this.clearPropagation = false; return; } this.$emit("maskClick"); if (!this.mkclick) return; this.close(); }, /** * 顶部弹出样式处理 */ top(type) { this.popupstyle = this.isDesktop ? "fixforpc-top" : "top"; this.ani = ["slide-top"]; this.transClass = { position: "fixed", left: 0, right: 0, backgroundColor: this.bg, borderRadius: this.borderRadius || "0" }; if (type) return; this.showPopup = true; this.showTrans = true; this.$nextTick(() => { if (this.messageChild && this.type === "message") { this.messageChild.timerClose(); } }); }, /** * 底部弹出样式处理 */ bottom(type) { this.popupstyle = "bottom"; this.ani = ["slide-bottom"]; this.transClass = { position: "fixed", left: 0, right: 0, bottom: 0, paddingBottom: this.safeAreaInsets + "px", backgroundColor: this.bg, borderRadius: this.borderRadius || "0" }; if (type) return; this.showPopup = true; this.showTrans = true; }, /** * 中间弹出样式处理 */ center(type) { this.popupstyle = "center"; this.ani = ["zoom-out", "fade"]; this.transClass = { position: "fixed", display: "flex", flexDirection: "column", bottom: 0, left: 0, right: 0, top: 0, justifyContent: "center", alignItems: "center", borderRadius: this.borderRadius || "0" }; if (type) return; this.showPopup = true; this.showTrans = true; }, left(type) { this.popupstyle = "left"; this.ani = ["slide-left"]; this.transClass = { position: "fixed", left: 0, bottom: 0, top: 0, backgroundColor: this.bg, borderRadius: this.borderRadius || "0", display: "flex", flexDirection: "column" }; if (type) return; this.showPopup = true; this.showTrans = true; }, right(type) { this.popupstyle = "right"; this.ani = ["slide-right"]; this.transClass = { position: "fixed", bottom: 0, right: 0, top: 0, backgroundColor: this.bg, borderRadius: this.borderRadius || "0", display: "flex", flexDirection: "column" }; if (type) return; this.showPopup = true; this.showTrans = true; } } }; function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$3); return $data.showPopup ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]]) }, [ vue.createElementVNode( "view", { onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args)) }, [ $data.maskShow ? (vue.openBlock(), vue.createBlock(_component_uni_transition, { key: "1", name: "mask", "mode-class": "fade", styles: $data.maskClass, duration: $data.duration, show: $data.showTrans, onClick: $options.onTap }, null, 8, ["styles", "duration", "show", "onClick"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_uni_transition, { key: "2", "mode-class": $data.ani, name: "content", styles: $data.transClass, duration: $data.duration, show: $data.showTrans, onClick: $options.onTap }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]), style: vue.normalizeStyle($options.getStyles), onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["mode-class", "styles", "duration", "show", "onClick"]) ], 32 /* NEED_HYDRATION */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true); } const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$7], ["__scopeId", "data-v-4dd3c44b"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]); const _sfc_main$y = { __name: "handle", setup(__props) { const store = useStore(); const { proxy } = vue.getCurrentInstance(); const popup = vue.ref(null); const reason = vue.ref(""); const status = vue.ref(null); const openpop = (val) => { status.value = val; popup.value.open(); reason.value = val == 2 ? "同意" : ""; }; const closepop = () => { popup.value.close(); }; const comp = vue.ref(null); const dataId = vue.ref(""); const getProcessNodeInfo = (taskId) => { getProcessNodeInfoApi({ taskId }).then((res) => { if (res.success) { dataId.value = res.result.dataId; comp.value = res.result.formUrlMobile; } }); }; const back = () => { uni.navigateBack(); }; const chooseNextPerson = vue.ref(false); let nextnode = null; const handleProcess = () => { let params = {}; if (status.value == 1) { if (currentnode.value == null) return proxy.$toast("请选择驳回节点"); params.processModel = 3; params.rejectModelNode = stepNode.value[currentnode.value].TASK_DEF_KEY_; processComplete(params); } else { if (chooseNextPerson.value) { beforeJump("/pages/userlist/index", () => { closepop(); uni.navigateTo({ url: `/pages/userlist/index?id=${taskInfo.value.id}&isradio=1&nextnode=${JSON.stringify(nextnode)}&reason=${reason.value}` }); }); } else { params.processModel = 1; processComplete(params); } } }; const processComplete = (params) => { processCompleteApi({ taskId: taskInfo.value.id, reason: reason.value, ...params }).then((res) => { if (res.success) { proxy.$toast(res.message); setTimeout(() => { uni.navigateBack(); }, 2e3); } }); }; const stepNode = vue.ref([]); const currentnode = vue.ref(null); const nodeChange = (e2) => { currentnode.value = e2.detail.value; }; const getProcessTaskTransInfo = (e2) => { getProcessTaskTransInfoApi({ taskId: taskInfo.value.id }).then((res) => { if (res.success) { stepNode.value = res.result.histListNode; nextnode = res.result.transitionList; } }); }; const getHisProcessNodeInfo = (procInstId) => { getHisProcessNodeInfoApi({ procInstId }).then((res) => { if (res.success) { dataId.value = res.result.dataId; comp.value = res.result.formUrlMobile; } }); }; const taskInfo = vue.ref(null); let type = null; onLoad((options) => { taskInfo.value = JSON.parse(options.info); type = options.type; if (type == 1 || type == 2) { return getHisProcessNodeInfo(taskInfo.value.processInstanceId); } getProcessNodeInfo(taskInfo.value.id); getProcessTaskTransInfo(); }); return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createVNode(customNav, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "f-row aic box" }, [ vue.createElementVNode("view", { class: "back", onClick: back }, [ vue.createVNode(_component_uni_icons, { type: "left", size: "20", color: "#fff" }) ]), vue.createElementVNode("view", { class: "avatar" }, [ vue.createElementVNode("image", { src: vue.unref(imgUrl)(vue.unref(store).userinfo.avatar), mode: "" }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(taskInfo.value.processApplyUserName) + "的" + vue.toDisplayString(taskInfo.value.processDefinitionName), 1 /* TEXT */ ), vue.unref(type) == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "status" }, " 待审批 ")) : vue.createCommentVNode("v-if", true), vue.unref(type) == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "status", style: { "background-color": "#7AC756" } }, " 已处理 ")) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }), (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(comp.value), { dataId: dataId.value }, null, 8, ["dataId"])), vue.unref(type) == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn f-row aic jcb" }, [ vue.createElementVNode("view", { class: "refuse", onClick: _cache[0] || (_cache[0] = ($event) => openpop(1)) }, " 拒绝 "), vue.createElementVNode("view", { class: "agree", onClick: _cache[1] || (_cache[1] = ($event) => openpop(2)) }, " 同意 ") ])) : vue.createCommentVNode("v-if", true), vue.createVNode( _component_uni_popup, { ref_key: "popup", ref: popup, type: "center" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup" }, [ vue.createElementVNode("view", { class: "title" }, " 审批意见 "), vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "input f-col" }, [ vue.withDirectives(vue.createElementVNode( "textarea", { "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => reason.value = $event), name: "", id: "", maxlength: "200", placeholder: "请输入" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, reason.value] ]), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(reason.value.length) + "/200 ", 1 /* TEXT */ ) ]) ]), status.value == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "agree_operate f-row aic", onClick: _cache[3] || (_cache[3] = ($event) => chooseNextPerson.value = !chooseNextPerson.value) }, [ chooseNextPerson.value ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_0$6, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_1$4, mode: "" })), vue.createElementVNode("view", { class: "" }, " 指定下一步操作人 ") ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "" }, [ vue.createElementVNode("picker", { value: currentnode.value, range: stepNode.value, "range-key": "NAME_", onChange: nodeChange }, [ vue.createElementVNode( "view", { class: "node" }, vue.toDisplayString(currentnode.value != null ? stepNode.value[currentnode.value].NAME_ : "请选择驳回节点"), 1 /* TEXT */ ) ], 40, ["value", "range"]) ])), vue.createElementVNode("view", { class: "popbtn f-row aic" }, [ vue.createElementVNode("view", { class: "cancel", onClick: closepop }, " 取消 "), vue.createElementVNode("view", { class: "confirm", onClick: handleProcess }, " 确定 ") ]) ]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ], 2 /* CLASS */ ); }; } }; const PagesTaskHandle = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-aeec6874"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/task/handle.vue"]]); const _imports_0$3 = "/static/system.png"; const _sfc_main$x = { __name: "message_list", setup(__props) { const store = useStore(); const jump = (url) => { beforeJump(url, () => { uni.navigateTo({ url }); }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createElementVNode("view", { class: "list" }, [ vue.createElementVNode("view", { class: "item f-row aic" }, [ vue.createElementVNode("view", { class: "f-row aic" }, [ vue.createElementVNode("image", { src: _imports_0$3, mode: "" }) ]), vue.createElementVNode("view", { class: "name_info" }, [ vue.createElementVNode("view", { class: "name_time f-row aic jcb" }, [ vue.createElementVNode("view", { class: "name" }, " 系统通知 "), vue.createElementVNode("view", { class: "time" }, " 1分钟前 ") ]), vue.createElementVNode("view", { class: "info" }, " 关于年假通知关于年假通知关于年假通知关于年假通知关于年假通知关于年假通知关于年假通知 ") ]) ]), (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(5, (item, i2) => { return vue.createElementVNode("view", { class: "item f-row aic", key: i2, onClick: _cache[0] || (_cache[0] = ($event) => jump("/pages/talk/conversation")) }, [ vue.createElementVNode("view", { class: "f-row aic" }, [ vue.createElementVNode("image", { src: "", mode: "" }) ]), vue.createElementVNode("view", { class: "name_info" }, [ vue.createElementVNode("view", { class: "name_time f-row aic jcb" }, [ vue.createElementVNode("view", { class: "name" }, " 系统通知 "), vue.createElementVNode("view", { class: "time" }, " 1分钟前 ") ]), vue.createElementVNode("view", { class: "info" }, " 关于年假通知 ") ]) ]); }), 64 /* STABLE_FRAGMENT */ )) ]) ], 2 /* CLASS */ ); }; } }; const PagesTalkMessageList = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-e2a9a302"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/talk/message_list.vue"]]); const _sfc_main$w = { __name: "conversation", setup(__props) { const store = useStore(); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "list" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(14, (item, i2) => { return vue.createElementVNode("view", { class: "item", key: i2 }, [ vue.withDirectives(vue.createElementVNode( "view", { class: "left f-row aic" }, [ vue.createElementVNode("view", { class: "avatar f-row aic" }, [ vue.createElementVNode("image", { src: _imports_0$3, mode: "" }) ]), vue.createElementVNode("view", { class: "content" }, " 你今天在干嘛呢?为什么这么久不回我信息,真的生气了 ") ], 512 /* NEED_PATCH */ ), [ [vue.vShow, i2 % 2 == 0] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "right f-row aic" }, [ vue.createElementVNode("view", { class: "content" }, " 请问如何退款? "), vue.createElementVNode("view", { class: "avatar f-row aic" }, [ vue.createElementVNode("image", { src: "", mode: "" }) ]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, i2 % 2 != 0] ]) ]); }), 64 /* STABLE_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "input_box f-row aic jce" }, [ vue.createElementVNode("input", { type: "text", placeholder: "请输入内容......", "placeholder-style": "font-size: 28rpx;color: #999999;" }), vue.createElementVNode("view", { class: "send" }, " 发送 ") ]) ], 2 /* CLASS */ ); }; } }; const PagesTalkConversation = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-696a96aa"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/talk/conversation.vue"]]); const _sfc_main$v = { __name: "system", setup(__props) { const store = useStore(); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "list" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(3, (item, i2) => { return vue.createElementVNode("view", { class: "item", key: i2 }, [ vue.createElementVNode("view", { class: "left f-row aic" }, [ vue.createElementVNode("view", { class: "avatar f-row aic" }, [ vue.createElementVNode("image", { src: _imports_0$3, mode: "" }) ]), vue.createElementVNode("view", { class: "content" }, " 你今天在干嘛呢?为什么这么久不回我信息,真的生气了 ") ]) ]); }), 64 /* STABLE_FRAGMENT */ )) ]) ], 2 /* CLASS */ ); }; } }; const PagesTalkSystem = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-5621beca"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/talk/system.vue"]]); const _imports_0$2 = "/static/search.png"; const _sfc_main$u = { __name: "index", setup(__props) { vue.useCssVars((_ctx) => ({ "ae7a950b-cusnavbarheight": _ctx.cusnavbarheight })); const store = useStore(); const showicon = vue.ref(true); const searchKey = vue.ref(""); const list = vue.ref([]); let pageNo = 1; let pageSize = 15; let loading2 = false; const bpmlist = () => { loading2 = true; bpmlistApi({ pageNo, pageSize, fwbt: formatSearchkey() }).then((res) => { if (res.success) { list.value = [...list.value, ...formatObj(res.result.records, "fwbt", "fwtime", null)]; } loading2 = false; }).catch((err) => { formatAppLog("log", "at pages/document/index.vue:89", "err", err); }); }; const zhidu = () => { loading2 = true; let getzhidu = zhiduid == 0 ? zhiduApi : cjzhiduApi; getzhidu({ pageNo, pageSize, zdmc: formatSearchkey() }).then((res) => { if (res.success) { let str = zhiduid == 0 ? "zbbm_dictText" : "sbbm"; list.value = [...list.value, ...formatObj(res.result.records, "zdmc", str, null)]; } loading2 = false; }).catch((err) => { formatAppLog("log", "at pages/document/index.vue:108", "err", err); }); }; const fagui = () => { loading2 = true; faguiApi({ pageNo, pageSize, flfgmc: formatSearchkey() }).then((res) => { if (res.success) { list.value = [...list.value, ...formatObj(res.result.records, "flfgmc", "ssbm", null)]; } loading2 = false; }).catch((err) => { formatAppLog("log", "at pages/document/index.vue:125", "err", err); }); }; const gonggaolist = () => { loading2 = true; gonggaolistApi({ pageNo, pageSize, neirong: formatSearchkey() }).then((res) => { if (res.success) { list.value = [...list.value, ...formatObj(res.result.records, "neirong", "fbdw", "createTime")]; } loading2 = false; }).catch((err) => { formatAppLog("log", "at pages/document/index.vue:142", "err", err); }); }; const formatObj = (arr, title, time, depart) => { arr.map((item) => { item["_title"] = item[title]; item["_time"] = item[time]; item["_depart"] = item[depart]; }); return arr; }; const formatSearchkey = () => { if (searchKey.value.trim()) { return "*" + searchKey.value + "*"; } }; const search = () => { pageNo = 1; loading2 = false; list.value = []; getlist(); }; vue.watch(searchKey, (nval, oval) => { if (!nval.trim()) { getlist(); } }); const back = () => { uni.navigateBack(); }; const jump = (url, item) => { if (id.value == 3) { return opendocument(item.mingcheng); } beforeJump(url, () => { uni.navigateTo({ url }); }); }; const id = vue.ref(null); let zhiduid = null; onLoad((options) => { id.value = options.id; zhiduid = options.zhiduid; getlist(); }); const getlist = () => { if (id.value == 0) { bpmlist(); } else if (id.value == 1) { gonggaolist(); } else if (id.value == 2) { zhidu(); } else if (id.value == 3) { fagui(); } }; onPullDownRefresh(() => { pageNo = 1; loading2 = false; list.value = []; getlist(); uni.stopPullDownRefresh(); }); onReachBottom(() => { if (loading2) return; pageNo++; getlist(); }); return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createVNode(customNav, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav_box f-row aic jcb" }, [ vue.createElementVNode("view", { class: "back f-row aic", onClick: back }, [ vue.createVNode(_component_uni_icons, { type: "left", size: "20", color: "#fff" }) ]), vue.createElementVNode("view", { class: "search f-row aic" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKey.value = $event), onConfirm: search, onBlur: _cache[1] || (_cache[1] = ($event) => showicon.value = !searchKey.value), onFocus: _cache[2] || (_cache[2] = ($event) => showicon.value = false) }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, searchKey.value] ]), showicon.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "f-row aic" }, [ vue.createElementVNode("image", { src: _imports_0$2, mode: "" }), vue.createElementVNode("text", null, "搜索") ])) : vue.createCommentVNode("v-if", true) ]) ]) ]), _: 1 /* STABLE */ }), vue.createElementVNode("view", { class: "list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(list.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: i2, onClick: ($event) => jump(`/pages/document/detail?data=${JSON.stringify(item)}&id=${id.value}`, item) }, [ vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item._title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_box f-row aic" }, [ vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item._time), 1 /* TEXT */ ), item._depart ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "look f-row aic" }, vue.toDisplayString(item._depart), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' \r\n \r\n 999+\r\n ') ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 2 /* CLASS */ ); }; } }; const PagesDocumentIndex = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-ae7a950b"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/document/index.vue"]]); const _sfc_main$t = { __name: "detail", setup(__props) { const store = useStore(); const detail = vue.ref({}); onLoad((options) => { detail.value = JSON.parse(options.data); if (options.id == 0) { detail.value.pdf = detail.value.wjbt; } else if (options.id == 2) { if (detail.value.jdwj) { detail.value.pdf = detail.value.jdwj + "," + detail.value.sszd; } else { detail.value.pdf = detail.value.sszd; } } else if (options.id == 3) { detail.value.pdf = detail.value.mingcheng; } }); return (_ctx, _cache) => { var _a, _b; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "title_box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(detail.value._title), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(detail.value._time), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "document f-row" }, [ vue.createElementVNode("text", { class: "" }, " 附件: "), vue.createElementVNode("view", { class: "f-col" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList((_b = (_a = detail.value) == null ? void 0 : _a.pdf) == null ? void 0 : _b.split(","), (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "", style: { "padding": "5rpx 0" }, onClick: ($event) => vue.unref(opendocument)(item) }, vue.toDisplayString(item), 9, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ], 2 /* CLASS */ ); }; } }; const PagesDocumentDetail = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-2c024c80"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/document/detail.vue"]]); const _sfc_main$s = { __name: "index", setup(__props) { const store = useStore(); const showicon = vue.ref(true); const searchKey = vue.ref(""); onLoad(() => { }); const jump = (url) => { beforeJump(url, () => { uni.navigateTo({ url }); }); }; const back = () => { uni.navigateBack(); }; return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createVNode(customNav, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav_box f-row aic jcb" }, [ vue.createElementVNode("view", { class: "back f-row aic", onClick: back }, [ vue.createVNode(_component_uni_icons, { type: "left", size: "20", color: "#fff" }) ]), vue.createElementVNode("view", { class: "search f-row aic" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKey.value = $event), onConfirm: _cache[1] || (_cache[1] = (...args) => _ctx.search && _ctx.search(...args)), onBlur: _cache[2] || (_cache[2] = ($event) => showicon.value = !searchKey.value), onFocus: _cache[3] || (_cache[3] = ($event) => showicon.value = false) }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, searchKey.value] ]), showicon.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "f-row aic" }, [ vue.createElementVNode("image", { src: _imports_0$2, mode: "" }), vue.createElementVNode("text", null, "搜索") ])) : vue.createCommentVNode("v-if", true) ]) ]) ]), _: 1 /* STABLE */ }), vue.createElementVNode("view", { class: "list_box" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(3, (item, i2) => { return vue.createElementVNode("view", { class: "list", key: i2, onClick: _cache[4] || (_cache[4] = ($event) => jump(`/pages/meeting/detail?id=1`)) }, [ vue.createElementVNode("view", { class: "title f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 年度部门讨论会议 "), vue.createElementVNode("text", null, "1分钟前") ]), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 发起人: "), vue.createElementVNode("text", null, "周如意") ]), vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 会议日期: "), vue.createElementVNode("text", null, "周如意") ]), vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 会议地点: "), vue.createElementVNode("text", null, "周如意") ]), vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 会议内容: "), vue.createElementVNode("text", null, "周如意") ]) ]), vue.createCommentVNode(' \r\n \r\n 拒绝\r\n \r\n \r\n 同意\r\n \r\n '), vue.createElementVNode("view", { class: "handled f-row" }, [ vue.createElementVNode("view", { class: "refused" }, " 已拒绝 "), vue.createCommentVNode(' \r\n 已同意\r\n ') ]) ]); }), 64 /* STABLE_FRAGMENT */ )) ]) ], 2 /* CLASS */ ); }; } }; const PagesMeetingIndex = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-f3707b27"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/meeting/index.vue"]]); const _sfc_main$r = { __name: "detail", setup(__props) { const store = useStore(); onLoad(() => { huiyiDetail(); }); const huiyiDetail = () => { huiyiDetailApi({ mainid: 1 }).then((res) => { if (res.success) ; }).catch((err) => { formatAppLog("log", "at pages/meeting/detail.vue:94", err); }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "list_box" }, [ vue.createElementVNode("view", { class: "list" }, [ vue.createElementVNode("view", { class: "title f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 年度部门讨论会议 "), vue.createElementVNode("text", null, "1分钟前") ]), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 会议状态: "), vue.createElementVNode("text", null, "待开始/已开始/已结束") ]), vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 发起人: "), vue.createElementVNode("text", null, "周如意") ]), vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 会议日期: "), vue.createElementVNode("text", null, "周如意") ]), vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 会议地点: "), vue.createElementVNode("text", null, "周如意") ]), vue.createElementVNode("view", { class: "f-row aic jcb" }, [ vue.createElementVNode("view", { class: "" }, " 会议内容: "), vue.createElementVNode("text", null, "周如意") ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "" }, " 参与人员: "), vue.createElementVNode("view", { class: "person f-row aic" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(7, (item, i2) => { return vue.createElementVNode("view", { class: "item f-col aic", key: i2 }, [ vue.createElementVNode("image", { src: "", mode: "" }), vue.createElementVNode("view", { class: "name" }, " 周如意 ") ]); }), 64 /* STABLE_FRAGMENT */ )) ]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "btn f-row aic jcb" }, [ vue.createElementVNode("view", { class: "refuse" }, " 拒绝 "), vue.createElementVNode("view", { class: "agree", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.openpop && _ctx.openpop(...args)) }, " 同意 ") ]) ], 2 /* CLASS */ ); }; } }; const PagesMeetingDetail = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ee2c785f"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/meeting/detail.vue"]]); const pages = [ { path: "pages/login/login", style: { navigationStyle: "custom" } }, { path: "pages/tab/index", style: { navigationStyle: "custom", enablePullDownRefresh: true } }, { path: "pages/task/todotask", style: { navigationStyle: "custom", enablePullDownRefresh: true } }, { path: "pages/tab/office", style: { navigationStyle: "custom" } }, { path: "pages/tab/my", style: { navigationStyle: "custom" } }, { path: "pages/task/index", style: { enablePullDownRefresh: true, "app-plus": { titleNView: { titleText: "我的任务", titleColor: "#fff" } } } }, { path: "pages/task/handle", style: { navigationStyle: "custom" } }, { path: "pages/talk/message_list", style: { navigationBarTitleText: "消息", enablePullDownRefresh: true, navigationBarTextStyle: "white" } }, { path: "pages/talk/conversation", style: { navigationBarTitleText: "昵称", enablePullDownRefresh: true, navigationBarTextStyle: "white" } }, { path: "pages/talk/system", style: { navigationBarTitleText: "系统通知", enablePullDownRefresh: true, navigationBarTextStyle: "white" } }, { path: "pages/document/index", style: { navigationStyle: "custom", enablePullDownRefresh: true } }, { path: "pages/document/detail", style: { navigationBarTitleText: "详情", navigationBarTextStyle: "white" } }, { path: "pages/meeting/index", style: { navigationStyle: "custom" } }, { path: "pages/meeting/detail", style: { navigationBarTitleText: "详情", enablePullDownRefresh: false, navigationBarTextStyle: "white" } }, { path: "pages/leave/application", style: { navigationBarTitleText: "请假申请", enablePullDownRefresh: false, navigationBarTextStyle: "white" } }, { path: "pages/checkin/index", style: { navigationStyle: "custom" } }, { path: "pages/useredit/useredit", style: { navigationBarTitleText: "资料编辑", navigationBarTextStyle: "white" } }, { path: "pages/useredit/address", style: { navigationBarTitleText: "地址", enablePullDownRefresh: false, navigationBarTextStyle: "white" } }, { path: "pages/useredit/add_address", style: { navigationBarTitleText: "添加地址", enablePullDownRefresh: false, navigationBarTextStyle: "white" } }, { path: "pages/useredit/addressbook", style: { navigationBarTitleText: "通讯录", enablePullDownRefresh: false, navigationBarTextStyle: "white" } }, { path: "pages/safe/manage", style: { navigationStyle: "custom" } }, { path: "pages/product/index", style: { navigationBarTitleText: "生产数据", enablePullDownRefresh: false, navigationBarTextStyle: "white" } }, { path: "pages/userlist/index", style: { navigationBarTitleText: "", navigationBarTextStyle: "white" } }, { path: "pages/safe/detail", style: { navigationStyle: "custom" } }, { path: "pages/zhiban/index", style: { navigationBarTitleText: "值班信息", navigationBarTextStyle: "white" } }, { path: "pages/task/self", style: { navigationBarTitleText: "本人发起", navigationBarTextStyle: "white" } } ]; const tabBar = { color: "#333333", selectedColor: "#01508B", borderStyle: "black", backgroundColor: "#FFFFFF", list: [ { text: "首页", pagePath: "pages/tab/index", iconPath: "static/tab/index1.png", selectedIconPath: "static/tab/index2.png" }, { text: "任务", pagePath: "pages/task/todotask", iconPath: "static/tab/office1.png", selectedIconPath: "static/tab/office2.png" }, { text: "办公", pagePath: "pages/tab/office", iconPath: "static/tab/product1.png", selectedIconPath: "static/tab/product2.png" }, { text: "我的", pagePath: "pages/tab/my", iconPath: "static/tab/user1.png", selectedIconPath: "static/tab/user2.png" } ] }; const globalStyle = { "app-plus": { titleNView: { backgroundImage: "linear-gradient(to left , #256FBC, #044D87)" } } }; const uniIdRouter = {}; const e = { pages, tabBar, globalStyle, uniIdRouter }; var define_process_env_UNI_SECURE_NETWORK_CONFIG_default = []; function t$1(e2) { return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2; } function n(e2, t2, n2) { return e2(n2 = { path: t2, exports: {}, require: function(e3, t3) { return function() { throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs"); }(null == t3 && n2.path); } }, n2.exports), n2.exports; } var s = n(function(e2, t2) { var n2; e2.exports = (n2 = n2 || function(e3, t3) { var n3 = Object.create || /* @__PURE__ */ function() { function e4() { } return function(t4) { var n4; return e4.prototype = t4, n4 = new e4(), e4.prototype = null, n4; }; }(), s2 = {}, r2 = s2.lib = {}, i2 = r2.Base = { extend: function(e4) { var t4 = n3(this); return e4 && t4.mixIn(e4), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() { t4.$super.init.apply(this, arguments); }), t4.init.prototype = t4, t4.$super = this, t4; }, create: function() { var e4 = this.extend(); return e4.init.apply(e4, arguments), e4; }, init: function() { }, mixIn: function(e4) { for (var t4 in e4) e4.hasOwnProperty(t4) && (this[t4] = e4[t4]); e4.hasOwnProperty("toString") && (this.toString = e4.toString); }, clone: function() { return this.init.prototype.extend(this); } }, o2 = r2.WordArray = i2.extend({ init: function(e4, n4) { e4 = this.words = e4 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e4.length; }, toString: function(e4) { return (e4 || c2).stringify(this); }, concat: function(e4) { var t4 = this.words, n4 = e4.words, s3 = this.sigBytes, r3 = e4.sigBytes; if (this.clamp(), s3 % 4) for (var i3 = 0; i3 < r3; i3++) { var o3 = n4[i3 >>> 2] >>> 24 - i3 % 4 * 8 & 255; t4[s3 + i3 >>> 2] |= o3 << 24 - (s3 + i3) % 4 * 8; } else for (i3 = 0; i3 < r3; i3 += 4) t4[s3 + i3 >>> 2] = n4[i3 >>> 2]; return this.sigBytes += r3, this; }, clamp: function() { var t4 = this.words, n4 = this.sigBytes; t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e3.ceil(n4 / 4); }, clone: function() { var e4 = i2.clone.call(this); return e4.words = this.words.slice(0), e4; }, random: function(t4) { for (var n4, s3 = [], r3 = function(t5) { t5 = t5; var n5 = 987654321, s4 = 4294967295; return function() { var r4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4; return r4 /= 4294967296, (r4 += 0.5) * (e3.random() > 0.5 ? 1 : -1); }; }, i3 = 0; i3 < t4; i3 += 4) { var a3 = r3(4294967296 * (n4 || e3.random())); n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0); } return new o2.init(s3, t4); } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e4) { for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) { var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255; s3.push((i3 >>> 4).toString(16)), s3.push((15 & i3).toString(16)); } return s3.join(""); }, parse: function(e4) { for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3 += 2) n4[s3 >>> 3] |= parseInt(e4.substr(s3, 2), 16) << 24 - s3 % 8 * 4; return new o2.init(n4, t4 / 2); } }, u2 = a2.Latin1 = { stringify: function(e4) { for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) { var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255; s3.push(String.fromCharCode(i3)); } return s3.join(""); }, parse: function(e4) { for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3++) n4[s3 >>> 2] |= (255 & e4.charCodeAt(s3)) << 24 - s3 % 4 * 8; return new o2.init(n4, t4); } }, h2 = a2.Utf8 = { stringify: function(e4) { try { return decodeURIComponent(escape(u2.stringify(e4))); } catch (e5) { throw new Error("Malformed UTF-8 data"); } }, parse: function(e4) { return u2.parse(unescape(encodeURIComponent(e4))); } }, l2 = r2.BufferedBlockAlgorithm = i2.extend({ reset: function() { this._data = new o2.init(), this._nDataBytes = 0; }, _append: function(e4) { "string" == typeof e4 && (e4 = h2.parse(e4)), this._data.concat(e4), this._nDataBytes += e4.sigBytes; }, _process: function(t4) { var n4 = this._data, s3 = n4.words, r3 = n4.sigBytes, i3 = this.blockSize, a3 = r3 / (4 * i3), c3 = (a3 = t4 ? e3.ceil(a3) : e3.max((0 | a3) - this._minBufferSize, 0)) * i3, u3 = e3.min(4 * c3, r3); if (c3) { for (var h3 = 0; h3 < c3; h3 += i3) this._doProcessBlock(s3, h3); var l3 = s3.splice(0, c3); n4.sigBytes -= u3; } return new o2.init(l3, u3); }, clone: function() { var e4 = i2.clone.call(this); return e4._data = this._data.clone(), e4; }, _minBufferSize: 0 }); r2.Hasher = l2.extend({ cfg: i2.extend(), init: function(e4) { this.cfg = this.cfg.extend(e4), this.reset(); }, reset: function() { l2.reset.call(this), this._doReset(); }, update: function(e4) { return this._append(e4), this._process(), this; }, finalize: function(e4) { return e4 && this._append(e4), this._doFinalize(); }, blockSize: 16, _createHelper: function(e4) { return function(t4, n4) { return new e4.init(n4).finalize(t4); }; }, _createHmacHelper: function(e4) { return function(t4, n4) { return new d2.HMAC.init(e4, n4).finalize(t4); }; } }); var d2 = s2.algo = {}; return s2; }(Math), n2); }), r = s, i = (n(function(e2, t2) { var n2; e2.exports = (n2 = r, function(e3) { var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = []; !function() { for (var t4 = 0; t4 < 64; t4++) a2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0; }(); var c2 = o2.MD5 = i2.extend({ _doReset: function() { this._hash = new r2.init([1732584193, 4023233417, 2562383102, 271733878]); }, _doProcessBlock: function(e4, t4) { for (var n3 = 0; n3 < 16; n3++) { var s3 = t4 + n3, r3 = e4[s3]; e4[s3] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8); } var i3 = this._hash.words, o3 = e4[t4 + 0], c3 = e4[t4 + 1], p2 = e4[t4 + 2], f2 = e4[t4 + 3], g2 = e4[t4 + 4], m2 = e4[t4 + 5], y2 = e4[t4 + 6], _2 = e4[t4 + 7], w2 = e4[t4 + 8], v2 = e4[t4 + 9], I2 = e4[t4 + 10], S2 = e4[t4 + 11], b2 = e4[t4 + 12], k2 = e4[t4 + 13], A2 = e4[t4 + 14], C2 = e4[t4 + 15], P2 = i3[0], T2 = i3[1], x2 = i3[2], O2 = i3[3]; P2 = u2(P2, T2, x2, O2, o3, 7, a2[0]), O2 = u2(O2, P2, T2, x2, c3, 12, a2[1]), x2 = u2(x2, O2, P2, T2, p2, 17, a2[2]), T2 = u2(T2, x2, O2, P2, f2, 22, a2[3]), P2 = u2(P2, T2, x2, O2, g2, 7, a2[4]), O2 = u2(O2, P2, T2, x2, m2, 12, a2[5]), x2 = u2(x2, O2, P2, T2, y2, 17, a2[6]), T2 = u2(T2, x2, O2, P2, _2, 22, a2[7]), P2 = u2(P2, T2, x2, O2, w2, 7, a2[8]), O2 = u2(O2, P2, T2, x2, v2, 12, a2[9]), x2 = u2(x2, O2, P2, T2, I2, 17, a2[10]), T2 = u2(T2, x2, O2, P2, S2, 22, a2[11]), P2 = u2(P2, T2, x2, O2, b2, 7, a2[12]), O2 = u2(O2, P2, T2, x2, k2, 12, a2[13]), x2 = u2(x2, O2, P2, T2, A2, 17, a2[14]), P2 = h2(P2, T2 = u2(T2, x2, O2, P2, C2, 22, a2[15]), x2, O2, c3, 5, a2[16]), O2 = h2(O2, P2, T2, x2, y2, 9, a2[17]), x2 = h2(x2, O2, P2, T2, S2, 14, a2[18]), T2 = h2(T2, x2, O2, P2, o3, 20, a2[19]), P2 = h2(P2, T2, x2, O2, m2, 5, a2[20]), O2 = h2(O2, P2, T2, x2, I2, 9, a2[21]), x2 = h2(x2, O2, P2, T2, C2, 14, a2[22]), T2 = h2(T2, x2, O2, P2, g2, 20, a2[23]), P2 = h2(P2, T2, x2, O2, v2, 5, a2[24]), O2 = h2(O2, P2, T2, x2, A2, 9, a2[25]), x2 = h2(x2, O2, P2, T2, f2, 14, a2[26]), T2 = h2(T2, x2, O2, P2, w2, 20, a2[27]), P2 = h2(P2, T2, x2, O2, k2, 5, a2[28]), O2 = h2(O2, P2, T2, x2, p2, 9, a2[29]), x2 = h2(x2, O2, P2, T2, _2, 14, a2[30]), P2 = l2(P2, T2 = h2(T2, x2, O2, P2, b2, 20, a2[31]), x2, O2, m2, 4, a2[32]), O2 = l2(O2, P2, T2, x2, w2, 11, a2[33]), x2 = l2(x2, O2, P2, T2, S2, 16, a2[34]), T2 = l2(T2, x2, O2, P2, A2, 23, a2[35]), P2 = l2(P2, T2, x2, O2, c3, 4, a2[36]), O2 = l2(O2, P2, T2, x2, g2, 11, a2[37]), x2 = l2(x2, O2, P2, T2, _2, 16, a2[38]), T2 = l2(T2, x2, O2, P2, I2, 23, a2[39]), P2 = l2(P2, T2, x2, O2, k2, 4, a2[40]), O2 = l2(O2, P2, T2, x2, o3, 11, a2[41]), x2 = l2(x2, O2, P2, T2, f2, 16, a2[42]), T2 = l2(T2, x2, O2, P2, y2, 23, a2[43]), P2 = l2(P2, T2, x2, O2, v2, 4, a2[44]), O2 = l2(O2, P2, T2, x2, b2, 11, a2[45]), x2 = l2(x2, O2, P2, T2, C2, 16, a2[46]), P2 = d2(P2, T2 = l2(T2, x2, O2, P2, p2, 23, a2[47]), x2, O2, o3, 6, a2[48]), O2 = d2(O2, P2, T2, x2, _2, 10, a2[49]), x2 = d2(x2, O2, P2, T2, A2, 15, a2[50]), T2 = d2(T2, x2, O2, P2, m2, 21, a2[51]), P2 = d2(P2, T2, x2, O2, b2, 6, a2[52]), O2 = d2(O2, P2, T2, x2, f2, 10, a2[53]), x2 = d2(x2, O2, P2, T2, I2, 15, a2[54]), T2 = d2(T2, x2, O2, P2, c3, 21, a2[55]), P2 = d2(P2, T2, x2, O2, w2, 6, a2[56]), O2 = d2(O2, P2, T2, x2, C2, 10, a2[57]), x2 = d2(x2, O2, P2, T2, y2, 15, a2[58]), T2 = d2(T2, x2, O2, P2, k2, 21, a2[59]), P2 = d2(P2, T2, x2, O2, g2, 6, a2[60]), O2 = d2(O2, P2, T2, x2, S2, 10, a2[61]), x2 = d2(x2, O2, P2, T2, p2, 15, a2[62]), T2 = d2(T2, x2, O2, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + T2 | 0, i3[2] = i3[2] + x2 | 0, i3[3] = i3[3] + O2 | 0; }, _doFinalize: function() { var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes; n3[r3 >>> 5] |= 128 << 24 - r3 % 32; var i3 = e3.floor(s3 / 4294967296), o3 = s3; n3[15 + (r3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), n3[14 + (r3 + 64 >>> 9 << 4)] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process(); for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) { var h3 = c3[u3]; c3[u3] = 16711935 & (h3 << 8 | h3 >>> 24) | 4278255360 & (h3 << 24 | h3 >>> 8); } return a3; }, clone: function() { var e4 = i2.clone.call(this); return e4._hash = this._hash.clone(), e4; } }); function u2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 & n3 | ~t4 & s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function h2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 & s3 | n3 & ~s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function l2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 ^ n3 ^ s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function d2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (n3 ^ (t4 | ~s3)) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } t3.MD5 = i2._createHelper(c2), t3.HmacMD5 = i2._createHmacHelper(c2); }(Math), n2.MD5); }), n(function(e2, t2) { var n2; e2.exports = (n2 = r, void function() { var e3 = n2, t3 = e3.lib.Base, s2 = e3.enc.Utf8; e3.algo.HMAC = t3.extend({ init: function(e4, t4) { e4 = this._hasher = new e4.init(), "string" == typeof t4 && (t4 = s2.parse(t4)); var n3 = e4.blockSize, r2 = 4 * n3; t4.sigBytes > r2 && (t4 = e4.finalize(t4)), t4.clamp(); for (var i2 = this._oKey = t4.clone(), o2 = this._iKey = t4.clone(), a2 = i2.words, c2 = o2.words, u2 = 0; u2 < n3; u2++) a2[u2] ^= 1549556828, c2[u2] ^= 909522486; i2.sigBytes = o2.sigBytes = r2, this.reset(); }, reset: function() { var e4 = this._hasher; e4.reset(), e4.update(this._iKey); }, update: function(e4) { return this._hasher.update(e4), this; }, finalize: function(e4) { var t4 = this._hasher, n3 = t4.finalize(e4); return t4.reset(), t4.finalize(this._oKey.clone().concat(n3)); } }); }()); }), n(function(e2, t2) { e2.exports = r.HmacMD5; })), o = n(function(e2, t2) { e2.exports = r.enc.Utf8; }), a = n(function(e2, t2) { var n2; e2.exports = (n2 = r, function() { var e3 = n2, t3 = e3.lib.WordArray; function s2(e4, n3, s3) { for (var r2 = [], i2 = 0, o2 = 0; o2 < n3; o2++) if (o2 % 4) { var a2 = s3[e4.charCodeAt(o2 - 1)] << o2 % 4 * 2, c2 = s3[e4.charCodeAt(o2)] >>> 6 - o2 % 4 * 2; r2[i2 >>> 2] |= (a2 | c2) << 24 - i2 % 4 * 8, i2++; } return t3.create(r2, i2); } e3.enc.Base64 = { stringify: function(e4) { var t4 = e4.words, n3 = e4.sigBytes, s3 = this._map; e4.clamp(); for (var r2 = [], i2 = 0; i2 < n3; i2 += 3) for (var o2 = (t4[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) << 16 | (t4[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255) << 8 | t4[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255, a2 = 0; a2 < 4 && i2 + 0.75 * a2 < n3; a2++) r2.push(s3.charAt(o2 >>> 6 * (3 - a2) & 63)); var c2 = s3.charAt(64); if (c2) for (; r2.length % 4; ) r2.push(c2); return r2.join(""); }, parse: function(e4) { var t4 = e4.length, n3 = this._map, r2 = this._reverseMap; if (!r2) { r2 = this._reverseMap = []; for (var i2 = 0; i2 < n3.length; i2++) r2[n3.charCodeAt(i2)] = i2; } var o2 = n3.charAt(64); if (o2) { var a2 = e4.indexOf(o2); -1 !== a2 && (t4 = a2); } return s2(e4, t4, r2); }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }; }(), n2.enc.Base64); }); const c = "FUNCTION", u = "OBJECT", h = "CLIENT_DB", l = "pending", d = "fulfilled", p = "rejected"; function f(e2) { return Object.prototype.toString.call(e2).slice(8, -1).toLowerCase(); } function g(e2) { return "object" === f(e2); } function m(e2) { return "function" == typeof e2; } function y(e2) { return function() { try { return e2.apply(e2, arguments); } catch (e3) { console.error(e3); } }; } const _ = "REJECTED", w = "NOT_PENDING"; class v { constructor({ createPromise: e2, retryRule: t2 = _ } = {}) { this.createPromise = e2, this.status = null, this.promise = null, this.retryRule = t2; } get needRetry() { if (!this.status) return true; switch (this.retryRule) { case _: return this.status === p; case w: return this.status !== l; } } exec() { return this.needRetry ? (this.status = l, this.promise = this.createPromise().then((e2) => (this.status = d, Promise.resolve(e2)), (e2) => (this.status = p, Promise.reject(e2))), this.promise) : this.promise; } } function I(e2) { return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2; } const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), C = b, P = I(""), T = I("[]") || []; let O = ""; try { O = "__UNI__9F097F0"; } catch (e2) { } let E = {}; function L(e2, t2 = {}) { var n2, s2; return n2 = E, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (E[e2] = t2), E[e2]; } E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {}; const R = ["invoke", "success", "fail", "complete"], U = L("_globalUniCloudInterceptor"); function N(e2, t2) { U[e2] || (U[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => { R.indexOf(n2) > -1 && function(e3, t3, n3) { let s2 = U[e3][t3]; s2 || (s2 = U[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3); }(e2, n2, t2[n2]); }); } function D(e2, t2) { U[e2] || (U[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => { R.indexOf(n2) > -1 && function(e3, t3, n3) { const s2 = U[e3][t3]; if (!s2) return; const r2 = s2.indexOf(n3); r2 > -1 && s2.splice(r2, 1); }(e2, n2, t2[n2]); }) : delete U[e2]; } function M(e2, t2) { return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve(); } function q(e2, t2) { return U[e2] && U[e2][t2] || []; } function F(e2) { N("callObject", e2); } const K = L("_globalUniCloudListener"), j = "response", $ = "needLogin", B = "refreshToken", W = "clientdb", H = "cloudfunction", z = "cloudobject"; function J(e2) { return K[e2] || (K[e2] = []), K[e2]; } function V(e2, t2) { const n2 = J(e2); n2.includes(t2) || n2.push(t2); } function G(e2, t2) { const n2 = J(e2), s2 = n2.indexOf(t2); -1 !== s2 && n2.splice(s2, 1); } function Y(e2, t2) { const n2 = J(e2); for (let e3 = 0; e3 < n2.length; e3++) { (0, n2[e3])(t2); } } let Q, X = false; function Z() { return Q || (Q = new Promise((e2) => { X && e2(), function t2() { if ("function" == typeof getCurrentPages) { const t3 = getCurrentPages(); t3 && t3[0] && (X = true, e2()); } X || setTimeout(() => { t2(); }, 30); }(); }), Q); } function ee(e2) { const t2 = {}; for (const n2 in e2) { const s2 = e2[n2]; m(s2) && (t2[n2] = y(s2)); } return t2; } class te extends Error { constructor(e2) { super(e2.message), this.errMsg = e2.message || e2.errMsg || "unknown system error", this.code = this.errCode = e2.code || e2.errCode || "SYSTEM_ERROR", this.errSubject = this.subject = e2.subject || e2.errSubject, this.cause = e2.cause, this.requestId = e2.requestId; } toJson(e2 = 0) { if (!(e2 >= 10)) return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause }; } } var ne = { request: (e2) => uni.request(e2), uploadFile: (e2) => uni.uploadFile(e2), setStorageSync: (e2, t2) => uni.setStorageSync(e2, t2), getStorageSync: (e2) => uni.getStorageSync(e2), removeStorageSync: (e2) => uni.removeStorageSync(e2), clearStorageSync: () => uni.clearStorageSync(), connectSocket: (e2) => uni.connectSocket(e2) }; function se(e2) { return e2 && se(e2.__v_raw) || e2; } function re() { return { token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"), tokenExpired: ne.getStorageSync("uni_id_token_expired") }; } function ie({ token: e2, tokenExpired: t2 } = {}) { e2 && ne.setStorageSync("uni_id_token", e2), t2 && ne.setStorageSync("uni_id_token_expired", t2); } let oe, ae; function ce() { return oe || (oe = uni.getSystemInfoSync()), oe; } function ue() { let e2, t2; try { if (uni.getLaunchOptionsSync) { if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return; const { scene: n2, channel: s2 } = uni.getLaunchOptionsSync(); e2 = s2, t2 = n2; } } catch (e3) { } return { channel: e2, scene: t2 }; } let he = {}; function le() { const e2 = uni.getLocale && uni.getLocale() || "en"; if (ae) return { ...he, ...ae, locale: e2, LOCALE: e2 }; const t2 = ce(), { deviceId: n2, osName: s2, uniPlatform: r2, appId: i2 } = t2, o2 = ["appId", "appLanguage", "appName", "appVersion", "appVersionCode", "appWgtVersion", "browserName", "browserVersion", "deviceBrand", "deviceId", "deviceModel", "deviceType", "osName", "osVersion", "romName", "romVersion", "ua", "hostName", "hostVersion", "uniPlatform", "uniRuntimeVersion", "uniRuntimeVersionCode", "uniCompilerVersion", "uniCompilerVersionCode"]; for (const e3 in t2) Object.hasOwnProperty.call(t2, e3) && -1 === o2.indexOf(e3) && delete t2[e3]; return ae = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...ue(), ...t2 }, { ...he, ...ae, locale: e2, LOCALE: e2 }; } var de = { sign: function(e2, t2) { let n2 = ""; return Object.keys(e2).sort().forEach(function(t3) { e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]); }), n2 = n2.slice(1), i(n2, t2).toString(); }, wrappedRequest: function(e2, t2) { return new Promise((n2, s2) => { t2(Object.assign(e2, { complete(e3) { e3 || (e3 = {}); const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"]; if (!e3.statusCode || e3.statusCode >= 400) { const n3 = e3.data && e3.data.error && e3.data.error.code || "SYS_ERR", r3 = e3.data && e3.data.error && e3.data.error.message || e3.errMsg || "request:fail"; return s2(new te({ code: n3, message: r3, requestId: t3 })); } const r2 = e3.data; if (r2.error) return s2(new te({ code: r2.error.code, message: r2.error.message, requestId: t3 })); r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2); } })); }); }, toBase64: function(e2) { return a.stringify(o.parse(e2)); } }; var pe = class { constructor(e2) { ["spaceId", "clientSecret"].forEach((t2) => { if (!Object.prototype.hasOwnProperty.call(e2, t2)) throw new Error(`${t2} required`); }), this.config = Object.assign({}, { endpoint: 0 === e2.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com" }, e2), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = ne, this._getAccessTokenPromiseHub = new v({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => { if (!e3.result || !e3.result.accessToken) throw new te({ code: "AUTH_FAILED", message: "获取accessToken失败" }); this.setAccessToken(e3.result.accessToken); }), retryRule: w }); } get hasAccessToken() { return !!this.accessToken; } setAccessToken(e2) { this.accessToken = e2; } requestWrapped(e2) { return de.wrappedRequest(e2, this.adapter.request); } requestAuth(e2) { return this.requestWrapped(e2); } request(e2, t2) { return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => { !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3(); }).then(() => this.getAccessToken()).then(() => { const t4 = this.rebuildRequest(e2); return this.request(t4, true); })) : this.getAccessToken().then(() => { const t3 = this.rebuildRequest(e2); return this.request(t3, true); })); } rebuildRequest(e2) { const t2 = Object.assign({}, e2); return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = de.sign(t2.data, this.config.clientSecret), t2; } setupRequest(e2, t2) { const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 }; } getAccessToken() { return this._getAccessTokenPromiseHub.exec(); } async authorize() { await this.getAccessToken(); } callFunction(e2) { const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) }; return this.request(this.setupRequest(t2)); } getOSSUploadOptionsFromPath(e2) { const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) }; return this.request(this.setupRequest(t2)); } uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) { return new Promise((o2, a2) => { const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) { e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => { i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } reportOSSUpload(e2) { const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) }; return this.request(this.setupRequest(t2)); } async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", cloudPathAsRealPath: s2 = false, onUploadProgress: r2, config: i2 }) { if ("string" !== f(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" }); if (!(t2 = t2.trim())) throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" }); if (/:\/\//.test(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" }); const o2 = i2 && i2.envType || this.config.envType; if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1)) throw new te({ code: "INVALID_PARAM", message: "使用cloudPath作为路径时,cloudPath不可包含“\\”" }); const a2 = (await this.getOSSUploadOptionsFromPath({ env: o2, filename: s2 ? t2.split("/").pop() : t2, fileId: s2 ? t2 : void 0 })).result, c2 = "https://" + a2.cdnDomain + "/" + a2.ossPath, { securityToken: u2, accessKeyId: h2, signature: l2, host: d2, ossPath: p2, id: g2, policy: m2, ossCallbackUrl: y2 } = a2, _2 = { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: h2, Signature: l2, host: d2, id: g2, key: p2, policy: m2, success_action_status: 200 }; if (u2 && (_2["x-oss-security-token"] = u2), y2) { const e3 = JSON.stringify({ callbackUrl: y2, callbackBody: JSON.stringify({ fileId: g2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" }); _2.callback = de.toBase64(e3); } const w2 = { url: "https://" + a2.host, formData: _2, fileName: "file", name: "file", filePath: e2, fileType: n2 }; if (await this.uploadFileToOSS(Object.assign({}, w2, { onUploadProgress: r2 })), y2) return { success: true, filePath: e2, fileID: c2 }; if ((await this.reportOSSUpload({ id: g2 })).success) return { success: true, filePath: e2, fileID: c2 }; throw new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }); } getTempFileURL({ fileList: e2 } = {}) { return new Promise((t2, n2) => { Array.isArray(e2) && 0 !== e2.length || n2(new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) }); }); } async getFileInfo({ fileList: e2 } = {}) { if (!Array.isArray(e2) || 0 === e2.length) throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }); const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) }; return { fileList: (await this.request(this.setupRequest(t2))).result }; } }; var fe = { init(e2) { const t2 = new pe(e2), n2 = { signInAnonymously: function() { return t2.authorize(); }, getLoginState: function() { return Promise.resolve(false); } }; return t2.auth = function() { return n2; }, t2.customAuth = t2.auth, t2; } }; const ge = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:"; var me; !function(e2) { e2.local = "local", e2.none = "none", e2.session = "session"; }(me || (me = {})); var ye = function() { }, _e = n(function(e2, t2) { var n2; e2.exports = (n2 = r, function(e3) { var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [], c2 = []; !function() { function t4(t5) { for (var n4 = e3.sqrt(t5), s4 = 2; s4 <= n4; s4++) if (!(t5 % s4)) return false; return true; } function n3(e4) { return 4294967296 * (e4 - (0 | e4)) | 0; } for (var s3 = 2, r3 = 0; r3 < 64; ) t4(s3) && (r3 < 8 && (a2[r3] = n3(e3.pow(s3, 0.5))), c2[r3] = n3(e3.pow(s3, 1 / 3)), r3++), s3++; }(); var u2 = [], h2 = o2.SHA256 = i2.extend({ _doReset: function() { this._hash = new r2.init(a2.slice(0)); }, _doProcessBlock: function(e4, t4) { for (var n3 = this._hash.words, s3 = n3[0], r3 = n3[1], i3 = n3[2], o3 = n3[3], a3 = n3[4], h3 = n3[5], l2 = n3[6], d2 = n3[7], p2 = 0; p2 < 64; p2++) { if (p2 < 16) u2[p2] = 0 | e4[t4 + p2]; else { var f2 = u2[p2 - 15], g2 = (f2 << 25 | f2 >>> 7) ^ (f2 << 14 | f2 >>> 18) ^ f2 >>> 3, m2 = u2[p2 - 2], y2 = (m2 << 15 | m2 >>> 17) ^ (m2 << 13 | m2 >>> 19) ^ m2 >>> 10; u2[p2] = g2 + u2[p2 - 7] + y2 + u2[p2 - 16]; } var _2 = s3 & r3 ^ s3 & i3 ^ r3 & i3, w2 = (s3 << 30 | s3 >>> 2) ^ (s3 << 19 | s3 >>> 13) ^ (s3 << 10 | s3 >>> 22), v2 = d2 + ((a3 << 26 | a3 >>> 6) ^ (a3 << 21 | a3 >>> 11) ^ (a3 << 7 | a3 >>> 25)) + (a3 & h3 ^ ~a3 & l2) + c2[p2] + u2[p2]; d2 = l2, l2 = h3, h3 = a3, a3 = o3 + v2 | 0, o3 = i3, i3 = r3, r3 = s3, s3 = v2 + (w2 + _2) | 0; } n3[0] = n3[0] + s3 | 0, n3[1] = n3[1] + r3 | 0, n3[2] = n3[2] + i3 | 0, n3[3] = n3[3] + o3 | 0, n3[4] = n3[4] + a3 | 0, n3[5] = n3[5] + h3 | 0, n3[6] = n3[6] + l2 | 0, n3[7] = n3[7] + d2 | 0; }, _doFinalize: function() { var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes; return n3[r3 >>> 5] |= 128 << 24 - r3 % 32, n3[14 + (r3 + 64 >>> 9 << 4)] = e3.floor(s3 / 4294967296), n3[15 + (r3 + 64 >>> 9 << 4)] = s3, t4.sigBytes = 4 * n3.length, this._process(), this._hash; }, clone: function() { var e4 = i2.clone.call(this); return e4._hash = this._hash.clone(), e4; } }); t3.SHA256 = i2._createHelper(h2), t3.HmacSHA256 = i2._createHmacHelper(h2); }(Math), n2.SHA256); }), we = _e, ve = n(function(e2, t2) { e2.exports = r.HmacSHA256; }); const Ie = () => { let e2; if (!Promise) { e2 = () => { }, e2.promise = {}; const t3 = () => { throw new te({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' }); }; return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2; } const t2 = new Promise((t3, n2) => { e2 = (e3, s2) => e3 ? n2(e3) : t3(s2); }); return e2.promise = t2, e2; }; function Se(e2) { return void 0 === e2; } function be(e2) { return "[object Null]" === Object.prototype.toString.call(e2); } var ke; function Ae(e2) { const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]); var n2; for (const e3 of t2) { const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3; if (t3()) return { adapter: n3(), runtime: s2 }; } } !function(e2) { e2.WEB = "web", e2.WX_MP = "wx_mp"; }(ke || (ke = {})); const Ce = { adapter: null, runtime: void 0 }, Pe = ["anonymousUuidKey"]; class Te extends ye { constructor() { super(), Ce.adapter.root.tcbObject || (Ce.adapter.root.tcbObject = {}); } setItem(e2, t2) { Ce.adapter.root.tcbObject[e2] = t2; } getItem(e2) { return Ce.adapter.root.tcbObject[e2]; } removeItem(e2) { delete Ce.adapter.root.tcbObject[e2]; } clear() { delete Ce.adapter.root.tcbObject; } } function xe(e2, t2) { switch (e2) { case "local": return t2.localStorage || new Te(); case "none": return new Te(); default: return t2.sessionStorage || new Te(); } } class Oe { constructor(e2) { if (!this._storage) { this._persistence = Ce.adapter.primaryStorage || e2.persistence, this._storage = xe(this._persistence, Ce.adapter); const t2 = `access_token_${e2.env}`, n2 = `access_token_expire_${e2.env}`, s2 = `refresh_token_${e2.env}`, r2 = `anonymous_uuid_${e2.env}`, i2 = `login_type_${e2.env}`, o2 = `user_info_${e2.env}`; this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: o2 }; } } updatePersistence(e2) { if (e2 === this._persistence) return; const t2 = "local" === this._persistence; this._persistence = e2; const n2 = xe(e2, Ce.adapter); for (const e3 in this.keys) { const s2 = this.keys[e3]; if (t2 && Pe.includes(e3)) continue; const r2 = this._storage.getItem(s2); Se(r2) || be(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2)); } this._storage = n2; } setStore(e2, t2, n2) { if (!this._storage) return; const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2); try { this._storage.setItem(e2, r2); } catch (e3) { throw e3; } } getStore(e2, t2) { try { if (!this._storage) return; } catch (e3) { return ""; } t2 = t2 || "localCachev1"; const n2 = this._storage.getItem(e2); if (!n2) return ""; if (n2.indexOf(t2) >= 0) { return JSON.parse(n2).content; } return ""; } removeStore(e2) { this._storage.removeItem(e2); } } const Ee = {}, Le = {}; function Re(e2) { return Ee[e2]; } class Ue { constructor(e2, t2) { this.data = t2 || null, this.name = e2; } } class Ne extends Ue { constructor(e2, t2) { super("error", { error: e2, data: t2 }), this.error = e2; } } const De = new class { constructor() { this._listeners = {}; } on(e2, t2) { return function(e3, t3, n2) { n2[e3] = n2[e3] || [], n2[e3].push(t3); }(e2, t2, this._listeners), this; } off(e2, t2) { return function(e3, t3, n2) { if (n2 && n2[e3]) { const s2 = n2[e3].indexOf(t3); -1 !== s2 && n2[e3].splice(s2, 1); } }(e2, t2, this._listeners), this; } fire(e2, t2) { if (e2 instanceof Ne) return console.error(e2.error), this; const n2 = "string" == typeof e2 ? new Ue(e2, t2 || {}) : e2; const s2 = n2.name; if (this._listens(s2)) { n2.target = this; const e3 = this._listeners[s2] ? [...this._listeners[s2]] : []; for (const t3 of e3) t3.call(this, n2); } return this; } _listens(e2) { return this._listeners[e2] && this._listeners[e2].length > 0; } }(); function Me(e2, t2) { De.on(e2, t2); } function qe(e2, t2 = {}) { De.fire(e2, t2); } function Fe(e2, t2) { De.off(e2, t2); } const Ke = "loginStateChanged", je = "loginStateExpire", $e = "loginTypeChanged", Be = "anonymousConverted", We = "refreshAccessToken"; var He; !function(e2) { e2.ANONYMOUS = "ANONYMOUS", e2.WECHAT = "WECHAT", e2.WECHAT_PUBLIC = "WECHAT-PUBLIC", e2.WECHAT_OPEN = "WECHAT-OPEN", e2.CUSTOM = "CUSTOM", e2.EMAIL = "EMAIL", e2.USERNAME = "USERNAME", e2.NULL = "NULL"; }(He || (He = {})); const ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], Je = { "X-SDK-Version": "1.3.5" }; function Ve(e2, t2, n2) { const s2 = e2[t2]; e2[t2] = function(t3) { const r2 = {}, i2 = {}; n2.forEach((n3) => { const { data: s3, headers: o3 } = n3.call(e2, t3); Object.assign(r2, s3), Object.assign(i2, o3); }); const o2 = t3.data; return o2 && (() => { var e3; if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3)) t3.data = { ...o2, ...r2 }; else for (const e4 in r2) o2.append(e4, r2[e4]); })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3); }; } function Ge() { const e2 = Math.random().toString(16).slice(2); return { data: { seqId: e2 }, headers: { ...Je, "x-seqid": e2 } }; } class Ye { constructor(e2 = {}) { var t2; this.config = e2, this._reqClass = new Ce.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Re(this.config.env), this._localCache = (t2 = this.config.env, Le[t2]), Ve(this._reqClass, "post", [Ge]), Ve(this._reqClass, "upload", [Ge]), Ve(this._reqClass, "download", [Ge]); } async post(e2) { return await this._reqClass.post(e2); } async upload(e2) { return await this._reqClass.upload(e2); } async download(e2) { return await this._reqClass.download(e2); } async refreshAccessToken() { let e2, t2; this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken()); try { e2 = await this._refreshAccessTokenPromise; } catch (e3) { t2 = e3; } if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2) throw t2; return e2; } async _refreshAccessToken() { const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys; this._cache.removeStore(e2), this._cache.removeStore(t2); let i2 = this._cache.getStore(n2); if (!i2) throw new te({ message: "未登录CloudBase" }); const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2); if (a2.data.code) { const { code: e3 } = a2.data; if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) { if (this._cache.getStore(s2) === He.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) { const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 }); return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken(); } qe(je), this._cache.removeStore(n2); } throw new te({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` }); } if (a2.data.access_token) return qe(We), this._cache.setStore(e2, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire }; a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken()); } async getAccessToken() { const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys; if (!this._cache.getStore(n2)) throw new te({ message: "refresh token不存在,登录状态异常" }); let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true; return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 }; } async request(e2, t2, n2) { const s2 = `x-tcb-trace_${this.config.env}`; let r2 = "application/x-www-form-urlencoded"; const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 }; if (-1 === ze.indexOf(e2)) { const { refreshTokenKey: e3 } = this._cache.keys; this._cache.getStore(e3) && (i2.access_token = (await this.getAccessToken()).accessToken); } let o2; if ("storage.uploadFile" === e2) { o2 = new FormData(); for (let e3 in o2) o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]); r2 = "multipart/form-data"; } else { r2 = "application/json", o2 = {}; for (let e3 in i2) void 0 !== i2[e3] && (o2[e3] = i2[e3]); } let a2 = { headers: { "content-type": r2 } }; n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress); const c2 = this._localCache.getStore(s2); c2 && (a2.headers["X-TCB-Trace"] = c2); const { parse: u2, inQuery: h2, search: l2 } = t2; let d2 = { env: this.config.env }; u2 && (d2.parse = true), h2 && (d2 = { ...h2, ...d2 }); let p2 = function(e3, t3, n3 = {}) { const s3 = /\?/.test(t3); let r3 = ""; for (let e4 in n3) "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`; return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`; }(ge, "//tcb-api.tencentcloudapi.com/web", d2); l2 && (p2 += l2); const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"]; if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data) throw new te({ code: "NETWORK_ERROR", message: "network request error" }); return f2; } async send(e2, t2 = {}) { const n2 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress }); if ("ACCESS_TOKEN_EXPIRED" === n2.data.code && -1 === ze.indexOf(e2)) { await this.refreshAccessToken(); const n3 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress }); if (n3.data.code) throw new te({ code: n3.data.code, message: n3.data.message }); return n3.data; } if (n2.data.code) throw new te({ code: n2.data.code, message: n2.data.message }); return n2.data; } setRefreshToken(e2) { const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2); } } const Qe = {}; function Xe(e2) { return Qe[e2]; } class Ze { constructor(e2) { this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env); } setRefreshToken(e2) { const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2); } setAccessToken(e2, t2) { const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys; this._cache.setStore(n2, e2), this._cache.setStore(s2, t2); } async refreshUserInfo() { const { data: e2 } = await this._request.send("auth.getUserInfo", {}); return this.setLocalUserInfo(e2), e2; } setLocalUserInfo(e2) { const { userInfoKey: t2 } = this._cache.keys; this._cache.setStore(t2, e2); } } class et { constructor(e2) { if (!e2) throw new te({ code: "PARAM_ERROR", message: "envId is not defined" }); this._envId = e2, this._cache = Re(this._envId), this._request = Xe(this._envId), this.setUserInfo(); } linkWithTicket(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "ticket must be string" }); return this._request.send("auth.linkWithTicket", { ticket: e2 }); } linkWithRedirect(e2) { e2.signInWithRedirect(); } updatePassword(e2, t2) { return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 }); } updateEmail(e2) { return this._request.send("auth.updateEmail", { newEmail: e2 }); } updateUsername(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); return this._request.send("auth.updateUsername", { username: e2 }); } async getLinkedUidList() { const { data: e2 } = await this._request.send("auth.getLinkedUidList", {}); let t2 = false; const { users: n2 } = e2; return n2.forEach((e3) => { e3.wxOpenId && e3.wxPublicId && (t2 = true); }), { users: n2, hasPrimaryUid: t2 }; } setPrimaryUid(e2) { return this._request.send("auth.setPrimaryUid", { uid: e2 }); } unlink(e2) { return this._request.send("auth.unlink", { platform: e2 }); } async update(e2) { const { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 } = e2, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 }); this.setLocalUserInfo(a2); } async refresh() { const { data: e2 } = await this._request.send("auth.getUserInfo", {}); return this.setLocalUserInfo(e2), e2; } setUserInfo() { const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2); ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => { this[e3] = t2[e3]; }), this.location = { country: t2.country, province: t2.province, city: t2.city }; } setLocalUserInfo(e2) { const { userInfoKey: t2 } = this._cache.keys; this._cache.setStore(t2, e2), this.setUserInfo(); } } let tt$1 = class tt { constructor(e2) { if (!e2) throw new te({ code: "PARAM_ERROR", message: "envId is not defined" }); this._cache = Re(e2); const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, r2 = this._cache.getStore(t2), i2 = this._cache.getStore(n2), o2 = this._cache.getStore(s2); this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new et(e2); } get isAnonymousAuth() { return this.loginType === He.ANONYMOUS; } get isCustomAuth() { return this.loginType === He.CUSTOM; } get isWeixinAuth() { return this.loginType === He.WECHAT || this.loginType === He.WECHAT_OPEN || this.loginType === He.WECHAT_PUBLIC; } get loginType() { return this._cache.getStore(this._cache.keys.loginTypeKey); } }; class nt extends Ze { async signIn() { this._cache.updatePersistence("local"); const { anonymousUuidKey: e2, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2) || void 0, s2 = this._cache.getStore(t2) || void 0, r2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 }); if (r2.uuid && r2.refresh_token) { this._setAnonymousUUID(r2.uuid), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.ANONYMOUS, persistence: "local" }); const e3 = new tt$1(this.config.env); return await e3.user.refresh(), e3; } throw new te({ message: "匿名登录失败" }); } async linkAndRetrieveDataWithTicket(e2) { const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: r2, ticket: e2 }); if (i2.refresh_token) return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), qe(Be, { env: this.config.env }), qe($e, { loginType: He.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } }; throw new te({ message: "匿名转化失败" }); } _setAnonymousUUID(e2) { const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, He.ANONYMOUS); } _clearAnonymousUUID() { this._cache.removeStore(this._cache.keys.anonymousUuidKey); } } class st extends Ze { async signIn(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "ticket must be a string" }); const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" }); if (n2.refresh_token) return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new tt$1(this.config.env); throw new te({ message: "自定义登录失败" }); } } class rt extends Ze { async signIn(e2, t2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "email must be a string" }); const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token: i2, access_token_expire: o2 } = s2; if (r2) return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.EMAIL, persistence: this.config.persistence }), new tt$1(this.config.env); throw s2.code ? new te({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new te({ message: "邮箱登录失败" }); } async activate(e2) { return this._request.send("auth.activateEndUserMail", { token: e2 }); } async resetPasswordWithToken(e2, t2) { return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 }); } } class it extends Ze { async signIn(e2, t2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); "string" != typeof t2 && (t2 = "", console.warn("password is empty")); const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: He.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2; if (r2) return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.USERNAME, persistence: this.config.persistence }), new tt$1(this.config.env); throw s2.code ? new te({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new te({ message: "用户名密码登录失败" }); } } class ot { constructor(e2) { this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Me($e, this._onLoginTypeChanged); } get currentUser() { const e2 = this.hasLoginState(); return e2 && e2.user || null; } get loginType() { return this._cache.getStore(this._cache.keys.loginTypeKey); } anonymousAuthProvider() { return new nt(this.config); } customAuthProvider() { return new st(this.config); } emailAuthProvider() { return new rt(this.config); } usernameAuthProvider() { return new it(this.config); } async signInAnonymously() { return new nt(this.config).signIn(); } async signInWithEmailAndPassword(e2, t2) { return new rt(this.config).signIn(e2, t2); } signInWithUsernameAndPassword(e2, t2) { return new it(this.config).signIn(e2, t2); } async linkAndRetrieveDataWithTicket(e2) { this._anonymousAuthProvider || (this._anonymousAuthProvider = new nt(this.config)), Me(Be, this._onAnonymousConverted); return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2); } async signOut() { if (this.loginType === He.ANONYMOUS) throw new te({ message: "匿名用户不支持登出操作" }); const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2); if (!s2) return; const r2 = await this._request.send("auth.logout", { refresh_token: s2 }); return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), qe(Ke), qe($e, { env: this.config.env, loginType: He.NULL, persistence: this.config.persistence }), r2; } async signUpWithEmailAndPassword(e2, t2) { return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 }); } async sendPasswordResetEmail(e2) { return this._request.send("auth.sendPasswordResetEmail", { email: e2 }); } onLoginStateChanged(e2) { Me(Ke, () => { const t3 = this.hasLoginState(); e2.call(this, t3); }); const t2 = this.hasLoginState(); e2.call(this, t2); } onLoginStateExpired(e2) { Me(je, e2.bind(this)); } onAccessTokenRefreshed(e2) { Me(We, e2.bind(this)); } onAnonymousConverted(e2) { Me(Be, e2.bind(this)); } onLoginTypeChanged(e2) { Me($e, () => { const t2 = this.hasLoginState(); e2.call(this, t2); }); } async getAccessToken() { return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env }; } hasLoginState() { const { refreshTokenKey: e2 } = this._cache.keys; return this._cache.getStore(e2) ? new tt$1(this.config.env) : null; } async isUsernameRegistered(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 }); return t2 && t2.isRegistered; } getLoginState() { return Promise.resolve(this.hasLoginState()); } async signInWithTicket(e2) { return new st(this.config).signIn(e2); } shouldRefreshAccessToken(e2) { this._request._shouldRefreshAccessTokenHook = e2.bind(this); } getUserInfo() { return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId }); } getAuthHeader() { const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2); return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 }; } _onAnonymousConverted(e2) { const { env: t2 } = e2.data; t2 === this.config.env && this._cache.updatePersistence(this.config.persistence); } _onLoginTypeChanged(e2) { const { loginType: t2, persistence: n2, env: s2 } = e2.data; s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2)); } } const at = function(e2, t2) { t2 = t2 || Ie(); const n2 = Xe(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2; return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => { const { data: { url: a2, authorization: c2, token: u2, fileId: h2, cosFileId: l2 }, requestId: d2 } = e3, p2 = { key: s2, signature: c2, "x-cos-meta-fileid": l2, success_action_status: "201", "x-cos-security-token": u2 }; n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => { 201 === e4.statusCode ? t2(null, { fileID: h2, requestId: d2 }) : t2(new te({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` })); }).catch((e4) => { t2(e4); }); }).catch((e3) => { t2(e3); }), t2.promise; }, ct = function(e2, t2) { t2 = t2 || Ie(); const n2 = Xe(this.config.env), { cloudPath: s2 } = e2; return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => { t2(null, e3); }).catch((e3) => { t2(e3); }), t2.promise; }, ut = function({ fileList: e2 }, t2) { if (t2 = t2 || Ie(), !e2 || !Array.isArray(e2)) return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" }; for (let t3 of e2) if (!t3 || "string" != typeof t3) return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }; const n2 = { fileid_list: e2 }; return Xe(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => { e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId }); }).catch((e3) => { t2(e3); }), t2.promise; }, ht = function({ fileList: e2 }, t2) { t2 = t2 || Ie(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" }); let n2 = []; for (let s3 of e2) "object" == typeof s3 ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : "string" == typeof s3 ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" }); const s2 = { file_list: n2 }; return Xe(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => { e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId }); }).catch((e3) => { t2(e3); }), t2.promise; }, lt = async function({ fileID: e2 }, t2) { const n2 = (await ht.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0]; if ("SUCCESS" !== n2.code) return t2 ? t2(n2) : new Promise((e3) => { e3(n2); }); const s2 = Xe(this.config.env); let r2 = n2.download_url; if (r2 = encodeURI(r2), !t2) return s2.download({ url: r2 }); t2(await s2.download({ url: r2 })); }, dt = function({ name: e2, data: t2, query: n2, parse: s2, search: r2 }, i2) { const o2 = i2 || Ie(); let a2; try { a2 = t2 ? JSON.stringify(t2) : ""; } catch (e3) { return Promise.reject(e3); } if (!e2) return Promise.reject(new te({ code: "PARAM_ERROR", message: "函数名不能为空" })); const c2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: a2 }; return Xe(this.config.env).send("functions.invokeFunction", c2).then((e3) => { if (e3.code) o2(null, e3); else { let t3 = e3.data.response_data; if (s2) o2(null, { result: t3, requestId: e3.requestId }); else try { t3 = JSON.parse(e3.data.response_data), o2(null, { result: t3, requestId: e3.requestId }); } catch (e4) { o2(new te({ message: "response data must be json" })); } } return o2.promise; }).catch((e3) => { o2(e3); }), o2.promise; }, pt = { timeout: 15e3, persistence: "session" }, ft = {}; class gt { constructor(e2) { this.config = e2 || this.config, this.authObj = void 0; } init(e2) { switch (Ce.adapter || (this.requestClient = new Ce.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...pt, ...e2 }, true) { case this.config.timeout > 6e5: console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5; break; case this.config.timeout < 100: console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100; } return new gt(this.config); } auth({ persistence: e2 } = {}) { if (this.authObj) return this.authObj; const t2 = e2 || Ce.adapter.primaryStorage || pt.persistence; var n2; return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) { const { env: t3 } = e3; Ee[t3] = new Oe(e3), Le[t3] = new Oe({ ...e3, persistence: "local" }); }(this.config), n2 = this.config, Qe[n2.env] = new Ye(n2), this.authObj = new ot(this.config), this.authObj; } on(e2, t2) { return Me.apply(this, [e2, t2]); } off(e2, t2) { return Fe.apply(this, [e2, t2]); } callFunction(e2, t2) { return dt.apply(this, [e2, t2]); } deleteFile(e2, t2) { return ut.apply(this, [e2, t2]); } getTempFileURL(e2, t2) { return ht.apply(this, [e2, t2]); } downloadFile(e2, t2) { return lt.apply(this, [e2, t2]); } uploadFile(e2, t2) { return at.apply(this, [e2, t2]); } getUploadMetadata(e2, t2) { return ct.apply(this, [e2, t2]); } registerExtension(e2) { ft[e2.name] = e2; } async invokeExtension(e2, t2) { const n2 = ft[e2]; if (!n2) throw new te({ message: `扩展${e2} 必须先注册` }); return await n2.invoke(t2, this); } useAdapters(e2) { const { adapter: t2, runtime: n2 } = Ae(e2) || {}; t2 && (Ce.adapter = t2), n2 && (Ce.runtime = n2); } } var mt = new gt(); function yt(e2, t2, n2) { void 0 === n2 && (n2 = {}); var s2 = /\?/.test(t2), r2 = ""; for (var i2 in n2) "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]); return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2; } class _t { post(e2) { const { url: t2, data: n2, headers: s2 } = e2; return new Promise((e3, r2) => { ne.request({ url: yt("https:", t2), data: n2, method: "POST", header: s2, success(t3) { e3(t3); }, fail(e4) { r2(e4); } }); }); } upload(e2) { return new Promise((t2, n2) => { const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = ne.uploadFile({ url: yt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) { const n3 = { statusCode: e3.statusCode, data: e3.data || {} }; 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3); }, fail(e3) { n2(new Error(e3.errMsg || "uploadFile:fail")); } }); "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => { e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend }); }); }); } } const wt = { setItem(e2, t2) { ne.setStorageSync(e2, t2); }, getItem: (e2) => ne.getStorageSync(e2), removeItem(e2) { ne.removeStorageSync(e2); }, clear() { ne.clearStorageSync(); } }; var vt = { genAdapter: function() { return { root: {}, reqClass: _t, localStorage: wt, primaryStorage: "local" }; }, isMatch: function() { return true; }, runtime: "uni_app" }; mt.useAdapters(vt); const It = mt, St = It.init; It.init = function(e2) { e2.env = e2.spaceId; const t2 = St.call(this, e2); t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId; const n2 = t2.auth; return t2.auth = function(e3) { const t3 = n2.call(this, e3); return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => { var n3; t3[e4] = (n3 = t3[e4], function(e5) { e5 = e5 || {}; const { success: t4, fail: s2, complete: r2 } = ee(e5); if (!(t4 || s2 || r2)) return n3.call(this, e5); n3.call(this, e5).then((e6) => { t4 && t4(e6), r2 && r2(e6); }, (e6) => { s2 && s2(e6), r2 && r2(e6); }); }).bind(t3); }), t3; }, t2.customAuth = t2.auth, t2; }; var bt = It; var kt = class extends pe { getAccessToken() { return new Promise((e2, t2) => { const n2 = "Anonymous_Access_token"; this.setAccessToken(n2), e2(n2); }); } setupRequest(e2, t2) { const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret); const r2 = le(); s2["x-client-info"] = encodeURIComponent(JSON.stringify(r2)); const { token: i2 } = re(); return s2["x-client-token"] = i2, { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: JSON.parse(JSON.stringify(s2)) }; } uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) { return new Promise((o2, a2) => { const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, success(e3) { e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => { i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) { if (!t2) throw new te({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" }); let r2; return this.getOSSUploadOptionsFromPath({ cloudPath: t2 }).then((t3) => { const { url: i2, formData: o2, name: a2 } = t3.result; r2 = t3.result.fileUrl; const c2 = { url: i2, formData: o2, name: a2, filePath: e2, fileType: n2 }; return this.uploadFileToOSS(Object.assign({}, c2, { onUploadProgress: s2 })); }).then(() => this.reportOSSUpload({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => { t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); })); } deleteFile({ fileList: e2 }) { const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) }; return this.request(this.setupRequest(t2)).then((e3) => { if (e3.success) return e3.result; throw new te({ code: "DELETE_FILE_FAILED", message: "删除文件失败" }); }); } getTempFileURL({ fileList: e2, maxAge: t2 } = {}) { if (!Array.isArray(e2) || 0 === e2.length) throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }); const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) }; return this.request(this.setupRequest(n2)).then((e3) => { if (e3.success) return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) }; throw new te({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" }); }); } }; var At = { init(e2) { const t2 = new kt(e2), n2 = { signInAnonymously: function() { return t2.authorize(); }, getLoginState: function() { return Promise.resolve(false); } }; return t2.auth = function() { return n2; }, t2.customAuth = t2.auth, t2; } }, Ct = n(function(e2, t2) { e2.exports = r.enc.Hex; }); function Pt() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e2) { var t2 = 16 * Math.random() | 0; return ("x" === e2 ? t2 : 3 & t2 | 8).toString(16); }); } function Tt(e2 = "", t2 = {}) { const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = Date.now(), u2 = Pt(), h2 = Object.assign({}, i2, { "x-from-app-id": a2.spaceAppId, "x-from-env-id": a2.spaceId, "x-to-env-id": a2.spaceId, "x-from-instance-id": c2, "x-from-function-name": s2, "x-client-timestamp": c2, "x-alipay-source": "client", "x-request-id": u2, "x-alipay-callid": u2, "x-trace-id": u2 }), l2 = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o2), [d2 = "", p2 = ""] = e2.split("?") || [], f2 = function(e3) { const t3 = e3.signedHeaders.join(";"), n3 = e3.signedHeaders.map((t4) => `${t4.toLowerCase()}:${e3.headers[t4]} `).join(""), s3 = we(e3.body).toString(Ct), r3 = `${e3.method.toUpperCase()} ${e3.path} ${e3.query} ${n3} ${t3} ${s3} `, i3 = we(r3).toString(Ct), o3 = `HMAC-SHA256 ${e3.timestamp} ${i3} `, a3 = ve(o3, e3.secretKey).toString(Ct); return `HMAC-SHA256 Credential=${e3.secretId}, SignedHeaders=${t3}, Signature=${a3}`; }({ path: d2, query: p2, method: r2, headers: h2, timestamp: c2, body: JSON.stringify(n2), secretId: a2.accessKey, secretKey: a2.secretKey, signedHeaders: l2.sort() }); return { url: `${a2.endpoint}${e2}`, headers: Object.assign({}, h2, { Authorization: f2 }) }; } function xt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {} }) { return new Promise((r2, i2) => { ne.request({ url: e2, method: n2, data: "object" == typeof t2 ? JSON.stringify(t2) : t2, header: s2, dataType: "json", complete: (e3 = {}) => { const t3 = s2["x-trace-id"] || ""; if (!e3.statusCode || e3.statusCode >= 400) { const { message: n3, errMsg: s3, trace_id: r3 } = e3.data || {}; return i2(new te({ code: "SYS_ERR", message: n3 || s3 || "request:fail", requestId: r3 || t3 })); } r2({ status: e3.statusCode, data: e3.data, headers: e3.header, requestId: t3 }); } }); }); } function Ot(e2, t2) { const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Tt(n2, { functionName: "", data: s2, method: r2, headers: { "x-alipay-cloud-mode": "oss", "x-data-api-type": "oss", "x-expire-timestamp": Date.now() + 6e4 }, signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"], config: t2 }); return xt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => { const t3 = e3.data || {}; if (!t3.success) throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId }); return t3.data || {}; }).catch((e3) => { throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId }); }); } function Et(e2 = "") { const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/"); if (n2 <= 0) throw new te({ code: "INVALID_PARAM", message: "fileID不合法" }); const s2 = t2.substring(0, n2), r2 = t2.substring(n2 + 1); return s2 !== this.config.spaceId && console.warn("file ".concat(e2, " does not belong to env ").concat(this.config.spaceId)), r2; } function Lt(e2 = "") { return "cloud://".concat(this.config.spaceId, "/").concat(e2.replace(/^\/+/, "")); } class Rt { constructor(e2) { this.config = e2; } signedURL(e2, t2 = {}) { const n2 = `/ws/function/${e2}`, s2 = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""), r2 = Object.assign({}, t2, { accessKeyId: this.config.accessKey, signatureNonce: Pt(), timestamp: "" + Date.now() }), i2 = [n2, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function(e3) { return r2[e3] ? "".concat(e3, "=").concat(r2[e3]) : null; }).filter(Boolean).join("&"), `host:${s2}`].join("\n"), o2 = ["HMAC-SHA256", we(i2).toString(Ct)].join("\n"), a2 = ve(o2, this.config.secretKey).toString(Ct), c2 = Object.keys(r2).map((e3) => `${e3}=${encodeURIComponent(r2[e3])}`).join("&"); return `${this.config.wsEndpoint}${n2}?${c2}&signature=${a2}`; } } var Ut = class { constructor(e2) { if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach((t2) => { if (!Object.prototype.hasOwnProperty.call(e2, t2)) throw new Error(`${t2} required`); }), e2.endpoint) { if ("string" != typeof e2.endpoint) throw new Error("endpoint must be string"); if (!/^https:\/\//.test(e2.endpoint)) throw new Error("endpoint must start with https://"); e2.endpoint = e2.endpoint.replace(/\/$/, ""); } this.config = Object.assign({}, e2, { endpoint: e2.endpoint || `https://${e2.spaceId}.api-hz.cloudbasefunction.cn`, wsEndpoint: e2.wsEndpoint || `wss://${e2.spaceId}.api-hz.cloudbasefunction.cn` }), this._websocket = new Rt(this.config); } callFunction(e2) { return function(e3, t2) { const { name: n2, data: s2, async: r2 = false } = e3, i2 = "POST", o2 = { "x-to-function-name": n2 }; r2 && (o2["x-function-invoke-type"] = "async"); const { url: a2, headers: c2 } = Tt("/functions/invokeFunction", { functionName: n2, data: s2, method: i2, headers: o2, signHeaderKeys: ["x-to-function-name"], config: t2 }); return xt({ url: a2, data: s2, method: i2, headers: c2 }).then((e4) => { let t3 = 0; if (r2) { const n3 = e4.data || {}; t3 = "200" === n3.errCode ? 0 : n3.errCode, e4.data = n3.data || {}, e4.errMsg = n3.errMsg; } if (0 !== t3) throw new te({ code: t3, message: e4.errMsg, requestId: e4.requestId }); return { errCode: t3, success: 0 === t3, requestId: e4.requestId, result: e4.data }; }).catch((e4) => { throw new te({ code: e4.errCode, message: e4.errMsg, requestId: e4.requestId }); }); }(e2, this.config); } uploadFileToOSS({ url: e2, filePath: t2, fileType: n2, formData: s2, onUploadProgress: r2 }) { return new Promise((i2, o2) => { const a2 = ne.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, name: "file", success(e3) { e3 && e3.statusCode < 400 ? i2(e3) : o2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { o2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof r2 && a2 && "function" == typeof a2.onProgressUpdate && a2.onProgressUpdate((e3) => { r2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } async uploadFile({ filePath: e2, cloudPath: t2 = "", fileType: n2 = "image", onUploadProgress: s2 }) { if ("string" !== f(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" }); if (!(t2 = t2.trim())) throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" }); if (/:\/\//.test(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" }); const r2 = await Ot({ path: "/".concat(t2.replace(/^\//, ""), "?post_url") }, this.config), { file_id: i2, upload_url: o2, form_data: a2 } = r2, c2 = a2 && a2.reduce((e3, t3) => (e3[t3.key] = t3.value, e3), {}); return this.uploadFileToOSS({ url: o2, filePath: e2, fileType: n2, formData: c2, onUploadProgress: s2 }).then(() => ({ fileID: i2 })); } async getTempFileURL({ fileList: e2 }) { return new Promise((t2, n2) => { (!e2 || e2.length < 0) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList不能为空数组" })), e2.length > 50 && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList数组长度不能超过50" })); const s2 = []; for (const t3 of e2) { "string" !== f(t3) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList的元素必须是非空的字符串" })); const e3 = Et.call(this, t3); s2.push({ file_id: e3, expire: 600 }); } Ot({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => { const { file_list: n3 = [] } = e3; t2({ fileList: n3.map((e4) => ({ fileID: Lt.call(this, e4.file_id), tempFileURL: e4.download_url })) }); }).catch((e3) => n2(e3)); }); } async connectWebSocket(e2) { const { name: t2, query: n2 } = e2; return ne.connectSocket({ url: this._websocket.signedURL(t2, n2), complete: () => { } }); } }; var Nt = { init: (e2) => { e2.provider = "alipay"; const t2 = new Ut(e2); return t2.auth = function() { return { signInAnonymously: function() { return Promise.resolve(); }, getLoginState: function() { return Promise.resolve(true); } }; }, t2; } }; function Dt({ data: e2 }) { let t2; t2 = le(); const n2 = JSON.parse(JSON.stringify(e2 || {})); if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) { const { token: e3 } = re(); e3 && (n2.uniIdToken = e3); } return n2; } async function Mt({ name: e2, data: t2 } = {}) { await this.__dev__.initLocalNetwork(); const { localAddress: n2, localPort: s2 } = this.__dev__, r2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay" }[this.config.provider], i2 = this.config.spaceId, o2 = `http://${n2}:${s2}/system/check-function`, a2 = `http://${n2}:${s2}/cloudfunctions/${e2}`; return new Promise((t3, n3) => { ne.request({ method: "POST", url: o2, data: { name: e2, platform: C, provider: r2, spaceId: i2 }, timeout: 3e3, success(e3) { t3(e3); }, fail() { t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } }); } }); }).then(({ data: e3 } = {}) => { const { code: t3, message: n3 } = e3 || {}; return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" }; }).then(({ code: n3, message: s3 }) => { if (0 !== n3) { switch (n3) { case "MODULE_ENCRYPTED": console.error(`此云函数(${e2})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`); break; case "FUNCTION_ENCRYPTED": console.error(`此云函数(${e2})已加密不可本地调试,自动切换为云端已部署的云函数`); break; case "ACTION_ENCRYPTED": console.error(s3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境"); break; case "NETWORK_ERROR": console.error(s3 || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下"); break; case "SWITCH_TO_CLOUD": break; default: { const e3 = `检测本地调试服务出现错误:${s3},请检查网络环境或重启客户端再试`; throw console.error(e3), new Error(e3); } } return this._callCloudFunction({ name: e2, data: t2 }); } return new Promise((e3, n4) => { const s4 = Dt.call(this, { data: t2 }); ne.request({ method: "POST", url: a2, data: { provider: r2, platform: C, param: s4 }, success: ({ statusCode: t3, data: s5 } = {}) => !t3 || t3 >= 400 ? n4(new te({ code: s5.code || "SYS_ERR", message: s5.message || "request:fail" })) : e3({ result: s5 }), fail(e4) { n4(new te({ code: e4.code || e4.errCode || "SYS_ERR", message: e4.message || e4.errMsg || "request:fail" })); } }); }); }); } const qt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }]; var Ft = /[\\^$.*+?()[\]{}|]/g, Kt = RegExp(Ft.source); function jt(e2, t2, n2) { return e2.replace(new RegExp((s2 = t2) && Kt.test(s2) ? s2.replace(Ft, "\\$&") : s2, "g"), n2); var s2; } const Bt = "request", Wt = "response", Ht = "both"; const Tn = { code: 2e4, message: "System error" }, xn = { code: 20101, message: "Invalid client" }; function Ln(e2) { const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {}; return new te({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || Tn.code, message: r2 || o2, cause: a2 }); } let Un; function Fn({ secretType: e2 } = {}) { return e2 === Bt || e2 === Wt || e2 === Ht; } function Kn({ name: e2, data: t2 = {} } = {}) { return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action; } function jn({ provider: e2, spaceId: t2, functionName: n2 } = {}) { const { appId: s2, uniPlatform: r2, osName: i2 } = ce(); let o2 = r2; "app" === r2 && (o2 = i2); const a2 = function({ provider: e3, spaceId: t3 } = {}) { const n3 = A; if (!n3) return {}; e3 = /* @__PURE__ */ function(e4) { return "tencent" === e4 ? "tcb" : e4; }(e3); const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3); return s3 && s3.config; }({ provider: e2, spaceId: t2 }); if (!a2 || !a2.accessControl || !a2.accessControl.enable) return false; const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2); if (0 === u2.length) return true; const h2 = function(e3, t3) { let n3, s3, r3; for (let i3 = 0; i3 < e3.length; i3++) { const o3 = e3[i3]; o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3; } return n3 || s3 || r3; }(u2, n2); if (!h2) return false; if ((c2[h2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase())) return true; throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), Ln(xn); } function $n({ functionName: e2, result: t2, logPvd: n2 }) { if (this.__dev__.debugLog && t2 && t2.requestId) { const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId }); console.log(`[${n2}-request]${s2}[/${n2}-request]`); } } function Bn(e2) { const t2 = e2.callFunction, n2 = function(n3) { const s2 = n3.name; n3.data = Dt.call(e2, { data: n3.data }); const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay" }[this.config.provider], i2 = Fn(n3), o2 = Kn(n3), a2 = i2 || o2; return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && $n.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && $n.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) { for (let s3 = 0; s3 < n4.length; s3++) { const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3); if (!a3) continue; let c2 = i3; for (let e5 = 1; e5 < a3.length; e5++) c2 = jt(c2, `{$${e5}}`, a3[e5]); for (const e5 in t3) c2 = jt(c2, `{${e5}}`, t3[e5]); return "replace" === o3 ? c2 : e4 + c2; } return e4; }({ message: `[${n3.name}]: ${e3.message}`, formatter: qt, extraInfo: { functionName: s2 } })), Promise.reject(e3))); }; e2.callFunction = function(t3) { const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name; let o2, a2; if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && T ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Mt), o2 = Mt) : o2 = n2, o2 = o2.bind(e2), Kn(t3)) a2 = n2.call(e2, t3); else if (Fn(t3)) { a2 = new Un({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3); } else if (jn({ provider: s2, spaceId: r2, functionName: i2 })) { a2 = new Un({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3); } else a2 = o2(t3); return Object.defineProperty(a2, "result", { get: () => (console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), a2.then((e3) => ("undefined" != typeof UTSJSONObject && (e3.result = new UTSJSONObject(e3.result)), e3)); }; } Un = class { constructor() { throw Ln({ message: `Platform ${C} is not enabled, please check whether secure network module is enabled in your manifest.json` }); } }; const Wn = Symbol("CLIENT_DB_INTERNAL"); function Hn(e2, t2) { return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Wn, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) { if ("_uniClient" === n2) return null; if ("symbol" == typeof n2) return e3[n2]; if (n2 in e3 || "string" != typeof n2) { const t3 = e3[n2]; return "function" == typeof t3 ? t3.bind(e3) : t3; } return t2.get(e3, n2, s2); } }); } function zn(e2) { return { on: (t2, n2) => { e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2); }, off: (t2, n2) => { e2[t2] = e2[t2] || []; const s2 = e2[t2].indexOf(n2); -1 !== s2 && e2[t2].splice(s2, 1); } }; } const Jn = ["db.Geo", "db.command", "command.aggregate"]; function Vn(e2, t2) { return Jn.indexOf(`${e2}.${t2}`) > -1; } function Gn(e2) { switch (f(e2 = se(e2))) { case "array": return e2.map((e3) => Gn(e3)); case "object": return e2._internalType === Wn || Object.keys(e2).forEach((t2) => { e2[t2] = Gn(e2[t2]); }), e2; case "regexp": return { $regexp: { source: e2.source, flags: e2.flags } }; case "date": return { $date: e2.toISOString() }; default: return e2; } } function Yn(e2) { return e2 && e2.content && e2.content.$method; } class Qn { constructor(e2, t2, n2) { this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2; } toJSON() { let e2 = this; const t2 = [e2.content]; for (; e2.prevStage; ) e2 = e2.prevStage, t2.push(e2.content); return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: Gn(e3.$param) })) }; } toString() { return JSON.stringify(this.toJSON()); } getAction() { const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method); return e2 && e2.$param && e2.$param[0]; } getCommand() { return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) }; } get isAggregate() { let e2 = this; for (; e2; ) { const t2 = Yn(e2), n2 = Yn(e2.prevStage); if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2) return true; e2 = e2.prevStage; } return false; } get isCommand() { let e2 = this; for (; e2; ) { if ("command" === Yn(e2)) return true; e2 = e2.prevStage; } return false; } get isAggregateCommand() { let e2 = this; for (; e2; ) { const t2 = Yn(e2), n2 = Yn(e2.prevStage); if ("aggregate" === t2 && "command" === n2) return true; e2 = e2.prevStage; } return false; } getNextStageFn(e2) { const t2 = this; return function() { return Xn({ $method: e2, $param: Gn(Array.from(arguments)) }, t2, t2._database); }; } get count() { return this.isAggregate ? this.getNextStageFn("count") : function() { return this._send("count", Array.from(arguments)); }; } get remove() { return this.isCommand ? this.getNextStageFn("remove") : function() { return this._send("remove", Array.from(arguments)); }; } get() { return this._send("get", Array.from(arguments)); } get add() { return this.isCommand ? this.getNextStageFn("add") : function() { return this._send("add", Array.from(arguments)); }; } update() { return this._send("update", Array.from(arguments)); } end() { return this._send("end", Array.from(arguments)); } get set() { return this.isCommand ? this.getNextStageFn("set") : function() { throw new Error("JQL禁止使用set方法"); }; } _send(e2, t2) { const n2 = this.getAction(), s2 = this.getCommand(); if (s2.$db.push({ $method: e2, $param: Gn(t2) }), S) { const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param; t3 && 1 === t3.length && "string" == typeof e3.$param[0] && e3.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。"); } return this._database._callCloudFunction({ action: n2, command: s2 }); } } function Xn(e2, t2, n2) { return Hn(new Qn(e2, t2, n2), { get(e3, t3) { let s2 = "db"; return e3 && e3.content && (s2 = e3.content.$method), Vn(s2, t3) ? Xn({ $method: t3 }, e3, n2) : function() { return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, e3, n2); }; } }); } function Zn({ path: e2, method: t2 }) { return class { constructor() { this.param = Array.from(arguments); } toJSON() { return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] }; } toString() { return JSON.stringify(this.toJSON()); } }; } function es(e2, t2 = {}) { return Hn(new e2(t2), { get: (e3, t3) => Vn("db", t3) ? Xn({ $method: t3 }, null, e3) : function() { return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, null, e3); } }); } class ts extends class { constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) { this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t2 || (this.auth = zn(this._authCallBacks)), this._isJQL = t2, Object.assign(this, zn(this._dbCallBacks)), this.env = Hn({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = Hn({}, { get: (e3, t3) => Zn({ path: ["Geo"], method: t3 }) }), this.serverDate = Zn({ path: [], method: "serverDate" }), this.RegExp = Zn({ path: [], method: "RegExp" }); } getCloudEnv(e2) { if ("string" != typeof e2 || !e2.trim()) throw new Error("getCloudEnv参数错误"); return { $env: e2.replace("$cloudEnv_", "") }; } _callback(e2, t2) { const n2 = this._dbCallBacks; n2[e2] && n2[e2].forEach((e3) => { e3(...t2); }); } _callbackAuth(e2, t2) { const n2 = this._authCallBacks; n2[e2] && n2[e2].forEach((e3) => { e3(...t2); }); } multiSend() { const e2 = Array.from(arguments), t2 = e2.map((e3) => { const t3 = e3.getAction(), n2 = e3.getCommand(); if ("getTemp" !== n2.$db[n2.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp"); return { action: t3, command: n2 }; }); return this._callCloudFunction({ multiCommand: t2, queryList: e2 }); } } { _parseResult(e2) { return this._isJQL ? e2.result : e2; } _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) { function r2(e3, t3) { if (n2 && s2) for (let n3 = 0; n3 < s2.length; n3++) { const r3 = s2[n3]; r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3])); } } const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database"; function a2(e3) { return i2._callback("error", [e3]), M(q(o2, "fail"), e3).then(() => M(q(o2, "complete"), e3)).then(() => (r2(null, e3), Y(j, { type: W, content: e3 }), Promise.reject(e3))); } const c2 = M(q(o2, "invoke")), u2 = this._uniClient; return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: h, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => { const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result; if (u3) for (let e4 = 0; e4 < u3.length; e4++) { const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console["warn" === t4 ? "error" : t4] || console.log; let i3 = "[System Info]" + n4; s4 && (i3 = `${i3} 详细信息:${s4}`), r3(i3); } if (t3) { return a2(new te({ code: t3, message: n3, requestId: e3.requestId })); } e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (ie({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), Y(B, { token: s3, tokenExpired: c3 })); const h2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }]; for (let t4 = 0; t4 < h2.length; t4++) { const { prop: n4, tips: s4 } = h2[t4]; if (n4 in e3.result) { const t5 = e3.result[n4]; Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) }); } } return function(e4) { return M(q(o2, "success"), e4).then(() => M(q(o2, "complete"), e4)).then(() => { r2(e4, null); const t4 = i2._parseResult(e4); return Y(j, { type: W, content: t4 }), Promise.resolve(t4); }); }(e3); }, (e3) => { /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"); return a2(new te({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId })); }); } } const ns = "token无效,跳转登录页面", ss = "token过期,跳转登录页面", rs = { TOKEN_INVALID_TOKEN_EXPIRED: ss, TOKEN_INVALID_INVALID_CLIENTID: ns, TOKEN_INVALID: ns, TOKEN_INVALID_WRONG_TOKEN: ns, TOKEN_INVALID_ANONYMOUS_USER: ns }, is = { "uni-id-token-expired": ss, "uni-id-check-token-failed": ns, "uni-id-token-not-exist": ns, "uni-id-check-device-feature-failed": ns }; function os(e2, t2) { let n2 = ""; return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, ""); } function as(e2 = [], t2 = "") { const n2 = [], s2 = []; return e2.forEach((e3) => { true === e3.needLogin ? n2.push(os(t2, e3.path)) : false === e3.needLogin && s2.push(os(t2, e3.path)); }), { needLoginPage: n2, notNeedLoginPage: s2 }; } function cs(e2) { return e2.split("?")[0].replace(/^\//, ""); } function us() { return function(e2) { let t2 = e2 && e2.$page && e2.$page.fullPath || ""; return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2; }(function() { const e2 = getCurrentPages(); return e2[e2.length - 1]; }()); } function hs() { return cs(us()); } function ls(e2 = "", t2 = {}) { if (!e2) return false; if (!(t2 && t2.list && t2.list.length)) return false; const n2 = t2.list, s2 = cs(e2); return n2.some((e3) => e3.pagePath === s2); } const ds = !!e.uniIdRouter; const { loginPage: ps, routerNeedLogin: fs, resToLogin: gs, needLoginPage: ms, notNeedLoginPage: ys, loginPageInTabBar: _s } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) { const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = as(t2), { needLoginPage: h2, notNeedLoginPage: l2 } = function(e2 = []) { const t3 = [], n3 = []; return e2.forEach((e3) => { const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = as(r3, s3); t3.push(...i3), n3.push(...o3); }), { needLoginPage: t3, notNeedLoginPage: n3 }; }(n2); return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...h2], notNeedLoginPage: [...u2, ...l2], loginPageInTabBar: ls(i2, r2) }; }(); if (ms.indexOf(ps) > -1) throw new Error(`Login page [${ps}] should not be "needLogin", please check your pages.json`); function ws(e2) { const t2 = hs(); if ("/" === e2.charAt(0)) return e2; const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/"); i2.pop(); for (let e3 = 0; e3 < r2.length; e3++) { const t3 = r2[e3]; ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3); } return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : ""); } function vs(e2) { const t2 = cs(ws(e2)); return !(ys.indexOf(t2) > -1) && (ms.indexOf(t2) > -1 || fs.some((t3) => function(e3, t4) { return new RegExp(t4).test(e3); }(e2, t3))); } function Is({ redirect: e2 }) { const t2 = cs(e2), n2 = cs(ps); return hs() !== n2 && t2 !== n2; } function Ss({ api: e2, redirect: t2 } = {}) { if (!t2 || !Is({ redirect: t2 })) return; const n2 = function(e3, t3) { return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3; }(ps, t2); _s ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo"); const s2 = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, switchTab: uni.switchTab, reLaunch: uni.reLaunch }; setTimeout(() => { s2[e2]({ url: n2 }); }, 0); } function bs({ url: e2 } = {}) { const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() { const { token: e3, tokenExpired: t3 } = re(); let n3; if (e3) { if (t3 < Date.now()) { const e4 = "uni-id-token-expired"; n3 = { errCode: e4, errMsg: is[e4] }; } } else { const e4 = "uni-id-check-token-failed"; n3 = { errCode: e4, errMsg: is[e4] }; } return n3; }(); if (vs(e2) && n2) { n2.uniIdRedirectUrl = e2; if (J($).length > 0) return setTimeout(() => { Y($, n2); }, 0), t2.abortLoginPageJump = true, t2; t2.autoToLoginPage = true; } return t2; } function ks() { !function() { const e3 = us(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = bs({ url: e3 }); t2 || n2 && Ss({ api: "redirectTo", redirect: e3 }); }(); const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]; for (let t2 = 0; t2 < e2.length; t2++) { const n2 = e2[t2]; uni.addInterceptor(n2, { invoke(e3) { const { abortLoginPageJump: t3, autoToLoginPage: s2 } = bs({ url: e3.url }); return t3 ? e3 : s2 ? (Ss({ api: n2, redirect: ws(e3.url) }), false) : e3; } }); } } function As() { this.onResponse((e2) => { const { type: t2, content: n2 } = e2; let s2 = false; switch (t2) { case "cloudobject": s2 = function(e3) { if ("object" != typeof e3) return false; const { errCode: t3 } = e3 || {}; return t3 in is; }(n2); break; case "clientdb": s2 = function(e3) { if ("object" != typeof e3) return false; const { errCode: t3 } = e3 || {}; return t3 in rs; }(n2); } s2 && function(e3 = {}) { const t3 = J($); Z().then(() => { const n3 = us(); if (n3 && Is({ redirect: n3 })) return t3.length > 0 ? Y($, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (ps && Ss({ api: "navigateTo", redirect: n3 })); }); }(n2); }); } function Cs(e2) { !function(e3) { e3.onResponse = function(e4) { V(j, e4); }, e3.offResponse = function(e4) { G(j, e4); }; }(e2), function(e3) { e3.onNeedLogin = function(e4) { V($, e4); }, e3.offNeedLogin = function(e4) { G($, e4); }, ds && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = true, Z().then(() => { ks.call(e3); }), gs && As.call(e3))); }(e2), function(e3) { e3.onRefreshToken = function(e4) { V(B, e4); }, e3.offRefreshToken = function(e4) { G(B, e4); }; }(e2); } let Ps; const Ts = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", xs = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/; function Os() { const e2 = re().token || "", t2 = e2.split("."); if (!e2 || 3 !== t2.length) return { uid: null, role: [], permission: [], tokenExpired: 0 }; let n2; try { n2 = JSON.parse((s2 = t2[1], decodeURIComponent(Ps(s2).split("").map(function(e3) { return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2); }).join("")))); } catch (e3) { throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message); } var s2; return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2; } Ps = "function" != typeof atob ? function(e2) { if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !xs.test(e2)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."); var t2; e2 += "==".slice(2 - (3 & e2.length)); for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; ) t2 = Ts.indexOf(e2.charAt(i2++)) << 18 | Ts.indexOf(e2.charAt(i2++)) << 12 | (n2 = Ts.indexOf(e2.charAt(i2++))) << 6 | (s2 = Ts.indexOf(e2.charAt(i2++))), r2 += 64 === n2 ? String.fromCharCode(t2 >> 16 & 255) : 64 === s2 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2); return r2; } : atob; var Es = n(function(e2, t2) { Object.defineProperty(t2, "__esModule", { value: true }); const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail"; function r2(e3, t3) { return e3.tempFiles.forEach((e4, n3) => { e4.name || (e4.name = e4.path.substring(e4.path.lastIndexOf("/") + 1)), t3 && (e4.fileType = t3), e4.cloudPath = Date.now() + "_" + n3 + e4.name.substring(e4.name.lastIndexOf(".")); }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3; } function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) { return t3.then((e4) => { if (s3) { const t4 = s3(e4); if (void 0 !== t4) return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5); } return e4; }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) { (t5 = Object.assign({}, t5)).errMsg = n2; const i3 = t5.tempFiles, o2 = i3.length; let a2 = 0; return new Promise((n3) => { for (; a2 < s4; ) c2(); function c2() { const s5 = a2++; if (s5 >= o2) return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5)); const u2 = i3[s5]; e4.uploadFile({ provider: u2.provider, filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, cloudPathAsRealPath: u2.cloudPathAsRealPath, onUploadProgress(e5) { e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5); } }).then((e5) => { u2.url = e5.fileID, s5 < o2 && c2(); }).catch((e5) => { u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2(); }); } }); }(e3, t4, 5, r3)); } t2.initChooseAndUploadFile = function(e3) { return function(t3 = { type: "all" }) { return "image" === t3.type ? i2(e3, function(e4) { const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4; return new Promise((e5, a2) => { uni.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) { e5(r2(t5, "image")); }, fail(e6) { a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) }); } }); }); }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) { const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4; return new Promise((e5, c2) => { uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) { const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5; e5(r2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: i4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: o3, duration: s3, fileType: "video", cloudPath: "" }] }, "video")); }, fail(e6) { c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) }); } }); }); }(t3), t3) : i2(e3, function(e4) { const { count: t4, extension: n3 } = e4; return new Promise((e5, i3) => { let o2 = uni.chooseFile; if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o2 = wx.chooseMessageFile), "function" != typeof o2) return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" }); o2({ type: "all", count: t4, extension: n3, success(t5) { e5(r2(t5)); }, fail(e6) { i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) }); } }); }); }(t3), t3); }; }; }), Ls = t$1(Es); const Rs = "manual"; function Us(e2) { return { props: { localdata: { type: Array, default: () => [] }, options: { type: [Object, Array], default: () => ({}) }, spaceInfo: { type: Object, default: () => ({}) }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {}, mixinDatacomError: null }), created() { this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => { var e3 = []; return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => { e3.push(this[t2]); }), e3; }, (e3, t2) => { if (this.loadtime === Rs) return; let n2 = false; const s2 = []; for (let r2 = 2; r2 < e3.length; r2++) e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true); e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2); }); }, methods: { onMixinDatacomPropsChange(e3, t2) { }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) { this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then((n3) => { this.mixinDatacomLoading = false; const { data: s2, count: r2 } = n3.result; this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize; const i2 = e3 ? s2.length ? s2[0] : void 0 : s2; this.mixinDatacomResData = i2, t2 && t2(i2); }).catch((e4) => { this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, this.mixinDatacomError = e4, n2 && n2(e4); })); }, mixinDatacomGet(t2 = {}) { let n2; t2 = t2 || {}, n2 = "undefined" != typeof __uniX && __uniX ? e2.databaseForJQL(this.spaceInfo) : e2.database(this.spaceInfo); const s2 = t2.action || this.action; s2 && (n2 = n2.action(s2)); const r2 = t2.collection || this.collection; n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2); const i2 = t2.where || this.where; i2 && Object.keys(i2).length && (n2 = n2.where(i2)); const o2 = t2.field || this.field; o2 && (n2 = n2.field(o2)); const a2 = t2.foreignKey || this.foreignKey; a2 && (n2 = n2.foreignKey(a2)); const c2 = t2.groupby || this.groupby; c2 && (n2 = n2.groupBy(c2)); const u2 = t2.groupField || this.groupField; u2 && (n2 = n2.groupField(u2)); true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct()); const h2 = t2.orderby || this.orderby; h2 && (n2 = n2.orderBy(h2)); const l2 = void 0 !== t2.pageCurrent ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = void 0 !== t2.pageSize ? t2.pageSize : this.mixinDatacomPage.size, p2 = void 0 !== t2.getcount ? t2.getcount : this.getcount, f2 = void 0 !== t2.gettree ? t2.gettree : this.gettree, g2 = void 0 !== t2.gettreepath ? t2.gettreepath : this.gettreepath, m2 = { getCount: p2 }, y2 = { limitLevel: void 0 !== t2.limitlevel ? t2.limitlevel : this.limitlevel, startWith: void 0 !== t2.startwith ? t2.startwith : this.startwith }; return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (l2 - 1)).limit(d2).get(m2), n2; } } }; } function Ns(e2) { return function(t2, n2 = {}) { n2 = function(e3, t3 = {}) { return e3.customUI = t3.customUI || e3.customUI, e3.parseSystemError = t3.parseSystemError || e3.parseSystemError, Object.assign(e3.loadingOptions, t3.loadingOptions), Object.assign(e3.errorOptions, t3.errorOptions), "object" == typeof t3.secretMethods && (e3.secretMethods = t3.secretMethods), e3; }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2); const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2; return new Proxy({}, { get(s3, c2) { switch (c2) { case "toString": return "[object UniCloudObject]"; case "toJSON": return {}; } return function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) { return async function(...s4) { const r3 = n3 ? n3({ params: s4 }) : {}; let i3, o3; try { return await M(q(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await M(q(t3, "success"), { ...r3, result: i3 }), i3; } catch (e4) { throw o3 = e4, await M(q(t3, "fail"), { ...r3, error: o3 }), o3; } finally { await M(q(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 }); } }; }({ fn: async function s4(...h2) { let l2; a2 && uni.showLoading({ title: r2.title, mask: r2.mask }); const d2 = { name: t2, type: u, data: { method: c2, params: h2 } }; "object" == typeof n2.secretMethods && function(e3, t3) { const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"]; r3 && (t3.secretType = r3); }(n2, d2); let p2 = false; try { l2 = await e2.callFunction(d2); } catch (e3) { p2 = true, l2 = { result: new te(e3) }; } const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = l2.result || {}; if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ie(y2), Y(B, { ...y2 })), g2) { let e3 = m2; if (p2 && o2) { e3 = (await o2({ objectName: t2, methodName: c2, params: h2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2; } if (a2) if ("toast" === i2.type) uni.showToast({ title: e3, icon: "none" }); else { if ("modal" !== i2.type) throw new Error(`Invalid errorOptions.type: ${i2.type}`); { const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) { return new Promise((i3, o3) => { uni.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) { i3(e5); }, fail() { i3({ confirm: false, cancel: true }); } }); }); }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" }); if (i2.retry && t3) return s4(...h2); } } const n3 = new te({ subject: f2, code: g2, message: m2, requestId: l2.requestId }); throw n3.detail = l2.result, Y(j, { type: z, content: n3 }), n3; } return Y(j, { type: z, content: l2.result }), l2.result; }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) { return { objectName: t2, methodName: c2, params: e3 }; } }); } }); }; } function Ds(e2) { return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId)); } async function Ms({ openid: e2, callLoginByWeixin: t2 = false } = {}) { Ds(this); throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${C}\``); } async function qs(e2) { const t2 = Ds(this); return t2.initPromise || (t2.initPromise = Ms.call(this, e2).then((e3) => e3).catch((e3) => { throw delete t2.initPromise, e3; })), t2.initPromise; } function Fs(e2) { return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) { return qs.call(e2, { openid: t2, callLoginByWeixin: n2 }); }; } function Ks(e2) { !function(e3) { he = e3; }(e2); } function js(e2) { const t2 = { getSystemInfo: uni.getSystemInfo, getPushClientId: uni.getPushClientId }; return function(n2) { return new Promise((s2, r2) => { t2[e2]({ ...n2, success(e3) { s2(e3); }, fail(e3) { r2(e3); } }); }); }; } class $s extends class { constructor() { this._callback = {}; } addListener(e2, t2) { this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2); } on(e2, t2) { return this.addListener(e2, t2); } removeListener(e2, t2) { if (!t2) throw new Error('The "listener" argument must be of type function. Received undefined'); const n2 = this._callback[e2]; if (!n2) return; const s2 = function(e3, t3) { for (let n3 = e3.length - 1; n3 >= 0; n3--) if (e3[n3] === t3) return n3; return -1; }(n2, t2); n2.splice(s2, 1); } off(e2, t2) { return this.removeListener(e2, t2); } removeAllListener(e2) { delete this._callback[e2]; } emit(e2, ...t2) { const n2 = this._callback[e2]; if (n2) for (let e3 = 0; e3 < n2.length; e3++) n2[e3](...t2); } } { constructor() { super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = []; } init() { return Promise.all([js("getSystemInfo")(), js("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => { if (!e2) throw new Error("Invalid appId, please check the manifest.json file"); if (!t2) throw new Error("Invalid push client id"); this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener(); }, (e2) => { throw this.emit("error", e2), this.close(), e2; }); } async open() { return this.init(); } _isUniCloudSSE(e2) { if ("receive" !== e2.type) return false; const t2 = e2 && e2.data && e2.data.payload; return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId); } _receivePushMessage(e2) { if (!this._isUniCloudSSE(e2)) return; const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2; this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage(); } _consumMessage() { for (; ; ) { const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1); if (!e2) break; this._currentMessageId++, this._parseMessagePayload(e2); } } _parseMessagePayload(e2) { const { action: t2, messageId: n2, message: s2 } = e2; "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 }); } _appendMessage({ messageId: e2, message: t2 } = {}) { this.emit("message", t2); } _end({ messageId: e2, message: t2 } = {}) { this.emit("end", t2), this.close(); } _initMessageListener() { uni.onPushMessage(this._uniPushMessageCallback); } _destroy() { uni.offPushMessage(this._uniPushMessageCallback); } toJSON() { return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId }; } close() { this._destroy(), this.emit("close"); } } async function Bs(e2, t2) { const n2 = `http://${e2}:${t2}/system/ping`; try { const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => { ne.request({ ...s2, success(t4) { e4(t4); }, fail(e5) { t3(e5); } }); })); return !(!e3.data || 0 !== e3.data.code); } catch (e3) { return false; } var s2; } async function Ws(e2) { { const { osName: e3, osVersion: t3 } = ce(); "ios" === e3 && function(e4) { if (!e4 || "string" != typeof e4) return 0; const t4 = e4.match(/^(\d+)./); return t4 && t4[1] ? parseInt(t4[1]) : 0; }(t3) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)"); } const t2 = e2.__dev__; if (!t2.debugInfo) return; const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await async function(e3, t3) { let n3; for (let s3 = 0; s3 < e3.length; s3++) { const r3 = e3[s3]; if (await Bs(r3, t3)) { n3 = r3; break; } } return { address: n3, port: t3 }; }(n2, s2); if (r2) return t2.localAddress = r2, void (t2.localPort = s2); const i2 = console["error"]; let o2 = ""; if ("remote" === t2.debugInfo.initialLaunchType ? (t2.debugInfo.forceRemote = true, o2 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o2 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o2 += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", 0 === C.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote) throw new Error(o2); i2(o2); } function Hs(e2) { e2._initPromiseHub || (e2._initPromiseHub = new v({ createPromise: function() { let t2 = Promise.resolve(); var n2; n2 = 1, t2 = new Promise((e3) => { setTimeout(() => { e3(); }, n2); }); const s2 = e2.auth(); return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously()); } })); } const zs = { tcb: bt, tencent: bt, aliyun: fe, private: At, alipay: Nt }; let Js = new class { init(e2) { let t2 = {}; const n2 = zs[e2.provider]; if (!n2) throw new Error("未提供正确的provider参数"); t2 = n2.init(e2), function(e3) { const t3 = {}; e3.__dev__ = t3, t3.debugLog = "app" === C; const n3 = P; n3 && !n3.code && (t3.debugInfo = n3); const s2 = new v({ createPromise: function() { return Ws(e3); } }); t3.initLocalNetwork = function() { return s2.exec(); }; }(t2), Hs(t2), Bn(t2), function(e3) { const t3 = e3.uploadFile; e3.uploadFile = function(e4) { return t3.call(this, e4); }; }(t2), function(e3) { e3.database = function(t3) { if (t3 && Object.keys(t3).length > 0) return e3.init(t3).database(); if (this._database) return this._database; const n3 = es(ts, { uniClient: e3 }); return this._database = n3, n3; }, e3.databaseForJQL = function(t3) { if (t3 && Object.keys(t3).length > 0) return e3.init(t3).databaseForJQL(); if (this._databaseForJQL) return this._databaseForJQL; const n3 = es(ts, { uniClient: e3, isJQL: true }); return this._databaseForJQL = n3, n3; }; }(t2), function(e3) { e3.getCurrentUserInfo = Os, e3.chooseAndUploadFile = Ls.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() { return Us(e3); } }), e3.SSEChannel = $s, e3.initSecureNetworkByWeixin = Fs(e3), e3.setCustomClientInfo = Ks, e3.importObject = Ns(e3); }(t2); return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => { if (!t2[e3]) return; const n3 = t2[e3]; t2[e3] = function() { return n3.apply(t2, Array.from(arguments)); }, t2[e3] = (/* @__PURE__ */ function(e4, t3) { return function(n4) { let s2 = false; if ("callFunction" === t3) { const e5 = n4 && n4.type || c; s2 = e5 !== c; } const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec(); n4 = n4 || {}; const { success: o2, fail: a2, complete: u2 } = ee(n4), h2 = i2.then(() => s2 ? Promise.resolve() : M(q(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : M(q(t3, "success"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (r2 && Y(j, { type: H, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : M(q(t3, "fail"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (Y(j, { type: H, content: e5 }), Promise.reject(e5)))); if (!(o2 || a2 || u2)) return h2; h2.then((e5) => { o2 && o2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 }); }, (e5) => { a2 && a2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 }); }); }; }(t2[e3], e3)).bind(t2); }), t2.init = this.init, t2; } }(); (() => { const e2 = T; let t2 = {}; if (e2 && 1 === e2.length) t2 = e2[0], Js = Js.init(t2), Js._isDefault = true; else { const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"]; let n2; n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => { Js[e3] = function() { return console.error(n2), Promise.reject(new te({ code: "SYS_ERR", message: n2 })); }; }); } Object.assign(Js, { get mixinDatacom() { return Us(Js); } }), Cs(Js), Js.addInterceptor = N, Js.removeInterceptor = D, Js.interceptObject = F; })(); var Vs = Js; const ERR_MSG_OK = "chooseAndUploadFile:ok"; const ERR_MSG_FAIL = "chooseAndUploadFile:fail"; function chooseImage(opts) { const { count, sizeType = ["original", "compressed"], sourceType, extension } = opts; return new Promise((resolve, reject) => { uni.chooseImage({ count, sizeType, sourceType, extension, success(res) { resolve(normalizeChooseAndUploadFileRes(res, "image")); }, fail(res) { reject({ errMsg: res.errMsg.replace("chooseImage:fail", ERR_MSG_FAIL) }); } }); }); } function chooseVideo(opts) { const { count, camera, compressed, maxDuration, sourceType, extension } = opts; return new Promise((resolve, reject) => { uni.chooseVideo({ camera, compressed, maxDuration, sourceType, extension, success(res) { const { tempFilePath, duration, size, height, width } = res; resolve(normalizeChooseAndUploadFileRes({ errMsg: "chooseVideo:ok", tempFilePaths: [tempFilePath], tempFiles: [{ name: res.tempFile && res.tempFile.name || "", path: tempFilePath, size, type: res.tempFile && res.tempFile.type || "", width, height, duration, fileType: "video", cloudPath: "" }] }, "video")); }, fail(res) { reject({ errMsg: res.errMsg.replace("chooseVideo:fail", ERR_MSG_FAIL) }); } }); }); } function chooseAll(opts) { const { count, extension } = opts; return new Promise((resolve, reject) => { let chooseFile = uni.chooseFile; if (typeof wx !== "undefined" && typeof wx.chooseMessageFile === "function") { chooseFile = wx.chooseMessageFile; } if (typeof chooseFile !== "function") { return reject({ errMsg: ERR_MSG_FAIL + " 请指定 type 类型,该平台仅支持选择 image 或 video。" }); } chooseFile({ type: "all", count, extension, success(res) { resolve(normalizeChooseAndUploadFileRes(res)); }, fail(res) { reject({ errMsg: res.errMsg.replace("chooseFile:fail", ERR_MSG_FAIL) }); } }); }); } function normalizeChooseAndUploadFileRes(res, fileType) { res.tempFiles.forEach((item, index) => { if (!item.name) { item.name = item.path.substring(item.path.lastIndexOf("/") + 1); } if (fileType) { item.fileType = fileType; } item.cloudPath = Date.now() + "_" + index + item.name.substring(item.name.lastIndexOf(".")); }); if (!res.tempFilePaths) { res.tempFilePaths = res.tempFiles.map((file) => file.path); } return res; } function uploadCloudFiles(files, max = 5, onUploadProgress) { files = JSON.parse(JSON.stringify(files)); const len = files.length; let count = 0; let self2 = this; return new Promise((resolve) => { while (count < max) { next(); } function next() { let cur = count++; if (cur >= len) { !files.find((item) => !item.url && !item.errMsg) && resolve(files); return; } const fileItem = files[cur]; const index = self2.files.findIndex((v2) => v2.uuid === fileItem.uuid); fileItem.url = ""; delete fileItem.errMsg; Vs.uploadFile({ filePath: fileItem.path, cloudPath: fileItem.cloudPath, fileType: fileItem.fileType, onUploadProgress: (res) => { res.index = index; onUploadProgress && onUploadProgress(res); } }).then((res) => { fileItem.url = res.fileID; fileItem.index = index; if (cur < len) { next(); } }).catch((res) => { fileItem.errMsg = res.errMsg || res.message; fileItem.index = index; if (cur < len) { next(); } }); } }); } function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) { return choosePromise.then((res) => { if (onChooseFile) { const customChooseRes = onChooseFile(res); if (typeof customChooseRes !== "undefined") { return Promise.resolve(customChooseRes).then((chooseRes) => typeof chooseRes === "undefined" ? res : chooseRes); } } return res; }).then((res) => { if (res === false) { return { errMsg: ERR_MSG_OK, tempFilePaths: [], tempFiles: [] }; } return res; }); } function chooseAndUploadFile(opts = { type: "all" }) { if (opts.type === "image") { return uploadFiles(chooseImage(opts), opts); } else if (opts.type === "video") { return uploadFiles(chooseVideo(opts), opts); } return uploadFiles(chooseAll(opts), opts); } const get_file_ext = (name) => { const last_len = name.lastIndexOf("."); const len = name.length; return { name: name.substring(0, last_len), ext: name.substring(last_len + 1, len) }; }; const get_extname = (fileExtname) => { if (!Array.isArray(fileExtname)) { let extname = fileExtname.replace(/(\[|\])/g, ""); return extname.split(","); } else { return fileExtname; } }; const get_files_and_is_max = (res, _extname) => { let filePaths = []; let files = []; if (!_extname || _extname.length === 0) { return { filePaths, files }; } res.tempFiles.forEach((v2) => { let fileFullName = get_file_ext(v2.name); const extname = fileFullName.ext.toLowerCase(); if (_extname.indexOf(extname) !== -1) { files.push(v2); filePaths.push(v2.path); } }); if (files.length !== res.tempFiles.length) { uni.showToast({ title: `当前选择了${res.tempFiles.length}个文件 ,${res.tempFiles.length - files.length} 个文件格式不正确`, icon: "none", duration: 5e3 }); } return { filePaths, files }; }; const get_file_info = (filepath) => { return new Promise((resolve, reject) => { uni.getImageInfo({ src: filepath, success(res) { resolve(res); }, fail(err) { reject(err); } }); }); }; const get_file_data = async (files, type = "image") => { let fileFullName = get_file_ext(files.name); const extname = fileFullName.ext.toLowerCase(); let filedata = { name: files.name, uuid: files.uuid, extname: extname || "", cloudPath: files.cloudPath, fileType: files.fileType, thumbTempFilePath: files.thumbTempFilePath, url: files.path || files.path, size: files.size, //单位是字节 image: {}, path: files.path, video: {} }; if (type === "image") { const imageinfo = await get_file_info(files.path); delete filedata.video; filedata.image.width = imageinfo.width; filedata.image.height = imageinfo.height; filedata.image.location = imageinfo.path; } else { delete filedata.image; } return filedata; }; const _sfc_main$q = { name: "uploadImage", emits: ["uploadFiles", "choose", "delFile"], props: { filesList: { type: Array, default() { return []; } }, disabled: { type: Boolean, default: false }, disablePreview: { type: Boolean, default: false }, limit: { type: [Number, String], default: 9 }, imageStyles: { type: Object, default() { return { width: "auto", height: "auto", border: {} }; } }, delIcon: { type: Boolean, default: true }, readonly: { type: Boolean, default: false } }, computed: { styles() { let styles = { width: "auto", height: "auto", border: {} }; return Object.assign(styles, this.imageStyles); }, boxStyle() { const { width = "auto", height = "auto" } = this.styles; let obj = {}; if (height === "auto") { if (width !== "auto") { obj.height = this.value2px(width); obj["padding-top"] = 0; } else { obj.height = 0; } } else { obj.height = this.value2px(height); obj["padding-top"] = 0; } if (width === "auto") { if (height !== "auto") { obj.width = this.value2px(height); } else { obj.width = "33.3%"; } } else { obj.width = this.value2px(width); } let classles = ""; for (let i2 in obj) { classles += `${i2}:${obj[i2]};`; } return classles; }, borderStyle() { let { border } = this.styles; let obj = {}; const widthDefaultValue = 1; const radiusDefaultValue = 3; if (typeof border === "boolean") { obj.border = border ? "1px #eee solid" : "none"; } else { let width = border && border.width || widthDefaultValue; width = this.value2px(width); let radius = border && border.radius || radiusDefaultValue; radius = this.value2px(radius); obj = { "border-width": width, "border-style": border && border.style || "solid", "border-color": border && border.color || "#eee", "border-radius": radius }; } let classles = ""; for (let i2 in obj) { classles += `${i2}:${obj[i2]};`; } return classles; } }, methods: { uploadFiles(item, index) { this.$emit("uploadFiles", item); }, choose() { this.$emit("choose"); }, delFile(index) { this.$emit("delFile", index); }, prviewImage(img, index) { let urls = []; if (Number(this.limit) === 1 && this.disablePreview && !this.disabled) { this.$emit("choose"); } if (this.disablePreview) return; this.filesList.forEach((i2) => { urls.push(i2.url); }); uni.previewImage({ urls, current: index }); }, value2px(value) { if (typeof value === "number") { value += "px"; } else { if (value.indexOf("%") === -1) { value = value.indexOf("px") !== -1 ? value : value + "px"; } } return value; } } }; function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-file-picker__container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.filesList, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "file-picker__box", key: index, style: vue.normalizeStyle($options.boxStyle) }, [ vue.createElementVNode( "view", { class: "file-picker__box-content", style: vue.normalizeStyle($options.borderStyle) }, [ vue.createElementVNode("image", { class: "file-image", src: item.url, mode: "aspectFill", onClick: vue.withModifiers(($event) => $options.prviewImage(item, index), ["stop"]) }, null, 8, ["src", "onClick"]), $props.delIcon && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "icon-del-box", onClick: vue.withModifiers(($event) => $options.delFile(index), ["stop"]) }, [ vue.createElementVNode("view", { class: "icon-del" }), vue.createElementVNode("view", { class: "icon-del rotate" }) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.progress && item.progress !== 100 || item.progress === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "file-picker__progress" }, [ vue.createElementVNode("progress", { class: "file-picker__progress-item", percent: item.progress === -1 ? 0 : item.progress, "stroke-width": "4", backgroundColor: item.errMsg ? "#ff5a5f" : "#EBEBEB" }, null, 8, ["percent", "backgroundColor"]) ])) : vue.createCommentVNode("v-if", true), item.errMsg ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "file-picker__mask", onClick: vue.withModifiers(($event) => $options.uploadFiles(item, index), ["stop"]) }, " 点击重试 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )), $props.filesList.length < $props.limit && !$props.readonly ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "file-picker__box", style: vue.normalizeStyle($options.boxStyle) }, [ vue.createElementVNode( "view", { class: "file-picker__box-content is-add", style: vue.normalizeStyle($options.borderStyle), onClick: _cache[0] || (_cache[0] = (...args) => $options.choose && $options.choose(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode("view", { class: "icon-add" }), vue.createElementVNode("view", { class: "icon-add rotate" }) ], true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const uploadImage = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$6], ["__scopeId", "data-v-bdfc07e0"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.vue"]]); const _sfc_main$p = { name: "uploadFile", emits: ["uploadFiles", "choose", "delFile"], props: { filesList: { type: Array, default() { return []; } }, delIcon: { type: Boolean, default: true }, limit: { type: [Number, String], default: 9 }, showType: { type: String, default: "" }, listStyles: { type: Object, default() { return { // 是否显示边框 border: true, // 是否显示分隔线 dividline: true, // 线条样式 borderStyle: {} }; } }, readonly: { type: Boolean, default: false } }, computed: { list() { let files = []; this.filesList.forEach((v2) => { files.push(v2); }); return files; }, styles() { let styles = { border: true, dividline: true, "border-style": {} }; return Object.assign(styles, this.listStyles); }, borderStyle() { let { borderStyle, border } = this.styles; let obj = {}; if (!border) { obj.border = "none"; } else { let width = borderStyle && borderStyle.width || 1; width = this.value2px(width); let radius = borderStyle && borderStyle.radius || 5; radius = this.value2px(radius); obj = { "border-width": width, "border-style": borderStyle && borderStyle.style || "solid", "border-color": borderStyle && borderStyle.color || "#eee", "border-radius": radius }; } let classles = ""; for (let i2 in obj) { classles += `${i2}:${obj[i2]};`; } return classles; }, borderLineStyle() { let obj = {}; let { borderStyle } = this.styles; if (borderStyle && borderStyle.color) { obj["border-color"] = borderStyle.color; } if (borderStyle && borderStyle.width) { let width = borderStyle && borderStyle.width || 1; let style = borderStyle && borderStyle.style || 0; if (typeof width === "number") { width += "px"; } else { width = width.indexOf("px") ? width : width + "px"; } obj["border-width"] = width; if (typeof style === "number") { style += "px"; } else { style = style.indexOf("px") ? style : style + "px"; } obj["border-top-style"] = style; } let classles = ""; for (let i2 in obj) { classles += `${i2}:${obj[i2]};`; } return classles; } }, methods: { uploadFiles(item, index) { this.$emit("uploadFiles", { item, index }); }, choose() { this.$emit("choose"); }, delFile(index) { this.$emit("delFile", index); }, value2px(value) { if (typeof value === "number") { value += "px"; } else { value = value.indexOf("px") !== -1 ? value : value + "px"; } return value; } } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-file-picker__files" }, [ !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "files-button", onClick: _cache[0] || (_cache[0] = (...args) => $options.choose && $options.choose(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(` :class="{'is-text-box':showType === 'list'}" `), $options.list.length > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "uni-file-picker__lists is-text-box", style: vue.normalizeStyle($options.borderStyle) }, [ vue.createCommentVNode(" ,'is-list-card':showType === 'list-card' "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.list, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-file-picker__lists-box", { "files-border": index !== 0 && $options.styles.dividline }]), key: index, style: vue.normalizeStyle(index !== 0 && $options.styles.dividline && $options.borderLineStyle) }, [ vue.createElementVNode("view", { class: "uni-file-picker__item" }, [ vue.createCommentVNode(` :class="{'is-text-image':showType === 'list'}" `), vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode( "view", { class: "files__name" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), $props.delIcon && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "icon-del-box icon-files", onClick: ($event) => $options.delFile(index) }, [ vue.createElementVNode("view", { class: "icon-del icon-files" }), vue.createElementVNode("view", { class: "icon-del rotate" }) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]), item.progress && item.progress !== 100 || item.progress === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "file-picker__progress" }, [ vue.createElementVNode("progress", { class: "file-picker__progress-item", percent: item.progress === -1 ? 0 : item.progress, "stroke-width": "4", backgroundColor: item.errMsg ? "#ff5a5f" : "#EBEBEB" }, null, 8, ["percent", "backgroundColor"]) ])) : vue.createCommentVNode("v-if", true), item.status === "error" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "file-picker__mask", onClick: vue.withModifiers(($event) => $options.uploadFiles(item, index), ["stop"]) }, " 点击重试 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const uploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$5], ["__scopeId", "data-v-a54939c6"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.vue"]]); const _sfc_main$o = { name: "uniFilePicker", components: { uploadImage, uploadFile }, options: { virtualHost: true }, emits: ["select", "success", "fail", "progress", "delete", "update:modelValue", "input"], props: { modelValue: { type: [Array, Object], default() { return []; } }, value: { type: [Array, Object], default() { return []; } }, disabled: { type: Boolean, default: false }, disablePreview: { type: Boolean, default: false }, delIcon: { type: Boolean, default: true }, // 自动上传 autoUpload: { type: Boolean, default: true }, // 最大选择个数 ,h5只能限制单选或是多选 limit: { type: [Number, String], default: 9 }, // 列表样式 grid | list | list-card mode: { type: String, default: "grid" }, // 选择文件类型 image/video/all fileMediatype: { type: String, default: "image" }, // 文件类型筛选 fileExtname: { type: [Array, String], default() { return []; } }, title: { type: String, default: "" }, listStyles: { type: Object, default() { return { // 是否显示边框 border: true, // 是否显示分隔线 dividline: true, // 线条样式 borderStyle: {} }; } }, imageStyles: { type: Object, default() { return { width: "auto", height: "auto" }; } }, readonly: { type: Boolean, default: false }, returnType: { type: String, default: "array" }, sizeType: { type: Array, default() { return ["original", "compressed"]; } }, sourceType: { type: Array, default() { return ["album", "camera"]; } }, provider: { type: String, default: "" // 默认上传到 unicloud 内置存储 extStorage 扩展存储 } }, data() { return { files: [], localValue: [] }; }, watch: { value: { handler(newVal, oldVal) { this.setValue(newVal, oldVal); }, immediate: true }, modelValue: { handler(newVal, oldVal) { this.setValue(newVal, oldVal); }, immediate: true } }, computed: { filesList() { let files = []; this.files.forEach((v2) => { files.push(v2); }); return files; }, showType() { if (this.fileMediatype === "image") { return this.mode; } return "list"; }, limitLength() { if (this.returnType === "object") { return 1; } if (!this.limit) { return 1; } if (this.limit >= 9) { return 9; } return this.limit; } }, created() { if (!(Vs.config && Vs.config.provider)) { this.noSpace = true; Vs.chooseAndUploadFile = chooseAndUploadFile; } this.form = this.getForm("uniForms"); this.formItem = this.getForm("uniFormsItem"); if (this.form && this.formItem) { if (this.formItem.name) { this.rename = this.formItem.name; this.form.inputChildrens.push(this); } } }, methods: { /** * 公开用户使用,清空文件 * @param {Object} index */ clearFiles(index) { if (index !== 0 && !index) { this.files = []; this.$nextTick(() => { this.setEmit(); }); } else { this.files.splice(index, 1); } this.$nextTick(() => { this.setEmit(); }); }, /** * 公开用户使用,继续上传 */ upload() { let files = []; this.files.forEach((v2, index) => { if (v2.status === "ready" || v2.status === "error") { files.push(Object.assign({}, v2)); } }); return this.uploadFiles(files); }, async setValue(newVal, oldVal) { const newData = async (v2) => { const reg = /cloud:\/\/([\w.]+\/?)\S*/; let url = ""; if (v2.fileID) { url = v2.fileID; } else { url = v2.url; } if (reg.test(url)) { v2.fileID = url; v2.url = await this.getTempFileURL(url); } if (v2.url) v2.path = v2.url; return v2; }; if (this.returnType === "object") { if (newVal) { await newData(newVal); } else { newVal = {}; } } else { if (!newVal) newVal = []; for (let i2 = 0; i2 < newVal.length; i2++) { let v2 = newVal[i2]; await newData(v2); } } this.localValue = newVal; if (this.form && this.formItem && !this.is_reset) { this.is_reset = false; this.formItem.setValue(this.localValue); } let filesData = Object.keys(newVal).length > 0 ? newVal : []; this.files = [].concat(filesData); }, /** * 选择文件 */ choose() { if (this.disabled) return; if (this.files.length >= Number(this.limitLength) && this.showType !== "grid" && this.returnType === "array") { uni.showToast({ title: `您最多选择 ${this.limitLength} 个文件`, icon: "none" }); return; } this.chooseFiles(); }, /** * 选择文件并上传 */ chooseFiles() { const _extname = get_extname(this.fileExtname); Vs.chooseAndUploadFile({ type: this.fileMediatype, compressed: false, sizeType: this.sizeType, sourceType: this.sourceType, // TODO 如果为空,video 有问题 extension: _extname.length > 0 ? _extname : void 0, count: this.limitLength - this.files.length, //默认9 onChooseFile: this.chooseFileCallback, onUploadProgress: (progressEvent) => { this.setProgress(progressEvent, progressEvent.index); } }).then((result) => { this.setSuccessAndError(result.tempFiles); }).catch((err) => { formatAppLog("log", "at uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue:364", "选择失败", err); }); }, /** * 选择文件回调 * @param {Object} res */ async chooseFileCallback(res) { const _extname = get_extname(this.fileExtname); const is_one = Number(this.limitLength) === 1 && this.disablePreview && !this.disabled || this.returnType === "object"; if (is_one) { this.files = []; } let { filePaths, files } = get_files_and_is_max(res, _extname); if (!(_extname && _extname.length > 0)) { filePaths = res.tempFilePaths; files = res.tempFiles; } let currentData = []; for (let i2 = 0; i2 < files.length; i2++) { if (this.limitLength - this.files.length <= 0) break; files[i2].uuid = Date.now(); let filedata = await get_file_data(files[i2], this.fileMediatype); filedata.progress = 0; filedata.status = "ready"; this.files.push(filedata); currentData.push({ ...filedata, file: files[i2] }); } this.$emit("select", { tempFiles: currentData, tempFilePaths: filePaths }); res.tempFiles = files; if (!this.autoUpload || this.noSpace) { res.tempFiles = []; } res.tempFiles.forEach((fileItem, index) => { this.provider && (fileItem.provider = this.provider); const fileNameSplit = fileItem.name.split("."); const ext = fileNameSplit.pop(); const fileName = fileNameSplit.join(".").replace(/[\s\/\?<>\\:\*\|":]/g, "_"); fileItem.cloudPath = fileName + "_" + Date.now() + "_" + index + "." + ext; }); }, /** * 批传 * @param {Object} e */ uploadFiles(files) { files = [].concat(files); return uploadCloudFiles.call(this, files, 5, (res) => { this.setProgress(res, res.index, true); }).then((result) => { this.setSuccessAndError(result); return result; }).catch((err) => { formatAppLog("log", "at uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue:437", err); }); }, /** * 成功或失败 */ async setSuccessAndError(res, fn) { let successData = []; let errorData = []; let tempFilePath = []; let errorTempFilePath = []; for (let i2 = 0; i2 < res.length; i2++) { const item = res[i2]; const index = item.uuid ? this.files.findIndex((p2) => p2.uuid === item.uuid) : item.index; if (index === -1 || !this.files) break; if (item.errMsg === "request:fail") { this.files[index].url = item.path; this.files[index].status = "error"; this.files[index].errMsg = item.errMsg; errorData.push(this.files[index]); errorTempFilePath.push(this.files[index].url); } else { this.files[index].errMsg = ""; this.files[index].fileID = item.url; const reg = /cloud:\/\/([\w.]+\/?)\S*/; if (reg.test(item.url)) { this.files[index].url = await this.getTempFileURL(item.url); } else { this.files[index].url = item.url; } this.files[index].status = "success"; this.files[index].progress += 1; successData.push(this.files[index]); tempFilePath.push(this.files[index].fileID); } } if (successData.length > 0) { this.setEmit(); this.$emit("success", { tempFiles: this.backObject(successData), tempFilePaths: tempFilePath }); } if (errorData.length > 0) { this.$emit("fail", { tempFiles: this.backObject(errorData), tempFilePaths: errorTempFilePath }); } }, /** * 获取进度 * @param {Object} progressEvent * @param {Object} index * @param {Object} type */ setProgress(progressEvent, index, type) { this.files.length; const percentCompleted = Math.round(progressEvent.loaded * 100 / progressEvent.total); let idx = index; if (!type) { idx = this.files.findIndex((p2) => p2.uuid === progressEvent.tempFile.uuid); } if (idx === -1 || !this.files[idx]) return; this.files[idx].progress = percentCompleted - 1; this.$emit("progress", { index: idx, progress: parseInt(percentCompleted), tempFile: this.files[idx] }); }, /** * 删除文件 * @param {Object} index */ delFile(index) { this.$emit("delete", { index, tempFile: this.files[index], tempFilePath: this.files[index].url }); this.files.splice(index, 1); this.$nextTick(() => { this.setEmit(); }); }, /** * 获取文件名和后缀 * @param {Object} name */ getFileExt(name) { const last_len = name.lastIndexOf("."); const len = name.length; return { name: name.substring(0, last_len), ext: name.substring(last_len + 1, len) }; }, /** * 处理返回事件 */ setEmit() { let data = []; if (this.returnType === "object") { data = this.backObject(this.files)[0]; this.localValue = data ? data : null; } else { data = this.backObject(this.files); if (!this.localValue) { this.localValue = []; } this.localValue = [...data]; } this.$emit("update:modelValue", this.localValue); }, /** * 处理返回参数 * @param {Object} files */ backObject(files) { let newFilesData = []; files.forEach((v2) => { newFilesData.push({ extname: v2.extname, fileType: v2.fileType, image: v2.image, name: v2.name, path: v2.path, size: v2.size, fileID: v2.fileID, url: v2.url, // 修改删除一个文件后不能再上传的bug, #694 uuid: v2.uuid, status: v2.status, cloudPath: v2.cloudPath }); }); return newFilesData; }, async getTempFileURL(fileList) { fileList = { fileList: [].concat(fileList) }; const urls = await Vs.getTempFileURL(fileList); return urls.fileList[0].tempFileURL || ""; }, /** * 获取父元素实例 */ getForm(name = "uniForms") { let parent = this.$parent; let parentName = parent.$options.name; while (parentName !== name) { parent = parent.$parent; if (!parent) return false; parentName = parent.$options.name; } return parent; } } }; function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_upload_image = vue.resolveComponent("upload-image"); const _component_upload_file = vue.resolveComponent("upload-file"); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-file-picker" }, [ $props.title ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-file-picker__header" }, [ vue.createElementVNode( "text", { class: "file-title" }, vue.toDisplayString($props.title), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "file-count" }, vue.toDisplayString($options.filesList.length) + "/" + vue.toDisplayString($options.limitLength), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $props.fileMediatype === "image" && $options.showType === "grid" ? (vue.openBlock(), vue.createBlock(_component_upload_image, { key: 1, readonly: $props.readonly, "image-styles": $props.imageStyles, "files-list": $options.filesList, limit: $options.limitLength, disablePreview: $props.disablePreview, delIcon: $props.delIcon, onUploadFiles: $options.uploadFiles, onChoose: $options.choose, onDelFile: $options.delFile }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode("view", { class: "is-add" }, [ vue.createElementVNode("view", { class: "icon-add" }), vue.createElementVNode("view", { class: "icon-add rotate" }) ]) ], true) ]), _: 3 /* FORWARDED */ }, 8, ["readonly", "image-styles", "files-list", "limit", "disablePreview", "delIcon", "onUploadFiles", "onChoose", "onDelFile"])) : vue.createCommentVNode("v-if", true), $props.fileMediatype !== "image" || $options.showType !== "grid" ? (vue.openBlock(), vue.createBlock(_component_upload_file, { key: 2, readonly: $props.readonly, "list-styles": $props.listStyles, "files-list": $options.filesList, showType: $options.showType, delIcon: $props.delIcon, onUploadFiles: $options.uploadFiles, onChoose: $options.choose, onDelFile: $options.delFile }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode("button", { type: "primary", size: "mini" }, "选择文件") ], true) ]), _: 3 /* FORWARDED */ }, 8, ["readonly", "list-styles", "files-list", "showType", "delIcon", "onUploadFiles", "onChoose", "onDelFile"])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$4], ["__scopeId", "data-v-6223573f"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue"]]); function qjAddApi(config) { return https({ url: "/CxcQxj/cxcQxj/add", method: "post", data: config }); } function queryZwmcAndExaApi(username) { return https({ url: "/CxcQxj/cxcQxj/queryZwmcByUsername", method: "get", data: { username } }); } function qjQueryByIdApi(config) { return https({ url: "/CxcQxj/cxcQxj/queryById", method: "get", data: config }); } function queryDepByCode(code) { return https({ url: "/sys/sysDepart/queryDepNameByDepCode", method: "get", data: { code } }); } function obj2strClass(obj) { let classess = ""; for (let key in obj) { const val = obj[key]; if (val) { classess += `${key} `; } } return classess; } function obj2strStyle(obj) { let style = ""; for (let key in obj) { const val = obj[key]; style += `${key}:${val};`; } return style; } const _sfc_main$n = { name: "uni-easyinput", emits: [ "click", "iconClick", "update:modelValue", "input", "focus", "blur", "confirm", "clear", "eyes", "change", "keyboardheightchange" ], model: { prop: "modelValue", event: "update:modelValue" }, options: { virtualHost: true }, inject: { form: { from: "uniForm", default: null }, formItem: { from: "uniFormItem", default: null } }, props: { name: String, value: [Number, String], modelValue: [Number, String], type: { type: String, default: "text" }, clearable: { type: Boolean, default: true }, autoHeight: { type: Boolean, default: false }, placeholder: { type: String, default: " " }, placeholderStyle: String, focus: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, maxlength: { type: [Number, String], default: 140 }, confirmType: { type: String, default: "done" }, clearSize: { type: [Number, String], default: 24 }, inputBorder: { type: Boolean, default: true }, prefixIcon: { type: String, default: "" }, suffixIcon: { type: String, default: "" }, trim: { type: [Boolean, String], default: false }, cursorSpacing: { type: Number, default: 0 }, passwordIcon: { type: Boolean, default: true }, adjustPosition: { type: Boolean, default: true }, primaryColor: { type: String, default: "#2979ff" }, styles: { type: Object, default() { return { color: "#333", backgroundColor: "#fff", disableColor: "#F7F6F6", borderColor: "#e5e5e5" }; } }, errorMessage: { type: [String, Boolean], default: "" } }, data() { return { focused: false, val: "", showMsg: "", border: false, isFirstBorder: false, showClearIcon: false, showPassword: false, focusShow: false, localMsg: "", isEnter: false // 用于判断当前是否是使用回车操作 }; }, computed: { // 输入框内是否有值 isVal() { const val = this.val; if (val || val === 0) { return true; } return false; }, msg() { return this.localMsg || this.errorMessage; }, // 因为uniapp的input组件的maxlength组件必须要数值,这里转为数值,用户可以传入字符串数值 inputMaxlength() { return Number(this.maxlength); }, // 处理外层样式的style boxStyle() { return `color:${this.inputBorder && this.msg ? "#e43d33" : this.styles.color};`; }, // input 内容的类和样式处理 inputContentClass() { return obj2strClass({ "is-input-border": this.inputBorder, "is-input-error-border": this.inputBorder && this.msg, "is-textarea": this.type === "textarea", "is-disabled": this.disabled, "is-focused": this.focusShow }); }, inputContentStyle() { const focusColor = this.focusShow ? this.primaryColor : this.styles.borderColor; const borderColor = this.inputBorder && this.msg ? "#dd524d" : focusColor; return obj2strStyle({ "border-color": borderColor || "#e5e5e5", "background-color": this.disabled ? this.styles.disableColor : this.styles.backgroundColor }); }, // input右侧样式 inputStyle() { const paddingRight = this.type === "password" || this.clearable || this.prefixIcon ? "" : "10px"; return obj2strStyle({ "padding-right": paddingRight, "padding-left": this.prefixIcon ? "" : "10px" }); } }, watch: { value(newVal) { if (newVal === null) { this.val = ""; return; } this.val = newVal; }, modelValue(newVal) { if (newVal === null) { this.val = ""; return; } this.val = newVal; }, focus(newVal) { this.$nextTick(() => { this.focused = this.focus; this.focusShow = this.focus; }); } }, created() { this.init(); if (this.form && this.formItem) { this.$watch("formItem.errMsg", (newVal) => { this.localMsg = newVal; }); } }, mounted() { this.$nextTick(() => { this.focused = this.focus; this.focusShow = this.focus; }); }, methods: { /** * 初始化变量值 */ init() { if (this.value || this.value === 0) { this.val = this.value; } else if (this.modelValue || this.modelValue === 0 || this.modelValue === "") { this.val = this.modelValue; } else { this.val = ""; } }, /** * 点击图标时触发 * @param {Object} type */ onClickIcon(type) { this.$emit("iconClick", type); }, /** * 显示隐藏内容,密码框时生效 */ onEyes() { this.showPassword = !this.showPassword; this.$emit("eyes", this.showPassword); }, /** * 输入时触发 * @param {Object} event */ onInput(event) { let value = event.detail.value; if (this.trim) { if (typeof this.trim === "boolean" && this.trim) { value = this.trimStr(value); } if (typeof this.trim === "string") { value = this.trimStr(value, this.trim); } } if (this.errMsg) this.errMsg = ""; this.val = value; this.$emit("input", value); this.$emit("update:modelValue", value); }, /** * 外部调用方法 * 获取焦点时触发 * @param {Object} event */ onFocus() { this.$nextTick(() => { this.focused = true; }); this.$emit("focus", null); }, _Focus(event) { this.focusShow = true; this.$emit("focus", event); }, /** * 外部调用方法 * 失去焦点时触发 * @param {Object} event */ onBlur() { this.focused = false; this.$emit("blur", null); }, _Blur(event) { event.detail.value; this.focusShow = false; this.$emit("blur", event); if (this.isEnter === false) { this.$emit("change", this.val); } if (this.form && this.formItem) { const { validateTrigger } = this.form; if (validateTrigger === "blur") { this.formItem.onFieldChange(); } } }, /** * 按下键盘的发送键 * @param {Object} e */ onConfirm(e2) { this.$emit("confirm", this.val); this.isEnter = true; this.$emit("change", this.val); this.$nextTick(() => { this.isEnter = false; }); }, /** * 清理内容 * @param {Object} event */ onClear(event) { this.val = ""; this.$emit("input", ""); this.$emit("update:modelValue", ""); this.$emit("clear"); }, /** * 键盘高度发生变化的时候触发此事件 * 兼容性:微信小程序2.7.0+、App 3.1.0+ * @param {Object} event */ onkeyboardheightchange(event) { this.$emit("keyboardheightchange", event); }, /** * 去除空格 */ trimStr(str, pos = "both") { if (pos === "both") { return str.trim(); } else if (pos === "left") { return str.trimLeft(); } else if (pos === "right") { return str.trimRight(); } else if (pos === "start") { return str.trimStart(); } else if (pos === "end") { return str.trimEnd(); } else if (pos === "all") { return str.replace(/\s+/g, ""); } else if (pos === "none") { return str; } return str; } } }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-easyinput", { "uni-easyinput-error": $options.msg }]), style: vue.normalizeStyle($options.boxStyle) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-easyinput__content", $options.inputContentClass]), style: vue.normalizeStyle($options.inputContentStyle) }, [ $props.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, class: "content-clear-icon", type: $props.prefixIcon, color: "#c0c4cc", onClick: _cache[0] || (_cache[0] = ($event) => $options.onClickIcon("prefix")), size: "22" }, null, 8, ["type"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "left", {}, void 0, true), $props.type === "textarea" ? (vue.openBlock(), vue.createElementBlock("textarea", { key: 1, class: vue.normalizeClass(["uni-easyinput__content-textarea", { "input-padding": $props.inputBorder }]), name: $props.name, value: $data.val, placeholder: $props.placeholder, placeholderStyle: $props.placeholderStyle, disabled: $props.disabled, "placeholder-class": "uni-easyinput__placeholder-class", maxlength: $options.inputMaxlength, focus: $data.focused, autoHeight: $props.autoHeight, "cursor-spacing": $props.cursorSpacing, "adjust-position": $props.adjustPosition, onInput: _cache[1] || (_cache[1] = (...args) => $options.onInput && $options.onInput(...args)), onBlur: _cache[2] || (_cache[2] = (...args) => $options._Blur && $options._Blur(...args)), onFocus: _cache[3] || (_cache[3] = (...args) => $options._Focus && $options._Focus(...args)), onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)), onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)) }, null, 42, ["name", "value", "placeholder", "placeholderStyle", "disabled", "maxlength", "focus", "autoHeight", "cursor-spacing", "adjust-position"])) : (vue.openBlock(), vue.createElementBlock("input", { key: 2, type: $props.type === "password" ? "text" : $props.type, class: "uni-easyinput__content-input", style: vue.normalizeStyle($options.inputStyle), name: $props.name, value: $data.val, password: !$data.showPassword && $props.type === "password", placeholder: $props.placeholder, placeholderStyle: $props.placeholderStyle, "placeholder-class": "uni-easyinput__placeholder-class", disabled: $props.disabled, maxlength: $options.inputMaxlength, focus: $data.focused, confirmType: $props.confirmType, "cursor-spacing": $props.cursorSpacing, "adjust-position": $props.adjustPosition, onFocus: _cache[6] || (_cache[6] = (...args) => $options._Focus && $options._Focus(...args)), onBlur: _cache[7] || (_cache[7] = (...args) => $options._Blur && $options._Blur(...args)), onInput: _cache[8] || (_cache[8] = (...args) => $options.onInput && $options.onInput(...args)), onConfirm: _cache[9] || (_cache[9] = (...args) => $options.onConfirm && $options.onConfirm(...args)), onKeyboardheightchange: _cache[10] || (_cache[10] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)) }, null, 44, ["type", "name", "value", "password", "placeholder", "placeholderStyle", "disabled", "maxlength", "focus", "confirmType", "cursor-spacing", "adjust-position"])), $props.type === "password" && $props.passwordIcon ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 3 }, [ vue.createCommentVNode(" 开启密码时显示小眼睛 "), $options.isVal ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, class: vue.normalizeClass(["content-clear-icon", { "is-textarea-icon": $props.type === "textarea" }]), type: $data.showPassword ? "eye-slash-filled" : "eye-filled", size: 22, color: $data.focusShow ? $props.primaryColor : "#c0c4cc", onClick: $options.onEyes }, null, 8, ["class", "type", "color", "onClick"])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $props.suffixIcon ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 4 }, [ $props.suffixIcon ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, class: "content-clear-icon", type: $props.suffixIcon, color: "#c0c4cc", onClick: _cache[11] || (_cache[11] = ($event) => $options.onClickIcon("suffix")), size: "22" }, null, 8, ["type"])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 5 }, [ $props.clearable && $options.isVal && !$props.disabled && $props.type !== "textarea" ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, class: vue.normalizeClass(["content-clear-icon", { "is-textarea-icon": $props.type === "textarea" }]), type: "clear", size: $props.clearSize, color: $options.msg ? "#dd524d" : $data.focusShow ? $props.primaryColor : "#c0c4cc", onClick: $options.onClear }, null, 8, ["class", "size", "color", "onClick"])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )), vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ], 6 /* CLASS, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$3], ["__scopeId", "data-v-09fd5285"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue"]]); function isString(data) { return typeof data === "string"; } function paging(data, PAGENUM = 50) { if (!Array.isArray(data) || !data.length) return data; const pages2 = []; data.forEach((item, index) => { const i2 = Math.floor(index / PAGENUM); if (!pages2[i2]) { pages2[i2] = []; } pages2[i2].push(item); }); return pages2; } const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({ __name: "data-select-item", props: { node: { type: Object, default: () => ({}) }, choseParent: { type: Boolean, default: true }, dataLabel: { type: String, default: "name" }, dataValue: { type: String, default: "value" }, dataChildren: { type: String, default: "children" }, border: { type: Boolean, default: false }, linkage: { type: Boolean, default: false }, lazyLoadChildren: { type: Boolean, default: false }, level: { type: Number, default: 0 }, mutiple: { type: Boolean, default: false } }, setup(__props) { const { nodeClick, nameClick, loadNode, initData, addNode } = vue.inject("nodeFn"); const props = __props; const listData = vue.ref([]); const clearTimerList = vue.ref([]); const loadingArr = vue.ref([]); vue.watchEffect(() => { if (props.node.showChildren && props.node[props.dataChildren] && props.node[props.dataChildren].length) { resetClearTimerList(); renderTree(props.node[props.dataChildren]); } }); function resetClearTimerList() { const list = [...clearTimerList.value]; clearTimerList.value = []; list.forEach((fn) => fn()); } function renderTree(arr) { const pagingArr = paging(arr); listData.value = (pagingArr == null ? void 0 : pagingArr[0]) || []; lazyRenderList(pagingArr, 1); } function lazyRenderList(arr, startIndex) { for (let i2 = startIndex; i2 < arr.length; i2++) { let timer = null; timer = setTimeout(() => { listData.value.push(...arr[i2]); }, i2 * 500); clearTimerList.push(() => clearTimeout(timer)); } } function handleNameClick(node) { var _a; if (!node.visible) return; if (!((_a = node[props.dataChildren]) == null ? void 0 : _a.length) && props.lazyLoadChildren) { loadingArr.value.push(node[props.dataValue].toString()); loadNode(node).then((res) => { addNode(node, initData(res, node.visible)); }).finally(() => { loadingArr.value = []; }); } else { nameClick(node); } } return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["customthree-tree-select-content", { border: __props.border && __props.node[__props.dataChildren] && __props.node[__props.dataChildren].length && __props.node.showChildren }]), style: vue.normalizeStyle({ marginLeft: `${__props.level ? 14 : 0}px` }) }, [ __props.node.visible ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "custom-tree-select-item" }, [ vue.createElementVNode("view", { class: "item-content" }, [ vue.createElementVNode("view", { class: "left", onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => handleNameClick(__props.node), ["stop"])) }, [ vue.createElementVNode("view", { class: "icon-group" }, [ __props.node[__props.dataChildren] && __props.node[__props.dataChildren].length ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["right-icon", { active: __props.node.showChildren }]) }, [ vue.createVNode(_component_uni_icons, { type: "right", size: "14", color: "#333" }) ], 2 /* CLASS */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "smallcircle-filled" }, [ vue.createVNode(_component_uni_icons, { class: "smallcircle-filled-icon", type: "smallcircle-filled", size: "10", color: "#333" }) ])) ]), loadingArr.value.includes(__props.node[props.dataValue].toString()) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "loading-icon-box" }, [ vue.createVNode(_component_uni_icons, { class: "loading-icon", type: "spinner-cycle", size: "14", color: "#333" }) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "name", style: vue.normalizeStyle(__props.node.disabled ? "color: #999" : "") }, [ vue.createElementVNode( "text", null, vue.toDisplayString(__props.node[__props.dataLabel]), 1 /* TEXT */ ) ], 4 /* STYLE */ ) ]), __props.choseParent || !__props.choseParent && !__props.node[__props.dataChildren] || !__props.choseParent && __props.node[__props.dataChildren] && !__props.node[__props.dataChildren].length ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["check-box", { disabled: __props.node.disabled }]), style: vue.normalizeStyle({ "border-radius": __props.mutiple ? "3px" : "50%" }), onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => !__props.node.disabled && vue.unref(nodeClick)(__props.node), ["stop"])) }, [ !__props.node.checked && __props.node.partChecked && __props.linkage ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "part-checked" })) : vue.createCommentVNode("v-if", true), __props.node.checked ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 1, type: "checkmarkempty", size: "18", color: __props.node.disabled ? "#333" : "#007aff" }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true), __props.node.showChildren && __props.node[__props.dataChildren] && __props.node[__props.dataChildren].length ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(listData.value, (item) => { return vue.openBlock(), vue.createBlock(dataSelectItem, { key: item[__props.dataValue], node: item, dataLabel: __props.dataLabel, dataValue: __props.dataValue, dataChildren: __props.dataChildren, choseParent: __props.choseParent, lazyLoadChildren: __props.lazyLoadChildren, border: __props.border, linkage: __props.linkage, level: __props.level + 1 }, null, 8, ["node", "dataLabel", "dataValue", "dataChildren", "choseParent", "lazyLoadChildren", "border", "linkage", "level"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); }; } }); const dataSelectItem = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-3a65eef7"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/components/treeSelect/data-select-item.vue"]]); const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({ __name: "treeSelect", props: { canSelectAll: { type: Boolean, default: false }, safeArea: { type: Boolean, default: true }, search: { type: Boolean, default: false }, clearResetSearch: { type: Boolean, default: false }, animation: { type: Boolean, default: true }, "is-mask-click": { type: Boolean, default: true }, "mask-background-color": { type: String, default: "rgba(0,0,0,0.4)" }, "background-color": { type: String, default: "none" }, "safe-area": { type: Boolean, default: true }, choseParent: { type: Boolean, default: false }, placeholder: { type: String, default: "请选择" }, confirmText: { type: String, default: "确认" }, confirmTextColor: { type: String, default: "#007aff" }, dataSource: { type: Array, default: () => [] }, dataLabel: { type: String, default: "name" }, dataValue: { type: String, default: "id" }, dataChildren: { type: String, default: "children" }, linkage: { type: Boolean, default: false }, removeLinkage: { type: Boolean, default: true }, clearable: { type: Boolean, default: false }, mutiple: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, deleteSource: { type: Boolean, default: false }, showChildren: { type: Boolean, default: false }, border: { type: Boolean, default: false }, lazyLoadChildren: { type: Boolean, default: false }, load: { type: Function, default: function() { } }, modelValue: { type: [Array, String], default: () => [] } }, emits: ["update:modelValue", "change", "maskClick", "select-change", "removeSelect"], setup(__props, { emit: __emit }) { const props = __props; const emits = __emit; const contentHeight = vue.ref("500px"); const treeData = vue.ref([]); const filterTreeData = vue.ref([]); const clearTimerList = vue.ref([]); const selectedListBaseinfo = vue.ref([]); const showPopup = vue.ref(false); const isSelectedAll = vue.ref(false); const scrollTop = vue.ref(0); const searchStr = vue.ref(""); const popup = vue.ref(null); const partCheckedSet = /* @__PURE__ */ new Set(); vue.provide("nodeFn", { nodeClick: handleNodeClick, nameClick: handleHideChildren, loadNode: props.load, initData, addNode }); const selectList = vue.computed(() => { const newVal = props.modelValue === null ? "" : props.modelValue; return isString(newVal) ? newVal.length ? newVal.split(",") : [] : newVal.map((item) => item.toString()); }); vue.onMounted(() => { getContentHeight(uni.getSystemInfoSync()); }); function getContentHeight({ screenHeight }) { contentHeight.value = `${Math.floor(screenHeight * 0.7)}px`; } vue.watch( () => props.dataSource, (newVal) => { if (newVal) { treeData.value = initData(newVal); if (showPopup.value) { resetClearTimerList(); renderTree(treeData.value); } } }, { immediate: true, deep: true } ); vue.watch( () => props.modelValue, (newVal) => { const ids = newVal ? Array.isArray(newVal) ? newVal : newVal.split(",") : []; changeStatus(treeData.value, ids, true); filterTreeData.value.length && changeStatus(filterTreeData.value, ids); }, { immediate: true } ); function goTop() { scrollTop.val = 10; vue.nextTick(() => { scrollTop.value = 0; }); } function handleSearch(isClear = false) { resetClearTimerList(); if (isClear) { if (props.clearResetSearch) { renderTree(treeData.value); } } else { renderTree(searchValue(searchStr.value, treeData.value)); } goTop(); uni.hideKeyboard(); } function searchValue(str, arr) { const res = []; arr.forEach((item) => { var _a, _b; if (item.visible) { if (item[props.dataLabel].toString().toLowerCase().indexOf(str.toLowerCase()) > -1) { res.push(item); } else { if ((_a = item[props.dataChildren]) == null ? void 0 : _a.length) { const data = searchValue(str, item[props.dataChildren]); if (data == null ? void 0 : data.length) { if (str && !item.showChildren && ((_b = item[props.dataChildren]) == null ? void 0 : _b.length)) { item.showChildren = true; } res.push({ ...item, [props.dataChildren]: data }); } } } } }); return res; } async function open2() { if (props.disabled) return; showPopup.value = true; popup.value.open(); renderTree(treeData.value); } function close() { popup.value.close(); } function change(data) { if (!data.show) { resetClearTimerList(); searchStr.value = ""; showPopup.value = false; } emits("change", data); } function maskClick() { emits("maskClick"); } function initData(arr, parentVisible) { var _a; if (!Array.isArray(arr)) return []; const res = []; for (let i2 = 0; i2 < arr.length; i2++) { const obj = { [props.dataLabel]: arr[i2][props.dataLabel], [props.dataValue]: arr[i2][props.dataValue] }; obj.checked = selectList.value.includes(arr[i2][props.dataValue].toString()); obj.disabled = Boolean(arr[i2].disabled); obj.partChecked = Boolean(arr[i2].partChecked === void 0 ? false : arr[i2].partChecked); obj.partChecked && obj.partCheckedSet.add(obj[props.dataValue]); !obj.partChecked && (isSelectedAll.value = false); const parentVisibleState = parentVisible === void 0 ? true : parentVisible; const curVisibleState = arr[i2].visible === void 0 ? true : Boolean(arr[i2].visible); if (parentVisibleState === curVisibleState) { obj.visible = parentVisibleState; } else if (!parentVisibleState || !curVisibleState) { obj.visible = false; } else { obj.visible = true; } obj.showChildren = "showChildren" in arr[i2] && arr[i2].showChildren != void 0 ? arr[i2].showChildren : props.showChildren; if (arr[i2].visible && !arr[i2].disabled && !arr[i2].checked) { isSelectedAll.value = false; } if ((_a = arr[i2][props.dataChildren]) == null ? void 0 : _a.length) { obj[props.dataChildren] = initData(arr[i2][props.dataChildren], obj.visible); } res.push(obj); } return res; } function addNode(node, children) { getReflectNode(node, treeData.value)[props.dataChildren] = children; handleHideChildren(node); } function resetClearTimerList() { const list = [...clearTimerList.value]; clearTimerList.value = []; list.forEach((fn) => fn()); } function renderTree(arr) { const pagingArr = paging(arr); filterTreeData.value = (pagingArr == null ? void 0 : pagingArr[0]) || []; lazyRenderList(pagingArr, 1); } function lazyRenderList(arr, startIndex) { for (let i2 = startIndex; i2 < arr.length; i2++) { let timer = null; timer = setTimeout(() => { filterTreeData.value.push(...arr[i2]); }, i2 * 500); clearTimerList.push(() => clearTimeout(timer)); } } function changeStatus(list, ids, needEmit = false) { var _a; const arr = [...list]; let flag = true; needEmit && (selectedListBaseinfo.value = []); while (arr.length) { const item = arr.shift(); if (ids.includes(item[props.dataValue].toString())) { item.checked = true; item.partChecked = false; partCheckedSet.delete(item[props.dataValue]); needEmit && selectedListBaseinfo.value.push(item); } else { item.checked = false; if (item.visible && !item.disabled) { flag = false; } if (partCheckedSet.has(item[props.dataValue])) { item.partChecked = true; } else { item.partChecked = false; } } if ((_a = item[props.dataChildren]) == null ? void 0 : _a.length) { arr.push(...item[props.dataChildren]); } } isSelectedAll.value = flag; needEmit && emits("select-change", [...selectedListBaseinfo.value]); } function removeSelectedItem(node) { isSelectedAll.value = false; if (props.linkage) { handleNodeClick(node, false); emits("removeSelect", node); } else { const emitData = selectList.value.filter((item) => item !== node[props.dataValue].toString()); emits("removeSelect", node); emits("update:modelValue", isString(props.modelValue) ? emitData.join(",") : emitData); } } function getReflectNode(node, arr) { var _a; const array = [...arr]; while (array.length) { const item = array.shift(); if (item[props.dataValue] === node[props.dataValue]) { return item; } if ((_a = item[props.dataChildren]) == null ? void 0 : _a.length) { array.push(...item[props.dataChildren]); } } return {}; } function getChildren(node) { var _a; if (!((_a = node[props.dataChildren]) == null ? void 0 : _a.length)) return []; const res = node[props.dataChildren].reduce((pre, val) => { if (val.visible) { return [...pre, val]; } return pre; }, []); for (let i2 = 0; i2 < node[props.dataChildren].length; i2++) { res.push(...getChildren(node[props.dataChildren][i2])); } return res; } function getParentNode(target, arr) { var _a; let res = []; for (let i2 = 0; i2 < arr.length; i2++) { if (arr[i2][props.dataValue] === target[props.dataValue]) { return true; } if ((_a = arr[i2][props.dataChildren]) == null ? void 0 : _a.length) { const childRes = getParentNode(target, arr[i2][props.dataChildren]); if (typeof childRes === "boolean" && childRes) { res = [arr[i2]]; } else if (Array.isArray(childRes) && childRes.length) { res = [...childRes, arr[i2]]; } } } return res; } function handleNodeClick(data, status) { const node = getReflectNode(data, treeData.value); node.checked = typeof status === "boolean" ? status : !node.checked; node.partChecked = false; partCheckedSet.delete(node[props.dataValue]); if (!props.mutiple) { let emitData = []; if (node.checked) { emitData = [node[props.dataValue].toString()]; } emits("update:modelValue", isString(props.modelValue) ? emitData.join(",") : emitData); } else { if (!props.linkage) { let emitData = null; if (node.checked) { emitData = Array.from(/* @__PURE__ */ new Set([...selectList.value, node[props.dataValue].toString()])); } else { emitData = selectList.value.filter((id) => id !== node[props.dataValue].toString()); } emits("update:modelValue", isString(props.modelValue) ? emitData.join(",") : emitData); } else { let emitData = [...selectList.value]; const parentNodes = getParentNode(node, treeData.value); const childrenVal = getChildren(node).filter((item) => !item.disabled); if (node.checked) { emitData = Array.from(/* @__PURE__ */ new Set([...emitData, node[props.dataValue].toString()])); if (childrenVal.length) { emitData = Array.from( /* @__PURE__ */ new Set([...emitData, ...childrenVal.map((item) => item[props.dataValue].toString())]) ); childrenVal.forEach((childNode) => { childNode.partChecked = false; partCheckedSet.delete(childNode[props.dataValue]); }); } if (parentNodes.length) { let flag = false; while (parentNodes.length) { const item = parentNodes.shift(); if (!item.disabled) { if (flag) { item.partChecked = true; partCheckedSet.add(item[props.dataValue]); } else { const allChecked = item[props.dataChildren].filter((node2) => node2.visible && !node2.disabled).every((node2) => node2.checked); if (allChecked) { item.checked = true; item.partChecked = false; partCheckedSet.delete(item[props.dataValue]); emitData = Array.from(/* @__PURE__ */ new Set([...emitData, item[props.dataValue].toString()])); } else { item.partChecked = true; partCheckedSet.add(item[props.dataValue]); flag = true; } } } } } } else { emitData = emitData.filter((id) => id !== node[props.dataValue].toString()); if (childrenVal.length) { childrenVal.forEach((childNode) => { emitData = emitData.filter((id) => id !== childNode[props.dataValue].toString()); }); } if (parentNodes.length) { parentNodes.forEach((parentNode) => { if (emitData.includes(parentNode[props.dataValue].toString())) { parentNode.checked = false; } emitData = emitData.filter((id) => id !== parentNode[props.dataValue].toString()); const hasChecked = parentNode[props.dataChildren].filter((node2) => node2.visible && !node2.disabled).some((node2) => node2.checked || node2.partChecked); parentNode.partChecked = hasChecked; if (hasChecked) { partCheckedSet.add(parentNode[props.dataValue]); } else { partCheckedSet.delete(parentNode[props.dataValue]); } }); } } emits("update:modelValue", isString(props.modelValue) ? emitData.join(",") : emitData); } } } function handleHideChildren(node) { const status = !node.showChildren; getReflectNode(node, treeData.value).showChildren = status; getReflectNode(node, filterTreeData.value).showChildren = status; } function handleSelectAll() { isSelectedAll.value = !isSelectedAll.value; if (isSelectedAll.value) { if (!props.mutiple) { uni.showToast({ title: "单选模式下不能全选", icon: "none", duration: 1e3 }); return; } let emitData = []; treeData.value.forEach((item) => { var _a; if (item.visible || item.disabled && item.checked) { emitData = Array.from(/* @__PURE__ */ new Set([...emitData, item[props.dataValue].toString()])); if ((_a = item[props.dataChildren]) == null ? void 0 : _a.length) { emitData = Array.from( /* @__PURE__ */ new Set([ ...emitData, ...getChildren(item).filter((item2) => !item2.disabled || item2.disabled && item2.checked).map((item2) => item2[props.dataValue].toString()) ]) ); } } }); emits("update:modelValue", isString(props.modelValue) ? emitData.join(",") : emitData); } else { clearSelectList(); } } function clearSelectList() { if (props.disabled) return; partCheckedSet.clear(); const emitData = []; selectedListBaseinfo.value.forEach((node) => { if (node.visible && node.checked && node.disabled) { emitData.push(node[props.dataValue]); } }); emits("update:modelValue", isString(props.modelValue) ? emitData.join(",") : emitData); } return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_1); const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["select-list", { disabled: __props.disabled }, { active: selectList.value.length }]), onClick: open2 }, [ vue.createElementVNode("view", { class: "left" }, [ selectList.value.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "select-items" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectedListBaseinfo.value, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-item", key: item[__props.dataValue] }, [ vue.createElementVNode("view", { class: "name" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item[__props.dataLabel]), 1 /* TEXT */ ) ]), !__props.disabled && !item.disabled && __props.deleteSource ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "close", onClick: vue.withModifiers(($event) => removeSelectedItem(item), ["stop"]) }, [ vue.createVNode(_component_uni_icons, { type: "closeempty", size: "16", color: "#999" }) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "no-data" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(__props.placeholder), 1 /* TEXT */ ) ])) ]), vue.createElementVNode("view", null, [ !selectList.value.length || !__props.clearable ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, type: "bottom", color: "#333333" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop"])) }, [ selectList.value.length && __props.clearable ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, type: "clear", size: "24", color: "#c0c4cc", onClick: clearSelectList })) : vue.createCommentVNode("v-if", true) ]) ]) ], 2 /* CLASS */ ), vue.createVNode(_component_uni_popup, { ref_key: "popup", ref: popup, animation: __props.animation, "is-mask-click": _ctx.isMaskClick, "mask-background-color": _ctx.maskBackgroundColor, "background-color": _ctx.backgroundColor, "safe-area": __props.safeArea, type: "bottom", onChange: change, onMaskClick: maskClick }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "popup-content", style: vue.normalizeStyle({ height: contentHeight.value }) }, [ vue.createElementVNode("view", { class: "title" }, [ __props.mutiple && __props.canSelectAll ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "left", onClick: handleSelectAll }, [ vue.createElementVNode( "text", null, vue.toDisplayString(isSelectedAll.value ? "取消全选" : "全选"), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "center" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(__props.placeholder), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "right", style: vue.normalizeStyle({ color: __props.confirmTextColor }), onClick: close }, [ vue.createElementVNode( "text", null, vue.toDisplayString(__props.confirmText), 1 /* TEXT */ ) ], 4 /* STYLE */ ) ]), __props.search ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "search-box" }, [ vue.createVNode(_component_uni_easyinput, { maxlength: -1, prefixIcon: "search", placeholder: "搜索", modelValue: searchStr.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchStr.value = $event), "confirm-type": "search", onConfirm: _cache[2] || (_cache[2] = ($event) => handleSearch(false)), onClear: _cache[3] || (_cache[3] = ($event) => handleSearch(true)) }, null, 8, ["modelValue"]), vue.createElementVNode("button", { type: "primary", size: "mini", class: "search-btn", onClick: _cache[4] || (_cache[4] = ($event) => handleSearch(false)) }, "搜索") ])) : vue.createCommentVNode("v-if", true), treeData.value.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "select-content" }, [ vue.createElementVNode("scroll-view", { class: "scroll-view-box", "scroll-top": scrollTop.value, "scroll-y": "true", onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => { }, ["stop"])) }, [ !filterTreeData.value.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "no-data center" }, [ vue.createElementVNode("text", null, "暂无数据") ])) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(filterTreeData.value, (item) => { return vue.openBlock(), vue.createBlock(dataSelectItem, { key: item[__props.dataValue], node: item, dataLabel: __props.dataLabel, dataValue: __props.dataValue, dataChildren: __props.dataChildren, choseParent: __props.choseParent, border: __props.border, linkage: __props.linkage, lazyLoadChildren: __props.lazyLoadChildren }, null, 8, ["node", "dataLabel", "dataValue", "dataChildren", "choseParent", "border", "linkage", "lazyLoadChildren"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "sentry" }) ], 40, ["scroll-top"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "no-data center" }, [ vue.createElementVNode("text", null, "暂无数据") ])) ], 4 /* STYLE */ ) ]), _: 1 /* STABLE */ }, 8, ["animation", "is-mask-click", "mask-background-color", "background-color", "safe-area"]) ], 64 /* STABLE_FRAGMENT */ ); }; } }); const treeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-0328d33e"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/components/treeSelect/treeSelect.vue"]]); const _sfc_main$k = { __name: "application", setup(__props) { const store = useStore(); const { proxy } = vue.getCurrentInstance(); const realname = vue.ref(store.userinfo.realname); const depart = vue.ref(""); const phone = vue.ref(store.userinfo.phone); const type = vue.ref(""); const dataSource = vue.ref([]); const beginTime = vue.ref(""); const chooseStart = (e2) => { beginTime.value = e2.detail.value; }; const endTime = vue.ref(""); const chooseEnd = (e2) => { endTime.value = e2.detail.value; }; const typeArr = vue.ref([]); const typeIndex = vue.ref(null); const ifShow = vue.ref(true); const zwcj = vue.ref(""); const address = vue.ref(""); const reason = vue.ref(""); const path = vue.ref([]); const baseUrl2 = "https://36.112.48.190/jeecg-boot/sys/common/upload/"; const imageStyles = { width: 64, height: 64, border: { color: "#dce7e1", width: 2, style: "dashed", radius: "2px" } }; onLoad(() => { loadData(); }); const select = (e2) => { e2.tempFilePaths; for (let i2 = 0; i2 < e2.tempFilePaths.length; i2++) { let photoPath = "职工请假/" + store.userinfo.orgCode + "/" + store.userinfo.realname; uni.uploadFile({ url: baseUrl2, filePath: e2.tempFilePaths[i2], name: "file", formData: { appPath: photoPath }, success: (res) => { path.value.push(JSON.parse(res.data).message); } }); } }; const qjAdd = () => { if (!phone.value.trim()) return proxy.$toast("请输入联系方式"); if (!type.value) return proxy.$toast("请选择请假类型"); if (!beginTime.value) return proxy.$toast("请选择开始时间"); if (!endTime.value) return proxy.$toast("请选择结束时间"); if (ifShow.value) { if (typeIndex.value == null) { return proxy.$toast("请选择审批领导"); } } if (!address.value.trim()) return proxy.$toast("请输入请假地点"); if (!reason.value.trim()) return proxy.$toast("请输入请假事由"); qjAddApi({ username: store.userinfo.username, phone: phone.value, type: type.value, begintime: beginTime.value, endtime: endTime.value, examineleader: typeArr.value[typeIndex.value].username, address: address.value, reason: reason.value, zwmc: zwcj.value, path: path.value.toString() }).then((res) => { if (res.success) { startMutilProcess(res.message); } else { proxy.$toast(res.message); } }); }; const startMutilProcess = (id) => { startMutilProcessApi({ flowCode: "dev_cxc_qxj", id, formUrl: "modules/qxj/modules/CxcQxjBpmModel", formUrlMobile: "leaveApplication" //对应main.js里全局注册createApp()里的 app.component('leaveApplication',index) }).then((res) => { if (res.success) { proxy.$toast(res.message); setTimeout(() => { uni.navigateBack(); }, 2e3); } }).catch((err) => { formatAppLog("log", "at pages/leave/application.vue:235", err); }); }; const loadData = () => { getCategoryItemsApi("1838487445813645313").then((res) => { if (res.success) { dataSource.value = res.result; } }); queryDepByCode(store.userinfo.orgCode).then((res) => { if (res.success) { depart.value = res.result; } }); queryZwmcAndExaApi(store.userinfo.username).then((res) => { if (res.success) { typeArr.value = res.result.list; zwcj.value = res.result.zwmc; if (zwcj.value == "单位专家" || zwcj.value == "基层正职" || zwcj.value == "高级主管") { ifShow.value = false; } } else { proxy.$toast(res.message); } }); }; const bindType = (e2) => { typeIndex.value = e2.detail.value; }; return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); const _component_uni_file_picker = resolveEasycom(vue.resolveDynamicComponent("uni-file-picker"), __easycom_0$2); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createElementVNode("view", { class: "form" }, [ vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [ vue.createElementVNode("view", { class: "title" }, " 职工姓名: "), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => realname.value = $event), disabled: "" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, realname.value] ]) ]), vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [ vue.createElementVNode("view", { class: "title" }, " 工作单位: "), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => depart.value = $event), disabled: "" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, depart.value] ]) ]), vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [ vue.createElementVNode("view", { class: "title" }, " 联系方式: "), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => phone.value = $event) }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, phone.value] ]) ]), vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [ vue.createElementVNode("view", { class: "title" }, " 请假类型: "), vue.createVNode(treeSelect, { dataSource: dataSource.value, modelValue: type.value, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => type.value = $event), dataValue: "name" }, null, 8, ["dataSource", "modelValue"]) ]), vue.createElementVNode("picker", { mode: "date", fields: "day", onChange: chooseStart, value: beginTime.value }, [ vue.createElementVNode("view", { class: "f-row aic jcb box" }, [ vue.createElementVNode("view", { class: "title" }, " 开始时间: "), vue.createElementVNode("view", { class: "f-row aic" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([{ "choose": !beginTime.value }, { "choosed": beginTime.value }]) }, vue.toDisplayString(beginTime.value ? beginTime.value : "请选择"), 3 /* TEXT, CLASS */ ), vue.createVNode(_component_uni_icons, { type: "bottom", color: "#333333" }) ]) ]) ], 40, ["value"]), vue.createElementVNode("picker", { mode: "date", fields: "day", onChange: chooseEnd, value: endTime.value }, [ vue.createElementVNode("view", { class: "f-row aic jcb box" }, [ vue.createElementVNode("view", { class: "title" }, " 截止时间: "), vue.createElementVNode("view", { class: "f-row aic" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([{ "choose": !endTime.value }, { "choosed": endTime.value }]) }, vue.toDisplayString(endTime.value ? endTime.value : "请选择"), 3 /* TEXT, CLASS */ ), vue.createVNode(_component_uni_icons, { type: "bottom", color: "#333333" }) ]) ]) ], 40, ["value"]), ifShow.value ? (vue.openBlock(), vue.createElementBlock("picker", { key: 0, onChange: bindType, value: typeIndex.value, range: typeArr.value, "range-key": "realname" }, [ vue.createElementVNode("view", { class: "f-row aic jcb box" }, [ vue.createElementVNode("view", { class: "title" }, " 审批领导: "), vue.createElementVNode("view", { class: "f-row aic" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([{ "choose": typeIndex.value == null }, { "choosed": typeIndex.value != null }]) }, vue.toDisplayString(typeIndex.value != null ? typeArr.value[typeIndex.value].realname : "请选择"), 3 /* TEXT, CLASS */ ), vue.createVNode(_component_uni_icons, { type: "bottom", color: "#333333" }) ]) ]) ], 40, ["value", "range"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [ vue.createElementVNode("view", { class: "title" }, " 请假地点: "), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => address.value = $event), placeholder: "请输入", "nplaceholder-style": "font-size: 28rpx;color: #999999;" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, address.value] ]) ]), vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [ vue.createElementVNode("view", { class: "title" }, " 请假事由: "), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => reason.value = $event), placeholder: "请输入", "placeholder-style": "font-size: 28rpx;color: #999999;" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, reason.value] ]) ]), vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [ vue.createElementVNode("view", { class: "title" }, " 上传附件: "), vue.createVNode(_component_uni_file_picker, { onSelect: select, "image-styles": imageStyles }) ]) ]), vue.createElementVNode("view", { class: "btn f-col aic" }, [ vue.createElementVNode("view", { onClick: qjAdd }, " 提交 ") ]) ], 2 /* CLASS */ ); }; } }; const PagesLeaveApplication = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-f12ae642"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/leave/application.vue"]]); const _imports_0$1 = "/static/checkin/chenggong.png"; const _imports_1$1 = "/static/checkin/shibai.png"; const _imports_2 = "/static/checkin/position4.png"; const _sfc_main$j = { __name: "index", setup(__props) { const store = useStore(); const back = () => { uni.navigateBack(); }; return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createVNode(customNav, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav_box f-row aic" }, [ vue.createElementVNode("view", { class: "back", onClick: back }, [ vue.createVNode(_component_uni_icons, { type: "left", size: "20", color: "#fff" }) ]), vue.createElementVNode("view", { class: "avatar" }, [ vue.createElementVNode("image", { src: vue.unref(store).userinfo.avatar, mode: "" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "f-col" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(vue.unref(store).userinfo.realname), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "position" }, vue.toDisplayString(vue.unref(store).role), 1 /* TEXT */ ) ]) ]) ]), _: 1 /* STABLE */ }), vue.createElementVNode("view", { class: "time_box f-row aic jcb" }, [ vue.createElementVNode("view", { class: "box" }, [ vue.createElementVNode("view", { class: "time f-row aic" }, [ vue.createElementVNode("view", { class: "" }, " 上班 9:30 "), vue.createElementVNode("image", { src: _imports_0$1, mode: "" }) ]), vue.createElementVNode("view", { class: "text" }, " 重庆市渝北区上弯路 ") ]), vue.createElementVNode("view", { class: "box" }, [ vue.createElementVNode("view", { class: "time f-row aic" }, [ vue.createElementVNode("view", { class: "" }, " 下班 16:30 "), vue.createElementVNode("image", { src: _imports_1$1, mode: "" }) ]), vue.createElementVNode("view", { class: "text" }, " 打卡已超时 ") ]) ]), vue.createElementVNode("view", { class: "checkin" }, [ vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "status f-col aic" }, [ vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode("image", { src: _imports_2, mode: "" }), vue.createElementVNode("text", null, "打卡失败") ]), vue.createElementVNode("view", { class: vue.normalizeClass(["circle", "f-col", "aic", "out", "check", "success", "fail"]) }, [ vue.createElementVNode("view", { class: "title" }, " 上班打卡 "), vue.createElementVNode("view", { class: "time" }, " 9:00 "), vue.createElementVNode("view", { class: "ontime" }, " 已超时 ") ]) ]) ]) ], 2 /* CLASS */ ); }; } }; const PagesCheckinIndex = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-1410bd6b"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/checkin/index.vue"]]); const _sfc_main$i = { __name: "useredit", setup(__props) { const baseUrl2 = "https://36.112.48.190/jeecg-boot/sys/common/upload"; const store = useStore(); const chooseAvatar = () => { uni.chooseImage({ count: 1, success: (chooseImageRes) => { const tempFilePaths = chooseImageRes.tempFilePaths; const photoPath = "用户头像/" + store.userinfo.realname; uni.uploadFile({ url: baseUrl2, //仅为示例,非真实的接口地址 filePath: tempFilePaths[0], name: "file", formData: { appPath: photoPath }, success: (res) => { uni.showLoading({ title: "上传中..." }); form.avatar = JSON.parse(res.data).message; userEditApi({ avatar: form.avatar, id: store.userinfo.id }).then((res2) => { if (res2) { uni.showToast({ title: res2, icon: "success", duration: 2e3 }); } }).catch((err) => { formatAppLog("log", "at pages/useredit/useredit.vue:97", err); }); }, fail(err) { formatAppLog("log", "at pages/useredit/useredit.vue:101", "图片上传出错", err); } }); } }); }; const form = vue.reactive({ avatar: "", realname: "", phone: "" }); const loginout = () => { uni.showModal({ title: "退出登录", content: "您确认要退出登录吗?", success(res) { if (res.confirm) { uni.removeStorageSync("token"); uni.removeStorageSync("user"); uni.removeStorageSync("role"); uni.removeStorageSync("logintime"); uni.reLaunch({ url: "/pages/login/login" }); } } }); }; onLoad(() => { uni.setNavigationBarColor({ frontColor: "#ffffff", backgroundColor: "#bebebe" }); }); return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "box" }, [ vue.createElementVNode("view", null, "头像"), vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("button", { class: "head-btn", onClick: chooseAvatar }, [ !form.avatar ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "head-img", src: vue.unref(imgUrl)(vue.unref(store).userinfo.avatar), mode: "" }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: "head-img", src: vue.unref(imgUrl)(form.avatar) }, null, 8, ["src"])) ]), vue.createVNode(_component_uni_icons, { type: "right", size: "24" }) ]) ]), vue.createElementVNode("view", { class: "box", style: { "padding-top": "30rpx", "padding-bottom": "30rpx" } }, [ vue.createElementVNode("view", null, "姓名"), vue.withDirectives(vue.createElementVNode( "input", { disabled: "", style: { "text-align": "right" }, type: "nickname", "placeholder-style": "font-size: 32rpx;color: #999999;", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(store).userinfo.realname = $event), placeholder: "请输入姓名" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, vue.unref(store).userinfo.realname] ]) ]), vue.createElementVNode("view", { class: "box", style: { "padding-top": "30rpx", "padding-bottom": "30rpx" } }, [ vue.createElementVNode("view", null, "手机号"), vue.withDirectives(vue.createElementVNode( "input", { style: { "text-align": "right" }, type: "nickname", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(store).userinfo.phone = $event), placeholder: "请输入手机号", "placeholder-style": "font-size: 32rpx;color: #999999;" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, vue.unref(store).userinfo.phone] ]) ]), vue.createElementVNode("view", { class: "box", style: { "padding-top": "30rpx", "padding-bottom": "30rpx" } }, [ vue.createElementVNode("view", null, "劳动合同号"), vue.withDirectives(vue.createElementVNode( "input", { style: { "text-align": "right" }, type: "nickname", disabled: "", "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(store).userinfo.workNo = $event), placeholder: "请输入劳动合同号", "placeholder-style": "font-size: 32rpx;color: #999999;" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, vue.unref(store).userinfo.workNo] ]) ]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "btn", onClick: loginout }, " 退出登录 ") ], 64 /* STABLE_FRAGMENT */ ); }; } }; const PagesUsereditUseredit = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-503dd57f"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/useredit/useredit.vue"]]); const _imports_0 = "/static/my/default.png"; const _imports_1 = "/static/my/edit.png"; const _sfc_main$h = { __name: "address", setup(__props) { const store = useStore(); const jump = (url) => { beforeJump(url, () => { uni.navigateTo({ url }); }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "list" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(2, (item, i2) => { return vue.createElementVNode("view", { class: "item", key: i2 }, [ vue.createElementVNode("view", { class: "province f-row aic" }, [ vue.createElementVNode("view", { class: "" }, " 浙江省,杭州市 "), vue.createElementVNode("image", { src: _imports_0, mode: "" }) ]), vue.createElementVNode("view", { class: "address f-row jcb" }, [ vue.createElementVNode("view", { class: "" }, " 重庆 重庆市 渝北区 龙溪街道花卉园东路黄金 宝高级住宅小区 "), vue.createElementVNode("image", { src: _imports_1, mode: "" }) ]), vue.createElementVNode("view", { class: "set f-row aic jcb" }, [ vue.createElementVNode("view", { class: "f-row aic" }, [ vue.createCommentVNode(' '), vue.createElementVNode("image", { src: _imports_1$4, mode: "" }), vue.createTextVNode(" 设为默认地址 ") ]), vue.createElementVNode("view", { class: "" }, " 删除 ") ]) ]); }), 64 /* STABLE_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "btn f-col aic" }, [ vue.createElementVNode("view", { class: "", onClick: _cache[0] || (_cache[0] = ($event) => jump("/pages/useredit/add_address")) }, " +添加收货地址 ") ]) ], 2 /* CLASS */ ); }; } }; const PagesUsereditAddress = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-4bd9b73b"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/useredit/address.vue"]]); const _sfc_main$g = { __name: "add_address", setup(__props) { const store = useStore(); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "area f-row jcb" }, [ vue.createElementVNode("view", { class: "title topic" }, " 所在地区 "), vue.createElementVNode("input", { type: "text", placeholder: "省、市、区、街道" }) ]), vue.createElementVNode("view", { class: "area f-row jcb" }, [ vue.createElementVNode("view", { class: "title topic" }, " 详细地址 "), vue.createElementVNode("textarea", { placeholder: "小区楼栋/乡村名称" }) ]), vue.createElementVNode("view", { class: "area f-row jcb" }, [ vue.createElementVNode("view", { class: "title" }, " 设为默认地址 "), vue.createElementVNode("image", { src: _imports_0$6, mode: "" }), vue.createCommentVNode(' ') ]), vue.createElementVNode("view", { class: "btn f-col aic" }, [ vue.createElementVNode("view", { class: "" }, " 保存 ") ]) ], 2 /* CLASS */ ); }; } }; const PagesUsereditAddAddress = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-f1271877"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/useredit/add_address.vue"]]); const _sfc_main$f = { __name: "addressbook", setup(__props) { const store = useStore(); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createElementVNode("view", { class: "list" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(4, (item, i2) => { return vue.createElementVNode("view", { class: "item f-row aic jcb", key: i2 }, [ vue.createElementVNode("view", { class: "user f-row aic" }, [ vue.createElementVNode("image", { src: "", mode: "" }), vue.createElementVNode("view", { class: "name_job" }, [ vue.createElementVNode("view", { class: "name" }, " 我是晴天 "), vue.createElementVNode("view", { class: "job" }, " 销售部-销售总监 ") ]) ]), vue.createElementVNode("view", { class: "btn" }, " 电话联系 ") ]); }), 64 /* STABLE_FRAGMENT */ )) ]) ], 2 /* CLASS */ ); }; } }; const PagesUsereditAddressbook = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-c0e791d9"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/useredit/addressbook.vue"]]); const _sfc_main$e = { __name: "safeCom", setup(__props) { const jump = (url) => { beforeJump(url, () => { uni.navigateTo({ url }); }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list f-row aic jcb" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(20, (item, i2) => { return vue.createElementVNode("view", { class: "item", key: i2, onClick: _cache[0] || (_cache[0] = ($event) => jump("/pages/safe/detail")) }, [ vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("image", { src: "", mode: "" }) ]), vue.createElementVNode("view", { class: "text" }, " 五月天“突然好想你”线上演唱会精彩回放 ") ]); }), 64 /* STABLE_FRAGMENT */ )) ]); }; } }; const safeCom = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-982fcf41"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/safeCom.vue"]]); const _sfc_main$d = { __name: "manage", setup(__props) { const store = useStore(); const showicon = vue.ref(true); const searchKey = vue.ref(""); return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createVNode(customNav, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav_box f-row aic jcb" }, [ vue.createElementVNode("view", { class: "back f-row aic", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.back && _ctx.back(...args)) }, [ vue.createVNode(_component_uni_icons, { type: "left", size: "20", color: "#fff" }) ]), vue.createElementVNode("view", { class: "search f-row aic" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchKey.value = $event), onConfirm: _cache[2] || (_cache[2] = (...args) => _ctx.search && _ctx.search(...args)), onBlur: _cache[3] || (_cache[3] = ($event) => showicon.value = !searchKey.value), onFocus: _cache[4] || (_cache[4] = ($event) => showicon.value = false) }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, searchKey.value] ]), showicon.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "f-row aic" }, [ vue.createElementVNode("image", { src: _imports_0$2, mode: "" }), vue.createElementVNode("text", null, "搜索") ])) : vue.createCommentVNode("v-if", true) ]) ]) ]), _: 1 /* STABLE */ }), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(safeCom) ]) ], 2 /* CLASS */ ); }; } }; const PagesSafeManage = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-dc2f4615"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/safe/manage.vue"]]); const _sfc_main$c = { __name: "dataCom", props: { title: { type: String, default: "" }, list: { type: Array, default: function() { return []; } } }, setup(__props) { vue.useCssVars((_ctx) => ({ "92a54120-moreHeight": moreHeight.value })); const props = __props; const open2 = vue.ref(false); const moreHeight = vue.ref(null); vue.watch(() => props.list, () => { vue.nextTick(() => { uni.createSelectorQuery().select(".data_box").boundingClientRect((data) => { moreHeight.value = ((data == null ? void 0 : data.height) || 0) + "px"; }).exec(); }); }, { immediate: true }); return (_ctx, _cache) => { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "item_box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title_box f-row aic jcb" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(__props.title), 1 /* TEXT */ ), __props.list.length > 6 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "f-row aic more", onClick: _cache[0] || (_cache[0] = ($event) => open2.value = !open2.value) }, [ vue.createElementVNode( "text", null, vue.toDisplayString(!open2.value ? "展开" : "收起"), 1 /* TEXT */ ), !open2.value ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, type: "down", color: "#999999" })) : (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 1, type: "up", color: "#999999" })) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["data_wrapper", { "close": __props.list.length > 6 && open2.value }]) }, [ vue.createElementVNode("view", { class: "data_box f-row aic" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(__props.list, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "data f-col aic" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item == null ? void 0 : item.dailyVolume), 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString(item.gas), 1 /* TEXT */ ) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ], 2 /* CLASS */ ) ]) ]) ]) ]); }; } }; const dataCom = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-92a54120"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/dataCom.vue"]]); const _sfc_main$b = { __name: "index", setup(__props) { const store = useStore(); const shishiArr = vue.ref([]); const productArr = vue.ref([]); onLoad((options) => { shishiArr.value = JSON.parse(options.shishi); productArr.value = JSON.parse(options.product); }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["f-col", "aic", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createVNode(dataCom, { title: "实时输差", list: shishiArr.value }, null, 8, ["list"]), vue.createVNode(dataCom, { title: "偏远计量点", list: shishiArr.value }, null, 8, ["list"]), vue.createVNode(dataCom, { title: "生产实时数据", list: productArr.value }, null, 8, ["list"]) ], 2 /* CLASS */ ); }; } }; const PagesProductIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/product/index.vue"]]); const en = { "uni-load-more.contentdown": "Pull up to show more", "uni-load-more.contentrefresh": "loading...", "uni-load-more.contentnomore": "No more data" }; const zhHans = { "uni-load-more.contentdown": "上拉显示更多", "uni-load-more.contentrefresh": "正在加载...", "uni-load-more.contentnomore": "没有更多数据了" }; const zhHant = { "uni-load-more.contentdown": "上拉顯示更多", "uni-load-more.contentrefresh": "正在加載...", "uni-load-more.contentnomore": "沒有更多數據了" }; const messages = { en, "zh-Hans": zhHans, "zh-Hant": zhHant }; let platform; setTimeout(() => { platform = uni.getSystemInfoSync().platform; }, 16); const { t } = initVueI18n(messages); const _sfc_main$a = { name: "UniLoadMore", emits: ["clickLoadMore"], props: { status: { // 上拉的状态:more-loading前;loading-loading中;noMore-没有更多了 type: String, default: "more" }, showIcon: { type: Boolean, default: true }, iconType: { type: String, default: "auto" }, iconSize: { type: Number, default: 24 }, color: { type: String, default: "#777777" }, contentText: { type: Object, default() { return { contentdown: "", contentrefresh: "", contentnomore: "" }; } }, showText: { type: Boolean, default: true } }, data() { return { webviewHide: false, platform, imgBase64: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII=" }; }, computed: { iconSnowWidth() { return (Math.floor(this.iconSize / 24) || 1) * 2; }, contentdownText() { return this.contentText.contentdown || t("uni-load-more.contentdown"); }, contentrefreshText() { return this.contentText.contentrefresh || t("uni-load-more.contentrefresh"); }, contentnomoreText() { return this.contentText.contentnomore || t("uni-load-more.contentnomore"); } }, mounted() { var pages2 = getCurrentPages(); var page = pages2[pages2.length - 1]; var currentWebview = page.$getAppWebview(); currentWebview.addEventListener("hide", () => { this.webviewHide = true; }); currentWebview.addEventListener("show", () => { this.webviewHide = false; }); }, methods: { onClick() { this.$emit("clickLoadMore", { detail: { status: this.status } }); } } }; function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-load-more", onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) }, [ !$data.webviewHide && ($props.iconType === "circle" || $props.iconType === "auto" && $data.platform === "android") && $props.status === "loading" && $props.showIcon ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, style: vue.normalizeStyle({ width: $props.iconSize + "px", height: $props.iconSize + "px" }), class: "uni-load-more__img uni-load-more__img--android-MP" }, [ vue.createElementVNode( "view", { class: "uni-load-more__img-icon", style: vue.normalizeStyle({ borderTopColor: $props.color, borderTopWidth: $props.iconSize / 12 }) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "uni-load-more__img-icon", style: vue.normalizeStyle({ borderTopColor: $props.color, borderTopWidth: $props.iconSize / 12 }) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "uni-load-more__img-icon", style: vue.normalizeStyle({ borderTopColor: $props.color, borderTopWidth: $props.iconSize / 12 }) }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ )) : !$data.webviewHide && $props.status === "loading" && $props.showIcon ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, style: vue.normalizeStyle({ width: $props.iconSize + "px", height: $props.iconSize + "px" }), class: "uni-load-more__img uni-load-more__img--ios-H5" }, [ vue.createElementVNode("image", { src: $data.imgBase64, mode: "widthFix" }, null, 8, ["src"]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $props.showText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "uni-load-more__text", style: vue.normalizeStyle({ color: $props.color }) }, vue.toDisplayString($props.status === "more" ? $options.contentdownText : $props.status === "loading" ? $options.contentrefreshText : $options.contentnomoreText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$2], ["__scopeId", "data-v-9245e42c"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue"]]); const dataPicker = { props: { localdata: { type: [Array, Object], default() { return []; } }, spaceInfo: { type: Object, default() { return {}; } }, collection: { type: String, default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 500 }, getcount: { type: [Boolean, String], default: false }, getone: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, manual: { type: Boolean, default: false }, value: { type: [Array, String, Number], default() { return []; } }, modelValue: { type: [Array, String, Number], default() { return []; } }, preload: { type: Boolean, default: false }, stepSearh: { type: Boolean, default: true }, selfField: { type: String, default: "" }, parentField: { type: String, default: "" }, multiple: { type: Boolean, default: false }, map: { type: Object, default() { return { text: "text", value: "value" }; } } }, data() { return { loading: false, errorMessage: "", loadMore: { contentdown: "", contentrefresh: "", contentnomore: "" }, dataList: [], selected: [], selectedIndex: 0, page: { current: this.pageCurrent, size: this.pageSize, count: 0 } }; }, computed: { isLocalData() { return !this.collection.length; }, isCloudData() { return this.collection.length > 0; }, isCloudDataList() { return this.isCloudData && (!this.parentField && !this.selfField); }, isCloudDataTree() { return this.isCloudData && this.parentField && this.selfField; }, dataValue() { let isModelValue = Array.isArray(this.modelValue) ? this.modelValue.length > 0 : this.modelValue !== null || this.modelValue !== void 0; return isModelValue ? this.modelValue : this.value; }, hasValue() { if (typeof this.dataValue === "number") { return true; } return this.dataValue != null && this.dataValue.length > 0; } }, created() { this.$watch(() => { var al = []; [ "pageCurrent", "pageSize", "spaceInfo", "value", "modelValue", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree" ].forEach((key) => { al.push(this[key]); }); return al; }, (newValue, oldValue) => { for (let i2 = 2; i2 < newValue.length; i2++) { if (newValue[i2] != oldValue[i2]) { break; } } if (newValue[0] != oldValue[0]) { this.page.current = this.pageCurrent; } this.page.size = this.pageSize; this.onPropsChange(); }); this._treeData = []; }, methods: { onPropsChange() { this._treeData = []; }, // 填充 pickview 数据 async loadData() { if (this.isLocalData) { this.loadLocalData(); } else if (this.isCloudDataList) { this.loadCloudDataList(); } else if (this.isCloudDataTree) { this.loadCloudDataTree(); } }, // 加载本地数据 async loadLocalData() { this._treeData = []; this._extractTree(this.localdata, this._treeData); let inputValue = this.dataValue; if (inputValue === void 0) { return; } if (Array.isArray(inputValue)) { inputValue = inputValue[inputValue.length - 1]; if (typeof inputValue === "object" && inputValue[this.map.value]) { inputValue = inputValue[this.map.value]; } } this.selected = this._findNodePath(inputValue, this.localdata); }, // 加载 Cloud 数据 (单列) async loadCloudDataList() { if (this.loading) { return; } this.loading = true; try { let response = await this.getCommand(); let responseData = response.result.data; this._treeData = responseData; this._updateBindData(); this._updateSelected(); this.onDataChange(); } catch (e2) { this.errorMessage = e2; } finally { this.loading = false; } }, // 加载 Cloud 数据 (树形) async loadCloudDataTree() { if (this.loading) { return; } this.loading = true; try { let commandOptions = { field: this._cloudDataPostField(), where: this._cloudDataTreeWhere() }; if (this.gettree) { commandOptions.startwith = `${this.selfField}=='${this.dataValue}'`; } let response = await this.getCommand(commandOptions); let responseData = response.result.data; this._treeData = responseData; this._updateBindData(); this._updateSelected(); this.onDataChange(); } catch (e2) { this.errorMessage = e2; } finally { this.loading = false; } }, // 加载 Cloud 数据 (节点) async loadCloudDataNode(callback) { if (this.loading) { return; } this.loading = true; try { let commandOptions = { field: this._cloudDataPostField(), where: this._cloudDataNodeWhere() }; let response = await this.getCommand(commandOptions); let responseData = response.result.data; callback(responseData); } catch (e2) { this.errorMessage = e2; } finally { this.loading = false; } }, // 回显 Cloud 数据 getCloudDataValue() { if (this.isCloudDataList) { return this.getCloudDataListValue(); } if (this.isCloudDataTree) { return this.getCloudDataTreeValue(); } }, // 回显 Cloud 数据 (单列) getCloudDataListValue() { let where = []; let whereField = this._getForeignKeyByField(); if (whereField) { where.push(`${whereField} == '${this.dataValue}'`); } where = where.join(" || "); if (this.where) { where = `(${this.where}) && (${where})`; } return this.getCommand({ field: this._cloudDataPostField(), where }).then((res) => { this.selected = res.result.data; return res.result.data; }); }, // 回显 Cloud 数据 (树形) getCloudDataTreeValue() { return this.getCommand({ field: this._cloudDataPostField(), getTreePath: { startWith: `${this.selfField}=='${this.dataValue}'` } }).then((res) => { let treePath = []; this._extractTreePath(res.result.data, treePath); this.selected = treePath; return treePath; }); }, getCommand(options = {}) { let db = Vs.database(this.spaceInfo); const action = options.action || this.action; if (action) { db = db.action(action); } const collection = options.collection || this.collection; db = db.collection(collection); const where = options.where || this.where; if (!(!where || !Object.keys(where).length)) { db = db.where(where); } const field = options.field || this.field; if (field) { db = db.field(field); } const orderby = options.orderby || this.orderby; if (orderby) { db = db.orderBy(orderby); } const current = options.pageCurrent !== void 0 ? options.pageCurrent : this.page.current; const size = options.pageSize !== void 0 ? options.pageSize : this.page.size; const getCount = options.getcount !== void 0 ? options.getcount : this.getcount; const getTree = options.gettree !== void 0 ? options.gettree : this.gettree; const getOptions = { getCount, getTree }; if (options.getTreePath) { getOptions.getTreePath = options.getTreePath; } db = db.skip(size * (current - 1)).limit(size).get(getOptions); return db; }, _cloudDataPostField() { let fields = [this.field]; if (this.parentField) { fields.push(`${this.parentField} as parent_value`); } return fields.join(","); }, _cloudDataTreeWhere() { let result = []; let selected = this.selected; let parentField = this.parentField; if (parentField) { result.push(`${parentField} == null || ${parentField} == ""`); } if (selected.length) { for (var i2 = 0; i2 < selected.length - 1; i2++) { result.push(`${parentField} == '${selected[i2].value}'`); } } let where = []; if (this.where) { where.push(`(${this.where})`); } if (result.length) { where.push(`(${result.join(" || ")})`); } return where.join(" && "); }, _cloudDataNodeWhere() { let where = []; let selected = this.selected; if (selected.length) { where.push(`${this.parentField} == '${selected[selected.length - 1].value}'`); } where = where.join(" || "); if (this.where) { return `(${this.where}) && (${where})`; } return where; }, _getWhereByForeignKey() { let result = []; let whereField = this._getForeignKeyByField(); if (whereField) { result.push(`${whereField} == '${this.dataValue}'`); } if (this.where) { return `(${this.where}) && (${result.join(" || ")})`; } return result.join(" || "); }, _getForeignKeyByField() { let fields = this.field.split(","); let whereField = null; for (let i2 = 0; i2 < fields.length; i2++) { const items = fields[i2].split("as"); if (items.length < 2) { continue; } if (items[1].trim() === "value") { whereField = items[0].trim(); break; } } return whereField; }, _updateBindData(node) { const { dataList, hasNodes } = this._filterData(this._treeData, this.selected); let isleaf = this._stepSearh === false && !hasNodes; if (node) { node.isleaf = isleaf; } this.dataList = dataList; this.selectedIndex = dataList.length - 1; if (!isleaf && this.selected.length < dataList.length) { this.selected.push({ value: null, text: "请选择" }); } return { isleaf, hasNodes }; }, _updateSelected() { let dl = this.dataList; let sl = this.selected; let textField = this.map.text; let valueField = this.map.value; for (let i2 = 0; i2 < sl.length; i2++) { let value = sl[i2].value; let dl2 = dl[i2]; for (let j2 = 0; j2 < dl2.length; j2++) { let item2 = dl2[j2]; if (item2[valueField] === value) { sl[i2].text = item2[textField]; break; } } } }, _filterData(data, paths) { let dataList = []; let hasNodes = true; dataList.push(data.filter((item) => { return item.parent_value === null || item.parent_value === void 0 || item.parent_value === ""; })); for (let i2 = 0; i2 < paths.length; i2++) { let value = paths[i2].value; let nodes = data.filter((item) => { return item.parent_value === value; }); if (nodes.length) { dataList.push(nodes); } else { hasNodes = false; } } return { dataList, hasNodes }; }, _extractTree(nodes, result, parent_value) { let valueField = this.map.value; for (let i2 = 0; i2 < nodes.length; i2++) { let node = nodes[i2]; let child = {}; for (let key in node) { if (key !== "children") { child[key] = node[key]; } } if (parent_value !== null && parent_value !== void 0 && parent_value !== "") { child.parent_value = parent_value; } result.push(child); let children = node.children; if (children) { this._extractTree(children, result, node[valueField]); } } }, _extractTreePath(nodes, result) { for (let i2 = 0; i2 < nodes.length; i2++) { let node = nodes[i2]; let child = {}; for (let key in node) { if (key !== "children") { child[key] = node[key]; } } result.push(child); let children = node.children; if (children) { this._extractTreePath(children, result); } } }, _findNodePath(key, nodes, path = []) { let textField = this.map.text; let valueField = this.map.value; for (let i2 = 0; i2 < nodes.length; i2++) { let node = nodes[i2]; let children = node.children; let text = node[textField]; let value = node[valueField]; path.push({ value, text }); if (value === key) { return path; } if (children) { const p2 = this._findNodePath(key, children, path); if (p2.length) { return p2; } } path.pop(); } return []; } } }; const _sfc_main$9 = { name: "UniDataPickerView", emits: ["nodeclick", "change", "datachange", "update:modelValue"], mixins: [dataPicker], props: { managedMode: { type: Boolean, default: false }, ellipsis: { type: Boolean, default: true } }, created() { if (!this.managedMode) { this.$nextTick(() => { this.loadData(); }); } }, methods: { onPropsChange() { this._treeData = []; this.selectedIndex = 0; this.$nextTick(() => { this.loadData(); }); }, handleSelect(index) { this.selectedIndex = index; }, handleNodeClick(item, i2, j2) { if (item.disable) { return; } const node = this.dataList[i2][j2]; const text = node[this.map.text]; const value = node[this.map.value]; if (i2 < this.selected.length - 1) { this.selected.splice(i2, this.selected.length - i2); this.selected.push({ text, value }); } else if (i2 === this.selected.length - 1) { this.selected.splice(i2, 1, { text, value }); } if (node.isleaf) { this.onSelectedChange(node, node.isleaf); return; } const { isleaf, hasNodes } = this._updateBindData(); if (this.isLocalData) { this.onSelectedChange(node, !hasNodes || isleaf); } else if (this.isCloudDataList) { this.onSelectedChange(node, true); } else if (this.isCloudDataTree) { if (isleaf) { this.onSelectedChange(node, node.isleaf); } else if (!hasNodes) { this.loadCloudDataNode((data) => { if (!data.length) { node.isleaf = true; } else { this._treeData.push(...data); this._updateBindData(node); } this.onSelectedChange(node, node.isleaf); }); } } }, updateData(data) { this._treeData = data.treeData; this.selected = data.selected; if (!this._treeData.length) { this.loadData(); } else { this._updateBindData(); } }, onDataChange() { this.$emit("datachange"); }, onSelectedChange(node, isleaf) { if (isleaf) { this._dispatchEvent(); } if (node) { this.$emit("nodeclick", node); } }, _dispatchEvent() { this.$emit("change", this.selected.slice(0)); } } }; function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_0$1); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-data-pickerview" }, [ !_ctx.isCloudDataList ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, class: "selected-area", "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "selected-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.selected, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["selected-item", { "selected-item-active": index == _ctx.selectedIndex }]), key: index, onClick: ($event) => $options.handleSelect(index) }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item.text || ""), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "tab-c" }, [ vue.createElementVNode("scroll-view", { class: "list", "scroll-y": true }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.dataList[_ctx.selectedIndex], (item, j2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["item", { "is-disabled": !!item.disable }]), key: j2, onClick: ($event) => $options.handleNodeClick(item, _ctx.selectedIndex, j2) }, [ vue.createElementVNode( "text", { class: "item-text" }, vue.toDisplayString(item[_ctx.map.text]), 1 /* TEXT */ ), _ctx.selected.length > _ctx.selectedIndex && item[_ctx.map.value] == _ctx.selected[_ctx.selectedIndex].value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "check" })) : vue.createCommentVNode("v-if", true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "loading-cover" }, [ vue.createVNode(_component_uni_load_more, { class: "load-more", contentText: _ctx.loadMore, status: "loading" }, null, 8, ["contentText"]) ])) : vue.createCommentVNode("v-if", true), _ctx.errorMessage ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "error-message" }, [ vue.createElementVNode( "text", { class: "error-text" }, vue.toDisplayString(_ctx.errorMessage), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]); } const DataPickerView = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1], ["__scopeId", "data-v-91ec6a82"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue"]]); const _sfc_main$8 = { name: "UniDataPicker", emits: ["popupopened", "popupclosed", "nodeclick", "input", "change", "update:modelValue", "inputclick"], mixins: [dataPicker], components: { DataPickerView }, props: { options: { type: [Object, Array], default() { return {}; } }, popupTitle: { type: String, default: "请选择" }, placeholder: { type: String, default: "请选择" }, heightMobile: { type: String, default: "" }, readonly: { type: Boolean, default: false }, clearIcon: { type: Boolean, default: true }, border: { type: Boolean, default: true }, split: { type: String, default: "/" }, ellipsis: { type: Boolean, default: true } }, data() { return { isOpened: false, inputSelected: [] }; }, created() { this.$nextTick(() => { this.load(); }); }, watch: { localdata: { handler() { this.load(); }, deep: true } }, methods: { clear() { this._dispatchEvent([]); }, onPropsChange() { this._treeData = []; this.selectedIndex = 0; this.load(); }, load() { if (this.readonly) { this._processReadonly(this.localdata, this.dataValue); return; } if (this.isLocalData) { this.loadData(); this.inputSelected = this.selected.slice(0); } else if (this.isCloudDataList || this.isCloudDataTree) { this.loading = true; this.getCloudDataValue().then((res) => { this.loading = false; this.inputSelected = res; }).catch((err) => { this.loading = false; this.errorMessage = err; }); } }, show() { this.isOpened = true; setTimeout(() => { this.$refs.pickerView.updateData({ treeData: this._treeData, selected: this.selected, selectedIndex: this.selectedIndex }); }, 200); this.$emit("popupopened"); }, hide() { this.isOpened = false; this.$emit("popupclosed"); }, handleInput() { if (this.readonly) { this.$emit("inputclick"); return; } this.show(); }, handleClose(e2) { this.hide(); }, onnodeclick(e2) { this.$emit("nodeclick", e2); }, ondatachange(e2) { this._treeData = this.$refs.pickerView._treeData; }, onchange(e2) { this.hide(); this.$nextTick(() => { this.inputSelected = e2; }); this._dispatchEvent(e2); }, _processReadonly(dataList, value) { var isTree = dataList.findIndex((item2) => { return item2.children; }); if (isTree > -1) { let inputValue; if (Array.isArray(value)) { inputValue = value[value.length - 1]; if (typeof inputValue === "object" && inputValue.value) { inputValue = inputValue.value; } } else { inputValue = value; } this.inputSelected = this._findNodePath(inputValue, this.localdata); return; } if (!this.hasValue) { this.inputSelected = []; return; } let result = []; for (let i2 = 0; i2 < value.length; i2++) { var val = value[i2]; var item = dataList.find((v2) => { return v2.value == val; }); if (item) { result.push(item); } } if (result.length) { this.inputSelected = result; } }, _filterForArray(data, valueArray) { var result = []; for (let i2 = 0; i2 < valueArray.length; i2++) { var value = valueArray[i2]; var found = data.find((item) => { return item.value == value; }); if (found) { result.push(found); } } return result; }, _dispatchEvent(selected) { let item = {}; if (selected.length) { var value = new Array(selected.length); for (var i2 = 0; i2 < selected.length; i2++) { value[i2] = selected[i2].value; } item = selected[selected.length - 1]; } else { item.value = ""; } if (this.formItem) { this.formItem.setValue(item.value); } this.$emit("input", item.value); this.$emit("update:modelValue", item.value); this.$emit("change", { detail: { value: selected } }); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_0$1); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); const _component_data_picker_view = vue.resolveComponent("data-picker-view"); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-data-tree" }, [ vue.createElementVNode("view", { class: "uni-data-tree-input", onClick: _cache[1] || (_cache[1] = (...args) => $options.handleInput && $options.handleInput(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", { options: $props.options, data: $data.inputSelected, error: _ctx.errorMessage }, () => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["input-value", { "input-value-border": $props.border }]) }, [ _ctx.errorMessage ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "selected-area error-text" }, vue.toDisplayString(_ctx.errorMessage), 1 /* TEXT */ )) : _ctx.loading && !$data.isOpened ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "selected-area" }, [ vue.createVNode(_component_uni_load_more, { class: "load-more", contentText: _ctx.loadMore, status: "loading" }, null, 8, ["contentText"]) ])) : $data.inputSelected.length ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 2, class: "selected-area", "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "selected-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.inputSelected, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "selected-item", key: index }, [ vue.createElementVNode( "text", { class: "text-color" }, vue.toDisplayString(item.text), 1 /* TEXT */ ), index < $data.inputSelected.length - 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "input-split-line" }, vue.toDisplayString($props.split), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : (vue.openBlock(), vue.createElementBlock( "text", { key: 3, class: "selected-area placeholder" }, vue.toDisplayString($props.placeholder), 1 /* TEXT */ )), $props.clearIcon && !$props.readonly && $data.inputSelected.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "icon-clear", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"])) }, [ vue.createVNode(_component_uni_icons, { type: "clear", color: "#c0c4cc", size: "24" }) ])) : vue.createCommentVNode("v-if", true), (!$props.clearIcon || !$data.inputSelected.length) && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "arrow-area" }, [ vue.createElementVNode("view", { class: "input-arrow" }) ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ) ], true) ]), $data.isOpened ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-data-tree-cover", onClick: _cache[2] || (_cache[2] = (...args) => $options.handleClose && $options.handleClose(...args)) })) : vue.createCommentVNode("v-if", true), $data.isOpened ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-data-tree-dialog" }, [ vue.createElementVNode("view", { class: "uni-popper__arrow" }), vue.createElementVNode("view", { class: "dialog-caption" }, [ vue.createElementVNode("view", { class: "title-area" }, [ vue.createElementVNode( "text", { class: "dialog-title" }, vue.toDisplayString($props.popupTitle), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "dialog-close", onClick: _cache[3] || (_cache[3] = (...args) => $options.handleClose && $options.handleClose(...args)) }, [ vue.createElementVNode("view", { class: "dialog-close-plus", "data-id": "close" }), vue.createElementVNode("view", { class: "dialog-close-plus dialog-close-rotate", "data-id": "close" }) ]) ]), vue.createVNode(_component_data_picker_view, { class: "picker-view", ref: "pickerView", modelValue: _ctx.dataValue, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.dataValue = $event), localdata: _ctx.localdata, preload: _ctx.preload, collection: _ctx.collection, field: _ctx.field, orderby: _ctx.orderby, where: _ctx.where, "step-searh": _ctx.stepSearh, "self-field": _ctx.selfField, "parent-field": _ctx.parentField, "managed-mode": true, map: _ctx.map, ellipsis: $props.ellipsis, onChange: $options.onchange, onDatachange: $options.ondatachange, onNodeclick: $options.onnodeclick }, null, 8, ["modelValue", "localdata", "preload", "collection", "field", "orderby", "where", "step-searh", "self-field", "parent-field", "map", "ellipsis", "onChange", "onDatachange", "onNodeclick"]) ])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render], ["__scopeId", "data-v-2653531e"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue"]]); const _sfc_main$7 = { __name: "index", setup(__props) { const store = useStore(); const { proxy } = vue.getCurrentInstance(); const departList = vue.ref([]); const queryMyDeptTreeList = () => { queryMyDeptTreeListApi().then((res) => { departList.value = res.result; currentId = res.result[0].id; queryUserByDepId(res.result[0].id); }).catch((err) => { formatAppLog("log", "at pages/userlist/index.vue:98", err); }); }; const userlist = vue.ref([]); const queryUserByDepId = (id, username2, realname2) => { queryUserByDepIdApi({ id, username: username2 || "", realname: realname2 || "" }).then((res) => { if (res.success) { userlist.value = res.result; } }).catch((err) => { formatAppLog("log", "at pages/userlist/index.vue:113", err); }); }; let currentId = null; let departArr = []; const onnodeclick = (e2) => { queryUserByDepId(e2.id); currentId = e2.id; if (departArr.indexOf(e2.title) != -1) { departArr.splice(departArr.indexOf(e2.title), 1, e2.title); } else { departArr.push(e2.title); } }; const popclose = (e2) => { formatAppLog("log", "at pages/userlist/index.vue:129", "qqq", e2); }; const chooseArr = vue.ref([]); const choose = (id) => { if (isradio) { if (chooseArr.value.indexOf(id) != -1) return; chooseArr.value.splice(chooseArr.value.indexOf(id), 1, id); } else { if (chooseArr.value.indexOf(id) != -1) { chooseArr.value.splice(chooseArr.value.indexOf(id), 1); } else { chooseArr.value.push(id); } } }; let isradio = 0; let taskId = null; let nextnode = null; let reason = null; onLoad((options) => { isradio = options.isradio; taskId = options.id; reason = options.reason; if (options.nextnode) { nextnode = JSON.parse(options.nextnode); } queryMyDeptTreeList(); }); const username = vue.ref(""); const realname = vue.ref(""); const search = () => { if (username.value.trim() || realname.value.trim()) { userlist.value = []; queryUserByDepId(currentId, username.value, realname.value); } }; const refresh = () => { username.value = ""; realname.value = ""; userlist.value = []; queryUserByDepId(currentId, username.value, realname.value); }; const taskEntrust = () => { if (!chooseArr.value.length) return proxy.$toast("请选择被委托人"); taskEntrustApi({ taskAssignee: userlist.value.filter((item) => item.id == chooseArr.value[0])[0].username, taskId }).then((res) => { if (res.success) { proxy.$toast(res.message); setTimeout(() => { uni.navigateBack(); }, 2e3); } }); }; const handleprocess = () => { if (nextnode) { processComplete(); } else { taskEntrust(); } }; const processComplete = () => { processCompleteApi({ taskId, reason, processModel: 1, nextnode: nextnode[0].nextnode, nextUserName: userlist.value.filter((item) => item.id == chooseArr.value[0])[0].realname, nextUserId: chooseArr.value[0] }).then((res) => { proxy.$toast(res.message); setTimeout(() => { uni.navigateBack(); }, 2e3); }); }; return (_ctx, _cache) => { const _component_uni_data_picker = resolveEasycom(vue.resolveDynamicComponent("uni-data-picker"), __easycom_0); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createVNode(_component_uni_data_picker, { onPopupclosed: _cache[0] || (_cache[0] = ($event) => popclose($event)), "step-searh": false, map: { text: "departName", value: "id" }, localdata: departList.value, "popup-title": "请选择部门", placeholder: "请选择部门", onNodeclick: onnodeclick }, null, 8, ["localdata"]), vue.createElementVNode("view", { class: "search_box" }, [ vue.createElementVNode("view", { class: "username f-row aic" }, [ vue.createTextVNode(" 用户姓名:"), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => realname.value = $event), type: "text", placeholder: "请输入姓名", "placeholder-style": "color: grey;font-size: 28rpx;" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, realname.value] ]) ]), vue.createElementVNode("view", { class: "username f-row aic" }, [ vue.createTextVNode(" 用户账号:"), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => username.value = $event), type: "text", placeholder: "请输入账号", "placeholder-style": "color: grey;font-size: 28rpx;" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, username.value] ]) ]), vue.createElementVNode("view", { class: "btn f-row aic jca" }, [ vue.createElementVNode("view", { class: "f-row aic", onClick: search }, [ vue.createVNode(_component_uni_icons, { type: "search", size: "15", color: "#fff" }), vue.createTextVNode(" 查询 ") ]), vue.createElementVNode("view", { class: "f-row aic", onClick: refresh }, [ vue.createVNode(_component_uni_icons, { type: "refreshempty", size: "15", color: "#fff" }), vue.createTextVNode(" 重置 ") ]) ]) ]), vue.createElementVNode("view", { class: "list" }, [ vue.createElementVNode("view", { class: "title f-row aic box" }, [ vue.createElementVNode("view", { class: "" }), vue.createElementVNode("view", { class: "" }, " 序号 "), vue.createElementVNode("view", { class: "username" }, " 用户账号 "), vue.createElementVNode("view", { class: "" }, " 用户姓名 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(userlist.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item f-row aic box", key: i2 }, [ vue.createElementVNode("view", { class: "f-row aic img", onClick: ($event) => choose(item.id) }, [ chooseArr.value.includes(item.id) ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_0$6, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_1$4, mode: "" })) ], 8, ["onClick"]), vue.createElementVNode( "view", { class: "order" }, vue.toDisplayString(i2 + 1), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "username f-col aic" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.username), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "realname" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.realname), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "confirm f-col aic" }, [ vue.createElementVNode("view", { class: "", onClick: handleprocess }, " 确认 ") ]) ], 2 /* CLASS */ ); }; } }; const PagesUserlistIndex = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-89e61cf9"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/userlist/index.vue"]]); const _sfc_main$6 = { __name: "detail", setup(__props) { const store = useStore(); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("video", { src: "" }), vue.createElementVNode("view", { class: "title" }, " 五月天“突然好想你”线上演唱会精彩回放,这里就是标题 ") ]), vue.createElementVNode("view", { class: "listcom" }, [ vue.createVNode(safeCom) ]) ], 2 /* CLASS */ ); }; } }; const PagesSafeDetail = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-952b08c2"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/safe/detail.vue"]]); var dayjs_min = { exports: {} }; (function(module, exports) { !function(t2, e2) { module.exports = e2(); }(commonjsGlobal, function() { var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) { var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100; return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]"; } }, m2 = function(t3, e3, n3) { var r3 = String(t3); return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3; }, v2 = { s: m2, z: function(t3) { var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60; return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0"); }, m: function t3(e3, n3) { if (e3.date() < n3.date()) return -t3(n3, e3); var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u3 = e3.clone().add(r3 + (s3 ? -1 : 1), c2); return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0); }, a: function(t3) { return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3); }, p: function(t3) { return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, ""); }, u: function(t3) { return void 0 === t3; } }, g2 = "en", D2 = {}; D2[g2] = M2; var p2 = "$isDayjsObject", S2 = function(t3) { return t3 instanceof _2 || !(!t3 || !t3[p2]); }, w2 = function t3(e3, n3, r3) { var i3; if (!e3) return g2; if ("string" == typeof e3) { var s3 = e3.toLowerCase(); D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3); var u3 = e3.split("-"); if (!i3 && u3.length > 1) return t3(u3[0]); } else { var a3 = e3.name; D2[a3] = e3, i3 = a3; } return !r3 && i3 && (g2 = i3), i3 || !r3 && g2; }, O2 = function(t3, e3) { if (S2(t3)) return t3.clone(); var n3 = "object" == typeof e3 ? e3 : {}; return n3.date = t3, n3.args = arguments, new _2(n3); }, b2 = v2; b2.l = w2, b2.i = S2, b2.w = function(t3, e3) { return O2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset }); }; var _2 = function() { function M3(t3) { this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true; } var m3 = M3.prototype; return m3.parse = function(t3) { this.$d = function(t4) { var e3 = t4.date, n3 = t4.utc; if (null === e3) return /* @__PURE__ */ new Date(NaN); if (b2.u(e3)) return /* @__PURE__ */ new Date(); if (e3 instanceof Date) return new Date(e3); if ("string" == typeof e3 && !/Z$/i.test(e3)) { var r3 = e3.match($2); if (r3) { var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3); return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3); } } return new Date(e3); }(t3), this.init(); }, m3.init = function() { var t3 = this.$d; this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds(); }, m3.$utils = function() { return b2; }, m3.isValid = function() { return !(this.$d.toString() === l2); }, m3.isSame = function(t3, e3) { var n3 = O2(t3); return this.startOf(e3) <= n3 && n3 <= this.endOf(e3); }, m3.isAfter = function(t3, e3) { return O2(t3) < this.startOf(e3); }, m3.isBefore = function(t3, e3) { return this.endOf(e3) < O2(t3); }, m3.$g = function(t3, e3, n3) { return b2.u(t3) ? this[e3] : this.set(n3, t3); }, m3.unix = function() { return Math.floor(this.valueOf() / 1e3); }, m3.valueOf = function() { return this.$d.getTime(); }, m3.startOf = function(t3, e3) { var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t3), l3 = function(t4, e4) { var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3); return r3 ? i3 : i3.endOf(a2); }, $3 = function(t4, e4) { return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3); }, y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : ""); switch (f3) { case h2: return r3 ? l3(1, 0) : l3(31, 11); case c2: return r3 ? l3(1, M4) : l3(0, M4 + 1); case o2: var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3; return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4); case a2: case d2: return $3(v3 + "Hours", 0); case u2: return $3(v3 + "Minutes", 1); case s2: return $3(v3 + "Seconds", 2); case i2: return $3(v3 + "Milliseconds", 3); default: return this.clone(); } }, m3.endOf = function(t3) { return this.startOf(t3, false); }, m3.$set = function(t3, e3) { var n3, o3 = b2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $3 = o3 === a2 ? this.$D + (e3 - this.$W) : e3; if (o3 === c2 || o3 === h2) { var y3 = this.clone().set(d2, 1); y3.$d[l3]($3), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d; } else l3 && this.$d[l3]($3); return this.init(), this; }, m3.set = function(t3, e3) { return this.clone().$set(t3, e3); }, m3.get = function(t3) { return this[b2.p(t3)](); }, m3.add = function(r3, f3) { var d3, l3 = this; r3 = Number(r3); var $3 = b2.p(f3), y3 = function(t3) { var e3 = O2(l3); return b2.w(e3.date(e3.date() + Math.round(t3 * r3)), l3); }; if ($3 === c2) return this.set(c2, this.$M + r3); if ($3 === h2) return this.set(h2, this.$y + r3); if ($3 === a2) return y3(1); if ($3 === o2) return y3(7); var M4 = (d3 = {}, d3[s2] = e2, d3[u2] = n2, d3[i2] = t2, d3)[$3] || 1, m4 = this.$d.getTime() + r3 * M4; return b2.w(m4, this); }, m3.subtract = function(t3, e3) { return this.add(-1 * t3, e3); }, m3.format = function(t3) { var e3 = this, n3 = this.$locale(); if (!this.isValid()) return n3.invalidDate || l2; var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = function(t4, n4, i4, s4) { return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4); }, d3 = function(t4) { return b2.s(s3 % 12 || 12, t4, "0"); }, $3 = f3 || function(t4, e4, n4) { var r4 = t4 < 12 ? "AM" : "PM"; return n4 ? r4.toLowerCase() : r4; }; return r3.replace(y2, function(t4, r4) { return r4 || function(t5) { switch (t5) { case "YY": return String(e3.$y).slice(-2); case "YYYY": return b2.s(e3.$y, 4, "0"); case "M": return a3 + 1; case "MM": return b2.s(a3 + 1, 2, "0"); case "MMM": return h3(n3.monthsShort, a3, c3, 3); case "MMMM": return h3(c3, a3); case "D": return e3.$D; case "DD": return b2.s(e3.$D, 2, "0"); case "d": return String(e3.$W); case "dd": return h3(n3.weekdaysMin, e3.$W, o3, 2); case "ddd": return h3(n3.weekdaysShort, e3.$W, o3, 3); case "dddd": return o3[e3.$W]; case "H": return String(s3); case "HH": return b2.s(s3, 2, "0"); case "h": return d3(1); case "hh": return d3(2); case "a": return $3(s3, u3, true); case "A": return $3(s3, u3, false); case "m": return String(u3); case "mm": return b2.s(u3, 2, "0"); case "s": return String(e3.$s); case "ss": return b2.s(e3.$s, 2, "0"); case "SSS": return b2.s(e3.$ms, 3, "0"); case "Z": return i3; } return null; }(t4) || i3.replace(":", ""); }); }, m3.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, m3.diff = function(r3, d3, l3) { var $3, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D3 = function() { return b2.m(y3, m4); }; switch (M4) { case h2: $3 = D3() / 12; break; case c2: $3 = D3(); break; case f2: $3 = D3() / 3; break; case o2: $3 = (g3 - v3) / 6048e5; break; case a2: $3 = (g3 - v3) / 864e5; break; case u2: $3 = g3 / n2; break; case s2: $3 = g3 / e2; break; case i2: $3 = g3 / t2; break; default: $3 = g3; } return l3 ? $3 : b2.a($3); }, m3.daysInMonth = function() { return this.endOf(c2).$D; }, m3.$locale = function() { return D2[this.$L]; }, m3.locale = function(t3, e3) { if (!t3) return this.$L; var n3 = this.clone(), r3 = w2(t3, e3, true); return r3 && (n3.$L = r3), n3; }, m3.clone = function() { return b2.w(this.$d, this); }, m3.toDate = function() { return new Date(this.valueOf()); }, m3.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, m3.toISOString = function() { return this.$d.toISOString(); }, m3.toString = function() { return this.$d.toUTCString(); }, M3; }(), k = _2.prototype; return O2.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) { k[t3[1]] = function(e3) { return this.$g(e3, t3[0], t3[1]); }; }), O2.extend = function(t3, e3) { return t3.$i || (t3(e3, _2, O2), t3.$i = true), O2; }, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) { return O2(1e3 * t3); }, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2; }); })(dayjs_min); var dayjs_minExports = dayjs_min.exports; const dayjs = /* @__PURE__ */ getDefaultExportFromCjs$1(dayjs_minExports); const _sfc_main$5 = { __name: "index", setup(__props) { const store = useStore(); const zhibanArr = vue.ref([]); onLoad(() => { zhibanQuery(); }); const index = vue.ref(dayjs().format("YYYY-MM")); const bindPickerChange = (e2) => { index.value = e2.detail.value; zhibanQuery(); }; const zhibanQuery = () => { let [year, month] = index.value.split("-"); zhibanQueryApi({ year, month }).then((res) => { zhibanArr.value = res.result.records; }).catch((err) => { formatAppLog("log", "at pages/zhiban/index.vue:73", err); }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["f-col", "aic", { "gray": vue.unref(store).isgray == 1 }]) }, [ vue.createElementVNode("picker", { fields: "month", mode: "date", onChange: bindPickerChange, value: index.value }, [ vue.createElementVNode( "view", { class: "date" }, vue.toDisplayString(index.value) + " 点击选择月份", 1 /* TEXT */ ) ], 40, ["value"]), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "info_title f-row aic" }, [ vue.createElementVNode("view", { class: "" }, " 日期 "), vue.createElementVNode("view", { class: "" }, " 带班领导 "), vue.createElementVNode("view", { class: "" }, " 值班领导 "), vue.createElementVNode("view", { class: "" }, " 值班干部 ") ]), vue.createElementVNode("view", { class: "data_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(zhibanArr.value, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "data f-row aic" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.date), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.dbld_dictText), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.zbld_dictText), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.zbgbrealname), 1 /* TEXT */ ) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ], 2 /* CLASS */ ); }; } }; const PagesZhibanIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-54a2fc4a"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/zhiban/index.vue"]]); const _sfc_main$4 = { __name: "self", setup(__props) { const store = useStore(); const taskArr = vue.ref([]); let processName = ""; onLoad((options) => { processName = options.title; getmyApply(); }); let pageNo = 1; let pageSize = 10; let loading2 = false; const getmyApply = () => { loading2 = true; uni.showLoading({ title: "加载中..." }); myApplyProcessListApi({ pageNo, pageSize, _t: (/* @__PURE__ */ new Date()).getTime(), processName }).then((res) => { if (res.success) { if (!res.result.records.length) return toast("没有更多了~"); let arr = res.result.records; arr.map((item) => { item["processApplyUserName"] = item["startUserName"]; item["processDefinitionName"] = item["prcocessDefinitionName"]; item["taskBeginTime"] = item["startTime"]; }); taskArr.value = [...taskArr.value, ...arr]; loading2 = false; } }).catch((err) => { formatAppLog("log", "at pages/task/self.vue:59", err); }); }; const jump = (url) => { beforeJump(url, () => { uni.navigateTo({ url }); }); }; onReachBottom(() => { if (loading2) return; pageNo++; getmyApply(); }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "gray": vue.unref(store).isgray == 1 }) }, [ vue.createVNode(tasklistCom, { onJump: jump, taskArr: taskArr.value, currentIndex: 2 }, null, 8, ["taskArr"]) ], 2 /* CLASS */ ); }; } }; const PagesTaskSelf = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "D:/szcxApp/cxc-szcx-uniapp/pages/task/self.vue"]]); __definePage("pages/login/login", PagesLoginLogin); __definePage("pages/tab/index", PagesTabIndex); __definePage("pages/task/todotask", PagesTaskTodotask); __definePage("pages/tab/office", PagesTabOffice); __definePage("pages/tab/my", PagesTabMy); __definePage("pages/task/index", PagesTaskIndex); __definePage("pages/task/handle", PagesTaskHandle); __definePage("pages/talk/message_list", PagesTalkMessageList); __definePage("pages/talk/conversation", PagesTalkConversation); __definePage("pages/talk/system", PagesTalkSystem); __definePage("pages/document/index", PagesDocumentIndex); __definePage("pages/document/detail", PagesDocumentDetail); __definePage("pages/meeting/index", PagesMeetingIndex); __definePage("pages/meeting/detail", PagesMeetingDetail); __definePage("pages/leave/application", PagesLeaveApplication); __definePage("pages/checkin/index", PagesCheckinIndex); __definePage("pages/useredit/useredit", PagesUsereditUseredit); __definePage("pages/useredit/address", PagesUsereditAddress); __definePage("pages/useredit/add_address", PagesUsereditAddAddress); __definePage("pages/useredit/addressbook", PagesUsereditAddressbook); __definePage("pages/safe/manage", PagesSafeManage); __definePage("pages/product/index", PagesProductIndex); __definePage("pages/userlist/index", PagesUserlistIndex); __definePage("pages/safe/detail", PagesSafeDetail); __definePage("pages/zhiban/index", PagesZhibanIndex); __definePage("pages/task/self", PagesTaskSelf); var lookup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 62, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 ]; function base64Decode(source, target) { var sourceLength = source.length; var paddingLength = source[sourceLength - 2] === "=" ? 2 : source[sourceLength - 1] === "=" ? 1 : 0; var tmp; var byteIndex = 0; var baseLength = sourceLength - paddingLength & 4294967292; for (var i2 = 0; i2 < baseLength; i2 += 4) { tmp = lookup[source.charCodeAt(i2)] << 18 | lookup[source.charCodeAt(i2 + 1)] << 12 | lookup[source.charCodeAt(i2 + 2)] << 6 | lookup[source.charCodeAt(i2 + 3)]; target[byteIndex++] = tmp >> 16 & 255; target[byteIndex++] = tmp >> 8 & 255; target[byteIndex++] = tmp & 255; } if (paddingLength === 1) { tmp = lookup[source.charCodeAt(i2)] << 10 | lookup[source.charCodeAt(i2 + 1)] << 4 | lookup[source.charCodeAt(i2 + 2)] >> 2; target[byteIndex++] = tmp >> 8 & 255; target[byteIndex++] = tmp & 255; } if (paddingLength === 2) { tmp = lookup[source.charCodeAt(i2)] << 2 | lookup[source.charCodeAt(i2 + 1)] >> 4; target[byteIndex++] = tmp & 255; } } const $inject_window_crypto = { getRandomValues(arr) { if (!(arr instanceof Int8Array || arr instanceof Uint8Array || arr instanceof Int16Array || arr instanceof Uint16Array || arr instanceof Int32Array || arr instanceof Uint32Array || arr instanceof Uint8ClampedArray)) { throw new Error("Expected an integer array"); } if (arr.byteLength > 65536) { throw new Error("Can only request a maximum of 65536 bytes"); } var crypto = requireNativePlugin("DCloud-Crypto"); base64Decode(crypto.getRandomValues(arr.byteLength), new Uint8Array( arr.buffer, arr.byteOffset, arr.byteLength )); return arr; } }; function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } var gtpushMin = { exports: {} }; /*! For license information please see gtpush-min.js.LICENSE.txt */ (function(module, exports) { (function t2(e2, r2) { module.exports = r2(); })(self, () => (() => { var t2 = { 4736: (t22, e22, r22) => { t22 = r22.nmd(t22); var i22; var n2 = function(t3) { var e3 = 1e7, r3 = 7, i3 = 9007199254740992, s2 = d2(i3), a2 = "0123456789abcdefghijklmnopqrstuvwxyz"; var o2 = "function" === typeof BigInt; function u2(t4, e4, r4, i4) { if ("undefined" === typeof t4) return u2[0]; if ("undefined" !== typeof e4) return 10 === +e4 && !r4 ? st2(t4) : X2(t4, e4, r4, i4); return st2(t4); } function c2(t4, e4) { this.value = t4; this.sign = e4; this.isSmall = false; } c2.prototype = Object.create(u2.prototype); function l2(t4) { this.value = t4; this.sign = t4 < 0; this.isSmall = true; } l2.prototype = Object.create(u2.prototype); function f2(t4) { this.value = t4; } f2.prototype = Object.create(u2.prototype); function h2(t4) { return -i3 < t4 && t4 < i3; } function d2(t4) { if (t4 < 1e7) return [t4]; if (t4 < 1e14) return [t4 % 1e7, Math.floor(t4 / 1e7)]; return [t4 % 1e7, Math.floor(t4 / 1e7) % 1e7, Math.floor(t4 / 1e14)]; } function v2(t4) { p2(t4); var r4 = t4.length; if (r4 < 4 && N2(t4, s2) < 0) switch (r4) { case 0: return 0; case 1: return t4[0]; case 2: return t4[0] + t4[1] * e3; default: return t4[0] + (t4[1] + t4[2] * e3) * e3; } return t4; } function p2(t4) { var e4 = t4.length; while (0 === t4[--e4]) ; t4.length = e4 + 1; } function g2(t4) { var e4 = new Array(t4); var r4 = -1; while (++r4 < t4) e4[r4] = 0; return e4; } function y2(t4) { if (t4 > 0) return Math.floor(t4); return Math.ceil(t4); } function m2(t4, r4) { var i4 = t4.length, n22 = r4.length, s22 = new Array(i4), a22 = 0, o22 = e3, u22, c22; for (c22 = 0; c22 < n22; c22++) { u22 = t4[c22] + r4[c22] + a22; a22 = u22 >= o22 ? 1 : 0; s22[c22] = u22 - a22 * o22; } while (c22 < i4) { u22 = t4[c22] + a22; a22 = u22 === o22 ? 1 : 0; s22[c22++] = u22 - a22 * o22; } if (a22 > 0) s22.push(a22); return s22; } function w2(t4, e4) { if (t4.length >= e4.length) return m2(t4, e4); return m2(e4, t4); } function S2(t4, r4) { var i4 = t4.length, n22 = new Array(i4), s22 = e3, a22, o22; for (o22 = 0; o22 < i4; o22++) { a22 = t4[o22] - s22 + r4; r4 = Math.floor(a22 / s22); n22[o22] = a22 - r4 * s22; r4 += 1; } while (r4 > 0) { n22[o22++] = r4 % s22; r4 = Math.floor(r4 / s22); } return n22; } c2.prototype.add = function(t4) { var e4 = st2(t4); if (this.sign !== e4.sign) return this.subtract(e4.negate()); var r4 = this.value, i4 = e4.value; if (e4.isSmall) return new c2(S2(r4, Math.abs(i4)), this.sign); return new c2(w2(r4, i4), this.sign); }; c2.prototype.plus = c2.prototype.add; l2.prototype.add = function(t4) { var e4 = st2(t4); var r4 = this.value; if (r4 < 0 !== e4.sign) return this.subtract(e4.negate()); var i4 = e4.value; if (e4.isSmall) { if (h2(r4 + i4)) return new l2(r4 + i4); i4 = d2(Math.abs(i4)); } return new c2(S2(i4, Math.abs(r4)), r4 < 0); }; l2.prototype.plus = l2.prototype.add; f2.prototype.add = function(t4) { return new f2(this.value + st2(t4).value); }; f2.prototype.plus = f2.prototype.add; function _2(t4, r4) { var i4 = t4.length, n22 = r4.length, s22 = new Array(i4), a22 = 0, o22 = e3, u22, c22; for (u22 = 0; u22 < n22; u22++) { c22 = t4[u22] - a22 - r4[u22]; if (c22 < 0) { c22 += o22; a22 = 1; } else a22 = 0; s22[u22] = c22; } for (u22 = n22; u22 < i4; u22++) { c22 = t4[u22] - a22; if (c22 < 0) c22 += o22; else { s22[u22++] = c22; break; } s22[u22] = c22; } for (; u22 < i4; u22++) s22[u22] = t4[u22]; p2(s22); return s22; } function b2(t4, e4, r4) { var i4; if (N2(t4, e4) >= 0) i4 = _2(t4, e4); else { i4 = _2(e4, t4); r4 = !r4; } i4 = v2(i4); if ("number" === typeof i4) { if (r4) i4 = -i4; return new l2(i4); } return new c2(i4, r4); } function E2(t4, r4, i4) { var n22 = t4.length, s22 = new Array(n22), a22 = -r4, o22 = e3, u22, f22; for (u22 = 0; u22 < n22; u22++) { f22 = t4[u22] + a22; a22 = Math.floor(f22 / o22); f22 %= o22; s22[u22] = f22 < 0 ? f22 + o22 : f22; } s22 = v2(s22); if ("number" === typeof s22) { if (i4) s22 = -s22; return new l2(s22); } return new c2(s22, i4); } c2.prototype.subtract = function(t4) { var e4 = st2(t4); if (this.sign !== e4.sign) return this.add(e4.negate()); var r4 = this.value, i4 = e4.value; if (e4.isSmall) return E2(r4, Math.abs(i4), this.sign); return b2(r4, i4, this.sign); }; c2.prototype.minus = c2.prototype.subtract; l2.prototype.subtract = function(t4) { var e4 = st2(t4); var r4 = this.value; if (r4 < 0 !== e4.sign) return this.add(e4.negate()); var i4 = e4.value; if (e4.isSmall) return new l2(r4 - i4); return E2(i4, Math.abs(r4), r4 >= 0); }; l2.prototype.minus = l2.prototype.subtract; f2.prototype.subtract = function(t4) { return new f2(this.value - st2(t4).value); }; f2.prototype.minus = f2.prototype.subtract; c2.prototype.negate = function() { return new c2(this.value, !this.sign); }; l2.prototype.negate = function() { var t4 = this.sign; var e4 = new l2(-this.value); e4.sign = !t4; return e4; }; f2.prototype.negate = function() { return new f2(-this.value); }; c2.prototype.abs = function() { return new c2(this.value, false); }; l2.prototype.abs = function() { return new l2(Math.abs(this.value)); }; f2.prototype.abs = function() { return new f2(this.value >= 0 ? this.value : -this.value); }; function D2(t4, r4) { var i4 = t4.length, n22 = r4.length, s22 = i4 + n22, a22 = g2(s22), o22 = e3, u22, c22, l22, f22, h22; for (l22 = 0; l22 < i4; ++l22) { f22 = t4[l22]; for (var d22 = 0; d22 < n22; ++d22) { h22 = r4[d22]; u22 = f22 * h22 + a22[l22 + d22]; c22 = Math.floor(u22 / o22); a22[l22 + d22] = u22 - c22 * o22; a22[l22 + d22 + 1] += c22; } } p2(a22); return a22; } function M2(t4, r4) { var i4 = t4.length, n22 = new Array(i4), s22 = e3, a22 = 0, o22, u22; for (u22 = 0; u22 < i4; u22++) { o22 = t4[u22] * r4 + a22; a22 = Math.floor(o22 / s22); n22[u22] = o22 - a22 * s22; } while (a22 > 0) { n22[u22++] = a22 % s22; a22 = Math.floor(a22 / s22); } return n22; } function T2(t4, e4) { var r4 = []; while (e4-- > 0) r4.push(0); return r4.concat(t4); } function I2(t4, e4) { var r4 = Math.max(t4.length, e4.length); if (r4 <= 30) return D2(t4, e4); r4 = Math.ceil(r4 / 2); var i4 = t4.slice(r4), n22 = t4.slice(0, r4), s22 = e4.slice(r4), a22 = e4.slice(0, r4); var o22 = I2(n22, a22), u22 = I2(i4, s22), c22 = I2(w2(n22, i4), w2(a22, s22)); var l22 = w2(w2(o22, T2(_2(_2(c22, o22), u22), r4)), T2(u22, 2 * r4)); p2(l22); return l22; } function A2(t4, e4) { return -0.012 * t4 - 0.012 * e4 + 15e-6 * t4 * e4 > 0; } c2.prototype.multiply = function(t4) { var r4 = st2(t4), i4 = this.value, n22 = r4.value, s22 = this.sign !== r4.sign, a22; if (r4.isSmall) { if (0 === n22) return u2[0]; if (1 === n22) return this; if (-1 === n22) return this.negate(); a22 = Math.abs(n22); if (a22 < e3) return new c2(M2(i4, a22), s22); n22 = d2(a22); } if (A2(i4.length, n22.length)) return new c2(I2(i4, n22), s22); return new c2(D2(i4, n22), s22); }; c2.prototype.times = c2.prototype.multiply; function x(t4, r4, i4) { if (t4 < e3) return new c2(M2(r4, t4), i4); return new c2(D2(r4, d2(t4)), i4); } l2.prototype._multiplyBySmall = function(t4) { if (h2(t4.value * this.value)) return new l2(t4.value * this.value); return x(Math.abs(t4.value), d2(Math.abs(this.value)), this.sign !== t4.sign); }; c2.prototype._multiplyBySmall = function(t4) { if (0 === t4.value) return u2[0]; if (1 === t4.value) return this; if (-1 === t4.value) return this.negate(); return x(Math.abs(t4.value), this.value, this.sign !== t4.sign); }; l2.prototype.multiply = function(t4) { return st2(t4)._multiplyBySmall(this); }; l2.prototype.times = l2.prototype.multiply; f2.prototype.multiply = function(t4) { return new f2(this.value * st2(t4).value); }; f2.prototype.times = f2.prototype.multiply; function R2(t4) { var r4 = t4.length, i4 = g2(r4 + r4), n22 = e3, s22, a22, o22, u22, c22; for (o22 = 0; o22 < r4; o22++) { u22 = t4[o22]; a22 = 0 - u22 * u22; for (var l22 = o22; l22 < r4; l22++) { c22 = t4[l22]; s22 = 2 * (u22 * c22) + i4[o22 + l22] + a22; a22 = Math.floor(s22 / n22); i4[o22 + l22] = s22 - a22 * n22; } i4[o22 + r4] = a22; } p2(i4); return i4; } c2.prototype.square = function() { return new c2(R2(this.value), false); }; l2.prototype.square = function() { var t4 = this.value * this.value; if (h2(t4)) return new l2(t4); return new c2(R2(d2(Math.abs(this.value))), false); }; f2.prototype.square = function(t4) { return new f2(this.value * this.value); }; function B2(t4, r4) { var i4 = t4.length, n22 = r4.length, s22 = e3, a22 = g2(r4.length), o22 = r4[n22 - 1], u22 = Math.ceil(s22 / (2 * o22)), c22 = M2(t4, u22), l22 = M2(r4, u22), f22, h22, d22, p22, y22, m22, w22; if (c22.length <= i4) c22.push(0); l22.push(0); o22 = l22[n22 - 1]; for (h22 = i4 - n22; h22 >= 0; h22--) { f22 = s22 - 1; if (c22[h22 + n22] !== o22) f22 = Math.floor((c22[h22 + n22] * s22 + c22[h22 + n22 - 1]) / o22); d22 = 0; p22 = 0; m22 = l22.length; for (y22 = 0; y22 < m22; y22++) { d22 += f22 * l22[y22]; w22 = Math.floor(d22 / s22); p22 += c22[h22 + y22] - (d22 - w22 * s22); d22 = w22; if (p22 < 0) { c22[h22 + y22] = p22 + s22; p22 = -1; } else { c22[h22 + y22] = p22; p22 = 0; } } while (0 !== p22) { f22 -= 1; d22 = 0; for (y22 = 0; y22 < m22; y22++) { d22 += c22[h22 + y22] - s22 + l22[y22]; if (d22 < 0) { c22[h22 + y22] = d22 + s22; d22 = 0; } else { c22[h22 + y22] = d22; d22 = 1; } } p22 += d22; } a22[h22] = f22; } c22 = k(c22, u22)[0]; return [v2(a22), v2(c22)]; } function O2(t4, r4) { var i4 = t4.length, n22 = r4.length, s22 = [], a22 = [], o22 = e3, u22, c22, l22, f22, h22; while (i4) { a22.unshift(t4[--i4]); p2(a22); if (N2(a22, r4) < 0) { s22.push(0); continue; } c22 = a22.length; l22 = a22[c22 - 1] * o22 + a22[c22 - 2]; f22 = r4[n22 - 1] * o22 + r4[n22 - 2]; if (c22 > n22) l22 = (l22 + 1) * o22; u22 = Math.ceil(l22 / f22); do { h22 = M2(r4, u22); if (N2(h22, a22) <= 0) break; u22--; } while (u22); s22.push(u22); a22 = _2(a22, h22); } s22.reverse(); return [v2(s22), v2(a22)]; } function k(t4, r4) { var i4 = t4.length, n22 = g2(i4), s22 = e3, a22, o22, u22, c22; u22 = 0; for (a22 = i4 - 1; a22 >= 0; --a22) { c22 = u22 * s22 + t4[a22]; o22 = y2(c22 / r4); u22 = c22 - o22 * r4; n22[a22] = 0 | o22; } return [n22, 0 | u22]; } function C2(t4, r4) { var i4, n22 = st2(r4); if (o2) return [new f2(t4.value / n22.value), new f2(t4.value % n22.value)]; var s22 = t4.value, a22 = n22.value; var h22; if (0 === a22) throw new Error("Cannot divide by zero"); if (t4.isSmall) { if (n22.isSmall) return [new l2(y2(s22 / a22)), new l2(s22 % a22)]; return [u2[0], t4]; } if (n22.isSmall) { if (1 === a22) return [t4, u2[0]]; if (-1 == a22) return [t4.negate(), u2[0]]; var p22 = Math.abs(a22); if (p22 < e3) { i4 = k(s22, p22); h22 = v2(i4[0]); var g22 = i4[1]; if (t4.sign) g22 = -g22; if ("number" === typeof h22) { if (t4.sign !== n22.sign) h22 = -h22; return [new l2(h22), new l2(g22)]; } return [new c2(h22, t4.sign !== n22.sign), new l2(g22)]; } a22 = d2(p22); } var m22 = N2(s22, a22); if (-1 === m22) return [u2[0], t4]; if (0 === m22) return [u2[t4.sign === n22.sign ? 1 : -1], u2[0]]; if (s22.length + a22.length <= 200) i4 = B2(s22, a22); else i4 = O2(s22, a22); h22 = i4[0]; var w22 = t4.sign !== n22.sign, S22 = i4[1], _22 = t4.sign; if ("number" === typeof h22) { if (w22) h22 = -h22; h22 = new l2(h22); } else h22 = new c2(h22, w22); if ("number" === typeof S22) { if (_22) S22 = -S22; S22 = new l2(S22); } else S22 = new c2(S22, _22); return [h22, S22]; } c2.prototype.divmod = function(t4) { var e4 = C2(this, t4); return { quotient: e4[0], remainder: e4[1] }; }; f2.prototype.divmod = l2.prototype.divmod = c2.prototype.divmod; c2.prototype.divide = function(t4) { return C2(this, t4)[0]; }; f2.prototype.over = f2.prototype.divide = function(t4) { return new f2(this.value / st2(t4).value); }; l2.prototype.over = l2.prototype.divide = c2.prototype.over = c2.prototype.divide; c2.prototype.mod = function(t4) { return C2(this, t4)[1]; }; f2.prototype.mod = f2.prototype.remainder = function(t4) { return new f2(this.value % st2(t4).value); }; l2.prototype.remainder = l2.prototype.mod = c2.prototype.remainder = c2.prototype.mod; c2.prototype.pow = function(t4) { var e4 = st2(t4), r4 = this.value, i4 = e4.value, n22, s22, a22; if (0 === i4) return u2[1]; if (0 === r4) return u2[0]; if (1 === r4) return u2[1]; if (-1 === r4) return e4.isEven() ? u2[1] : u2[-1]; if (e4.sign) return u2[0]; if (!e4.isSmall) throw new Error("The exponent " + e4.toString() + " is too large."); if (this.isSmall) { if (h2(n22 = Math.pow(r4, i4))) return new l2(y2(n22)); } s22 = this; a22 = u2[1]; while (true) { if (i4 & true) { a22 = a22.times(s22); --i4; } if (0 === i4) break; i4 /= 2; s22 = s22.square(); } return a22; }; l2.prototype.pow = c2.prototype.pow; f2.prototype.pow = function(t4) { var e4 = st2(t4); var r4 = this.value, i4 = e4.value; var n22 = BigInt(0), s22 = BigInt(1), a22 = BigInt(2); if (i4 === n22) return u2[1]; if (r4 === n22) return u2[0]; if (r4 === s22) return u2[1]; if (r4 === BigInt(-1)) return e4.isEven() ? u2[1] : u2[-1]; if (e4.isNegative()) return new f2(n22); var o22 = this; var c22 = u2[1]; while (true) { if ((i4 & s22) === s22) { c22 = c22.times(o22); --i4; } if (i4 === n22) break; i4 /= a22; o22 = o22.square(); } return c22; }; c2.prototype.modPow = function(t4, e4) { t4 = st2(t4); e4 = st2(e4); if (e4.isZero()) throw new Error("Cannot take modPow with modulus 0"); var r4 = u2[1], i4 = this.mod(e4); if (t4.isNegative()) { t4 = t4.multiply(u2[-1]); i4 = i4.modInv(e4); } while (t4.isPositive()) { if (i4.isZero()) return u2[0]; if (t4.isOdd()) r4 = r4.multiply(i4).mod(e4); t4 = t4.divide(2); i4 = i4.square().mod(e4); } return r4; }; f2.prototype.modPow = l2.prototype.modPow = c2.prototype.modPow; function N2(t4, e4) { if (t4.length !== e4.length) return t4.length > e4.length ? 1 : -1; for (var r4 = t4.length - 1; r4 >= 0; r4--) if (t4[r4] !== e4[r4]) return t4[r4] > e4[r4] ? 1 : -1; return 0; } c2.prototype.compareAbs = function(t4) { var e4 = st2(t4), r4 = this.value, i4 = e4.value; if (e4.isSmall) return 1; return N2(r4, i4); }; l2.prototype.compareAbs = function(t4) { var e4 = st2(t4), r4 = Math.abs(this.value), i4 = e4.value; if (e4.isSmall) { i4 = Math.abs(i4); return r4 === i4 ? 0 : r4 > i4 ? 1 : -1; } return -1; }; f2.prototype.compareAbs = function(t4) { var e4 = this.value; var r4 = st2(t4).value; e4 = e4 >= 0 ? e4 : -e4; r4 = r4 >= 0 ? r4 : -r4; return e4 === r4 ? 0 : e4 > r4 ? 1 : -1; }; c2.prototype.compare = function(t4) { if (t4 === 1 / 0) return -1; if (t4 === -1 / 0) return 1; var e4 = st2(t4), r4 = this.value, i4 = e4.value; if (this.sign !== e4.sign) return e4.sign ? 1 : -1; if (e4.isSmall) return this.sign ? -1 : 1; return N2(r4, i4) * (this.sign ? -1 : 1); }; c2.prototype.compareTo = c2.prototype.compare; l2.prototype.compare = function(t4) { if (t4 === 1 / 0) return -1; if (t4 === -1 / 0) return 1; var e4 = st2(t4), r4 = this.value, i4 = e4.value; if (e4.isSmall) return r4 == i4 ? 0 : r4 > i4 ? 1 : -1; if (r4 < 0 !== e4.sign) return r4 < 0 ? -1 : 1; return r4 < 0 ? 1 : -1; }; l2.prototype.compareTo = l2.prototype.compare; f2.prototype.compare = function(t4) { if (t4 === 1 / 0) return -1; if (t4 === -1 / 0) return 1; var e4 = this.value; var r4 = st2(t4).value; return e4 === r4 ? 0 : e4 > r4 ? 1 : -1; }; f2.prototype.compareTo = f2.prototype.compare; c2.prototype.equals = function(t4) { return 0 === this.compare(t4); }; f2.prototype.eq = f2.prototype.equals = l2.prototype.eq = l2.prototype.equals = c2.prototype.eq = c2.prototype.equals; c2.prototype.notEquals = function(t4) { return 0 !== this.compare(t4); }; f2.prototype.neq = f2.prototype.notEquals = l2.prototype.neq = l2.prototype.notEquals = c2.prototype.neq = c2.prototype.notEquals; c2.prototype.greater = function(t4) { return this.compare(t4) > 0; }; f2.prototype.gt = f2.prototype.greater = l2.prototype.gt = l2.prototype.greater = c2.prototype.gt = c2.prototype.greater; c2.prototype.lesser = function(t4) { return this.compare(t4) < 0; }; f2.prototype.lt = f2.prototype.lesser = l2.prototype.lt = l2.prototype.lesser = c2.prototype.lt = c2.prototype.lesser; c2.prototype.greaterOrEquals = function(t4) { return this.compare(t4) >= 0; }; f2.prototype.geq = f2.prototype.greaterOrEquals = l2.prototype.geq = l2.prototype.greaterOrEquals = c2.prototype.geq = c2.prototype.greaterOrEquals; c2.prototype.lesserOrEquals = function(t4) { return this.compare(t4) <= 0; }; f2.prototype.leq = f2.prototype.lesserOrEquals = l2.prototype.leq = l2.prototype.lesserOrEquals = c2.prototype.leq = c2.prototype.lesserOrEquals; c2.prototype.isEven = function() { return 0 === (1 & this.value[0]); }; l2.prototype.isEven = function() { return 0 === (1 & this.value); }; f2.prototype.isEven = function() { return (this.value & BigInt(1)) === BigInt(0); }; c2.prototype.isOdd = function() { return 1 === (1 & this.value[0]); }; l2.prototype.isOdd = function() { return 1 === (1 & this.value); }; f2.prototype.isOdd = function() { return (this.value & BigInt(1)) === BigInt(1); }; c2.prototype.isPositive = function() { return !this.sign; }; l2.prototype.isPositive = function() { return this.value > 0; }; f2.prototype.isPositive = l2.prototype.isPositive; c2.prototype.isNegative = function() { return this.sign; }; l2.prototype.isNegative = function() { return this.value < 0; }; f2.prototype.isNegative = l2.prototype.isNegative; c2.prototype.isUnit = function() { return false; }; l2.prototype.isUnit = function() { return 1 === Math.abs(this.value); }; f2.prototype.isUnit = function() { return this.abs().value === BigInt(1); }; c2.prototype.isZero = function() { return false; }; l2.prototype.isZero = function() { return 0 === this.value; }; f2.prototype.isZero = function() { return this.value === BigInt(0); }; c2.prototype.isDivisibleBy = function(t4) { var e4 = st2(t4); if (e4.isZero()) return false; if (e4.isUnit()) return true; if (0 === e4.compareAbs(2)) return this.isEven(); return this.mod(e4).isZero(); }; f2.prototype.isDivisibleBy = l2.prototype.isDivisibleBy = c2.prototype.isDivisibleBy; function P2(t4) { var e4 = t4.abs(); if (e4.isUnit()) return false; if (e4.equals(2) || e4.equals(3) || e4.equals(5)) return true; if (e4.isEven() || e4.isDivisibleBy(3) || e4.isDivisibleBy(5)) return false; if (e4.lesser(49)) return true; } function V2(t4, e4) { var r4 = t4.prev(), i4 = r4, s22 = 0, a22, u22, c22; while (i4.isEven()) i4 = i4.divide(2), s22++; t: for (u22 = 0; u22 < e4.length; u22++) { if (t4.lesser(e4[u22])) continue; c22 = n2(e4[u22]).modPow(i4, t4); if (c22.isUnit() || c22.equals(r4)) continue; for (a22 = s22 - 1; 0 != a22; a22--) { c22 = c22.square().mod(t4); if (c22.isUnit()) return false; if (c22.equals(r4)) continue t; } return false; } return true; } c2.prototype.isPrime = function(e4) { var r4 = P2(this); if (r4 !== t3) return r4; var i4 = this.abs(); var s22 = i4.bitLength(); if (s22 <= 64) return V2(i4, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]); var a22 = Math.log(2) * s22.toJSNumber(); var o22 = Math.ceil(true === e4 ? 2 * Math.pow(a22, 2) : a22); for (var u22 = [], c22 = 0; c22 < o22; c22++) u22.push(n2(c22 + 2)); return V2(i4, u22); }; f2.prototype.isPrime = l2.prototype.isPrime = c2.prototype.isPrime; c2.prototype.isProbablePrime = function(e4, r4) { var i4 = P2(this); if (i4 !== t3) return i4; var s22 = this.abs(); var a22 = e4 === t3 ? 5 : e4; for (var o22 = [], u22 = 0; u22 < a22; u22++) o22.push(n2.randBetween(2, s22.minus(2), r4)); return V2(s22, o22); }; f2.prototype.isProbablePrime = l2.prototype.isProbablePrime = c2.prototype.isProbablePrime; c2.prototype.modInv = function(t4) { var e4 = n2.zero, r4 = n2.one, i4 = st2(t4), s22 = this.abs(), a22, o22, u22; while (!s22.isZero()) { a22 = i4.divide(s22); o22 = e4; u22 = i4; e4 = r4; i4 = s22; r4 = o22.subtract(a22.multiply(r4)); s22 = u22.subtract(a22.multiply(s22)); } if (!i4.isUnit()) throw new Error(this.toString() + " and " + t4.toString() + " are not co-prime"); if (-1 === e4.compare(0)) e4 = e4.add(t4); if (this.isNegative()) return e4.negate(); return e4; }; f2.prototype.modInv = l2.prototype.modInv = c2.prototype.modInv; c2.prototype.next = function() { var t4 = this.value; if (this.sign) return E2(t4, 1, this.sign); return new c2(S2(t4, 1), this.sign); }; l2.prototype.next = function() { var t4 = this.value; if (t4 + 1 < i3) return new l2(t4 + 1); return new c2(s2, false); }; f2.prototype.next = function() { return new f2(this.value + BigInt(1)); }; c2.prototype.prev = function() { var t4 = this.value; if (this.sign) return new c2(S2(t4, 1), true); return E2(t4, 1, this.sign); }; l2.prototype.prev = function() { var t4 = this.value; if (t4 - 1 > -i3) return new l2(t4 - 1); return new c2(s2, true); }; f2.prototype.prev = function() { return new f2(this.value - BigInt(1)); }; var L2 = [1]; while (2 * L2[L2.length - 1] <= e3) L2.push(2 * L2[L2.length - 1]); var H2 = L2.length, U2 = L2[H2 - 1]; function K2(t4) { return Math.abs(t4) <= e3; } c2.prototype.shiftLeft = function(t4) { var e4 = st2(t4).toJSNumber(); if (!K2(e4)) throw new Error(String(e4) + " is too large for shifting."); if (e4 < 0) return this.shiftRight(-e4); var r4 = this; if (r4.isZero()) return r4; while (e4 >= H2) { r4 = r4.multiply(U2); e4 -= H2 - 1; } return r4.multiply(L2[e4]); }; f2.prototype.shiftLeft = l2.prototype.shiftLeft = c2.prototype.shiftLeft; c2.prototype.shiftRight = function(t4) { var e4; var r4 = st2(t4).toJSNumber(); if (!K2(r4)) throw new Error(String(r4) + " is too large for shifting."); if (r4 < 0) return this.shiftLeft(-r4); var i4 = this; while (r4 >= H2) { if (i4.isZero() || i4.isNegative() && i4.isUnit()) return i4; e4 = C2(i4, U2); i4 = e4[1].isNegative() ? e4[0].prev() : e4[0]; r4 -= H2 - 1; } e4 = C2(i4, L2[r4]); return e4[1].isNegative() ? e4[0].prev() : e4[0]; }; f2.prototype.shiftRight = l2.prototype.shiftRight = c2.prototype.shiftRight; function j2(t4, e4, r4) { e4 = st2(e4); var i4 = t4.isNegative(), s22 = e4.isNegative(); var a22 = i4 ? t4.not() : t4, o22 = s22 ? e4.not() : e4; var u22 = 0, c22 = 0; var l22 = null, f22 = null; var h22 = []; while (!a22.isZero() || !o22.isZero()) { l22 = C2(a22, U2); u22 = l22[1].toJSNumber(); if (i4) u22 = U2 - 1 - u22; f22 = C2(o22, U2); c22 = f22[1].toJSNumber(); if (s22) c22 = U2 - 1 - c22; a22 = l22[0]; o22 = f22[0]; h22.push(r4(u22, c22)); } var d22 = 0 !== r4(i4 ? 1 : 0, s22 ? 1 : 0) ? n2(-1) : n2(0); for (var v22 = h22.length - 1; v22 >= 0; v22 -= 1) d22 = d22.multiply(U2).add(n2(h22[v22])); return d22; } c2.prototype.not = function() { return this.negate().prev(); }; f2.prototype.not = l2.prototype.not = c2.prototype.not; c2.prototype.and = function(t4) { return j2(this, t4, function(t5, e4) { return t5 & e4; }); }; f2.prototype.and = l2.prototype.and = c2.prototype.and; c2.prototype.or = function(t4) { return j2(this, t4, function(t5, e4) { return t5 | e4; }); }; f2.prototype.or = l2.prototype.or = c2.prototype.or; c2.prototype.xor = function(t4) { return j2(this, t4, function(t5, e4) { return t5 ^ e4; }); }; f2.prototype.xor = l2.prototype.xor = c2.prototype.xor; var q2 = 1 << 30, F2 = (e3 & -e3) * (e3 & -e3) | q2; function z2(t4) { var r4 = t4.value, i4 = "number" === typeof r4 ? r4 | q2 : "bigint" === typeof r4 ? r4 | BigInt(q2) : r4[0] + r4[1] * e3 | F2; return i4 & -i4; } function G2(t4, e4) { if (e4.compareTo(t4) <= 0) { var r4 = G2(t4, e4.square(e4)); var i4 = r4.p; var s22 = r4.e; var a22 = i4.multiply(e4); return a22.compareTo(t4) <= 0 ? { p: a22, e: 2 * s22 + 1 } : { p: i4, e: 2 * s22 }; } return { p: n2(1), e: 0 }; } c2.prototype.bitLength = function() { var t4 = this; if (t4.compareTo(n2(0)) < 0) t4 = t4.negate().subtract(n2(1)); if (0 === t4.compareTo(n2(0))) return n2(0); return n2(G2(t4, n2(2)).e).add(n2(1)); }; f2.prototype.bitLength = l2.prototype.bitLength = c2.prototype.bitLength; function Y2(t4, e4) { t4 = st2(t4); e4 = st2(e4); return t4.greater(e4) ? t4 : e4; } function W2(t4, e4) { t4 = st2(t4); e4 = st2(e4); return t4.lesser(e4) ? t4 : e4; } function J2(t4, e4) { t4 = st2(t4).abs(); e4 = st2(e4).abs(); if (t4.equals(e4)) return t4; if (t4.isZero()) return e4; if (e4.isZero()) return t4; var r4 = u2[1], i4, n22; while (t4.isEven() && e4.isEven()) { i4 = W2(z2(t4), z2(e4)); t4 = t4.divide(i4); e4 = e4.divide(i4); r4 = r4.multiply(i4); } while (t4.isEven()) t4 = t4.divide(z2(t4)); do { while (e4.isEven()) e4 = e4.divide(z2(e4)); if (t4.greater(e4)) { n22 = e4; e4 = t4; t4 = n22; } e4 = e4.subtract(t4); } while (!e4.isZero()); return r4.isUnit() ? t4 : t4.multiply(r4); } function Z2(t4, e4) { t4 = st2(t4).abs(); e4 = st2(e4).abs(); return t4.divide(J2(t4, e4)).multiply(e4); } function $2(t4, r4, i4) { t4 = st2(t4); r4 = st2(r4); var n22 = i4 || Math.random; var s22 = W2(t4, r4), a22 = Y2(t4, r4); var o22 = a22.subtract(s22).add(1); if (o22.isSmall) return s22.add(Math.floor(n22() * o22)); var c22 = et2(o22, e3).value; var l22 = [], f22 = true; for (var h22 = 0; h22 < c22.length; h22++) { var d22 = f22 ? c22[h22] + (h22 + 1 < c22.length ? c22[h22 + 1] / e3 : 0) : e3; var v22 = y2(n22() * d22); l22.push(v22); if (v22 < c22[h22]) f22 = false; } return s22.add(u2.fromArray(l22, e3, false)); } var X2 = function(t4, e4, r4, i4) { r4 = r4 || a2; t4 = String(t4); if (!i4) { t4 = t4.toLowerCase(); r4 = r4.toLowerCase(); } var n22 = t4.length; var s22; var o22 = Math.abs(e4); var u22 = {}; for (s22 = 0; s22 < r4.length; s22++) u22[r4[s22]] = s22; for (s22 = 0; s22 < n22; s22++) { var c22 = t4[s22]; if ("-" === c22) continue; if (c22 in u22) { if (u22[c22] >= o22) { if ("1" === c22 && 1 === o22) continue; throw new Error(c22 + " is not a valid digit in base " + e4 + "."); } } } e4 = st2(e4); var l22 = []; var f22 = "-" === t4[0]; for (s22 = f22 ? 1 : 0; s22 < t4.length; s22++) { var c22 = t4[s22]; if (c22 in u22) l22.push(st2(u22[c22])); else if ("<" === c22) { var h22 = s22; do { s22++; } while (">" !== t4[s22] && s22 < t4.length); l22.push(st2(t4.slice(h22 + 1, s22))); } else throw new Error(c22 + " is not a valid character"); } return Q2(l22, e4, f22); }; function Q2(t4, e4, r4) { var i4 = u2[0], n22 = u2[1], s22; for (s22 = t4.length - 1; s22 >= 0; s22--) { i4 = i4.add(t4[s22].times(n22)); n22 = n22.times(e4); } return r4 ? i4.negate() : i4; } function tt2(t4, e4) { e4 = e4 || a2; if (t4 < e4.length) return e4[t4]; return "<" + t4 + ">"; } function et2(t4, e4) { e4 = n2(e4); if (e4.isZero()) { if (t4.isZero()) return { value: [0], isNegative: false }; throw new Error("Cannot convert nonzero numbers to base 0."); } if (e4.equals(-1)) { if (t4.isZero()) return { value: [0], isNegative: false }; if (t4.isNegative()) return { value: [].concat.apply([], Array.apply(null, Array(-t4.toJSNumber())).map(Array.prototype.valueOf, [1, 0])), isNegative: false }; var r4 = Array.apply(null, Array(t4.toJSNumber() - 1)).map(Array.prototype.valueOf, [0, 1]); r4.unshift([1]); return { value: [].concat.apply([], r4), isNegative: false }; } var i4 = false; if (t4.isNegative() && e4.isPositive()) { i4 = true; t4 = t4.abs(); } if (e4.isUnit()) { if (t4.isZero()) return { value: [0], isNegative: false }; return { value: Array.apply(null, Array(t4.toJSNumber())).map(Number.prototype.valueOf, 1), isNegative: i4 }; } var s22 = []; var a22 = t4, o22; while (a22.isNegative() || a22.compareAbs(e4) >= 0) { o22 = a22.divmod(e4); a22 = o22.quotient; var u22 = o22.remainder; if (u22.isNegative()) { u22 = e4.minus(u22).abs(); a22 = a22.next(); } s22.push(u22.toJSNumber()); } s22.push(a22.toJSNumber()); return { value: s22.reverse(), isNegative: i4 }; } function rt2(t4, e4, r4) { var i4 = et2(t4, e4); return (i4.isNegative ? "-" : "") + i4.value.map(function(t5) { return tt2(t5, r4); }).join(""); } c2.prototype.toArray = function(t4) { return et2(this, t4); }; l2.prototype.toArray = function(t4) { return et2(this, t4); }; f2.prototype.toArray = function(t4) { return et2(this, t4); }; c2.prototype.toString = function(e4, r4) { if (e4 === t3) e4 = 10; if (10 !== e4) return rt2(this, e4, r4); var i4 = this.value, n22 = i4.length, s22 = String(i4[--n22]), a22 = "0000000", o22; while (--n22 >= 0) { o22 = String(i4[n22]); s22 += a22.slice(o22.length) + o22; } var u22 = this.sign ? "-" : ""; return u22 + s22; }; l2.prototype.toString = function(e4, r4) { if (e4 === t3) e4 = 10; if (10 != e4) return rt2(this, e4, r4); return String(this.value); }; f2.prototype.toString = l2.prototype.toString; f2.prototype.toJSON = c2.prototype.toJSON = l2.prototype.toJSON = function() { return this.toString(); }; c2.prototype.valueOf = function() { return parseInt(this.toString(), 10); }; c2.prototype.toJSNumber = c2.prototype.valueOf; l2.prototype.valueOf = function() { return this.value; }; l2.prototype.toJSNumber = l2.prototype.valueOf; f2.prototype.valueOf = f2.prototype.toJSNumber = function() { return parseInt(this.toString(), 10); }; function it2(t4) { if (h2(+t4)) { var e4 = +t4; if (e4 === y2(e4)) return o2 ? new f2(BigInt(e4)) : new l2(e4); throw new Error("Invalid integer: " + t4); } var i4 = "-" === t4[0]; if (i4) t4 = t4.slice(1); var n22 = t4.split(/e/i); if (n22.length > 2) throw new Error("Invalid integer: " + n22.join("e")); if (2 === n22.length) { var s22 = n22[1]; if ("+" === s22[0]) s22 = s22.slice(1); s22 = +s22; if (s22 !== y2(s22) || !h2(s22)) throw new Error("Invalid integer: " + s22 + " is not a valid exponent."); var a22 = n22[0]; var u22 = a22.indexOf("."); if (u22 >= 0) { s22 -= a22.length - u22 - 1; a22 = a22.slice(0, u22) + a22.slice(u22 + 1); } if (s22 < 0) throw new Error("Cannot include negative exponent part for integers"); a22 += new Array(s22 + 1).join("0"); t4 = a22; } var d22 = /^([0-9][0-9]*)$/.test(t4); if (!d22) throw new Error("Invalid integer: " + t4); if (o2) return new f2(BigInt(i4 ? "-" + t4 : t4)); var v22 = [], g22 = t4.length, m22 = r3, w22 = g22 - m22; while (g22 > 0) { v22.push(+t4.slice(w22, g22)); w22 -= m22; if (w22 < 0) w22 = 0; g22 -= m22; } p2(v22); return new c2(v22, i4); } function nt2(t4) { if (o2) return new f2(BigInt(t4)); if (h2(t4)) { if (t4 !== y2(t4)) throw new Error(t4 + " is not an integer."); return new l2(t4); } return it2(t4.toString()); } function st2(t4) { if ("number" === typeof t4) return nt2(t4); if ("string" === typeof t4) return it2(t4); if ("bigint" === typeof t4) return new f2(t4); return t4; } for (var at2 = 0; at2 < 1e3; at2++) { u2[at2] = st2(at2); if (at2 > 0) u2[-at2] = st2(-at2); } u2.one = u2[1]; u2.zero = u2[0]; u2.minusOne = u2[-1]; u2.max = Y2; u2.min = W2; u2.gcd = J2; u2.lcm = Z2; u2.isInstance = function(t4) { return t4 instanceof c2 || t4 instanceof l2 || t4 instanceof f2; }; u2.randBetween = $2; u2.fromArray = function(t4, e4, r4) { return Q2(t4.map(st2), st2(e4 || 10), r4); }; return u2; }(); if (t22.hasOwnProperty("exports")) t22.exports = n2; i22 = (function() { return n2; }).call(e22, r22, e22, t22), void 0 !== i22 && (t22.exports = i22); }, 452: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(8269), r22(8214), r22(888), r22(5109)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.BlockCipher; var n2 = e3.algo; var s2 = []; var a2 = []; var o2 = []; var u2 = []; var c2 = []; var l2 = []; var f2 = []; var h2 = []; var d2 = []; var v2 = []; (function() { var t4 = []; for (var e4 = 0; e4 < 256; e4++) if (e4 < 128) t4[e4] = e4 << 1; else t4[e4] = e4 << 1 ^ 283; var r4 = 0; var i3 = 0; for (var e4 = 0; e4 < 256; e4++) { var n22 = i3 ^ i3 << 1 ^ i3 << 2 ^ i3 << 3 ^ i3 << 4; n22 = n22 >>> 8 ^ 255 & n22 ^ 99; s2[r4] = n22; a2[n22] = r4; var p22 = t4[r4]; var g22 = t4[p22]; var y2 = t4[g22]; var m2 = 257 * t4[n22] ^ 16843008 * n22; o2[r4] = m2 << 24 | m2 >>> 8; u2[r4] = m2 << 16 | m2 >>> 16; c2[r4] = m2 << 8 | m2 >>> 24; l2[r4] = m2; var m2 = 16843009 * y2 ^ 65537 * g22 ^ 257 * p22 ^ 16843008 * r4; f2[n22] = m2 << 24 | m2 >>> 8; h2[n22] = m2 << 16 | m2 >>> 16; d2[n22] = m2 << 8 | m2 >>> 24; v2[n22] = m2; if (!r4) r4 = i3 = 1; else { r4 = p22 ^ t4[t4[t4[y2 ^ p22]]]; i3 ^= t4[t4[i3]]; } } })(); var p2 = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; var g2 = n2.AES = i22.extend({ _doReset: function() { var t4; if (this._nRounds && this._keyPriorReset === this._key) return; var e4 = this._keyPriorReset = this._key; var r4 = e4.words; var i3 = e4.sigBytes / 4; var n22 = this._nRounds = i3 + 6; var a22 = 4 * (n22 + 1); var o22 = this._keySchedule = []; for (var u22 = 0; u22 < a22; u22++) if (u22 < i3) o22[u22] = r4[u22]; else { t4 = o22[u22 - 1]; if (!(u22 % i3)) { t4 = t4 << 8 | t4 >>> 24; t4 = s2[t4 >>> 24] << 24 | s2[t4 >>> 16 & 255] << 16 | s2[t4 >>> 8 & 255] << 8 | s2[255 & t4]; t4 ^= p2[u22 / i3 | 0] << 24; } else if (i3 > 6 && u22 % i3 == 4) t4 = s2[t4 >>> 24] << 24 | s2[t4 >>> 16 & 255] << 16 | s2[t4 >>> 8 & 255] << 8 | s2[255 & t4]; o22[u22] = o22[u22 - i3] ^ t4; } var c22 = this._invKeySchedule = []; for (var l22 = 0; l22 < a22; l22++) { var u22 = a22 - l22; if (l22 % 4) var t4 = o22[u22]; else var t4 = o22[u22 - 4]; if (l22 < 4 || u22 <= 4) c22[l22] = t4; else c22[l22] = f2[s2[t4 >>> 24]] ^ h2[s2[t4 >>> 16 & 255]] ^ d2[s2[t4 >>> 8 & 255]] ^ v2[s2[255 & t4]]; } }, encryptBlock: function(t4, e4) { this._doCryptBlock(t4, e4, this._keySchedule, o2, u2, c2, l2, s2); }, decryptBlock: function(t4, e4) { var r4 = t4[e4 + 1]; t4[e4 + 1] = t4[e4 + 3]; t4[e4 + 3] = r4; this._doCryptBlock(t4, e4, this._invKeySchedule, f2, h2, d2, v2, a2); var r4 = t4[e4 + 1]; t4[e4 + 1] = t4[e4 + 3]; t4[e4 + 3] = r4; }, _doCryptBlock: function(t4, e4, r4, i3, n22, s22, a22, o22) { var u22 = this._nRounds; var c22 = t4[e4] ^ r4[0]; var l22 = t4[e4 + 1] ^ r4[1]; var f22 = t4[e4 + 2] ^ r4[2]; var h22 = t4[e4 + 3] ^ r4[3]; var d22 = 4; for (var v22 = 1; v22 < u22; v22++) { var p22 = i3[c22 >>> 24] ^ n22[l22 >>> 16 & 255] ^ s22[f22 >>> 8 & 255] ^ a22[255 & h22] ^ r4[d22++]; var g22 = i3[l22 >>> 24] ^ n22[f22 >>> 16 & 255] ^ s22[h22 >>> 8 & 255] ^ a22[255 & c22] ^ r4[d22++]; var y2 = i3[f22 >>> 24] ^ n22[h22 >>> 16 & 255] ^ s22[c22 >>> 8 & 255] ^ a22[255 & l22] ^ r4[d22++]; var m2 = i3[h22 >>> 24] ^ n22[c22 >>> 16 & 255] ^ s22[l22 >>> 8 & 255] ^ a22[255 & f22] ^ r4[d22++]; c22 = p22; l22 = g22; f22 = y2; h22 = m2; } var p22 = (o22[c22 >>> 24] << 24 | o22[l22 >>> 16 & 255] << 16 | o22[f22 >>> 8 & 255] << 8 | o22[255 & h22]) ^ r4[d22++]; var g22 = (o22[l22 >>> 24] << 24 | o22[f22 >>> 16 & 255] << 16 | o22[h22 >>> 8 & 255] << 8 | o22[255 & c22]) ^ r4[d22++]; var y2 = (o22[f22 >>> 24] << 24 | o22[h22 >>> 16 & 255] << 16 | o22[c22 >>> 8 & 255] << 8 | o22[255 & l22]) ^ r4[d22++]; var m2 = (o22[h22 >>> 24] << 24 | o22[c22 >>> 16 & 255] << 16 | o22[l22 >>> 8 & 255] << 8 | o22[255 & f22]) ^ r4[d22++]; t4[e4] = p22; t4[e4 + 1] = g22; t4[e4 + 2] = y2; t4[e4 + 3] = m2; }, keySize: 256 / 32 }); e3.AES = i22._createHelper(g2); })(); return t3.AES; }); }, 5109: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(888)); })(this, function(t3) { t3.lib.Cipher || function(e3) { var r3 = t3; var i22 = r3.lib; var n2 = i22.Base; var s2 = i22.WordArray; var a2 = i22.BufferedBlockAlgorithm; var o2 = r3.enc; o2.Utf8; var c2 = o2.Base64; var l2 = r3.algo; var f2 = l2.EvpKDF; var h2 = i22.Cipher = a2.extend({ cfg: n2.extend(), createEncryptor: function(t4, e4) { return this.create(this._ENC_XFORM_MODE, t4, e4); }, createDecryptor: function(t4, e4) { return this.create(this._DEC_XFORM_MODE, t4, e4); }, init: function(t4, e4, r4) { this.cfg = this.cfg.extend(r4); this._xformMode = t4; this._key = e4; this.reset(); }, reset: function() { a2.reset.call(this); this._doReset(); }, process: function(t4) { this._append(t4); return this._process(); }, finalize: function(t4) { if (t4) this._append(t4); var e4 = this._doFinalize(); return e4; }, keySize: 128 / 32, ivSize: 128 / 32, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: /* @__PURE__ */ function() { function t4(t5) { if ("string" == typeof t5) return T2; else return E2; } return function(e4) { return { encrypt: function(r4, i3, n22) { return t4(i3).encrypt(e4, r4, i3, n22); }, decrypt: function(r4, i3, n22) { return t4(i3).decrypt(e4, r4, i3, n22); } }; }; }() }); i22.StreamCipher = h2.extend({ _doFinalize: function() { var t4 = this._process(true); return t4; }, blockSize: 1 }); var v2 = r3.mode = {}; var p2 = i22.BlockCipherMode = n2.extend({ createEncryptor: function(t4, e4) { return this.Encryptor.create(t4, e4); }, createDecryptor: function(t4, e4) { return this.Decryptor.create(t4, e4); }, init: function(t4, e4) { this._cipher = t4; this._iv = e4; } }); var g2 = v2.CBC = function() { var t4 = p2.extend(); t4.Encryptor = t4.extend({ processBlock: function(t5, e4) { var i3 = this._cipher; var n22 = i3.blockSize; r4.call(this, t5, e4, n22); i3.encryptBlock(t5, e4); this._prevBlock = t5.slice(e4, e4 + n22); } }); t4.Decryptor = t4.extend({ processBlock: function(t5, e4) { var i3 = this._cipher; var n22 = i3.blockSize; var s22 = t5.slice(e4, e4 + n22); i3.decryptBlock(t5, e4); r4.call(this, t5, e4, n22); this._prevBlock = s22; } }); function r4(t5, r5, i3) { var n22; var s22 = this._iv; if (s22) { n22 = s22; this._iv = e3; } else n22 = this._prevBlock; for (var a22 = 0; a22 < i3; a22++) t5[r5 + a22] ^= n22[a22]; } return t4; }(); var y2 = r3.pad = {}; var m2 = y2.Pkcs7 = { pad: function(t4, e4) { var r4 = 4 * e4; var i3 = r4 - t4.sigBytes % r4; var n22 = i3 << 24 | i3 << 16 | i3 << 8 | i3; var a22 = []; for (var o22 = 0; o22 < i3; o22 += 4) a22.push(n22); var u2 = s2.create(a22, i3); t4.concat(u2); }, unpad: function(t4) { var e4 = 255 & t4.words[t4.sigBytes - 1 >>> 2]; t4.sigBytes -= e4; } }; i22.BlockCipher = h2.extend({ cfg: h2.cfg.extend({ mode: g2, padding: m2 }), reset: function() { var t4; h2.reset.call(this); var e4 = this.cfg; var r4 = e4.iv; var i3 = e4.mode; if (this._xformMode == this._ENC_XFORM_MODE) t4 = i3.createEncryptor; else { t4 = i3.createDecryptor; this._minBufferSize = 1; } if (this._mode && this._mode.__creator == t4) this._mode.init(this, r4 && r4.words); else { this._mode = t4.call(i3, this, r4 && r4.words); this._mode.__creator = t4; } }, _doProcessBlock: function(t4, e4) { this._mode.processBlock(t4, e4); }, _doFinalize: function() { var t4; var e4 = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { e4.pad(this._data, this.blockSize); t4 = this._process(true); } else { t4 = this._process(true); e4.unpad(t4); } return t4; }, blockSize: 128 / 32 }); var S2 = i22.CipherParams = n2.extend({ init: function(t4) { this.mixIn(t4); }, toString: function(t4) { return (t4 || this.formatter).stringify(this); } }); var _2 = r3.format = {}; var b2 = _2.OpenSSL = { stringify: function(t4) { var e4; var r4 = t4.ciphertext; var i3 = t4.salt; if (i3) e4 = s2.create([1398893684, 1701076831]).concat(i3).concat(r4); else e4 = r4; return e4.toString(c2); }, parse: function(t4) { var e4; var r4 = c2.parse(t4); var i3 = r4.words; if (1398893684 == i3[0] && 1701076831 == i3[1]) { e4 = s2.create(i3.slice(2, 4)); i3.splice(0, 4); r4.sigBytes -= 16; } return S2.create({ ciphertext: r4, salt: e4 }); } }; var E2 = i22.SerializableCipher = n2.extend({ cfg: n2.extend({ format: b2 }), encrypt: function(t4, e4, r4, i3) { i3 = this.cfg.extend(i3); var n22 = t4.createEncryptor(r4, i3); var s22 = n22.finalize(e4); var a22 = n22.cfg; return S2.create({ ciphertext: s22, key: r4, iv: a22.iv, algorithm: t4, mode: a22.mode, padding: a22.padding, blockSize: t4.blockSize, formatter: i3.format }); }, decrypt: function(t4, e4, r4, i3) { i3 = this.cfg.extend(i3); e4 = this._parse(e4, i3.format); var n22 = t4.createDecryptor(r4, i3).finalize(e4.ciphertext); return n22; }, _parse: function(t4, e4) { if ("string" == typeof t4) return e4.parse(t4, this); else return t4; } }); var D2 = r3.kdf = {}; var M2 = D2.OpenSSL = { execute: function(t4, e4, r4, i3) { if (!i3) i3 = s2.random(64 / 8); var n22 = f2.create({ keySize: e4 + r4 }).compute(t4, i3); var a22 = s2.create(n22.words.slice(e4), 4 * r4); n22.sigBytes = 4 * e4; return S2.create({ key: n22, iv: a22, salt: i3 }); } }; var T2 = i22.PasswordBasedCipher = E2.extend({ cfg: E2.cfg.extend({ kdf: M2 }), encrypt: function(t4, e4, r4, i3) { i3 = this.cfg.extend(i3); var n22 = i3.kdf.execute(r4, t4.keySize, t4.ivSize); i3.iv = n22.iv; var s22 = E2.encrypt.call(this, t4, e4, n22.key, i3); s22.mixIn(n22); return s22; }, decrypt: function(t4, e4, r4, i3) { i3 = this.cfg.extend(i3); e4 = this._parse(e4, i3.format); var n22 = i3.kdf.execute(r4, t4.keySize, t4.ivSize, e4.salt); i3.iv = n22.iv; var s22 = E2.decrypt.call(this, t4, e4, n22.key, i3); return s22; } }); }(); }); }, 8249: function(t22, e22, r22) { (function(r3, i22) { t22.exports = i22(); })(this, function() { var t3 = t3 || function(t4, e3) { var i22; if ("undefined" !== typeof window && $inject_window_crypto) i22 = $inject_window_crypto; if ("undefined" !== typeof self && self.crypto) i22 = self.crypto; if ("undefined" !== typeof globalThis && globalThis.crypto) i22 = globalThis.crypto; if (!i22 && "undefined" !== typeof window && window.msCrypto) i22 = window.msCrypto; if (!i22 && "undefined" !== typeof r22.g && r22.g.crypto) i22 = r22.g.crypto; if (!i22 && true) try { i22 = r22(2480); } catch (t5) { } var n2 = function() { if (i22) { if ("function" === typeof i22.getRandomValues) try { return i22.getRandomValues(new Uint32Array(1))[0]; } catch (t5) { } if ("function" === typeof i22.randomBytes) try { return i22.randomBytes(4).readInt32LE(); } catch (t5) { } } throw new Error("Native crypto module could not be used to get secure random number."); }; var s2 = Object.create || /* @__PURE__ */ function() { function t5() { } return function(e4) { var r3; t5.prototype = e4; r3 = new t5(); t5.prototype = null; return r3; }; }(); var a2 = {}; var o2 = a2.lib = {}; var u2 = o2.Base = /* @__PURE__ */ function() { return { extend: function(t5) { var e4 = s2(this); if (t5) e4.mixIn(t5); if (!e4.hasOwnProperty("init") || this.init === e4.init) e4.init = function() { e4.$super.init.apply(this, arguments); }; e4.init.prototype = e4; e4.$super = this; return e4; }, create: function() { var t5 = this.extend(); t5.init.apply(t5, arguments); return t5; }, init: function() { }, mixIn: function(t5) { for (var e4 in t5) if (t5.hasOwnProperty(e4)) this[e4] = t5[e4]; if (t5.hasOwnProperty("toString")) this.toString = t5.toString; }, clone: function() { return this.init.prototype.extend(this); } }; }(); var c2 = o2.WordArray = u2.extend({ init: function(t5, r3) { t5 = this.words = t5 || []; if (r3 != e3) this.sigBytes = r3; else this.sigBytes = 4 * t5.length; }, toString: function(t5) { return (t5 || f2).stringify(this); }, concat: function(t5) { var e4 = this.words; var r3 = t5.words; var i3 = this.sigBytes; var n22 = t5.sigBytes; this.clamp(); if (i3 % 4) for (var s22 = 0; s22 < n22; s22++) { var a22 = r3[s22 >>> 2] >>> 24 - s22 % 4 * 8 & 255; e4[i3 + s22 >>> 2] |= a22 << 24 - (i3 + s22) % 4 * 8; } else for (var o22 = 0; o22 < n22; o22 += 4) e4[i3 + o22 >>> 2] = r3[o22 >>> 2]; this.sigBytes += n22; return this; }, clamp: function() { var e4 = this.words; var r3 = this.sigBytes; e4[r3 >>> 2] &= 4294967295 << 32 - r3 % 4 * 8; e4.length = t4.ceil(r3 / 4); }, clone: function() { var t5 = u2.clone.call(this); t5.words = this.words.slice(0); return t5; }, random: function(t5) { var e4 = []; for (var r3 = 0; r3 < t5; r3 += 4) e4.push(n2()); return new c2.init(e4, t5); } }); var l2 = a2.enc = {}; var f2 = l2.Hex = { stringify: function(t5) { var e4 = t5.words; var r3 = t5.sigBytes; var i3 = []; for (var n22 = 0; n22 < r3; n22++) { var s22 = e4[n22 >>> 2] >>> 24 - n22 % 4 * 8 & 255; i3.push((s22 >>> 4).toString(16)); i3.push((15 & s22).toString(16)); } return i3.join(""); }, parse: function(t5) { var e4 = t5.length; var r3 = []; for (var i3 = 0; i3 < e4; i3 += 2) r3[i3 >>> 3] |= parseInt(t5.substr(i3, 2), 16) << 24 - i3 % 8 * 4; return new c2.init(r3, e4 / 2); } }; var h2 = l2.Latin1 = { stringify: function(t5) { var e4 = t5.words; var r3 = t5.sigBytes; var i3 = []; for (var n22 = 0; n22 < r3; n22++) { var s22 = e4[n22 >>> 2] >>> 24 - n22 % 4 * 8 & 255; i3.push(String.fromCharCode(s22)); } return i3.join(""); }, parse: function(t5) { var e4 = t5.length; var r3 = []; for (var i3 = 0; i3 < e4; i3++) r3[i3 >>> 2] |= (255 & t5.charCodeAt(i3)) << 24 - i3 % 4 * 8; return new c2.init(r3, e4); } }; var d2 = l2.Utf8 = { stringify: function(t5) { try { return decodeURIComponent(escape(h2.stringify(t5))); } catch (t6) { throw new Error("Malformed UTF-8 data"); } }, parse: function(t5) { return h2.parse(unescape(encodeURIComponent(t5))); } }; var v2 = o2.BufferedBlockAlgorithm = u2.extend({ reset: function() { this._data = new c2.init(); this._nDataBytes = 0; }, _append: function(t5) { if ("string" == typeof t5) t5 = d2.parse(t5); this._data.concat(t5); this._nDataBytes += t5.sigBytes; }, _process: function(e4) { var r3; var i3 = this._data; var n22 = i3.words; var s22 = i3.sigBytes; var a22 = this.blockSize; var o22 = 4 * a22; var u22 = s22 / o22; if (e4) u22 = t4.ceil(u22); else u22 = t4.max((0 | u22) - this._minBufferSize, 0); var l22 = u22 * a22; var f22 = t4.min(4 * l22, s22); if (l22) { for (var h22 = 0; h22 < l22; h22 += a22) this._doProcessBlock(n22, h22); r3 = n22.splice(0, l22); i3.sigBytes -= f22; } return new c2.init(r3, f22); }, clone: function() { var t5 = u2.clone.call(this); t5._data = this._data.clone(); return t5; }, _minBufferSize: 0 }); o2.Hasher = v2.extend({ cfg: u2.extend(), init: function(t5) { this.cfg = this.cfg.extend(t5); this.reset(); }, reset: function() { v2.reset.call(this); this._doReset(); }, update: function(t5) { this._append(t5); this._process(); return this; }, finalize: function(t5) { if (t5) this._append(t5); var e4 = this._doFinalize(); return e4; }, blockSize: 512 / 32, _createHelper: function(t5) { return function(e4, r3) { return new t5.init(r3).finalize(e4); }; }, _createHmacHelper: function(t5) { return function(e4, r3) { return new g2.HMAC.init(t5, r3).finalize(e4); }; } }); var g2 = a2.algo = {}; return a2; }(Math); return t3; }); }, 8269: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.WordArray; var n2 = e3.enc; n2.Base64 = { stringify: function(t4) { var e4 = t4.words; var r4 = t4.sigBytes; var i3 = this._map; t4.clamp(); var n22 = []; for (var s2 = 0; s2 < r4; s2 += 3) { var a22 = e4[s2 >>> 2] >>> 24 - s2 % 4 * 8 & 255; var o2 = e4[s2 + 1 >>> 2] >>> 24 - (s2 + 1) % 4 * 8 & 255; var u2 = e4[s2 + 2 >>> 2] >>> 24 - (s2 + 2) % 4 * 8 & 255; var c2 = a22 << 16 | o2 << 8 | u2; for (var l2 = 0; l2 < 4 && s2 + 0.75 * l2 < r4; l2++) n22.push(i3.charAt(c2 >>> 6 * (3 - l2) & 63)); } var f2 = i3.charAt(64); if (f2) while (n22.length % 4) n22.push(f2); return n22.join(""); }, parse: function(t4) { var e4 = t4.length; var r4 = this._map; var i3 = this._reverseMap; if (!i3) { i3 = this._reverseMap = []; for (var n22 = 0; n22 < r4.length; n22++) i3[r4.charCodeAt(n22)] = n22; } var s2 = r4.charAt(64); if (s2) { var o2 = t4.indexOf(s2); if (-1 !== o2) e4 = o2; } return a2(t4, e4, i3); }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }; function a2(t4, e4, r4) { var n22 = []; var s2 = 0; for (var a22 = 0; a22 < e4; a22++) if (a22 % 4) { var o2 = r4[t4.charCodeAt(a22 - 1)] << a22 % 4 * 2; var u2 = r4[t4.charCodeAt(a22)] >>> 6 - a22 % 4 * 2; var c2 = o2 | u2; n22[s2 >>> 2] |= c2 << 24 - s2 % 4 * 8; s2++; } return i22.create(n22, s2); } })(); return t3.enc.Base64; }); }, 3786: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.WordArray; var n2 = e3.enc; n2.Base64url = { stringify: function(t4, e4 = true) { var r4 = t4.words; var i3 = t4.sigBytes; var n22 = e4 ? this._safe_map : this._map; t4.clamp(); var s2 = []; for (var a22 = 0; a22 < i3; a22 += 3) { var o2 = r4[a22 >>> 2] >>> 24 - a22 % 4 * 8 & 255; var u2 = r4[a22 + 1 >>> 2] >>> 24 - (a22 + 1) % 4 * 8 & 255; var c2 = r4[a22 + 2 >>> 2] >>> 24 - (a22 + 2) % 4 * 8 & 255; var l2 = o2 << 16 | u2 << 8 | c2; for (var f2 = 0; f2 < 4 && a22 + 0.75 * f2 < i3; f2++) s2.push(n22.charAt(l2 >>> 6 * (3 - f2) & 63)); } var h2 = n22.charAt(64); if (h2) while (s2.length % 4) s2.push(h2); return s2.join(""); }, parse: function(t4, e4 = true) { var r4 = t4.length; var i3 = e4 ? this._safe_map : this._map; var n22 = this._reverseMap; if (!n22) { n22 = this._reverseMap = []; for (var s2 = 0; s2 < i3.length; s2++) n22[i3.charCodeAt(s2)] = s2; } var o2 = i3.charAt(64); if (o2) { var u2 = t4.indexOf(o2); if (-1 !== u2) r4 = u2; } return a2(t4, r4, n22); }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" }; function a2(t4, e4, r4) { var n22 = []; var s2 = 0; for (var a22 = 0; a22 < e4; a22++) if (a22 % 4) { var o2 = r4[t4.charCodeAt(a22 - 1)] << a22 % 4 * 2; var u2 = r4[t4.charCodeAt(a22)] >>> 6 - a22 % 4 * 2; var c2 = o2 | u2; n22[s2 >>> 2] |= c2 << 24 - s2 % 4 * 8; s2++; } return i22.create(n22, s2); } })(); return t3.enc.Base64url; }); }, 298: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.WordArray; var n2 = e3.enc; n2.Utf16 = n2.Utf16BE = { stringify: function(t4) { var e4 = t4.words; var r4 = t4.sigBytes; var i3 = []; for (var n22 = 0; n22 < r4; n22 += 2) { var s2 = e4[n22 >>> 2] >>> 16 - n22 % 4 * 8 & 65535; i3.push(String.fromCharCode(s2)); } return i3.join(""); }, parse: function(t4) { var e4 = t4.length; var r4 = []; for (var n22 = 0; n22 < e4; n22++) r4[n22 >>> 1] |= t4.charCodeAt(n22) << 16 - n22 % 2 * 16; return i22.create(r4, 2 * e4); } }; n2.Utf16LE = { stringify: function(t4) { var e4 = t4.words; var r4 = t4.sigBytes; var i3 = []; for (var n22 = 0; n22 < r4; n22 += 2) { var s2 = a2(e4[n22 >>> 2] >>> 16 - n22 % 4 * 8 & 65535); i3.push(String.fromCharCode(s2)); } return i3.join(""); }, parse: function(t4) { var e4 = t4.length; var r4 = []; for (var n22 = 0; n22 < e4; n22++) r4[n22 >>> 1] |= a2(t4.charCodeAt(n22) << 16 - n22 % 2 * 16); return i22.create(r4, 2 * e4); } }; function a2(t4) { return t4 << 8 & 4278255360 | t4 >>> 8 & 16711935; } })(); return t3.enc.Utf16; }); }, 888: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(2783), r22(9824)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.Base; var n2 = r3.WordArray; var s2 = e3.algo; var a2 = s2.MD5; var o2 = s2.EvpKDF = i22.extend({ cfg: i22.extend({ keySize: 128 / 32, hasher: a2, iterations: 1 }), init: function(t4) { this.cfg = this.cfg.extend(t4); }, compute: function(t4, e4) { var r4; var i3 = this.cfg; var s22 = i3.hasher.create(); var a22 = n2.create(); var o22 = a22.words; var u2 = i3.keySize; var c2 = i3.iterations; while (o22.length < u2) { if (r4) s22.update(r4); r4 = s22.update(t4).finalize(e4); s22.reset(); for (var l2 = 1; l2 < c2; l2++) { r4 = s22.finalize(r4); s22.reset(); } a22.concat(r4); } a22.sigBytes = 4 * u2; return a22; } }); e3.EvpKDF = function(t4, e4, r4) { return o2.create(r4).compute(t4, e4); }; })(); return t3.EvpKDF; }); }, 2209: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { (function(e3) { var r3 = t3; var i22 = r3.lib; var n2 = i22.CipherParams; var s2 = r3.enc; var a2 = s2.Hex; var o2 = r3.format; o2.Hex = { stringify: function(t4) { return t4.ciphertext.toString(a2); }, parse: function(t4) { var e4 = a2.parse(t4); return n2.create({ ciphertext: e4 }); } }; })(); return t3.format.Hex; }); }, 9824: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.Base; var n2 = e3.enc; var s2 = n2.Utf8; var a2 = e3.algo; a2.HMAC = i22.extend({ init: function(t4, e4) { t4 = this._hasher = new t4.init(); if ("string" == typeof e4) e4 = s2.parse(e4); var r4 = t4.blockSize; var i3 = 4 * r4; if (e4.sigBytes > i3) e4 = t4.finalize(e4); e4.clamp(); var n22 = this._oKey = e4.clone(); var a22 = this._iKey = e4.clone(); var o2 = n22.words; var u2 = a22.words; for (var c2 = 0; c2 < r4; c2++) { o2[c2] ^= 1549556828; u2[c2] ^= 909522486; } n22.sigBytes = a22.sigBytes = i3; this.reset(); }, reset: function() { var t4 = this._hasher; t4.reset(); t4.update(this._iKey); }, update: function(t4) { this._hasher.update(t4); return this; }, finalize: function(t4) { var e4 = this._hasher; var r4 = e4.finalize(t4); e4.reset(); var i3 = e4.finalize(this._oKey.clone().concat(r4)); return i3; } }); })(); }); }, 1354: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(4938), r22(4433), r22(298), r22(8269), r22(3786), r22(8214), r22(2783), r22(2153), r22(7792), r22(34), r22(7460), r22(3327), r22(706), r22(9824), r22(2112), r22(888), r22(5109), r22(8568), r22(4242), r22(9968), r22(7660), r22(1148), r22(3615), r22(2807), r22(1077), r22(6475), r22(6991), r22(2209), r22(452), r22(4253), r22(1857), r22(4454), r22(3974)); })(this, function(t3) { return t3; }); }, 4433: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function() { if ("function" != typeof ArrayBuffer) return; var e3 = t3; var r3 = e3.lib; var i22 = r3.WordArray; var n2 = i22.init; var s2 = i22.init = function(t4) { if (t4 instanceof ArrayBuffer) t4 = new Uint8Array(t4); if (t4 instanceof Int8Array || "undefined" !== typeof Uint8ClampedArray && t4 instanceof Uint8ClampedArray || t4 instanceof Int16Array || t4 instanceof Uint16Array || t4 instanceof Int32Array || t4 instanceof Uint32Array || t4 instanceof Float32Array || t4 instanceof Float64Array) t4 = new Uint8Array(t4.buffer, t4.byteOffset, t4.byteLength); if (t4 instanceof Uint8Array) { var e4 = t4.byteLength; var r4 = []; for (var i3 = 0; i3 < e4; i3++) r4[i3 >>> 2] |= t4[i3] << 24 - i3 % 4 * 8; n2.call(this, r4, e4); } else n2.apply(this, arguments); }; s2.prototype = i22; })(); return t3.lib.WordArray; }); }, 8214: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function(e3) { var r3 = t3; var i22 = r3.lib; var n2 = i22.WordArray; var s2 = i22.Hasher; var a2 = r3.algo; var o2 = []; (function() { for (var t4 = 0; t4 < 64; t4++) o2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0; })(); var u2 = a2.MD5 = s2.extend({ _doReset: function() { this._hash = new n2.init([1732584193, 4023233417, 2562383102, 271733878]); }, _doProcessBlock: function(t4, e4) { for (var r4 = 0; r4 < 16; r4++) { var i3 = e4 + r4; var n22 = t4[i3]; t4[i3] = 16711935 & (n22 << 8 | n22 >>> 24) | 4278255360 & (n22 << 24 | n22 >>> 8); } var s22 = this._hash.words; var a22 = t4[e4 + 0]; var u22 = t4[e4 + 1]; var d2 = t4[e4 + 2]; var v2 = t4[e4 + 3]; var p2 = t4[e4 + 4]; var g2 = t4[e4 + 5]; var y2 = t4[e4 + 6]; var m2 = t4[e4 + 7]; var w2 = t4[e4 + 8]; var S2 = t4[e4 + 9]; var _2 = t4[e4 + 10]; var b2 = t4[e4 + 11]; var E2 = t4[e4 + 12]; var D2 = t4[e4 + 13]; var M2 = t4[e4 + 14]; var T2 = t4[e4 + 15]; var I2 = s22[0]; var A2 = s22[1]; var x = s22[2]; var R2 = s22[3]; I2 = c2(I2, A2, x, R2, a22, 7, o2[0]); R2 = c2(R2, I2, A2, x, u22, 12, o2[1]); x = c2(x, R2, I2, A2, d2, 17, o2[2]); A2 = c2(A2, x, R2, I2, v2, 22, o2[3]); I2 = c2(I2, A2, x, R2, p2, 7, o2[4]); R2 = c2(R2, I2, A2, x, g2, 12, o2[5]); x = c2(x, R2, I2, A2, y2, 17, o2[6]); A2 = c2(A2, x, R2, I2, m2, 22, o2[7]); I2 = c2(I2, A2, x, R2, w2, 7, o2[8]); R2 = c2(R2, I2, A2, x, S2, 12, o2[9]); x = c2(x, R2, I2, A2, _2, 17, o2[10]); A2 = c2(A2, x, R2, I2, b2, 22, o2[11]); I2 = c2(I2, A2, x, R2, E2, 7, o2[12]); R2 = c2(R2, I2, A2, x, D2, 12, o2[13]); x = c2(x, R2, I2, A2, M2, 17, o2[14]); A2 = c2(A2, x, R2, I2, T2, 22, o2[15]); I2 = l2(I2, A2, x, R2, u22, 5, o2[16]); R2 = l2(R2, I2, A2, x, y2, 9, o2[17]); x = l2(x, R2, I2, A2, b2, 14, o2[18]); A2 = l2(A2, x, R2, I2, a22, 20, o2[19]); I2 = l2(I2, A2, x, R2, g2, 5, o2[20]); R2 = l2(R2, I2, A2, x, _2, 9, o2[21]); x = l2(x, R2, I2, A2, T2, 14, o2[22]); A2 = l2(A2, x, R2, I2, p2, 20, o2[23]); I2 = l2(I2, A2, x, R2, S2, 5, o2[24]); R2 = l2(R2, I2, A2, x, M2, 9, o2[25]); x = l2(x, R2, I2, A2, v2, 14, o2[26]); A2 = l2(A2, x, R2, I2, w2, 20, o2[27]); I2 = l2(I2, A2, x, R2, D2, 5, o2[28]); R2 = l2(R2, I2, A2, x, d2, 9, o2[29]); x = l2(x, R2, I2, A2, m2, 14, o2[30]); A2 = l2(A2, x, R2, I2, E2, 20, o2[31]); I2 = f2(I2, A2, x, R2, g2, 4, o2[32]); R2 = f2(R2, I2, A2, x, w2, 11, o2[33]); x = f2(x, R2, I2, A2, b2, 16, o2[34]); A2 = f2(A2, x, R2, I2, M2, 23, o2[35]); I2 = f2(I2, A2, x, R2, u22, 4, o2[36]); R2 = f2(R2, I2, A2, x, p2, 11, o2[37]); x = f2(x, R2, I2, A2, m2, 16, o2[38]); A2 = f2(A2, x, R2, I2, _2, 23, o2[39]); I2 = f2(I2, A2, x, R2, D2, 4, o2[40]); R2 = f2(R2, I2, A2, x, a22, 11, o2[41]); x = f2(x, R2, I2, A2, v2, 16, o2[42]); A2 = f2(A2, x, R2, I2, y2, 23, o2[43]); I2 = f2(I2, A2, x, R2, S2, 4, o2[44]); R2 = f2(R2, I2, A2, x, E2, 11, o2[45]); x = f2(x, R2, I2, A2, T2, 16, o2[46]); A2 = f2(A2, x, R2, I2, d2, 23, o2[47]); I2 = h2(I2, A2, x, R2, a22, 6, o2[48]); R2 = h2(R2, I2, A2, x, m2, 10, o2[49]); x = h2(x, R2, I2, A2, M2, 15, o2[50]); A2 = h2(A2, x, R2, I2, g2, 21, o2[51]); I2 = h2(I2, A2, x, R2, E2, 6, o2[52]); R2 = h2(R2, I2, A2, x, v2, 10, o2[53]); x = h2(x, R2, I2, A2, _2, 15, o2[54]); A2 = h2(A2, x, R2, I2, u22, 21, o2[55]); I2 = h2(I2, A2, x, R2, w2, 6, o2[56]); R2 = h2(R2, I2, A2, x, T2, 10, o2[57]); x = h2(x, R2, I2, A2, y2, 15, o2[58]); A2 = h2(A2, x, R2, I2, D2, 21, o2[59]); I2 = h2(I2, A2, x, R2, p2, 6, o2[60]); R2 = h2(R2, I2, A2, x, b2, 10, o2[61]); x = h2(x, R2, I2, A2, d2, 15, o2[62]); A2 = h2(A2, x, R2, I2, S2, 21, o2[63]); s22[0] = s22[0] + I2 | 0; s22[1] = s22[1] + A2 | 0; s22[2] = s22[2] + x | 0; s22[3] = s22[3] + R2 | 0; }, _doFinalize: function() { var t4 = this._data; var r4 = t4.words; var i3 = 8 * this._nDataBytes; var n22 = 8 * t4.sigBytes; r4[n22 >>> 5] |= 128 << 24 - n22 % 32; var s22 = e3.floor(i3 / 4294967296); var a22 = i3; r4[(n22 + 64 >>> 9 << 4) + 15] = 16711935 & (s22 << 8 | s22 >>> 24) | 4278255360 & (s22 << 24 | s22 >>> 8); r4[(n22 + 64 >>> 9 << 4) + 14] = 16711935 & (a22 << 8 | a22 >>> 24) | 4278255360 & (a22 << 24 | a22 >>> 8); t4.sigBytes = 4 * (r4.length + 1); this._process(); var o22 = this._hash; var u22 = o22.words; for (var c22 = 0; c22 < 4; c22++) { var l22 = u22[c22]; u22[c22] = 16711935 & (l22 << 8 | l22 >>> 24) | 4278255360 & (l22 << 24 | l22 >>> 8); } return o22; }, clone: function() { var t4 = s2.clone.call(this); t4._hash = this._hash.clone(); return t4; } }); function c2(t4, e4, r4, i3, n22, s22, a22) { var o22 = t4 + (e4 & r4 | ~e4 & i3) + n22 + a22; return (o22 << s22 | o22 >>> 32 - s22) + e4; } function l2(t4, e4, r4, i3, n22, s22, a22) { var o22 = t4 + (e4 & i3 | r4 & ~i3) + n22 + a22; return (o22 << s22 | o22 >>> 32 - s22) + e4; } function f2(t4, e4, r4, i3, n22, s22, a22) { var o22 = t4 + (e4 ^ r4 ^ i3) + n22 + a22; return (o22 << s22 | o22 >>> 32 - s22) + e4; } function h2(t4, e4, r4, i3, n22, s22, a22) { var o22 = t4 + (r4 ^ (e4 | ~i3)) + n22 + a22; return (o22 << s22 | o22 >>> 32 - s22) + e4; } r3.MD5 = s2._createHelper(u2); r3.HmacMD5 = s2._createHmacHelper(u2); })(Math); return t3.MD5; }); }, 8568: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.mode.CFB = function() { var e3 = t3.lib.BlockCipherMode.extend(); e3.Encryptor = e3.extend({ processBlock: function(t4, e4) { var i22 = this._cipher; var n2 = i22.blockSize; r3.call(this, t4, e4, n2, i22); this._prevBlock = t4.slice(e4, e4 + n2); } }); e3.Decryptor = e3.extend({ processBlock: function(t4, e4) { var i22 = this._cipher; var n2 = i22.blockSize; var s2 = t4.slice(e4, e4 + n2); r3.call(this, t4, e4, n2, i22); this._prevBlock = s2; } }); function r3(t4, e4, r4, i22) { var n2; var s2 = this._iv; if (s2) { n2 = s2.slice(0); this._iv = void 0; } else n2 = this._prevBlock; i22.encryptBlock(n2, 0); for (var a2 = 0; a2 < r4; a2++) t4[e4 + a2] ^= n2[a2]; } return e3; }(); return t3.mode.CFB; }); }, 9968: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.mode.CTRGladman = function() { var e3 = t3.lib.BlockCipherMode.extend(); function r3(t4) { if (255 === (t4 >> 24 & 255)) { var e4 = t4 >> 16 & 255; var r4 = t4 >> 8 & 255; var i3 = 255 & t4; if (255 === e4) { e4 = 0; if (255 === r4) { r4 = 0; if (255 === i3) i3 = 0; else ++i3; } else ++r4; } else ++e4; t4 = 0; t4 += e4 << 16; t4 += r4 << 8; t4 += i3; } else t4 += 1 << 24; return t4; } function i22(t4) { if (0 === (t4[0] = r3(t4[0]))) t4[1] = r3(t4[1]); return t4; } var n2 = e3.Encryptor = e3.extend({ processBlock: function(t4, e4) { var r4 = this._cipher; var n22 = r4.blockSize; var s2 = this._iv; var a2 = this._counter; if (s2) { a2 = this._counter = s2.slice(0); this._iv = void 0; } i22(a2); var o2 = a2.slice(0); r4.encryptBlock(o2, 0); for (var u2 = 0; u2 < n22; u2++) t4[e4 + u2] ^= o2[u2]; } }); e3.Decryptor = n2; return e3; }(); return t3.mode.CTRGladman; }); }, 4242: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.mode.CTR = function() { var e3 = t3.lib.BlockCipherMode.extend(); var r3 = e3.Encryptor = e3.extend({ processBlock: function(t4, e4) { var r4 = this._cipher; var i22 = r4.blockSize; var n2 = this._iv; var s2 = this._counter; if (n2) { s2 = this._counter = n2.slice(0); this._iv = void 0; } var a2 = s2.slice(0); r4.encryptBlock(a2, 0); s2[i22 - 1] = s2[i22 - 1] + 1 | 0; for (var o2 = 0; o2 < i22; o2++) t4[e4 + o2] ^= a2[o2]; } }); e3.Decryptor = r3; return e3; }(); return t3.mode.CTR; }); }, 1148: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.mode.ECB = function() { var e3 = t3.lib.BlockCipherMode.extend(); e3.Encryptor = e3.extend({ processBlock: function(t4, e4) { this._cipher.encryptBlock(t4, e4); } }); e3.Decryptor = e3.extend({ processBlock: function(t4, e4) { this._cipher.decryptBlock(t4, e4); } }); return e3; }(); return t3.mode.ECB; }); }, 7660: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.mode.OFB = function() { var e3 = t3.lib.BlockCipherMode.extend(); var r3 = e3.Encryptor = e3.extend({ processBlock: function(t4, e4) { var r4 = this._cipher; var i22 = r4.blockSize; var n2 = this._iv; var s2 = this._keystream; if (n2) { s2 = this._keystream = n2.slice(0); this._iv = void 0; } r4.encryptBlock(s2, 0); for (var a2 = 0; a2 < i22; a2++) t4[e4 + a2] ^= s2[a2]; } }); e3.Decryptor = r3; return e3; }(); return t3.mode.OFB; }); }, 3615: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.pad.AnsiX923 = { pad: function(t4, e3) { var r3 = t4.sigBytes; var i22 = 4 * e3; var n2 = i22 - r3 % i22; var s2 = r3 + n2 - 1; t4.clamp(); t4.words[s2 >>> 2] |= n2 << 24 - s2 % 4 * 8; t4.sigBytes += n2; }, unpad: function(t4) { var e3 = 255 & t4.words[t4.sigBytes - 1 >>> 2]; t4.sigBytes -= e3; } }; return t3.pad.Ansix923; }); }, 2807: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.pad.Iso10126 = { pad: function(e3, r3) { var i22 = 4 * r3; var n2 = i22 - e3.sigBytes % i22; e3.concat(t3.lib.WordArray.random(n2 - 1)).concat(t3.lib.WordArray.create([n2 << 24], 1)); }, unpad: function(t4) { var e3 = 255 & t4.words[t4.sigBytes - 1 >>> 2]; t4.sigBytes -= e3; } }; return t3.pad.Iso10126; }); }, 1077: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.pad.Iso97971 = { pad: function(e3, r3) { e3.concat(t3.lib.WordArray.create([2147483648], 1)); t3.pad.ZeroPadding.pad(e3, r3); }, unpad: function(e3) { t3.pad.ZeroPadding.unpad(e3); e3.sigBytes--; } }; return t3.pad.Iso97971; }); }, 6991: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.pad.NoPadding = { pad: function() { }, unpad: function() { } }; return t3.pad.NoPadding; }); }, 6475: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(5109)); })(this, function(t3) { t3.pad.ZeroPadding = { pad: function(t4, e3) { var r3 = 4 * e3; t4.clamp(); t4.sigBytes += r3 - (t4.sigBytes % r3 || r3); }, unpad: function(t4) { var e3 = t4.words; var r3 = t4.sigBytes - 1; for (var r3 = t4.sigBytes - 1; r3 >= 0; r3--) if (e3[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255) { t4.sigBytes = r3 + 1; break; } } }; return t3.pad.ZeroPadding; }); }, 2112: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(2783), r22(9824)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.Base; var n2 = r3.WordArray; var s2 = e3.algo; var a2 = s2.SHA1; var o2 = s2.HMAC; var u2 = s2.PBKDF2 = i22.extend({ cfg: i22.extend({ keySize: 128 / 32, hasher: a2, iterations: 1 }), init: function(t4) { this.cfg = this.cfg.extend(t4); }, compute: function(t4, e4) { var r4 = this.cfg; var i3 = o2.create(r4.hasher, t4); var s22 = n2.create(); var a22 = n2.create([1]); var u22 = s22.words; var c2 = a22.words; var l2 = r4.keySize; var f2 = r4.iterations; while (u22.length < l2) { var h2 = i3.update(e4).finalize(a22); i3.reset(); var d2 = h2.words; var v2 = d2.length; var p2 = h2; for (var g2 = 1; g2 < f2; g2++) { p2 = i3.finalize(p2); i3.reset(); var y2 = p2.words; for (var m2 = 0; m2 < v2; m2++) d2[m2] ^= y2[m2]; } s22.concat(h2); c2[0]++; } s22.sigBytes = 4 * l2; return s22; } }); e3.PBKDF2 = function(t4, e4, r4) { return u2.create(r4).compute(t4, e4); }; })(); return t3.PBKDF2; }); }, 3974: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(8269), r22(8214), r22(888), r22(5109)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.StreamCipher; var n2 = e3.algo; var s2 = []; var a2 = []; var o2 = []; var u2 = n2.RabbitLegacy = i22.extend({ _doReset: function() { var t4 = this._key.words; var e4 = this.cfg.iv; var r4 = this._X = [t4[0], t4[3] << 16 | t4[2] >>> 16, t4[1], t4[0] << 16 | t4[3] >>> 16, t4[2], t4[1] << 16 | t4[0] >>> 16, t4[3], t4[2] << 16 | t4[1] >>> 16]; var i3 = this._C = [t4[2] << 16 | t4[2] >>> 16, 4294901760 & t4[0] | 65535 & t4[1], t4[3] << 16 | t4[3] >>> 16, 4294901760 & t4[1] | 65535 & t4[2], t4[0] << 16 | t4[0] >>> 16, 4294901760 & t4[2] | 65535 & t4[3], t4[1] << 16 | t4[1] >>> 16, 4294901760 & t4[3] | 65535 & t4[0]]; this._b = 0; for (var n22 = 0; n22 < 4; n22++) c2.call(this); for (var n22 = 0; n22 < 8; n22++) i3[n22] ^= r4[n22 + 4 & 7]; if (e4) { var s22 = e4.words; var a22 = s22[0]; var o22 = s22[1]; var u22 = 16711935 & (a22 << 8 | a22 >>> 24) | 4278255360 & (a22 << 24 | a22 >>> 8); var l2 = 16711935 & (o22 << 8 | o22 >>> 24) | 4278255360 & (o22 << 24 | o22 >>> 8); var f2 = u22 >>> 16 | 4294901760 & l2; var h2 = l2 << 16 | 65535 & u22; i3[0] ^= u22; i3[1] ^= f2; i3[2] ^= l2; i3[3] ^= h2; i3[4] ^= u22; i3[5] ^= f2; i3[6] ^= l2; i3[7] ^= h2; for (var n22 = 0; n22 < 4; n22++) c2.call(this); } }, _doProcessBlock: function(t4, e4) { var r4 = this._X; c2.call(this); s2[0] = r4[0] ^ r4[5] >>> 16 ^ r4[3] << 16; s2[1] = r4[2] ^ r4[7] >>> 16 ^ r4[5] << 16; s2[2] = r4[4] ^ r4[1] >>> 16 ^ r4[7] << 16; s2[3] = r4[6] ^ r4[3] >>> 16 ^ r4[1] << 16; for (var i3 = 0; i3 < 4; i3++) { s2[i3] = 16711935 & (s2[i3] << 8 | s2[i3] >>> 24) | 4278255360 & (s2[i3] << 24 | s2[i3] >>> 8); t4[e4 + i3] ^= s2[i3]; } }, blockSize: 128 / 32, ivSize: 64 / 32 }); function c2() { var t4 = this._X; var e4 = this._C; for (var r4 = 0; r4 < 8; r4++) a2[r4] = e4[r4]; e4[0] = e4[0] + 1295307597 + this._b | 0; e4[1] = e4[1] + 3545052371 + (e4[0] >>> 0 < a2[0] >>> 0 ? 1 : 0) | 0; e4[2] = e4[2] + 886263092 + (e4[1] >>> 0 < a2[1] >>> 0 ? 1 : 0) | 0; e4[3] = e4[3] + 1295307597 + (e4[2] >>> 0 < a2[2] >>> 0 ? 1 : 0) | 0; e4[4] = e4[4] + 3545052371 + (e4[3] >>> 0 < a2[3] >>> 0 ? 1 : 0) | 0; e4[5] = e4[5] + 886263092 + (e4[4] >>> 0 < a2[4] >>> 0 ? 1 : 0) | 0; e4[6] = e4[6] + 1295307597 + (e4[5] >>> 0 < a2[5] >>> 0 ? 1 : 0) | 0; e4[7] = e4[7] + 3545052371 + (e4[6] >>> 0 < a2[6] >>> 0 ? 1 : 0) | 0; this._b = e4[7] >>> 0 < a2[7] >>> 0 ? 1 : 0; for (var r4 = 0; r4 < 8; r4++) { var i3 = t4[r4] + e4[r4]; var n22 = 65535 & i3; var s22 = i3 >>> 16; var u22 = ((n22 * n22 >>> 17) + n22 * s22 >>> 15) + s22 * s22; var c22 = ((4294901760 & i3) * i3 | 0) + ((65535 & i3) * i3 | 0); o2[r4] = u22 ^ c22; } t4[0] = o2[0] + (o2[7] << 16 | o2[7] >>> 16) + (o2[6] << 16 | o2[6] >>> 16) | 0; t4[1] = o2[1] + (o2[0] << 8 | o2[0] >>> 24) + o2[7] | 0; t4[2] = o2[2] + (o2[1] << 16 | o2[1] >>> 16) + (o2[0] << 16 | o2[0] >>> 16) | 0; t4[3] = o2[3] + (o2[2] << 8 | o2[2] >>> 24) + o2[1] | 0; t4[4] = o2[4] + (o2[3] << 16 | o2[3] >>> 16) + (o2[2] << 16 | o2[2] >>> 16) | 0; t4[5] = o2[5] + (o2[4] << 8 | o2[4] >>> 24) + o2[3] | 0; t4[6] = o2[6] + (o2[5] << 16 | o2[5] >>> 16) + (o2[4] << 16 | o2[4] >>> 16) | 0; t4[7] = o2[7] + (o2[6] << 8 | o2[6] >>> 24) + o2[5] | 0; } e3.RabbitLegacy = i22._createHelper(u2); })(); return t3.RabbitLegacy; }); }, 4454: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(8269), r22(8214), r22(888), r22(5109)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.StreamCipher; var n2 = e3.algo; var s2 = []; var a2 = []; var o2 = []; var u2 = n2.Rabbit = i22.extend({ _doReset: function() { var t4 = this._key.words; var e4 = this.cfg.iv; for (var r4 = 0; r4 < 4; r4++) t4[r4] = 16711935 & (t4[r4] << 8 | t4[r4] >>> 24) | 4278255360 & (t4[r4] << 24 | t4[r4] >>> 8); var i3 = this._X = [t4[0], t4[3] << 16 | t4[2] >>> 16, t4[1], t4[0] << 16 | t4[3] >>> 16, t4[2], t4[1] << 16 | t4[0] >>> 16, t4[3], t4[2] << 16 | t4[1] >>> 16]; var n22 = this._C = [t4[2] << 16 | t4[2] >>> 16, 4294901760 & t4[0] | 65535 & t4[1], t4[3] << 16 | t4[3] >>> 16, 4294901760 & t4[1] | 65535 & t4[2], t4[0] << 16 | t4[0] >>> 16, 4294901760 & t4[2] | 65535 & t4[3], t4[1] << 16 | t4[1] >>> 16, 4294901760 & t4[3] | 65535 & t4[0]]; this._b = 0; for (var r4 = 0; r4 < 4; r4++) c2.call(this); for (var r4 = 0; r4 < 8; r4++) n22[r4] ^= i3[r4 + 4 & 7]; if (e4) { var s22 = e4.words; var a22 = s22[0]; var o22 = s22[1]; var u22 = 16711935 & (a22 << 8 | a22 >>> 24) | 4278255360 & (a22 << 24 | a22 >>> 8); var l2 = 16711935 & (o22 << 8 | o22 >>> 24) | 4278255360 & (o22 << 24 | o22 >>> 8); var f2 = u22 >>> 16 | 4294901760 & l2; var h2 = l2 << 16 | 65535 & u22; n22[0] ^= u22; n22[1] ^= f2; n22[2] ^= l2; n22[3] ^= h2; n22[4] ^= u22; n22[5] ^= f2; n22[6] ^= l2; n22[7] ^= h2; for (var r4 = 0; r4 < 4; r4++) c2.call(this); } }, _doProcessBlock: function(t4, e4) { var r4 = this._X; c2.call(this); s2[0] = r4[0] ^ r4[5] >>> 16 ^ r4[3] << 16; s2[1] = r4[2] ^ r4[7] >>> 16 ^ r4[5] << 16; s2[2] = r4[4] ^ r4[1] >>> 16 ^ r4[7] << 16; s2[3] = r4[6] ^ r4[3] >>> 16 ^ r4[1] << 16; for (var i3 = 0; i3 < 4; i3++) { s2[i3] = 16711935 & (s2[i3] << 8 | s2[i3] >>> 24) | 4278255360 & (s2[i3] << 24 | s2[i3] >>> 8); t4[e4 + i3] ^= s2[i3]; } }, blockSize: 128 / 32, ivSize: 64 / 32 }); function c2() { var t4 = this._X; var e4 = this._C; for (var r4 = 0; r4 < 8; r4++) a2[r4] = e4[r4]; e4[0] = e4[0] + 1295307597 + this._b | 0; e4[1] = e4[1] + 3545052371 + (e4[0] >>> 0 < a2[0] >>> 0 ? 1 : 0) | 0; e4[2] = e4[2] + 886263092 + (e4[1] >>> 0 < a2[1] >>> 0 ? 1 : 0) | 0; e4[3] = e4[3] + 1295307597 + (e4[2] >>> 0 < a2[2] >>> 0 ? 1 : 0) | 0; e4[4] = e4[4] + 3545052371 + (e4[3] >>> 0 < a2[3] >>> 0 ? 1 : 0) | 0; e4[5] = e4[5] + 886263092 + (e4[4] >>> 0 < a2[4] >>> 0 ? 1 : 0) | 0; e4[6] = e4[6] + 1295307597 + (e4[5] >>> 0 < a2[5] >>> 0 ? 1 : 0) | 0; e4[7] = e4[7] + 3545052371 + (e4[6] >>> 0 < a2[6] >>> 0 ? 1 : 0) | 0; this._b = e4[7] >>> 0 < a2[7] >>> 0 ? 1 : 0; for (var r4 = 0; r4 < 8; r4++) { var i3 = t4[r4] + e4[r4]; var n22 = 65535 & i3; var s22 = i3 >>> 16; var u22 = ((n22 * n22 >>> 17) + n22 * s22 >>> 15) + s22 * s22; var c22 = ((4294901760 & i3) * i3 | 0) + ((65535 & i3) * i3 | 0); o2[r4] = u22 ^ c22; } t4[0] = o2[0] + (o2[7] << 16 | o2[7] >>> 16) + (o2[6] << 16 | o2[6] >>> 16) | 0; t4[1] = o2[1] + (o2[0] << 8 | o2[0] >>> 24) + o2[7] | 0; t4[2] = o2[2] + (o2[1] << 16 | o2[1] >>> 16) + (o2[0] << 16 | o2[0] >>> 16) | 0; t4[3] = o2[3] + (o2[2] << 8 | o2[2] >>> 24) + o2[1] | 0; t4[4] = o2[4] + (o2[3] << 16 | o2[3] >>> 16) + (o2[2] << 16 | o2[2] >>> 16) | 0; t4[5] = o2[5] + (o2[4] << 8 | o2[4] >>> 24) + o2[3] | 0; t4[6] = o2[6] + (o2[5] << 16 | o2[5] >>> 16) + (o2[4] << 16 | o2[4] >>> 16) | 0; t4[7] = o2[7] + (o2[6] << 8 | o2[6] >>> 24) + o2[5] | 0; } e3.Rabbit = i22._createHelper(u2); })(); return t3.Rabbit; }); }, 1857: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(8269), r22(8214), r22(888), r22(5109)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.StreamCipher; var n2 = e3.algo; var s2 = n2.RC4 = i22.extend({ _doReset: function() { var t4 = this._key; var e4 = t4.words; var r4 = t4.sigBytes; var i3 = this._S = []; for (var n22 = 0; n22 < 256; n22++) i3[n22] = n22; for (var n22 = 0, s22 = 0; n22 < 256; n22++) { var a22 = n22 % r4; var o22 = e4[a22 >>> 2] >>> 24 - a22 % 4 * 8 & 255; s22 = (s22 + i3[n22] + o22) % 256; var u2 = i3[n22]; i3[n22] = i3[s22]; i3[s22] = u2; } this._i = this._j = 0; }, _doProcessBlock: function(t4, e4) { t4[e4] ^= a2.call(this); }, keySize: 256 / 32, ivSize: 0 }); function a2() { var t4 = this._S; var e4 = this._i; var r4 = this._j; var i3 = 0; for (var n22 = 0; n22 < 4; n22++) { e4 = (e4 + 1) % 256; r4 = (r4 + t4[e4]) % 256; var s22 = t4[e4]; t4[e4] = t4[r4]; t4[r4] = s22; i3 |= t4[(t4[e4] + t4[r4]) % 256] << 24 - 8 * n22; } this._i = e4; this._j = r4; return i3; } e3.RC4 = i22._createHelper(s2); var o2 = n2.RC4Drop = s2.extend({ cfg: s2.cfg.extend({ drop: 192 }), _doReset: function() { s2._doReset.call(this); for (var t4 = this.cfg.drop; t4 > 0; t4--) a2.call(this); } }); e3.RC4Drop = i22._createHelper(o2); })(); return t3.RC4; }); }, 706: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function(e3) { var r3 = t3; var i22 = r3.lib; var n2 = i22.WordArray; var s2 = i22.Hasher; var a2 = r3.algo; var o2 = n2.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); var u2 = n2.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); var c2 = n2.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]); var l2 = n2.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]); var f2 = n2.create([0, 1518500249, 1859775393, 2400959708, 2840853838]); var h2 = n2.create([1352829926, 1548603684, 1836072691, 2053994217, 0]); var d2 = a2.RIPEMD160 = s2.extend({ _doReset: function() { this._hash = n2.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); }, _doProcessBlock: function(t4, e4) { for (var r4 = 0; r4 < 16; r4++) { var i3 = e4 + r4; var n22 = t4[i3]; t4[i3] = 16711935 & (n22 << 8 | n22 >>> 24) | 4278255360 & (n22 << 24 | n22 >>> 8); } var s22 = this._hash.words; var a22 = f2.words; var d22 = h2.words; var S2 = o2.words; var _2 = u2.words; var b2 = c2.words; var E2 = l2.words; var D2, M2, T2, I2, A2; var x, R2, B2, O2, k; x = D2 = s22[0]; R2 = M2 = s22[1]; B2 = T2 = s22[2]; O2 = I2 = s22[3]; k = A2 = s22[4]; var C2; for (var r4 = 0; r4 < 80; r4 += 1) { C2 = D2 + t4[e4 + S2[r4]] | 0; if (r4 < 16) C2 += v2(M2, T2, I2) + a22[0]; else if (r4 < 32) C2 += p2(M2, T2, I2) + a22[1]; else if (r4 < 48) C2 += g2(M2, T2, I2) + a22[2]; else if (r4 < 64) C2 += y2(M2, T2, I2) + a22[3]; else C2 += m2(M2, T2, I2) + a22[4]; C2 |= 0; C2 = w2(C2, b2[r4]); C2 = C2 + A2 | 0; D2 = A2; A2 = I2; I2 = w2(T2, 10); T2 = M2; M2 = C2; C2 = x + t4[e4 + _2[r4]] | 0; if (r4 < 16) C2 += m2(R2, B2, O2) + d22[0]; else if (r4 < 32) C2 += y2(R2, B2, O2) + d22[1]; else if (r4 < 48) C2 += g2(R2, B2, O2) + d22[2]; else if (r4 < 64) C2 += p2(R2, B2, O2) + d22[3]; else C2 += v2(R2, B2, O2) + d22[4]; C2 |= 0; C2 = w2(C2, E2[r4]); C2 = C2 + k | 0; x = k; k = O2; O2 = w2(B2, 10); B2 = R2; R2 = C2; } C2 = s22[1] + T2 + O2 | 0; s22[1] = s22[2] + I2 + k | 0; s22[2] = s22[3] + A2 + x | 0; s22[3] = s22[4] + D2 + R2 | 0; s22[4] = s22[0] + M2 + B2 | 0; s22[0] = C2; }, _doFinalize: function() { var t4 = this._data; var e4 = t4.words; var r4 = 8 * this._nDataBytes; var i3 = 8 * t4.sigBytes; e4[i3 >>> 5] |= 128 << 24 - i3 % 32; e4[(i3 + 64 >>> 9 << 4) + 14] = 16711935 & (r4 << 8 | r4 >>> 24) | 4278255360 & (r4 << 24 | r4 >>> 8); t4.sigBytes = 4 * (e4.length + 1); this._process(); var n22 = this._hash; var s22 = n22.words; for (var a22 = 0; a22 < 5; a22++) { var o22 = s22[a22]; s22[a22] = 16711935 & (o22 << 8 | o22 >>> 24) | 4278255360 & (o22 << 24 | o22 >>> 8); } return n22; }, clone: function() { var t4 = s2.clone.call(this); t4._hash = this._hash.clone(); return t4; } }); function v2(t4, e4, r4) { return t4 ^ e4 ^ r4; } function p2(t4, e4, r4) { return t4 & e4 | ~t4 & r4; } function g2(t4, e4, r4) { return (t4 | ~e4) ^ r4; } function y2(t4, e4, r4) { return t4 & r4 | e4 & ~r4; } function m2(t4, e4, r4) { return t4 ^ (e4 | ~r4); } function w2(t4, e4) { return t4 << e4 | t4 >>> 32 - e4; } r3.RIPEMD160 = s2._createHelper(d2); r3.HmacRIPEMD160 = s2._createHmacHelper(d2); })(); return t3.RIPEMD160; }); }, 2783: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.WordArray; var n2 = r3.Hasher; var s2 = e3.algo; var a2 = []; var o2 = s2.SHA1 = n2.extend({ _doReset: function() { this._hash = new i22.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); }, _doProcessBlock: function(t4, e4) { var r4 = this._hash.words; var i3 = r4[0]; var n22 = r4[1]; var s22 = r4[2]; var o22 = r4[3]; var u2 = r4[4]; for (var c2 = 0; c2 < 80; c2++) { if (c2 < 16) a2[c2] = 0 | t4[e4 + c2]; else { var l2 = a2[c2 - 3] ^ a2[c2 - 8] ^ a2[c2 - 14] ^ a2[c2 - 16]; a2[c2] = l2 << 1 | l2 >>> 31; } var f2 = (i3 << 5 | i3 >>> 27) + u2 + a2[c2]; if (c2 < 20) f2 += (n22 & s22 | ~n22 & o22) + 1518500249; else if (c2 < 40) f2 += (n22 ^ s22 ^ o22) + 1859775393; else if (c2 < 60) f2 += (n22 & s22 | n22 & o22 | s22 & o22) - 1894007588; else f2 += (n22 ^ s22 ^ o22) - 899497514; u2 = o22; o22 = s22; s22 = n22 << 30 | n22 >>> 2; n22 = i3; i3 = f2; } r4[0] = r4[0] + i3 | 0; r4[1] = r4[1] + n22 | 0; r4[2] = r4[2] + s22 | 0; r4[3] = r4[3] + o22 | 0; r4[4] = r4[4] + u2 | 0; }, _doFinalize: function() { var t4 = this._data; var e4 = t4.words; var r4 = 8 * this._nDataBytes; var i3 = 8 * t4.sigBytes; e4[i3 >>> 5] |= 128 << 24 - i3 % 32; e4[(i3 + 64 >>> 9 << 4) + 14] = Math.floor(r4 / 4294967296); e4[(i3 + 64 >>> 9 << 4) + 15] = r4; t4.sigBytes = 4 * e4.length; this._process(); return this._hash; }, clone: function() { var t4 = n2.clone.call(this); t4._hash = this._hash.clone(); return t4; } }); e3.SHA1 = n2._createHelper(o2); e3.HmacSHA1 = n2._createHmacHelper(o2); })(); return t3.SHA1; }); }, 7792: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(2153)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.WordArray; var n2 = e3.algo; var s2 = n2.SHA256; var a2 = n2.SHA224 = s2.extend({ _doReset: function() { this._hash = new i22.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]); }, _doFinalize: function() { var t4 = s2._doFinalize.call(this); t4.sigBytes -= 4; return t4; } }); e3.SHA224 = s2._createHelper(a2); e3.HmacSHA224 = s2._createHmacHelper(a2); })(); return t3.SHA224; }); }, 2153: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function(e3) { var r3 = t3; var i22 = r3.lib; var n2 = i22.WordArray; var s2 = i22.Hasher; var a2 = r3.algo; var o2 = []; var u2 = []; (function() { function t4(t5) { var r5 = e3.sqrt(t5); for (var i4 = 2; i4 <= r5; i4++) if (!(t5 % i4)) return false; return true; } function r4(t5) { return 4294967296 * (t5 - (0 | t5)) | 0; } var i3 = 2; var n22 = 0; while (n22 < 64) { if (t4(i3)) { if (n22 < 8) o2[n22] = r4(e3.pow(i3, 1 / 2)); u2[n22] = r4(e3.pow(i3, 1 / 3)); n22++; } i3++; } })(); var c2 = []; var l2 = a2.SHA256 = s2.extend({ _doReset: function() { this._hash = new n2.init(o2.slice(0)); }, _doProcessBlock: function(t4, e4) { var r4 = this._hash.words; var i3 = r4[0]; var n22 = r4[1]; var s22 = r4[2]; var a22 = r4[3]; var o22 = r4[4]; var l22 = r4[5]; var f2 = r4[6]; var h2 = r4[7]; for (var d2 = 0; d2 < 64; d2++) { if (d2 < 16) c2[d2] = 0 | t4[e4 + d2]; else { var v2 = c2[d2 - 15]; var p2 = (v2 << 25 | v2 >>> 7) ^ (v2 << 14 | v2 >>> 18) ^ v2 >>> 3; var g2 = c2[d2 - 2]; var y2 = (g2 << 15 | g2 >>> 17) ^ (g2 << 13 | g2 >>> 19) ^ g2 >>> 10; c2[d2] = p2 + c2[d2 - 7] + y2 + c2[d2 - 16]; } var m2 = o22 & l22 ^ ~o22 & f2; var w2 = i3 & n22 ^ i3 & s22 ^ n22 & s22; var S2 = (i3 << 30 | i3 >>> 2) ^ (i3 << 19 | i3 >>> 13) ^ (i3 << 10 | i3 >>> 22); var _2 = (o22 << 26 | o22 >>> 6) ^ (o22 << 21 | o22 >>> 11) ^ (o22 << 7 | o22 >>> 25); var b2 = h2 + _2 + m2 + u2[d2] + c2[d2]; var E2 = S2 + w2; h2 = f2; f2 = l22; l22 = o22; o22 = a22 + b2 | 0; a22 = s22; s22 = n22; n22 = i3; i3 = b2 + E2 | 0; } r4[0] = r4[0] + i3 | 0; r4[1] = r4[1] + n22 | 0; r4[2] = r4[2] + s22 | 0; r4[3] = r4[3] + a22 | 0; r4[4] = r4[4] + o22 | 0; r4[5] = r4[5] + l22 | 0; r4[6] = r4[6] + f2 | 0; r4[7] = r4[7] + h2 | 0; }, _doFinalize: function() { var t4 = this._data; var r4 = t4.words; var i3 = 8 * this._nDataBytes; var n22 = 8 * t4.sigBytes; r4[n22 >>> 5] |= 128 << 24 - n22 % 32; r4[(n22 + 64 >>> 9 << 4) + 14] = e3.floor(i3 / 4294967296); r4[(n22 + 64 >>> 9 << 4) + 15] = i3; t4.sigBytes = 4 * r4.length; this._process(); return this._hash; }, clone: function() { var t4 = s2.clone.call(this); t4._hash = this._hash.clone(); return t4; } }); r3.SHA256 = s2._createHelper(l2); r3.HmacSHA256 = s2._createHmacHelper(l2); })(Math); return t3.SHA256; }); }, 3327: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(4938)); })(this, function(t3) { (function(e3) { var r3 = t3; var i22 = r3.lib; var n2 = i22.WordArray; var s2 = i22.Hasher; var a2 = r3.x64; var o2 = a2.Word; var u2 = r3.algo; var c2 = []; var l2 = []; var f2 = []; (function() { var t4 = 1, e4 = 0; for (var r4 = 0; r4 < 24; r4++) { c2[t4 + 5 * e4] = (r4 + 1) * (r4 + 2) / 2 % 64; var i3 = e4 % 5; var n22 = (2 * t4 + 3 * e4) % 5; t4 = i3; e4 = n22; } for (var t4 = 0; t4 < 5; t4++) for (var e4 = 0; e4 < 5; e4++) l2[t4 + 5 * e4] = e4 + (2 * t4 + 3 * e4) % 5 * 5; var s22 = 1; for (var a22 = 0; a22 < 24; a22++) { var u22 = 0; var h22 = 0; for (var d22 = 0; d22 < 7; d22++) { if (1 & s22) { var v2 = (1 << d22) - 1; if (v2 < 32) h22 ^= 1 << v2; else u22 ^= 1 << v2 - 32; } if (128 & s22) s22 = s22 << 1 ^ 113; else s22 <<= 1; } f2[a22] = o2.create(u22, h22); } })(); var h2 = []; (function() { for (var t4 = 0; t4 < 25; t4++) h2[t4] = o2.create(); })(); var d2 = u2.SHA3 = s2.extend({ cfg: s2.cfg.extend({ outputLength: 512 }), _doReset: function() { var t4 = this._state = []; for (var e4 = 0; e4 < 25; e4++) t4[e4] = new o2.init(); this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; }, _doProcessBlock: function(t4, e4) { var r4 = this._state; var i3 = this.blockSize / 2; for (var n22 = 0; n22 < i3; n22++) { var s22 = t4[e4 + 2 * n22]; var a22 = t4[e4 + 2 * n22 + 1]; s22 = 16711935 & (s22 << 8 | s22 >>> 24) | 4278255360 & (s22 << 24 | s22 >>> 8); a22 = 16711935 & (a22 << 8 | a22 >>> 24) | 4278255360 & (a22 << 24 | a22 >>> 8); var o22 = r4[n22]; o22.high ^= a22; o22.low ^= s22; } for (var u22 = 0; u22 < 24; u22++) { for (var d22 = 0; d22 < 5; d22++) { var v2 = 0, p2 = 0; for (var g2 = 0; g2 < 5; g2++) { var o22 = r4[d22 + 5 * g2]; v2 ^= o22.high; p2 ^= o22.low; } var y2 = h2[d22]; y2.high = v2; y2.low = p2; } for (var d22 = 0; d22 < 5; d22++) { var m2 = h2[(d22 + 4) % 5]; var w2 = h2[(d22 + 1) % 5]; var S2 = w2.high; var _2 = w2.low; var v2 = m2.high ^ (S2 << 1 | _2 >>> 31); var p2 = m2.low ^ (_2 << 1 | S2 >>> 31); for (var g2 = 0; g2 < 5; g2++) { var o22 = r4[d22 + 5 * g2]; o22.high ^= v2; o22.low ^= p2; } } for (var b2 = 1; b2 < 25; b2++) { var v2; var p2; var o22 = r4[b2]; var E2 = o22.high; var D2 = o22.low; var M2 = c2[b2]; if (M2 < 32) { v2 = E2 << M2 | D2 >>> 32 - M2; p2 = D2 << M2 | E2 >>> 32 - M2; } else { v2 = D2 << M2 - 32 | E2 >>> 64 - M2; p2 = E2 << M2 - 32 | D2 >>> 64 - M2; } var T2 = h2[l2[b2]]; T2.high = v2; T2.low = p2; } var I2 = h2[0]; var A2 = r4[0]; I2.high = A2.high; I2.low = A2.low; for (var d22 = 0; d22 < 5; d22++) for (var g2 = 0; g2 < 5; g2++) { var b2 = d22 + 5 * g2; var o22 = r4[b2]; var x = h2[b2]; var R2 = h2[(d22 + 1) % 5 + 5 * g2]; var B2 = h2[(d22 + 2) % 5 + 5 * g2]; o22.high = x.high ^ ~R2.high & B2.high; o22.low = x.low ^ ~R2.low & B2.low; } var o22 = r4[0]; var O2 = f2[u22]; o22.high ^= O2.high; o22.low ^= O2.low; } }, _doFinalize: function() { var t4 = this._data; var r4 = t4.words; 8 * this._nDataBytes; var s22 = 8 * t4.sigBytes; var a22 = 32 * this.blockSize; r4[s22 >>> 5] |= 1 << 24 - s22 % 32; r4[(e3.ceil((s22 + 1) / a22) * a22 >>> 5) - 1] |= 128; t4.sigBytes = 4 * r4.length; this._process(); var o22 = this._state; var u22 = this.cfg.outputLength / 8; var c22 = u22 / 8; var l22 = []; for (var f22 = 0; f22 < c22; f22++) { var h22 = o22[f22]; var d22 = h22.high; var v2 = h22.low; d22 = 16711935 & (d22 << 8 | d22 >>> 24) | 4278255360 & (d22 << 24 | d22 >>> 8); v2 = 16711935 & (v2 << 8 | v2 >>> 24) | 4278255360 & (v2 << 24 | v2 >>> 8); l22.push(v2); l22.push(d22); } return new n2.init(l22, u22); }, clone: function() { var t4 = s2.clone.call(this); var e4 = t4._state = this._state.slice(0); for (var r4 = 0; r4 < 25; r4++) e4[r4] = e4[r4].clone(); return t4; } }); r3.SHA3 = s2._createHelper(d2); r3.HmacSHA3 = s2._createHmacHelper(d2); })(Math); return t3.SHA3; }); }, 7460: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(4938), r22(34)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.x64; var i22 = r3.Word; var n2 = r3.WordArray; var s2 = e3.algo; var a2 = s2.SHA512; var o2 = s2.SHA384 = a2.extend({ _doReset: function() { this._hash = new n2.init([new i22.init(3418070365, 3238371032), new i22.init(1654270250, 914150663), new i22.init(2438529370, 812702999), new i22.init(355462360, 4144912697), new i22.init(1731405415, 4290775857), new i22.init(2394180231, 1750603025), new i22.init(3675008525, 1694076839), new i22.init(1203062813, 3204075428)]); }, _doFinalize: function() { var t4 = a2._doFinalize.call(this); t4.sigBytes -= 16; return t4; } }); e3.SHA384 = a2._createHelper(o2); e3.HmacSHA384 = a2._createHmacHelper(o2); })(); return t3.SHA384; }); }, 34: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(4938)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.Hasher; var n2 = e3.x64; var s2 = n2.Word; var a2 = n2.WordArray; var o2 = e3.algo; function u2() { return s2.create.apply(s2, arguments); } var c2 = [u2(1116352408, 3609767458), u2(1899447441, 602891725), u2(3049323471, 3964484399), u2(3921009573, 2173295548), u2(961987163, 4081628472), u2(1508970993, 3053834265), u2(2453635748, 2937671579), u2(2870763221, 3664609560), u2(3624381080, 2734883394), u2(310598401, 1164996542), u2(607225278, 1323610764), u2(1426881987, 3590304994), u2(1925078388, 4068182383), u2(2162078206, 991336113), u2(2614888103, 633803317), u2(3248222580, 3479774868), u2(3835390401, 2666613458), u2(4022224774, 944711139), u2(264347078, 2341262773), u2(604807628, 2007800933), u2(770255983, 1495990901), u2(1249150122, 1856431235), u2(1555081692, 3175218132), u2(1996064986, 2198950837), u2(2554220882, 3999719339), u2(2821834349, 766784016), u2(2952996808, 2566594879), u2(3210313671, 3203337956), u2(3336571891, 1034457026), u2(3584528711, 2466948901), u2(113926993, 3758326383), u2(338241895, 168717936), u2(666307205, 1188179964), u2(773529912, 1546045734), u2(1294757372, 1522805485), u2(1396182291, 2643833823), u2(1695183700, 2343527390), u2(1986661051, 1014477480), u2(2177026350, 1206759142), u2(2456956037, 344077627), u2(2730485921, 1290863460), u2(2820302411, 3158454273), u2(3259730800, 3505952657), u2(3345764771, 106217008), u2(3516065817, 3606008344), u2(3600352804, 1432725776), u2(4094571909, 1467031594), u2(275423344, 851169720), u2(430227734, 3100823752), u2(506948616, 1363258195), u2(659060556, 3750685593), u2(883997877, 3785050280), u2(958139571, 3318307427), u2(1322822218, 3812723403), u2(1537002063, 2003034995), u2(1747873779, 3602036899), u2(1955562222, 1575990012), u2(2024104815, 1125592928), u2(2227730452, 2716904306), u2(2361852424, 442776044), u2(2428436474, 593698344), u2(2756734187, 3733110249), u2(3204031479, 2999351573), u2(3329325298, 3815920427), u2(3391569614, 3928383900), u2(3515267271, 566280711), u2(3940187606, 3454069534), u2(4118630271, 4000239992), u2(116418474, 1914138554), u2(174292421, 2731055270), u2(289380356, 3203993006), u2(460393269, 320620315), u2(685471733, 587496836), u2(852142971, 1086792851), u2(1017036298, 365543100), u2(1126000580, 2618297676), u2(1288033470, 3409855158), u2(1501505948, 4234509866), u2(1607167915, 987167468), u2(1816402316, 1246189591)]; var l2 = []; (function() { for (var t4 = 0; t4 < 80; t4++) l2[t4] = u2(); })(); var f2 = o2.SHA512 = i22.extend({ _doReset: function() { this._hash = new a2.init([new s2.init(1779033703, 4089235720), new s2.init(3144134277, 2227873595), new s2.init(1013904242, 4271175723), new s2.init(2773480762, 1595750129), new s2.init(1359893119, 2917565137), new s2.init(2600822924, 725511199), new s2.init(528734635, 4215389547), new s2.init(1541459225, 327033209)]); }, _doProcessBlock: function(t4, e4) { var r4 = this._hash.words; var i3 = r4[0]; var n22 = r4[1]; var s22 = r4[2]; var a22 = r4[3]; var o22 = r4[4]; var u22 = r4[5]; var f22 = r4[6]; var h2 = r4[7]; var d2 = i3.high; var v2 = i3.low; var p2 = n22.high; var g2 = n22.low; var y2 = s22.high; var m2 = s22.low; var w2 = a22.high; var S2 = a22.low; var _2 = o22.high; var b2 = o22.low; var E2 = u22.high; var D2 = u22.low; var M2 = f22.high; var T2 = f22.low; var I2 = h2.high; var A2 = h2.low; var x = d2; var R2 = v2; var B2 = p2; var O2 = g2; var k = y2; var C2 = m2; var N2 = w2; var P2 = S2; var V2 = _2; var L2 = b2; var H2 = E2; var U2 = D2; var K2 = M2; var j2 = T2; var q2 = I2; var F2 = A2; for (var z2 = 0; z2 < 80; z2++) { var G2; var Y2; var W2 = l2[z2]; if (z2 < 16) { Y2 = W2.high = 0 | t4[e4 + 2 * z2]; G2 = W2.low = 0 | t4[e4 + 2 * z2 + 1]; } else { var J2 = l2[z2 - 15]; var Z2 = J2.high; var $2 = J2.low; var X2 = (Z2 >>> 1 | $2 << 31) ^ (Z2 >>> 8 | $2 << 24) ^ Z2 >>> 7; var Q2 = ($2 >>> 1 | Z2 << 31) ^ ($2 >>> 8 | Z2 << 24) ^ ($2 >>> 7 | Z2 << 25); var tt2 = l2[z2 - 2]; var et2 = tt2.high; var rt2 = tt2.low; var it2 = (et2 >>> 19 | rt2 << 13) ^ (et2 << 3 | rt2 >>> 29) ^ et2 >>> 6; var nt2 = (rt2 >>> 19 | et2 << 13) ^ (rt2 << 3 | et2 >>> 29) ^ (rt2 >>> 6 | et2 << 26); var st2 = l2[z2 - 7]; var at2 = st2.high; var ot2 = st2.low; var ut2 = l2[z2 - 16]; var ct2 = ut2.high; var lt2 = ut2.low; G2 = Q2 + ot2; Y2 = X2 + at2 + (G2 >>> 0 < Q2 >>> 0 ? 1 : 0); G2 += nt2; Y2 = Y2 + it2 + (G2 >>> 0 < nt2 >>> 0 ? 1 : 0); G2 += lt2; Y2 = Y2 + ct2 + (G2 >>> 0 < lt2 >>> 0 ? 1 : 0); W2.high = Y2; W2.low = G2; } var ft2 = V2 & H2 ^ ~V2 & K2; var ht2 = L2 & U2 ^ ~L2 & j2; var dt2 = x & B2 ^ x & k ^ B2 & k; var vt2 = R2 & O2 ^ R2 & C2 ^ O2 & C2; var pt2 = (x >>> 28 | R2 << 4) ^ (x << 30 | R2 >>> 2) ^ (x << 25 | R2 >>> 7); var gt2 = (R2 >>> 28 | x << 4) ^ (R2 << 30 | x >>> 2) ^ (R2 << 25 | x >>> 7); var yt2 = (V2 >>> 14 | L2 << 18) ^ (V2 >>> 18 | L2 << 14) ^ (V2 << 23 | L2 >>> 9); var mt2 = (L2 >>> 14 | V2 << 18) ^ (L2 >>> 18 | V2 << 14) ^ (L2 << 23 | V2 >>> 9); var wt2 = c2[z2]; var St2 = wt2.high; var _t2 = wt2.low; var bt2 = F2 + mt2; var Et2 = q2 + yt2 + (bt2 >>> 0 < F2 >>> 0 ? 1 : 0); var bt2 = bt2 + ht2; var Et2 = Et2 + ft2 + (bt2 >>> 0 < ht2 >>> 0 ? 1 : 0); var bt2 = bt2 + _t2; var Et2 = Et2 + St2 + (bt2 >>> 0 < _t2 >>> 0 ? 1 : 0); var bt2 = bt2 + G2; var Et2 = Et2 + Y2 + (bt2 >>> 0 < G2 >>> 0 ? 1 : 0); var Dt2 = gt2 + vt2; var Mt2 = pt2 + dt2 + (Dt2 >>> 0 < gt2 >>> 0 ? 1 : 0); q2 = K2; F2 = j2; K2 = H2; j2 = U2; H2 = V2; U2 = L2; L2 = P2 + bt2 | 0; V2 = N2 + Et2 + (L2 >>> 0 < P2 >>> 0 ? 1 : 0) | 0; N2 = k; P2 = C2; k = B2; C2 = O2; B2 = x; O2 = R2; R2 = bt2 + Dt2 | 0; x = Et2 + Mt2 + (R2 >>> 0 < bt2 >>> 0 ? 1 : 0) | 0; } v2 = i3.low = v2 + R2; i3.high = d2 + x + (v2 >>> 0 < R2 >>> 0 ? 1 : 0); g2 = n22.low = g2 + O2; n22.high = p2 + B2 + (g2 >>> 0 < O2 >>> 0 ? 1 : 0); m2 = s22.low = m2 + C2; s22.high = y2 + k + (m2 >>> 0 < C2 >>> 0 ? 1 : 0); S2 = a22.low = S2 + P2; a22.high = w2 + N2 + (S2 >>> 0 < P2 >>> 0 ? 1 : 0); b2 = o22.low = b2 + L2; o22.high = _2 + V2 + (b2 >>> 0 < L2 >>> 0 ? 1 : 0); D2 = u22.low = D2 + U2; u22.high = E2 + H2 + (D2 >>> 0 < U2 >>> 0 ? 1 : 0); T2 = f22.low = T2 + j2; f22.high = M2 + K2 + (T2 >>> 0 < j2 >>> 0 ? 1 : 0); A2 = h2.low = A2 + F2; h2.high = I2 + q2 + (A2 >>> 0 < F2 >>> 0 ? 1 : 0); }, _doFinalize: function() { var t4 = this._data; var e4 = t4.words; var r4 = 8 * this._nDataBytes; var i3 = 8 * t4.sigBytes; e4[i3 >>> 5] |= 128 << 24 - i3 % 32; e4[(i3 + 128 >>> 10 << 5) + 30] = Math.floor(r4 / 4294967296); e4[(i3 + 128 >>> 10 << 5) + 31] = r4; t4.sigBytes = 4 * e4.length; this._process(); var n22 = this._hash.toX32(); return n22; }, clone: function() { var t4 = i22.clone.call(this); t4._hash = this._hash.clone(); return t4; }, blockSize: 1024 / 32 }); e3.SHA512 = i22._createHelper(f2); e3.HmacSHA512 = i22._createHmacHelper(f2); })(); return t3.SHA512; }); }, 4253: function(t22, e22, r22) { (function(i22, n2, s2) { t22.exports = n2(r22(8249), r22(8269), r22(8214), r22(888), r22(5109)); })(this, function(t3) { (function() { var e3 = t3; var r3 = e3.lib; var i22 = r3.WordArray; var n2 = r3.BlockCipher; var s2 = e3.algo; var a2 = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4]; var o2 = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32]; var u2 = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; var c2 = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }]; var l2 = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679]; var f2 = s2.DES = n2.extend({ _doReset: function() { var t4 = this._key; var e4 = t4.words; var r4 = []; for (var i3 = 0; i3 < 56; i3++) { var n22 = a2[i3] - 1; r4[i3] = e4[n22 >>> 5] >>> 31 - n22 % 32 & 1; } var s22 = this._subKeys = []; for (var c22 = 0; c22 < 16; c22++) { var l22 = s22[c22] = []; var f22 = u2[c22]; for (var i3 = 0; i3 < 24; i3++) { l22[i3 / 6 | 0] |= r4[(o2[i3] - 1 + f22) % 28] << 31 - i3 % 6; l22[4 + (i3 / 6 | 0)] |= r4[28 + (o2[i3 + 24] - 1 + f22) % 28] << 31 - i3 % 6; } l22[0] = l22[0] << 1 | l22[0] >>> 31; for (var i3 = 1; i3 < 7; i3++) l22[i3] = l22[i3] >>> 4 * (i3 - 1) + 3; l22[7] = l22[7] << 5 | l22[7] >>> 27; } var h22 = this._invSubKeys = []; for (var i3 = 0; i3 < 16; i3++) h22[i3] = s22[15 - i3]; }, encryptBlock: function(t4, e4) { this._doCryptBlock(t4, e4, this._subKeys); }, decryptBlock: function(t4, e4) { this._doCryptBlock(t4, e4, this._invSubKeys); }, _doCryptBlock: function(t4, e4, r4) { this._lBlock = t4[e4]; this._rBlock = t4[e4 + 1]; h2.call(this, 4, 252645135); h2.call(this, 16, 65535); d2.call(this, 2, 858993459); d2.call(this, 8, 16711935); h2.call(this, 1, 1431655765); for (var i3 = 0; i3 < 16; i3++) { var n22 = r4[i3]; var s22 = this._lBlock; var a22 = this._rBlock; var o22 = 0; for (var u22 = 0; u22 < 8; u22++) o22 |= c2[u22][((a22 ^ n22[u22]) & l2[u22]) >>> 0]; this._lBlock = a22; this._rBlock = s22 ^ o22; } var f22 = this._lBlock; this._lBlock = this._rBlock; this._rBlock = f22; h2.call(this, 1, 1431655765); d2.call(this, 8, 16711935); d2.call(this, 2, 858993459); h2.call(this, 16, 65535); h2.call(this, 4, 252645135); t4[e4] = this._lBlock; t4[e4 + 1] = this._rBlock; }, keySize: 64 / 32, ivSize: 64 / 32, blockSize: 64 / 32 }); function h2(t4, e4) { var r4 = (this._lBlock >>> t4 ^ this._rBlock) & e4; this._rBlock ^= r4; this._lBlock ^= r4 << t4; } function d2(t4, e4) { var r4 = (this._rBlock >>> t4 ^ this._lBlock) & e4; this._lBlock ^= r4; this._rBlock ^= r4 << t4; } e3.DES = n2._createHelper(f2); var v2 = s2.TripleDES = n2.extend({ _doReset: function() { var t4 = this._key; var e4 = t4.words; if (2 !== e4.length && 4 !== e4.length && e4.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); var r4 = e4.slice(0, 2); var n22 = e4.length < 4 ? e4.slice(0, 2) : e4.slice(2, 4); var s22 = e4.length < 6 ? e4.slice(0, 2) : e4.slice(4, 6); this._des1 = f2.createEncryptor(i22.create(r4)); this._des2 = f2.createEncryptor(i22.create(n22)); this._des3 = f2.createEncryptor(i22.create(s22)); }, encryptBlock: function(t4, e4) { this._des1.encryptBlock(t4, e4); this._des2.decryptBlock(t4, e4); this._des3.encryptBlock(t4, e4); }, decryptBlock: function(t4, e4) { this._des3.decryptBlock(t4, e4); this._des2.encryptBlock(t4, e4); this._des1.decryptBlock(t4, e4); }, keySize: 192 / 32, ivSize: 64 / 32, blockSize: 64 / 32 }); e3.TripleDES = n2._createHelper(v2); })(); return t3.TripleDES; }); }, 4938: function(t22, e22, r22) { (function(i22, n2) { t22.exports = n2(r22(8249)); })(this, function(t3) { (function(e3) { var r3 = t3; var i22 = r3.lib; var n2 = i22.Base; var s2 = i22.WordArray; var a2 = r3.x64 = {}; a2.Word = n2.extend({ init: function(t4, e4) { this.high = t4; this.low = e4; } }); a2.WordArray = n2.extend({ init: function(t4, r4) { t4 = this.words = t4 || []; if (r4 != e3) this.sigBytes = r4; else this.sigBytes = 8 * t4.length; }, toX32: function() { var t4 = this.words; var e4 = t4.length; var r4 = []; for (var i3 = 0; i3 < e4; i3++) { var n22 = t4[i3]; r4.push(n22.high); r4.push(n22.low); } return s2.create(r4, this.sigBytes); }, clone: function() { var t4 = n2.clone.call(this); var e4 = t4.words = this.words.slice(0); var r4 = e4.length; for (var i3 = 0; i3 < r4; i3++) e4[i3] = e4[i3].clone(); return t4; } }); })(); return t3; }); }, 4198: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); e22.ErrorCode = void 0; (function(t3) { t3[t3["SUCCESS"] = 0] = "SUCCESS"; t3[t3["CLIENT_ID_NOT_FOUND"] = 1] = "CLIENT_ID_NOT_FOUND"; t3[t3["OPERATION_TOO_OFTEN"] = 2] = "OPERATION_TOO_OFTEN"; t3[t3["REPEAT_MESSAGE"] = 3] = "REPEAT_MESSAGE"; t3[t3["TIME_OUT"] = 4] = "TIME_OUT"; })(e22.ErrorCode || (e22.ErrorCode = {})); }, 9021: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; const n2 = i22(r22(6893)); const s2 = i22(r22(7555)); const a2 = i22(r22(6379)); const o2 = i22(r22(529)); var u2; (function(t3) { function e3(t4) { o2.default.debugMode = t4; o2.default.info(`setDebugMode: ${t4}`); } t3.setDebugMode = e3; function r3(t4) { try { s2.default.init(t4); } catch (t5) { o2.default.error(`init error`, t5); } } t3.init = r3; function i3(t4) { try { if (!t4.url) throw new Error("invalid url"); if (!t4.key || !t4.keyId) throw new Error("invalid key or keyId"); a2.default.socketUrl = t4.url; a2.default.publicKeyId = t4.keyId; a2.default.publicKey = t4.key; } catch (t5) { o2.default.error(`setSocketServer error`, t5); } } t3.setSocketServer = i3; function u22(t4) { try { s2.default.enableSocket(t4); } catch (t5) { o2.default.error(`enableSocket error`, t5); } } t3.enableSocket = u22; function c2() { return n2.default.SDK_VERSION; } t3.getVersion = c2; })(u2 || (u2 = {})); t22.exports = u2; }, 9478: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(529)); const s2 = i22(r22(496)); const a2 = i22(r22(3555)); const o2 = i22(r22(1929)); const u2 = i22(r22(4379)); const c2 = i22(r22(6899)); const l2 = i22(r22(776)); const f2 = i22(r22(2002)); const h2 = i22(r22(5807)); const d2 = i22(r22(9704)); const v2 = i22(r22(6545)); const p2 = i22(r22(3680)); const g2 = i22(r22(7706)); const y2 = i22(r22(4486)); const m2 = i22(r22(5867)); const w2 = i22(r22(7006)); var S2; (function(t3) { let e3; let r3; let i3; function S22() { let t4; try { if ("undefined" != typeof uni) { e3 = new v2.default(); r3 = new p2.default(); i3 = new g2.default(); } else if ("undefined" != typeof tt) { e3 = new f2.default(); r3 = new h2.default(); i3 = new d2.default(); } else if ("undefined" != typeof my) { e3 = new s2.default(); r3 = new a2.default(); i3 = new o2.default(); } else if ("undefined" != typeof wx) { e3 = new y2.default(); r3 = new m2.default(); i3 = new w2.default(); } else if ("undefined" != typeof window) { e3 = new u2.default(); r3 = new c2.default(); i3 = new l2.default(); } } catch (e4) { n2.default.error(`init am error: ${e4}`); t4 = e4; } if (!e3 || !r3 || !i3) { if ("undefined" != typeof window) { e3 = new u2.default(); r3 = new c2.default(); i3 = new l2.default(); } } if (!e3 || !r3 || !i3) throw new Error(`init am error: no api impl found, ${t4}`); } function _2() { if (!e3) S22(); return e3; } t3.getDevice = _2; function b2() { if (!r3) S22(); return r3; } t3.getStorage = b2; function E2() { if (!i3) S22(); return i3; } t3.getWebSocket = E2; })(S2 || (S2 = {})); e22["default"] = S2; }, 4685: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(9478)); var s2; (function(t3) { function e3() { return n2.default.getDevice().os(); } t3.os = e3; function r3() { return n2.default.getDevice().osVersion(); } t3.osVersion = r3; function i3() { return n2.default.getDevice().model(); } t3.model = i3; function s22() { return n2.default.getDevice().brand(); } t3.brand = s22; function a2() { return n2.default.getDevice().platform(); } t3.platform = a2; function o2() { return n2.default.getDevice().platformVersion(); } t3.platformVersion = o2; function u2() { return n2.default.getDevice().platformId(); } t3.platformId = u2; function c2() { return n2.default.getDevice().language(); } t3.language = c2; function l2() { let t4 = n2.default.getDevice().userAgent; if (t4) return t4(); return ""; } t3.userAgent = l2; function f2(t4) { n2.default.getDevice().getNetworkType(t4); } t3.getNetworkType = f2; function h2(t4) { n2.default.getDevice().onNetworkStatusChange(t4); } t3.onNetworkStatusChange = h2; })(s2 || (s2 = {})); e22["default"] = s2; }, 7002: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(6379)); const s2 = i22(r22(1386)); const a2 = i22(r22(4054)); const o2 = r22(2918); const u2 = i22(r22(7167)); const c2 = i22(r22(529)); const l2 = i22(r22(9478)); const f2 = i22(r22(8506)); var h2; (function(t3) { let e3; let r3 = false; let i3 = false; let h22 = false; let d2 = []; const v2 = 10; let p2 = 0; t3.allowReconnect = true; function g2() { return r3 && i3; } t3.isAvailable = g2; function y2(e4) { let r4 = (/* @__PURE__ */ new Date()).getTime(); if (r4 - p2 < 1e3) { c2.default.warn(`enableSocket ${e4} fail: this function can only be called once a second`); return; } p2 = r4; t3.allowReconnect = e4; if (e4) t3.reconnect(10); else t3.close(`enableSocket ${e4}`); } t3.enableSocket = y2; function m2(e4 = 0) { if (!t3.allowReconnect) return; if (!_2()) return; setTimeout(function() { w2(); }, e4); } t3.reconnect = m2; function w2() { t3.allowReconnect = true; if (!_2()) return; if (!b2()) return; h22 = true; let r4 = n2.default.socketUrl; try { let t4 = f2.default.getSync(f2.default.KEY_REDIRECT_SERVER, ""); if (t4) { let e4 = o2.RedirectServerData.parse(t4); let i4 = e4.addressList[0].split(","); let n22 = i4[0]; let s22 = Number(i4[1]); let a22 = (/* @__PURE__ */ new Date()).getTime(); if (a22 - e4.time < 1e3 * s22) r4 = n22; } } catch (t4) { } e3 = l2.default.getWebSocket().connect({ url: r4, success: function() { i3 = true; S2(); }, fail: function() { i3 = false; M2(); m2(100); } }); e3.onOpen(T2); e3.onClose(x); e3.onError(A2); e3.onMessage(I2); } t3.connect = w2; function S2() { if (i3 && r3) { h22 = false; s2.default.create().send(); u2.default.getInstance().start(); } } function _2() { if (!n2.default.networkConnected) { c2.default.error(`connect failed, network is not available`); return false; } if (h22) { c2.default.warn(`connecting`); return false; } if (g2()) { c2.default.warn(`already connected`); return false; } return true; } function b2() { var t4 = d2.length; let e4 = (/* @__PURE__ */ new Date()).getTime(); if (t4 > 0) { for (var r4 = t4 - 1; r4 >= 0; r4--) if (e4 - d2[r4] > 5e3) { d2.splice(0, r4 + 1); break; } } t4 = d2.length; d2.push(e4); if (t4 >= v2) { c2.default.error("connect failed, connection limit reached"); return false; } return true; } function E2(t4 = "") { null === e3 || void 0 === e3 || e3.close({ code: 1e3, reason: t4, success: function(t5) { }, fail: function(t5) { } }); M2(); } t3.close = E2; function D2(t4) { if (r3 && r3) null === e3 || void 0 === e3 || e3.send({ data: t4, success: function(t5) { }, fail: function(t5) { } }); else throw new Error(`socket not connect`); } t3.send = D2; function M2(t4) { var e4; i3 = false; r3 = false; h22 = false; u2.default.getInstance().cancel(); if (n2.default.online) { n2.default.online = false; null === (e4 = n2.default.onlineState) || void 0 === e4 || e4.call(n2.default.onlineState, { online: n2.default.online }); } } let T2 = function(t4) { r3 = true; S2(); }; let I2 = function(t4) { try { t4.data; u2.default.getInstance().refresh(); a2.default.receiveMessage(t4.data); } catch (t5) { } }; let A2 = function(t4) { E2(`socket error`); }; let x = function(t4) { M2(); }; })(h2 || (h2 = {})); e22["default"] = h2; }, 8506: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(9478)); var s2; (function(t3) { t3.KEY_APPID = "getui_appid"; t3.KEY_CID = "getui_cid"; t3.KEY_SESSION = "getui_session"; t3.KEY_REGID = "getui_regid"; t3.KEY_SOCKET_URL = "getui_socket_url"; t3.KEY_DEVICE_ID = "getui_deviceid"; t3.KEY_ADD_PHONE_INFO_TIME = "getui_api_time"; t3.KEY_BIND_ALIAS_TIME = "getui_ba_time"; t3.KEY_SET_TAG_TIME = "getui_st_time"; t3.KEY_REDIRECT_SERVER = "getui_redirect_server"; t3.KEY_LAST_CONNECT_TIME = "getui_last_connect_time"; function e3(t4) { n2.default.getStorage().set(t4); } t3.set = e3; function r3(t4, e4) { n2.default.getStorage().setSync(t4, e4); } t3.setSync = r3; function i3(t4) { n2.default.getStorage().get(t4); } t3.get = i3; function s22(t4, e4) { let r4 = n2.default.getStorage().getSync(t4); return r4 ? r4 : e4; } t3.getSync = s22; })(s2 || (s2 = {})); e22["default"] = s2; }, 496: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; const n2 = i22(r22(3854)); class s2 { constructor() { this.systemInfo = my.getSystemInfoSync(); } os() { return n2.default.getStr(this.systemInfo, "platform"); } osVersion() { return n2.default.getStr(this.systemInfo, "system"); } model() { return n2.default.getStr(this.systemInfo, "model"); } brand() { return n2.default.getStr(this.systemInfo, "brand"); } platform() { return "MP-ALIPAY"; } platformVersion() { return n2.default.getStr(this.systemInfo, "app") + " " + n2.default.getStr(this.systemInfo, "version"); } platformId() { return my.getAppIdSync(); } language() { return n2.default.getStr(this.systemInfo, "language"); } getNetworkType(t3) { my.getNetworkType({ success: (e3) => { var r3; null === (r3 = t3.success) || void 0 === r3 || r3.call(t3.success, { networkType: e3.networkType }); }, fail: () => { var e3; null === (e3 = t3.fail) || void 0 === e3 || e3.call(t3.fail, ""); } }); } onNetworkStatusChange(t3) { my.onNetworkStatusChange(t3); } } t22.exports = s2; }, 3555: (t22) => { class e22 { set(t3) { my.setStorage({ key: t3.key, data: t3.data, success: t3.success, fail: t3.fail }); } setSync(t3, e3) { my.setStorageSync({ key: t3, data: e3 }); } get(t3) { my.getStorage({ key: t3.key, success: t3.success, fail: t3.fail, complete: t3.complete }); } getSync(t3) { return my.getStorageSync({ key: t3 }).data; } } t22.exports = e22; }, 1929: (t22) => { class e22 { connect(t3) { my.connectSocket({ url: t3.url, header: t3.header, method: t3.method, success: t3.success, fail: t3.fail, complete: t3.complete }); return { onOpen: my.onSocketOpen, send: my.sendSocketMessage, onMessage: (t4) => { my.onSocketMessage.call(my.onSocketMessage, (e3) => { t4.call(t4, { data: e3 ? e3.data : "" }); }); }, onError: my.onSocketError, onClose: my.onSocketClose, close: my.closeSocket }; } } t22.exports = e22; }, 4379: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { os() { let t3 = window.navigator.userAgent.toLowerCase(); if (t3.indexOf("android") > 0 || t3.indexOf("adr") > 0) return "android"; if (!!t3.match(/\(i[^;]+;( u;)? cpu.+mac os x/)) return "ios"; if (t3.indexOf("windows") > 0 || t3.indexOf("win32") > 0 || t3.indexOf("win64") > 0) return "windows"; if (t3.indexOf("macintosh") > 0 || t3.indexOf("mac os") > 0) return "mac os"; if (t3.indexOf("linux") > 0) return "linux"; if (t3.indexOf("unix") > 0) return "linux"; return "other"; } osVersion() { let t3 = window.navigator.userAgent.toLowerCase(); let e3 = t3.substring(t3.indexOf(";") + 1).trim(); if (e3.indexOf(";") > 0) return e3.substring(0, e3.indexOf(";")).trim(); return e3.substring(0, e3.indexOf(")")).trim(); } model() { return ""; } brand() { return ""; } platform() { return "H5"; } platformVersion() { return ""; } platformId() { return ""; } language() { return window.navigator.language; } userAgent() { return window.navigator.userAgent; } getNetworkType(t3) { var e3; null === (e3 = t3.success) || void 0 === e3 || e3.call(t3.success, { networkType: window.navigator.onLine ? "unknown" : "none" }); } onNetworkStatusChange(t3) { } } e22["default"] = r22; }, 6899: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { set(t3) { var e3; window.localStorage.setItem(t3.key, t3.data); null === (e3 = t3.success) || void 0 === e3 || e3.call(t3.success, ""); } setSync(t3, e3) { window.localStorage.setItem(t3, e3); } get(t3) { var e3; let r3 = window.localStorage.getItem(t3.key); null === (e3 = t3.success) || void 0 === e3 || e3.call(t3.success, r3); } getSync(t3) { return window.localStorage.getItem(t3); } } e22["default"] = r22; }, 776: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { connect(t3) { let e3 = new WebSocket(t3.url); return { send: (t4) => { var r3, i22; try { e3.send(t4.data); null === (r3 = t4.success) || void 0 === r3 || r3.call(t4.success, { errMsg: "" }); } catch (e4) { null === (i22 = t4.fail) || void 0 === i22 || i22.call(t4.fail, { errMsg: e4 + "" }); } }, close: (t4) => { var r3, i22; try { e3.close(t4.code, t4.reason); null === (r3 = t4.success) || void 0 === r3 || r3.call(t4.success, { errMsg: "" }); } catch (e4) { null === (i22 = t4.fail) || void 0 === i22 || i22.call(t4.fail, { errMsg: e4 + "" }); } }, onOpen: (r3) => { e3.onopen = (e4) => { var i22; null === (i22 = t3.success) || void 0 === i22 || i22.call(t3.success, ""); r3({ header: "" }); }; }, onError: (r3) => { e3.onerror = (e4) => { var i22; null === (i22 = t3.fail) || void 0 === i22 || i22.call(t3.fail, ""); r3({ errMsg: "" }); }; }, onMessage: (t4) => { e3.onmessage = (e4) => { t4({ data: e4.data }); }; }, onClose: (t4) => { e3.onclose = (e4) => { t4(e4); }; } }; } } e22["default"] = r22; }, 2002: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(3854)); class s2 { constructor() { this.systemInfo = tt.getSystemInfoSync(); } os() { return n2.default.getStr(this.systemInfo, "platform"); } osVersion() { return n2.default.getStr(this.systemInfo, "system"); } model() { return n2.default.getStr(this.systemInfo, "model"); } brand() { return n2.default.getStr(this.systemInfo, "brand"); } platform() { return "MP-TOUTIAO"; } platformVersion() { return n2.default.getStr(this.systemInfo, "appName") + " " + n2.default.getStr(this.systemInfo, "version"); } language() { return ""; } platformId() { return ""; } getNetworkType(t3) { tt.getNetworkType(t3); } onNetworkStatusChange(t3) { tt.onNetworkStatusChange(t3); } } e22["default"] = s2; }, 5807: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { set(t3) { tt.setStorage(t3); } setSync(t3, e3) { tt.setStorageSync(t3, e3); } get(t3) { tt.getStorage(t3); } getSync(t3) { return tt.getStorageSync(t3); } } e22["default"] = r22; }, 9704: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { connect(t3) { let e3 = tt.connectSocket({ url: t3.url, header: t3.header, protocols: t3.protocols, success: t3.success, fail: t3.fail, complete: t3.complete }); return { onOpen: e3.onOpen, send: e3.send, onMessage: e3.onMessage, onError: e3.onError, onClose: e3.onClose, close: e3.close }; } } e22["default"] = r22; }, 6545: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(3854)); class s2 { constructor() { try { this.systemInfo = uni.getSystemInfoSync(); this.accountInfo = uni.getAccountInfoSync(); } catch (t3) { } } os() { return n2.default.getStr(this.systemInfo, "platform"); } model() { return n2.default.getStr(this.systemInfo, "model"); } brand() { return n2.default.getStr(this.systemInfo, "brand"); } osVersion() { return n2.default.getStr(this.systemInfo, "system"); } platform() { let t3 = ""; t3 = "APP-PLUS"; return t3; } platformVersion() { return this.systemInfo ? this.systemInfo.version : ""; } platformId() { return this.accountInfo ? this.accountInfo.miniProgram.appId : ""; } language() { var t3; return (null === (t3 = this.systemInfo) || void 0 === t3 ? void 0 : t3.language) ? this.systemInfo.language : ""; } userAgent() { return window ? window.navigator.userAgent : ""; } getNetworkType(t3) { uni.getNetworkType(t3); } onNetworkStatusChange(t3) { uni.onNetworkStatusChange(t3); } } e22["default"] = s2; }, 3680: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { set(t3) { uni.setStorage(t3); } setSync(t3, e3) { uni.setStorageSync(t3, e3); } get(t3) { uni.getStorage(t3); } getSync(t3) { return uni.getStorageSync(t3); } } e22["default"] = r22; }, 7706: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { connect(t3) { let e3 = uni.connectSocket(t3); return { send: (t4) => { null === e3 || void 0 === e3 || e3.send(t4); }, close: (t4) => { null === e3 || void 0 === e3 || e3.close(t4); }, onOpen: (t4) => { null === e3 || void 0 === e3 || e3.onOpen(t4); }, onError: (t4) => { null === e3 || void 0 === e3 || e3.onError(t4); }, onMessage: (t4) => { null === e3 || void 0 === e3 || e3.onMessage(t4); }, onClose: (t4) => { null === e3 || void 0 === e3 || e3.onClose(t4); } }; } } e22["default"] = r22; }, 4486: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(3854)); class s2 { constructor() { this.systemInfo = wx.getSystemInfoSync(); } os() { return n2.default.getStr(this.systemInfo, "platform"); } osVersion() { return n2.default.getStr(this.systemInfo, "system"); } model() { return n2.default.getStr(this.systemInfo, "model"); } brand() { return n2.default.getStr(this.systemInfo, "brand"); } platform() { return "MP-WEIXIN"; } platformVersion() { return n2.default.getStr(this.systemInfo, "version"); } language() { return n2.default.getStr(this.systemInfo, "language"); } platformId() { if (wx.canIUse("getAccountInfoSync")) return wx.getAccountInfoSync().miniProgram.appId; return ""; } getNetworkType(t3) { wx.getNetworkType({ success: (e3) => { var r3; null === (r3 = t3.success) || void 0 === r3 || r3.call(t3.success, { networkType: e3.networkType }); }, fail: t3.fail }); } onNetworkStatusChange(t3) { wx.onNetworkStatusChange(t3); } } e22["default"] = s2; }, 5867: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { set(t3) { wx.setStorage(t3); } setSync(t3, e3) { wx.setStorageSync(t3, e3); } get(t3) { wx.getStorage(t3); } getSync(t3) { return wx.getStorageSync(t3); } } e22["default"] = r22; }, 7006: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { connect(t3) { let e3 = wx.connectSocket({ url: t3.url, header: t3.header, protocols: t3.protocols, success: t3.success, fail: t3.fail, complete: t3.complete }); return { onOpen: e3.onOpen, send: e3.send, onMessage: e3.onMessage, onError: e3.onError, onClose: e3.onClose, close: e3.close }; } } e22["default"] = r22; }, 6893: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); var r22; (function(t3) { t3.SDK_VERSION = "GTMP-2.0.4.dcloud"; t3.DEFAULT_SOCKET_URL = "wss://wshzn.gepush.com:5223/nws"; t3.SOCKET_PROTOCOL_VERSION = "1.0"; t3.SERVER_PUBLIC_KEY = "MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAJp1rROuvBF7sBSnvLaesj2iFhMcY8aXyLvpnNLKs2wjL3JmEnyr++SlVa35liUlzi83tnAFkn3A9GB7pHBNzawyUkBh8WUhq5bnFIkk2RaDa6+5MpG84DEv52p7RR+aWwIDAQAB"; t3.SERVER_PUBLIC_KEY_ID = "69d747c4b9f641baf4004be4297e9f3b"; t3.ID_U_2_G = true; })(r22 || (r22 = {})); e22["default"] = r22; }, 7555: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(7002)); const s2 = i22(r22(529)); const a2 = i22(r22(6379)); class o2 { static init(t3) { var e3; if (this.inited) return; try { this.checkAppid(t3.appid); this.inited = true; s2.default.info(`init: appid=${t3.appid}`); a2.default.init(t3); n2.default.connect(); } catch (r3) { this.inited = false; null === (e3 = t3.onError) || void 0 === e3 || e3.call(t3.onError, { error: r3 }); throw r3; } } static enableSocket(t3) { this.checkInit(); n2.default.enableSocket(t3); } static checkInit() { if (!this.inited) throw new Error(`not init, please invoke init method firstly`); } static checkAppid(t3) { if (null == t3 || void 0 == t3 || "" == t3.trim()) throw new Error(`invalid appid ${t3}`); } } o2.inited = false; e22["default"] = o2; }, 6379: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(6667)); const s2 = i22(r22(8506)); const a2 = i22(r22(6893)); const o2 = i22(r22(7002)); const u2 = i22(r22(529)); const c2 = i22(r22(4685)); const l2 = i22(r22(2323)); class f2 { static init(t3) { var e3; if (a2.default.ID_U_2_G) this.appid = l2.default.to_getui(t3.appid); else this.appid = t3.appid; this.onError = t3.onError; this.onClientId = t3.onClientId; this.onlineState = t3.onlineState; this.onPushMsg = t3.onPushMsg; if (this.appid != s2.default.getSync(s2.default.KEY_APPID, this.appid)) { u2.default.info("appid changed, clear session and cid"); s2.default.setSync(s2.default.KEY_CID, ""); s2.default.setSync(s2.default.KEY_SESSION, ""); } s2.default.setSync(s2.default.KEY_APPID, this.appid); this.cid = s2.default.getSync(s2.default.KEY_CID, this.cid); if (this.cid) null === (e3 = this.onClientId) || void 0 === e3 || e3.call(this.onClientId, { cid: f2.cid }); this.session = s2.default.getSync(s2.default.KEY_SESSION, this.session); this.deviceId = s2.default.getSync(s2.default.KEY_DEVICE_ID, this.deviceId); this.regId = s2.default.getSync(s2.default.KEY_REGID, this.regId); if (!this.regId) { this.regId = this.createRegId(); s2.default.set({ key: s2.default.KEY_REGID, data: this.regId }); } this.socketUrl = s2.default.getSync(s2.default.KEY_SOCKET_URL, this.socketUrl); let r3 = this; c2.default.getNetworkType({ success: (t4) => { r3.networkType = t4.networkType; r3.networkConnected = "none" != r3.networkType && "" != r3.networkType; } }); c2.default.onNetworkStatusChange((t4) => { r3.networkConnected = t4.isConnected; r3.networkType = t4.networkType; if (r3.networkConnected) o2.default.reconnect(100); }); } static createRegId() { return `M-V${n2.default.md5Hex(this.getUuid())}-${(/* @__PURE__ */ new Date()).getTime()}`; } static getUuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t3) { let e3 = 16 * Math.random() | 0, r3 = "x" === t3 ? e3 : 3 & e3 | 8; return r3.toString(16); }); } } f2.appid = ""; f2.cid = ""; f2.regId = ""; f2.session = ""; f2.deviceId = ""; f2.packetId = 1; f2.online = false; f2.socketUrl = a2.default.DEFAULT_SOCKET_URL; f2.publicKeyId = a2.default.SERVER_PUBLIC_KEY_ID; f2.publicKey = a2.default.SERVER_PUBLIC_KEY; f2.lastAliasTime = 0; f2.networkConnected = true; f2.networkType = "none"; e22["default"] = f2; }, 9586: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; var n2, s2; Object.defineProperty(e22, "__esModule", { value: true }); const a2 = i22(r22(661)); const o2 = r22(4198); const u2 = i22(r22(6379)); class c2 extends a2.default { constructor() { super(...arguments); this.actionMsgData = new l2(); } static initActionMsg(t3, ...e3) { super.initMsg(t3); t3.command = a2.default.Command.CLIENT_MSG; t3.data = t3.actionMsgData = l2.create(); return t3; } static parseActionMsg(t3, e3) { super.parseMsg(t3, e3); t3.actionMsgData = l2.parse(t3.data); return t3; } send() { setTimeout(() => { var t3; if (c2.waitingLoginMsgMap.has(this.actionMsgData.msgId) || c2.waitingResponseMsgMap.has(this.actionMsgData.msgId)) { c2.waitingLoginMsgMap.delete(this.actionMsgData.msgId); c2.waitingResponseMsgMap.delete(this.actionMsgData.msgId); null === (t3 = this.callback) || void 0 === t3 || t3.call(this.callback, { resultCode: o2.ErrorCode.TIME_OUT, message: "waiting time out" }); } }, 1e4); if (!u2.default.online) { c2.waitingLoginMsgMap.set(this.actionMsgData.msgId, this); return; } if (this.actionMsgData.msgAction != c2.ClientAction.RECEIVED) c2.waitingResponseMsgMap.set(this.actionMsgData.msgId, this); super.send(); } receive() { } static sendWaitingMessages() { let t3 = this.waitingLoginMsgMap.keys(); let e3; while (e3 = t3.next(), !e3.done) { let t4 = this.waitingLoginMsgMap.get(e3.value); this.waitingLoginMsgMap.delete(e3.value); null === t4 || void 0 === t4 || t4.send(); } } static getWaitingResponseMessage(t3) { return c2.waitingResponseMsgMap.get(t3); } static removeWaitingResponseMessage(t3) { let e3 = c2.waitingResponseMsgMap.get(t3); if (e3) c2.waitingResponseMsgMap.delete(t3); return e3; } } c2.ServerAction = (n2 = class { }, n2.PUSH_MESSAGE = "pushmessage", n2.REDIRECT_SERVER = "redirect_server", n2.ADD_PHONE_INFO_RESULT = "addphoneinfo", n2.SET_MODE_RESULT = "set_mode_result", n2.SET_TAG_RESULT = "settag_result", n2.BIND_ALIAS_RESULT = "response_bind", n2.UNBIND_ALIAS_RESULT = "response_unbind", n2.FEED_BACK_RESULT = "pushmessage_feedback", n2.RECEIVED = "received", n2); c2.ClientAction = (s2 = class { }, s2.ADD_PHONE_INFO = "addphoneinfo", s2.SET_MODE = "set_mode", s2.FEED_BACK = "pushmessage_feedback", s2.SET_TAGS = "set_tag", s2.BIND_ALIAS = "bind_alias", s2.UNBIND_ALIAS = "unbind_alias", s2.RECEIVED = "received", s2); c2.waitingLoginMsgMap = /* @__PURE__ */ new Map(); c2.waitingResponseMsgMap = /* @__PURE__ */ new Map(); class l2 { constructor() { this.appId = ""; this.cid = ""; this.msgId = ""; this.msgAction = ""; this.msgData = ""; this.msgExtraData = ""; } static create() { let t3 = new l2(); t3.appId = u2.default.appid; t3.cid = u2.default.cid; t3.msgId = (2147483647 & (/* @__PURE__ */ new Date()).getTime()).toString(); return t3; } static parse(t3) { let e3 = new l2(); let r3 = JSON.parse(t3); e3.appId = r3.appId; e3.cid = r3.cid; e3.msgId = r3.msgId; e3.msgAction = r3.msgAction; e3.msgData = r3.msgData; e3.msgExtraData = r3.msgExtraData; return e3; } } e22["default"] = c2; }, 4516: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(4685)); const s2 = i22(r22(8506)); const a2 = i22(r22(6893)); const o2 = r22(4198); const u2 = i22(r22(9586)); const c2 = i22(r22(6379)); class l2 extends u2.default { constructor() { super(...arguments); this.addPhoneInfoData = new f2(); } static create() { let t3 = new l2(); super.initActionMsg(t3); t3.callback = (e3) => { if (e3.resultCode != o2.ErrorCode.SUCCESS && e3.resultCode != o2.ErrorCode.REPEAT_MESSAGE) setTimeout(function() { t3.send(); }, 30 * 1e3); else s2.default.set({ key: s2.default.KEY_ADD_PHONE_INFO_TIME, data: (/* @__PURE__ */ new Date()).getTime() }); }; t3.actionMsgData.msgAction = u2.default.ClientAction.ADD_PHONE_INFO; t3.addPhoneInfoData = f2.create(); t3.actionMsgData.msgData = JSON.stringify(t3.addPhoneInfoData); return t3; } send() { let t3 = (/* @__PURE__ */ new Date()).getTime(); let e3 = s2.default.getSync(s2.default.KEY_ADD_PHONE_INFO_TIME, 0); if (t3 - e3 < 24 * 60 * 60 * 1e3) return; super.send(); } } class f2 { constructor() { this.model = ""; this.brand = ""; this.system_version = ""; this.version = ""; this.deviceid = ""; this.type = ""; } static create() { let t3 = new f2(); t3.model = n2.default.model(); t3.brand = n2.default.brand(); t3.system_version = n2.default.osVersion(); t3.version = a2.default.SDK_VERSION; t3.device_token = ""; t3.imei = ""; t3.oaid = ""; t3.mac = ""; t3.idfa = ""; t3.type = "MINIPROGRAM"; t3.deviceid = `${t3.type}-${c2.default.deviceId}`; t3.extra = { os: n2.default.os(), platform: n2.default.platform(), platformVersion: n2.default.platformVersion(), platformId: n2.default.platformId(), language: n2.default.language(), userAgent: n2.default.userAgent() }; return t3; } } e22["default"] = l2; }, 8723: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; var n2, s2; Object.defineProperty(e22, "__esModule", { value: true }); const a2 = i22(r22(6379)); const o2 = r22(4198); const u2 = i22(r22(9586)); class c2 extends u2.default { constructor() { super(...arguments); this.feedbackData = new l2(); } static create(t3, e3) { let r3 = new c2(); super.initActionMsg(r3); r3.callback = (t4) => { if (t4.resultCode != o2.ErrorCode.SUCCESS && t4.resultCode != o2.ErrorCode.REPEAT_MESSAGE) setTimeout(function() { r3.send(); }, 30 * 1e3); }; r3.feedbackData = l2.create(t3, e3); r3.actionMsgData.msgAction = u2.default.ClientAction.FEED_BACK; r3.actionMsgData.msgData = JSON.stringify(r3.feedbackData); return r3; } send() { super.send(); } } c2.ActionId = (n2 = class { }, n2.RECEIVE = "0", n2.MP_RECEIVE = "210000", n2.WEB_RECEIVE = "220000", n2.BEGIN = "1", n2); c2.RESULT = (s2 = class { }, s2.OK = "ok", s2); class l2 { constructor() { this.messageid = ""; this.appkey = ""; this.appid = ""; this.taskid = ""; this.actionid = ""; this.result = ""; this.timestamp = ""; } static create(t3, e3) { let r3 = new l2(); r3.messageid = t3.pushMessageData.messageid; r3.appkey = t3.pushMessageData.appKey; r3.appid = a2.default.appid; r3.taskid = t3.pushMessageData.taskId; r3.actionid = e3; r3.result = c2.RESULT.OK; r3.timestamp = (/* @__PURE__ */ new Date()).getTime().toString(); return r3; } } e22["default"] = c2; }, 6362: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(661)); class s2 extends n2.default { static create() { let t3 = new s2(); super.initMsg(t3); t3.command = n2.default.Command.HEART_BEAT; return t3; } } e22["default"] = s2; }, 1386: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(6667)); const s2 = i22(r22(6379)); const a2 = i22(r22(661)); class o2 extends a2.default { constructor() { super(...arguments); this.keyNegotiateData = new u2(); } static create() { let t3 = new o2(); super.initMsg(t3); t3.command = a2.default.Command.KEY_NEGOTIATE; n2.default.resetKey(); t3.data = t3.keyNegotiateData = u2.create(); return t3; } send() { super.send(); } } class u2 { constructor() { this.appId = ""; this.rsaPublicKeyId = ""; this.algorithm = ""; this.secretKey = ""; this.iv = ""; } static create() { let t3 = new u2(); t3.appId = s2.default.appid; t3.rsaPublicKeyId = s2.default.publicKeyId; t3.algorithm = "AES"; t3.secretKey = n2.default.getEncryptedSecretKey(); t3.iv = n2.default.getEncryptedIV(); return t3; } } e22["default"] = o2; }, 1280: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(661)); const s2 = i22(r22(6667)); const a2 = i22(r22(8858)); const o2 = i22(r22(529)); const u2 = i22(r22(6379)); class c2 extends n2.default { constructor() { super(...arguments); this.keyNegotiateResultData = new l2(); } static parse(t3) { let e3 = new c2(); super.parseMsg(e3, t3); e3.keyNegotiateResultData = l2.parse(e3.data); return e3; } receive() { var t3, e3; if (0 != this.keyNegotiateResultData.errorCode) { o2.default.error(`key negotiate fail: ${this.data}`); null === (t3 = u2.default.onError) || void 0 === t3 || t3.call(u2.default.onError, { error: `key negotiate fail: ${this.data}` }); return; } let r3 = this.keyNegotiateResultData.encryptType.split("/"); if (!s2.default.algorithmMap.has(r3[0].trim().toLowerCase()) || !s2.default.modeMap.has(r3[1].trim().toLowerCase()) || !s2.default.paddingMap.has(r3[2].trim().toLowerCase())) { o2.default.error(`key negotiate fail: ${this.data}`); null === (e3 = u2.default.onError) || void 0 === e3 || e3.call(u2.default.onError, { error: `key negotiate fail: ${this.data}` }); return; } s2.default.setEncryptParams(r3[0].trim().toLowerCase(), r3[1].trim().toLowerCase(), r3[2].trim().toLowerCase()); a2.default.create().send(); } } class l2 { constructor() { this.errorCode = -1; this.errorMsg = ""; this.encryptType = ""; } static parse(t3) { let e3 = new l2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; e3.encryptType = r3.encryptType; return e3; } } e22["default"] = c2; }, 8858: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(6379)); const s2 = i22(r22(6667)); const a2 = i22(r22(661)); const o2 = i22(r22(4534)); class u2 extends a2.default { constructor() { super(...arguments); this.loginData = new c2(); } static create() { let t3 = new u2(); super.initMsg(t3); t3.command = a2.default.Command.LOGIN; t3.data = t3.loginData = c2.create(); return t3; } send() { if (!this.loginData.session || n2.default.cid != s2.default.md5Hex(this.loginData.session)) { o2.default.create().send(); return; } super.send(); } } class c2 { constructor() { this.appId = ""; this.session = ""; } static create() { let t3 = new c2(); t3.appId = n2.default.appid; t3.session = n2.default.session; return t3; } } e22["default"] = u2; }, 1606: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(8506)); const s2 = i22(r22(661)); const a2 = i22(r22(6379)); const o2 = i22(r22(9586)); const u2 = i22(r22(4516)); const c2 = i22(r22(8858)); class l2 extends s2.default { constructor() { super(...arguments); this.loginResultData = new f2(); } static parse(t3) { let e3 = new l2(); super.parseMsg(e3, t3); e3.loginResultData = f2.parse(e3.data); return e3; } receive() { var t3; if (0 != this.loginResultData.errorCode) { this.data; a2.default.session = a2.default.cid = ""; n2.default.setSync(n2.default.KEY_CID, ""); n2.default.setSync(n2.default.KEY_SESSION, ""); c2.default.create().send(); return; } if (!a2.default.online) { a2.default.online = true; null === (t3 = a2.default.onlineState) || void 0 === t3 || t3.call(a2.default.onlineState, { online: a2.default.online }); } o2.default.sendWaitingMessages(); u2.default.create().send(); } } class f2 { constructor() { this.errorCode = -1; this.errorMsg = ""; this.session = ""; } static parse(t3) { let e3 = new f2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; e3.session = r3.session; return e3; } } e22["default"] = l2; }, 661: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; var n2; Object.defineProperty(e22, "__esModule", { value: true }); const s2 = i22(r22(9593)); const a2 = i22(r22(7002)); const o2 = i22(r22(6893)); const u2 = i22(r22(6379)); class c2 { constructor() { this.version = ""; this.command = 0; this.packetId = 0; this.timeStamp = 0; this.data = ""; this.signature = ""; } static initMsg(t3, ...e3) { t3.version = o2.default.SOCKET_PROTOCOL_VERSION; t3.command = 0; t3.timeStamp = (/* @__PURE__ */ new Date()).getTime(); return t3; } static parseMsg(t3, e3) { let r3 = JSON.parse(e3); t3.version = r3.version; t3.command = r3.command; t3.packetId = r3.packetId; t3.timeStamp = r3.timeStamp; t3.data = r3.data; t3.signature = r3.signature; return t3; } stringify() { return JSON.stringify(this, ["version", "command", "packetId", "timeStamp", "data", "signature"]); } send() { if (!a2.default.isAvailable()) return; this.packetId = u2.default.packetId++; if (this.temp) this.data = this.temp; else this.temp = this.data; this.data = JSON.stringify(this.data); this.stringify(); if (this.command != c2.Command.HEART_BEAT) { s2.default.sign(this); if (this.data && this.command != c2.Command.KEY_NEGOTIATE) s2.default.encrypt(this); } a2.default.send(this.stringify()); } } c2.Command = (n2 = class { }, n2.HEART_BEAT = 0, n2.KEY_NEGOTIATE = 1, n2.KEY_NEGOTIATE_RESULT = 16, n2.REGISTER = 2, n2.REGISTER_RESULT = 32, n2.LOGIN = 3, n2.LOGIN_RESULT = 48, n2.LOGOUT = 4, n2.LOGOUT_RESULT = 64, n2.CLIENT_MSG = 5, n2.SERVER_MSG = 80, n2.SERVER_CLOSE = 96, n2.REDIRECT_SERVER = 112, n2); e22["default"] = c2; }, 9593: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(6667)); var s2; (function(t3) { function e3(t4) { t4.data = n2.default.encrypt(t4.data); } t3.encrypt = e3; function r3(t4) { t4.data = n2.default.decrypt(t4.data); } t3.decrypt = r3; function i3(t4) { t4.signature = n2.default.sha256(`${t4.timeStamp}${t4.packetId}${t4.command}${t4.data}`); } t3.sign = i3; function s22(t4) { let e4 = n2.default.sha256(`${t4.timeStamp}${t4.packetId}${t4.command}${t4.data}`); if (t4.signature != e4) throw new Error(`msg signature vierfy failed`); } t3.verify = s22; })(s2 || (s2 = {})); e22["default"] = s2; }, 4054: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(1280)); const s2 = i22(r22(1606)); const a2 = i22(r22(661)); const o2 = i22(r22(1277)); const u2 = i22(r22(910)); const c2 = i22(r22(9538)); const l2 = i22(r22(9479)); const f2 = i22(r22(6755)); const h2 = i22(r22(2918)); const d2 = i22(r22(9586)); const v2 = i22(r22(9510)); const p2 = i22(r22(4626)); const g2 = i22(r22(7562)); const y2 = i22(r22(9593)); const m2 = i22(r22(9586)); const w2 = i22(r22(9519)); const S2 = i22(r22(8947)); class _2 { static receiveMessage(t3) { let e3 = a2.default.parseMsg(new a2.default(), t3); if (e3.command == a2.default.Command.HEART_BEAT) return; if (e3.command != a2.default.Command.KEY_NEGOTIATE_RESULT && e3.command != a2.default.Command.SERVER_CLOSE && e3.command != a2.default.Command.REDIRECT_SERVER) y2.default.decrypt(e3); if (e3.command != a2.default.Command.SERVER_CLOSE && e3.command != a2.default.Command.REDIRECT_SERVER) y2.default.verify(e3); switch (e3.command) { case a2.default.Command.KEY_NEGOTIATE_RESULT: n2.default.parse(e3.stringify()).receive(); break; case a2.default.Command.REGISTER_RESULT: o2.default.parse(e3.stringify()).receive(); break; case a2.default.Command.LOGIN_RESULT: s2.default.parse(e3.stringify()).receive(); break; case a2.default.Command.SERVER_MSG: this.receiveActionMsg(e3.stringify()); break; case a2.default.Command.SERVER_CLOSE: S2.default.parse(e3.stringify()).receive(); break; case a2.default.Command.REDIRECT_SERVER: h2.default.parse(e3.stringify()).receive(); break; } } static receiveActionMsg(t3) { let e3 = m2.default.parseActionMsg(new m2.default(), t3); if (e3.actionMsgData.msgAction != d2.default.ServerAction.RECEIVED && e3.actionMsgData.msgAction != d2.default.ServerAction.REDIRECT_SERVER) { let t4 = JSON.parse(e3.actionMsgData.msgData); w2.default.create(t4.id).send(); } switch (e3.actionMsgData.msgAction) { case d2.default.ServerAction.PUSH_MESSAGE: f2.default.parse(t3).receive(); break; case d2.default.ServerAction.ADD_PHONE_INFO_RESULT: u2.default.parse(t3).receive(); break; case d2.default.ServerAction.SET_MODE_RESULT: v2.default.parse(t3).receive(); break; case d2.default.ServerAction.SET_TAG_RESULT: p2.default.parse(t3).receive(); break; case d2.default.ServerAction.BIND_ALIAS_RESULT: c2.default.parse(t3).receive(); break; case d2.default.ServerAction.UNBIND_ALIAS_RESULT: g2.default.parse(t3).receive(); break; case d2.default.ServerAction.FEED_BACK_RESULT: l2.default.parse(t3).receive(); break; case d2.default.ServerAction.RECEIVED: w2.default.parse(t3).receive(); break; } } } e22["default"] = _2; }, 9519: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = r22(4198); const s2 = i22(r22(6379)); const a2 = i22(r22(9586)); class o2 extends a2.default { constructor() { super(...arguments); this.receivedData = new u2(); } static create(t3) { let e3 = new o2(); super.initActionMsg(e3); e3.callback = (t4) => { if (t4.resultCode != n2.ErrorCode.SUCCESS && t4.resultCode != n2.ErrorCode.REPEAT_MESSAGE) setTimeout(function() { e3.send(); }, 3 * 1e3); }; e3.actionMsgData.msgAction = a2.default.ClientAction.RECEIVED; e3.receivedData = u2.create(t3); e3.actionMsgData.msgData = JSON.stringify(e3.receivedData); return e3; } static parse(t3) { let e3 = new o2(); super.parseActionMsg(e3, t3); e3.receivedData = u2.parse(e3.data); return e3; } receive() { var t3; let e3 = a2.default.getWaitingResponseMessage(this.actionMsgData.msgId); if (e3 && e3.actionMsgData.msgAction == a2.default.ClientAction.ADD_PHONE_INFO || e3 && e3.actionMsgData.msgAction == a2.default.ClientAction.FEED_BACK) { a2.default.removeWaitingResponseMessage(e3.actionMsgData.msgId); null === (t3 = e3.callback) || void 0 === t3 || t3.call(e3.callback, { resultCode: n2.ErrorCode.SUCCESS, message: "received" }); } } send() { super.send(); } } class u2 { constructor() { this.msgId = ""; this.cid = ""; } static create(t3) { let e3 = new u2(); e3.cid = s2.default.cid; e3.msgId = t3; return e3; } static parse(t3) { let e3 = new u2(); let r3 = JSON.parse(t3); e3.cid = r3.cid; e3.msgId = r3.msgId; return e3; } } e22["default"] = o2; }, 2918: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); e22.RedirectServerData = void 0; const n2 = i22(r22(7002)); const s2 = i22(r22(8506)); const a2 = i22(r22(661)); class o2 extends a2.default { constructor() { super(...arguments); this.redirectServerData = new u2(); } static parse(t3) { let e3 = new o2(); super.parseMsg(e3, t3); e3.redirectServerData = u2.parse(e3.data); return e3; } receive() { this.redirectServerData; s2.default.setSync(s2.default.KEY_REDIRECT_SERVER, JSON.stringify(this.redirectServerData)); n2.default.close("redirect server"); n2.default.reconnect(this.redirectServerData.delay); } } class u2 { constructor() { this.addressList = []; this.delay = 0; this.loc = ""; this.conf = ""; this.time = 0; } static parse(t3) { let e3 = new u2(); let r3 = JSON.parse(t3); e3.addressList = r3.addressList; e3.delay = r3.delay; e3.loc = r3.loc; e3.conf = r3.conf; e3.time = r3.time ? r3.time : (/* @__PURE__ */ new Date()).getTime(); return e3; } } e22.RedirectServerData = u2; e22["default"] = o2; }, 4534: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(6379)); const s2 = i22(r22(661)); class a2 extends s2.default { constructor() { super(...arguments); this.registerData = new o2(); } static create() { let t3 = new a2(); super.initMsg(t3); t3.command = s2.default.Command.REGISTER; t3.data = t3.registerData = o2.create(); return t3; } send() { super.send(); } } class o2 { constructor() { this.appId = ""; this.regId = ""; } static create() { let t3 = new o2(); t3.appId = n2.default.appid; t3.regId = n2.default.regId; return t3; } } e22["default"] = a2; }, 1277: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(661)); const s2 = i22(r22(8506)); const a2 = i22(r22(6379)); const o2 = i22(r22(8858)); const u2 = i22(r22(529)); class c2 extends n2.default { constructor() { super(...arguments); this.registerResultData = new l2(); } static parse(t3) { let e3 = new c2(); super.parseMsg(e3, t3); e3.registerResultData = l2.parse(e3.data); return e3; } receive() { var t3, e3; if (0 != this.registerResultData.errorCode || !this.registerResultData.cid || !this.registerResultData.session) { u2.default.error(`register fail: ${this.data}`); null === (t3 = a2.default.onError) || void 0 === t3 || t3.call(a2.default.onError, { error: `register fail: ${this.data}` }); return; } if (a2.default.cid != this.registerResultData.cid) s2.default.setSync(s2.default.KEY_ADD_PHONE_INFO_TIME, 0); a2.default.cid = this.registerResultData.cid; null === (e3 = a2.default.onClientId) || void 0 === e3 || e3.call(a2.default.onClientId, { cid: a2.default.cid }); s2.default.set({ key: s2.default.KEY_CID, data: a2.default.cid }); a2.default.session = this.registerResultData.session; s2.default.set({ key: s2.default.KEY_SESSION, data: a2.default.session }); a2.default.deviceId = this.registerResultData.deviceId; s2.default.set({ key: s2.default.KEY_DEVICE_ID, data: a2.default.deviceId }); o2.default.create().send(); } } class l2 { constructor() { this.errorCode = -1; this.errorMsg = ""; this.cid = ""; this.session = ""; this.deviceId = ""; this.regId = ""; } static parse(t3) { let e3 = new l2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; e3.cid = r3.cid; e3.session = r3.session; e3.deviceId = r3.deviceId; e3.regId = r3.regId; return e3; } } e22["default"] = c2; }, 8947: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(7002)); const s2 = i22(r22(529)); const a2 = i22(r22(661)); class o2 extends a2.default { constructor() { super(...arguments); this.serverCloseData = new u2(); } static parse(t3) { let e3 = new o2(); super.parseMsg(e3, t3); e3.serverCloseData = u2.parse(e3.data); return e3; } receive() { JSON.stringify(this.serverCloseData); let t3 = `server close ${this.serverCloseData.code}`; if (20 == this.serverCloseData.code || 23 == this.serverCloseData.code || 24 == this.serverCloseData.code) { n2.default.allowReconnect = false; n2.default.close(t3); } else if (21 == this.serverCloseData.code) this.safeClose21(t3); else { n2.default.allowReconnect = true; n2.default.close(t3); n2.default.reconnect(10); } } safeClose21(t3) { try { if ("undefined" != typeof document) { if (document.hasFocus() && "visible" == document.visibilityState) { n2.default.allowReconnect = true; n2.default.close(t3); n2.default.reconnect(10); return; } } n2.default.allowReconnect = false; n2.default.close(t3); } catch (e3) { s2.default.error(`ServerClose t1`, e3); n2.default.allowReconnect = false; n2.default.close(`${t3} error`); } } } class u2 { constructor() { this.code = -1; this.msg = ""; } static parse(t3) { let e3 = new u2(); let r3 = JSON.parse(t3); e3.code = r3.code; e3.msg = r3.msg; return e3; } } e22["default"] = o2; }, 910: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(8506)); const s2 = i22(r22(9586)); class a2 extends s2.default { constructor() { super(...arguments); this.addPhoneInfoResultData = new o2(); } static parse(t3) { let e3 = new a2(); super.parseActionMsg(e3, t3); e3.addPhoneInfoResultData = o2.parse(e3.actionMsgData.msgData); return e3; } receive() { var t3; this.addPhoneInfoResultData; let e3 = s2.default.removeWaitingResponseMessage(this.actionMsgData.msgId); if (e3) null === (t3 = e3.callback) || void 0 === t3 || t3.call(e3.callback, { resultCode: this.addPhoneInfoResultData.errorCode, message: this.addPhoneInfoResultData.errorMsg }); n2.default.set({ key: n2.default.KEY_ADD_PHONE_INFO_TIME, data: (/* @__PURE__ */ new Date()).getTime() }); } } class o2 { constructor() { this.errorCode = -1; this.errorMsg = ""; } static parse(t3) { let e3 = new o2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; return e3; } } e22["default"] = a2; }, 9538: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(8506)); const s2 = i22(r22(529)); const a2 = i22(r22(9586)); class o2 extends a2.default { constructor() { super(...arguments); this.bindAliasResultData = new u2(); } static parse(t3) { let e3 = new o2(); super.parseActionMsg(e3, t3); e3.bindAliasResultData = u2.parse(e3.actionMsgData.msgData); return e3; } receive() { var t3; s2.default.info(`bind alias result`, this.bindAliasResultData); let e3 = a2.default.removeWaitingResponseMessage(this.actionMsgData.msgId); if (e3) null === (t3 = e3.callback) || void 0 === t3 || t3.call(e3.callback, { resultCode: this.bindAliasResultData.errorCode, message: this.bindAliasResultData.errorMsg }); n2.default.set({ key: n2.default.KEY_BIND_ALIAS_TIME, data: (/* @__PURE__ */ new Date()).getTime() }); } } class u2 { constructor() { this.errorCode = -1; this.errorMsg = ""; } static parse(t3) { let e3 = new u2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; return e3; } } e22["default"] = o2; }, 9479: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = r22(4198); const s2 = i22(r22(9586)); class a2 extends s2.default { constructor() { super(...arguments); this.feedbackResultData = new o2(); } static parse(t3) { let e3 = new a2(); super.parseActionMsg(e3, t3); e3.feedbackResultData = o2.parse(e3.actionMsgData.msgData); return e3; } receive() { var t3; this.feedbackResultData; let e3 = s2.default.removeWaitingResponseMessage(this.actionMsgData.msgId); if (e3) null === (t3 = e3.callback) || void 0 === t3 || t3.call(e3.callback, { resultCode: n2.ErrorCode.SUCCESS, message: "received" }); } } class o2 { constructor() { this.actionId = ""; this.taskId = ""; this.result = ""; } static parse(t3) { let e3 = new o2(); let r3 = JSON.parse(t3); e3.actionId = r3.actionId; e3.taskId = r3.taskId; e3.result = r3.result; return e3; } } e22["default"] = a2; }, 6755: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; var n2; Object.defineProperty(e22, "__esModule", { value: true }); const s2 = i22(r22(6379)); const a2 = i22(r22(9586)); const o2 = i22(r22(8723)); class u2 extends a2.default { constructor() { super(...arguments); this.pushMessageData = new c2(); } static parse(t3) { let e3 = new u2(); super.parseActionMsg(e3, t3); e3.pushMessageData = c2.parse(e3.actionMsgData.msgData); return e3; } receive() { var t3; this.pushMessageData; if (this.pushMessageData.appId != s2.default.appid || !this.pushMessageData.messageid || !this.pushMessageData.taskId) this.stringify(); o2.default.create(this, o2.default.ActionId.RECEIVE).send(); o2.default.create(this, o2.default.ActionId.MP_RECEIVE).send(); if (this.actionMsgData.msgExtraData && s2.default.onPushMsg) null === (t3 = s2.default.onPushMsg) || void 0 === t3 || t3.call(s2.default.onPushMsg, { message: this.actionMsgData.msgExtraData }); } } class c2 { constructor() { this.id = ""; this.appKey = ""; this.appId = ""; this.messageid = ""; this.taskId = ""; this.actionChain = []; this.cdnType = ""; } static parse(t3) { let e3 = new c2(); let r3 = JSON.parse(t3); e3.id = r3.id; e3.appKey = r3.appKey; e3.appId = r3.appId; e3.messageid = r3.messageid; e3.taskId = r3.taskId; e3.actionChain = r3.actionChain; e3.cdnType = r3.cdnType; return e3; } } n2 = class { }, n2.GO_TO = "goto", n2.TRANSMIT = "transmit"; e22["default"] = u2; }, 9510: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(9586)); class s2 extends n2.default { constructor() { super(...arguments); this.setModeResultData = new a2(); } static parse(t3) { let e3 = new s2(); super.parseActionMsg(e3, t3); e3.setModeResultData = a2.parse(e3.actionMsgData.msgData); return e3; } receive() { var t3; this.setModeResultData; let e3 = n2.default.removeWaitingResponseMessage(this.actionMsgData.msgId); if (e3) null === (t3 = e3.callback) || void 0 === t3 || t3.call(e3.callback, { resultCode: this.setModeResultData.errorCode, message: this.setModeResultData.errorMsg }); } } class a2 { constructor() { this.errorCode = -1; this.errorMsg = ""; } static parse(t3) { let e3 = new a2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; return e3; } } e22["default"] = s2; }, 4626: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(8506)); const s2 = i22(r22(529)); const a2 = i22(r22(9586)); class o2 extends a2.default { constructor() { super(...arguments); this.setTagResultData = new u2(); } static parse(t3) { let e3 = new o2(); super.parseActionMsg(e3, t3); e3.setTagResultData = u2.parse(e3.actionMsgData.msgData); return e3; } receive() { var t3; s2.default.info(`set tag result`, this.setTagResultData); let e3 = a2.default.removeWaitingResponseMessage(this.actionMsgData.msgId); if (e3) null === (t3 = e3.callback) || void 0 === t3 || t3.call(e3.callback, { resultCode: this.setTagResultData.errorCode, message: this.setTagResultData.errorMsg }); n2.default.set({ key: n2.default.KEY_SET_TAG_TIME, data: (/* @__PURE__ */ new Date()).getTime() }); } } class u2 { constructor() { this.errorCode = 0; this.errorMsg = ""; } static parse(t3) { let e3 = new u2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; return e3; } } e22["default"] = o2; }, 7562: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(8506)); const s2 = i22(r22(529)); const a2 = i22(r22(9586)); class o2 extends a2.default { constructor() { super(...arguments); this.unbindAliasResultData = new u2(); } static parse(t3) { let e3 = new o2(); super.parseActionMsg(e3, t3); e3.unbindAliasResultData = u2.parse(e3.actionMsgData.msgData); return e3; } receive() { var t3; s2.default.info(`unbind alias result`, this.unbindAliasResultData); let e3 = a2.default.removeWaitingResponseMessage(this.actionMsgData.msgId); if (e3) null === (t3 = e3.callback) || void 0 === t3 || t3.call(e3.callback, { resultCode: this.unbindAliasResultData.errorCode, message: this.unbindAliasResultData.errorMsg }); n2.default.set({ key: n2.default.KEY_BIND_ALIAS_TIME, data: (/* @__PURE__ */ new Date()).getTime() }); } } class u2 { constructor() { this.errorCode = -1; this.errorMsg = ""; } static parse(t3) { let e3 = new u2(); let r3 = JSON.parse(t3); e3.errorCode = r3.errorCode; e3.errorMsg = r3.errorMsg; return e3; } } e22["default"] = o2; }, 8227: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { constructor(t3) { this.delay = 10; this.delay = t3; } start() { this.cancel(); let t3 = this; this.timer = setInterval(function() { t3.run(); }, this.delay); } cancel() { if (this.timer) clearInterval(this.timer); } } e22["default"] = r22; }, 7167: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; var n2; Object.defineProperty(e22, "__esModule", { value: true }); const s2 = i22(r22(6362)); const a2 = i22(r22(8227)); class o2 extends a2.default { static getInstance() { return o2.InstanceHolder.instance; } run() { s2.default.create().send(); } refresh() { this.delay = 60 * 1e3; this.start(); } } o2.INTERVAL = 60 * 1e3; o2.InstanceHolder = (n2 = class { }, n2.instance = new o2(o2.INTERVAL), n2); e22["default"] = o2; }, 2323: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(4736)); const s2 = i22(r22(6667)); var a2; (function(t3) { let e3 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; let r3 = (0, n2.default)("9223372036854775808"); function i3(t4) { let e4 = a22(t4); let r4 = o2(e4); let i4 = r4[1]; let n22 = r4[0]; return u2(i4) + u2(n22); } t3.to_getui = i3; function a22(t4) { let e4 = s2.default.md5Hex(t4); let r4 = c2(e4); r4[6] &= 15; r4[6] |= 48; r4[8] &= 63; r4[8] |= 128; return r4; } function o2(t4) { let e4 = (0, n2.default)(0); let r4 = (0, n2.default)(0); for (let r5 = 0; r5 < 8; r5++) e4 = e4.multiply(256).plus((0, n2.default)(255 & t4[r5])); for (let e5 = 8; e5 < 16; e5++) r4 = r4.multiply(256).plus((0, n2.default)(255 & t4[e5])); return [e4, r4]; } function u2(t4) { if (t4 >= r3) t4 = r3.multiply(2).minus(t4); let i4 = ""; for (; t4 > (0, n2.default)(0); t4 = t4.divide(62)) i4 += e3.charAt(Number(t4.divmod(62).remainder)); return i4; } function c2(t4) { let e4 = t4.length; if (e4 % 2 != 0) return []; let r4 = new Array(); for (let i4 = 0; i4 < e4; i4 += 2) r4.push(parseInt(t4.substring(i4, i4 + 2), 16)); return r4; } })(a2 || (a2 = {})); e22["default"] = a2; }, 6667: function(t22, e22, r22) { var i22 = this && this.__importDefault || function(t3) { return t3 && t3.__esModule ? t3 : { default: t3 }; }; Object.defineProperty(e22, "__esModule", { value: true }); const n2 = i22(r22(2620)); const s2 = i22(r22(1354)); const a2 = i22(r22(6379)); var o2; (function(t3) { let e3; let r3; let i3; let o22; let u2 = new n2.default(); let c2 = s2.default.mode.CBC; let l2 = s2.default.pad.Pkcs7; let f2 = s2.default.AES; t3.algorithmMap = /* @__PURE__ */ new Map([["aes", s2.default.AES]]); t3.modeMap = /* @__PURE__ */ new Map([["cbc", s2.default.mode.CBC], ["cfb", s2.default.mode.CFB], ["cfb128", s2.default.mode.CFB], ["ecb", s2.default.mode.ECB], ["ofb", s2.default.mode.OFB]]); t3.paddingMap = /* @__PURE__ */ new Map([["nopadding", s2.default.pad.NoPadding], ["pkcs7", s2.default.pad.Pkcs7]]); function h2() { e3 = s2.default.MD5((/* @__PURE__ */ new Date()).getTime().toString()); r3 = s2.default.MD5(e3); u2.setPublicKey(a2.default.publicKey); e3.toString(s2.default.enc.Hex); r3.toString(s2.default.enc.Hex); i3 = u2.encrypt(e3.toString(s2.default.enc.Hex)); o22 = u2.encrypt(r3.toString(s2.default.enc.Hex)); } t3.resetKey = h2; function d2(e4, r4, i4) { f2 = t3.algorithmMap.get(e4); c2 = t3.modeMap.get(r4); l2 = t3.paddingMap.get(i4); } t3.setEncryptParams = d2; function v2(t4) { return f2.encrypt(t4, e3, { iv: r3, mode: c2, padding: l2 }).toString(); } t3.encrypt = v2; function p2(t4) { return f2.decrypt(t4, e3, { iv: r3, mode: c2, padding: l2 }).toString(s2.default.enc.Utf8); } t3.decrypt = p2; function g2(t4) { return s2.default.SHA256(t4).toString(s2.default.enc.Base64); } t3.sha256 = g2; function y2(t4) { return s2.default.MD5(t4).toString(s2.default.enc.Hex); } t3.md5Hex = y2; function m2() { return i3 ? i3 : ""; } t3.getEncryptedSecretKey = m2; function w2() { return o22 ? o22 : ""; } t3.getEncryptedIV = w2; })(o2 || (o2 = {})); e22["default"] = o2; }, 529: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { static info(...t3) { if (this.debugMode) console.info(`[GtPush]`, t3); } static warn(...t3) { console.warn(`[GtPush]`, t3); } static error(...t3) { console.error(`[GtPush]`, t3); } } r22.debugMode = false; e22["default"] = r22; }, 3854: (t22, e22) => { Object.defineProperty(e22, "__esModule", { value: true }); class r22 { static getStr(t3, e3) { try { if (!t3 || void 0 === t3[e3]) return ""; return t3[e3]; } catch (t4) { } return ""; } } e22["default"] = r22; }, 2620: (t22, e22, r22) => { r22.r(e22); r22.d(e22, { JSEncrypt: () => wt2, default: () => St2 }); var i22 = "0123456789abcdefghijklmnopqrstuvwxyz"; function n2(t3) { return i22.charAt(t3); } function s2(t3, e3) { return t3 & e3; } function a2(t3, e3) { return t3 | e3; } function o2(t3, e3) { return t3 ^ e3; } function u2(t3, e3) { return t3 & ~e3; } function c2(t3) { if (0 == t3) return -1; var e3 = 0; if (0 == (65535 & t3)) { t3 >>= 16; e3 += 16; } if (0 == (255 & t3)) { t3 >>= 8; e3 += 8; } if (0 == (15 & t3)) { t3 >>= 4; e3 += 4; } if (0 == (3 & t3)) { t3 >>= 2; e3 += 2; } if (0 == (1 & t3)) ++e3; return e3; } function l2(t3) { var e3 = 0; while (0 != t3) { t3 &= t3 - 1; ++e3; } return e3; } var f2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var h2 = "="; function d2(t3) { var e3; var r3; var i3 = ""; for (e3 = 0; e3 + 3 <= t3.length; e3 += 3) { r3 = parseInt(t3.substring(e3, e3 + 3), 16); i3 += f2.charAt(r3 >> 6) + f2.charAt(63 & r3); } if (e3 + 1 == t3.length) { r3 = parseInt(t3.substring(e3, e3 + 1), 16); i3 += f2.charAt(r3 << 2); } else if (e3 + 2 == t3.length) { r3 = parseInt(t3.substring(e3, e3 + 2), 16); i3 += f2.charAt(r3 >> 2) + f2.charAt((3 & r3) << 4); } while ((3 & i3.length) > 0) i3 += h2; return i3; } function v2(t3) { var e3 = ""; var r3; var i3 = 0; var s22 = 0; for (r3 = 0; r3 < t3.length; ++r3) { if (t3.charAt(r3) == h2) break; var a22 = f2.indexOf(t3.charAt(r3)); if (a22 < 0) continue; if (0 == i3) { e3 += n2(a22 >> 2); s22 = 3 & a22; i3 = 1; } else if (1 == i3) { e3 += n2(s22 << 2 | a22 >> 4); s22 = 15 & a22; i3 = 2; } else if (2 == i3) { e3 += n2(s22); e3 += n2(a22 >> 2); s22 = 3 & a22; i3 = 3; } else { e3 += n2(s22 << 2 | a22 >> 4); e3 += n2(15 & a22); i3 = 0; } } if (1 == i3) e3 += n2(s22 << 2); return e3; } var g2; var y2 = { decode: function(t3) { var e3; if (void 0 === g2) { var r3 = "0123456789ABCDEF"; var i3 = " \f\n\r  \u2028\u2029"; g2 = {}; for (e3 = 0; e3 < 16; ++e3) g2[r3.charAt(e3)] = e3; r3 = r3.toLowerCase(); for (e3 = 10; e3 < 16; ++e3) g2[r3.charAt(e3)] = e3; for (e3 = 0; e3 < i3.length; ++e3) g2[i3.charAt(e3)] = -1; } var n22 = []; var s22 = 0; var a22 = 0; for (e3 = 0; e3 < t3.length; ++e3) { var o22 = t3.charAt(e3); if ("=" == o22) break; o22 = g2[o22]; if (-1 == o22) continue; if (void 0 === o22) throw new Error("Illegal character at offset " + e3); s22 |= o22; if (++a22 >= 2) { n22[n22.length] = s22; s22 = 0; a22 = 0; } else s22 <<= 4; } if (a22) throw new Error("Hex encoding incomplete: 4 bits missing"); return n22; } }; var m2; var w2 = { decode: function(t3) { var e3; if (void 0 === m2) { var r3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var i3 = "= \f\n\r  \u2028\u2029"; m2 = /* @__PURE__ */ Object.create(null); for (e3 = 0; e3 < 64; ++e3) m2[r3.charAt(e3)] = e3; m2["-"] = 62; m2["_"] = 63; for (e3 = 0; e3 < i3.length; ++e3) m2[i3.charAt(e3)] = -1; } var n22 = []; var s22 = 0; var a22 = 0; for (e3 = 0; e3 < t3.length; ++e3) { var o22 = t3.charAt(e3); if ("=" == o22) break; o22 = m2[o22]; if (-1 == o22) continue; if (void 0 === o22) throw new Error("Illegal character at offset " + e3); s22 |= o22; if (++a22 >= 4) { n22[n22.length] = s22 >> 16; n22[n22.length] = s22 >> 8 & 255; n22[n22.length] = 255 & s22; s22 = 0; a22 = 0; } else s22 <<= 6; } switch (a22) { case 1: throw new Error("Base64 encoding incomplete: at least 2 bits missing"); case 2: n22[n22.length] = s22 >> 10; break; case 3: n22[n22.length] = s22 >> 16; n22[n22.length] = s22 >> 8 & 255; break; } return n22; }, re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/, unarmor: function(t3) { var e3 = w2.re.exec(t3); if (e3) if (e3[1]) t3 = e3[1]; else if (e3[2]) t3 = e3[2]; else throw new Error("RegExp out of sync"); return w2.decode(t3); } }; var S2 = 1e13; var _2 = function() { function t3(t4) { this.buf = [+t4 || 0]; } t3.prototype.mulAdd = function(t4, e3) { var r3 = this.buf; var i3 = r3.length; var n22; var s22; for (n22 = 0; n22 < i3; ++n22) { s22 = r3[n22] * t4 + e3; if (s22 < S2) e3 = 0; else { e3 = 0 | s22 / S2; s22 -= e3 * S2; } r3[n22] = s22; } if (e3 > 0) r3[n22] = e3; }; t3.prototype.sub = function(t4) { var e3 = this.buf; var r3 = e3.length; var i3; var n22; for (i3 = 0; i3 < r3; ++i3) { n22 = e3[i3] - t4; if (n22 < 0) { n22 += S2; t4 = 1; } else t4 = 0; e3[i3] = n22; } while (0 === e3[e3.length - 1]) e3.pop(); }; t3.prototype.toString = function(t4) { if (10 != (t4 || 10)) throw new Error("only base 10 is supported"); var e3 = this.buf; var r3 = e3[e3.length - 1].toString(); for (var i3 = e3.length - 2; i3 >= 0; --i3) r3 += (S2 + e3[i3]).toString().substring(1); return r3; }; t3.prototype.valueOf = function() { var t4 = this.buf; var e3 = 0; for (var r3 = t4.length - 1; r3 >= 0; --r3) e3 = e3 * S2 + t4[r3]; return e3; }; t3.prototype.simplify = function() { var t4 = this.buf; return 1 == t4.length ? t4[0] : this; }; return t3; }(); var b2 = "…"; var E2 = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/; var D2 = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/; function M2(t3, e3) { if (t3.length > e3) t3 = t3.substring(0, e3) + b2; return t3; } var T2 = function() { function t3(e3, r3) { this.hexDigits = "0123456789ABCDEF"; if (e3 instanceof t3) { this.enc = e3.enc; this.pos = e3.pos; } else { this.enc = e3; this.pos = r3; } } t3.prototype.get = function(t4) { if (void 0 === t4) t4 = this.pos++; if (t4 >= this.enc.length) throw new Error("Requesting byte offset " + t4 + " on a stream of length " + this.enc.length); return "string" === typeof this.enc ? this.enc.charCodeAt(t4) : this.enc[t4]; }; t3.prototype.hexByte = function(t4) { return this.hexDigits.charAt(t4 >> 4 & 15) + this.hexDigits.charAt(15 & t4); }; t3.prototype.hexDump = function(t4, e3, r3) { var i3 = ""; for (var n22 = t4; n22 < e3; ++n22) { i3 += this.hexByte(this.get(n22)); if (true !== r3) switch (15 & n22) { case 7: i3 += " "; break; case 15: i3 += "\n"; break; default: i3 += " "; } } return i3; }; t3.prototype.isASCII = function(t4, e3) { for (var r3 = t4; r3 < e3; ++r3) { var i3 = this.get(r3); if (i3 < 32 || i3 > 176) return false; } return true; }; t3.prototype.parseStringISO = function(t4, e3) { var r3 = ""; for (var i3 = t4; i3 < e3; ++i3) r3 += String.fromCharCode(this.get(i3)); return r3; }; t3.prototype.parseStringUTF = function(t4, e3) { var r3 = ""; for (var i3 = t4; i3 < e3; ) { var n22 = this.get(i3++); if (n22 < 128) r3 += String.fromCharCode(n22); else if (n22 > 191 && n22 < 224) r3 += String.fromCharCode((31 & n22) << 6 | 63 & this.get(i3++)); else r3 += String.fromCharCode((15 & n22) << 12 | (63 & this.get(i3++)) << 6 | 63 & this.get(i3++)); } return r3; }; t3.prototype.parseStringBMP = function(t4, e3) { var r3 = ""; var i3; var n22; for (var s22 = t4; s22 < e3; ) { i3 = this.get(s22++); n22 = this.get(s22++); r3 += String.fromCharCode(i3 << 8 | n22); } return r3; }; t3.prototype.parseTime = function(t4, e3, r3) { var i3 = this.parseStringISO(t4, e3); var n22 = (r3 ? E2 : D2).exec(i3); if (!n22) return "Unrecognized time: " + i3; if (r3) { n22[1] = +n22[1]; n22[1] += +n22[1] < 70 ? 2e3 : 1900; } i3 = n22[1] + "-" + n22[2] + "-" + n22[3] + " " + n22[4]; if (n22[5]) { i3 += ":" + n22[5]; if (n22[6]) { i3 += ":" + n22[6]; if (n22[7]) i3 += "." + n22[7]; } } if (n22[8]) { i3 += " UTC"; if ("Z" != n22[8]) { i3 += n22[8]; if (n22[9]) i3 += ":" + n22[9]; } } return i3; }; t3.prototype.parseInteger = function(t4, e3) { var r3 = this.get(t4); var i3 = r3 > 127; var n22 = i3 ? 255 : 0; var s22; var a22 = ""; while (r3 == n22 && ++t4 < e3) r3 = this.get(t4); s22 = e3 - t4; if (0 === s22) return i3 ? -1 : 0; if (s22 > 4) { a22 = r3; s22 <<= 3; while (0 == (128 & (+a22 ^ n22))) { a22 = +a22 << 1; --s22; } a22 = "(" + s22 + " bit)\n"; } if (i3) r3 -= 256; var o22 = new _2(r3); for (var u22 = t4 + 1; u22 < e3; ++u22) o22.mulAdd(256, this.get(u22)); return a22 + o22.toString(); }; t3.prototype.parseBitString = function(t4, e3, r3) { var i3 = this.get(t4); var n22 = (e3 - t4 - 1 << 3) - i3; var s22 = "(" + n22 + " bit)\n"; var a22 = ""; for (var o22 = t4 + 1; o22 < e3; ++o22) { var u22 = this.get(o22); var c22 = o22 == e3 - 1 ? i3 : 0; for (var l22 = 7; l22 >= c22; --l22) a22 += u22 >> l22 & 1 ? "1" : "0"; if (a22.length > r3) return s22 + M2(a22, r3); } return s22 + a22; }; t3.prototype.parseOctetString = function(t4, e3, r3) { if (this.isASCII(t4, e3)) return M2(this.parseStringISO(t4, e3), r3); var i3 = e3 - t4; var n22 = "(" + i3 + " byte)\n"; r3 /= 2; if (i3 > r3) e3 = t4 + r3; for (var s22 = t4; s22 < e3; ++s22) n22 += this.hexByte(this.get(s22)); if (i3 > r3) n22 += b2; return n22; }; t3.prototype.parseOID = function(t4, e3, r3) { var i3 = ""; var n22 = new _2(); var s22 = 0; for (var a22 = t4; a22 < e3; ++a22) { var o22 = this.get(a22); n22.mulAdd(128, 127 & o22); s22 += 7; if (!(128 & o22)) { if ("" === i3) { n22 = n22.simplify(); if (n22 instanceof _2) { n22.sub(80); i3 = "2." + n22.toString(); } else { var u22 = n22 < 80 ? n22 < 40 ? 0 : 1 : 2; i3 = u22 + "." + (n22 - 40 * u22); } } else i3 += "." + n22.toString(); if (i3.length > r3) return M2(i3, r3); n22 = new _2(); s22 = 0; } } if (s22 > 0) i3 += ".incomplete"; return i3; }; return t3; }(); var I2 = function() { function t3(t4, e3, r3, i3, n22) { if (!(i3 instanceof A2)) throw new Error("Invalid tag value."); this.stream = t4; this.header = e3; this.length = r3; this.tag = i3; this.sub = n22; } t3.prototype.typeName = function() { switch (this.tag.tagClass) { case 0: switch (this.tag.tagNumber) { case 0: return "EOC"; case 1: return "BOOLEAN"; case 2: return "INTEGER"; case 3: return "BIT_STRING"; case 4: return "OCTET_STRING"; case 5: return "NULL"; case 6: return "OBJECT_IDENTIFIER"; case 7: return "ObjectDescriptor"; case 8: return "EXTERNAL"; case 9: return "REAL"; case 10: return "ENUMERATED"; case 11: return "EMBEDDED_PDV"; case 12: return "UTF8String"; case 16: return "SEQUENCE"; case 17: return "SET"; case 18: return "NumericString"; case 19: return "PrintableString"; case 20: return "TeletexString"; case 21: return "VideotexString"; case 22: return "IA5String"; case 23: return "UTCTime"; case 24: return "GeneralizedTime"; case 25: return "GraphicString"; case 26: return "VisibleString"; case 27: return "GeneralString"; case 28: return "UniversalString"; case 30: return "BMPString"; } return "Universal_" + this.tag.tagNumber.toString(); case 1: return "Application_" + this.tag.tagNumber.toString(); case 2: return "[" + this.tag.tagNumber.toString() + "]"; case 3: return "Private_" + this.tag.tagNumber.toString(); } }; t3.prototype.content = function(t4) { if (void 0 === this.tag) return null; if (void 0 === t4) t4 = 1 / 0; var e3 = this.posContent(); var r3 = Math.abs(this.length); if (!this.tag.isUniversal()) { if (null !== this.sub) return "(" + this.sub.length + " elem)"; return this.stream.parseOctetString(e3, e3 + r3, t4); } switch (this.tag.tagNumber) { case 1: return 0 === this.stream.get(e3) ? "false" : "true"; case 2: return this.stream.parseInteger(e3, e3 + r3); case 3: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(e3, e3 + r3, t4); case 4: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e3, e3 + r3, t4); case 6: return this.stream.parseOID(e3, e3 + r3, t4); case 16: case 17: if (null !== this.sub) return "(" + this.sub.length + " elem)"; else return "(no elem)"; case 12: return M2(this.stream.parseStringUTF(e3, e3 + r3), t4); case 18: case 19: case 20: case 21: case 22: case 26: return M2(this.stream.parseStringISO(e3, e3 + r3), t4); case 30: return M2(this.stream.parseStringBMP(e3, e3 + r3), t4); case 23: case 24: return this.stream.parseTime(e3, e3 + r3, 23 == this.tag.tagNumber); } return null; }; t3.prototype.toString = function() { return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]"; }; t3.prototype.toPrettyString = function(t4) { if (void 0 === t4) t4 = ""; var e3 = t4 + this.typeName() + " @" + this.stream.pos; if (this.length >= 0) e3 += "+"; e3 += this.length; if (this.tag.tagConstructed) e3 += " (constructed)"; else if (this.tag.isUniversal() && (3 == this.tag.tagNumber || 4 == this.tag.tagNumber) && null !== this.sub) e3 += " (encapsulates)"; e3 += "\n"; if (null !== this.sub) { t4 += " "; for (var r3 = 0, i3 = this.sub.length; r3 < i3; ++r3) e3 += this.sub[r3].toPrettyString(t4); } return e3; }; t3.prototype.posStart = function() { return this.stream.pos; }; t3.prototype.posContent = function() { return this.stream.pos + this.header; }; t3.prototype.posEnd = function() { return this.stream.pos + this.header + Math.abs(this.length); }; t3.prototype.toHexString = function() { return this.stream.hexDump(this.posStart(), this.posEnd(), true); }; t3.decodeLength = function(t4) { var e3 = t4.get(); var r3 = 127 & e3; if (r3 == e3) return r3; if (r3 > 6) throw new Error("Length over 48 bits not supported at position " + (t4.pos - 1)); if (0 === r3) return null; e3 = 0; for (var i3 = 0; i3 < r3; ++i3) e3 = 256 * e3 + t4.get(); return e3; }; t3.prototype.getHexStringValue = function() { var t4 = this.toHexString(); var e3 = 2 * this.header; var r3 = 2 * this.length; return t4.substr(e3, r3); }; t3.decode = function(e3) { var r3; if (!(e3 instanceof T2)) r3 = new T2(e3, 0); else r3 = e3; var i3 = new T2(r3); var n22 = new A2(r3); var s22 = t3.decodeLength(r3); var a22 = r3.pos; var o22 = a22 - i3.pos; var u22 = null; var c22 = function() { var e4 = []; if (null !== s22) { var i4 = a22 + s22; while (r3.pos < i4) e4[e4.length] = t3.decode(r3); if (r3.pos != i4) throw new Error("Content size is not correct for container starting at offset " + a22); } else try { for (; ; ) { var n3 = t3.decode(r3); if (n3.tag.isEOC()) break; e4[e4.length] = n3; } s22 = a22 - r3.pos; } catch (t4) { throw new Error("Exception while decoding undefined length content: " + t4); } return e4; }; if (n22.tagConstructed) u22 = c22(); else if (n22.isUniversal() && (3 == n22.tagNumber || 4 == n22.tagNumber)) try { if (3 == n22.tagNumber) { if (0 != r3.get()) throw new Error("BIT STRINGs with unused bits cannot encapsulate."); } u22 = c22(); for (var l22 = 0; l22 < u22.length; ++l22) if (u22[l22].tag.isEOC()) throw new Error("EOC is not supposed to be actual content."); } catch (t4) { u22 = null; } if (null === u22) { if (null === s22) throw new Error("We can't skip over an invalid tag with undefined length at offset " + a22); r3.pos = a22 + Math.abs(s22); } return new t3(i3, o22, s22, n22, u22); }; return t3; }(); var A2 = function() { function t3(t4) { var e3 = t4.get(); this.tagClass = e3 >> 6; this.tagConstructed = 0 !== (32 & e3); this.tagNumber = 31 & e3; if (31 == this.tagNumber) { var r3 = new _2(); do { e3 = t4.get(); r3.mulAdd(128, 127 & e3); } while (128 & e3); this.tagNumber = r3.simplify(); } } t3.prototype.isUniversal = function() { return 0 === this.tagClass; }; t3.prototype.isEOC = function() { return 0 === this.tagClass && 0 === this.tagNumber; }; return t3; }(); var x; var R2 = 244837814094590; var B2 = 15715070 == (16777215 & R2); var O2 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]; var k = (1 << 26) / O2[O2.length - 1]; var C2 = function() { function t3(t4, e3, r3) { if (null != t4) if ("number" == typeof t4) this.fromNumber(t4, e3, r3); else if (null == e3 && "string" != typeof t4) this.fromString(t4, 256); else this.fromString(t4, e3); } t3.prototype.toString = function(t4) { if (this.s < 0) return "-" + this.negate().toString(t4); var e3; if (16 == t4) e3 = 4; else if (8 == t4) e3 = 3; else if (2 == t4) e3 = 1; else if (32 == t4) e3 = 5; else if (4 == t4) e3 = 2; else return this.toRadix(t4); var r3 = (1 << e3) - 1; var i3; var s22 = false; var a22 = ""; var o22 = this.t; var u22 = this.DB - o22 * this.DB % e3; if (o22-- > 0) { if (u22 < this.DB && (i3 = this[o22] >> u22) > 0) { s22 = true; a22 = n2(i3); } while (o22 >= 0) { if (u22 < e3) { i3 = (this[o22] & (1 << u22) - 1) << e3 - u22; i3 |= this[--o22] >> (u22 += this.DB - e3); } else { i3 = this[o22] >> (u22 -= e3) & r3; if (u22 <= 0) { u22 += this.DB; --o22; } } if (i3 > 0) s22 = true; if (s22) a22 += n2(i3); } } return s22 ? a22 : "0"; }; t3.prototype.negate = function() { var e3 = H2(); t3.ZERO.subTo(this, e3); return e3; }; t3.prototype.abs = function() { return this.s < 0 ? this.negate() : this; }; t3.prototype.compareTo = function(t4) { var e3 = this.s - t4.s; if (0 != e3) return e3; var r3 = this.t; e3 = r3 - t4.t; if (0 != e3) return this.s < 0 ? -e3 : e3; while (--r3 >= 0) if (0 != (e3 = this[r3] - t4[r3])) return e3; return 0; }; t3.prototype.bitLength = function() { if (this.t <= 0) return 0; return this.DB * (this.t - 1) + W2(this[this.t - 1] ^ this.s & this.DM); }; t3.prototype.mod = function(e3) { var r3 = H2(); this.abs().divRemTo(e3, null, r3); if (this.s < 0 && r3.compareTo(t3.ZERO) > 0) e3.subTo(r3, r3); return r3; }; t3.prototype.modPowInt = function(t4, e3) { var r3; if (t4 < 256 || e3.isEven()) r3 = new P2(e3); else r3 = new V2(e3); return this.exp(t4, r3); }; t3.prototype.clone = function() { var t4 = H2(); this.copyTo(t4); return t4; }; t3.prototype.intValue = function() { if (this.s < 0) { if (1 == this.t) return this[0] - this.DV; else if (0 == this.t) return -1; } else if (1 == this.t) return this[0]; else if (0 == this.t) return 0; return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]; }; t3.prototype.byteValue = function() { return 0 == this.t ? this.s : this[0] << 24 >> 24; }; t3.prototype.shortValue = function() { return 0 == this.t ? this.s : this[0] << 16 >> 16; }; t3.prototype.signum = function() { if (this.s < 0) return -1; else if (this.t <= 0 || 1 == this.t && this[0] <= 0) return 0; else return 1; }; t3.prototype.toByteArray = function() { var t4 = this.t; var e3 = []; e3[0] = this.s; var r3 = this.DB - t4 * this.DB % 8; var i3; var n22 = 0; if (t4-- > 0) { if (r3 < this.DB && (i3 = this[t4] >> r3) != (this.s & this.DM) >> r3) e3[n22++] = i3 | this.s << this.DB - r3; while (t4 >= 0) { if (r3 < 8) { i3 = (this[t4] & (1 << r3) - 1) << 8 - r3; i3 |= this[--t4] >> (r3 += this.DB - 8); } else { i3 = this[t4] >> (r3 -= 8) & 255; if (r3 <= 0) { r3 += this.DB; --t4; } } if (0 != (128 & i3)) i3 |= -256; if (0 == n22 && (128 & this.s) != (128 & i3)) ++n22; if (n22 > 0 || i3 != this.s) e3[n22++] = i3; } } return e3; }; t3.prototype.equals = function(t4) { return 0 == this.compareTo(t4); }; t3.prototype.min = function(t4) { return this.compareTo(t4) < 0 ? this : t4; }; t3.prototype.max = function(t4) { return this.compareTo(t4) > 0 ? this : t4; }; t3.prototype.and = function(t4) { var e3 = H2(); this.bitwiseTo(t4, s2, e3); return e3; }; t3.prototype.or = function(t4) { var e3 = H2(); this.bitwiseTo(t4, a2, e3); return e3; }; t3.prototype.xor = function(t4) { var e3 = H2(); this.bitwiseTo(t4, o2, e3); return e3; }; t3.prototype.andNot = function(t4) { var e3 = H2(); this.bitwiseTo(t4, u2, e3); return e3; }; t3.prototype.not = function() { var t4 = H2(); for (var e3 = 0; e3 < this.t; ++e3) t4[e3] = this.DM & ~this[e3]; t4.t = this.t; t4.s = ~this.s; return t4; }; t3.prototype.shiftLeft = function(t4) { var e3 = H2(); if (t4 < 0) this.rShiftTo(-t4, e3); else this.lShiftTo(t4, e3); return e3; }; t3.prototype.shiftRight = function(t4) { var e3 = H2(); if (t4 < 0) this.lShiftTo(-t4, e3); else this.rShiftTo(t4, e3); return e3; }; t3.prototype.getLowestSetBit = function() { for (var t4 = 0; t4 < this.t; ++t4) if (0 != this[t4]) return t4 * this.DB + c2(this[t4]); if (this.s < 0) return this.t * this.DB; return -1; }; t3.prototype.bitCount = function() { var t4 = 0; var e3 = this.s & this.DM; for (var r3 = 0; r3 < this.t; ++r3) t4 += l2(this[r3] ^ e3); return t4; }; t3.prototype.testBit = function(t4) { var e3 = Math.floor(t4 / this.DB); if (e3 >= this.t) return 0 != this.s; return 0 != (this[e3] & 1 << t4 % this.DB); }; t3.prototype.setBit = function(t4) { return this.changeBit(t4, a2); }; t3.prototype.clearBit = function(t4) { return this.changeBit(t4, u2); }; t3.prototype.flipBit = function(t4) { return this.changeBit(t4, o2); }; t3.prototype.add = function(t4) { var e3 = H2(); this.addTo(t4, e3); return e3; }; t3.prototype.subtract = function(t4) { var e3 = H2(); this.subTo(t4, e3); return e3; }; t3.prototype.multiply = function(t4) { var e3 = H2(); this.multiplyTo(t4, e3); return e3; }; t3.prototype.divide = function(t4) { var e3 = H2(); this.divRemTo(t4, e3, null); return e3; }; t3.prototype.remainder = function(t4) { var e3 = H2(); this.divRemTo(t4, null, e3); return e3; }; t3.prototype.divideAndRemainder = function(t4) { var e3 = H2(); var r3 = H2(); this.divRemTo(t4, e3, r3); return [e3, r3]; }; t3.prototype.modPow = function(t4, e3) { var r3 = t4.bitLength(); var i3; var n22 = Y2(1); var s22; if (r3 <= 0) return n22; else if (r3 < 18) i3 = 1; else if (r3 < 48) i3 = 3; else if (r3 < 144) i3 = 4; else if (r3 < 768) i3 = 5; else i3 = 6; if (r3 < 8) s22 = new P2(e3); else if (e3.isEven()) s22 = new L2(e3); else s22 = new V2(e3); var a22 = []; var o22 = 3; var u22 = i3 - 1; var c22 = (1 << i3) - 1; a22[1] = s22.convert(this); if (i3 > 1) { var l22 = H2(); s22.sqrTo(a22[1], l22); while (o22 <= c22) { a22[o22] = H2(); s22.mulTo(l22, a22[o22 - 2], a22[o22]); o22 += 2; } } var f22 = t4.t - 1; var h22; var d22 = true; var v22 = H2(); var p2; r3 = W2(t4[f22]) - 1; while (f22 >= 0) { if (r3 >= u22) h22 = t4[f22] >> r3 - u22 & c22; else { h22 = (t4[f22] & (1 << r3 + 1) - 1) << u22 - r3; if (f22 > 0) h22 |= t4[f22 - 1] >> this.DB + r3 - u22; } o22 = i3; while (0 == (1 & h22)) { h22 >>= 1; --o22; } if ((r3 -= o22) < 0) { r3 += this.DB; --f22; } if (d22) { a22[h22].copyTo(n22); d22 = false; } else { while (o22 > 1) { s22.sqrTo(n22, v22); s22.sqrTo(v22, n22); o22 -= 2; } if (o22 > 0) s22.sqrTo(n22, v22); else { p2 = n22; n22 = v22; v22 = p2; } s22.mulTo(v22, a22[h22], n22); } while (f22 >= 0 && 0 == (t4[f22] & 1 << r3)) { s22.sqrTo(n22, v22); p2 = n22; n22 = v22; v22 = p2; if (--r3 < 0) { r3 = this.DB - 1; --f22; } } } return s22.revert(n22); }; t3.prototype.modInverse = function(e3) { var r3 = e3.isEven(); if (this.isEven() && r3 || 0 == e3.signum()) return t3.ZERO; var i3 = e3.clone(); var n22 = this.clone(); var s22 = Y2(1); var a22 = Y2(0); var o22 = Y2(0); var u22 = Y2(1); while (0 != i3.signum()) { while (i3.isEven()) { i3.rShiftTo(1, i3); if (r3) { if (!s22.isEven() || !a22.isEven()) { s22.addTo(this, s22); a22.subTo(e3, a22); } s22.rShiftTo(1, s22); } else if (!a22.isEven()) a22.subTo(e3, a22); a22.rShiftTo(1, a22); } while (n22.isEven()) { n22.rShiftTo(1, n22); if (r3) { if (!o22.isEven() || !u22.isEven()) { o22.addTo(this, o22); u22.subTo(e3, u22); } o22.rShiftTo(1, o22); } else if (!u22.isEven()) u22.subTo(e3, u22); u22.rShiftTo(1, u22); } if (i3.compareTo(n22) >= 0) { i3.subTo(n22, i3); if (r3) s22.subTo(o22, s22); a22.subTo(u22, a22); } else { n22.subTo(i3, n22); if (r3) o22.subTo(s22, o22); u22.subTo(a22, u22); } } if (0 != n22.compareTo(t3.ONE)) return t3.ZERO; if (u22.compareTo(e3) >= 0) return u22.subtract(e3); if (u22.signum() < 0) u22.addTo(e3, u22); else return u22; if (u22.signum() < 0) return u22.add(e3); else return u22; }; t3.prototype.pow = function(t4) { return this.exp(t4, new N2()); }; t3.prototype.gcd = function(t4) { var e3 = this.s < 0 ? this.negate() : this.clone(); var r3 = t4.s < 0 ? t4.negate() : t4.clone(); if (e3.compareTo(r3) < 0) { var i3 = e3; e3 = r3; r3 = i3; } var n22 = e3.getLowestSetBit(); var s22 = r3.getLowestSetBit(); if (s22 < 0) return e3; if (n22 < s22) s22 = n22; if (s22 > 0) { e3.rShiftTo(s22, e3); r3.rShiftTo(s22, r3); } while (e3.signum() > 0) { if ((n22 = e3.getLowestSetBit()) > 0) e3.rShiftTo(n22, e3); if ((n22 = r3.getLowestSetBit()) > 0) r3.rShiftTo(n22, r3); if (e3.compareTo(r3) >= 0) { e3.subTo(r3, e3); e3.rShiftTo(1, e3); } else { r3.subTo(e3, r3); r3.rShiftTo(1, r3); } } if (s22 > 0) r3.lShiftTo(s22, r3); return r3; }; t3.prototype.isProbablePrime = function(t4) { var e3; var r3 = this.abs(); if (1 == r3.t && r3[0] <= O2[O2.length - 1]) { for (e3 = 0; e3 < O2.length; ++e3) if (r3[0] == O2[e3]) return true; return false; } if (r3.isEven()) return false; e3 = 1; while (e3 < O2.length) { var i3 = O2[e3]; var n22 = e3 + 1; while (n22 < O2.length && i3 < k) i3 *= O2[n22++]; i3 = r3.modInt(i3); while (e3 < n22) if (i3 % O2[e3++] == 0) return false; } return r3.millerRabin(t4); }; t3.prototype.copyTo = function(t4) { for (var e3 = this.t - 1; e3 >= 0; --e3) t4[e3] = this[e3]; t4.t = this.t; t4.s = this.s; }; t3.prototype.fromInt = function(t4) { this.t = 1; this.s = t4 < 0 ? -1 : 0; if (t4 > 0) this[0] = t4; else if (t4 < -1) this[0] = t4 + this.DV; else this.t = 0; }; t3.prototype.fromString = function(e3, r3) { var i3; if (16 == r3) i3 = 4; else if (8 == r3) i3 = 3; else if (256 == r3) i3 = 8; else if (2 == r3) i3 = 1; else if (32 == r3) i3 = 5; else if (4 == r3) i3 = 2; else { this.fromRadix(e3, r3); return; } this.t = 0; this.s = 0; var n22 = e3.length; var s22 = false; var a22 = 0; while (--n22 >= 0) { var o22 = 8 == i3 ? 255 & +e3[n22] : G2(e3, n22); if (o22 < 0) { if ("-" == e3.charAt(n22)) s22 = true; continue; } s22 = false; if (0 == a22) this[this.t++] = o22; else if (a22 + i3 > this.DB) { this[this.t - 1] |= (o22 & (1 << this.DB - a22) - 1) << a22; this[this.t++] = o22 >> this.DB - a22; } else this[this.t - 1] |= o22 << a22; a22 += i3; if (a22 >= this.DB) a22 -= this.DB; } if (8 == i3 && 0 != (128 & +e3[0])) { this.s = -1; if (a22 > 0) this[this.t - 1] |= (1 << this.DB - a22) - 1 << a22; } this.clamp(); if (s22) t3.ZERO.subTo(this, this); }; t3.prototype.clamp = function() { var t4 = this.s & this.DM; while (this.t > 0 && this[this.t - 1] == t4) --this.t; }; t3.prototype.dlShiftTo = function(t4, e3) { var r3; for (r3 = this.t - 1; r3 >= 0; --r3) e3[r3 + t4] = this[r3]; for (r3 = t4 - 1; r3 >= 0; --r3) e3[r3] = 0; e3.t = this.t + t4; e3.s = this.s; }; t3.prototype.drShiftTo = function(t4, e3) { for (var r3 = t4; r3 < this.t; ++r3) e3[r3 - t4] = this[r3]; e3.t = Math.max(this.t - t4, 0); e3.s = this.s; }; t3.prototype.lShiftTo = function(t4, e3) { var r3 = t4 % this.DB; var i3 = this.DB - r3; var n22 = (1 << i3) - 1; var s22 = Math.floor(t4 / this.DB); var a22 = this.s << r3 & this.DM; for (var o22 = this.t - 1; o22 >= 0; --o22) { e3[o22 + s22 + 1] = this[o22] >> i3 | a22; a22 = (this[o22] & n22) << r3; } for (var o22 = s22 - 1; o22 >= 0; --o22) e3[o22] = 0; e3[s22] = a22; e3.t = this.t + s22 + 1; e3.s = this.s; e3.clamp(); }; t3.prototype.rShiftTo = function(t4, e3) { e3.s = this.s; var r3 = Math.floor(t4 / this.DB); if (r3 >= this.t) { e3.t = 0; return; } var i3 = t4 % this.DB; var n22 = this.DB - i3; var s22 = (1 << i3) - 1; e3[0] = this[r3] >> i3; for (var a22 = r3 + 1; a22 < this.t; ++a22) { e3[a22 - r3 - 1] |= (this[a22] & s22) << n22; e3[a22 - r3] = this[a22] >> i3; } if (i3 > 0) e3[this.t - r3 - 1] |= (this.s & s22) << n22; e3.t = this.t - r3; e3.clamp(); }; t3.prototype.subTo = function(t4, e3) { var r3 = 0; var i3 = 0; var n22 = Math.min(t4.t, this.t); while (r3 < n22) { i3 += this[r3] - t4[r3]; e3[r3++] = i3 & this.DM; i3 >>= this.DB; } if (t4.t < this.t) { i3 -= t4.s; while (r3 < this.t) { i3 += this[r3]; e3[r3++] = i3 & this.DM; i3 >>= this.DB; } i3 += this.s; } else { i3 += this.s; while (r3 < t4.t) { i3 -= t4[r3]; e3[r3++] = i3 & this.DM; i3 >>= this.DB; } i3 -= t4.s; } e3.s = i3 < 0 ? -1 : 0; if (i3 < -1) e3[r3++] = this.DV + i3; else if (i3 > 0) e3[r3++] = i3; e3.t = r3; e3.clamp(); }; t3.prototype.multiplyTo = function(e3, r3) { var i3 = this.abs(); var n22 = e3.abs(); var s22 = i3.t; r3.t = s22 + n22.t; while (--s22 >= 0) r3[s22] = 0; for (s22 = 0; s22 < n22.t; ++s22) r3[s22 + i3.t] = i3.am(0, n22[s22], r3, s22, 0, i3.t); r3.s = 0; r3.clamp(); if (this.s != e3.s) t3.ZERO.subTo(r3, r3); }; t3.prototype.squareTo = function(t4) { var e3 = this.abs(); var r3 = t4.t = 2 * e3.t; while (--r3 >= 0) t4[r3] = 0; for (r3 = 0; r3 < e3.t - 1; ++r3) { var i3 = e3.am(r3, e3[r3], t4, 2 * r3, 0, 1); if ((t4[r3 + e3.t] += e3.am(r3 + 1, 2 * e3[r3], t4, 2 * r3 + 1, i3, e3.t - r3 - 1)) >= e3.DV) { t4[r3 + e3.t] -= e3.DV; t4[r3 + e3.t + 1] = 1; } } if (t4.t > 0) t4[t4.t - 1] += e3.am(r3, e3[r3], t4, 2 * r3, 0, 1); t4.s = 0; t4.clamp(); }; t3.prototype.divRemTo = function(e3, r3, i3) { var n22 = e3.abs(); if (n22.t <= 0) return; var s22 = this.abs(); if (s22.t < n22.t) { if (null != r3) r3.fromInt(0); if (null != i3) this.copyTo(i3); return; } if (null == i3) i3 = H2(); var a22 = H2(); var o22 = this.s; var u22 = e3.s; var c22 = this.DB - W2(n22[n22.t - 1]); if (c22 > 0) { n22.lShiftTo(c22, a22); s22.lShiftTo(c22, i3); } else { n22.copyTo(a22); s22.copyTo(i3); } var l22 = a22.t; var f22 = a22[l22 - 1]; if (0 == f22) return; var h22 = f22 * (1 << this.F1) + (l22 > 1 ? a22[l22 - 2] >> this.F2 : 0); var d22 = this.FV / h22; var v22 = (1 << this.F1) / h22; var p2 = 1 << this.F2; var g22 = i3.t; var y22 = g22 - l22; var m22 = null == r3 ? H2() : r3; a22.dlShiftTo(y22, m22); if (i3.compareTo(m22) >= 0) { i3[i3.t++] = 1; i3.subTo(m22, i3); } t3.ONE.dlShiftTo(l22, m22); m22.subTo(a22, a22); while (a22.t < l22) a22[a22.t++] = 0; while (--y22 >= 0) { var w22 = i3[--g22] == f22 ? this.DM : Math.floor(i3[g22] * d22 + (i3[g22 - 1] + p2) * v22); if ((i3[g22] += a22.am(0, w22, i3, y22, 0, l22)) < w22) { a22.dlShiftTo(y22, m22); i3.subTo(m22, i3); while (i3[g22] < --w22) i3.subTo(m22, i3); } } if (null != r3) { i3.drShiftTo(l22, r3); if (o22 != u22) t3.ZERO.subTo(r3, r3); } i3.t = l22; i3.clamp(); if (c22 > 0) i3.rShiftTo(c22, i3); if (o22 < 0) t3.ZERO.subTo(i3, i3); }; t3.prototype.invDigit = function() { if (this.t < 1) return 0; var t4 = this[0]; if (0 == (1 & t4)) return 0; var e3 = 3 & t4; e3 = e3 * (2 - (15 & t4) * e3) & 15; e3 = e3 * (2 - (255 & t4) * e3) & 255; e3 = e3 * (2 - ((65535 & t4) * e3 & 65535)) & 65535; e3 = e3 * (2 - t4 * e3 % this.DV) % this.DV; return e3 > 0 ? this.DV - e3 : -e3; }; t3.prototype.isEven = function() { return 0 == (this.t > 0 ? 1 & this[0] : this.s); }; t3.prototype.exp = function(e3, r3) { if (e3 > 4294967295 || e3 < 1) return t3.ONE; var i3 = H2(); var n22 = H2(); var s22 = r3.convert(this); var a22 = W2(e3) - 1; s22.copyTo(i3); while (--a22 >= 0) { r3.sqrTo(i3, n22); if ((e3 & 1 << a22) > 0) r3.mulTo(n22, s22, i3); else { var o22 = i3; i3 = n22; n22 = o22; } } return r3.revert(i3); }; t3.prototype.chunkSize = function(t4) { return Math.floor(Math.LN2 * this.DB / Math.log(t4)); }; t3.prototype.toRadix = function(t4) { if (null == t4) t4 = 10; if (0 == this.signum() || t4 < 2 || t4 > 36) return "0"; var e3 = this.chunkSize(t4); var r3 = Math.pow(t4, e3); var i3 = Y2(r3); var n22 = H2(); var s22 = H2(); var a22 = ""; this.divRemTo(i3, n22, s22); while (n22.signum() > 0) { a22 = (r3 + s22.intValue()).toString(t4).substr(1) + a22; n22.divRemTo(i3, n22, s22); } return s22.intValue().toString(t4) + a22; }; t3.prototype.fromRadix = function(e3, r3) { this.fromInt(0); if (null == r3) r3 = 10; var i3 = this.chunkSize(r3); var n22 = Math.pow(r3, i3); var s22 = false; var a22 = 0; var o22 = 0; for (var u22 = 0; u22 < e3.length; ++u22) { var c22 = G2(e3, u22); if (c22 < 0) { if ("-" == e3.charAt(u22) && 0 == this.signum()) s22 = true; continue; } o22 = r3 * o22 + c22; if (++a22 >= i3) { this.dMultiply(n22); this.dAddOffset(o22, 0); a22 = 0; o22 = 0; } } if (a22 > 0) { this.dMultiply(Math.pow(r3, a22)); this.dAddOffset(o22, 0); } if (s22) t3.ZERO.subTo(this, this); }; t3.prototype.fromNumber = function(e3, r3, i3) { if ("number" == typeof r3) if (e3 < 2) this.fromInt(1); else { this.fromNumber(e3, i3); if (!this.testBit(e3 - 1)) this.bitwiseTo(t3.ONE.shiftLeft(e3 - 1), a2, this); if (this.isEven()) this.dAddOffset(1, 0); while (!this.isProbablePrime(r3)) { this.dAddOffset(2, 0); if (this.bitLength() > e3) this.subTo(t3.ONE.shiftLeft(e3 - 1), this); } } else { var n22 = []; var s22 = 7 & e3; n22.length = (e3 >> 3) + 1; r3.nextBytes(n22); if (s22 > 0) n22[0] &= (1 << s22) - 1; else n22[0] = 0; this.fromString(n22, 256); } }; t3.prototype.bitwiseTo = function(t4, e3, r3) { var i3; var n22; var s22 = Math.min(t4.t, this.t); for (i3 = 0; i3 < s22; ++i3) r3[i3] = e3(this[i3], t4[i3]); if (t4.t < this.t) { n22 = t4.s & this.DM; for (i3 = s22; i3 < this.t; ++i3) r3[i3] = e3(this[i3], n22); r3.t = this.t; } else { n22 = this.s & this.DM; for (i3 = s22; i3 < t4.t; ++i3) r3[i3] = e3(n22, t4[i3]); r3.t = t4.t; } r3.s = e3(this.s, t4.s); r3.clamp(); }; t3.prototype.changeBit = function(e3, r3) { var i3 = t3.ONE.shiftLeft(e3); this.bitwiseTo(i3, r3, i3); return i3; }; t3.prototype.addTo = function(t4, e3) { var r3 = 0; var i3 = 0; var n22 = Math.min(t4.t, this.t); while (r3 < n22) { i3 += this[r3] + t4[r3]; e3[r3++] = i3 & this.DM; i3 >>= this.DB; } if (t4.t < this.t) { i3 += t4.s; while (r3 < this.t) { i3 += this[r3]; e3[r3++] = i3 & this.DM; i3 >>= this.DB; } i3 += this.s; } else { i3 += this.s; while (r3 < t4.t) { i3 += t4[r3]; e3[r3++] = i3 & this.DM; i3 >>= this.DB; } i3 += t4.s; } e3.s = i3 < 0 ? -1 : 0; if (i3 > 0) e3[r3++] = i3; else if (i3 < -1) e3[r3++] = this.DV + i3; e3.t = r3; e3.clamp(); }; t3.prototype.dMultiply = function(t4) { this[this.t] = this.am(0, t4 - 1, this, 0, 0, this.t); ++this.t; this.clamp(); }; t3.prototype.dAddOffset = function(t4, e3) { if (0 == t4) return; while (this.t <= e3) this[this.t++] = 0; this[e3] += t4; while (this[e3] >= this.DV) { this[e3] -= this.DV; if (++e3 >= this.t) this[this.t++] = 0; ++this[e3]; } }; t3.prototype.multiplyLowerTo = function(t4, e3, r3) { var i3 = Math.min(this.t + t4.t, e3); r3.s = 0; r3.t = i3; while (i3 > 0) r3[--i3] = 0; for (var n22 = r3.t - this.t; i3 < n22; ++i3) r3[i3 + this.t] = this.am(0, t4[i3], r3, i3, 0, this.t); for (var n22 = Math.min(t4.t, e3); i3 < n22; ++i3) this.am(0, t4[i3], r3, i3, 0, e3 - i3); r3.clamp(); }; t3.prototype.multiplyUpperTo = function(t4, e3, r3) { --e3; var i3 = r3.t = this.t + t4.t - e3; r3.s = 0; while (--i3 >= 0) r3[i3] = 0; for (i3 = Math.max(e3 - this.t, 0); i3 < t4.t; ++i3) r3[this.t + i3 - e3] = this.am(e3 - i3, t4[i3], r3, 0, 0, this.t + i3 - e3); r3.clamp(); r3.drShiftTo(1, r3); }; t3.prototype.modInt = function(t4) { if (t4 <= 0) return 0; var e3 = this.DV % t4; var r3 = this.s < 0 ? t4 - 1 : 0; if (this.t > 0) if (0 == e3) r3 = this[0] % t4; else for (var i3 = this.t - 1; i3 >= 0; --i3) r3 = (e3 * r3 + this[i3]) % t4; return r3; }; t3.prototype.millerRabin = function(e3) { var r3 = this.subtract(t3.ONE); var i3 = r3.getLowestSetBit(); if (i3 <= 0) return false; var n22 = r3.shiftRight(i3); e3 = e3 + 1 >> 1; if (e3 > O2.length) e3 = O2.length; var s22 = H2(); for (var a22 = 0; a22 < e3; ++a22) { s22.fromInt(O2[Math.floor(Math.random() * O2.length)]); var o22 = s22.modPow(n22, this); if (0 != o22.compareTo(t3.ONE) && 0 != o22.compareTo(r3)) { var u22 = 1; while (u22++ < i3 && 0 != o22.compareTo(r3)) { o22 = o22.modPowInt(2, this); if (0 == o22.compareTo(t3.ONE)) return false; } if (0 != o22.compareTo(r3)) return false; } } return true; }; t3.prototype.square = function() { var t4 = H2(); this.squareTo(t4); return t4; }; t3.prototype.gcda = function(t4, e3) { var r3 = this.s < 0 ? this.negate() : this.clone(); var i3 = t4.s < 0 ? t4.negate() : t4.clone(); if (r3.compareTo(i3) < 0) { var n22 = r3; r3 = i3; i3 = n22; } var s22 = r3.getLowestSetBit(); var a22 = i3.getLowestSetBit(); if (a22 < 0) { e3(r3); return; } if (s22 < a22) a22 = s22; if (a22 > 0) { r3.rShiftTo(a22, r3); i3.rShiftTo(a22, i3); } var o22 = function() { if ((s22 = r3.getLowestSetBit()) > 0) r3.rShiftTo(s22, r3); if ((s22 = i3.getLowestSetBit()) > 0) i3.rShiftTo(s22, i3); if (r3.compareTo(i3) >= 0) { r3.subTo(i3, r3); r3.rShiftTo(1, r3); } else { i3.subTo(r3, i3); i3.rShiftTo(1, i3); } if (!(r3.signum() > 0)) { if (a22 > 0) i3.lShiftTo(a22, i3); setTimeout(function() { e3(i3); }, 0); } else setTimeout(o22, 0); }; setTimeout(o22, 10); }; t3.prototype.fromNumberAsync = function(e3, r3, i3, n22) { if ("number" == typeof r3) if (e3 < 2) this.fromInt(1); else { this.fromNumber(e3, i3); if (!this.testBit(e3 - 1)) this.bitwiseTo(t3.ONE.shiftLeft(e3 - 1), a2, this); if (this.isEven()) this.dAddOffset(1, 0); var s22 = this; var o22 = function() { s22.dAddOffset(2, 0); if (s22.bitLength() > e3) s22.subTo(t3.ONE.shiftLeft(e3 - 1), s22); if (s22.isProbablePrime(r3)) setTimeout(function() { n22(); }, 0); else setTimeout(o22, 0); }; setTimeout(o22, 0); } else { var u22 = []; var c22 = 7 & e3; u22.length = (e3 >> 3) + 1; r3.nextBytes(u22); if (c22 > 0) u22[0] &= (1 << c22) - 1; else u22[0] = 0; this.fromString(u22, 256); } }; return t3; }(); var N2 = function() { function t3() { } t3.prototype.convert = function(t4) { return t4; }; t3.prototype.revert = function(t4) { return t4; }; t3.prototype.mulTo = function(t4, e3, r3) { t4.multiplyTo(e3, r3); }; t3.prototype.sqrTo = function(t4, e3) { t4.squareTo(e3); }; return t3; }(); var P2 = function() { function t3(t4) { this.m = t4; } t3.prototype.convert = function(t4) { if (t4.s < 0 || t4.compareTo(this.m) >= 0) return t4.mod(this.m); else return t4; }; t3.prototype.revert = function(t4) { return t4; }; t3.prototype.reduce = function(t4) { t4.divRemTo(this.m, null, t4); }; t3.prototype.mulTo = function(t4, e3, r3) { t4.multiplyTo(e3, r3); this.reduce(r3); }; t3.prototype.sqrTo = function(t4, e3) { t4.squareTo(e3); this.reduce(e3); }; return t3; }(); var V2 = function() { function t3(t4) { this.m = t4; this.mp = t4.invDigit(); this.mpl = 32767 & this.mp; this.mph = this.mp >> 15; this.um = (1 << t4.DB - 15) - 1; this.mt2 = 2 * t4.t; } t3.prototype.convert = function(t4) { var e3 = H2(); t4.abs().dlShiftTo(this.m.t, e3); e3.divRemTo(this.m, null, e3); if (t4.s < 0 && e3.compareTo(C2.ZERO) > 0) this.m.subTo(e3, e3); return e3; }; t3.prototype.revert = function(t4) { var e3 = H2(); t4.copyTo(e3); this.reduce(e3); return e3; }; t3.prototype.reduce = function(t4) { while (t4.t <= this.mt2) t4[t4.t++] = 0; for (var e3 = 0; e3 < this.m.t; ++e3) { var r3 = 32767 & t4[e3]; var i3 = r3 * this.mpl + ((r3 * this.mph + (t4[e3] >> 15) * this.mpl & this.um) << 15) & t4.DM; r3 = e3 + this.m.t; t4[r3] += this.m.am(0, i3, t4, e3, 0, this.m.t); while (t4[r3] >= t4.DV) { t4[r3] -= t4.DV; t4[++r3]++; } } t4.clamp(); t4.drShiftTo(this.m.t, t4); if (t4.compareTo(this.m) >= 0) t4.subTo(this.m, t4); }; t3.prototype.mulTo = function(t4, e3, r3) { t4.multiplyTo(e3, r3); this.reduce(r3); }; t3.prototype.sqrTo = function(t4, e3) { t4.squareTo(e3); this.reduce(e3); }; return t3; }(); var L2 = function() { function t3(t4) { this.m = t4; this.r2 = H2(); this.q3 = H2(); C2.ONE.dlShiftTo(2 * t4.t, this.r2); this.mu = this.r2.divide(t4); } t3.prototype.convert = function(t4) { if (t4.s < 0 || t4.t > 2 * this.m.t) return t4.mod(this.m); else if (t4.compareTo(this.m) < 0) return t4; else { var e3 = H2(); t4.copyTo(e3); this.reduce(e3); return e3; } }; t3.prototype.revert = function(t4) { return t4; }; t3.prototype.reduce = function(t4) { t4.drShiftTo(this.m.t - 1, this.r2); if (t4.t > this.m.t + 1) { t4.t = this.m.t + 1; t4.clamp(); } this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3); this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); while (t4.compareTo(this.r2) < 0) t4.dAddOffset(1, this.m.t + 1); t4.subTo(this.r2, t4); while (t4.compareTo(this.m) >= 0) t4.subTo(this.m, t4); }; t3.prototype.mulTo = function(t4, e3, r3) { t4.multiplyTo(e3, r3); this.reduce(r3); }; t3.prototype.sqrTo = function(t4, e3) { t4.squareTo(e3); this.reduce(e3); }; return t3; }(); function H2() { return new C2(null); } function U2(t3, e3) { return new C2(t3, e3); } var K2 = "undefined" !== typeof navigator; if (K2 && B2 && "Microsoft Internet Explorer" == navigator.appName) { C2.prototype.am = function t3(e3, r3, i3, n22, s22, a22) { var o22 = 32767 & r3; var u22 = r3 >> 15; while (--a22 >= 0) { var c22 = 32767 & this[e3]; var l22 = this[e3++] >> 15; var f22 = u22 * c22 + l22 * o22; c22 = o22 * c22 + ((32767 & f22) << 15) + i3[n22] + (1073741823 & s22); s22 = (c22 >>> 30) + (f22 >>> 15) + u22 * l22 + (s22 >>> 30); i3[n22++] = 1073741823 & c22; } return s22; }; x = 30; } else if (K2 && B2 && "Netscape" != navigator.appName) { C2.prototype.am = function t3(e3, r3, i3, n22, s22, a22) { while (--a22 >= 0) { var o22 = r3 * this[e3++] + i3[n22] + s22; s22 = Math.floor(o22 / 67108864); i3[n22++] = 67108863 & o22; } return s22; }; x = 26; } else { C2.prototype.am = function t3(e3, r3, i3, n22, s22, a22) { var o22 = 16383 & r3; var u22 = r3 >> 14; while (--a22 >= 0) { var c22 = 16383 & this[e3]; var l22 = this[e3++] >> 14; var f22 = u22 * c22 + l22 * o22; c22 = o22 * c22 + ((16383 & f22) << 14) + i3[n22] + s22; s22 = (c22 >> 28) + (f22 >> 14) + u22 * l22; i3[n22++] = 268435455 & c22; } return s22; }; x = 28; } C2.prototype.DB = x; C2.prototype.DM = (1 << x) - 1; C2.prototype.DV = 1 << x; var j2 = 52; C2.prototype.FV = Math.pow(2, j2); C2.prototype.F1 = j2 - x; C2.prototype.F2 = 2 * x - j2; var q2 = []; var F2; var z2; F2 = "0".charCodeAt(0); for (z2 = 0; z2 <= 9; ++z2) q2[F2++] = z2; F2 = "a".charCodeAt(0); for (z2 = 10; z2 < 36; ++z2) q2[F2++] = z2; F2 = "A".charCodeAt(0); for (z2 = 10; z2 < 36; ++z2) q2[F2++] = z2; function G2(t3, e3) { var r3 = q2[t3.charCodeAt(e3)]; return null == r3 ? -1 : r3; } function Y2(t3) { var e3 = H2(); e3.fromInt(t3); return e3; } function W2(t3) { var e3 = 1; var r3; if (0 != (r3 = t3 >>> 16)) { t3 = r3; e3 += 16; } if (0 != (r3 = t3 >> 8)) { t3 = r3; e3 += 8; } if (0 != (r3 = t3 >> 4)) { t3 = r3; e3 += 4; } if (0 != (r3 = t3 >> 2)) { t3 = r3; e3 += 2; } if (0 != (r3 = t3 >> 1)) { t3 = r3; e3 += 1; } return e3; } C2.ZERO = Y2(0); C2.ONE = Y2(1); var J2 = function() { function t3() { this.i = 0; this.j = 0; this.S = []; } t3.prototype.init = function(t4) { var e3; var r3; var i3; for (e3 = 0; e3 < 256; ++e3) this.S[e3] = e3; r3 = 0; for (e3 = 0; e3 < 256; ++e3) { r3 = r3 + this.S[e3] + t4[e3 % t4.length] & 255; i3 = this.S[e3]; this.S[e3] = this.S[r3]; this.S[r3] = i3; } this.i = 0; this.j = 0; }; t3.prototype.next = function() { var t4; this.i = this.i + 1 & 255; this.j = this.j + this.S[this.i] & 255; t4 = this.S[this.i]; this.S[this.i] = this.S[this.j]; this.S[this.j] = t4; return this.S[t4 + this.S[this.i] & 255]; }; return t3; }(); function Z2() { return new J2(); } var $2 = 256; var X2; var Q2 = null; var tt2; if (null == Q2) { Q2 = []; tt2 = 0; } function nt2() { if (null == X2) { X2 = Z2(); while (tt2 < $2) { var t3 = Math.floor(65536 * Math.random()); Q2[tt2++] = 255 & t3; } X2.init(Q2); for (tt2 = 0; tt2 < Q2.length; ++tt2) Q2[tt2] = 0; tt2 = 0; } return X2.next(); } var st2 = function() { function t3() { } t3.prototype.nextBytes = function(t4) { for (var e3 = 0; e3 < t4.length; ++e3) t4[e3] = nt2(); }; return t3; }(); function at2(t3, e3) { if (e3 < t3.length + 22) { console.error("Message too long for RSA"); return null; } var r3 = e3 - t3.length - 6; var i3 = ""; for (var n22 = 0; n22 < r3; n22 += 2) i3 += "ff"; var s22 = "0001" + i3 + "00" + t3; return U2(s22, 16); } function ot2(t3, e3) { if (e3 < t3.length + 11) { console.error("Message too long for RSA"); return null; } var r3 = []; var i3 = t3.length - 1; while (i3 >= 0 && e3 > 0) { var n22 = t3.charCodeAt(i3--); if (n22 < 128) r3[--e3] = n22; else if (n22 > 127 && n22 < 2048) { r3[--e3] = 63 & n22 | 128; r3[--e3] = n22 >> 6 | 192; } else { r3[--e3] = 63 & n22 | 128; r3[--e3] = n22 >> 6 & 63 | 128; r3[--e3] = n22 >> 12 | 224; } } r3[--e3] = 0; var s22 = new st2(); var a22 = []; while (e3 > 2) { a22[0] = 0; while (0 == a22[0]) s22.nextBytes(a22); r3[--e3] = a22[0]; } r3[--e3] = 2; r3[--e3] = 0; return new C2(r3); } var ut2 = function() { function t3() { this.n = null; this.e = 0; this.d = null; this.p = null; this.q = null; this.dmp1 = null; this.dmq1 = null; this.coeff = null; } t3.prototype.doPublic = function(t4) { return t4.modPowInt(this.e, this.n); }; t3.prototype.doPrivate = function(t4) { if (null == this.p || null == this.q) return t4.modPow(this.d, this.n); var e3 = t4.mod(this.p).modPow(this.dmp1, this.p); var r3 = t4.mod(this.q).modPow(this.dmq1, this.q); while (e3.compareTo(r3) < 0) e3 = e3.add(this.p); return e3.subtract(r3).multiply(this.coeff).mod(this.p).multiply(this.q).add(r3); }; t3.prototype.setPublic = function(t4, e3) { if (null != t4 && null != e3 && t4.length > 0 && e3.length > 0) { this.n = U2(t4, 16); this.e = parseInt(e3, 16); } else console.error("Invalid RSA public key"); }; t3.prototype.encrypt = function(t4) { var e3 = this.n.bitLength() + 7 >> 3; var r3 = ot2(t4, e3); if (null == r3) return null; var i3 = this.doPublic(r3); if (null == i3) return null; var n22 = i3.toString(16); var s22 = n22.length; for (var a22 = 0; a22 < 2 * e3 - s22; a22++) n22 = "0" + n22; return n22; }; t3.prototype.setPrivate = function(t4, e3, r3) { if (null != t4 && null != e3 && t4.length > 0 && e3.length > 0) { this.n = U2(t4, 16); this.e = parseInt(e3, 16); this.d = U2(r3, 16); } else console.error("Invalid RSA private key"); }; t3.prototype.setPrivateEx = function(t4, e3, r3, i3, n22, s22, a22, o22) { if (null != t4 && null != e3 && t4.length > 0 && e3.length > 0) { this.n = U2(t4, 16); this.e = parseInt(e3, 16); this.d = U2(r3, 16); this.p = U2(i3, 16); this.q = U2(n22, 16); this.dmp1 = U2(s22, 16); this.dmq1 = U2(a22, 16); this.coeff = U2(o22, 16); } else console.error("Invalid RSA private key"); }; t3.prototype.generate = function(t4, e3) { var r3 = new st2(); var i3 = t4 >> 1; this.e = parseInt(e3, 16); var n22 = new C2(e3, 16); for (; ; ) { for (; ; ) { this.p = new C2(t4 - i3, 1, r3); if (0 == this.p.subtract(C2.ONE).gcd(n22).compareTo(C2.ONE) && this.p.isProbablePrime(10)) break; } for (; ; ) { this.q = new C2(i3, 1, r3); if (0 == this.q.subtract(C2.ONE).gcd(n22).compareTo(C2.ONE) && this.q.isProbablePrime(10)) break; } if (this.p.compareTo(this.q) <= 0) { var s22 = this.p; this.p = this.q; this.q = s22; } var a22 = this.p.subtract(C2.ONE); var o22 = this.q.subtract(C2.ONE); var u22 = a22.multiply(o22); if (0 == u22.gcd(n22).compareTo(C2.ONE)) { this.n = this.p.multiply(this.q); this.d = n22.modInverse(u22); this.dmp1 = this.d.mod(a22); this.dmq1 = this.d.mod(o22); this.coeff = this.q.modInverse(this.p); break; } } }; t3.prototype.decrypt = function(t4) { var e3 = U2(t4, 16); var r3 = this.doPrivate(e3); if (null == r3) return null; return ct2(r3, this.n.bitLength() + 7 >> 3); }; t3.prototype.generateAsync = function(t4, e3, r3) { var i3 = new st2(); var n22 = t4 >> 1; this.e = parseInt(e3, 16); var s22 = new C2(e3, 16); var a22 = this; var o22 = function() { var e4 = function() { if (a22.p.compareTo(a22.q) <= 0) { var t5 = a22.p; a22.p = a22.q; a22.q = t5; } var e5 = a22.p.subtract(C2.ONE); var i4 = a22.q.subtract(C2.ONE); var n3 = e5.multiply(i4); if (0 == n3.gcd(s22).compareTo(C2.ONE)) { a22.n = a22.p.multiply(a22.q); a22.d = s22.modInverse(n3); a22.dmp1 = a22.d.mod(e5); a22.dmq1 = a22.d.mod(i4); a22.coeff = a22.q.modInverse(a22.p); setTimeout(function() { r3(); }, 0); } else setTimeout(o22, 0); }; var u22 = function() { a22.q = H2(); a22.q.fromNumberAsync(n22, 1, i3, function() { a22.q.subtract(C2.ONE).gcda(s22, function(t5) { if (0 == t5.compareTo(C2.ONE) && a22.q.isProbablePrime(10)) setTimeout(e4, 0); else setTimeout(u22, 0); }); }); }; var c22 = function() { a22.p = H2(); a22.p.fromNumberAsync(t4 - n22, 1, i3, function() { a22.p.subtract(C2.ONE).gcda(s22, function(t5) { if (0 == t5.compareTo(C2.ONE) && a22.p.isProbablePrime(10)) setTimeout(u22, 0); else setTimeout(c22, 0); }); }); }; setTimeout(c22, 0); }; setTimeout(o22, 0); }; t3.prototype.sign = function(t4, e3, r3) { var i3 = ht2(r3); var n22 = i3 + e3(t4).toString(); var s22 = at2(n22, this.n.bitLength() / 4); if (null == s22) return null; var a22 = this.doPrivate(s22); if (null == a22) return null; var o22 = a22.toString(16); if (0 == (1 & o22.length)) return o22; else return "0" + o22; }; t3.prototype.verify = function(t4, e3, r3) { var i3 = U2(e3, 16); var n22 = this.doPublic(i3); if (null == n22) return null; var s22 = n22.toString(16).replace(/^1f+00/, ""); var a22 = dt2(s22); return a22 == r3(t4).toString(); }; t3.prototype.encryptLong = function(t4) { var e3 = this; var r3 = ""; var i3 = (this.n.bitLength() + 7 >> 3) - 11; var n22 = this.setSplitChn(t4, i3); n22.forEach(function(t5) { r3 += e3.encrypt(t5); }); return r3; }; t3.prototype.decryptLong = function(t4) { var e3 = ""; var r3 = this.n.bitLength() + 7 >> 3; var i3 = 2 * r3; if (t4.length > i3) { var n22 = t4.match(new RegExp(".{1," + i3 + "}", "g")) || []; var s22 = []; for (var a22 = 0; a22 < n22.length; a22++) { var o22 = U2(n22[a22], 16); var u22 = this.doPrivate(o22); if (null == u22) return null; s22.push(u22); } e3 = lt2(s22, r3); } else e3 = this.decrypt(t4); return e3; }; t3.prototype.setSplitChn = function(t4, e3, r3) { if (void 0 === r3) r3 = []; var i3 = t4.split(""); var n22 = 0; for (var s22 = 0; s22 < i3.length; s22++) { var a22 = i3[s22].charCodeAt(0); if (a22 <= 127) n22 += 1; else if (a22 <= 2047) n22 += 2; else if (a22 <= 65535) n22 += 3; else n22 += 4; if (n22 > e3) { var o22 = t4.substring(0, s22); r3.push(o22); return this.setSplitChn(t4.substring(s22), e3, r3); } } r3.push(t4); return r3; }; return t3; }(); function ct2(t3, e3) { var r3 = t3.toByteArray(); var i3 = 0; while (i3 < r3.length && 0 == r3[i3]) ++i3; if (r3.length - i3 != e3 - 1 || 2 != r3[i3]) return null; ++i3; while (0 != r3[i3]) if (++i3 >= r3.length) return null; var n22 = ""; while (++i3 < r3.length) { var s22 = 255 & r3[i3]; if (s22 < 128) n22 += String.fromCharCode(s22); else if (s22 > 191 && s22 < 224) { n22 += String.fromCharCode((31 & s22) << 6 | 63 & r3[i3 + 1]); ++i3; } else { n22 += String.fromCharCode((15 & s22) << 12 | (63 & r3[i3 + 1]) << 6 | 63 & r3[i3 + 2]); i3 += 2; } } return n22; } function lt2(t3, e3) { var r3 = []; for (var i3 = 0; i3 < t3.length; i3++) { var n22 = t3[i3]; var s22 = n22.toByteArray(); var a22 = 0; while (a22 < s22.length && 0 == s22[a22]) ++a22; if (s22.length - a22 != e3 - 1 || 2 != s22[a22]) return null; ++a22; while (0 != s22[a22]) if (++a22 >= s22.length) return null; r3 = r3.concat(s22.slice(a22 + 1)); } var o22 = r3; var u22 = -1; var c22 = ""; while (++u22 < o22.length) { var l22 = 255 & o22[u22]; if (l22 < 128) c22 += String.fromCharCode(l22); else if (l22 > 191 && l22 < 224) { c22 += String.fromCharCode((31 & l22) << 6 | 63 & o22[u22 + 1]); ++u22; } else { c22 += String.fromCharCode((15 & l22) << 12 | (63 & o22[u22 + 1]) << 6 | 63 & o22[u22 + 2]); u22 += 2; } } return c22; } var ft2 = { md2: "3020300c06082a864886f70d020205000410", md5: "3020300c06082a864886f70d020505000410", sha1: "3021300906052b0e03021a05000414", sha224: "302d300d06096086480165030402040500041c", sha256: "3031300d060960864801650304020105000420", sha384: "3041300d060960864801650304020205000430", sha512: "3051300d060960864801650304020305000440", ripemd160: "3021300906052b2403020105000414" }; function ht2(t3) { return ft2[t3] || ""; } function dt2(t3) { for (var e3 in ft2) if (ft2.hasOwnProperty(e3)) { var r3 = ft2[e3]; var i3 = r3.length; if (t3.substr(0, i3) == r3) return t3.substr(i3); } return t3; } var vt2 = {}; vt2.lang = { extend: function(t3, e3, r3) { if (!e3 || !t3) throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included."); var i3 = function() { }; i3.prototype = e3.prototype; t3.prototype = new i3(); t3.prototype.constructor = t3; t3.superclass = e3.prototype; if (e3.prototype.constructor == Object.prototype.constructor) e3.prototype.constructor = e3; if (r3) { var n22; for (n22 in r3) t3.prototype[n22] = r3[n22]; var s22 = function() { }, a22 = ["toString", "valueOf"]; try { if (/MSIE/.test(navigator.userAgent)) s22 = function(t4, e4) { for (n22 = 0; n22 < a22.length; n22 += 1) { var r4 = a22[n22], i4 = e4[r4]; if ("function" === typeof i4 && i4 != Object.prototype[r4]) t4[r4] = i4; } }; } catch (t4) { } s22(t3.prototype, r3); } } }; var pt2 = {}; if ("undefined" == typeof pt2.asn1 || !pt2.asn1) pt2.asn1 = {}; pt2.asn1.ASN1Util = new function() { this.integerToByteHex = function(t3) { var e3 = t3.toString(16); if (e3.length % 2 == 1) e3 = "0" + e3; return e3; }; this.bigIntToMinTwosComplementsHex = function(t3) { var e3 = t3.toString(16); if ("-" != e3.substr(0, 1)) { if (e3.length % 2 == 1) e3 = "0" + e3; else if (!e3.match(/^[0-7]/)) e3 = "00" + e3; } else { var r3 = e3.substr(1); var i3 = r3.length; if (i3 % 2 == 1) i3 += 1; else if (!e3.match(/^[0-7]/)) i3 += 2; var n22 = ""; for (var s22 = 0; s22 < i3; s22++) n22 += "f"; var a22 = new C2(n22, 16); var o22 = a22.xor(t3).add(C2.ONE); e3 = o22.toString(16).replace(/^-/, ""); } return e3; }; this.getPEMStringFromHex = function(t3, e3) { return hextopem(t3, e3); }; this.newObject = function(t3) { var e3 = pt2, r3 = e3.asn1, i3 = r3.DERBoolean, n22 = r3.DERInteger, s22 = r3.DERBitString, a22 = r3.DEROctetString, o22 = r3.DERNull, u22 = r3.DERObjectIdentifier, c22 = r3.DEREnumerated, l22 = r3.DERUTF8String, f22 = r3.DERNumericString, h22 = r3.DERPrintableString, d22 = r3.DERTeletexString, v22 = r3.DERIA5String, p2 = r3.DERUTCTime, g22 = r3.DERGeneralizedTime, y22 = r3.DERSequence, m22 = r3.DERSet, w22 = r3.DERTaggedObject, S22 = r3.ASN1Util.newObject; var _22 = Object.keys(t3); if (1 != _22.length) throw "key of param shall be only one."; var b22 = _22[0]; if (-1 == ":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + b22 + ":")) throw "undefined key: " + b22; if ("bool" == b22) return new i3(t3[b22]); if ("int" == b22) return new n22(t3[b22]); if ("bitstr" == b22) return new s22(t3[b22]); if ("octstr" == b22) return new a22(t3[b22]); if ("null" == b22) return new o22(t3[b22]); if ("oid" == b22) return new u22(t3[b22]); if ("enum" == b22) return new c22(t3[b22]); if ("utf8str" == b22) return new l22(t3[b22]); if ("numstr" == b22) return new f22(t3[b22]); if ("prnstr" == b22) return new h22(t3[b22]); if ("telstr" == b22) return new d22(t3[b22]); if ("ia5str" == b22) return new v22(t3[b22]); if ("utctime" == b22) return new p2(t3[b22]); if ("gentime" == b22) return new g22(t3[b22]); if ("seq" == b22) { var E22 = t3[b22]; var D22 = []; for (var M22 = 0; M22 < E22.length; M22++) { var T22 = S22(E22[M22]); D22.push(T22); } return new y22({ array: D22 }); } if ("set" == b22) { var E22 = t3[b22]; var D22 = []; for (var M22 = 0; M22 < E22.length; M22++) { var T22 = S22(E22[M22]); D22.push(T22); } return new m22({ array: D22 }); } if ("tag" == b22) { var I22 = t3[b22]; if ("[object Array]" === Object.prototype.toString.call(I22) && 3 == I22.length) { var A22 = S22(I22[2]); return new w22({ tag: I22[0], explicit: I22[1], obj: A22 }); } else { var x2 = {}; if (void 0 !== I22.explicit) x2.explicit = I22.explicit; if (void 0 !== I22.tag) x2.tag = I22.tag; if (void 0 === I22.obj) throw "obj shall be specified for 'tag'."; x2.obj = S22(I22.obj); return new w22(x2); } } }; this.jsonToASN1HEX = function(t3) { var e3 = this.newObject(t3); return e3.getEncodedHex(); }; }(); pt2.asn1.ASN1Util.oidHexToInt = function(t3) { var e3 = ""; var r3 = parseInt(t3.substr(0, 2), 16); var i3 = Math.floor(r3 / 40); var n22 = r3 % 40; var e3 = i3 + "." + n22; var s22 = ""; for (var a22 = 2; a22 < t3.length; a22 += 2) { var o22 = parseInt(t3.substr(a22, 2), 16); var u22 = ("00000000" + o22.toString(2)).slice(-8); s22 += u22.substr(1, 7); if ("0" == u22.substr(0, 1)) { var c22 = new C2(s22, 2); e3 = e3 + "." + c22.toString(10); s22 = ""; } } return e3; }; pt2.asn1.ASN1Util.oidIntToHex = function(t3) { var e3 = function(t4) { var e4 = t4.toString(16); if (1 == e4.length) e4 = "0" + e4; return e4; }; var r3 = function(t4) { var r4 = ""; var i4 = new C2(t4, 10); var n3 = i4.toString(2); var s3 = 7 - n3.length % 7; if (7 == s3) s3 = 0; var a3 = ""; for (var o22 = 0; o22 < s3; o22++) a3 += "0"; n3 = a3 + n3; for (var o22 = 0; o22 < n3.length - 1; o22 += 7) { var u22 = n3.substr(o22, 7); if (o22 != n3.length - 7) u22 = "1" + u22; r4 += e3(parseInt(u22, 2)); } return r4; }; if (!t3.match(/^[0-9.]+$/)) throw "malformed oid string: " + t3; var i3 = ""; var n22 = t3.split("."); var s22 = 40 * parseInt(n22[0]) + parseInt(n22[1]); i3 += e3(s22); n22.splice(0, 2); for (var a22 = 0; a22 < n22.length; a22++) i3 += r3(n22[a22]); return i3; }; pt2.asn1.ASN1Object = function() { var n22 = ""; this.getLengthHexFromValue = function() { if ("undefined" == typeof this.hV || null == this.hV) throw "this.hV is null or undefined."; if (this.hV.length % 2 == 1) throw "value hex must be even length: n=" + n22.length + ",v=" + this.hV; var t3 = this.hV.length / 2; var e3 = t3.toString(16); if (e3.length % 2 == 1) e3 = "0" + e3; if (t3 < 128) return e3; else { var r3 = e3.length / 2; if (r3 > 15) throw "ASN.1 length too long to represent by 8x: n = " + t3.toString(16); var i3 = 128 + r3; return i3.toString(16) + e3; } }; this.getEncodedHex = function() { if (null == this.hTLV || this.isModified) { this.hV = this.getFreshValueHex(); this.hL = this.getLengthHexFromValue(); this.hTLV = this.hT + this.hL + this.hV; this.isModified = false; } return this.hTLV; }; this.getValueHex = function() { this.getEncodedHex(); return this.hV; }; this.getFreshValueHex = function() { return ""; }; }; pt2.asn1.DERAbstractString = function(t3) { pt2.asn1.DERAbstractString.superclass.constructor.call(this); this.getString = function() { return this.s; }; this.setString = function(t4) { this.hTLV = null; this.isModified = true; this.s = t4; this.hV = stohex(this.s); }; this.setStringHex = function(t4) { this.hTLV = null; this.isModified = true; this.s = null; this.hV = t4; }; this.getFreshValueHex = function() { return this.hV; }; if ("undefined" != typeof t3) { if ("string" == typeof t3) this.setString(t3); else if ("undefined" != typeof t3["str"]) this.setString(t3["str"]); else if ("undefined" != typeof t3["hex"]) this.setStringHex(t3["hex"]); } }; vt2.lang.extend(pt2.asn1.DERAbstractString, pt2.asn1.ASN1Object); pt2.asn1.DERAbstractTime = function(t3) { pt2.asn1.DERAbstractTime.superclass.constructor.call(this); this.localDateToUTC = function(t4) { utc = t4.getTime() + 6e4 * t4.getTimezoneOffset(); var e3 = new Date(utc); return e3; }; this.formatDate = function(t4, e3, r3) { var i3 = this.zeroPadding; var n22 = this.localDateToUTC(t4); var s22 = String(n22.getFullYear()); if ("utc" == e3) s22 = s22.substr(2, 2); var a22 = i3(String(n22.getMonth() + 1), 2); var o22 = i3(String(n22.getDate()), 2); var u22 = i3(String(n22.getHours()), 2); var c22 = i3(String(n22.getMinutes()), 2); var l22 = i3(String(n22.getSeconds()), 2); var f22 = s22 + a22 + o22 + u22 + c22 + l22; if (true === r3) { var h22 = n22.getMilliseconds(); if (0 != h22) { var d22 = i3(String(h22), 3); d22 = d22.replace(/[0]+$/, ""); f22 = f22 + "." + d22; } } return f22 + "Z"; }; this.zeroPadding = function(t4, e3) { if (t4.length >= e3) return t4; return new Array(e3 - t4.length + 1).join("0") + t4; }; this.getString = function() { return this.s; }; this.setString = function(t4) { this.hTLV = null; this.isModified = true; this.s = t4; this.hV = stohex(t4); }; this.setByDateValue = function(t4, e3, r3, i3, n22, s22) { var a22 = new Date(Date.UTC(t4, e3 - 1, r3, i3, n22, s22, 0)); this.setByDate(a22); }; this.getFreshValueHex = function() { return this.hV; }; }; vt2.lang.extend(pt2.asn1.DERAbstractTime, pt2.asn1.ASN1Object); pt2.asn1.DERAbstractStructured = function(t3) { pt2.asn1.DERAbstractString.superclass.constructor.call(this); this.setByASN1ObjectArray = function(t4) { this.hTLV = null; this.isModified = true; this.asn1Array = t4; }; this.appendASN1Object = function(t4) { this.hTLV = null; this.isModified = true; this.asn1Array.push(t4); }; this.asn1Array = new Array(); if ("undefined" != typeof t3) { if ("undefined" != typeof t3["array"]) this.asn1Array = t3["array"]; } }; vt2.lang.extend(pt2.asn1.DERAbstractStructured, pt2.asn1.ASN1Object); pt2.asn1.DERBoolean = function() { pt2.asn1.DERBoolean.superclass.constructor.call(this); this.hT = "01"; this.hTLV = "0101ff"; }; vt2.lang.extend(pt2.asn1.DERBoolean, pt2.asn1.ASN1Object); pt2.asn1.DERInteger = function(t3) { pt2.asn1.DERInteger.superclass.constructor.call(this); this.hT = "02"; this.setByBigInteger = function(t4) { this.hTLV = null; this.isModified = true; this.hV = pt2.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t4); }; this.setByInteger = function(t4) { var e3 = new C2(String(t4), 10); this.setByBigInteger(e3); }; this.setValueHex = function(t4) { this.hV = t4; }; this.getFreshValueHex = function() { return this.hV; }; if ("undefined" != typeof t3) { if ("undefined" != typeof t3["bigint"]) this.setByBigInteger(t3["bigint"]); else if ("undefined" != typeof t3["int"]) this.setByInteger(t3["int"]); else if ("number" == typeof t3) this.setByInteger(t3); else if ("undefined" != typeof t3["hex"]) this.setValueHex(t3["hex"]); } }; vt2.lang.extend(pt2.asn1.DERInteger, pt2.asn1.ASN1Object); pt2.asn1.DERBitString = function(t3) { if (void 0 !== t3 && "undefined" !== typeof t3.obj) { var e3 = pt2.asn1.ASN1Util.newObject(t3.obj); t3.hex = "00" + e3.getEncodedHex(); } pt2.asn1.DERBitString.superclass.constructor.call(this); this.hT = "03"; this.setHexValueIncludingUnusedBits = function(t4) { this.hTLV = null; this.isModified = true; this.hV = t4; }; this.setUnusedBitsAndHexValue = function(t4, e4) { if (t4 < 0 || 7 < t4) throw "unused bits shall be from 0 to 7: u = " + t4; var r3 = "0" + t4; this.hTLV = null; this.isModified = true; this.hV = r3 + e4; }; this.setByBinaryString = function(t4) { t4 = t4.replace(/0+$/, ""); var e4 = 8 - t4.length % 8; if (8 == e4) e4 = 0; for (var r3 = 0; r3 <= e4; r3++) t4 += "0"; var i3 = ""; for (var r3 = 0; r3 < t4.length - 1; r3 += 8) { var n22 = t4.substr(r3, 8); var s22 = parseInt(n22, 2).toString(16); if (1 == s22.length) s22 = "0" + s22; i3 += s22; } this.hTLV = null; this.isModified = true; this.hV = "0" + e4 + i3; }; this.setByBooleanArray = function(t4) { var e4 = ""; for (var r3 = 0; r3 < t4.length; r3++) if (true == t4[r3]) e4 += "1"; else e4 += "0"; this.setByBinaryString(e4); }; this.newFalseArray = function(t4) { var e4 = new Array(t4); for (var r3 = 0; r3 < t4; r3++) e4[r3] = false; return e4; }; this.getFreshValueHex = function() { return this.hV; }; if ("undefined" != typeof t3) { if ("string" == typeof t3 && t3.toLowerCase().match(/^[0-9a-f]+$/)) this.setHexValueIncludingUnusedBits(t3); else if ("undefined" != typeof t3["hex"]) this.setHexValueIncludingUnusedBits(t3["hex"]); else if ("undefined" != typeof t3["bin"]) this.setByBinaryString(t3["bin"]); else if ("undefined" != typeof t3["array"]) this.setByBooleanArray(t3["array"]); } }; vt2.lang.extend(pt2.asn1.DERBitString, pt2.asn1.ASN1Object); pt2.asn1.DEROctetString = function(t3) { if (void 0 !== t3 && "undefined" !== typeof t3.obj) { var e3 = pt2.asn1.ASN1Util.newObject(t3.obj); t3.hex = e3.getEncodedHex(); } pt2.asn1.DEROctetString.superclass.constructor.call(this, t3); this.hT = "04"; }; vt2.lang.extend(pt2.asn1.DEROctetString, pt2.asn1.DERAbstractString); pt2.asn1.DERNull = function() { pt2.asn1.DERNull.superclass.constructor.call(this); this.hT = "05"; this.hTLV = "0500"; }; vt2.lang.extend(pt2.asn1.DERNull, pt2.asn1.ASN1Object); pt2.asn1.DERObjectIdentifier = function(t3) { var e3 = function(t4) { var e4 = t4.toString(16); if (1 == e4.length) e4 = "0" + e4; return e4; }; var r3 = function(t4) { var r4 = ""; var i3 = new C2(t4, 10); var n22 = i3.toString(2); var s22 = 7 - n22.length % 7; if (7 == s22) s22 = 0; var a22 = ""; for (var o22 = 0; o22 < s22; o22++) a22 += "0"; n22 = a22 + n22; for (var o22 = 0; o22 < n22.length - 1; o22 += 7) { var u22 = n22.substr(o22, 7); if (o22 != n22.length - 7) u22 = "1" + u22; r4 += e3(parseInt(u22, 2)); } return r4; }; pt2.asn1.DERObjectIdentifier.superclass.constructor.call(this); this.hT = "06"; this.setValueHex = function(t4) { this.hTLV = null; this.isModified = true; this.s = null; this.hV = t4; }; this.setValueOidString = function(t4) { if (!t4.match(/^[0-9.]+$/)) throw "malformed oid string: " + t4; var i3 = ""; var n22 = t4.split("."); var s22 = 40 * parseInt(n22[0]) + parseInt(n22[1]); i3 += e3(s22); n22.splice(0, 2); for (var a22 = 0; a22 < n22.length; a22++) i3 += r3(n22[a22]); this.hTLV = null; this.isModified = true; this.s = null; this.hV = i3; }; this.setValueName = function(t4) { var e4 = pt2.asn1.x509.OID.name2oid(t4); if ("" !== e4) this.setValueOidString(e4); else throw "DERObjectIdentifier oidName undefined: " + t4; }; this.getFreshValueHex = function() { return this.hV; }; if (void 0 !== t3) { if ("string" === typeof t3) if (t3.match(/^[0-2].[0-9.]+$/)) this.setValueOidString(t3); else this.setValueName(t3); else if (void 0 !== t3.oid) this.setValueOidString(t3.oid); else if (void 0 !== t3.hex) this.setValueHex(t3.hex); else if (void 0 !== t3.name) this.setValueName(t3.name); } }; vt2.lang.extend(pt2.asn1.DERObjectIdentifier, pt2.asn1.ASN1Object); pt2.asn1.DEREnumerated = function(t3) { pt2.asn1.DEREnumerated.superclass.constructor.call(this); this.hT = "0a"; this.setByBigInteger = function(t4) { this.hTLV = null; this.isModified = true; this.hV = pt2.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t4); }; this.setByInteger = function(t4) { var e3 = new C2(String(t4), 10); this.setByBigInteger(e3); }; this.setValueHex = function(t4) { this.hV = t4; }; this.getFreshValueHex = function() { return this.hV; }; if ("undefined" != typeof t3) { if ("undefined" != typeof t3["int"]) this.setByInteger(t3["int"]); else if ("number" == typeof t3) this.setByInteger(t3); else if ("undefined" != typeof t3["hex"]) this.setValueHex(t3["hex"]); } }; vt2.lang.extend(pt2.asn1.DEREnumerated, pt2.asn1.ASN1Object); pt2.asn1.DERUTF8String = function(t3) { pt2.asn1.DERUTF8String.superclass.constructor.call(this, t3); this.hT = "0c"; }; vt2.lang.extend(pt2.asn1.DERUTF8String, pt2.asn1.DERAbstractString); pt2.asn1.DERNumericString = function(t3) { pt2.asn1.DERNumericString.superclass.constructor.call(this, t3); this.hT = "12"; }; vt2.lang.extend(pt2.asn1.DERNumericString, pt2.asn1.DERAbstractString); pt2.asn1.DERPrintableString = function(t3) { pt2.asn1.DERPrintableString.superclass.constructor.call(this, t3); this.hT = "13"; }; vt2.lang.extend(pt2.asn1.DERPrintableString, pt2.asn1.DERAbstractString); pt2.asn1.DERTeletexString = function(t3) { pt2.asn1.DERTeletexString.superclass.constructor.call(this, t3); this.hT = "14"; }; vt2.lang.extend(pt2.asn1.DERTeletexString, pt2.asn1.DERAbstractString); pt2.asn1.DERIA5String = function(t3) { pt2.asn1.DERIA5String.superclass.constructor.call(this, t3); this.hT = "16"; }; vt2.lang.extend(pt2.asn1.DERIA5String, pt2.asn1.DERAbstractString); pt2.asn1.DERUTCTime = function(t3) { pt2.asn1.DERUTCTime.superclass.constructor.call(this, t3); this.hT = "17"; this.setByDate = function(t4) { this.hTLV = null; this.isModified = true; this.date = t4; this.s = this.formatDate(this.date, "utc"); this.hV = stohex(this.s); }; this.getFreshValueHex = function() { if ("undefined" == typeof this.date && "undefined" == typeof this.s) { this.date = /* @__PURE__ */ new Date(); this.s = this.formatDate(this.date, "utc"); this.hV = stohex(this.s); } return this.hV; }; if (void 0 !== t3) { if (void 0 !== t3.str) this.setString(t3.str); else if ("string" == typeof t3 && t3.match(/^[0-9]{12}Z$/)) this.setString(t3); else if (void 0 !== t3.hex) this.setStringHex(t3.hex); else if (void 0 !== t3.date) this.setByDate(t3.date); } }; vt2.lang.extend(pt2.asn1.DERUTCTime, pt2.asn1.DERAbstractTime); pt2.asn1.DERGeneralizedTime = function(t3) { pt2.asn1.DERGeneralizedTime.superclass.constructor.call(this, t3); this.hT = "18"; this.withMillis = false; this.setByDate = function(t4) { this.hTLV = null; this.isModified = true; this.date = t4; this.s = this.formatDate(this.date, "gen", this.withMillis); this.hV = stohex(this.s); }; this.getFreshValueHex = function() { if (void 0 === this.date && void 0 === this.s) { this.date = /* @__PURE__ */ new Date(); this.s = this.formatDate(this.date, "gen", this.withMillis); this.hV = stohex(this.s); } return this.hV; }; if (void 0 !== t3) { if (void 0 !== t3.str) this.setString(t3.str); else if ("string" == typeof t3 && t3.match(/^[0-9]{14}Z$/)) this.setString(t3); else if (void 0 !== t3.hex) this.setStringHex(t3.hex); else if (void 0 !== t3.date) this.setByDate(t3.date); if (true === t3.millis) this.withMillis = true; } }; vt2.lang.extend(pt2.asn1.DERGeneralizedTime, pt2.asn1.DERAbstractTime); pt2.asn1.DERSequence = function(t3) { pt2.asn1.DERSequence.superclass.constructor.call(this, t3); this.hT = "30"; this.getFreshValueHex = function() { var t4 = ""; for (var e3 = 0; e3 < this.asn1Array.length; e3++) { var r3 = this.asn1Array[e3]; t4 += r3.getEncodedHex(); } this.hV = t4; return this.hV; }; }; vt2.lang.extend(pt2.asn1.DERSequence, pt2.asn1.DERAbstractStructured); pt2.asn1.DERSet = function(t3) { pt2.asn1.DERSet.superclass.constructor.call(this, t3); this.hT = "31"; this.sortFlag = true; this.getFreshValueHex = function() { var t4 = new Array(); for (var e3 = 0; e3 < this.asn1Array.length; e3++) { var r3 = this.asn1Array[e3]; t4.push(r3.getEncodedHex()); } if (true == this.sortFlag) t4.sort(); this.hV = t4.join(""); return this.hV; }; if ("undefined" != typeof t3) { if ("undefined" != typeof t3.sortflag && false == t3.sortflag) this.sortFlag = false; } }; vt2.lang.extend(pt2.asn1.DERSet, pt2.asn1.DERAbstractStructured); pt2.asn1.DERTaggedObject = function(t3) { pt2.asn1.DERTaggedObject.superclass.constructor.call(this); this.hT = "a0"; this.hV = ""; this.isExplicit = true; this.asn1Object = null; this.setASN1Object = function(t4, e3, r3) { this.hT = e3; this.isExplicit = t4; this.asn1Object = r3; if (this.isExplicit) { this.hV = this.asn1Object.getEncodedHex(); this.hTLV = null; this.isModified = true; } else { this.hV = null; this.hTLV = r3.getEncodedHex(); this.hTLV = this.hTLV.replace(/^../, e3); this.isModified = false; } }; this.getFreshValueHex = function() { return this.hV; }; if ("undefined" != typeof t3) { if ("undefined" != typeof t3["tag"]) this.hT = t3["tag"]; if ("undefined" != typeof t3["explicit"]) this.isExplicit = t3["explicit"]; if ("undefined" != typeof t3["obj"]) { this.asn1Object = t3["obj"]; this.setASN1Object(this.isExplicit, this.hT, this.asn1Object); } } }; vt2.lang.extend(pt2.asn1.DERTaggedObject, pt2.asn1.ASN1Object); var gt2 = /* @__PURE__ */ function() { var t3 = function(e3, r3) { t3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t4, e4) { t4.__proto__ = e4; } || function(t4, e4) { for (var r4 in e4) if (Object.prototype.hasOwnProperty.call(e4, r4)) t4[r4] = e4[r4]; }; return t3(e3, r3); }; return function(e3, r3) { if ("function" !== typeof r3 && null !== r3) throw new TypeError("Class extends value " + String(r3) + " is not a constructor or null"); t3(e3, r3); function i3() { this.constructor = e3; } e3.prototype = null === r3 ? Object.create(r3) : (i3.prototype = r3.prototype, new i3()); }; }(); var yt2 = function(t3) { gt2(e3, t3); function e3(r3) { var i3 = t3.call(this) || this; if (r3) { if ("string" === typeof r3) i3.parseKey(r3); else if (e3.hasPrivateKeyProperty(r3) || e3.hasPublicKeyProperty(r3)) i3.parsePropertiesFrom(r3); } return i3; } e3.prototype.parseKey = function(t4) { try { var e4 = 0; var r3 = 0; var i3 = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/; var n22 = i3.test(t4) ? y2.decode(t4) : w2.unarmor(t4); var s22 = I2.decode(n22); if (3 === s22.sub.length) s22 = s22.sub[2].sub[0]; if (9 === s22.sub.length) { e4 = s22.sub[1].getHexStringValue(); this.n = U2(e4, 16); r3 = s22.sub[2].getHexStringValue(); this.e = parseInt(r3, 16); var a22 = s22.sub[3].getHexStringValue(); this.d = U2(a22, 16); var o22 = s22.sub[4].getHexStringValue(); this.p = U2(o22, 16); var u22 = s22.sub[5].getHexStringValue(); this.q = U2(u22, 16); var c22 = s22.sub[6].getHexStringValue(); this.dmp1 = U2(c22, 16); var l22 = s22.sub[7].getHexStringValue(); this.dmq1 = U2(l22, 16); var f22 = s22.sub[8].getHexStringValue(); this.coeff = U2(f22, 16); } else if (2 === s22.sub.length) { var h22 = s22.sub[1]; var d22 = h22.sub[0]; e4 = d22.sub[0].getHexStringValue(); this.n = U2(e4, 16); r3 = d22.sub[1].getHexStringValue(); this.e = parseInt(r3, 16); } else return false; return true; } catch (t5) { return false; } }; e3.prototype.getPrivateBaseKey = function() { var t4 = { array: [new pt2.asn1.DERInteger({ int: 0 }), new pt2.asn1.DERInteger({ bigint: this.n }), new pt2.asn1.DERInteger({ int: this.e }), new pt2.asn1.DERInteger({ bigint: this.d }), new pt2.asn1.DERInteger({ bigint: this.p }), new pt2.asn1.DERInteger({ bigint: this.q }), new pt2.asn1.DERInteger({ bigint: this.dmp1 }), new pt2.asn1.DERInteger({ bigint: this.dmq1 }), new pt2.asn1.DERInteger({ bigint: this.coeff })] }; var e4 = new pt2.asn1.DERSequence(t4); return e4.getEncodedHex(); }; e3.prototype.getPrivateBaseKeyB64 = function() { return d2(this.getPrivateBaseKey()); }; e3.prototype.getPublicBaseKey = function() { var t4 = new pt2.asn1.DERSequence({ array: [new pt2.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }), new pt2.asn1.DERNull()] }); var e4 = new pt2.asn1.DERSequence({ array: [new pt2.asn1.DERInteger({ bigint: this.n }), new pt2.asn1.DERInteger({ int: this.e })] }); var r3 = new pt2.asn1.DERBitString({ hex: "00" + e4.getEncodedHex() }); var i3 = new pt2.asn1.DERSequence({ array: [t4, r3] }); return i3.getEncodedHex(); }; e3.prototype.getPublicBaseKeyB64 = function() { return d2(this.getPublicBaseKey()); }; e3.wordwrap = function(t4, e4) { e4 = e4 || 64; if (!t4) return t4; var r3 = "(.{1," + e4 + "})( +|$\n?)|(.{1," + e4 + "})"; return t4.match(RegExp(r3, "g")).join("\n"); }; e3.prototype.getPrivateKey = function() { var t4 = "-----BEGIN RSA PRIVATE KEY-----\n"; t4 += e3.wordwrap(this.getPrivateBaseKeyB64()) + "\n"; t4 += "-----END RSA PRIVATE KEY-----"; return t4; }; e3.prototype.getPublicKey = function() { var t4 = "-----BEGIN PUBLIC KEY-----\n"; t4 += e3.wordwrap(this.getPublicBaseKeyB64()) + "\n"; t4 += "-----END PUBLIC KEY-----"; return t4; }; e3.hasPublicKeyProperty = function(t4) { t4 = t4 || {}; return t4.hasOwnProperty("n") && t4.hasOwnProperty("e"); }; e3.hasPrivateKeyProperty = function(t4) { t4 = t4 || {}; return t4.hasOwnProperty("n") && t4.hasOwnProperty("e") && t4.hasOwnProperty("d") && t4.hasOwnProperty("p") && t4.hasOwnProperty("q") && t4.hasOwnProperty("dmp1") && t4.hasOwnProperty("dmq1") && t4.hasOwnProperty("coeff"); }; e3.prototype.parsePropertiesFrom = function(t4) { this.n = t4.n; this.e = t4.e; if (t4.hasOwnProperty("d")) { this.d = t4.d; this.p = t4.p; this.q = t4.q; this.dmp1 = t4.dmp1; this.dmq1 = t4.dmq1; this.coeff = t4.coeff; } }; return e3; }(ut2); const mt2 = { i: "3.2.1" }; var wt2 = function() { function t3(t4) { if (void 0 === t4) t4 = {}; t4 = t4 || {}; this.default_key_size = t4.default_key_size ? parseInt(t4.default_key_size, 10) : 1024; this.default_public_exponent = t4.default_public_exponent || "010001"; this.log = t4.log || false; this.key = null; } t3.prototype.setKey = function(t4) { if (this.log && this.key) console.warn("A key was already set, overriding existing."); this.key = new yt2(t4); }; t3.prototype.setPrivateKey = function(t4) { this.setKey(t4); }; t3.prototype.setPublicKey = function(t4) { this.setKey(t4); }; t3.prototype.decrypt = function(t4) { try { return this.getKey().decrypt(t4); } catch (t5) { return false; } }; t3.prototype.encrypt = function(t4) { try { return this.getKey().encrypt(t4); } catch (t5) { return false; } }; t3.prototype.encryptLong = function(t4) { try { return d2(this.getKey().encryptLong(t4)); } catch (t5) { return false; } }; t3.prototype.decryptLong = function(t4) { try { return this.getKey().decryptLong(t4); } catch (t5) { return false; } }; t3.prototype.sign = function(t4, e3, r3) { try { return d2(this.getKey().sign(t4, e3, r3)); } catch (t5) { return false; } }; t3.prototype.verify = function(t4, e3, r3) { try { return this.getKey().verify(t4, v2(e3), r3); } catch (t5) { return false; } }; t3.prototype.getKey = function(t4) { if (!this.key) { this.key = new yt2(); if (t4 && "[object Function]" === {}.toString.call(t4)) { this.key.generateAsync(this.default_key_size, this.default_public_exponent, t4); return; } this.key.generate(this.default_key_size, this.default_public_exponent); } return this.key; }; t3.prototype.getPrivateKey = function() { return this.getKey().getPrivateKey(); }; t3.prototype.getPrivateKeyB64 = function() { return this.getKey().getPrivateBaseKeyB64(); }; t3.prototype.getPublicKey = function() { return this.getKey().getPublicKey(); }; t3.prototype.getPublicKeyB64 = function() { return this.getKey().getPublicBaseKeyB64(); }; t3.version = mt2.i; return t3; }(); const St2 = wt2; }, 2480: () => { } }; var e2 = {}; function r2(i22) { var n2 = e2[i22]; if (void 0 !== n2) return n2.exports; var s2 = e2[i22] = { id: i22, loaded: false, exports: {} }; t2[i22].call(s2.exports, s2, s2.exports, r2); s2.loaded = true; return s2.exports; } (() => { r2.d = (t22, e22) => { for (var i22 in e22) if (r2.o(e22, i22) && !r2.o(t22, i22)) Object.defineProperty(t22, i22, { enumerable: true, get: e22[i22] }); }; })(); (() => { r2.g = function() { if ("object" === typeof globalThis) return globalThis; try { return this || new Function("return this")(); } catch (t22) { if ("object" === typeof window) return window; } }(); })(); (() => { r2.o = (t22, e22) => Object.prototype.hasOwnProperty.call(t22, e22); })(); (() => { r2.r = (t22) => { if ("undefined" !== typeof Symbol && Symbol.toStringTag) Object.defineProperty(t22, Symbol.toStringTag, { value: "Module" }); Object.defineProperty(t22, "__esModule", { value: true }); }; })(); (() => { r2.nmd = (t22) => { t22.paths = []; if (!t22.children) t22.children = []; return t22; }; })(); var i2 = r2(9021); return i2; })()); })(gtpushMin); var gtpushMinExports = gtpushMin.exports; var GtPush = /* @__PURE__ */ getDefaultExportFromCjs(gtpushMinExports); function initPushNotification() { if (typeof plus !== "undefined" && plus.push) { plus.globalEvent.addEventListener("newPath", ({ path }) => { if (!path) { return; } const pages2 = getCurrentPages(); const currentPage = pages2[pages2.length - 1]; if (currentPage && currentPage.$page && currentPage.$page.fullPath === path) { return; } uni.navigateTo({ url: path, fail(res) { if (res.errMsg.indexOf("tabbar") > -1) { uni.switchTab({ url: path, fail(res2) { console.error(res2.errMsg); } }); } else { console.error(res.errMsg); } } }); }); } } uni.invokePushCallback({ type: "enabled" }); const appid = "__UNI__9F097F0"; { initPushNotification(); if (typeof uni.onAppShow === "function") { uni.onAppShow(() => { GtPush.enableSocket(true); }); } GtPush.init({ appid, onError: (res) => { console.error(res.error); const data = { type: "clientId", cid: "", errMsg: res.error }; uni.invokePushCallback(data); }, onClientId: (res) => { const data = { type: "clientId", cid: res.cid }; uni.invokePushCallback(data); }, onlineState: (res) => { const data = { type: "lineState", online: res.online }; uni.invokePushCallback(data); }, onPushMsg: (res) => { const data = { type: "pushMsg", message: res.message }; uni.invokePushCallback(data); } }); uni.onPushMessage((res) => { if (res.type === "receive" && res.data && res.data.force_notification) { uni.createPushMessage(res.data); res.stopped = true; } }); } const baseUrl = "https://36.112.48.190/jeecg-boot/sys/common/static/"; const useUpdateApp = defineStore("updateApp", () => { const updateOptions = vue.reactive({ force: false, hasNew: false, content: "", url: "", wgtUrl: "" }); const systemInfo = uni.getSystemInfoSync(); function checkAppUpdate(to = false) { try { upDateAppApi().then(async (res) => { let { result } = res; result.apkUrl = baseUrl + result.apkUrl; result.wgtUrl = baseUrl + result.wgtUrl; updateOptions.wgtUrl = result.wgtUrl; if (systemInfo.osName === "android") { updateOptions.apkUrl = result.apkUrl; updateOptions.hasNew = await hasNewVersion(result.versionCode, result.update == "wgt"); } else { updateOptions.url = `itms-apps://itunes.apple.com/cn/app/id${123456}?mt=8`; } updateOptions.hasNew && uni.showModal({ title: "更新", content: "发现新版本,请更新", success(res2) { if (res2.confirm) { onClickUpdate(result.update, result); } else { plus.runtime.quit(); } } }); }); } catch (error) { updateOptions.hasNew = false; } } return { checkAppUpdate, ...vue.toRefs(updateOptions), systemInfo }; }); const _sfc_main$3 = { __name: "App", setup(__props) { onLaunch(() => { useUpdateApp().checkAppUpdate(); getLocation(); }); onShow(() => { ifGray(); }); const ifGray = () => { cxcJurisdictionApi({ id: "1827997127165677570" }).then((res) => { if (res.success) { const store = useStore(); uni.setStorageSync("isgray", res.result.value); store.setIsgray(res.result.value); } }); }; return () => { }; } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "D:/szcxApp/cxc-szcx-uniapp/App.vue"]]); const _sfc_main$2 = { __name: "index", props: { dataId: { type: String, default: "" } }, setup(__props) { const props = __props; const imageValue = vue.ref([]); const imageStyles = { width: 64, height: 64, border: { color: "#dce7e1", width: 2, style: "dashed", radius: "2px" } }; const info = vue.ref({}); const qjQueryById = () => { qjQueryByIdApi({ id: props.dataId }).then((res) => { if (res.success) { info.value = res.result.records[0]; imageValue.value = info.value.path.split(",").map((path) => { const name = path.split("/").pop(); const extname = name.split(".").pop(); return { name, extname, url: imgUrl(path) }; }); } }); }; const extActFlowData = () => { extActFlowDataApi({ flowCode: "dev_cxc_qxj", dataId: props.dataId }).then((res) => { if (res.success) { processHistoryList(res.result.processInstanceId); } }); }; const step = vue.ref([]); const processHistoryList = (processInstanceId) => { processHistoryListApi({ processInstanceId }).then((res) => { if (res.success) { step.value = res.result.records; } }); }; vue.onMounted(() => { qjQueryById(); extActFlowData(); }); return (_ctx, _cache) => { const _component_uni_file_picker = resolveEasycom(vue.resolveDynamicComponent("uni-file-picker"), __easycom_0$2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "info_box" }, [ vue.createElementVNode("view", { class: "title" }, " 申请信息 "), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 请假职工: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.username_dictText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 所属单位: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.sysOrgCode_dictText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 联系方式: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.phone), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 请假类型: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.type), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 请假开始时间: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.begintime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 请假结束时间: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.endtime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 请假天数: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.days), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 审批人: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.examineleader_dictText), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 请假地点: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.address), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 请假原因: "), vue.createElementVNode( "text", null, vue.toDisplayString(info.value.reason), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode("view", null, " 附件: "), vue.createVNode(_component_uni_file_picker, { modelValue: imageValue.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imageValue.value = $event), "image-styles": imageStyles }, null, 8, ["modelValue"]) ]) ]) ]), vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "progress" }, [ vue.createElementVNode("view", { class: "title" }, " 审批流程 "), vue.createElementVNode("view", { class: "progress_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(step.value, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "box", key: index }, [ vue.createElementVNode("view", { class: "topic f-row aic" }, [ vue.createElementVNode( "view", null, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["status", { "complete": item.deleteReason == "已完成" }, { "refuse": item.deleteReason == "已拒绝" }]) }, vue.toDisplayString(item.deleteReason), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode( "view", { class: "name_time" }, vue.toDisplayString(item.assigneeName) + " | " + vue.toDisplayString(item.endTime), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ], 64 /* STABLE_FRAGMENT */ ); }; } }; const leaveApplication = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-e7121647"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/leaveApplication/index.vue"]]); const _sfc_main$1 = { __name: "processCom", props: { info: { type: Array, default: () => [] } }, setup(__props) { return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "info_box" }, [ vue.createElementVNode("view", { class: "title" }, " 申请信息 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(__props.info, (item, i2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "", key: i2 }, [ vue.createElementVNode("view", { class: "info f-row aic jcb" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.title) + ": ", 1 /* TEXT */ ), item.title == "事项内容" ? (vue.openBlock(), vue.createElementBlock("rich-text", { key: 0, nodes: item.data }, null, 8, ["nodes"])) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1 }, vue.toDisplayString(item.data), 1 /* TEXT */ )) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]); }; } }; const processCom = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-edc8a089"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/processCom.vue"]]); const _sfc_main = { __name: "supervise", props: { dataId: { type: String, default: "" } }, setup(__props) { const props = __props; const tabArr = [{ title: "基本信息", id: 1 }, { title: "事项详情", id: 2 }, { title: "添加下级", id: 3 }, { title: "节点顺序", id: 4 }, { title: "运行计划", id: 5 }]; const currentTab = vue.ref(1); const changeTab = (id) => { currentTab.value = id; dbSxxqQueryById(); }; const info = vue.ref([]); const dbSxxqQueryById = () => { dbSxxqQueryByIdApi({ id: props.dataId }).then((res) => { if (res.success) { if (currentTab.value == 1) { dbJbxxQueryById(res.result.jbxxid); } if (currentTab.value == 2) { let d2 = res.result; info.value = [{ title: "承办部门", data: d2.zbdw }, { title: "协办部门", data: d2.xbdw }, { title: "部门领导", data: d2.fgld }, { title: "办理人员", data: d2.dbry }, { title: "要求反馈时间", data: d2.yqfksj }, { title: "节点名称", data: "" }, { title: "预计完成时间", data: "" }, { title: "实际反馈时间", data: d2.sjfksj }, { title: "自评价", data: d2.zpj }, { title: "发起时间", data: d2.fqsj }, { title: "序号", data: "" }, { title: "概述", data: "" }, { title: "时间进度", data: "" }, { title: "事项内容", data: d2.sxnr }]; } } }); }; const dbJbxxQueryById = (id) => { dbJbxxQueryByIdApi({ id }).then((res) => { if (res.success) { let d2 = res.result; info.value = [{ title: "督办分类", data: d2.fl }, { title: "协办部门", data: d2.xbbm }, { title: "督办部门", data: d2.cbbm }, { title: "督办人员", data: d2.dbry }, { title: "督办部门负责人", data: d2.zrr }, { title: "是否涉密", data: d2.sfsm }, { title: "计划完成时间", data: d2.jhwcsj }, { title: "实际完成时间", data: d2.wcsj }, { title: "完成状态", data: d2.wczt }, { title: "备注", data: d2.bz }, { title: "督办事项", data: d2.dbsx }, { title: "时间进度", data: d2.sjjd }]; } }); }; const extActFlowData = (dataId) => { extActFlowDataApi({ flowCode: "dev_db_sxxq_001", dataId: props.dataId }).then((res) => { if (res.success) { processHistoryList(res.result.processInstanceId); } }); }; const step = vue.ref([]); const processHistoryList = (processInstanceId) => { formatAppLog("log", "at bpm/supervise.vue:199", "000", processInstanceId); processHistoryListApi({ processInstanceId }).then((res) => { formatAppLog("log", "at bpm/supervise.vue:203", "0088800", res); if (res.success) { step.value = res.result.records; } }); }; vue.onMounted(() => { dbSxxqQueryById(); extActFlowData(); }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "tab f-row aic" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(tabArr, (item, i2) => { return vue.createElementVNode("view", { class: vue.normalizeClass({ "active": currentTab.value == item.id }), key: i2, onClick: ($event) => changeTab(item.id) }, vue.toDisplayString(item.title), 11, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]), vue.createVNode(processCom, { info: info.value }, null, 8, ["info"]), vue.createElementVNode("view", { class: "f-col aic" }, [ vue.createElementVNode("view", { class: "progress" }, [ vue.createElementVNode("view", { class: "title" }, " 审批流程 "), vue.createElementVNode("view", { class: "progress_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(step.value, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "box", key: index }, [ vue.createElementVNode("view", { class: "topic f-row aic" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["status", { "complete": item.deleteReason == "已完成" }, { "refuse": item.deleteReason == "已拒绝" }]) }, vue.toDisplayString(item.deleteReason), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode( "view", { class: "name_time" }, vue.toDisplayString(item.assigneeName) + " | " + vue.toDisplayString(item.endTime), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]); }; } }; const supervise = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ecbe2408"], ["__file", "D:/szcxApp/cxc-szcx-uniapp/bpm/supervise.vue"]]); const pinia = createPinia(); function createApp() { const app = vue.createVueApp(App); app.use(pinia); app.component("leaveApplication", leaveApplication); app.component("supervise", supervise); app.config.globalProperties.$toast = toast; return { app }; } const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp(); uni.Vuex = __Vuex__; uni.Pinia = __Pinia__; __app__.provide("__globalStyles", __uniConfig.styles); __app__._component.mpType = "app"; __app__._component.render = () => { }; __app__.mount("#app"); })(Vue);