var __accessCheck = (obj, member, msg) => { if (!member.has(obj)) throw TypeError("Cannot " + msg); }; var __privateGet = (obj, member, getter) => { __accessCheck(obj, member, "read from private field"); return getter ? getter.call(obj) : member.get(obj); }; var __privateAdd = (obj, member, value) => { if (member.has(obj)) throw TypeError("Cannot add the same private member more than once"); member instanceof WeakSet ? member.add(obj) : member.set(obj, value); }; var __privateSet = (obj, member, value, setter) => { __accessCheck(obj, member, "write to private field"); setter ? setter.call(obj, value) : member.set(obj, value); return value; }; 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_HIDE = "onHide"; const ON_LAUNCH = "onLaunch"; const ON_ERROR = "onError"; const ON_LOAD = "onLoad"; const ON_READY = "onReady"; const ON_BACK_PRESS = "onBackPress"; const ON_PAGE_SCROLL = "onPageScroll"; const ON_REACH_BOTTOM = "onReachBottom"; const ON_PULL_DOWN_REFRESH = "onPullDownRefresh"; function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); } else { console[type].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom2) { return typeof component === "string" ? easycom2 : component; } const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); }; const onShow = /* @__PURE__ */ createHook(ON_SHOW); const onHide = /* @__PURE__ */ createHook(ON_HIDE); const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH); const onError = /* @__PURE__ */ createHook(ON_ERROR); const onLoad = /* @__PURE__ */ createHook(ON_LOAD); const onReady = /* @__PURE__ */ createHook(ON_READY); const onBackPress = /* @__PURE__ */ createHook(ON_BACK_PRESS); const onPageScroll = /* @__PURE__ */ createHook(ON_PAGE_SCROLL); const onReachBottom = /* @__PURE__ */ createHook(ON_REACH_BOTTOM); const onPullDownRefresh = /* @__PURE__ */ createHook(ON_PULL_DOWN_REFRESH); var toString$1 = Object.prototype.toString; function isArray$3(val) { return toString$1.call(val) === "[object Array]"; } function isObject$6(val) { return val !== null && typeof val === "object"; } function isDate$2(val) { return toString$1.call(val) === "[object Date]"; } function isURLSearchParams$1(val) { return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams; } function forEach$1(obj, fn) { if (obj === null || typeof obj === "undefined") { return; } if (typeof obj !== "object") { obj = [obj]; } if (isArray$3(obj)) { for (var i2 = 0, l2 = obj.length; i2 < l2; i2++) { fn.call(null, obj[i2], i2, obj); } } else { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } function isPlainObject$3(obj) { return Object.prototype.toString.call(obj) === "[object Object]"; } function deepMerge$1() { let result2 = {}; function assignValue(val, key) { if (typeof result2[key] === "object" && typeof val === "object") { result2[key] = deepMerge$1(result2[key], val); } else if (typeof val === "object") { result2[key] = deepMerge$1({}, val); } else { result2[key] = val; } } for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) { forEach$1(arguments[i2], assignValue); } return result2; } function isUndefined$1(val) { return typeof val === "undefined"; } function encode$2(val) { return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function buildURL$1(url2, params, paramsSerializer) { if (!params) { return url2; } var serializedParams; if (paramsSerializer) { serializedParams = paramsSerializer(params); } else if (isURLSearchParams$1(params)) { serializedParams = params.toString(); } else { var parts = []; forEach$1(params, function serialize(val, key) { if (val === null || typeof val === "undefined") { return; } if (isArray$3(val)) { key = key + "[]"; } else { val = [val]; } forEach$1(val, function parseValue2(v2) { if (isDate$2(v2)) { v2 = v2.toISOString(); } else if (isObject$6(v2)) { v2 = JSON.stringify(v2); } parts.push(encode$2(key) + "=" + encode$2(v2)); }); }); serializedParams = parts.join("&"); } if (serializedParams) { var hashmarkIndex = url2.indexOf("#"); if (hashmarkIndex !== -1) { url2 = url2.slice(0, hashmarkIndex); } url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; } return url2; } function isAbsoluteURL$1(url2) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); } function combineURLs$1(baseURL, relativeURL) { return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; } function buildFullPath$1(baseURL, requestedURL) { if (baseURL && !isAbsoluteURL$1(requestedURL)) { return combineURLs$1(baseURL, requestedURL); } return requestedURL; } function settle$1(resolve, reject, response) { const validateStatus = response.config.validateStatus; const status = response.statusCode; if (status && (!validateStatus || validateStatus(status))) { resolve(response); } else { reject(response); } } const mergeKeys$1 = (keys, config2) => { let config3 = {}; keys.forEach((prop) => { if (!isUndefined$1(config2[prop])) { config3[prop] = config2[prop]; } }); return config3; }; const adapter = (config2) => { return new Promise((resolve, reject) => { let fullPath = buildURL$1(buildFullPath$1(config2.baseURL, config2.url), config2.params, config2.paramsSerializer); const _config = { url: fullPath, header: config2.header, complete: (response) => { config2.fullPath = fullPath; response.config = config2; response.rawData = response.data; try { let jsonParseHandle = false; const forcedJSONParsingType = typeof config2.forcedJSONParsing; if (forcedJSONParsingType === "boolean") { jsonParseHandle = config2.forcedJSONParsing; } else if (forcedJSONParsingType === "object") { const includesMethod = config2.forcedJSONParsing.include || []; jsonParseHandle = includesMethod.includes(config2.method); } if (jsonParseHandle && typeof response.data === "string") { response.data = JSON.parse(response.data); } } catch (e2) { } settle$1(resolve, reject, response); } }; let requestTask; if (config2.method === "UPLOAD") { delete _config.header["content-type"]; delete _config.header["Content-Type"]; let otherConfig = { filePath: config2.filePath, name: config2.name }; const optionalKeys = [ "files", "timeout", "formData" ]; requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) }); } else if (config2.method === "DOWNLOAD") { const optionalKeys = [ "timeout" ]; requestTask = uni.downloadFile({ ..._config, ...mergeKeys$1(optionalKeys, config2) }); } else { const optionalKeys = [ "data", "method", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) }); } if (config2.getTask) { config2.getTask(requestTask, config2); } }); }; const dispatchRequest$1 = (config2) => { return adapter(config2); }; function InterceptorManager$1() { this.handlers = []; } InterceptorManager$1.prototype.use = function use(fulfilled, rejected) { this.handlers.push({ fulfilled, rejected }); return this.handlers.length - 1; }; InterceptorManager$1.prototype.eject = function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } }; InterceptorManager$1.prototype.forEach = function forEach2(fn) { this.handlers.forEach((h2) => { if (h2 !== null) { fn(h2); } }); }; const mergeKeys = (keys, globalsConfig, config2) => { let config3 = {}; keys.forEach((prop) => { if (!isUndefined$1(config2[prop])) { config3[prop] = config2[prop]; } else if (!isUndefined$1(globalsConfig[prop])) { config3[prop] = globalsConfig[prop]; } }); return config3; }; const mergeConfig$1 = (globalsConfig, config2 = {}) => { const method = config2.method || globalsConfig.method || "GET"; let config3 = { baseURL: config2.baseURL || globalsConfig.baseURL || "", method, url: config2.url || "", params: config2.params || {}, custom: { ...globalsConfig.custom || {}, ...config2.custom || {} }, header: deepMerge$1(globalsConfig.header || {}, config2.header || {}) }; const defaultToConfig2Keys = ["getTask", "validateStatus", "paramsSerializer", "forcedJSONParsing"]; config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) }; if (method === "DOWNLOAD") { const downloadKeys = [ "timeout" ]; config3 = { ...config3, ...mergeKeys(downloadKeys, globalsConfig, config2) }; } else if (method === "UPLOAD") { delete config3.header["content-type"]; delete config3.header["Content-Type"]; const uploadKeys = [ "files", "filePath", "name", "timeout", "formData" ]; uploadKeys.forEach((prop) => { if (!isUndefined$1(config2[prop])) { config3[prop] = config2[prop]; } }); if (isUndefined$1(config3.timeout) && !isUndefined$1(globalsConfig.timeout)) { config3["timeout"] = globalsConfig["timeout"]; } } else { const defaultsKeys = [ "data", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) }; } return config3; }; const defaults$2 = { baseURL: "", header: {}, method: "GET", dataType: "json", paramsSerializer: null, responseType: "text", custom: {}, timeout: 6e4, sslVerify: true, firstIpv4: false, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; }, // 是否尝试将响应数据json化 forcedJSONParsing: true }; var clone = function() { function _instanceof(obj, type) { return type != null && obj instanceof type; } var nativeMap; try { nativeMap = Map; } catch (_2) { nativeMap = function() { }; } var nativeSet; try { nativeSet = Set; } catch (_2) { nativeSet = function() { }; } var nativePromise; try { nativePromise = Promise; } catch (_2) { nativePromise = function() { }; } function clone2(parent2, circular, depth, prototype2, includeNonEnumerable) { if (typeof circular === "object") { depth = circular.depth; prototype2 = circular.prototype; includeNonEnumerable = circular.includeNonEnumerable; circular = circular.circular; } var allParents = []; var allChildren = []; var useBuffer = typeof Buffer != "undefined"; if (typeof circular == "undefined") circular = true; if (typeof depth == "undefined") depth = Infinity; function _clone(parent3, depth2) { if (parent3 === null) return null; if (depth2 === 0) return parent3; var child; var proto; if (typeof parent3 != "object") { return parent3; } if (_instanceof(parent3, nativeMap)) { child = new nativeMap(); } else if (_instanceof(parent3, nativeSet)) { child = new nativeSet(); } else if (_instanceof(parent3, nativePromise)) { child = new nativePromise(function(resolve, reject) { parent3.then(function(value) { resolve(_clone(value, depth2 - 1)); }, function(err) { reject(_clone(err, depth2 - 1)); }); }); } else if (clone2.__isArray(parent3)) { child = []; } else if (clone2.__isRegExp(parent3)) { child = new RegExp(parent3.source, __getRegExpFlags(parent3)); if (parent3.lastIndex) child.lastIndex = parent3.lastIndex; } else if (clone2.__isDate(parent3)) { child = new Date(parent3.getTime()); } else if (useBuffer && Buffer.isBuffer(parent3)) { if (Buffer.from) { child = Buffer.from(parent3); } else { child = new Buffer(parent3.length); parent3.copy(child); } return child; } else if (_instanceof(parent3, Error)) { child = Object.create(parent3); } else { if (typeof prototype2 == "undefined") { proto = Object.getPrototypeOf(parent3); child = Object.create(proto); } else { child = Object.create(prototype2); proto = prototype2; } } if (circular) { var index2 = allParents.indexOf(parent3); if (index2 != -1) { return allChildren[index2]; } allParents.push(parent3); allChildren.push(child); } if (_instanceof(parent3, nativeMap)) { parent3.forEach(function(value, key) { var keyChild = _clone(key, depth2 - 1); var valueChild = _clone(value, depth2 - 1); child.set(keyChild, valueChild); }); } if (_instanceof(parent3, nativeSet)) { parent3.forEach(function(value) { var entryChild = _clone(value, depth2 - 1); child.add(entryChild); }); } for (var i2 in parent3) { var attrs = Object.getOwnPropertyDescriptor(parent3, i2); if (attrs) { child[i2] = _clone(parent3[i2], depth2 - 1); } try { var objProperty = Object.getOwnPropertyDescriptor(parent3, i2); if (objProperty.set === "undefined") { continue; } child[i2] = _clone(parent3[i2], depth2 - 1); } catch (e2) { if (e2 instanceof TypeError) { continue; } else if (e2 instanceof ReferenceError) { continue; } } } if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(parent3); for (var i2 = 0; i2 < symbols.length; i2++) { var symbol = symbols[i2]; var descriptor = Object.getOwnPropertyDescriptor(parent3, symbol); if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { continue; } child[symbol] = _clone(parent3[symbol], depth2 - 1); Object.defineProperty(child, symbol, descriptor); } } if (includeNonEnumerable) { var allPropertyNames = Object.getOwnPropertyNames(parent3); for (var i2 = 0; i2 < allPropertyNames.length; i2++) { var propertyName = allPropertyNames[i2]; var descriptor = Object.getOwnPropertyDescriptor(parent3, propertyName); if (descriptor && descriptor.enumerable) { continue; } child[propertyName] = _clone(parent3[propertyName], depth2 - 1); Object.defineProperty(child, propertyName, descriptor); } } return child; } return _clone(parent2, depth); } clone2.clonePrototype = function clonePrototype(parent2) { if (parent2 === null) return null; var c2 = function() { }; c2.prototype = parent2; return new c2(); }; function __objToStr(o2) { return Object.prototype.toString.call(o2); } clone2.__objToStr = __objToStr; function __isDate(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object Date]"; } clone2.__isDate = __isDate; function __isArray(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object Array]"; } clone2.__isArray = __isArray; function __isRegExp(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]"; } clone2.__isRegExp = __isRegExp; function __getRegExpFlags(re2) { var flags = ""; if (re2.global) flags += "g"; if (re2.ignoreCase) flags += "i"; if (re2.multiline) flags += "m"; return flags; } clone2.__getRegExpFlags = __getRegExpFlags; return clone2; }(); let Request$1 = class Request { /** * @param {Object} arg - 全局配置 * @param {String} arg.baseURL - 全局根路径 * @param {Object} arg.header - 全局header * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式 * @param {String} arg.dataType = [json] - 全局默认的dataType * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持 * @param {Object} arg.custom - 全局默认的自定义参数 * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序 * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+) * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+) * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+) * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300 */ constructor(arg = {}) { if (!isPlainObject$3(arg)) { arg = {}; formatAppLog("warn", "at node_modules/luch-request/src/lib/core/Request.js:37", "设置全局参数必须接收一个Object"); } this.config = clone({ ...defaults$2, ...arg }); this.interceptors = { request: new InterceptorManager$1(), response: new InterceptorManager$1() }; } /** * @Function * @param {Request~setConfigCallback} f - 设置全局默认配置 */ setConfig(f2) { this.config = f2(this.config); } middleware(config2) { config2 = mergeConfig$1(this.config, config2); let chain = [dispatchRequest$1, void 0]; let promise = Promise.resolve(config2); this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { chain.unshift(interceptor.fulfilled, interceptor.rejected); }); this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { chain.push(interceptor.fulfilled, interceptor.rejected); }); while (chain.length) { promise = promise.then(chain.shift(), chain.shift()); } return promise; } /** * @Function * @param {Object} config - 请求配置项 * @prop {String} options.url - 请求路径 * @prop {Object} options.data - 请求参数 * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型 * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse * @prop {Object} [options.header = config.header] - 请求header * @prop {Object} [options.method = config.method] - 请求方法 * @returns {Promise} */ request(config2 = {}) { return this.middleware(config2); } get(url2, options2 = {}) { return this.middleware({ url: url2, method: "GET", ...options2 }); } post(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "POST", ...options2 }); } put(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "PUT", ...options2 }); } delete(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "DELETE", ...options2 }); } options(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "OPTIONS", ...options2 }); } upload(url2, config2 = {}) { config2.url = url2; config2.method = "UPLOAD"; return this.middleware(config2); } download(url2, config2 = {}) { config2.url = url2; config2.method = "DOWNLOAD"; return this.middleware(config2); } get version() { return "3.1.0"; } }; let baseUrl; { baseUrl = "https://zxgz.newfeifan.cn"; } const apiPath = "/app-api"; const staticUrl = "http://localhost"; const DiyApi = { getUsedDiyTemplate: () => { return request$1({ url: "/promotion/diy-template/used", method: "GET", custom: { showError: false, showLoading: false } }); }, getDiyTemplate: (id) => { return request$1({ url: "/promotion/diy-template/get", method: "GET", params: { id }, custom: { showError: false, showLoading: false } }); }, getDiyPage: (id) => { return request$1({ url: "/promotion/diy-page/get", method: "GET", params: { id } }); } }; const __vite_glob_0_29 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: DiyApi }, Symbol.toStringTag, { value: "Module" })); 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$1() { return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget$1() { return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; } const isProxyAvailable$1 = typeof Proxy === "function"; const HOOK_SETUP$1 = "devtools-plugin:setup"; const HOOK_PLUGIN_SETTINGS_SET$1 = "plugin:settings:set"; let supported; let perf; function isPerformanceSupported() { var _a2; if (supported !== void 0) { return supported; } if (typeof window !== "undefined" && window.performance) { supported = true; perf = window.performance; } else if (typeof global !== "undefined" && ((_a2 = global.perf_hooks) === null || _a2 === void 0 ? void 0 : _a2.performance)) { supported = true; perf = global.perf_hooks.performance; } else { supported = false; } return supported; } function now() { return isPerformanceSupported() ? perf.now() : Date.now(); } let ApiProxy$1 = 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$1, (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$1(pluginDescriptor, setupFn) { const descriptor = pluginDescriptor; const target = getTarget$1(); const hook = getDevtoolsGlobalHook$1(); const enableProxy = isProxyAvailable$1 && descriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP$1, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy$1(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 = (pinia) => activePinia = pinia; const piniaSymbol = Symbol("pinia"); function isPlainObject$2(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$1 = /* @__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(url2, name2, opts) { const xhr = new XMLHttpRequest(); xhr.open("GET", url2); xhr.responseType = "blob"; xhr.onload = function() { saveAs(xhr.response, name2, opts); }; xhr.onerror = function() { console.error("could not download file"); }; xhr.send(); } function corsEnabled(url2) { const xhr = new XMLHttpRequest(); xhr.open("HEAD", url2, false); try { xhr.send(); } catch (e2) { } return xhr.status >= 200 && xhr.status <= 299; } function click(node2) { try { node2.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); node2.dispatchEvent(evt); } } const _navigator$1 = typeof navigator === "object" ? navigator : { userAgent: "" }; const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator$1.userAgent) && /AppleWebKit/.test(_navigator$1.userAgent) && !/Safari/.test(_navigator$1.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$1 ? msSaveAs : ( // Fallback to using FileReader and a popup fileSaverSaveAs ) ) ); function downloadSaveAs(blob, name2 = "download", opts) { const a2 = document.createElement("a"); a2.download = name2; a2.rel = "noopener"; if (typeof blob === "string") { a2.href = blob; if (a2.origin !== location.origin) { if (corsEnabled(a2.href)) { download(blob, name2, 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, name2 = "download", opts) { if (typeof blob === "string") { if (corsEnabled(blob)) { download(blob, name2, opts); } else { const a2 = document.createElement("a"); a2.href = blob; a2.target = "_blank"; setTimeout(function() { click(a2); }); } } else { navigator.msSaveOrOpenBlob(bom(blob, opts), name2); } } function fileSaverSaveAs(blob, name2, opts, popup) { popup = popup || open("", "_blank"); if (popup) { popup.document.title = popup.document.body.innerText = "downloading..."; } if (typeof blob === "string") return download(blob, name2, opts); const force = blob.type === "application/octet-stream"; const isSafari = /constructor/i.test(String(_global$1.HTMLElement)) || "safari" in _global$1; const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent); if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") { const reader = new FileReader(); reader.onloadend = function() { let url2 = reader.result; if (typeof url2 !== "string") { popup = null; throw new Error("Wrong reader.result type"); } url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;"); if (popup) { popup.location.href = url2; } else { location.assign(url2); } popup = null; }; reader.readAsDataURL(blob); } else { const url2 = URL.createObjectURL(blob); if (popup) popup.location.assign(url2); else location.href = url2; popup = null; setTimeout(function() { URL.revokeObjectURL(url2); }, 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(error2) { if (error2 instanceof Error && error2.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(pinia) { if (checkClipboardAccess()) return; try { await navigator.clipboard.writeText(JSON.stringify(pinia.state.value)); toastMessage("Global state copied to clipboard."); } catch (error2) { if (checkNotFocusedError(error2)) return; toastMessage(`Failed to serialize the state. Check the console for more details.`, "error"); console.error(error2); } } async function actionGlobalPasteState(pinia) { if (checkClipboardAccess()) return; try { loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText())); toastMessage("Global state pasted from clipboard."); } catch (error2) { if (checkNotFocusedError(error2)) return; toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error"); console.error(error2); } } async function actionGlobalSaveState(pinia) { try { saveAs(new Blob([JSON.stringify(pinia.state.value)], { type: "text/plain;charset=utf-8" }), "pinia-state.json"); } catch (error2) { toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); console.error(error2); } } 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 files2 = fileInput.files; if (!files2) return resolve(null); const file = files2.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(pinia) { try { const open2 = getFileOpener(); const result2 = await open2(); if (!result2) return; const { text, file } = result2; loadStoresState(pinia, JSON.parse(text)); toastMessage(`Global state imported from "${file.name}".`); } catch (error2) { toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error"); console.error(error2); } } function loadStoresState(pinia, state) { for (const key in state) { const storeState = pinia.state.value[key]; if (storeState) { Object.assign(storeState, state[key]); } else { pinia.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(app2, pinia) { setupDevtoolsPlugin$1({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app: app2 }, (api2) => { if (typeof api2.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."); } api2.addTimelineLayer({ id: MUTATIONS_LAYER_ID, label: `Pinia 🍍`, color: 15064968 }); api2.addInspector({ id: INSPECTOR_ID, label: "Pinia 🍍", icon: "storage", treeFilterPlaceholder: "Search stores", actions: [ { icon: "content_copy", action: () => { actionGlobalCopyState(pinia); }, tooltip: "Serialize and copy the state" }, { icon: "content_paste", action: async () => { await actionGlobalPasteState(pinia); api2.sendInspectorTree(INSPECTOR_ID); api2.sendInspectorState(INSPECTOR_ID); }, tooltip: "Replace the state with the content of your clipboard" }, { icon: "save", action: () => { actionGlobalSaveState(pinia); }, tooltip: "Save the state as a JSON file" }, { icon: "folder_open", action: async () => { await actionGlobalOpenStateFile(pinia); api2.sendInspectorTree(INSPECTOR_ID); api2.sendInspectorState(INSPECTOR_ID); }, tooltip: "Import the state from a JSON file" } ], nodeActions: [ { icon: "restore", tooltip: 'Reset the state (with "$reset")', action: (nodeId) => { const store = pinia._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.`); } } } ] }); api2.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 (error2) { getters[key] = error2; } return getters; }, {}) }); } }); } }); api2.on.getInspectorTree((payload) => { if (payload.app === app2 && payload.inspectorId === INSPECTOR_ID) { let stores = [pinia]; stores = stores.concat(Array.from(pinia._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); } }); api2.on.getInspectorState((payload) => { if (payload.app === app2 && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId); if (!inspectedStore) { return; } if (inspectedStore) { payload.state = formatStoreForInspectorState(inspectedStore); } } }); api2.on.editInspectorState((payload, ctx) => { if (payload.app === app2 && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._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; } }); api2.on.editComponentState((payload) => { if (payload.type.startsWith("🍍")) { const storeId = payload.type.replace(/^🍍\s*/, ""); const store = pinia._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(app2, store) { if (!componentStateTypes.includes(getStoreType(store.$id))) { componentStateTypes.push(getStoreType(store.$id)); } setupDevtoolsPlugin$1({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app: app2, settings: { logStoreChanges: { label: "Notify about new/deleted stores", type: "boolean", defaultValue: true } // useEmojis: { // label: 'Use emojis in messages ⚡️', // type: 'boolean', // defaultValue: true, // }, } }, (api2) => { const now2 = typeof api2.now === "function" ? api2.now.bind(api2) : Date.now; store.$onAction(({ after, onError: onError2, name: name2, args }) => { const groupId = runningActionId++; api2.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛫 " + name2, subtitle: "start", data: { store: formatDisplay(store.$id), action: formatDisplay(name2), args }, groupId } }); after((result2) => { activeAction = void 0; api2.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛬 " + name2, subtitle: "end", data: { store: formatDisplay(store.$id), action: formatDisplay(name2), args, result: result2 }, groupId } }); }); onError2((error2) => { activeAction = void 0; api2.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), logType: "error", title: "💥 " + name2, subtitle: "end", data: { store: formatDisplay(store.$id), action: formatDisplay(name2), args, error: error2 }, groupId } }); }); }, true); store._customProperties.forEach((name2) => { vue.watch(() => vue.unref(store[name2]), (newValue, oldValue) => { api2.notifyComponentUpdate(); api2.sendInspectorState(INSPECTOR_ID); if (isTimelineActive) { api2.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "Change", subtitle: name2, data: { newValue, oldValue }, groupId: activeAction } }); } }, { deep: true }); }); store.$subscribe(({ events, type }, state) => { api2.notifyComponentUpdate(); api2.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 } }; } api2.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: eventData }); }, { detached: true, flush: "sync" }); const hotUpdate = store._hotUpdate; store._hotUpdate = vue.markRaw((newStore) => { hotUpdate(newStore); api2.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🔥 " + store.$id, subtitle: "HMR update", data: { store: formatDisplay(store.$id), info: formatDisplay(`HMR update`) } } }); api2.notifyComponentUpdate(); api2.sendInspectorTree(INSPECTOR_ID); api2.sendInspectorState(INSPECTOR_ID); }); const { $dispose } = store; store.$dispose = () => { $dispose(); api2.notifyComponentUpdate(); api2.sendInspectorTree(INSPECTOR_ID); api2.sendInspectorState(INSPECTOR_ID); api2.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`); }; api2.notifyComponentUpdate(); api2.sendInspectorTree(INSPECTOR_ID); api2.sendInspectorState(INSPECTOR_ID); api2.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: app2, store, options: options2 }) { if (store.$id.startsWith("__hot:")) { return; } store._isOptionsAPI = !!options2.state; patchActionForGrouping(store, Object.keys(options2.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( app2, // 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 pinia = vue.markRaw({ install(app2) { setActivePinia(pinia); { pinia._a = app2; app2.provide(piniaSymbol, pinia); app2.config.globalProperties.$pinia = pinia; if (USE_DEVTOOLS) { registerPiniaDevtools(app2, pinia); } 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") { pinia.use(devtoolsPlugin); } return pinia; } function patchObject(newState, oldState) { for (const key in oldState) { const subPatch = oldState[key]; if (!(key in newState)) { continue; } const targetValue = newState[key]; if (isPlainObject$2(targetValue) && isPlainObject$2(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { newState[key] = patchObject(targetValue, subPatch); } else { { newState[key] = subPatch; } } } return newState; } const noop$1 = () => { }; function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) { 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$2(targetValue) && isPlainObject$2(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$2(obj) || !obj.hasOwnProperty(skipHydrateSymbol); } const { assign: assign$2 } = Object; function isComputed(o2) { return !!(vue.isRef(o2) && o2.effect); } function createOptionsStore(id, options2, pinia, hot) { const { state, actions, getters } = options2; const initialState = pinia.state.value[id]; let store; function setup() { if (!initialState && !hot) { { pinia.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(pinia.state.value[id]); return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name2) => { if (name2 in localState) { console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name2}" in store "${id}".`); } computedGetters[name2] = vue.markRaw(vue.computed(() => { setActivePinia(pinia); const store2 = pinia._s.get(id); return getters[name2].call(store2, store2); })); return computedGetters; }, {})); } store = createSetupStore(id, setup, options2, pinia, hot, true); return store; } function createSetupStore($id, setup, options2 = {}, pinia, hot, isOptionsStore) { let scope; const optionsForPlugin = assign$2({ actions: {} }, options2); if (!pinia._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 = pinia.state.value[$id]; if (!isOptionsStore && !initialState && !hot) { { pinia.state.value[$id] = {}; } } const hotState = vue.ref({}); let activeListener; function $patch(partialStateOrMutator) { let subscriptionMutation; isListening = isSyncListening = false; { debuggerEvents = []; } if (typeof partialStateOrMutator === "function") { partialStateOrMutator(pinia.state.value[$id]); subscriptionMutation = { type: MutationType.patchFunction, storeId: $id, events: debuggerEvents }; } else { mergeReactiveObjects(pinia.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, pinia.state.value[$id]); } const $reset = isOptionsStore ? function $reset2() { const { state } = options2; const newState = state ? state() : {}; this.$patch(($state) => { assign$2($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 = []; pinia._s.delete($id); } function wrapAction(name2, action) { return function() { setActivePinia(pinia); const args = Array.from(arguments); const afterCallbackList = []; const onErrorCallbackList = []; function after(callback) { afterCallbackList.push(callback); } function onError2(callback) { onErrorCallbackList.push(callback); } triggerSubscriptions(actionSubscriptions, { args, name: name2, store, after, onError: onError2 }); let ret; try { ret = action.apply(this && this.$id === $id ? this : store, args); } catch (error2) { triggerSubscriptions(onErrorCallbackList, error2); throw error2; } if (ret instanceof Promise) { return ret.then((value) => { triggerSubscriptions(afterCallbackList, value); return value; }).catch((error2) => { triggerSubscriptions(onErrorCallbackList, error2); return Promise.reject(error2); }); } triggerSubscriptions(afterCallbackList, ret); return ret; }; } const _hmrPayload = /* @__PURE__ */ vue.markRaw({ actions: {}, getters: {}, state: [], hotState }); const partialStore = { _p: pinia, // _s: scope, $id, $onAction: addSubscription.bind(null, actionSubscriptions), $patch, $reset, $subscribe(callback, options22 = {}) { const removeSubscription = addSubscription(subscriptions, callback, options22.detached, () => stopWatcher()); const stopWatcher = scope.run(() => vue.watch(() => pinia.state.value[$id], (state) => { if (options22.flush === "sync" ? isSyncListening : isListening) { callback({ storeId: $id, type: MutationType.direct, events: debuggerEvents }, state); } }, assign$2({}, $subscribeOptions, options22))); return removeSubscription; }, $dispose }; const store = vue.reactive(assign$2( { _hmrPayload, _customProperties: vue.markRaw(/* @__PURE__ */ new Set()) // devtools custom properties }, partialStore // must be added later // setupStore )); pinia._s.set($id, store); const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext; const setupStore = runWithContext(() => pinia._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]); } } { pinia.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 options2.getters[key] ) : prop; if (IS_CLIENT) { const getters = setupStore._getters || // @ts-expect-error: same (setupStore._getters = vue.markRaw([])); getters.push(key); } } } } { assign$2(store, setupStore); assign$2(vue.toRaw(store), setupStore); } Object.defineProperty(store, "$state", { get: () => hot ? hotState.value : pinia.state.value[$id], set: (state) => { if (hot) { throw new Error("cannot set hotState"); } $patch(($state) => { assign$2($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$2(newStateTarget) && isPlainObject$2(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; pinia.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(pinia); 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$2({ value: store[p2] }, nonEnumerable)); }); } pinia._p.forEach((extender) => { if (USE_DEVTOOLS) { const extensions = scope.run(() => extender({ store, app: pinia._a, pinia, options: optionsForPlugin })); Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key)); assign$2(store, extensions); } else { assign$2(store, scope.run(() => extender({ store, app: pinia._a, pinia, 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 && options2.hydrate) { options2.hydrate(store.$state, initialState); } isListening = true; isSyncListening = true; return store; } function defineStore(idOrOptions, setup, setupOptions) { let id; let options2; const isSetupStore = typeof setup === "function"; if (typeof idOrOptions === "string") { id = idOrOptions; options2 = isSetupStore ? setupOptions : setup; } else { options2 = idOrOptions; id = idOrOptions.id; if (typeof id !== "string") { throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`); } } function useStore(pinia, hot) { const hasContext = vue.hasInjectionContext(); pinia = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() pinia || (hasContext ? vue.inject(piniaSymbol, null) : null); if (pinia) setActivePinia(pinia); 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.`); } pinia = activePinia; if (!pinia._s.has(id)) { if (isSetupStore) { createSetupStore(id, setup, options2, pinia); } else { createOptionsStore(id, options2, pinia); } { useStore._pinia = pinia; } } const store = pinia._s.get(id); if (hot) { const hotId = "__hot:" + id; const newStore = isSetupStore ? createSetupStore(hotId, setup, options2, pinia, true) : createOptionsStore(hotId, assign$2({}, options2), pinia, true); hot._hotUpdate(newStore); delete pinia.state.value[hotId]; pinia._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 cache2 = "_pStores" in vm ? vm._pStores : vm._pStores = {}; cache2[id] = store; } } return store; } useStore.$id = id; return useStore; } var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } var lodash = { exports: {} }; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ lodash.exports; (function(module, exports) { (function() { var undefined$1; var VERSION2 = "4.17.21"; var LARGE_ARRAY_SIZE = 200; var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`"; var HASH_UNDEFINED = "__lodash_hash_undefined__"; var MAX_MEMOIZE_SIZE = 500; var PLACEHOLDER = "__lodash_placeholder__"; var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "..."; var HOT_COUNT = 800, HOT_SPAN = 16; var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0; var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; var wrapFlags = [ ["ary", WRAP_ARY_FLAG], ["bind", WRAP_BIND_FLAG], ["bindKey", WRAP_BIND_KEY_FLAG], ["curry", WRAP_CURRY_FLAG], ["curryRight", WRAP_CURRY_RIGHT_FLAG], ["flip", WRAP_FLIP_FLAG], ["partial", WRAP_PARTIAL_FLAG], ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], ["rearg", WRAP_REARG_FLAG] ]; var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]"; var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g; var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); var reTrimStart = /^\s+/; var reWhitespace = /\s/; var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; var reEscapeChar = /\\(\\)?/g; var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; var reFlags = /\w*$/; var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; var reIsBinary = /^0b[01]+$/i; var reIsHostCtor = /^\[object .+?Constructor\]$/; var reIsOctal = /^0o[0-7]+$/i; var reIsUint = /^(?:0|[1-9]\d*)$/; var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; var reNoMatch = /($^)/; var reUnescapedString = /['\n\r\u2028\u2029\\]/g; var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d"; var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; var reApos = RegExp(rsApos, "g"); var reComboMark = RegExp(rsCombo, "g"); var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); var reUnicodeWord = RegExp([ rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")", rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")", rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower, rsUpper + "+" + rsOptContrUpper, rsOrdUpper, rsOrdLower, rsDigits, rsEmoji ].join("|"), "g"); var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; var contextProps = [ "Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout" ]; var templateCounter = -1; var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; var deburredLetters = { // Latin-1 Supplement block. "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Å": "A", "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "å": "a", "Ç": "C", "ç": "c", "Ð": "D", "ð": "d", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "è": "e", "é": "e", "ê": "e", "ë": "e", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "ì": "i", "í": "i", "î": "i", "ï": "i", "Ñ": "N", "ñ": "n", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ø": "O", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ø": "o", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "ù": "u", "ú": "u", "û": "u", "ü": "u", "Ý": "Y", "ý": "y", "ÿ": "y", "Æ": "Ae", "æ": "ae", "Þ": "Th", "þ": "th", "ß": "ss", // Latin Extended-A block. "Ā": "A", "Ă": "A", "Ą": "A", "ā": "a", "ă": "a", "ą": "a", "Ć": "C", "Ĉ": "C", "Ċ": "C", "Č": "C", "ć": "c", "ĉ": "c", "ċ": "c", "č": "c", "Ď": "D", "Đ": "D", "ď": "d", "đ": "d", "Ē": "E", "Ĕ": "E", "Ė": "E", "Ę": "E", "Ě": "E", "ē": "e", "ĕ": "e", "ė": "e", "ę": "e", "ě": "e", "Ĝ": "G", "Ğ": "G", "Ġ": "G", "Ģ": "G", "ĝ": "g", "ğ": "g", "ġ": "g", "ģ": "g", "Ĥ": "H", "Ħ": "H", "ĥ": "h", "ħ": "h", "Ĩ": "I", "Ī": "I", "Ĭ": "I", "Į": "I", "İ": "I", "ĩ": "i", "ī": "i", "ĭ": "i", "į": "i", "ı": "i", "Ĵ": "J", "ĵ": "j", "Ķ": "K", "ķ": "k", "ĸ": "k", "Ĺ": "L", "Ļ": "L", "Ľ": "L", "Ŀ": "L", "Ł": "L", "ĺ": "l", "ļ": "l", "ľ": "l", "ŀ": "l", "ł": "l", "Ń": "N", "Ņ": "N", "Ň": "N", "Ŋ": "N", "ń": "n", "ņ": "n", "ň": "n", "ŋ": "n", "Ō": "O", "Ŏ": "O", "Ő": "O", "ō": "o", "ŏ": "o", "ő": "o", "Ŕ": "R", "Ŗ": "R", "Ř": "R", "ŕ": "r", "ŗ": "r", "ř": "r", "Ś": "S", "Ŝ": "S", "Ş": "S", "Š": "S", "ś": "s", "ŝ": "s", "ş": "s", "š": "s", "Ţ": "T", "Ť": "T", "Ŧ": "T", "ţ": "t", "ť": "t", "ŧ": "t", "Ũ": "U", "Ū": "U", "Ŭ": "U", "Ů": "U", "Ű": "U", "Ų": "U", "ũ": "u", "ū": "u", "ŭ": "u", "ů": "u", "ű": "u", "ų": "u", "Ŵ": "W", "ŵ": "w", "Ŷ": "Y", "ŷ": "y", "Ÿ": "Y", "Ź": "Z", "Ż": "Z", "Ž": "Z", "ź": "z", "ż": "z", "ž": "z", "IJ": "IJ", "ij": "ij", "Œ": "Oe", "œ": "oe", "ʼn": "'n", "ſ": "s" }; var htmlEscapes = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }; var htmlUnescapes = { "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }; var stringEscapes = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }; var freeParseFloat = parseFloat, freeParseInt = parseInt; var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; var freeSelf = typeof self == "object" && self && self.Object === Object && self; var root = freeGlobal || freeSelf || Function("return this")(); var freeExports = exports && !exports.nodeType && exports; var freeModule = freeExports && true && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var freeProcess = moduleExports && freeGlobal.process; var nodeUtil = function() { try { var types2 = freeModule && freeModule.require && freeModule.require("util").types; if (types2) { return types2; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e2) { } }(); var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; function apply2(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } function arrayAggregator(array2, setter, iteratee, accumulator) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { var value = array2[index2]; setter(accumulator, value, iteratee(value), array2); } return accumulator; } function arrayEach(array2, iteratee) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (iteratee(array2[index2], index2, array2) === false) { break; } } return array2; } function arrayEachRight(array2, iteratee) { var length = array2 == null ? 0 : array2.length; while (length--) { if (iteratee(array2[length], length, array2) === false) { break; } } return array2; } function arrayEvery(array2, predicate) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (!predicate(array2[index2], index2, array2)) { return false; } } return true; } function arrayFilter(array2, predicate) { var index2 = -1, length = array2 == null ? 0 : array2.length, resIndex = 0, result2 = []; while (++index2 < length) { var value = array2[index2]; if (predicate(value, index2, array2)) { result2[resIndex++] = value; } } return result2; } function arrayIncludes(array2, value) { var length = array2 == null ? 0 : array2.length; return !!length && baseIndexOf(array2, value, 0) > -1; } function arrayIncludesWith(array2, value, comparator) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (comparator(value, array2[index2])) { return true; } } return false; } function arrayMap(array2, iteratee) { var index2 = -1, length = array2 == null ? 0 : array2.length, result2 = Array(length); while (++index2 < length) { result2[index2] = iteratee(array2[index2], index2, array2); } return result2; } function arrayPush(array2, values) { var index2 = -1, length = values.length, offset = array2.length; while (++index2 < length) { array2[offset + index2] = values[index2]; } return array2; } function arrayReduce(array2, iteratee, accumulator, initAccum) { var index2 = -1, length = array2 == null ? 0 : array2.length; if (initAccum && length) { accumulator = array2[++index2]; } while (++index2 < length) { accumulator = iteratee(accumulator, array2[index2], index2, array2); } return accumulator; } function arrayReduceRight(array2, iteratee, accumulator, initAccum) { var length = array2 == null ? 0 : array2.length; if (initAccum && length) { accumulator = array2[--length]; } while (length--) { accumulator = iteratee(accumulator, array2[length], length, array2); } return accumulator; } function arraySome(array2, predicate) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (predicate(array2[index2], index2, array2)) { return true; } } return false; } var asciiSize = baseProperty("length"); function asciiToArray(string) { return string.split(""); } function asciiWords(string) { return string.match(reAsciiWord) || []; } function baseFindKey(collection, predicate, eachFunc) { var result2; eachFunc(collection, function(value, key, collection2) { if (predicate(value, key, collection2)) { result2 = key; return false; } }); return result2; } function baseFindIndex(array2, predicate, fromIndex, fromRight) { var length = array2.length, index2 = fromIndex + (fromRight ? 1 : -1); while (fromRight ? index2-- : ++index2 < length) { if (predicate(array2[index2], index2, array2)) { return index2; } } return -1; } function baseIndexOf(array2, value, fromIndex) { return value === value ? strictIndexOf(array2, value, fromIndex) : baseFindIndex(array2, baseIsNaN, fromIndex); } function baseIndexOfWith(array2, value, fromIndex, comparator) { var index2 = fromIndex - 1, length = array2.length; while (++index2 < length) { if (comparator(array2[index2], value)) { return index2; } } return -1; } function baseIsNaN(value) { return value !== value; } function baseMean(array2, iteratee) { var length = array2 == null ? 0 : array2.length; return length ? baseSum(array2, iteratee) / length : NAN; } function baseProperty(key) { return function(object2) { return object2 == null ? undefined$1 : object2[key]; }; } function basePropertyOf(object2) { return function(key) { return object2 == null ? undefined$1 : object2[key]; }; } function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index2, collection2) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2); }); return accumulator; } function baseSortBy(array2, comparer) { var length = array2.length; array2.sort(comparer); while (length--) { array2[length] = array2[length].value; } return array2; } function baseSum(array2, iteratee) { var result2, index2 = -1, length = array2.length; while (++index2 < length) { var current = iteratee(array2[index2]); if (current !== undefined$1) { result2 = result2 === undefined$1 ? current : result2 + current; } } return result2; } function baseTimes(n2, iteratee) { var index2 = -1, result2 = Array(n2); while (++index2 < n2) { result2[index2] = iteratee(index2); } return result2; } function baseToPairs(object2, props) { return arrayMap(props, function(key) { return [key, object2[key]]; }); } function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; } function baseUnary(func) { return function(value) { return func(value); }; } function baseValues(object2, props) { return arrayMap(props, function(key) { return object2[key]; }); } function cacheHas(cache2, key) { return cache2.has(key); } function charsStartIndex(strSymbols, chrSymbols) { var index2 = -1, length = strSymbols.length; while (++index2 < length && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) { } return index2; } function charsEndIndex(strSymbols, chrSymbols) { var index2 = strSymbols.length; while (index2-- && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) { } return index2; } function countHolders(array2, placeholder) { var length = array2.length, result2 = 0; while (length--) { if (array2[length] === placeholder) { ++result2; } } return result2; } var deburrLetter = basePropertyOf(deburredLetters); var escapeHtmlChar = basePropertyOf(htmlEscapes); function escapeStringChar(chr) { return "\\" + stringEscapes[chr]; } function getValue(object2, key) { return object2 == null ? undefined$1 : object2[key]; } function hasUnicode(string) { return reHasUnicode.test(string); } function hasUnicodeWord(string) { return reHasUnicodeWord.test(string); } function iteratorToArray(iterator) { var data, result2 = []; while (!(data = iterator.next()).done) { result2.push(data.value); } return result2; } function mapToArray(map) { var index2 = -1, result2 = Array(map.size); map.forEach(function(value, key) { result2[++index2] = [key, value]; }); return result2; } function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } function replaceHolders(array2, placeholder) { var index2 = -1, length = array2.length, resIndex = 0, result2 = []; while (++index2 < length) { var value = array2[index2]; if (value === placeholder || value === PLACEHOLDER) { array2[index2] = PLACEHOLDER; result2[resIndex++] = index2; } } return result2; } function setToArray(set2) { var index2 = -1, result2 = Array(set2.size); set2.forEach(function(value) { result2[++index2] = value; }); return result2; } function setToPairs(set2) { var index2 = -1, result2 = Array(set2.size); set2.forEach(function(value) { result2[++index2] = [value, value]; }); return result2; } function strictIndexOf(array2, value, fromIndex) { var index2 = fromIndex - 1, length = array2.length; while (++index2 < length) { if (array2[index2] === value) { return index2; } } return -1; } function strictLastIndexOf(array2, value, fromIndex) { var index2 = fromIndex + 1; while (index2--) { if (array2[index2] === value) { return index2; } } return index2; } function stringSize(string) { return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); } function stringToArray(string) { return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); } function trimmedEndIndex(string) { var index2 = string.length; while (index2-- && reWhitespace.test(string.charAt(index2))) { } return index2; } var unescapeHtmlChar = basePropertyOf(htmlUnescapes); function unicodeSize(string) { var result2 = reUnicode.lastIndex = 0; while (reUnicode.test(string)) { ++result2; } return result2; } function unicodeToArray(string) { return string.match(reUnicode) || []; } function unicodeWords(string) { return string.match(reUnicodeWord) || []; } var runInContext = function runInContext2(context) { context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps)); var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError; var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype; var coreJsData = context["__core-js_shared__"]; var funcToString = funcProto.toString; var hasOwnProperty2 = objectProto.hasOwnProperty; var idCounter = 0; var maskSrcKey = function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); return uid ? "Symbol(src)_1." + uid : ""; }(); var nativeObjectToString = objectProto.toString; var objectCtorString = funcToString.call(Object2); var oldDash = root._; var reIsNative = RegExp2( "^" + funcToString.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1; var defineProperty = function() { try { var func = getNative(Object2, "defineProperty"); func({}, "", {}); return func; } catch (e2) { } }(); var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse; var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create"); var metaMap = WeakMap2 && new WeakMap2(); var realNames = {}; var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2); var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1; function lodash2(value) { if (isObjectLike(value) && !isArray2(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty2.call(value, "__wrapped__")) { return wrapperClone(value); } } return new LodashWrapper(value); } var baseCreate = /* @__PURE__ */ function() { function object2() { } return function(proto) { if (!isObject2(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object2.prototype = proto; var result3 = new object2(); object2.prototype = undefined$1; return result3; }; }(); function baseLodash() { } function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined$1; } lodash2.templateSettings = { /** * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings * @type {RegExp} */ "escape": reEscape, /** * Used to detect code to be evaluated. * * @memberOf _.templateSettings * @type {RegExp} */ "evaluate": reEvaluate, /** * Used to detect `data` property values to inject. * * @memberOf _.templateSettings * @type {RegExp} */ "interpolate": reInterpolate, /** * Used to reference the data object in the template text. * * @memberOf _.templateSettings * @type {string} */ "variable": "", /** * Used to import variables into the compiled template. * * @memberOf _.templateSettings * @type {Object} */ "imports": { /** * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports * @type {Function} */ "_": lodash2 } }; lodash2.prototype = baseLodash.prototype; lodash2.prototype.constructor = lodash2; LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } function lazyClone() { var result3 = new LazyWrapper(this.__wrapped__); result3.__actions__ = copyArray(this.__actions__); result3.__dir__ = this.__dir__; result3.__filtered__ = this.__filtered__; result3.__iteratees__ = copyArray(this.__iteratees__); result3.__takeCount__ = this.__takeCount__; result3.__views__ = copyArray(this.__views__); return result3; } function lazyReverse() { if (this.__filtered__) { var result3 = new LazyWrapper(this); result3.__dir__ = -1; result3.__filtered__ = true; } else { result3 = this.clone(); result3.__dir__ *= -1; } return result3; } function lazyValue() { var array2 = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array2), isRight = dir < 0, arrLength = isArr ? array2.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index2 = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__); if (!isArr || !isRight && arrLength == length && takeCount == length) { return baseWrapperValue(array2, this.__actions__); } var result3 = []; outer: while (length-- && resIndex < takeCount) { index2 += dir; var iterIndex = -1, value = array2[index2]; while (++iterIndex < iterLength) { var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value); if (type == LAZY_MAP_FLAG) { value = computed; } else if (!computed) { if (type == LAZY_FILTER_FLAG) { continue outer; } else { break outer; } } } result3[resIndex++] = value; } return result3; } LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; function Hash(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } function hashDelete(key) { var result3 = this.has(key) && delete this.__data__[key]; this.size -= result3 ? 1 : 0; return result3; } function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result3 = data[key]; return result3 === HASH_UNDEFINED ? undefined$1 : result3; } return hasOwnProperty2.call(data, key) ? data[key] : undefined$1; } function hashHas(key) { var data = this.__data__; return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty2.call(data, key); } function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value; return this; } Hash.prototype.clear = hashClear; Hash.prototype["delete"] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; function ListCache(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } function listCacheClear() { this.__data__ = []; this.size = 0; } function listCacheDelete(key) { var data = this.__data__, index2 = assocIndexOf(data, key); if (index2 < 0) { return false; } var lastIndex = data.length - 1; if (index2 == lastIndex) { data.pop(); } else { splice.call(data, index2, 1); } --this.size; return true; } function listCacheGet(key) { var data = this.__data__, index2 = assocIndexOf(data, key); return index2 < 0 ? undefined$1 : data[index2][1]; } function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } function listCacheSet(key, value) { var data = this.__data__, index2 = assocIndexOf(data, key); if (index2 < 0) { ++this.size; data.push([key, value]); } else { data[index2][1] = value; } return this; } ListCache.prototype.clear = listCacheClear; ListCache.prototype["delete"] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; function MapCache(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } function mapCacheClear() { this.size = 0; this.__data__ = { "hash": new Hash(), "map": new (Map2 || ListCache)(), "string": new Hash() }; } function mapCacheDelete(key) { var result3 = getMapData(this, key)["delete"](key); this.size -= result3 ? 1 : 0; return result3; } function mapCacheGet(key) { return getMapData(this, key).get(key); } function mapCacheHas(key) { return getMapData(this, key).has(key); } function mapCacheSet(key, value) { var data = getMapData(this, key), size2 = data.size; data.set(key, value); this.size += data.size == size2 ? 0 : 1; return this; } MapCache.prototype.clear = mapCacheClear; MapCache.prototype["delete"] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; function SetCache(values2) { var index2 = -1, length = values2 == null ? 0 : values2.length; this.__data__ = new MapCache(); while (++index2 < length) { this.add(values2[index2]); } } function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } function setCacheHas(value) { return this.__data__.has(value); } SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } function stackClear() { this.__data__ = new ListCache(); this.size = 0; } function stackDelete(key) { var data = this.__data__, result3 = data["delete"](key); this.size = data.size; return result3; } function stackGet(key) { return this.__data__.get(key); } function stackHas(key) { return this.__data__.has(key); } function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } Stack.prototype.clear = stackClear; Stack.prototype["delete"] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; function arrayLikeKeys(value, inherited) { var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray2(value), skipIndexes = isArr || isArg || isBuff || isType, result3 = skipIndexes ? baseTimes(value.length, String2) : [], length = result3.length; for (var key in value) { if ((inherited || hasOwnProperty2.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. isIndex(key, length)))) { result3.push(key); } } return result3; } function arraySample(array2) { var length = array2.length; return length ? array2[baseRandom(0, length - 1)] : undefined$1; } function arraySampleSize(array2, n2) { return shuffleSelf(copyArray(array2), baseClamp(n2, 0, array2.length)); } function arrayShuffle(array2) { return shuffleSelf(copyArray(array2)); } function assignMergeValue(object2, key, value) { if (value !== undefined$1 && !eq(object2[key], value) || value === undefined$1 && !(key in object2)) { baseAssignValue(object2, key, value); } } function assignValue(object2, key, value) { var objValue = object2[key]; if (!(hasOwnProperty2.call(object2, key) && eq(objValue, value)) || value === undefined$1 && !(key in object2)) { baseAssignValue(object2, key, value); } } function assocIndexOf(array2, key) { var length = array2.length; while (length--) { if (eq(array2[length][0], key)) { return length; } } return -1; } function baseAggregator(collection, setter, iteratee2, accumulator) { baseEach(collection, function(value, key, collection2) { setter(accumulator, value, iteratee2(value), collection2); }); return accumulator; } function baseAssign(object2, source) { return object2 && copyObject(source, keys(source), object2); } function baseAssignIn(object2, source) { return object2 && copyObject(source, keysIn(source), object2); } function baseAssignValue(object2, key, value) { if (key == "__proto__" && defineProperty) { defineProperty(object2, key, { "configurable": true, "enumerable": true, "value": value, "writable": true }); } else { object2[key] = value; } } function baseAt(object2, paths) { var index2 = -1, length = paths.length, result3 = Array2(length), skip = object2 == null; while (++index2 < length) { result3[index2] = skip ? undefined$1 : get(object2, paths[index2]); } return result3; } function baseClamp(number2, lower, upper) { if (number2 === number2) { if (upper !== undefined$1) { number2 = number2 <= upper ? number2 : upper; } if (lower !== undefined$1) { number2 = number2 >= lower ? number2 : lower; } } return number2; } function baseClone(value, bitmask, customizer, key, object2, stack) { var result3, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result3 = object2 ? customizer(value, key, object2, stack) : customizer(value); } if (result3 !== undefined$1) { return result3; } if (!isObject2(value)) { return value; } var isArr = isArray2(value); if (isArr) { result3 = initCloneArray(value); if (!isDeep) { return copyArray(value, result3); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer2(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || isFunc && !object2) { result3 = isFlat || isFunc ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result3, value)) : copySymbols(value, baseAssign(result3, value)); } } else { if (!cloneableTags[tag]) { return object2 ? value : {}; } result3 = initCloneByTag(value, tag, isDeep); } } stack || (stack = new Stack()); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result3); if (isSet(value)) { value.forEach(function(subValue) { result3.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key2) { result3.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); }); } var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; var props = isArr ? undefined$1 : keysFunc(value); arrayEach(props || value, function(subValue, key2) { if (props) { key2 = subValue; subValue = value[key2]; } assignValue(result3, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); }); return result3; } function baseConforms(source) { var props = keys(source); return function(object2) { return baseConformsTo(object2, source, props); }; } function baseConformsTo(object2, source, props) { var length = props.length; if (object2 == null) { return !length; } object2 = Object2(object2); while (length--) { var key = props[length], predicate = source[key], value = object2[key]; if (value === undefined$1 && !(key in object2) || !predicate(value)) { return false; } } return true; } function baseDelay(func, wait, args) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } return setTimeout2(function() { func.apply(undefined$1, args); }, wait); } function baseDifference(array2, values2, iteratee2, comparator) { var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array2.length, result3 = [], valuesLength = values2.length; if (!length) { return result3; } if (iteratee2) { values2 = arrayMap(values2, baseUnary(iteratee2)); } if (comparator) { includes2 = arrayIncludesWith; isCommon = false; } else if (values2.length >= LARGE_ARRAY_SIZE) { includes2 = cacheHas; isCommon = false; values2 = new SetCache(values2); } outer: while (++index2 < length) { var value = array2[index2], computed = iteratee2 == null ? value : iteratee2(value); value = comparator || value !== 0 ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { if (values2[valuesIndex] === computed) { continue outer; } } result3.push(value); } else if (!includes2(values2, computed, comparator)) { result3.push(value); } } return result3; } var baseEach = createBaseEach(baseForOwn); var baseEachRight = createBaseEach(baseForOwnRight, true); function baseEvery(collection, predicate) { var result3 = true; baseEach(collection, function(value, index2, collection2) { result3 = !!predicate(value, index2, collection2); return result3; }); return result3; } function baseExtremum(array2, iteratee2, comparator) { var index2 = -1, length = array2.length; while (++index2 < length) { var value = array2[index2], current = iteratee2(value); if (current != null && (computed === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed))) { var computed = current, result3 = value; } } return result3; } function baseFill(array2, value, start, end) { var length = array2.length; start = toInteger(start); if (start < 0) { start = -start > length ? 0 : length + start; } end = end === undefined$1 || end > length ? length : toInteger(end); if (end < 0) { end += length; } end = start > end ? 0 : toLength(end); while (start < end) { array2[start++] = value; } return array2; } function baseFilter(collection, predicate) { var result3 = []; baseEach(collection, function(value, index2, collection2) { if (predicate(value, index2, collection2)) { result3.push(value); } }); return result3; } function baseFlatten(array2, depth, predicate, isStrict, result3) { var index2 = -1, length = array2.length; predicate || (predicate = isFlattenable); result3 || (result3 = []); while (++index2 < length) { var value = array2[index2]; if (depth > 0 && predicate(value)) { if (depth > 1) { baseFlatten(value, depth - 1, predicate, isStrict, result3); } else { arrayPush(result3, value); } } else if (!isStrict) { result3[result3.length] = value; } } return result3; } var baseFor = createBaseFor(); var baseForRight = createBaseFor(true); function baseForOwn(object2, iteratee2) { return object2 && baseFor(object2, iteratee2, keys); } function baseForOwnRight(object2, iteratee2) { return object2 && baseForRight(object2, iteratee2, keys); } function baseFunctions(object2, props) { return arrayFilter(props, function(key) { return isFunction2(object2[key]); }); } function baseGet(object2, path) { path = castPath(path, object2); var index2 = 0, length = path.length; while (object2 != null && index2 < length) { object2 = object2[toKey(path[index2++])]; } return index2 && index2 == length ? object2 : undefined$1; } function baseGetAllKeys(object2, keysFunc, symbolsFunc) { var result3 = keysFunc(object2); return isArray2(object2) ? result3 : arrayPush(result3, symbolsFunc(object2)); } function baseGetTag(value) { if (value == null) { return value === undefined$1 ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString2(value); } function baseGt(value, other) { return value > other; } function baseHas(object2, key) { return object2 != null && hasOwnProperty2.call(object2, key); } function baseHasIn(object2, key) { return object2 != null && key in Object2(object2); } function baseInRange(number2, start, end) { return number2 >= nativeMin(start, end) && number2 < nativeMax(start, end); } function baseIntersection(arrays, iteratee2, comparator) { var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result3 = []; while (othIndex--) { var array2 = arrays[othIndex]; if (othIndex && iteratee2) { array2 = arrayMap(array2, baseUnary(iteratee2)); } maxLength = nativeMin(array2.length, maxLength); caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array2.length >= 120) ? new SetCache(othIndex && array2) : undefined$1; } array2 = arrays[0]; var index2 = -1, seen = caches[0]; outer: while (++index2 < length && result3.length < maxLength) { var value = array2[index2], computed = iteratee2 ? iteratee2(value) : value; value = comparator || value !== 0 ? value : 0; if (!(seen ? cacheHas(seen, computed) : includes2(result3, computed, comparator))) { othIndex = othLength; while (--othIndex) { var cache2 = caches[othIndex]; if (!(cache2 ? cacheHas(cache2, computed) : includes2(arrays[othIndex], computed, comparator))) { continue outer; } } if (seen) { seen.push(computed); } result3.push(value); } } return result3; } function baseInverter(object2, setter, iteratee2, accumulator) { baseForOwn(object2, function(value, key, object3) { setter(accumulator, iteratee2(value), key, object3); }); return accumulator; } function baseInvoke(object2, path, args) { path = castPath(path, object2); object2 = parent2(object2, path); var func = object2 == null ? object2 : object2[toKey(last(path))]; return func == null ? undefined$1 : apply2(func, object2, args); } function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } function baseIsArrayBuffer(value) { return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; } function baseIsDate(value) { return isObjectLike(value) && baseGetTag(value) == dateTag; } function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray2(object2), othIsArr = isArray2(other), objTag = objIsArr ? arrayTag : getTag(object2), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer2(object2)) { if (!isBuffer2(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack()); return objIsArr || isTypedArray2(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty2.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty2.call(other, "__wrapped__"); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack()); return equalObjects(object2, other, bitmask, customizer, equalFunc, stack); } function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } function baseIsMatch(object2, source, matchData, customizer) { var index2 = matchData.length, length = index2, noCustomizer = !customizer; if (object2 == null) { return !length; } object2 = Object2(object2); while (index2--) { var data = matchData[index2]; if (noCustomizer && data[2] ? data[1] !== object2[data[0]] : !(data[0] in object2)) { return false; } } while (++index2 < length) { data = matchData[index2]; var key = data[0], objValue = object2[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined$1 && !(key in object2)) { return false; } } else { var stack = new Stack(); if (customizer) { var result3 = customizer(objValue, srcValue, key, object2, source, stack); } if (!(result3 === undefined$1 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result3)) { return false; } } } return true; } function baseIsNative(value) { if (!isObject2(value) || isMasked(value)) { return false; } var pattern2 = isFunction2(value) ? reIsNative : reIsHostCtor; return pattern2.test(toSource(value)); } function baseIsRegExp(value) { return isObjectLike(value) && baseGetTag(value) == regexpTag; } function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } function baseIteratee(value) { if (typeof value == "function") { return value; } if (value == null) { return identity; } if (typeof value == "object") { return isArray2(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } function baseKeys(object2) { if (!isPrototype(object2)) { return nativeKeys(object2); } var result3 = []; for (var key in Object2(object2)) { if (hasOwnProperty2.call(object2, key) && key != "constructor") { result3.push(key); } } return result3; } function baseKeysIn(object2) { if (!isObject2(object2)) { return nativeKeysIn(object2); } var isProto = isPrototype(object2), result3 = []; for (var key in object2) { if (!(key == "constructor" && (isProto || !hasOwnProperty2.call(object2, key)))) { result3.push(key); } } return result3; } function baseLt(value, other) { return value < other; } function baseMap(collection, iteratee2) { var index2 = -1, result3 = isArrayLike(collection) ? Array2(collection.length) : []; baseEach(collection, function(value, key, collection2) { result3[++index2] = iteratee2(value, key, collection2); }); return result3; } function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object2) { return object2 === source || baseIsMatch(object2, source, matchData); }; } function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object2) { var objValue = get(object2, path); return objValue === undefined$1 && objValue === srcValue ? hasIn(object2, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } function baseMerge(object2, source, srcIndex, customizer, stack) { if (object2 === source) { return; } baseFor(source, function(srcValue, key) { stack || (stack = new Stack()); if (isObject2(srcValue)) { baseMergeDeep(object2, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object2, key), srcValue, key + "", object2, source, stack) : undefined$1; if (newValue === undefined$1) { newValue = srcValue; } assignMergeValue(object2, key, newValue); } }, keysIn); } function baseMergeDeep(object2, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object2, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object2, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, key + "", object2, source, stack) : undefined$1; var isCommon = newValue === undefined$1; if (isCommon) { var isArr = isArray2(srcValue), isBuff = !isArr && isBuffer2(srcValue), isTyped = !isArr && !isBuff && isTypedArray2(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray2(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject2(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject2(objValue) || isFunction2(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack["delete"](srcValue); } assignMergeValue(object2, key, newValue); } function baseNth(array2, n2) { var length = array2.length; if (!length) { return; } n2 += n2 < 0 ? length : 0; return isIndex(n2, length) ? array2[n2] : undefined$1; } function baseOrderBy(collection, iteratees, orders) { if (iteratees.length) { iteratees = arrayMap(iteratees, function(iteratee2) { if (isArray2(iteratee2)) { return function(value) { return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2); }; } return iteratee2; }); } else { iteratees = [identity]; } var index2 = -1; iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result3 = baseMap(collection, function(value, key, collection2) { var criteria = arrayMap(iteratees, function(iteratee2) { return iteratee2(value); }); return { "criteria": criteria, "index": ++index2, "value": value }; }); return baseSortBy(result3, function(object2, other) { return compareMultiple(object2, other, orders); }); } function basePick(object2, paths) { return basePickBy(object2, paths, function(value, path) { return hasIn(object2, path); }); } function basePickBy(object2, paths, predicate) { var index2 = -1, length = paths.length, result3 = {}; while (++index2 < length) { var path = paths[index2], value = baseGet(object2, path); if (predicate(value, path)) { baseSet(result3, castPath(path, object2), value); } } return result3; } function basePropertyDeep(path) { return function(object2) { return baseGet(object2, path); }; } function basePullAll(array2, values2, iteratee2, comparator) { var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index2 = -1, length = values2.length, seen = array2; if (array2 === values2) { values2 = copyArray(values2); } if (iteratee2) { seen = arrayMap(array2, baseUnary(iteratee2)); } while (++index2 < length) { var fromIndex = 0, value = values2[index2], computed = iteratee2 ? iteratee2(value) : value; while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) { if (seen !== array2) { splice.call(seen, fromIndex, 1); } splice.call(array2, fromIndex, 1); } } return array2; } function basePullAt(array2, indexes) { var length = array2 ? indexes.length : 0, lastIndex = length - 1; while (length--) { var index2 = indexes[length]; if (length == lastIndex || index2 !== previous) { var previous = index2; if (isIndex(index2)) { splice.call(array2, index2, 1); } else { baseUnset(array2, index2); } } } return array2; } function baseRandom(lower, upper) { return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); } function baseRange(start, end, step, fromRight) { var index2 = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result3 = Array2(length); while (length--) { result3[fromRight ? length : ++index2] = start; start += step; } return result3; } function baseRepeat(string, n2) { var result3 = ""; if (!string || n2 < 1 || n2 > MAX_SAFE_INTEGER) { return result3; } do { if (n2 % 2) { result3 += string; } n2 = nativeFloor(n2 / 2); if (n2) { string += string; } } while (n2); return result3; } function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ""); } function baseSample(collection) { return arraySample(values(collection)); } function baseSampleSize(collection, n2) { var array2 = values(collection); return shuffleSelf(array2, baseClamp(n2, 0, array2.length)); } function baseSet(object2, path, value, customizer) { if (!isObject2(object2)) { return object2; } path = castPath(path, object2); var index2 = -1, length = path.length, lastIndex = length - 1, nested = object2; while (nested != null && ++index2 < length) { var key = toKey(path[index2]), newValue = value; if (key === "__proto__" || key === "constructor" || key === "prototype") { return object2; } if (index2 != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined$1; if (newValue === undefined$1) { newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {}; } } assignValue(nested, key, newValue); nested = nested[key]; } return object2; } var baseSetData = !metaMap ? identity : function(func, data) { metaMap.set(func, data); return func; }; var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, "toString", { "configurable": true, "enumerable": false, "value": constant(string), "writable": true }); }; function baseShuffle(collection) { return shuffleSelf(values(collection)); } function baseSlice(array2, start, end) { var index2 = -1, length = array2.length; if (start < 0) { start = -start > length ? 0 : length + start; } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : end - start >>> 0; start >>>= 0; var result3 = Array2(length); while (++index2 < length) { result3[index2] = array2[index2 + start]; } return result3; } function baseSome(collection, predicate) { var result3; baseEach(collection, function(value, index2, collection2) { result3 = predicate(value, index2, collection2); return !result3; }); return !!result3; } function baseSortedIndex(array2, value, retHighest) { var low = 0, high = array2 == null ? low : array2.length; if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) { while (low < high) { var mid = low + high >>> 1, computed = array2[mid]; if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) { low = mid + 1; } else { high = mid; } } return high; } return baseSortedIndexBy(array2, value, identity, retHighest); } function baseSortedIndexBy(array2, value, iteratee2, retHighest) { var low = 0, high = array2 == null ? 0 : array2.length; if (high === 0) { return 0; } value = iteratee2(value); var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined$1; while (low < high) { var mid = nativeFloor((low + high) / 2), computed = iteratee2(array2[mid]), othIsDefined = computed !== undefined$1, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed); if (valIsNaN) { var setLow = retHighest || othIsReflexive; } else if (valIsUndefined) { setLow = othIsReflexive && (retHighest || othIsDefined); } else if (valIsNull) { setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); } else if (valIsSymbol) { setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); } else if (othIsNull || othIsSymbol) { setLow = false; } else { setLow = retHighest ? computed <= value : computed < value; } if (setLow) { low = mid + 1; } else { high = mid; } } return nativeMin(high, MAX_ARRAY_INDEX); } function baseSortedUniq(array2, iteratee2) { var index2 = -1, length = array2.length, resIndex = 0, result3 = []; while (++index2 < length) { var value = array2[index2], computed = iteratee2 ? iteratee2(value) : value; if (!index2 || !eq(computed, seen)) { var seen = computed; result3[resIndex++] = value === 0 ? 0 : value; } } return result3; } function baseToNumber(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } return +value; } function baseToString(value) { if (typeof value == "string") { return value; } if (isArray2(value)) { return arrayMap(value, baseToString) + ""; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ""; } var result3 = value + ""; return result3 == "0" && 1 / value == -INFINITY ? "-0" : result3; } function baseUniq(array2, iteratee2, comparator) { var index2 = -1, includes2 = arrayIncludes, length = array2.length, isCommon = true, result3 = [], seen = result3; if (comparator) { isCommon = false; includes2 = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { var set3 = iteratee2 ? null : createSet(array2); if (set3) { return setToArray(set3); } isCommon = false; includes2 = cacheHas; seen = new SetCache(); } else { seen = iteratee2 ? [] : result3; } outer: while (++index2 < length) { var value = array2[index2], computed = iteratee2 ? iteratee2(value) : value; value = comparator || value !== 0 ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed) { continue outer; } } if (iteratee2) { seen.push(computed); } result3.push(value); } else if (!includes2(seen, computed, comparator)) { if (seen !== result3) { seen.push(computed); } result3.push(value); } } return result3; } function baseUnset(object2, path) { path = castPath(path, object2); object2 = parent2(object2, path); return object2 == null || delete object2[toKey(last(path))]; } function baseUpdate(object2, path, updater, customizer) { return baseSet(object2, path, updater(baseGet(object2, path)), customizer); } function baseWhile(array2, predicate, isDrop, fromRight) { var length = array2.length, index2 = fromRight ? length : -1; while ((fromRight ? index2-- : ++index2 < length) && predicate(array2[index2], index2, array2)) { } return isDrop ? baseSlice(array2, fromRight ? 0 : index2, fromRight ? index2 + 1 : length) : baseSlice(array2, fromRight ? index2 + 1 : 0, fromRight ? length : index2); } function baseWrapperValue(value, actions) { var result3 = value; if (result3 instanceof LazyWrapper) { result3 = result3.value(); } return arrayReduce(actions, function(result4, action) { return action.func.apply(action.thisArg, arrayPush([result4], action.args)); }, result3); } function baseXor(arrays, iteratee2, comparator) { var length = arrays.length; if (length < 2) { return length ? baseUniq(arrays[0]) : []; } var index2 = -1, result3 = Array2(length); while (++index2 < length) { var array2 = arrays[index2], othIndex = -1; while (++othIndex < length) { if (othIndex != index2) { result3[index2] = baseDifference(result3[index2] || array2, arrays[othIndex], iteratee2, comparator); } } } return baseUniq(baseFlatten(result3, 1), iteratee2, comparator); } function baseZipObject(props, values2, assignFunc) { var index2 = -1, length = props.length, valsLength = values2.length, result3 = {}; while (++index2 < length) { var value = index2 < valsLength ? values2[index2] : undefined$1; assignFunc(result3, props[index2], value); } return result3; } function castArrayLikeObject(value) { return isArrayLikeObject(value) ? value : []; } function castFunction(value) { return typeof value == "function" ? value : identity; } function castPath(value, object2) { if (isArray2(value)) { return value; } return isKey(value, object2) ? [value] : stringToPath(toString2(value)); } var castRest = baseRest; function castSlice(array2, start, end) { var length = array2.length; end = end === undefined$1 ? length : end; return !start && end >= length ? array2 : baseSlice(array2, start, end); } var clearTimeout2 = ctxClearTimeout || function(id) { return root.clearTimeout(id); }; function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result3 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result3); return result3; } function cloneArrayBuffer(arrayBuffer) { var result3 = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array2(result3).set(new Uint8Array2(arrayBuffer)); return result3; } function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } function cloneRegExp(regexp) { var result3 = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result3.lastIndex = regexp.lastIndex; return result3; } function cloneSymbol(symbol) { return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {}; } function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { return 1; } if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { return -1; } } return 0; } function compareMultiple(object2, other, orders) { var index2 = -1, objCriteria = object2.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index2 < length) { var result3 = compareAscending(objCriteria[index2], othCriteria[index2]); if (result3) { if (index2 >= ordersLength) { return result3; } var order2 = orders[index2]; return result3 * (order2 == "desc" ? -1 : 1); } } return object2.index - other.index; } function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength2 = nativeMax(argsLength - holdersLength, 0), result3 = Array2(leftLength + rangeLength2), isUncurried = !isCurried; while (++leftIndex < leftLength) { result3[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result3[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength2--) { result3[leftIndex++] = args[argsIndex++]; } return result3; } function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength2 = nativeMax(argsLength - holdersLength, 0), result3 = Array2(rangeLength2 + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength2) { result3[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result3[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result3[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result3; } function copyArray(source, array2) { var index2 = -1, length = source.length; array2 || (array2 = Array2(length)); while (++index2 < length) { array2[index2] = source[index2]; } return array2; } function copyObject(source, props, object2, customizer) { var isNew = !object2; object2 || (object2 = {}); var index2 = -1, length = props.length; while (++index2 < length) { var key = props[index2]; var newValue = customizer ? customizer(object2[key], source[key], key, object2, source) : undefined$1; if (newValue === undefined$1) { newValue = source[key]; } if (isNew) { baseAssignValue(object2, key, newValue); } else { assignValue(object2, key, newValue); } } return object2; } function copySymbols(source, object2) { return copyObject(source, getSymbols(source), object2); } function copySymbolsIn(source, object2) { return copyObject(source, getSymbolsIn(source), object2); } function createAggregator(setter, initializer) { return function(collection, iteratee2) { var func = isArray2(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; return func(collection, setter, getIteratee(iteratee2, 2), accumulator); }; } function createAssigner(assigner) { return baseRest(function(object2, sources) { var index2 = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1; customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined$1 : customizer; length = 1; } object2 = Object2(object2); while (++index2 < length) { var source = sources[index2]; if (source) { assigner(object2, source, index2, customizer); } } return object2; }); } function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee2) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee2); } var length = collection.length, index2 = fromRight ? length : -1, iterable = Object2(collection); while (fromRight ? index2-- : ++index2 < length) { if (iteratee2(iterable[index2], index2, iterable) === false) { break; } } return collection; }; } function createBaseFor(fromRight) { return function(object2, iteratee2, keysFunc) { var index2 = -1, iterable = Object2(object2), props = keysFunc(object2), length = props.length; while (length--) { var key = props[fromRight ? length : ++index2]; if (iteratee2(iterable[key], key, iterable) === false) { break; } } return object2; }; } function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var fn = this && this !== root && this instanceof wrapper ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } function createCaseFirst(methodName) { return function(string) { string = toString2(string); var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined$1; var chr = strSymbols ? strSymbols[0] : string.charAt(0); var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1); return chr[methodName]() + trailing; }; } function createCompounder(callback) { return function(string) { return arrayReduce(words(deburr(string).replace(reApos, "")), callback, ""); }; } function createCtor(Ctor) { return function() { var args = arguments; switch (args.length) { case 0: return new Ctor(); case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result3 = Ctor.apply(thisBinding, args); return isObject2(result3) ? result3 : thisBinding; }; } function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array2(length), index2 = length, placeholder = getHolder(wrapper); while (index2--) { args[index2] = arguments[index2]; } var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, undefined$1, args, holders, undefined$1, undefined$1, arity - length ); } var fn = this && this !== root && this instanceof wrapper ? Ctor : func; return apply2(fn, this, args); } return wrapper; } function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object2(collection); if (!isArrayLike(collection)) { var iteratee2 = getIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee2(iterable[key], key, iterable); }; } var index2 = findIndexFunc(collection, predicate, fromIndex); return index2 > -1 ? iterable[iteratee2 ? collection[index2] : index2] : undefined$1; }; } function createFlow(fromRight) { return flatRest(function(funcs) { var length = funcs.length, index2 = length, prereq = LodashWrapper.prototype.thru; if (fromRight) { funcs.reverse(); } while (index2--) { var func = funcs[index2]; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } if (prereq && !wrapper && getFuncName(func) == "wrapper") { var wrapper = new LodashWrapper([], true); } } index2 = wrapper ? index2 : length; while (++index2 < length) { func = funcs[index2]; var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1; if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) { wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); } else { wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); } } return function() { var args = arguments, value = args[0]; if (wrapper && args.length == 1 && isArray2(value)) { return wrapper.plant(value).value(); } var index3 = 0, result3 = length ? funcs[index3].apply(this, args) : value; while (++index3 < length) { result3 = funcs[index3].call(this, result3); } return result3; }; }); } function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined$1 : createCtor(func); function wrapper() { var length = arguments.length, args = Array2(length), index2 = length; while (index2--) { args[index2] = arguments[index2]; } if (isCurried) { var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary2, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary2 < length) { args.length = ary2; } if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } function createInverter(setter, toIteratee) { return function(object2, iteratee2) { return baseInverter(object2, setter, toIteratee(iteratee2), {}); }; } function createMathOperation(operator, defaultValue) { return function(value, other) { var result3; if (value === undefined$1 && other === undefined$1) { return defaultValue; } if (value !== undefined$1) { result3 = value; } if (other !== undefined$1) { if (result3 === undefined$1) { return other; } if (typeof value == "string" || typeof other == "string") { value = baseToString(value); other = baseToString(other); } else { value = baseToNumber(value); other = baseToNumber(other); } result3 = operator(value, other); } return result3; }; } function createOver(arrayFunc) { return flatRest(function(iteratees) { iteratees = arrayMap(iteratees, baseUnary(getIteratee())); return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee2) { return apply2(iteratee2, thisArg, args); }); }); }); } function createPadding(length, chars) { chars = chars === undefined$1 ? " " : baseToString(chars); var charsLength = chars.length; if (charsLength < 2) { return charsLength ? baseRepeat(chars, length) : chars; } var result3 = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return hasUnicode(chars) ? castSlice(stringToArray(result3), 0, length).join("") : result3.slice(0, length); } function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply2(fn, isBind ? thisArg : this, args); } return wrapper; } function createRange(fromRight) { return function(start, end, step) { if (step && typeof step != "number" && isIterateeCall(start, end, step)) { end = step = undefined$1; } start = toFinite(start); if (end === undefined$1) { end = start; start = 0; } else { end = toFinite(end); } step = step === undefined$1 ? start < end ? 1 : -1 : toFinite(step); return baseRange(start, end, step, fromRight); }; } function createRelationalOperation(operator) { return function(value, other) { if (!(typeof value == "string" && typeof other == "string")) { value = toNumber(value); other = toNumber(other); } return operator(value, other); }; } function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined$1, newHoldersRight = isCurry ? undefined$1 : holders, newPartials = isCurry ? partials : undefined$1, newPartialsRight = isCurry ? undefined$1 : partials; bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary2, arity ]; var result3 = wrapFunc.apply(undefined$1, newData); if (isLaziable(func)) { setData(result3, newData); } result3.placeholder = placeholder; return setWrapToString(result3, func, bitmask); } function createRound(methodName) { var func = Math2[methodName]; return function(number2, precision) { number2 = toNumber(number2); precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); if (precision && nativeIsFinite(number2)) { var pair = (toString2(number2) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision)); pair = (toString2(value) + "e").split("e"); return +(pair[0] + "e" + (+pair[1] - precision)); } return func(number2); }; } var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values2) { return new Set2(values2); }; function createToPairs(keysFunc) { return function(object2) { var tag = getTag(object2); if (tag == mapTag) { return mapToArray(object2); } if (tag == setTag) { return setToPairs(object2); } return baseToPairs(object2, keysFunc(object2)); }; } function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined$1; } ary2 = ary2 === undefined$1 ? ary2 : nativeMax(toInteger(ary2), 0); arity = arity === undefined$1 ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined$1; } var data = isBindKey ? undefined$1 : getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity ]; if (data) { mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === undefined$1 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result3 = createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result3 = createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { result3 = createPartial(func, bitmask, thisArg, partials); } else { result3 = createHybrid.apply(undefined$1, newData); } var setter = data ? baseSetData : setData; return setWrapToString(setter(result3, newData), func, bitmask); } function customDefaultsAssignIn(objValue, srcValue, key, object2) { if (objValue === undefined$1 || eq(objValue, objectProto[key]) && !hasOwnProperty2.call(object2, key)) { return srcValue; } return objValue; } function customDefaultsMerge(objValue, srcValue, key, object2, source, stack) { if (isObject2(objValue) && isObject2(srcValue)) { stack.set(srcValue, objValue); baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack); stack["delete"](srcValue); } return objValue; } function customOmitClone(value) { return isPlainObject2(value) ? undefined$1 : value; } function equalArrays(array2, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array2.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } var arrStacked = stack.get(array2); var othStacked = stack.get(other); if (arrStacked && othStacked) { return arrStacked == other && othStacked == array2; } var index2 = -1, result3 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1; stack.set(array2, other); stack.set(other, array2); while (++index2 < arrLength) { var arrValue = array2[index2], othValue = other[index2]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index2, other, array2, stack) : customizer(arrValue, othValue, index2, array2, other, stack); } if (compared !== undefined$1) { if (compared) { continue; } result3 = false; break; } if (seen) { if (!arraySome(other, function(othValue2, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result3 = false; break; } } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { result3 = false; break; } } stack["delete"](array2); stack["delete"](other); return result3; } function equalByTag(object2, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if (object2.byteLength != other.byteLength || object2.byteOffset != other.byteOffset) { return false; } object2 = object2.buffer; other = other.buffer; case arrayBufferTag: if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object2), new Uint8Array2(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: return eq(+object2, +other); case errorTag: return object2.name == other.name && object2.message == other.message; case regexpTag: case stringTag: return object2 == other + ""; case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object2.size != other.size && !isPartial) { return false; } var stacked = stack.get(object2); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; stack.set(object2, other); var result3 = equalArrays(convert(object2), convert(other), bitmask, customizer, equalFunc, stack); stack["delete"](object2); return result3; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object2) == symbolValueOf.call(other); } } return false; } function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object2), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index2 = objLength; while (index2--) { var key = objProps[index2]; if (!(isPartial ? key in other : hasOwnProperty2.call(other, key))) { return false; } } var objStacked = stack.get(object2); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object2; } var result3 = true; stack.set(object2, other); stack.set(other, object2); var skipCtor = isPartial; while (++index2 < objLength) { key = objProps[index2]; var objValue = object2[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object2, stack) : customizer(objValue, othValue, key, object2, other, stack); } if (!(compared === undefined$1 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result3 = false; break; } skipCtor || (skipCtor = key == "constructor"); } if (result3 && !skipCtor) { var objCtor = object2.constructor, othCtor = other.constructor; if (objCtor != othCtor && ("constructor" in object2 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { result3 = false; } } stack["delete"](object2); stack["delete"](other); return result3; } function flatRest(func) { return setToString(overRest(func, undefined$1, flatten), func + ""); } function getAllKeys(object2) { return baseGetAllKeys(object2, keys, getSymbols); } function getAllKeysIn(object2) { return baseGetAllKeys(object2, keysIn, getSymbolsIn); } var getData = !metaMap ? noop2 : function(func) { return metaMap.get(func); }; function getFuncName(func) { var result3 = func.name + "", array2 = realNames[result3], length = hasOwnProperty2.call(realNames, result3) ? array2.length : 0; while (length--) { var data = array2[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result3; } function getHolder(func) { var object2 = hasOwnProperty2.call(lodash2, "placeholder") ? lodash2 : func; return object2.placeholder; } function getIteratee() { var result3 = lodash2.iteratee || iteratee; result3 = result3 === iteratee ? baseIteratee : result3; return arguments.length ? result3(arguments[0], arguments[1]) : result3; } function getMapData(map2, key) { var data = map2.__data__; return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } function getMatchData(object2) { var result3 = keys(object2), length = result3.length; while (length--) { var key = result3[length], value = object2[key]; result3[length] = [key, value, isStrictComparable(value)]; } return result3; } function getNative(object2, key) { var value = getValue(object2, key); return baseIsNative(value) ? value : undefined$1; } function getRawTag(value) { var isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined$1; var unmasked = true; } catch (e2) { } var result3 = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result3; } var getSymbols = !nativeGetSymbols ? stubArray : function(object2) { if (object2 == null) { return []; } object2 = Object2(object2); return arrayFilter(nativeGetSymbols(object2), function(symbol) { return propertyIsEnumerable.call(object2, symbol); }); }; var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object2) { var result3 = []; while (object2) { arrayPush(result3, getSymbols(object2)); object2 = getPrototype(object2); } return result3; }; var getTag = baseGetTag; if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { getTag = function(value) { var result3 = baseGetTag(value), Ctor = result3 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : ""; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result3; }; } function getView(start, end, transforms) { var index2 = -1, length = transforms.length; while (++index2 < length) { var data = transforms[index2], size2 = data.size; switch (data.type) { case "drop": start += size2; break; case "dropRight": end -= size2; break; case "take": end = nativeMin(end, start + size2); break; case "takeRight": start = nativeMax(start, end - size2); break; } } return { "start": start, "end": end }; } function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } function hasPath(object2, path, hasFunc) { path = castPath(path, object2); var index2 = -1, length = path.length, result3 = false; while (++index2 < length) { var key = toKey(path[index2]); if (!(result3 = object2 != null && hasFunc(object2, key))) { break; } object2 = object2[key]; } if (result3 || ++index2 != length) { return result3; } length = object2 == null ? 0 : object2.length; return !!length && isLength(length) && isIndex(key, length) && (isArray2(object2) || isArguments(object2)); } function initCloneArray(array2) { var length = array2.length, result3 = new array2.constructor(length); if (length && typeof array2[0] == "string" && hasOwnProperty2.call(array2, "index")) { result3.index = array2.index; result3.input = array2.input; } return result3; } function initCloneObject(object2) { return typeof object2.constructor == "function" && !isPrototype(object2) ? baseCreate(getPrototype(object2)) : {}; } function initCloneByTag(object2, tag, isDeep) { var Ctor = object2.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object2); case boolTag: case dateTag: return new Ctor(+object2); case dataViewTag: return cloneDataView(object2, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object2, isDeep); case mapTag: return new Ctor(); case numberTag: case stringTag: return new Ctor(object2); case regexpTag: return cloneRegExp(object2); case setTag: return new Ctor(); case symbolTag: return cloneSymbol(object2); } } function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; details = details.join(length > 2 ? ", " : " "); return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); } function isFlattenable(value) { return isArray2(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } function isIterateeCall(value, index2, object2) { if (!isObject2(object2)) { return false; } var type = typeof index2; if (type == "number" ? isArrayLike(object2) && isIndex(index2, object2.length) : type == "string" && index2 in object2) { return eq(object2[index2], value); } return false; } function isKey(value, object2) { if (isArray2(value)) { return false; } var type = typeof value; if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object2 != null && value in Object2(object2); } function isKeyable(value) { var type = typeof value; return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; } function isLaziable(func) { var funcName = getFuncName(func), other = lodash2[funcName]; if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !!data && func === data[0]; } function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } var isMaskable = coreJsData ? isFunction2 : stubFalse; function isPrototype(value) { var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; return value === proto; } function isStrictComparable(value) { return value === value && !isObject2(value); } function matchesStrictComparable(key, srcValue) { return function(object2) { if (object2 == null) { return false; } return object2[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object2)); }; } function memoizeCapped(func) { var result3 = memoize(func, function(key) { if (cache2.size === MAX_MEMOIZE_SIZE) { cache2.clear(); } return key; }); var cache2 = result3.cache; return result3; } function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG; if (!(isCommon || isCombo)) { return data; } if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } var value = source[3]; if (value) { var partials = data[3]; data[3] = partials ? composeArgs(partials, value, source[4]) : value; data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; } value = source[5]; if (value) { partials = data[5]; data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; } value = source[7]; if (value) { data[7] = value; } if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } if (data[9] == null) { data[9] = source[9]; } data[0] = source[0]; data[1] = newBitmask; return data; } function nativeKeysIn(object2) { var result3 = []; if (object2 != null) { for (var key in Object2(object2)) { result3.push(key); } } return result3; } function objectToString2(value) { return nativeObjectToString.call(value); } function overRest(func, start, transform2) { start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0); return function() { var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array2 = Array2(length); while (++index2 < length) { array2[index2] = args[start + index2]; } index2 = -1; var otherArgs = Array2(start + 1); while (++index2 < start) { otherArgs[index2] = args[index2]; } otherArgs[start] = transform2(array2); return apply2(func, this, otherArgs); }; } function parent2(object2, path) { return path.length < 2 ? object2 : baseGet(object2, baseSlice(path, 0, -1)); } function reorder(array2, indexes) { var arrLength = array2.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array2); while (length--) { var index2 = indexes[length]; array2[length] = isIndex(index2, arrLength) ? oldArray[index2] : undefined$1; } return array2; } function safeGet(object2, key) { if (key === "constructor" && typeof object2[key] === "function") { return; } if (key == "__proto__") { return; } return object2[key]; } var setData = shortOut(baseSetData); var setTimeout2 = ctxSetTimeout || function(func, wait) { return root.setTimeout(func, wait); }; var setToString = shortOut(baseSetToString); function setWrapToString(wrapper, reference, bitmask) { var source = reference + ""; return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined$1, arguments); }; } function shuffleSelf(array2, size2) { var index2 = -1, length = array2.length, lastIndex = length - 1; size2 = size2 === undefined$1 ? length : size2; while (++index2 < size2) { var rand = baseRandom(index2, lastIndex), value = array2[rand]; array2[rand] = array2[index2]; array2[index2] = value; } array2.length = size2; return array2; } var stringToPath = memoizeCapped(function(string) { var result3 = []; if (string.charCodeAt(0) === 46) { result3.push(""); } string.replace(rePropName, function(match, number2, quote, subString) { result3.push(quote ? subString.replace(reEscapeChar, "$1") : number2 || match); }); return result3; }); function toKey(value) { if (typeof value == "string" || isSymbol(value)) { return value; } var result3 = value + ""; return result3 == "0" && 1 / value == -INFINITY ? "-0" : result3; } function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e2) { } try { return func + ""; } catch (e2) { } } return ""; } function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = "_." + pair[0]; if (bitmask & pair[1] && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } function wrapperClone(wrapper) { if (wrapper instanceof LazyWrapper) { return wrapper.clone(); } var result3 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result3.__actions__ = copyArray(wrapper.__actions__); result3.__index__ = wrapper.__index__; result3.__values__ = wrapper.__values__; return result3; } function chunk(array2, size2, guard) { if (guard ? isIterateeCall(array2, size2, guard) : size2 === undefined$1) { size2 = 1; } else { size2 = nativeMax(toInteger(size2), 0); } var length = array2 == null ? 0 : array2.length; if (!length || size2 < 1) { return []; } var index2 = 0, resIndex = 0, result3 = Array2(nativeCeil(length / size2)); while (index2 < length) { result3[resIndex++] = baseSlice(array2, index2, index2 += size2); } return result3; } function compact(array2) { var index2 = -1, length = array2 == null ? 0 : array2.length, resIndex = 0, result3 = []; while (++index2 < length) { var value = array2[index2]; if (value) { result3[resIndex++] = value; } } return result3; } function concat() { var length = arguments.length; if (!length) { return []; } var args = Array2(length - 1), array2 = arguments[0], index2 = length; while (index2--) { args[index2 - 1] = arguments[index2]; } return arrayPush(isArray2(array2) ? copyArray(array2) : [array2], baseFlatten(args, 1)); } var difference = baseRest(function(array2, values2) { return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values2, 1, isArrayLikeObject, true)) : []; }); var differenceBy = baseRest(function(array2, values2) { var iteratee2 = last(values2); if (isArrayLikeObject(iteratee2)) { iteratee2 = undefined$1; } return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : []; }); var differenceWith = baseRest(function(array2, values2) { var comparator = last(values2); if (isArrayLikeObject(comparator)) { comparator = undefined$1; } return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values2, 1, isArrayLikeObject, true), undefined$1, comparator) : []; }); function drop(array2, n2, guard) { var length = array2 == null ? 0 : array2.length; if (!length) { return []; } n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2); return baseSlice(array2, n2 < 0 ? 0 : n2, length); } function dropRight(array2, n2, guard) { var length = array2 == null ? 0 : array2.length; if (!length) { return []; } n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2); n2 = length - n2; return baseSlice(array2, 0, n2 < 0 ? 0 : n2); } function dropRightWhile(array2, predicate) { return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3), true, true) : []; } function dropWhile(array2, predicate) { return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3), true) : []; } function fill(array2, value, start, end) { var length = array2 == null ? 0 : array2.length; if (!length) { return []; } if (start && typeof start != "number" && isIterateeCall(array2, value, start)) { start = 0; end = length; } return baseFill(array2, value, start, end); } function findIndex(array2, predicate, fromIndex) { var length = array2 == null ? 0 : array2.length; if (!length) { return -1; } var index2 = fromIndex == null ? 0 : toInteger(fromIndex); if (index2 < 0) { index2 = nativeMax(length + index2, 0); } return baseFindIndex(array2, getIteratee(predicate, 3), index2); } function findLastIndex(array2, predicate, fromIndex) { var length = array2 == null ? 0 : array2.length; if (!length) { return -1; } var index2 = length - 1; if (fromIndex !== undefined$1) { index2 = toInteger(fromIndex); index2 = fromIndex < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1); } return baseFindIndex(array2, getIteratee(predicate, 3), index2, true); } function flatten(array2) { var length = array2 == null ? 0 : array2.length; return length ? baseFlatten(array2, 1) : []; } function flattenDeep(array2) { var length = array2 == null ? 0 : array2.length; return length ? baseFlatten(array2, INFINITY) : []; } function flattenDepth(array2, depth) { var length = array2 == null ? 0 : array2.length; if (!length) { return []; } depth = depth === undefined$1 ? 1 : toInteger(depth); return baseFlatten(array2, depth); } function fromPairs(pairs) { var index2 = -1, length = pairs == null ? 0 : pairs.length, result3 = {}; while (++index2 < length) { var pair = pairs[index2]; result3[pair[0]] = pair[1]; } return result3; } function head(array2) { return array2 && array2.length ? array2[0] : undefined$1; } function indexOf(array2, value, fromIndex) { var length = array2 == null ? 0 : array2.length; if (!length) { return -1; } var index2 = fromIndex == null ? 0 : toInteger(fromIndex); if (index2 < 0) { index2 = nativeMax(length + index2, 0); } return baseIndexOf(array2, value, index2); } function initial(array2) { var length = array2 == null ? 0 : array2.length; return length ? baseSlice(array2, 0, -1) : []; } var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; }); var intersectionBy = baseRest(function(arrays) { var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); if (iteratee2 === last(mapped)) { iteratee2 = undefined$1; } else { mapped.pop(); } return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : []; }); var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); comparator = typeof comparator == "function" ? comparator : undefined$1; if (comparator) { mapped.pop(); } return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined$1, comparator) : []; }); function join(array2, separator) { return array2 == null ? "" : nativeJoin.call(array2, separator); } function last(array2) { var length = array2 == null ? 0 : array2.length; return length ? array2[length - 1] : undefined$1; } function lastIndexOf(array2, value, fromIndex) { var length = array2 == null ? 0 : array2.length; if (!length) { return -1; } var index2 = length; if (fromIndex !== undefined$1) { index2 = toInteger(fromIndex); index2 = index2 < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1); } return value === value ? strictLastIndexOf(array2, value, index2) : baseFindIndex(array2, baseIsNaN, index2, true); } function nth(array2, n2) { return array2 && array2.length ? baseNth(array2, toInteger(n2)) : undefined$1; } var pull = baseRest(pullAll); function pullAll(array2, values2) { return array2 && array2.length && values2 && values2.length ? basePullAll(array2, values2) : array2; } function pullAllBy(array2, values2, iteratee2) { return array2 && array2.length && values2 && values2.length ? basePullAll(array2, values2, getIteratee(iteratee2, 2)) : array2; } function pullAllWith(array2, values2, comparator) { return array2 && array2.length && values2 && values2.length ? basePullAll(array2, values2, undefined$1, comparator) : array2; } var pullAt = flatRest(function(array2, indexes) { var length = array2 == null ? 0 : array2.length, result3 = baseAt(array2, indexes); basePullAt(array2, arrayMap(indexes, function(index2) { return isIndex(index2, length) ? +index2 : index2; }).sort(compareAscending)); return result3; }); function remove(array2, predicate) { var result3 = []; if (!(array2 && array2.length)) { return result3; } var index2 = -1, indexes = [], length = array2.length; predicate = getIteratee(predicate, 3); while (++index2 < length) { var value = array2[index2]; if (predicate(value, index2, array2)) { result3.push(value); indexes.push(index2); } } basePullAt(array2, indexes); return result3; } function reverse(array2) { return array2 == null ? array2 : nativeReverse.call(array2); } function slice(array2, start, end) { var length = array2 == null ? 0 : array2.length; if (!length) { return []; } if (end && typeof end != "number" && isIterateeCall(array2, start, end)) { start = 0; end = length; } else { start = start == null ? 0 : toInteger(start); end = end === undefined$1 ? length : toInteger(end); } return baseSlice(array2, start, end); } function sortedIndex(array2, value) { return baseSortedIndex(array2, value); } function sortedIndexBy(array2, value, iteratee2) { return baseSortedIndexBy(array2, value, getIteratee(iteratee2, 2)); } function sortedIndexOf(array2, value) { var length = array2 == null ? 0 : array2.length; if (length) { var index2 = baseSortedIndex(array2, value); if (index2 < length && eq(array2[index2], value)) { return index2; } } return -1; } function sortedLastIndex(array2, value) { return baseSortedIndex(array2, value, true); } function sortedLastIndexBy(array2, value, iteratee2) { return baseSortedIndexBy(array2, value, getIteratee(iteratee2, 2), true); } function sortedLastIndexOf(array2, value) { var length = array2 == null ? 0 : array2.length; if (length) { var index2 = baseSortedIndex(array2, value, true) - 1; if (eq(array2[index2], value)) { return index2; } } return -1; } function sortedUniq(array2) { return array2 && array2.length ? baseSortedUniq(array2) : []; } function sortedUniqBy(array2, iteratee2) { return array2 && array2.length ? baseSortedUniq(array2, getIteratee(iteratee2, 2)) : []; } function tail(array2) { var length = array2 == null ? 0 : array2.length; return length ? baseSlice(array2, 1, length) : []; } function take(array2, n2, guard) { if (!(array2 && array2.length)) { return []; } n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2); return baseSlice(array2, 0, n2 < 0 ? 0 : n2); } function takeRight(array2, n2, guard) { var length = array2 == null ? 0 : array2.length; if (!length) { return []; } n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2); n2 = length - n2; return baseSlice(array2, n2 < 0 ? 0 : n2, length); } function takeRightWhile(array2, predicate) { return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3), false, true) : []; } function takeWhile(array2, predicate) { return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3)) : []; } var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); var unionBy = baseRest(function(arrays) { var iteratee2 = last(arrays); if (isArrayLikeObject(iteratee2)) { iteratee2 = undefined$1; } return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)); }); var unionWith = baseRest(function(arrays) { var comparator = last(arrays); comparator = typeof comparator == "function" ? comparator : undefined$1; return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator); }); function uniq(array2) { return array2 && array2.length ? baseUniq(array2) : []; } function uniqBy(array2, iteratee2) { return array2 && array2.length ? baseUniq(array2, getIteratee(iteratee2, 2)) : []; } function uniqWith(array2, comparator) { comparator = typeof comparator == "function" ? comparator : undefined$1; return array2 && array2.length ? baseUniq(array2, undefined$1, comparator) : []; } function unzip(array2) { if (!(array2 && array2.length)) { return []; } var length = 0; array2 = arrayFilter(array2, function(group) { if (isArrayLikeObject(group)) { length = nativeMax(group.length, length); return true; } }); return baseTimes(length, function(index2) { return arrayMap(array2, baseProperty(index2)); }); } function unzipWith(array2, iteratee2) { if (!(array2 && array2.length)) { return []; } var result3 = unzip(array2); if (iteratee2 == null) { return result3; } return arrayMap(result3, function(group) { return apply2(iteratee2, undefined$1, group); }); } var without = baseRest(function(array2, values2) { return isArrayLikeObject(array2) ? baseDifference(array2, values2) : []; }); var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); var xorBy = baseRest(function(arrays) { var iteratee2 = last(arrays); if (isArrayLikeObject(iteratee2)) { iteratee2 = undefined$1; } return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2)); }); var xorWith = baseRest(function(arrays) { var comparator = last(arrays); comparator = typeof comparator == "function" ? comparator : undefined$1; return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator); }); var zip = baseRest(unzip); function zipObject(props, values2) { return baseZipObject(props || [], values2 || [], assignValue); } function zipObjectDeep(props, values2) { return baseZipObject(props || [], values2 || [], baseSet); } var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined$1; iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined$1; return unzipWith(arrays, iteratee2); }); function chain(value) { var result3 = lodash2(value); result3.__chain__ = true; return result3; } function tap(value, interceptor) { interceptor(value); return value; } function thru(value, interceptor) { return interceptor(value); } var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object2) { return baseAt(object2, paths); }; if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) { return this.thru(interceptor); } value = value.slice(start, +start + (length ? 1 : 0)); value.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined$1 }); return new LodashWrapper(value, this.__chain__).thru(function(array2) { if (length && !array2.length) { array2.push(undefined$1); } return array2; }); }); function wrapperChain() { return chain(this); } function wrapperCommit() { return new LodashWrapper(this.value(), this.__chain__); } function wrapperNext() { if (this.__values__ === undefined$1) { this.__values__ = toArray2(this.value()); } var done = this.__index__ >= this.__values__.length, value = done ? undefined$1 : this.__values__[this.__index__++]; return { "done": done, "value": value }; } function wrapperToIterator() { return this; } function wrapperPlant(value) { var result3, parent3 = this; while (parent3 instanceof baseLodash) { var clone3 = wrapperClone(parent3); clone3.__index__ = 0; clone3.__values__ = undefined$1; if (result3) { previous.__wrapped__ = clone3; } else { result3 = clone3; } var previous = clone3; parent3 = parent3.__wrapped__; } previous.__wrapped__ = value; return result3; } function wrapperReverse() { var value = this.__wrapped__; if (value instanceof LazyWrapper) { var wrapped = value; if (this.__actions__.length) { wrapped = new LazyWrapper(this); } wrapped = wrapped.reverse(); wrapped.__actions__.push({ "func": thru, "args": [reverse], "thisArg": undefined$1 }); return new LodashWrapper(wrapped, this.__chain__); } return this.thru(reverse); } function wrapperValue() { return baseWrapperValue(this.__wrapped__, this.__actions__); } var countBy = createAggregator(function(result3, value, key) { if (hasOwnProperty2.call(result3, key)) { ++result3[key]; } else { baseAssignValue(result3, key, 1); } }); function every(collection, predicate, guard) { var func = isArray2(collection) ? arrayEvery : baseEvery; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined$1; } return func(collection, getIteratee(predicate, 3)); } function filter(collection, predicate) { var func = isArray2(collection) ? arrayFilter : baseFilter; return func(collection, getIteratee(predicate, 3)); } var find = createFind(findIndex); var findLast = createFind(findLastIndex); function flatMap(collection, iteratee2) { return baseFlatten(map(collection, iteratee2), 1); } function flatMapDeep(collection, iteratee2) { return baseFlatten(map(collection, iteratee2), INFINITY); } function flatMapDepth(collection, iteratee2, depth) { depth = depth === undefined$1 ? 1 : toInteger(depth); return baseFlatten(map(collection, iteratee2), depth); } function forEach2(collection, iteratee2) { var func = isArray2(collection) ? arrayEach : baseEach; return func(collection, getIteratee(iteratee2, 3)); } function forEachRight(collection, iteratee2) { var func = isArray2(collection) ? arrayEachRight : baseEachRight; return func(collection, getIteratee(iteratee2, 3)); } var groupBy = createAggregator(function(result3, value, key) { if (hasOwnProperty2.call(result3, key)) { result3[key].push(value); } else { baseAssignValue(result3, key, [value]); } }); function includes(collection, value, fromIndex, guard) { collection = isArrayLike(collection) ? collection : values(collection); fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; var length = collection.length; if (fromIndex < 0) { fromIndex = nativeMax(length + fromIndex, 0); } return isString2(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; } var invokeMap = baseRest(function(collection, path, args) { var index2 = -1, isFunc = typeof path == "function", result3 = isArrayLike(collection) ? Array2(collection.length) : []; baseEach(collection, function(value) { result3[++index2] = isFunc ? apply2(path, value, args) : baseInvoke(value, path, args); }); return result3; }); var keyBy = createAggregator(function(result3, value, key) { baseAssignValue(result3, key, value); }); function map(collection, iteratee2) { var func = isArray2(collection) ? arrayMap : baseMap; return func(collection, getIteratee(iteratee2, 3)); } function orderBy(collection, iteratees, orders, guard) { if (collection == null) { return []; } if (!isArray2(iteratees)) { iteratees = iteratees == null ? [] : [iteratees]; } orders = guard ? undefined$1 : orders; if (!isArray2(orders)) { orders = orders == null ? [] : [orders]; } return baseOrderBy(collection, iteratees, orders); } var partition = createAggregator(function(result3, value, key) { result3[key ? 0 : 1].push(value); }, function() { return [[], []]; }); function reduce(collection, iteratee2, accumulator) { var func = isArray2(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach); } function reduceRight(collection, iteratee2, accumulator) { var func = isArray2(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3; return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight); } function reject(collection, predicate) { var func = isArray2(collection) ? arrayFilter : baseFilter; return func(collection, negate(getIteratee(predicate, 3))); } function sample(collection) { var func = isArray2(collection) ? arraySample : baseSample; return func(collection); } function sampleSize(collection, n2, guard) { if (guard ? isIterateeCall(collection, n2, guard) : n2 === undefined$1) { n2 = 1; } else { n2 = toInteger(n2); } var func = isArray2(collection) ? arraySampleSize : baseSampleSize; return func(collection, n2); } function shuffle(collection) { var func = isArray2(collection) ? arrayShuffle : baseShuffle; return func(collection); } function size(collection) { if (collection == null) { return 0; } if (isArrayLike(collection)) { return isString2(collection) ? stringSize(collection) : collection.length; } var tag = getTag(collection); if (tag == mapTag || tag == setTag) { return collection.size; } return baseKeys(collection).length; } function some(collection, predicate, guard) { var func = isArray2(collection) ? arraySome : baseSome; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined$1; } return func(collection, getIteratee(predicate, 3)); } var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } var length = iteratees.length; if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { iteratees = []; } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); var now2 = ctxNow || function() { return root.Date.now(); }; function after(n2, func) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } n2 = toInteger(n2); return function() { if (--n2 < 1) { return func.apply(this, arguments); } }; } function ary(func, n2, guard) { n2 = guard ? undefined$1 : n2; n2 = func && n2 == null ? func.length : n2; return createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n2); } function before(n2, func) { var result3; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } n2 = toInteger(n2); return function() { if (--n2 > 0) { result3 = func.apply(this, arguments); } if (n2 <= 1) { func = undefined$1; } return result3; }; } var bind2 = baseRest(function(func, thisArg, partials) { var bitmask = WRAP_BIND_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bind2)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(func, bitmask, thisArg, partials, holders); }); var bindKey = baseRest(function(object2, key, partials) { var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(key, bitmask, object2, partials, holders); }); function curry(func, arity, guard) { arity = guard ? undefined$1 : arity; var result3 = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity); result3.placeholder = curry.placeholder; return result3; } function curryRight(func, arity, guard) { arity = guard ? undefined$1 : arity; var result3 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity); result3.placeholder = curryRight.placeholder; return result3; } function debounce(func, wait, options2) { var lastArgs, lastThis, maxWait, result3, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject2(options2)) { leading = !!options2.leading; maxing = "maxWait" in options2; maxWait = maxing ? nativeMax(toNumber(options2.maxWait) || 0, wait) : maxWait; trailing = "trailing" in options2 ? !!options2.trailing : trailing; } function invokeFunc(time2) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined$1; lastInvokeTime = time2; result3 = func.apply(thisArg, args); return result3; } function leadingEdge(time2) { lastInvokeTime = time2; timerId = setTimeout2(timerExpired, wait); return leading ? invokeFunc(time2) : result3; } function remainingWait(time2) { var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time2) { var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime; return lastCallTime === undefined$1 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { var time2 = now2(); if (shouldInvoke(time2)) { return trailingEdge(time2); } timerId = setTimeout2(timerExpired, remainingWait(time2)); } function trailingEdge(time2) { timerId = undefined$1; if (trailing && lastArgs) { return invokeFunc(time2); } lastArgs = lastThis = undefined$1; return result3; } function cancel() { if (timerId !== undefined$1) { clearTimeout2(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined$1; } function flush() { return timerId === undefined$1 ? result3 : trailingEdge(now2()); } function debounced() { var time2 = now2(), isInvoking = shouldInvoke(time2); lastArgs = arguments; lastThis = this; lastCallTime = time2; if (isInvoking) { if (timerId === undefined$1) { return leadingEdge(lastCallTime); } if (maxing) { clearTimeout2(timerId); timerId = setTimeout2(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined$1) { timerId = setTimeout2(timerExpired, wait); } return result3; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); function flip(func) { return createWrap(func, WRAP_FLIP_FLAG); } function memoize(func, resolver) { if (typeof func != "function" || resolver != null && typeof resolver != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache; if (cache2.has(key)) { return cache2.get(key); } var result3 = func.apply(this, args); memoized.cache = cache2.set(key, result3) || cache2; return result3; }; memoized.cache = new (memoize.Cache || MapCache)(); return memoized; } memoize.Cache = MapCache; function negate(predicate) { if (typeof predicate != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } return function() { var args = arguments; switch (args.length) { case 0: return !predicate.call(this); case 1: return !predicate.call(this, args[0]); case 2: return !predicate.call(this, args[0], args[1]); case 3: return !predicate.call(this, args[0], args[1], args[2]); } return !predicate.apply(this, args); }; } function once(func) { return before(2, func); } var overArgs = castRest(function(func, transforms) { transforms = transforms.length == 1 && isArray2(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); var funcsLength = transforms.length; return baseRest(function(args) { var index2 = -1, length = nativeMin(args.length, funcsLength); while (++index2 < length) { args[index2] = transforms[index2].call(this, args[index2]); } return apply2(func, this, args); }); }); var partial = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partial)); return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders); }); var partialRight = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partialRight)); return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders); }); var rearg = flatRest(function(func, indexes) { return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes); }); function rest(func, start) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } start = start === undefined$1 ? start : toInteger(start); return baseRest(func, start); } function spread2(func, start) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } start = start == null ? 0 : nativeMax(toInteger(start), 0); return baseRest(function(args) { var array2 = args[start], otherArgs = castSlice(args, 0, start); if (array2) { arrayPush(otherArgs, array2); } return apply2(func, this, otherArgs); }); } function throttle2(func, wait, options2) { var leading = true, trailing = true; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } if (isObject2(options2)) { leading = "leading" in options2 ? !!options2.leading : leading; trailing = "trailing" in options2 ? !!options2.trailing : trailing; } return debounce(func, wait, { "leading": leading, "maxWait": wait, "trailing": trailing }); } function unary(func) { return ary(func, 1); } function wrap(value, wrapper) { return partial(castFunction(wrapper), value); } function castArray() { if (!arguments.length) { return []; } var value = arguments[0]; return isArray2(value) ? value : [value]; } function clone2(value) { return baseClone(value, CLONE_SYMBOLS_FLAG); } function cloneWith(value, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); } function cloneDeep2(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } function cloneDeepWith(value, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); } function conformsTo(object2, source) { return source == null || baseConformsTo(object2, source, keys(source)); } function eq(value, other) { return value === other || value !== value && other !== other; } var gt2 = createRelationalOperation(baseGt); var gte = createRelationalOperation(function(value, other) { return value >= other; }); var isArguments = baseIsArguments(/* @__PURE__ */ function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); }; var isArray2 = Array2.isArray; var isArrayBuffer2 = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction2(value); } function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } function isBoolean2(value) { return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; } var isBuffer2 = nativeIsBuffer || stubFalse; var isDate2 = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; function isElement(value) { return isObjectLike(value) && value.nodeType === 1 && !isPlainObject2(value); } function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer2(value) || isTypedArray2(value) || isArguments(value))) { return !value.length; } var tag = getTag(value); if (tag == mapTag || tag == setTag) { return !value.size; } if (isPrototype(value)) { return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty2.call(value, key)) { return false; } } return true; } function isEqual(value, other) { return baseIsEqual(value, other); } function isEqualWith(value, other, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; var result3 = customizer ? customizer(value, other) : undefined$1; return result3 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result3; } function isError(value) { if (!isObjectLike(value)) { return false; } var tag = baseGetTag(value); return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value); } function isFinite2(value) { return typeof value == "number" && nativeIsFinite(value); } function isFunction2(value) { if (!isObject2(value)) { return false; } var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } function isInteger(value) { return typeof value == "number" && value == toInteger(value); } function isLength(value) { return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } function isObject2(value) { var type = typeof value; return value != null && (type == "object" || type == "function"); } function isObjectLike(value) { return value != null && typeof value == "object"; } var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; function isMatch(object2, source) { return object2 === source || baseIsMatch(object2, source, getMatchData(source)); } function isMatchWith(object2, source, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return baseIsMatch(object2, source, getMatchData(source), customizer); } function isNaN2(value) { return isNumber2(value) && value != +value; } function isNative(value) { if (isMaskable(value)) { throw new Error2(CORE_ERROR_TEXT); } return baseIsNative(value); } function isNull(value) { return value === null; } function isNil(value) { return value == null; } function isNumber2(value) { return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag; } function isPlainObject2(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty2.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } var isRegExp2 = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; function isSafeInteger(value) { return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; } var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; function isString2(value) { return typeof value == "string" || !isArray2(value) && isObjectLike(value) && baseGetTag(value) == stringTag; } function isSymbol(value) { return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; } var isTypedArray2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; function isUndefined2(value) { return value === undefined$1; } function isWeakMap(value) { return isObjectLike(value) && getTag(value) == weakMapTag; } function isWeakSet(value) { return isObjectLike(value) && baseGetTag(value) == weakSetTag; } var lt2 = createRelationalOperation(baseLt); var lte = createRelationalOperation(function(value, other) { return value <= other; }); function toArray2(value) { if (!value) { return []; } if (isArrayLike(value)) { return isString2(value) ? stringToArray(value) : copyArray(value); } if (symIterator && value[symIterator]) { return iteratorToArray(value[symIterator]()); } var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; return func(value); } function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign2 = value < 0 ? -1 : 1; return sign2 * MAX_INTEGER; } return value === value ? value : 0; } function toInteger(value) { var result3 = toFinite(value), remainder = result3 % 1; return result3 === result3 ? remainder ? result3 - remainder : result3 : 0; } function toLength(value) { return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; } function toNumber(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } if (isObject2(value)) { var other = typeof value.valueOf == "function" ? value.valueOf() : value; value = isObject2(other) ? other + "" : other; } if (typeof value != "string") { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; } function toPlainObject(value) { return copyObject(value, keysIn(value)); } function toSafeInteger(value) { return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0; } function toString2(value) { return value == null ? "" : baseToString(value); } var assign2 = createAssigner(function(object2, source) { if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object2); return; } for (var key in source) { if (hasOwnProperty2.call(source, key)) { assignValue(object2, key, source[key]); } } }); var assignIn = createAssigner(function(object2, source) { copyObject(source, keysIn(source), object2); }); var assignInWith = createAssigner(function(object2, source, srcIndex, customizer) { copyObject(source, keysIn(source), object2, customizer); }); var assignWith = createAssigner(function(object2, source, srcIndex, customizer) { copyObject(source, keys(source), object2, customizer); }); var at2 = flatRest(baseAt); function create(prototype2, properties) { var result3 = baseCreate(prototype2); return properties == null ? result3 : baseAssign(result3, properties); } var defaults2 = baseRest(function(object2, sources) { object2 = Object2(object2); var index2 = -1; var length = sources.length; var guard = length > 2 ? sources[2] : undefined$1; if (guard && isIterateeCall(sources[0], sources[1], guard)) { length = 1; } while (++index2 < length) { var source = sources[index2]; var props = keysIn(source); var propsIndex = -1; var propsLength = props.length; while (++propsIndex < propsLength) { var key = props[propsIndex]; var value = object2[key]; if (value === undefined$1 || eq(value, objectProto[key]) && !hasOwnProperty2.call(object2, key)) { object2[key] = source[key]; } } } return object2; }); var defaultsDeep = baseRest(function(args) { args.push(undefined$1, customDefaultsMerge); return apply2(mergeWith, undefined$1, args); }); function findKey2(object2, predicate) { return baseFindKey(object2, getIteratee(predicate, 3), baseForOwn); } function findLastKey(object2, predicate) { return baseFindKey(object2, getIteratee(predicate, 3), baseForOwnRight); } function forIn(object2, iteratee2) { return object2 == null ? object2 : baseFor(object2, getIteratee(iteratee2, 3), keysIn); } function forInRight(object2, iteratee2) { return object2 == null ? object2 : baseForRight(object2, getIteratee(iteratee2, 3), keysIn); } function forOwn(object2, iteratee2) { return object2 && baseForOwn(object2, getIteratee(iteratee2, 3)); } function forOwnRight(object2, iteratee2) { return object2 && baseForOwnRight(object2, getIteratee(iteratee2, 3)); } function functions(object2) { return object2 == null ? [] : baseFunctions(object2, keys(object2)); } function functionsIn(object2) { return object2 == null ? [] : baseFunctions(object2, keysIn(object2)); } function get(object2, path, defaultValue) { var result3 = object2 == null ? undefined$1 : baseGet(object2, path); return result3 === undefined$1 ? defaultValue : result3; } function has(object2, path) { return object2 != null && hasPath(object2, path, baseHas); } function hasIn(object2, path) { return object2 != null && hasPath(object2, path, baseHasIn); } var invert = createInverter(function(result3, value, key) { if (value != null && typeof value.toString != "function") { value = nativeObjectToString.call(value); } result3[value] = key; }, constant(identity)); var invertBy = createInverter(function(result3, value, key) { if (value != null && typeof value.toString != "function") { value = nativeObjectToString.call(value); } if (hasOwnProperty2.call(result3, value)) { result3[value].push(key); } else { result3[value] = [key]; } }, getIteratee); var invoke = baseRest(baseInvoke); function keys(object2) { return isArrayLike(object2) ? arrayLikeKeys(object2) : baseKeys(object2); } function keysIn(object2) { return isArrayLike(object2) ? arrayLikeKeys(object2, true) : baseKeysIn(object2); } function mapKeys(object2, iteratee2) { var result3 = {}; iteratee2 = getIteratee(iteratee2, 3); baseForOwn(object2, function(value, key, object3) { baseAssignValue(result3, iteratee2(value, key, object3), value); }); return result3; } function mapValues(object2, iteratee2) { var result3 = {}; iteratee2 = getIteratee(iteratee2, 3); baseForOwn(object2, function(value, key, object3) { baseAssignValue(result3, key, iteratee2(value, key, object3)); }); return result3; } var merge2 = createAssigner(function(object2, source, srcIndex) { baseMerge(object2, source, srcIndex); }); var mergeWith = createAssigner(function(object2, source, srcIndex, customizer) { baseMerge(object2, source, srcIndex, customizer); }); var omit = flatRest(function(object2, paths) { var result3 = {}; if (object2 == null) { return result3; } var isDeep = false; paths = arrayMap(paths, function(path) { path = castPath(path, object2); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object2, getAllKeysIn(object2), result3); if (isDeep) { result3 = baseClone(result3, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result3, paths[length]); } return result3; }); function omitBy(object2, predicate) { return pickBy(object2, negate(getIteratee(predicate))); } var pick = flatRest(function(object2, paths) { return object2 == null ? {} : basePick(object2, paths); }); function pickBy(object2, predicate) { if (object2 == null) { return {}; } var props = arrayMap(getAllKeysIn(object2), function(prop) { return [prop]; }); predicate = getIteratee(predicate); return basePickBy(object2, props, function(value, path) { return predicate(value, path[0]); }); } function result2(object2, path, defaultValue) { path = castPath(path, object2); var index2 = -1, length = path.length; if (!length) { length = 1; object2 = undefined$1; } while (++index2 < length) { var value = object2 == null ? undefined$1 : object2[toKey(path[index2])]; if (value === undefined$1) { index2 = length; value = defaultValue; } object2 = isFunction2(value) ? value.call(object2) : value; } return object2; } function set2(object2, path, value) { return object2 == null ? object2 : baseSet(object2, path, value); } function setWith(object2, path, value, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return object2 == null ? object2 : baseSet(object2, path, value, customizer); } var toPairs = createToPairs(keys); var toPairsIn = createToPairs(keysIn); function transform(object2, iteratee2, accumulator) { var isArr = isArray2(object2), isArrLike = isArr || isBuffer2(object2) || isTypedArray2(object2); iteratee2 = getIteratee(iteratee2, 4); if (accumulator == null) { var Ctor = object2 && object2.constructor; if (isArrLike) { accumulator = isArr ? new Ctor() : []; } else if (isObject2(object2)) { accumulator = isFunction2(Ctor) ? baseCreate(getPrototype(object2)) : {}; } else { accumulator = {}; } } (isArrLike ? arrayEach : baseForOwn)(object2, function(value, index2, object3) { return iteratee2(accumulator, value, index2, object3); }); return accumulator; } function unset(object2, path) { return object2 == null ? true : baseUnset(object2, path); } function update(object2, path, updater) { return object2 == null ? object2 : baseUpdate(object2, path, castFunction(updater)); } function updateWith(object2, path, updater, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return object2 == null ? object2 : baseUpdate(object2, path, castFunction(updater), customizer); } function values(object2) { return object2 == null ? [] : baseValues(object2, keys(object2)); } function valuesIn(object2) { return object2 == null ? [] : baseValues(object2, keysIn(object2)); } function clamp(number2, lower, upper) { if (upper === undefined$1) { upper = lower; lower = undefined$1; } if (upper !== undefined$1) { upper = toNumber(upper); upper = upper === upper ? upper : 0; } if (lower !== undefined$1) { lower = toNumber(lower); lower = lower === lower ? lower : 0; } return baseClamp(toNumber(number2), lower, upper); } function inRange(number2, start, end) { start = toFinite(start); if (end === undefined$1) { end = start; start = 0; } else { end = toFinite(end); } number2 = toNumber(number2); return baseInRange(number2, start, end); } function random2(lower, upper, floating) { if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) { upper = floating = undefined$1; } if (floating === undefined$1) { if (typeof upper == "boolean") { floating = upper; upper = undefined$1; } else if (typeof lower == "boolean") { floating = lower; lower = undefined$1; } } if (lower === undefined$1 && upper === undefined$1) { lower = 0; upper = 1; } else { lower = toFinite(lower); if (upper === undefined$1) { upper = lower; lower = 0; } else { upper = toFinite(upper); } } if (lower > upper) { var temp = lower; lower = upper; upper = temp; } if (floating || lower % 1 || upper % 1) { var rand = nativeRandom(); return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper); } return baseRandom(lower, upper); } var camelCase = createCompounder(function(result3, word, index2) { word = word.toLowerCase(); return result3 + (index2 ? capitalize(word) : word); }); function capitalize(string) { return upperFirst(toString2(string).toLowerCase()); } function deburr(string) { string = toString2(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); } function endsWith2(string, target, position) { string = toString2(string); target = baseToString(target); var length = string.length; position = position === undefined$1 ? length : baseClamp(toInteger(position), 0, length); var end = position; position -= target.length; return position >= 0 && string.slice(position, end) == target; } function escape2(string) { string = toString2(string); return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string; } function escapeRegExp(string) { string = toString2(string); return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string; } var kebabCase = createCompounder(function(result3, word, index2) { return result3 + (index2 ? "-" : "") + word.toLowerCase(); }); var lowerCase = createCompounder(function(result3, word, index2) { return result3 + (index2 ? " " : "") + word.toLowerCase(); }); var lowerFirst = createCaseFirst("toLowerCase"); function pad(string, length, chars) { string = toString2(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; if (!length || strLength >= length) { return string; } var mid = (length - strLength) / 2; return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); } function padEnd(string, length, chars) { string = toString2(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; return length && strLength < length ? string + createPadding(length - strLength, chars) : string; } function padStart(string, length, chars) { string = toString2(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; return length && strLength < length ? createPadding(length - strLength, chars) + string : string; } function parseInt2(string, radix, guard) { if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } return nativeParseInt(toString2(string).replace(reTrimStart, ""), radix || 0); } function repeat2(string, n2, guard) { if (guard ? isIterateeCall(string, n2, guard) : n2 === undefined$1) { n2 = 1; } else { n2 = toInteger(n2); } return baseRepeat(toString2(string), n2); } function replace() { var args = arguments, string = toString2(args[0]); return args.length < 3 ? string : string.replace(args[1], args[2]); } var snakeCase = createCompounder(function(result3, word, index2) { return result3 + (index2 ? "_" : "") + word.toLowerCase(); }); function split(string, separator, limit) { if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) { separator = limit = undefined$1; } limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0; if (!limit) { return []; } string = toString2(string); if (string && (typeof separator == "string" || separator != null && !isRegExp2(separator))) { separator = baseToString(separator); if (!separator && hasUnicode(string)) { return castSlice(stringToArray(string), 0, limit); } } return string.split(separator, limit); } var startCase = createCompounder(function(result3, word, index2) { return result3 + (index2 ? " " : "") + upperFirst(word); }); function startsWith2(string, target, position) { string = toString2(string); position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); target = baseToString(target); return string.slice(position, position + target.length) == target; } function template(string, options2, guard) { var settings2 = lodash2.templateSettings; if (guard && isIterateeCall(string, options2, guard)) { options2 = undefined$1; } string = toString2(string); options2 = assignInWith({}, options2, settings2, customDefaultsAssignIn); var imports = assignInWith({}, options2.imports, settings2.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys); var isEscaping, isEvaluating, index2 = 0, interpolate = options2.interpolate || reNoMatch, source = "__p += '"; var reDelimiters = RegExp2( (options2.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options2.evaluate || reNoMatch).source + "|$", "g" ); var sourceURL = "//# sourceURL=" + (hasOwnProperty2.call(options2, "sourceURL") ? (options2.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n"; string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { interpolateValue || (interpolateValue = esTemplateValue); source += string.slice(index2, offset).replace(reUnescapedString, escapeStringChar); if (escapeValue) { isEscaping = true; source += "' +\n__e(" + escapeValue + ") +\n'"; } if (evaluateValue) { isEvaluating = true; source += "';\n" + evaluateValue + ";\n__p += '"; } if (interpolateValue) { source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; } index2 = offset + match.length; return match; }); source += "';\n"; var variable = hasOwnProperty2.call(options2, "variable") && options2.variable; if (!variable) { source = "with (obj) {\n" + source + "\n}\n"; } else if (reForbiddenIdentifierChars.test(variable)) { throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT); } source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;"); source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}"; var result3 = attempt(function() { return Function2(importsKeys, sourceURL + "return " + source).apply(undefined$1, importsValues); }); result3.source = source; if (isError(result3)) { throw result3; } return result3; } function toLower(value) { return toString2(value).toLowerCase(); } function toUpper(value) { return toString2(value).toUpperCase(); } function trim2(string, chars, guard) { string = toString2(string); if (string && (guard || chars === undefined$1)) { return baseTrim(string); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; return castSlice(strSymbols, start, end).join(""); } function trimEnd(string, chars, guard) { string = toString2(string); if (string && (guard || chars === undefined$1)) { return string.slice(0, trimmedEndIndex(string) + 1); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; return castSlice(strSymbols, 0, end).join(""); } function trimStart(string, chars, guard) { string = toString2(string); if (string && (guard || chars === undefined$1)) { return string.replace(reTrimStart, ""); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars)); return castSlice(strSymbols, start).join(""); } function truncate(string, options2) { var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; if (isObject2(options2)) { var separator = "separator" in options2 ? options2.separator : separator; length = "length" in options2 ? toInteger(options2.length) : length; omission = "omission" in options2 ? baseToString(options2.omission) : omission; } string = toString2(string); var strLength = string.length; if (hasUnicode(string)) { var strSymbols = stringToArray(string); strLength = strSymbols.length; } if (length >= strLength) { return string; } var end = length - stringSize(omission); if (end < 1) { return omission; } var result3 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end); if (separator === undefined$1) { return result3 + omission; } if (strSymbols) { end += result3.length - end; } if (isRegExp2(separator)) { if (string.slice(end).search(separator)) { var match, substring = result3; if (!separator.global) { separator = RegExp2(separator.source, toString2(reFlags.exec(separator)) + "g"); } separator.lastIndex = 0; while (match = separator.exec(substring)) { var newEnd = match.index; } result3 = result3.slice(0, newEnd === undefined$1 ? end : newEnd); } } else if (string.indexOf(baseToString(separator), end) != end) { var index2 = result3.lastIndexOf(separator); if (index2 > -1) { result3 = result3.slice(0, index2); } } return result3 + omission; } function unescape2(string) { string = toString2(string); return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string; } var upperCase = createCompounder(function(result3, word, index2) { return result3 + (index2 ? " " : "") + word.toUpperCase(); }); var upperFirst = createCaseFirst("toUpperCase"); function words(string, pattern2, guard) { string = toString2(string); pattern2 = guard ? undefined$1 : pattern2; if (pattern2 === undefined$1) { return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern2) || []; } var attempt = baseRest(function(func, args) { try { return apply2(func, undefined$1, args); } catch (e2) { return isError(e2) ? e2 : new Error2(e2); } }); var bindAll = flatRest(function(object2, methodNames) { arrayEach(methodNames, function(key) { key = toKey(key); baseAssignValue(object2, key, bind2(object2[key], object2)); }); return object2; }); function cond(pairs) { var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); pairs = !length ? [] : arrayMap(pairs, function(pair) { if (typeof pair[1] != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } return [toIteratee(pair[0]), pair[1]]; }); return baseRest(function(args) { var index2 = -1; while (++index2 < length) { var pair = pairs[index2]; if (apply2(pair[0], this, args)) { return apply2(pair[1], this, args); } } }); } function conforms(source) { return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); } function constant(value) { return function() { return value; }; } function defaultTo(value, defaultValue) { return value == null || value !== value ? defaultValue : value; } var flow = createFlow(); var flowRight = createFlow(true); function identity(value) { return value; } function iteratee(func) { return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG)); } function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); } function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); } var method = baseRest(function(path, args) { return function(object2) { return baseInvoke(object2, path, args); }; }); var methodOf = baseRest(function(object2, args) { return function(path) { return baseInvoke(object2, path, args); }; }); function mixin(object2, source, options2) { var props = keys(source), methodNames = baseFunctions(source, props); if (options2 == null && !(isObject2(source) && (methodNames.length || !props.length))) { options2 = source; source = object2; object2 = this; methodNames = baseFunctions(source, keys(source)); } var chain2 = !(isObject2(options2) && "chain" in options2) || !!options2.chain, isFunc = isFunction2(object2); arrayEach(methodNames, function(methodName) { var func = source[methodName]; object2[methodName] = func; if (isFunc) { object2.prototype[methodName] = function() { var chainAll = this.__chain__; if (chain2 || chainAll) { var result3 = object2(this.__wrapped__), actions = result3.__actions__ = copyArray(this.__actions__); actions.push({ "func": func, "args": arguments, "thisArg": object2 }); result3.__chain__ = chainAll; return result3; } return func.apply(object2, arrayPush([this.value()], arguments)); }; } }); return object2; } function noConflict() { if (root._ === this) { root._ = oldDash; } return this; } function noop2() { } function nthArg(n2) { n2 = toInteger(n2); return baseRest(function(args) { return baseNth(args, n2); }); } var over = createOver(arrayMap); var overEvery = createOver(arrayEvery); var overSome = createOver(arraySome); function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } function propertyOf(object2) { return function(path) { return object2 == null ? undefined$1 : baseGet(object2, path); }; } var range2 = createRange(); var rangeRight = createRange(true); function stubArray() { return []; } function stubFalse() { return false; } function stubObject() { return {}; } function stubString() { return ""; } function stubTrue() { return true; } function times2(n2, iteratee2) { n2 = toInteger(n2); if (n2 < 1 || n2 > MAX_SAFE_INTEGER) { return []; } var index2 = MAX_ARRAY_LENGTH, length = nativeMin(n2, MAX_ARRAY_LENGTH); iteratee2 = getIteratee(iteratee2); n2 -= MAX_ARRAY_LENGTH; var result3 = baseTimes(length, iteratee2); while (++index2 < n2) { iteratee2(index2); } return result3; } function toPath(value) { if (isArray2(value)) { return arrayMap(value, toKey); } return isSymbol(value) ? [value] : copyArray(stringToPath(toString2(value))); } function uniqueId(prefix) { var id = ++idCounter; return toString2(prefix) + id; } var add = createMathOperation(function(augend, addend) { return augend + addend; }, 0); var ceil = createRound("ceil"); var divide2 = createMathOperation(function(dividend, divisor) { return dividend / divisor; }, 1); var floor = createRound("floor"); function max(array2) { return array2 && array2.length ? baseExtremum(array2, identity, baseGt) : undefined$1; } function maxBy(array2, iteratee2) { return array2 && array2.length ? baseExtremum(array2, getIteratee(iteratee2, 2), baseGt) : undefined$1; } function mean(array2) { return baseMean(array2, identity); } function meanBy(array2, iteratee2) { return baseMean(array2, getIteratee(iteratee2, 2)); } function min(array2) { return array2 && array2.length ? baseExtremum(array2, identity, baseLt) : undefined$1; } function minBy(array2, iteratee2) { return array2 && array2.length ? baseExtremum(array2, getIteratee(iteratee2, 2), baseLt) : undefined$1; } var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; }, 1); var round2 = createRound("round"); var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; }, 0); function sum(array2) { return array2 && array2.length ? baseSum(array2, identity) : 0; } function sumBy(array2, iteratee2) { return array2 && array2.length ? baseSum(array2, getIteratee(iteratee2, 2)) : 0; } lodash2.after = after; lodash2.ary = ary; lodash2.assign = assign2; lodash2.assignIn = assignIn; lodash2.assignInWith = assignInWith; lodash2.assignWith = assignWith; lodash2.at = at2; lodash2.before = before; lodash2.bind = bind2; lodash2.bindAll = bindAll; lodash2.bindKey = bindKey; lodash2.castArray = castArray; lodash2.chain = chain; lodash2.chunk = chunk; lodash2.compact = compact; lodash2.concat = concat; lodash2.cond = cond; lodash2.conforms = conforms; lodash2.constant = constant; lodash2.countBy = countBy; lodash2.create = create; lodash2.curry = curry; lodash2.curryRight = curryRight; lodash2.debounce = debounce; lodash2.defaults = defaults2; lodash2.defaultsDeep = defaultsDeep; lodash2.defer = defer; lodash2.delay = delay; lodash2.difference = difference; lodash2.differenceBy = differenceBy; lodash2.differenceWith = differenceWith; lodash2.drop = drop; lodash2.dropRight = dropRight; lodash2.dropRightWhile = dropRightWhile; lodash2.dropWhile = dropWhile; lodash2.fill = fill; lodash2.filter = filter; lodash2.flatMap = flatMap; lodash2.flatMapDeep = flatMapDeep; lodash2.flatMapDepth = flatMapDepth; lodash2.flatten = flatten; lodash2.flattenDeep = flattenDeep; lodash2.flattenDepth = flattenDepth; lodash2.flip = flip; lodash2.flow = flow; lodash2.flowRight = flowRight; lodash2.fromPairs = fromPairs; lodash2.functions = functions; lodash2.functionsIn = functionsIn; lodash2.groupBy = groupBy; lodash2.initial = initial; lodash2.intersection = intersection; lodash2.intersectionBy = intersectionBy; lodash2.intersectionWith = intersectionWith; lodash2.invert = invert; lodash2.invertBy = invertBy; lodash2.invokeMap = invokeMap; lodash2.iteratee = iteratee; lodash2.keyBy = keyBy; lodash2.keys = keys; lodash2.keysIn = keysIn; lodash2.map = map; lodash2.mapKeys = mapKeys; lodash2.mapValues = mapValues; lodash2.matches = matches; lodash2.matchesProperty = matchesProperty; lodash2.memoize = memoize; lodash2.merge = merge2; lodash2.mergeWith = mergeWith; lodash2.method = method; lodash2.methodOf = methodOf; lodash2.mixin = mixin; lodash2.negate = negate; lodash2.nthArg = nthArg; lodash2.omit = omit; lodash2.omitBy = omitBy; lodash2.once = once; lodash2.orderBy = orderBy; lodash2.over = over; lodash2.overArgs = overArgs; lodash2.overEvery = overEvery; lodash2.overSome = overSome; lodash2.partial = partial; lodash2.partialRight = partialRight; lodash2.partition = partition; lodash2.pick = pick; lodash2.pickBy = pickBy; lodash2.property = property; lodash2.propertyOf = propertyOf; lodash2.pull = pull; lodash2.pullAll = pullAll; lodash2.pullAllBy = pullAllBy; lodash2.pullAllWith = pullAllWith; lodash2.pullAt = pullAt; lodash2.range = range2; lodash2.rangeRight = rangeRight; lodash2.rearg = rearg; lodash2.reject = reject; lodash2.remove = remove; lodash2.rest = rest; lodash2.reverse = reverse; lodash2.sampleSize = sampleSize; lodash2.set = set2; lodash2.setWith = setWith; lodash2.shuffle = shuffle; lodash2.slice = slice; lodash2.sortBy = sortBy; lodash2.sortedUniq = sortedUniq; lodash2.sortedUniqBy = sortedUniqBy; lodash2.split = split; lodash2.spread = spread2; lodash2.tail = tail; lodash2.take = take; lodash2.takeRight = takeRight; lodash2.takeRightWhile = takeRightWhile; lodash2.takeWhile = takeWhile; lodash2.tap = tap; lodash2.throttle = throttle2; lodash2.thru = thru; lodash2.toArray = toArray2; lodash2.toPairs = toPairs; lodash2.toPairsIn = toPairsIn; lodash2.toPath = toPath; lodash2.toPlainObject = toPlainObject; lodash2.transform = transform; lodash2.unary = unary; lodash2.union = union; lodash2.unionBy = unionBy; lodash2.unionWith = unionWith; lodash2.uniq = uniq; lodash2.uniqBy = uniqBy; lodash2.uniqWith = uniqWith; lodash2.unset = unset; lodash2.unzip = unzip; lodash2.unzipWith = unzipWith; lodash2.update = update; lodash2.updateWith = updateWith; lodash2.values = values; lodash2.valuesIn = valuesIn; lodash2.without = without; lodash2.words = words; lodash2.wrap = wrap; lodash2.xor = xor; lodash2.xorBy = xorBy; lodash2.xorWith = xorWith; lodash2.zip = zip; lodash2.zipObject = zipObject; lodash2.zipObjectDeep = zipObjectDeep; lodash2.zipWith = zipWith; lodash2.entries = toPairs; lodash2.entriesIn = toPairsIn; lodash2.extend = assignIn; lodash2.extendWith = assignInWith; mixin(lodash2, lodash2); lodash2.add = add; lodash2.attempt = attempt; lodash2.camelCase = camelCase; lodash2.capitalize = capitalize; lodash2.ceil = ceil; lodash2.clamp = clamp; lodash2.clone = clone2; lodash2.cloneDeep = cloneDeep2; lodash2.cloneDeepWith = cloneDeepWith; lodash2.cloneWith = cloneWith; lodash2.conformsTo = conformsTo; lodash2.deburr = deburr; lodash2.defaultTo = defaultTo; lodash2.divide = divide2; lodash2.endsWith = endsWith2; lodash2.eq = eq; lodash2.escape = escape2; lodash2.escapeRegExp = escapeRegExp; lodash2.every = every; lodash2.find = find; lodash2.findIndex = findIndex; lodash2.findKey = findKey2; lodash2.findLast = findLast; lodash2.findLastIndex = findLastIndex; lodash2.findLastKey = findLastKey; lodash2.floor = floor; lodash2.forEach = forEach2; lodash2.forEachRight = forEachRight; lodash2.forIn = forIn; lodash2.forInRight = forInRight; lodash2.forOwn = forOwn; lodash2.forOwnRight = forOwnRight; lodash2.get = get; lodash2.gt = gt2; lodash2.gte = gte; lodash2.has = has; lodash2.hasIn = hasIn; lodash2.head = head; lodash2.identity = identity; lodash2.includes = includes; lodash2.indexOf = indexOf; lodash2.inRange = inRange; lodash2.invoke = invoke; lodash2.isArguments = isArguments; lodash2.isArray = isArray2; lodash2.isArrayBuffer = isArrayBuffer2; lodash2.isArrayLike = isArrayLike; lodash2.isArrayLikeObject = isArrayLikeObject; lodash2.isBoolean = isBoolean2; lodash2.isBuffer = isBuffer2; lodash2.isDate = isDate2; lodash2.isElement = isElement; lodash2.isEmpty = isEmpty; lodash2.isEqual = isEqual; lodash2.isEqualWith = isEqualWith; lodash2.isError = isError; lodash2.isFinite = isFinite2; lodash2.isFunction = isFunction2; lodash2.isInteger = isInteger; lodash2.isLength = isLength; lodash2.isMap = isMap; lodash2.isMatch = isMatch; lodash2.isMatchWith = isMatchWith; lodash2.isNaN = isNaN2; lodash2.isNative = isNative; lodash2.isNil = isNil; lodash2.isNull = isNull; lodash2.isNumber = isNumber2; lodash2.isObject = isObject2; lodash2.isObjectLike = isObjectLike; lodash2.isPlainObject = isPlainObject2; lodash2.isRegExp = isRegExp2; lodash2.isSafeInteger = isSafeInteger; lodash2.isSet = isSet; lodash2.isString = isString2; lodash2.isSymbol = isSymbol; lodash2.isTypedArray = isTypedArray2; lodash2.isUndefined = isUndefined2; lodash2.isWeakMap = isWeakMap; lodash2.isWeakSet = isWeakSet; lodash2.join = join; lodash2.kebabCase = kebabCase; lodash2.last = last; lodash2.lastIndexOf = lastIndexOf; lodash2.lowerCase = lowerCase; lodash2.lowerFirst = lowerFirst; lodash2.lt = lt2; lodash2.lte = lte; lodash2.max = max; lodash2.maxBy = maxBy; lodash2.mean = mean; lodash2.meanBy = meanBy; lodash2.min = min; lodash2.minBy = minBy; lodash2.stubArray = stubArray; lodash2.stubFalse = stubFalse; lodash2.stubObject = stubObject; lodash2.stubString = stubString; lodash2.stubTrue = stubTrue; lodash2.multiply = multiply; lodash2.nth = nth; lodash2.noConflict = noConflict; lodash2.noop = noop2; lodash2.now = now2; lodash2.pad = pad; lodash2.padEnd = padEnd; lodash2.padStart = padStart; lodash2.parseInt = parseInt2; lodash2.random = random2; lodash2.reduce = reduce; lodash2.reduceRight = reduceRight; lodash2.repeat = repeat2; lodash2.replace = replace; lodash2.result = result2; lodash2.round = round2; lodash2.runInContext = runInContext2; lodash2.sample = sample; lodash2.size = size; lodash2.snakeCase = snakeCase; lodash2.some = some; lodash2.sortedIndex = sortedIndex; lodash2.sortedIndexBy = sortedIndexBy; lodash2.sortedIndexOf = sortedIndexOf; lodash2.sortedLastIndex = sortedLastIndex; lodash2.sortedLastIndexBy = sortedLastIndexBy; lodash2.sortedLastIndexOf = sortedLastIndexOf; lodash2.startCase = startCase; lodash2.startsWith = startsWith2; lodash2.subtract = subtract; lodash2.sum = sum; lodash2.sumBy = sumBy; lodash2.template = template; lodash2.times = times2; lodash2.toFinite = toFinite; lodash2.toInteger = toInteger; lodash2.toLength = toLength; lodash2.toLower = toLower; lodash2.toNumber = toNumber; lodash2.toSafeInteger = toSafeInteger; lodash2.toString = toString2; lodash2.toUpper = toUpper; lodash2.trim = trim2; lodash2.trimEnd = trimEnd; lodash2.trimStart = trimStart; lodash2.truncate = truncate; lodash2.unescape = unescape2; lodash2.uniqueId = uniqueId; lodash2.upperCase = upperCase; lodash2.upperFirst = upperFirst; lodash2.each = forEach2; lodash2.eachRight = forEachRight; lodash2.first = head; mixin(lodash2, function() { var source = {}; baseForOwn(lodash2, function(func, methodName) { if (!hasOwnProperty2.call(lodash2.prototype, methodName)) { source[methodName] = func; } }); return source; }(), { "chain": false }); lodash2.VERSION = VERSION2; arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) { lodash2[methodName].placeholder = lodash2; }); arrayEach(["drop", "take"], function(methodName, index2) { LazyWrapper.prototype[methodName] = function(n2) { n2 = n2 === undefined$1 ? 1 : nativeMax(toInteger(n2), 0); var result3 = this.__filtered__ && !index2 ? new LazyWrapper(this) : this.clone(); if (result3.__filtered__) { result3.__takeCount__ = nativeMin(n2, result3.__takeCount__); } else { result3.__views__.push({ "size": nativeMin(n2, MAX_ARRAY_LENGTH), "type": methodName + (result3.__dir__ < 0 ? "Right" : "") }); } return result3; }; LazyWrapper.prototype[methodName + "Right"] = function(n2) { return this.reverse()[methodName](n2).reverse(); }; }); arrayEach(["filter", "map", "takeWhile"], function(methodName, index2) { var type = index2 + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; LazyWrapper.prototype[methodName] = function(iteratee2) { var result3 = this.clone(); result3.__iteratees__.push({ "iteratee": getIteratee(iteratee2, 3), "type": type }); result3.__filtered__ = result3.__filtered__ || isFilter; return result3; }; }); arrayEach(["head", "last"], function(methodName, index2) { var takeName = "take" + (index2 ? "Right" : ""); LazyWrapper.prototype[methodName] = function() { return this[takeName](1).value()[0]; }; }); arrayEach(["initial", "tail"], function(methodName, index2) { var dropName = "drop" + (index2 ? "" : "Right"); LazyWrapper.prototype[methodName] = function() { return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); }; }); LazyWrapper.prototype.compact = function() { return this.filter(identity); }; LazyWrapper.prototype.find = function(predicate) { return this.filter(predicate).head(); }; LazyWrapper.prototype.findLast = function(predicate) { return this.reverse().find(predicate); }; LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { if (typeof path == "function") { return new LazyWrapper(this); } return this.map(function(value) { return baseInvoke(value, path, args); }); }); LazyWrapper.prototype.reject = function(predicate) { return this.filter(negate(getIteratee(predicate))); }; LazyWrapper.prototype.slice = function(start, end) { start = toInteger(start); var result3 = this; if (result3.__filtered__ && (start > 0 || end < 0)) { return new LazyWrapper(result3); } if (start < 0) { result3 = result3.takeRight(-start); } else if (start) { result3 = result3.drop(start); } if (end !== undefined$1) { end = toInteger(end); result3 = end < 0 ? result3.dropRight(-end) : result3.take(end - start); } return result3; }; LazyWrapper.prototype.takeRightWhile = function(predicate) { return this.reverse().takeWhile(predicate).reverse(); }; LazyWrapper.prototype.toArray = function() { return this.take(MAX_ARRAY_LENGTH); }; baseForOwn(LazyWrapper.prototype, function(func, methodName) { var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash2[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName); if (!lodashFunc) { return; } lodash2.prototype[methodName] = function() { var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray2(value); var interceptor = function(value2) { var result4 = lodashFunc.apply(lodash2, arrayPush([value2], args)); return isTaker && chainAll ? result4[0] : result4; }; if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) { isLazy = useLazy = false; } var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid; if (!retUnwrapped && useLazy) { value = onlyLazy ? value : new LazyWrapper(this); var result3 = func.apply(value, args); result3.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined$1 }); return new LodashWrapper(result3, chainAll); } if (isUnwrapped && onlyLazy) { return func.apply(this, args); } result3 = this.thru(interceptor); return isUnwrapped ? isTaker ? result3.value()[0] : result3.value() : result3; }; }); arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) { var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName); lodash2.prototype[methodName] = function() { var args = arguments; if (retUnwrapped && !this.__chain__) { var value = this.value(); return func.apply(isArray2(value) ? value : [], args); } return this[chainName](function(value2) { return func.apply(isArray2(value2) ? value2 : [], args); }); }; }); baseForOwn(LazyWrapper.prototype, function(func, methodName) { var lodashFunc = lodash2[methodName]; if (lodashFunc) { var key = lodashFunc.name + ""; if (!hasOwnProperty2.call(realNames, key)) { realNames[key] = []; } realNames[key].push({ "name": methodName, "func": lodashFunc }); } }); realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{ "name": "wrapper", "func": undefined$1 }]; LazyWrapper.prototype.clone = lazyClone; LazyWrapper.prototype.reverse = lazyReverse; LazyWrapper.prototype.value = lazyValue; lodash2.prototype.at = wrapperAt; lodash2.prototype.chain = wrapperChain; lodash2.prototype.commit = wrapperCommit; lodash2.prototype.next = wrapperNext; lodash2.prototype.plant = wrapperPlant; lodash2.prototype.reverse = wrapperReverse; lodash2.prototype.toJSON = lodash2.prototype.valueOf = lodash2.prototype.value = wrapperValue; lodash2.prototype.first = lodash2.prototype.head; if (symIterator) { lodash2.prototype[symIterator] = wrapperToIterator; } return lodash2; }; var _2 = runInContext(); if (freeModule) { (freeModule.exports = _2)._ = _2; freeExports._ = _2; } else { root._ = _2; } }).call(commonjsGlobal); })(lodash, lodash.exports); var lodashExports = lodash.exports; const _$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports); /*! * @intlify/shared v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const inBrowser = typeof window !== "undefined"; let mark; let measure; { const perf2 = inBrowser && window.performance; if (perf2 && perf2.mark && perf2.measure && perf2.clearMarks && perf2.clearMeasures) { mark = (tag) => perf2.mark(tag); measure = (name2, startTag, endTag) => { perf2.measure(name2, startTag, endTag); perf2.clearMarks(startTag); perf2.clearMarks(endTag); }; } } const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g; function format(message, ...args) { if (args.length === 1 && isObject$5(args[0])) { args = args[0]; } if (!args || !args.hasOwnProperty) { args = {}; } return message.replace(RE_ARGS, (match, identifier) => { return args.hasOwnProperty(identifier) ? args[identifier] : ""; }); } const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; const makeSymbol = (name2) => hasSymbol ? Symbol(name2) : name2; const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source }); const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"); const isNumber$1 = (val) => typeof val === "number" && isFinite(val); const isDate$1 = (val) => toTypeString(val) === "[object Date]"; const isRegExp$1 = (val) => toTypeString(val) === "[object RegExp]"; const isEmptyObject = (val) => isPlainObject$1(val) && Object.keys(val).length === 0; function warn(msg, err) { if (typeof console !== "undefined") { console.warn(`[intlify] ` + msg); if (err) { console.warn(err.stack); } } } const assign = Object.assign; let _globalThis; const getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; function escapeHtml(rawText) { return rawText.replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); } const hasOwnProperty$3 = Object.prototype.hasOwnProperty; function hasOwn$2(obj, key) { return hasOwnProperty$3.call(obj, key); } const isArray$2 = Array.isArray; const isFunction$1 = (val) => typeof val === "function"; const isString$1 = (val) => typeof val === "string"; const isBoolean$1 = (val) => typeof val === "boolean"; const isObject$5 = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]"; const toDisplayString = (val) => { return val == null ? "" : isArray$2(val) || isPlainObject$1(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val); }; const RANGE = 2; function generateCodeFrame(source, start = 0, end = source.length) { const lines = source.split(/\r?\n/); let count = 0; const res = []; for (let i2 = 0; i2 < lines.length; i2++) { count += lines[i2].length + 1; if (count >= start) { for (let j2 = i2 - RANGE; j2 <= i2 + RANGE || end > count; j2++) { if (j2 < 0 || j2 >= lines.length) continue; const line = j2 + 1; res.push(`${line}${" ".repeat(3 - String(line).length)}| ${lines[j2]}`); const lineLength = lines[j2].length; if (j2 === i2) { const pad = start - (count - lineLength) + 1; const length = Math.max(1, end > count ? lineLength - pad : end - start); res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); } else if (j2 > i2) { if (end > count) { const length = Math.max(Math.min(end - count, lineLength), 1); res.push(` | ` + "^".repeat(length)); } count += lineLength + 1; } } break; } } return res.join("\n"); } function createEmitter() { const events = /* @__PURE__ */ new Map(); const emitter = { events, on(event, handler) { const handlers = events.get(event); const added = handlers && handlers.push(handler); if (!added) { events.set(event, [handler]); } }, off(event, handler) { const handlers = events.get(event); if (handlers) { handlers.splice(handlers.indexOf(handler) >>> 0, 1); } }, emit(event, payload) { (events.get(event) || []).slice().map((handler) => handler(payload)); (events.get("*") || []).slice().map((handler) => handler(event, payload)); } }; return emitter; } /*! * @intlify/message-resolver v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const hasOwnProperty$2 = Object.prototype.hasOwnProperty; function hasOwn$1(obj, key) { return hasOwnProperty$2.call(obj, key); } const isObject$4 = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const pathStateMachine = []; pathStateMachine[ 0 /* BEFORE_PATH */ ] = { [ "w" /* WORKSPACE */ ]: [ 0 /* BEFORE_PATH */ ], [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4 /* IN_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7 /* AFTER_PATH */ ] }; pathStateMachine[ 1 /* IN_PATH */ ] = { [ "w" /* WORKSPACE */ ]: [ 1 /* IN_PATH */ ], [ "." /* DOT */ ]: [ 2 /* BEFORE_IDENT */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4 /* IN_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7 /* AFTER_PATH */ ] }; pathStateMachine[ 2 /* BEFORE_IDENT */ ] = { [ "w" /* WORKSPACE */ ]: [ 2 /* BEFORE_IDENT */ ], [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "0" /* ZERO */ ]: [ 3, 0 /* APPEND */ ] }; pathStateMachine[ 3 /* IN_IDENT */ ] = { [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "0" /* ZERO */ ]: [ 3, 0 /* APPEND */ ], [ "w" /* WORKSPACE */ ]: [ 1, 1 /* PUSH */ ], [ "." /* DOT */ ]: [ 2, 1 /* PUSH */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4, 1 /* PUSH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7, 1 /* PUSH */ ] }; pathStateMachine[ 4 /* IN_SUB_PATH */ ] = { [ "'" /* SINGLE_QUOTE */ ]: [ 5, 0 /* APPEND */ ], [ '"' /* DOUBLE_QUOTE */ ]: [ 6, 0 /* APPEND */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4, 2 /* INC_SUB_PATH_DEPTH */ ], [ "]" /* RIGHT_BRACKET */ ]: [ 1, 3 /* PUSH_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 4, 0 /* APPEND */ ] }; pathStateMachine[ 5 /* IN_SINGLE_QUOTE */ ] = { [ "'" /* SINGLE_QUOTE */ ]: [ 4, 0 /* APPEND */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 5, 0 /* APPEND */ ] }; pathStateMachine[ 6 /* IN_DOUBLE_QUOTE */ ] = { [ '"' /* DOUBLE_QUOTE */ ]: [ 4, 0 /* APPEND */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 6, 0 /* APPEND */ ] }; const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; function isLiteral(exp) { return literalValueRE.test(exp); } function stripQuotes(str) { const a2 = str.charCodeAt(0); const b2 = str.charCodeAt(str.length - 1); return a2 === b2 && (a2 === 34 || a2 === 39) ? str.slice(1, -1) : str; } function getPathCharType(ch) { if (ch === void 0 || ch === null) { return "o"; } const code2 = ch.charCodeAt(0); switch (code2) { case 91: case 93: case 46: case 34: case 39: return ch; case 95: case 36: case 45: return "i"; case 9: case 10: case 13: case 160: case 65279: case 8232: case 8233: return "w"; } return "i"; } function formatSubPath(path) { const trimmed = path.trim(); if (path.charAt(0) === "0" && isNaN(parseInt(path))) { return false; } return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed; } function parse$2(path) { const keys = []; let index2 = -1; let mode = 0; let subPathDepth = 0; let c2; let key; let newChar; let type; let transition; let action; let typeMap; const actions = []; actions[ 0 /* APPEND */ ] = () => { if (key === void 0) { key = newChar; } else { key += newChar; } }; actions[ 1 /* PUSH */ ] = () => { if (key !== void 0) { keys.push(key); key = void 0; } }; actions[ 2 /* INC_SUB_PATH_DEPTH */ ] = () => { actions[ 0 /* APPEND */ ](); subPathDepth++; }; actions[ 3 /* PUSH_SUB_PATH */ ] = () => { if (subPathDepth > 0) { subPathDepth--; mode = 4; actions[ 0 /* APPEND */ ](); } else { subPathDepth = 0; if (key === void 0) { return false; } key = formatSubPath(key); if (key === false) { return false; } else { actions[ 1 /* PUSH */ ](); } } }; function maybeUnescapeQuote() { const nextChar = path[index2 + 1]; if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') { index2++; newChar = "\\" + nextChar; actions[ 0 /* APPEND */ ](); return true; } } while (mode !== null) { index2++; c2 = path[index2]; if (c2 === "\\" && maybeUnescapeQuote()) { continue; } type = getPathCharType(c2); typeMap = pathStateMachine[mode]; transition = typeMap[type] || typeMap[ "l" /* ELSE */ ] || 8; if (transition === 8) { return; } mode = transition[0]; if (transition[1] !== void 0) { action = actions[transition[1]]; if (action) { newChar = c2; if (action() === false) { return; } } } if (mode === 7) { return keys; } } } const cache = /* @__PURE__ */ new Map(); function resolveValue(obj, path) { if (!isObject$4(obj)) { return null; } let hit = cache.get(path); if (!hit) { hit = parse$2(path); if (hit) { cache.set(path, hit); } } if (!hit) { return null; } const len = hit.length; let last = obj; let i2 = 0; while (i2 < len) { const val = last[hit[i2]]; if (val === void 0) { return null; } last = val; i2++; } return last; } function handleFlatJson(obj) { if (!isObject$4(obj)) { return obj; } for (const key in obj) { if (!hasOwn$1(obj, key)) { continue; } if (!key.includes( "." /* DOT */ )) { if (isObject$4(obj[key])) { handleFlatJson(obj[key]); } } else { const subKeys = key.split( "." /* DOT */ ); const lastIndex = subKeys.length - 1; let currentObj = obj; for (let i2 = 0; i2 < lastIndex; i2++) { if (!(subKeys[i2] in currentObj)) { currentObj[subKeys[i2]] = {}; } currentObj = currentObj[subKeys[i2]]; } currentObj[subKeys[lastIndex]] = obj[key]; delete obj[key]; if (isObject$4(currentObj[subKeys[lastIndex]])) { handleFlatJson(currentObj[subKeys[lastIndex]]); } } } return obj; } /*! * @intlify/runtime v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const DEFAULT_MODIFIER = (str) => str; const DEFAULT_MESSAGE = (ctx) => ""; const DEFAULT_MESSAGE_DATA_TYPE = "text"; const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join(""); const DEFAULT_INTERPOLATE = toDisplayString; function pluralDefault(choice, choicesLength) { choice = Math.abs(choice); if (choicesLength === 2) { return choice ? choice > 1 ? 1 : 0 : 1; } return choice ? Math.min(choice, 2) : 0; } function getPluralIndex(options2) { const index2 = isNumber$1(options2.pluralIndex) ? options2.pluralIndex : -1; return options2.named && (isNumber$1(options2.named.count) || isNumber$1(options2.named.n)) ? isNumber$1(options2.named.count) ? options2.named.count : isNumber$1(options2.named.n) ? options2.named.n : index2 : index2; } function normalizeNamed(pluralIndex, props) { if (!props.count) { props.count = pluralIndex; } if (!props.n) { props.n = pluralIndex; } } function createMessageContext(options2 = {}) { const locale = options2.locale; const pluralIndex = getPluralIndex(options2); const pluralRule = isObject$5(options2.pluralRules) && isString$1(locale) && isFunction$1(options2.pluralRules[locale]) ? options2.pluralRules[locale] : pluralDefault; const orgPluralRule = isObject$5(options2.pluralRules) && isString$1(locale) && isFunction$1(options2.pluralRules[locale]) ? pluralDefault : void 0; const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)]; const _list = options2.list || []; const list = (index2) => _list[index2]; const _named = options2.named || {}; isNumber$1(options2.pluralIndex) && normalizeNamed(pluralIndex, _named); const named = (key) => _named[key]; function message(key) { const msg = isFunction$1(options2.messages) ? options2.messages(key) : isObject$5(options2.messages) ? options2.messages[key] : false; return !msg ? options2.parent ? options2.parent.message(key) : DEFAULT_MESSAGE : msg; } const _modifier = (name2) => options2.modifiers ? options2.modifiers[name2] : DEFAULT_MODIFIER; const normalize = isPlainObject$1(options2.processor) && isFunction$1(options2.processor.normalize) ? options2.processor.normalize : DEFAULT_NORMALIZE; const interpolate = isPlainObject$1(options2.processor) && isFunction$1(options2.processor.interpolate) ? options2.processor.interpolate : DEFAULT_INTERPOLATE; const type = isPlainObject$1(options2.processor) && isString$1(options2.processor.type) ? options2.processor.type : DEFAULT_MESSAGE_DATA_TYPE; const ctx = { [ "list" /* LIST */ ]: list, [ "named" /* NAMED */ ]: named, [ "plural" /* PLURAL */ ]: plural, [ "linked" /* LINKED */ ]: (key, modifier) => { const msg = message(key)(ctx); return isString$1(modifier) ? _modifier(modifier)(msg) : msg; }, [ "message" /* MESSAGE */ ]: message, [ "type" /* TYPE */ ]: type, [ "interpolate" /* INTERPOLATE */ ]: interpolate, [ "normalize" /* NORMALIZE */ ]: normalize }; return ctx; } /*! * @intlify/message-compiler v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const errorMessages$2 = { // tokenizer error messages [ 0 /* EXPECTED_TOKEN */ ]: `Expected token: '{0}'`, [ 1 /* INVALID_TOKEN_IN_PLACEHOLDER */ ]: `Invalid token in placeholder: '{0}'`, [ 2 /* UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER */ ]: `Unterminated single quote in placeholder`, [ 3 /* UNKNOWN_ESCAPE_SEQUENCE */ ]: `Unknown escape sequence: \\{0}`, [ 4 /* INVALID_UNICODE_ESCAPE_SEQUENCE */ ]: `Invalid unicode escape sequence: {0}`, [ 5 /* UNBALANCED_CLOSING_BRACE */ ]: `Unbalanced closing brace`, [ 6 /* UNTERMINATED_CLOSING_BRACE */ ]: `Unterminated closing brace`, [ 7 /* EMPTY_PLACEHOLDER */ ]: `Empty placeholder`, [ 8 /* NOT_ALLOW_NEST_PLACEHOLDER */ ]: `Not allowed nest placeholder`, [ 9 /* INVALID_LINKED_FORMAT */ ]: `Invalid linked format`, // parser error messages [ 10 /* MUST_HAVE_MESSAGES_IN_PLURAL */ ]: `Plural must have messages`, [ 11 /* UNEXPECTED_EMPTY_LINKED_MODIFIER */ ]: `Unexpected empty linked modifier`, [ 12 /* UNEXPECTED_EMPTY_LINKED_KEY */ ]: `Unexpected empty linked key`, [ 13 /* UNEXPECTED_LEXICAL_ANALYSIS */ ]: `Unexpected lexical analysis in token: '{0}'` }; function createCompileError(code2, loc, options2 = {}) { const { domain, messages: messages2, args } = options2; const msg = format((messages2 || errorMessages$2)[code2] || "", ...args || []); const error2 = new SyntaxError(String(msg)); error2.code = code2; if (loc) { error2.location = loc; } error2.domain = domain; return error2; } /*! * @intlify/devtools-if v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const IntlifyDevToolsHooks = { I18nInit: "i18n:init", FunctionTranslate: "function:translate" }; /*! * @intlify/core-base v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ let devtools = null; function setDevToolsHook(hook) { devtools = hook; } function initI18nDevTools(i18n2, version, meta) { devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, { timestamp: Date.now(), i18n: i18n2, version, meta }); } const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate); function createDevToolsHook(hook) { return (payloads) => devtools && devtools.emit(hook, payloads); } const warnMessages$1 = { [ 0 /* NOT_FOUND_KEY */ ]: `Not found '{key}' key in '{locale}' locale messages.`, [ 1 /* FALLBACK_TO_TRANSLATE */ ]: `Fall back to translate '{key}' key with '{target}' locale.`, [ 2 /* CANNOT_FORMAT_NUMBER */ ]: `Cannot format a number value due to not supported Intl.NumberFormat.`, [ 3 /* FALLBACK_TO_NUMBER_FORMAT */ ]: `Fall back to number format '{key}' key with '{target}' locale.`, [ 4 /* CANNOT_FORMAT_DATE */ ]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`, [ 5 /* FALLBACK_TO_DATE_FORMAT */ ]: `Fall back to datetime format '{key}' key with '{target}' locale.` }; function getWarnMessage$1(code2, ...args) { return format(warnMessages$1[code2], ...args); } const VERSION$2 = "9.1.9"; const NOT_REOSLVED = -1; const MISSING_RESOLVE_VALUE = ""; function getDefaultLinkedModifiers() { return { upper: (val) => isString$1(val) ? val.toUpperCase() : val, lower: (val) => isString$1(val) ? val.toLowerCase() : val, // prettier-ignore capitalize: (val) => isString$1(val) ? `${val.charAt(0).toLocaleUpperCase()}${val.substr(1)}` : val }; } let _compiler; let _additionalMeta = null; const setAdditionalMeta = (meta) => { _additionalMeta = meta; }; const getAdditionalMeta = () => _additionalMeta; let _cid = 0; function createCoreContext(options2 = {}) { const version = isString$1(options2.version) ? options2.version : VERSION$2; const locale = isString$1(options2.locale) ? options2.locale : "en-US"; const fallbackLocale = isArray$2(options2.fallbackLocale) || isPlainObject$1(options2.fallbackLocale) || isString$1(options2.fallbackLocale) || options2.fallbackLocale === false ? options2.fallbackLocale : locale; const messages2 = isPlainObject$1(options2.messages) ? options2.messages : { [locale]: {} }; const datetimeFormats = isPlainObject$1(options2.datetimeFormats) ? options2.datetimeFormats : { [locale]: {} }; const numberFormats = isPlainObject$1(options2.numberFormats) ? options2.numberFormats : { [locale]: {} }; const modifiers = assign({}, options2.modifiers || {}, getDefaultLinkedModifiers()); const pluralRules = options2.pluralRules || {}; const missing = isFunction$1(options2.missing) ? options2.missing : null; const missingWarn = isBoolean$1(options2.missingWarn) || isRegExp$1(options2.missingWarn) ? options2.missingWarn : true; const fallbackWarn = isBoolean$1(options2.fallbackWarn) || isRegExp$1(options2.fallbackWarn) ? options2.fallbackWarn : true; const fallbackFormat = !!options2.fallbackFormat; const unresolving = !!options2.unresolving; const postTranslation = isFunction$1(options2.postTranslation) ? options2.postTranslation : null; const processor = isPlainObject$1(options2.processor) ? options2.processor : null; const warnHtmlMessage = isBoolean$1(options2.warnHtmlMessage) ? options2.warnHtmlMessage : true; const escapeParameter = !!options2.escapeParameter; const messageCompiler = isFunction$1(options2.messageCompiler) ? options2.messageCompiler : _compiler; const onWarn = isFunction$1(options2.onWarn) ? options2.onWarn : warn; const internalOptions = options2; const __datetimeFormatters = isObject$5(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map(); const __numberFormatters = isObject$5(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map(); const __meta = isObject$5(internalOptions.__meta) ? internalOptions.__meta : {}; _cid++; const context = { version, cid: _cid, locale, fallbackLocale, messages: messages2, datetimeFormats, numberFormats, modifiers, pluralRules, missing, missingWarn, fallbackWarn, fallbackFormat, unresolving, postTranslation, processor, warnHtmlMessage, escapeParameter, messageCompiler, onWarn, __datetimeFormatters, __numberFormatters, __meta }; { context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : void 0; } { initI18nDevTools(context, version, __meta); } return context; } function isTranslateFallbackWarn(fallback, key) { return fallback instanceof RegExp ? fallback.test(key) : fallback; } function isTranslateMissingWarn(missing, key) { return missing instanceof RegExp ? missing.test(key) : missing; } function handleMissing(context, key, locale, missingWarn, type) { const { missing, onWarn } = context; { const emitter = context.__v_emitter; if (emitter) { emitter.emit("missing", { locale, key, type, groupId: `${type}:${key}` }); } } if (missing !== null) { const ret = missing(context, locale, key, type); return isString$1(ret) ? ret : key; } else { if (isTranslateMissingWarn(missingWarn, key)) { onWarn(getWarnMessage$1(0, { key, locale })); } return key; } } function getLocaleChain(ctx, fallback, start) { const context = ctx; if (!context.__localeChainCache) { context.__localeChainCache = /* @__PURE__ */ new Map(); } let chain = context.__localeChainCache.get(start); if (!chain) { chain = []; let block = [start]; while (isArray$2(block)) { block = appendBlockToChain(chain, block, fallback); } const defaults2 = isArray$2(fallback) ? fallback : isPlainObject$1(fallback) ? fallback["default"] ? fallback["default"] : null : fallback; block = isString$1(defaults2) ? [defaults2] : defaults2; if (isArray$2(block)) { appendBlockToChain(chain, block, false); } context.__localeChainCache.set(start, chain); } return chain; } function appendBlockToChain(chain, block, blocks) { let follow = true; for (let i2 = 0; i2 < block.length && isBoolean$1(follow); i2++) { const locale = block[i2]; if (isString$1(locale)) { follow = appendLocaleToChain(chain, block[i2], blocks); } } return follow; } function appendLocaleToChain(chain, locale, blocks) { let follow; const tokens = locale.split("-"); do { const target = tokens.join("-"); follow = appendItemToChain(chain, target, blocks); tokens.splice(-1, 1); } while (tokens.length && follow === true); return follow; } function appendItemToChain(chain, target, blocks) { let follow = false; if (!chain.includes(target)) { follow = true; if (target) { follow = target[target.length - 1] !== "!"; const locale = target.replace(/!/g, ""); chain.push(locale); if ((isArray$2(blocks) || isPlainObject$1(blocks)) && blocks[locale]) { follow = blocks[locale]; } } } return follow; } function updateFallbackLocale(ctx, locale, fallback) { const context = ctx; context.__localeChainCache = /* @__PURE__ */ new Map(); getLocaleChain(ctx, fallback, locale); } function createCoreError(code2) { return createCompileError(code2, null, { messages: errorMessages$1 }); } const errorMessages$1 = { [ 14 /* INVALID_ARGUMENT */ ]: "Invalid arguments", [ 15 /* INVALID_DATE_ARGUMENT */ ]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.", [ 16 /* INVALID_ISO_DATE_ARGUMENT */ ]: "The argument provided is not a valid ISO date string" }; const NOOP_MESSAGE_FUNCTION = () => ""; const isMessageFunction = (val) => isFunction$1(val); function translate(context, ...args) { const { fallbackFormat, postTranslation, unresolving, fallbackLocale, messages: messages2 } = context; const [key, options2] = parseTranslateArgs(...args); const missingWarn = isBoolean$1(options2.missingWarn) ? options2.missingWarn : context.missingWarn; const fallbackWarn = isBoolean$1(options2.fallbackWarn) ? options2.fallbackWarn : context.fallbackWarn; const escapeParameter = isBoolean$1(options2.escapeParameter) ? options2.escapeParameter : context.escapeParameter; const resolvedMessage = !!options2.resolvedMessage; const defaultMsgOrKey = isString$1(options2.default) || isBoolean$1(options2.default) ? !isBoolean$1(options2.default) ? options2.default : key : fallbackFormat ? key : ""; const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== ""; const locale = isString$1(options2.locale) ? options2.locale : context.locale; escapeParameter && escapeParams(options2); let [format2, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [ key, locale, messages2[locale] || {} ]; let cacheBaseKey = key; if (!resolvedMessage && !(isString$1(format2) || isMessageFunction(format2))) { if (enableDefaultMsg) { format2 = defaultMsgOrKey; cacheBaseKey = format2; } } if (!resolvedMessage && (!(isString$1(format2) || isMessageFunction(format2)) || !isString$1(targetLocale))) { return unresolving ? NOT_REOSLVED : key; } if (isString$1(format2) && context.messageCompiler == null) { warn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`); return key; } let occurred = false; const errorDetector = () => { occurred = true; }; const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) : format2; if (occurred) { return format2; } const ctxOptions = getMessageContextOptions(context, targetLocale, message, options2); const msgContext = createMessageContext(ctxOptions); const messaged = evaluateMessage(context, msg, msgContext); const ret = postTranslation ? postTranslation(messaged) : messaged; { const payloads = { timestamp: Date.now(), key: isString$1(key) ? key : isMessageFunction(format2) ? format2.key : "", locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""), format: isString$1(format2) ? format2 : isMessageFunction(format2) ? format2.source : "", message: ret }; payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {}); translateDevTools(payloads); } return ret; } function escapeParams(options2) { if (isArray$2(options2.list)) { options2.list = options2.list.map((item) => isString$1(item) ? escapeHtml(item) : item); } else if (isObject$5(options2.named)) { Object.keys(options2.named).forEach((key) => { if (isString$1(options2.named[key])) { options2.named[key] = escapeHtml(options2.named[key]); } }); } } function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) { const { messages: messages2, onWarn } = context; const locales = getLocaleChain(context, fallbackLocale, locale); let message = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type = "translate"; for (let i2 = 0; i2 < locales.length; i2++) { targetLocale = to = locales[i2]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(1, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type, key, from, to, groupId: `${type}:${key}` }); } } message = messages2[targetLocale] || {}; let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-resolve-start"; endTag = "intlify-message-resolve-end"; mark && mark(startTag); } if ((format2 = resolveValue(message, key)) === null) { format2 = message[key]; } if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start && format2) { emitter.emit("message-resolve", { type: "message-resolve", key, message: format2, time: end - start, groupId: `${type}:${key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message resolve", startTag, endTag); } } if (isString$1(format2) || isFunction$1(format2)) break; const missingRet = handleMissing(context, key, targetLocale, missingWarn, type); if (missingRet !== key) { format2 = missingRet; } from = to; } return [format2, targetLocale, message]; } function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) { const { messageCompiler, warnHtmlMessage } = context; if (isMessageFunction(format2)) { const msg2 = format2; msg2.locale = msg2.locale || targetLocale; msg2.key = msg2.key || key; return msg2; } let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-compilation-start"; endTag = "intlify-message-compilation-end"; mark && mark(startTag); } const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector)); if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start) { emitter.emit("message-compilation", { type: "message-compilation", message: format2, time: end - start, groupId: `${"translate"}:${key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message compilation", startTag, endTag); } } msg.locale = targetLocale; msg.key = key; msg.source = format2; return msg; } function evaluateMessage(context, msg, msgCtx) { let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-evaluation-start"; endTag = "intlify-message-evaluation-end"; mark && mark(startTag); } const messaged = msg(msgCtx); if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start) { emitter.emit("message-evaluation", { type: "message-evaluation", value: messaged, time: end - start, groupId: `${"translate"}:${msg.key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message evaluation", startTag, endTag); } } return messaged; } function parseTranslateArgs(...args) { const [arg1, arg2, arg3] = args; const options2 = {}; if (!isString$1(arg1) && !isNumber$1(arg1) && !isMessageFunction(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const key = isNumber$1(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1; if (isNumber$1(arg2)) { options2.plural = arg2; } else if (isString$1(arg2)) { options2.default = arg2; } else if (isPlainObject$1(arg2) && !isEmptyObject(arg2)) { options2.named = arg2; } else if (isArray$2(arg2)) { options2.list = arg2; } if (isNumber$1(arg3)) { options2.plural = arg3; } else if (isString$1(arg3)) { options2.default = arg3; } else if (isPlainObject$1(arg3)) { assign(options2, arg3); } return [key, options2]; } function getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) { return { warnHtmlMessage, onError: (err) => { errorDetector && errorDetector(err); { const message = `Message compilation error: ${err.message}`; const codeFrame = err.location && generateCodeFrame(source, err.location.start.offset, err.location.end.offset); const emitter = context.__v_emitter; if (emitter) { emitter.emit("compile-error", { message: source, error: err.message, start: err.location && err.location.start.offset, end: err.location && err.location.end.offset, groupId: `${"translate"}:${key}` }); } console.error(codeFrame ? `${message} ${codeFrame}` : message); } }, onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2) }; } function getMessageContextOptions(context, locale, message, options2) { const { modifiers, pluralRules } = context; const resolveMessage = (key) => { const val = resolveValue(message, key); if (isString$1(val)) { let occurred = false; const errorDetector = () => { occurred = true; }; const msg = compileMessageFormat(context, key, locale, val, key, errorDetector); return !occurred ? msg : NOOP_MESSAGE_FUNCTION; } else if (isMessageFunction(val)) { return val; } else { return NOOP_MESSAGE_FUNCTION; } }; const ctxOptions = { locale, modifiers, pluralRules, messages: resolveMessage }; if (context.processor) { ctxOptions.processor = context.processor; } if (options2.list) { ctxOptions.list = options2.list; } if (options2.named) { ctxOptions.named = options2.named; } if (isNumber$1(options2.plural)) { ctxOptions.pluralIndex = options2.plural; } return ctxOptions; } const intlDefined = typeof Intl !== "undefined"; const Availabilities = { dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== "undefined", numberFormat: intlDefined && typeof Intl.NumberFormat !== "undefined" }; function datetime(context, ...args) { const { datetimeFormats, unresolving, fallbackLocale, onWarn } = context; const { __datetimeFormatters } = context; if (!Availabilities.dateTimeFormat) { onWarn(getWarnMessage$1( 4 /* CANNOT_FORMAT_DATE */ )); return MISSING_RESOLVE_VALUE; } const [key, value, options2, overrides] = parseDateTimeArgs(...args); const missingWarn = isBoolean$1(options2.missingWarn) ? options2.missingWarn : context.missingWarn; const fallbackWarn = isBoolean$1(options2.fallbackWarn) ? options2.fallbackWarn : context.fallbackWarn; const part = !!options2.part; const locale = isString$1(options2.locale) ? options2.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString$1(key) || key === "") { return new Intl.DateTimeFormat(locale).format(value); } let datetimeFormat = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type = "datetime format"; for (let i2 = 0; i2 < locales.length; i2++) { targetLocale = to = locales[i2]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(5, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type, key, from, to, groupId: `${type}:${key}` }); } } datetimeFormat = datetimeFormats[targetLocale] || {}; format2 = datetimeFormat[key]; if (isPlainObject$1(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type); from = to; } if (!isPlainObject$1(format2) || !isString$1(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __datetimeFormatters.get(id); if (!formatter) { formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides)); __datetimeFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } function parseDateTimeArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options2 = {}; let overrides = {}; let value; if (isString$1(arg1)) { if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } value = new Date(arg1); try { value.toISOString(); } catch (e2) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } } else if (isDate$1(arg1)) { if (isNaN(arg1.getTime())) { throw createCoreError( 15 /* INVALID_DATE_ARGUMENT */ ); } value = arg1; } else if (isNumber$1(arg1)) { value = arg1; } else { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } if (isString$1(arg2)) { options2.key = arg2; } else if (isPlainObject$1(arg2)) { options2 = arg2; } if (isString$1(arg3)) { options2.locale = arg3; } else if (isPlainObject$1(arg3)) { overrides = arg3; } if (isPlainObject$1(arg4)) { overrides = arg4; } return [options2.key || "", value, options2, overrides]; } function clearDateTimeFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__datetimeFormatters.has(id)) { continue; } context.__datetimeFormatters.delete(id); } } function number$1(context, ...args) { const { numberFormats, unresolving, fallbackLocale, onWarn } = context; const { __numberFormatters } = context; if (!Availabilities.numberFormat) { onWarn(getWarnMessage$1( 2 /* CANNOT_FORMAT_NUMBER */ )); return MISSING_RESOLVE_VALUE; } const [key, value, options2, overrides] = parseNumberArgs(...args); const missingWarn = isBoolean$1(options2.missingWarn) ? options2.missingWarn : context.missingWarn; const fallbackWarn = isBoolean$1(options2.fallbackWarn) ? options2.fallbackWarn : context.fallbackWarn; const part = !!options2.part; const locale = isString$1(options2.locale) ? options2.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString$1(key) || key === "") { return new Intl.NumberFormat(locale).format(value); } let numberFormat = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type = "number format"; for (let i2 = 0; i2 < locales.length; i2++) { targetLocale = to = locales[i2]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(3, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type, key, from, to, groupId: `${type}:${key}` }); } } numberFormat = numberFormats[targetLocale] || {}; format2 = numberFormat[key]; if (isPlainObject$1(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type); from = to; } if (!isPlainObject$1(format2) || !isString$1(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __numberFormatters.get(id); if (!formatter) { formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides)); __numberFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } function parseNumberArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options2 = {}; let overrides = {}; if (!isNumber$1(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const value = arg1; if (isString$1(arg2)) { options2.key = arg2; } else if (isPlainObject$1(arg2)) { options2 = arg2; } if (isString$1(arg3)) { options2.locale = arg3; } else if (isPlainObject$1(arg3)) { overrides = arg3; } if (isPlainObject$1(arg4)) { overrides = arg4; } return [options2.key || "", value, options2, overrides]; } function clearNumberFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__numberFormatters.has(id)) { continue; } context.__numberFormatters.delete(id); } } 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"; 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 = { ...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; } }; 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 target = getTarget(); const hook = getDevtoolsGlobalHook(); const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null; const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list.push({ pluginDescriptor, setupFn, proxy }); if (proxy) setupFn(proxy.proxiedTarget); } } /*! * @intlify/vue-devtools v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const VueDevToolsLabels = { [ "vue-devtools-plugin-vue-i18n" /* PLUGIN */ ]: "Vue I18n devtools", [ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ]: "I18n Resources", [ "vue-i18n-timeline" /* TIMELINE */ ]: "Vue I18n" }; const VueDevToolsPlaceholders = { [ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ]: "Search for scopes ..." }; const VueDevToolsTimelineColors = { [ "vue-i18n-timeline" /* TIMELINE */ ]: 16764185 }; /*! * vue-i18n v9.1.9 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */ const VERSION$1 = "9.1.9"; function initFeatureFlags() { let needWarn = false; { needWarn = true; } if (needWarn) { console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`); } } const warnMessages = { [ 6 /* FALLBACK_TO_ROOT */ ]: `Fall back to {type} '{key}' with root locale.`, [ 7 /* NOT_SUPPORTED_PRESERVE */ ]: `Not supported 'preserve'.`, [ 8 /* NOT_SUPPORTED_FORMATTER */ ]: `Not supported 'formatter'.`, [ 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ ]: `Not supported 'preserveDirectiveContent'.`, [ 10 /* NOT_SUPPORTED_GET_CHOICE_INDEX */ ]: `Not supported 'getChoiceIndex'.`, [ 11 /* COMPONENT_NAME_LEGACY_COMPATIBLE */ ]: `Component name legacy compatible: '{name}' -> 'i18n'`, [ 12 /* NOT_FOUND_PARENT_SCOPE */ ]: `Not found parent scope. use the global scope.` }; function getWarnMessage(code2, ...args) { return format(warnMessages[code2], ...args); } function createI18nError(code2, ...args) { return createCompileError(code2, null, { messages: errorMessages, args }); } const errorMessages = { [ 14 /* UNEXPECTED_RETURN_TYPE */ ]: "Unexpected return type in composer", [ 15 /* INVALID_ARGUMENT */ ]: "Invalid argument", [ 16 /* MUST_BE_CALL_SETUP_TOP */ ]: "Must be called at the top of a `setup` function", [ 17 /* NOT_INSLALLED */ ]: "Need to install with `app.use` function", [ 22 /* UNEXPECTED_ERROR */ ]: "Unexpected error", [ 18 /* NOT_AVAILABLE_IN_LEGACY_MODE */ ]: "Not available in legacy mode", [ 19 /* REQUIRED_VALUE */ ]: `Required in value: {0}`, [ 20 /* INVALID_VALUE */ ]: `Invalid value`, [ 21 /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */ ]: `Cannot setup vue-devtools plugin` }; const DEVTOOLS_META = "__INTLIFY_META__"; const TransrateVNodeSymbol = makeSymbol("__transrateVNode"); const DatetimePartsSymbol = makeSymbol("__datetimeParts"); const NumberPartsSymbol = makeSymbol("__numberParts"); const EnableEmitter = makeSymbol("__enableEmitter"); const DisableEmitter = makeSymbol("__disableEmitter"); const SetPluralRulesSymbol = makeSymbol("__setPluralRules"); const InejctWithOption = makeSymbol("__injectWithOption"); let composerID = 0; function defineCoreMissingHandler(missing) { return (ctx, locale, key, type) => { return missing(locale, key, vue.getCurrentInstance() || void 0, type); }; } function getLocaleMessages(locale, options2) { const { messages: messages2, __i18n } = options2; const ret = isPlainObject$1(messages2) ? messages2 : isArray$2(__i18n) ? {} : { [locale]: {} }; if (isArray$2(__i18n)) { __i18n.forEach(({ locale: locale2, resource }) => { if (locale2) { ret[locale2] = ret[locale2] || {}; deepCopy(resource, ret[locale2]); } else { deepCopy(resource, ret); } }); } if (options2.flatJson) { for (const key in ret) { if (hasOwn$2(ret, key)) { handleFlatJson(ret[key]); } } } return ret; } const isNotObjectOrIsArray = (val) => !isObject$5(val) || isArray$2(val); function deepCopy(src, des) { if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) { throw createI18nError( 20 /* INVALID_VALUE */ ); } for (const key in src) { if (hasOwn$2(src, key)) { if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) { des[key] = src[key]; } else { deepCopy(src[key], des[key]); } } } } const getMetaInfo = () => { const instance = vue.getCurrentInstance(); return instance && instance.type[DEVTOOLS_META] ? { [DEVTOOLS_META]: instance.type[DEVTOOLS_META] } : null; }; function createComposer(options2 = {}) { const { __root } = options2; const _isGlobal = __root === void 0; let _inheritLocale = isBoolean$1(options2.inheritLocale) ? options2.inheritLocale : true; const _locale = vue.ref( // prettier-ignore __root && _inheritLocale ? __root.locale.value : isString$1(options2.locale) ? options2.locale : "en-US" ); const _fallbackLocale = vue.ref( // prettier-ignore __root && _inheritLocale ? __root.fallbackLocale.value : isString$1(options2.fallbackLocale) || isArray$2(options2.fallbackLocale) || isPlainObject$1(options2.fallbackLocale) || options2.fallbackLocale === false ? options2.fallbackLocale : _locale.value ); const _messages = vue.ref(getLocaleMessages(_locale.value, options2)); const _datetimeFormats = vue.ref(isPlainObject$1(options2.datetimeFormats) ? options2.datetimeFormats : { [_locale.value]: {} }); const _numberFormats = vue.ref(isPlainObject$1(options2.numberFormats) ? options2.numberFormats : { [_locale.value]: {} }); let _missingWarn = __root ? __root.missingWarn : isBoolean$1(options2.missingWarn) || isRegExp$1(options2.missingWarn) ? options2.missingWarn : true; let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean$1(options2.fallbackWarn) || isRegExp$1(options2.fallbackWarn) ? options2.fallbackWarn : true; let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean$1(options2.fallbackRoot) ? options2.fallbackRoot : true; let _fallbackFormat = !!options2.fallbackFormat; let _missing = isFunction$1(options2.missing) ? options2.missing : null; let _runtimeMissing = isFunction$1(options2.missing) ? defineCoreMissingHandler(options2.missing) : null; let _postTranslation = isFunction$1(options2.postTranslation) ? options2.postTranslation : null; let _warnHtmlMessage = isBoolean$1(options2.warnHtmlMessage) ? options2.warnHtmlMessage : true; let _escapeParameter = !!options2.escapeParameter; const _modifiers = __root ? __root.modifiers : isPlainObject$1(options2.modifiers) ? options2.modifiers : {}; let _pluralRules = options2.pluralRules || __root && __root.pluralRules; let _context; function getCoreContext() { return createCoreContext({ version: VERSION$1, locale: _locale.value, fallbackLocale: _fallbackLocale.value, messages: _messages.value, messageCompiler: function compileToFunction(source) { return (ctx) => { return ctx.normalize([source]); }; }, datetimeFormats: _datetimeFormats.value, numberFormats: _numberFormats.value, modifiers: _modifiers, pluralRules: _pluralRules, missing: _runtimeMissing === null ? void 0 : _runtimeMissing, missingWarn: _missingWarn, fallbackWarn: _fallbackWarn, fallbackFormat: _fallbackFormat, unresolving: true, postTranslation: _postTranslation === null ? void 0 : _postTranslation, warnHtmlMessage: _warnHtmlMessage, escapeParameter: _escapeParameter, __datetimeFormatters: isPlainObject$1(_context) ? _context.__datetimeFormatters : void 0, __numberFormatters: isPlainObject$1(_context) ? _context.__numberFormatters : void 0, __v_emitter: isPlainObject$1(_context) ? _context.__v_emitter : void 0, __meta: { framework: "vue" } }); } _context = getCoreContext(); updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); function trackReactivityValues() { return [ _locale.value, _fallbackLocale.value, _messages.value, _datetimeFormats.value, _numberFormats.value ]; } const locale = vue.computed({ get: () => _locale.value, set: (val) => { _locale.value = val; _context.locale = _locale.value; } }); const fallbackLocale = vue.computed({ get: () => _fallbackLocale.value, set: (val) => { _fallbackLocale.value = val; _context.fallbackLocale = _fallbackLocale.value; updateFallbackLocale(_context, _locale.value, val); } }); const messages2 = vue.computed(() => _messages.value); const datetimeFormats = vue.computed(() => _datetimeFormats.value); const numberFormats = vue.computed(() => _numberFormats.value); function getPostTranslationHandler() { return isFunction$1(_postTranslation) ? _postTranslation : null; } function setPostTranslationHandler(handler) { _postTranslation = handler; _context.postTranslation = handler; } function getMissingHandler() { return _missing; } function setMissingHandler(handler) { if (handler !== null) { _runtimeMissing = defineCoreMissingHandler(handler); } _missing = handler; _context.missing = _runtimeMissing; } function isResolvedTranslateMessage(type, arg) { return type !== "translate" || !!arg.resolvedMessage === false; } function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) { trackReactivityValues(); let ret; { try { setAdditionalMeta(getMetaInfo()); ret = fn(_context); } finally { setAdditionalMeta(null); } } if (isNumber$1(ret) && ret === NOT_REOSLVED) { const [key, arg2] = argumentParser(); if (__root && isString$1(key) && isResolvedTranslateMessage(warnType, arg2)) { if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) { warn(getWarnMessage(6, { key, type: warnType })); } { const { __v_emitter: emitter } = _context; if (emitter && _fallbackRoot) { emitter.emit("fallback", { type: warnType, key, to: "global", groupId: `${warnType}:${key}` }); } } } return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key); } else if (successCondition(ret)) { return ret; } else { throw createI18nError( 14 /* UNEXPECTED_RETURN_TYPE */ ); } } function t2(...args) { return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString$1(val)); } function rt2(...args) { const [arg1, arg2, arg3] = args; if (arg3 && !isObject$5(arg3)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } return t2(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]); } function d2(...args) { return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root.d(...args), () => MISSING_RESOLVE_VALUE, (val) => isString$1(val)); } function n2(...args) { return wrapWithDeps((context) => number$1(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString$1(val)); } function normalize(values) { return values.map((val) => isString$1(val) ? vue.createVNode(vue.Text, null, val, 0) : val); } const interpolate = (val) => val; const processor = { normalize, interpolate, type: "vnode" }; function transrateVNode(...args) { return wrapWithDeps( (context) => { let ret; const _context2 = context; try { _context2.processor = processor; ret = translate(_context2, ...args); } finally { _context2.processor = null; } return ret; }, () => parseTranslateArgs(...args), "translate", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[TransrateVNodeSymbol](...args), (key) => [vue.createVNode(vue.Text, null, key, 0)], (val) => isArray$2(val) ); } function numberParts(...args) { return wrapWithDeps( (context) => number$1(context, ...args), () => parseNumberArgs(...args), "number format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[NumberPartsSymbol](...args), () => [], (val) => isString$1(val) || isArray$2(val) ); } function datetimeParts(...args) { return wrapWithDeps( (context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[DatetimePartsSymbol](...args), () => [], (val) => isString$1(val) || isArray$2(val) ); } function setPluralRules(rules2) { _pluralRules = rules2; _context.pluralRules = _pluralRules; } function te2(key, locale2) { const targetLocale = isString$1(locale2) ? locale2 : _locale.value; const message = getLocaleMessage(targetLocale); return resolveValue(message, key) !== null; } function resolveMessages(key) { let messages22 = null; const locales = getLocaleChain(_context, _fallbackLocale.value, _locale.value); for (let i2 = 0; i2 < locales.length; i2++) { const targetLocaleMessages = _messages.value[locales[i2]] || {}; const messageValue = resolveValue(targetLocaleMessages, key); if (messageValue != null) { messages22 = messageValue; break; } } return messages22; } function tm(key) { const messages22 = resolveMessages(key); return messages22 != null ? messages22 : __root ? __root.tm(key) || {} : {}; } function getLocaleMessage(locale2) { return _messages.value[locale2] || {}; } function setLocaleMessage(locale2, message) { _messages.value[locale2] = message; _context.messages = _messages.value; } function mergeLocaleMessage(locale2, message) { _messages.value[locale2] = _messages.value[locale2] || {}; deepCopy(message, _messages.value[locale2]); _context.messages = _messages.value; } function getDateTimeFormat(locale2) { return _datetimeFormats.value[locale2] || {}; } function setDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = format2; _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function mergeDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = assign(_datetimeFormats.value[locale2] || {}, format2); _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function getNumberFormat(locale2) { return _numberFormats.value[locale2] || {}; } function setNumberFormat(locale2, format2) { _numberFormats.value[locale2] = format2; _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } function mergeNumberFormat(locale2, format2) { _numberFormats.value[locale2] = assign(_numberFormats.value[locale2] || {}, format2); _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } composerID++; if (__root) { vue.watch(__root.locale, (val) => { if (_inheritLocale) { _locale.value = val; _context.locale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); vue.watch(__root.fallbackLocale, (val) => { if (_inheritLocale) { _fallbackLocale.value = val; _context.fallbackLocale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); } const composer = { id: composerID, locale, fallbackLocale, get inheritLocale() { return _inheritLocale; }, set inheritLocale(val) { _inheritLocale = val; if (val && __root) { _locale.value = __root.locale.value; _fallbackLocale.value = __root.fallbackLocale.value; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }, get availableLocales() { return Object.keys(_messages.value).sort(); }, messages: messages2, datetimeFormats, numberFormats, get modifiers() { return _modifiers; }, get pluralRules() { return _pluralRules || {}; }, get isGlobal() { return _isGlobal; }, get missingWarn() { return _missingWarn; }, set missingWarn(val) { _missingWarn = val; _context.missingWarn = _missingWarn; }, get fallbackWarn() { return _fallbackWarn; }, set fallbackWarn(val) { _fallbackWarn = val; _context.fallbackWarn = _fallbackWarn; }, get fallbackRoot() { return _fallbackRoot; }, set fallbackRoot(val) { _fallbackRoot = val; }, get fallbackFormat() { return _fallbackFormat; }, set fallbackFormat(val) { _fallbackFormat = val; _context.fallbackFormat = _fallbackFormat; }, get warnHtmlMessage() { return _warnHtmlMessage; }, set warnHtmlMessage(val) { _warnHtmlMessage = val; _context.warnHtmlMessage = val; }, get escapeParameter() { return _escapeParameter; }, set escapeParameter(val) { _escapeParameter = val; _context.escapeParameter = val; }, t: t2, rt: rt2, d: d2, n: n2, te: te2, tm, getLocaleMessage, setLocaleMessage, mergeLocaleMessage, getDateTimeFormat, setDateTimeFormat, mergeDateTimeFormat, getNumberFormat, setNumberFormat, mergeNumberFormat, getPostTranslationHandler, setPostTranslationHandler, getMissingHandler, setMissingHandler, [TransrateVNodeSymbol]: transrateVNode, [NumberPartsSymbol]: numberParts, [DatetimePartsSymbol]: datetimeParts, [SetPluralRulesSymbol]: setPluralRules, [InejctWithOption]: options2.__injectWithOption // eslint-disable-line @typescript-eslint/no-explicit-any }; { composer[EnableEmitter] = (emitter) => { _context.__v_emitter = emitter; }; composer[DisableEmitter] = () => { _context.__v_emitter = void 0; }; } return composer; } function convertComposerOptions(options2) { const locale = isString$1(options2.locale) ? options2.locale : "en-US"; const fallbackLocale = isString$1(options2.fallbackLocale) || isArray$2(options2.fallbackLocale) || isPlainObject$1(options2.fallbackLocale) || options2.fallbackLocale === false ? options2.fallbackLocale : locale; const missing = isFunction$1(options2.missing) ? options2.missing : void 0; const missingWarn = isBoolean$1(options2.silentTranslationWarn) || isRegExp$1(options2.silentTranslationWarn) ? !options2.silentTranslationWarn : true; const fallbackWarn = isBoolean$1(options2.silentFallbackWarn) || isRegExp$1(options2.silentFallbackWarn) ? !options2.silentFallbackWarn : true; const fallbackRoot = isBoolean$1(options2.fallbackRoot) ? options2.fallbackRoot : true; const fallbackFormat = !!options2.formatFallbackMessages; const modifiers = isPlainObject$1(options2.modifiers) ? options2.modifiers : {}; const pluralizationRules = options2.pluralizationRules; const postTranslation = isFunction$1(options2.postTranslation) ? options2.postTranslation : void 0; const warnHtmlMessage = isString$1(options2.warnHtmlInMessage) ? options2.warnHtmlInMessage !== "off" : true; const escapeParameter = !!options2.escapeParameterHtml; const inheritLocale = isBoolean$1(options2.sync) ? options2.sync : true; if (options2.formatter) { warn(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); } if (options2.preserveDirectiveContent) { warn(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); } let messages2 = options2.messages; if (isPlainObject$1(options2.sharedMessages)) { const sharedMessages = options2.sharedMessages; const locales = Object.keys(sharedMessages); messages2 = locales.reduce((messages22, locale2) => { const message = messages22[locale2] || (messages22[locale2] = {}); assign(message, sharedMessages[locale2]); return messages22; }, messages2 || {}); } const { __i18n, __root, __injectWithOption } = options2; const datetimeFormats = options2.datetimeFormats; const numberFormats = options2.numberFormats; const flatJson = options2.flatJson; return { locale, fallbackLocale, messages: messages2, flatJson, datetimeFormats, numberFormats, missing, missingWarn, fallbackWarn, fallbackRoot, fallbackFormat, modifiers, pluralRules: pluralizationRules, postTranslation, warnHtmlMessage, escapeParameter, inheritLocale, __i18n, __root, __injectWithOption }; } function createVueI18n(options2 = {}) { const composer = createComposer(convertComposerOptions(options2)); const vueI18n = { // id id: composer.id, // locale get locale() { return composer.locale.value; }, set locale(val) { composer.locale.value = val; }, // fallbackLocale get fallbackLocale() { return composer.fallbackLocale.value; }, set fallbackLocale(val) { composer.fallbackLocale.value = val; }, // messages get messages() { return composer.messages.value; }, // datetimeFormats get datetimeFormats() { return composer.datetimeFormats.value; }, // numberFormats get numberFormats() { return composer.numberFormats.value; }, // availableLocales get availableLocales() { return composer.availableLocales; }, // formatter get formatter() { warn(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); return { interpolate() { return []; } }; }, set formatter(val) { warn(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); }, // missing get missing() { return composer.getMissingHandler(); }, set missing(handler) { composer.setMissingHandler(handler); }, // silentTranslationWarn get silentTranslationWarn() { return isBoolean$1(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn; }, set silentTranslationWarn(val) { composer.missingWarn = isBoolean$1(val) ? !val : val; }, // silentFallbackWarn get silentFallbackWarn() { return isBoolean$1(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn; }, set silentFallbackWarn(val) { composer.fallbackWarn = isBoolean$1(val) ? !val : val; }, // modifiers get modifiers() { return composer.modifiers; }, // formatFallbackMessages get formatFallbackMessages() { return composer.fallbackFormat; }, set formatFallbackMessages(val) { composer.fallbackFormat = val; }, // postTranslation get postTranslation() { return composer.getPostTranslationHandler(); }, set postTranslation(handler) { composer.setPostTranslationHandler(handler); }, // sync get sync() { return composer.inheritLocale; }, set sync(val) { composer.inheritLocale = val; }, // warnInHtmlMessage get warnHtmlInMessage() { return composer.warnHtmlMessage ? "warn" : "off"; }, set warnHtmlInMessage(val) { composer.warnHtmlMessage = val !== "off"; }, // escapeParameterHtml get escapeParameterHtml() { return composer.escapeParameter; }, set escapeParameterHtml(val) { composer.escapeParameter = val; }, // preserveDirectiveContent get preserveDirectiveContent() { warn(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); return true; }, set preserveDirectiveContent(val) { warn(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); }, // pluralizationRules get pluralizationRules() { return composer.pluralRules || {}; }, // for internal __composer: composer, // t t(...args) { const [arg1, arg2, arg3] = args; const options22 = {}; let list = null; let named = null; if (!isString$1(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString$1(arg2)) { options22.locale = arg2; } else if (isArray$2(arg2)) { list = arg2; } else if (isPlainObject$1(arg2)) { named = arg2; } if (isArray$2(arg3)) { list = arg3; } else if (isPlainObject$1(arg3)) { named = arg3; } return composer.t(key, list || named || {}, options22); }, rt(...args) { return composer.rt(...args); }, // tc tc(...args) { const [arg1, arg2, arg3] = args; const options22 = { plural: 1 }; let list = null; let named = null; if (!isString$1(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString$1(arg2)) { options22.locale = arg2; } else if (isNumber$1(arg2)) { options22.plural = arg2; } else if (isArray$2(arg2)) { list = arg2; } else if (isPlainObject$1(arg2)) { named = arg2; } if (isString$1(arg3)) { options22.locale = arg3; } else if (isArray$2(arg3)) { list = arg3; } else if (isPlainObject$1(arg3)) { named = arg3; } return composer.t(key, list || named || {}, options22); }, // te te(key, locale) { return composer.te(key, locale); }, // tm tm(key) { return composer.tm(key); }, // getLocaleMessage getLocaleMessage(locale) { return composer.getLocaleMessage(locale); }, // setLocaleMessage setLocaleMessage(locale, message) { composer.setLocaleMessage(locale, message); }, // mergeLocaleMessage mergeLocaleMessage(locale, message) { composer.mergeLocaleMessage(locale, message); }, // d d(...args) { return composer.d(...args); }, // getDateTimeFormat getDateTimeFormat(locale) { return composer.getDateTimeFormat(locale); }, // setDateTimeFormat setDateTimeFormat(locale, format2) { composer.setDateTimeFormat(locale, format2); }, // mergeDateTimeFormat mergeDateTimeFormat(locale, format2) { composer.mergeDateTimeFormat(locale, format2); }, // n n(...args) { return composer.n(...args); }, // getNumberFormat getNumberFormat(locale) { return composer.getNumberFormat(locale); }, // setNumberFormat setNumberFormat(locale, format2) { composer.setNumberFormat(locale, format2); }, // mergeNumberFormat mergeNumberFormat(locale, format2) { composer.mergeNumberFormat(locale, format2); }, // getChoiceIndex // eslint-disable-next-line @typescript-eslint/no-unused-vars getChoiceIndex(choice, choicesLength) { warn(getWarnMessage( 10 /* NOT_SUPPORTED_GET_CHOICE_INDEX */ )); return -1; }, // for internal __onComponentInstanceCreated(target) { const { componentInstanceCreatedListener } = options2; if (componentInstanceCreatedListener) { componentInstanceCreatedListener(target, vueI18n); } } }; { vueI18n.__enableEmitter = (emitter) => { const __composer = composer; __composer[EnableEmitter] && __composer[EnableEmitter](emitter); }; vueI18n.__disableEmitter = () => { const __composer = composer; __composer[DisableEmitter] && __composer[DisableEmitter](); }; } return vueI18n; } const baseFormatProps = { tag: { type: [String, Object] }, locale: { type: String }, scope: { type: String, validator: (val) => val === "parent" || val === "global", default: "parent" }, i18n: { type: Object } }; const Translation = { /* eslint-disable */ name: "i18n-t", props: assign({ keypath: { type: String, required: true }, plural: { type: [Number, String], // eslint-disable-next-line @typescript-eslint/no-explicit-any validator: (val) => isNumber$1(val) || !isNaN(val) } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const { slots, attrs } = context; const i18n2 = props.i18n || useI18n({ useScope: props.scope, __useComponent: true }); const keys = Object.keys(slots).filter((key) => key !== "_"); return () => { const options2 = {}; if (props.locale) { options2.locale = props.locale; } if (props.plural !== void 0) { options2.plural = isString$1(props.plural) ? +props.plural : props.plural; } const arg = getInterpolateArg(context, keys); const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options2); const assignedAttrs = assign({}, attrs); return isString$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$5(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children); }; } }; function getInterpolateArg({ slots }, keys) { if (keys.length === 1 && keys[0] === "default") { return slots.default ? slots.default() : []; } else { return keys.reduce((arg, key) => { const slot = slots[key]; if (slot) { arg[key] = slot(); } return arg; }, {}); } } function renderFormatter(props, context, slotKeys, partFormatter) { const { slots, attrs } = context; return () => { const options2 = { part: true }; let overrides = {}; if (props.locale) { options2.locale = props.locale; } if (isString$1(props.format)) { options2.key = props.format; } else if (isObject$5(props.format)) { if (isString$1(props.format.key)) { options2.key = props.format.key; } overrides = Object.keys(props.format).reduce((options22, prop) => { return slotKeys.includes(prop) ? assign({}, options22, { [prop]: props.format[prop] }) : options22; }, {}); } const parts = partFormatter(...[props.value, options2, overrides]); let children = [options2.key]; if (isArray$2(parts)) { children = parts.map((part, index2) => { const slot = slots[part.type]; return slot ? slot({ [part.type]: part.value, index: index2, parts }) : [part.value]; }); } else if (isString$1(parts)) { children = [parts]; } const assignedAttrs = assign({}, attrs); return isString$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$5(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children); }; } const NUMBER_FORMAT_KEYS = [ "localeMatcher", "style", "unit", "unitDisplay", "currency", "currencyDisplay", "useGrouping", "numberingSystem", "minimumIntegerDigits", "minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits", "notation", "formatMatcher" ]; const NumberFormat = { /* eslint-disable */ name: "i18n-n", props: assign({ value: { type: Number, required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n2[NumberPartsSymbol](...args) )); } }; const DATETIME_FORMAT_KEYS = [ "dateStyle", "timeStyle", "fractionalSecondDigits", "calendar", "dayPeriod", "numberingSystem", "localeMatcher", "timeZone", "hour12", "hourCycle", "formatMatcher", "weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName" ]; const DatetimeFormat = { /* eslint-disable */ name: "i18n-d", props: assign({ value: { type: [Number, Date], required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n2[DatetimePartsSymbol](...args) )); } }; function getComposer$2(i18n2, instance) { const i18nInternal = i18n2; if (i18n2.mode === "composition") { return i18nInternal.__getInstance(instance) || i18n2.global; } else { const vueI18n = i18nInternal.__getInstance(instance); return vueI18n != null ? vueI18n.__composer : i18n2.global.__composer; } } function vTDirective(i18n2) { const bind2 = (el, { instance, value, modifiers }) => { if (!instance || !instance.$) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const composer = getComposer$2(i18n2, instance.$); if (modifiers.preserve) { warn(getWarnMessage( 7 /* NOT_SUPPORTED_PRESERVE */ )); } const parsedValue = parseValue(value); el.textContent = composer.t(...makeParams(parsedValue)); }; return { beforeMount: bind2, beforeUpdate: bind2 }; } function parseValue(value) { if (isString$1(value)) { return { path: value }; } else if (isPlainObject$1(value)) { if (!("path" in value)) { throw createI18nError(19, "path"); } return value; } else { throw createI18nError( 20 /* INVALID_VALUE */ ); } } function makeParams(value) { const { path, locale, args, choice, plural } = value; const options2 = {}; const named = args || {}; if (isString$1(locale)) { options2.locale = locale; } if (isNumber$1(choice)) { options2.plural = choice; } if (isNumber$1(plural)) { options2.plural = plural; } return [path, named, options2]; } function apply(app2, i18n2, ...options2) { const pluginOptions = isPlainObject$1(options2[0]) ? options2[0] : {}; const useI18nComponentName = !!pluginOptions.useI18nComponentName; const globalInstall = isBoolean$1(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true; if (globalInstall && useI18nComponentName) { warn(getWarnMessage(11, { name: Translation.name })); } if (globalInstall) { app2.component(!useI18nComponentName ? Translation.name : "i18n", Translation); app2.component(NumberFormat.name, NumberFormat); app2.component(DatetimeFormat.name, DatetimeFormat); } app2.directive("t", vTDirective(i18n2)); } const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties"; let devtoolsApi; async function enableDevTools(app2, i18n2) { return new Promise((resolve, reject) => { try { setupDevtoolsPlugin({ id: "vue-devtools-plugin-vue-i18n", label: VueDevToolsLabels[ "vue-devtools-plugin-vue-i18n" /* PLUGIN */ ], packageName: "vue-i18n", homepage: "https://vue-i18n.intlify.dev", logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png", componentStateTypes: [VUE_I18N_COMPONENT_TYPES], app: app2 }, (api2) => { devtoolsApi = api2; api2.on.visitComponentTree(({ componentInstance, treeNode }) => { updateComponentTreeTags(componentInstance, treeNode, i18n2); }); api2.on.inspectComponent(({ componentInstance, instanceData }) => { if (componentInstance.vnode.el.__VUE_I18N__ && instanceData) { if (i18n2.mode === "legacy") { if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) { inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__); } } else { inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__); } } }); api2.addInspector({ id: "vue-i18n-resource-inspector", label: VueDevToolsLabels[ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ], icon: "language", treeFilterPlaceholder: VueDevToolsPlaceholders[ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ] }); api2.on.getInspectorTree((payload) => { if (payload.app === app2 && payload.inspectorId === "vue-i18n-resource-inspector") { registerScope(payload, i18n2); } }); api2.on.getInspectorState((payload) => { if (payload.app === app2 && payload.inspectorId === "vue-i18n-resource-inspector") { inspectScope(payload, i18n2); } }); api2.on.editInspectorState((payload) => { if (payload.app === app2 && payload.inspectorId === "vue-i18n-resource-inspector") { editScope(payload, i18n2); } }); api2.addTimelineLayer({ id: "vue-i18n-timeline", label: VueDevToolsLabels[ "vue-i18n-timeline" /* TIMELINE */ ], color: VueDevToolsTimelineColors[ "vue-i18n-timeline" /* TIMELINE */ ] }); resolve(true); }); } catch (e2) { console.error(e2); reject(false); } }); } function updateComponentTreeTags(instance, treeNode, i18n2) { const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; if (instance && instance.vnode.el.__VUE_I18N__) { if (instance.vnode.el.__VUE_I18N__ !== global2) { const label = instance.type.name || instance.type.displayName || instance.type.__file; const tag = { label: `i18n (${label} Scope)`, textColor: 0, backgroundColor: 16764185 }; treeNode.tags.push(tag); } } } function inspectComposer(instanceData, composer) { const type = VUE_I18N_COMPONENT_TYPES; instanceData.state.push({ type, key: "locale", editable: true, value: composer.locale.value }); instanceData.state.push({ type, key: "availableLocales", editable: false, value: composer.availableLocales }); instanceData.state.push({ type, key: "fallbackLocale", editable: true, value: composer.fallbackLocale.value }); instanceData.state.push({ type, key: "inheritLocale", editable: true, value: composer.inheritLocale }); instanceData.state.push({ type, key: "messages", editable: false, value: getLocaleMessageValue(composer.messages.value) }); instanceData.state.push({ type, key: "datetimeFormats", editable: false, value: composer.datetimeFormats.value }); instanceData.state.push({ type, key: "numberFormats", editable: false, value: composer.numberFormats.value }); } function getLocaleMessageValue(messages2) { const value = {}; Object.keys(messages2).forEach((key) => { const v2 = messages2[key]; if (isFunction$1(v2) && "source" in v2) { value[key] = getMessageFunctionDetails(v2); } else if (isObject$5(v2)) { value[key] = getLocaleMessageValue(v2); } else { value[key] = v2; } }); return value; } const ESC = { "<": "<", ">": ">", '"': """, "&": "&" }; function escape$1(s2) { return s2.replace(/[<>"&]/g, escapeChar); } function escapeChar(a2) { return ESC[a2] || a2; } function getMessageFunctionDetails(func) { const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`; return { _custom: { type: "function", display: `ƒ ${argString}` } }; } function registerScope(payload, i18n2) { payload.rootNodes.push({ id: "global", label: "Global Scope" }); const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; for (const [keyInstance, instance] of i18n2.__instances) { const composer = i18n2.mode === "composition" ? instance : instance.__composer; if (global2 === composer) { continue; } const label = keyInstance.type.name || keyInstance.type.displayName || keyInstance.type.__file; payload.rootNodes.push({ id: composer.id.toString(), label: `${label} Scope` }); } } function getComposer$1(nodeId, i18n2) { if (nodeId === "global") { return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; } else { const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId); if (instance) { return i18n2.mode === "composition" ? instance : instance.__composer; } else { return null; } } } function inspectScope(payload, i18n2) { const composer = getComposer$1(payload.nodeId, i18n2); if (composer) { payload.state = makeScopeInspectState(composer); } } function makeScopeInspectState(composer) { const state = {}; const localeType = "Locale related info"; const localeStates = [ { type: localeType, key: "locale", editable: true, value: composer.locale.value }, { type: localeType, key: "fallbackLocale", editable: true, value: composer.fallbackLocale.value }, { type: localeType, key: "availableLocales", editable: false, value: composer.availableLocales }, { type: localeType, key: "inheritLocale", editable: true, value: composer.inheritLocale } ]; state[localeType] = localeStates; const localeMessagesType = "Locale messages info"; const localeMessagesStates = [ { type: localeMessagesType, key: "messages", editable: false, value: getLocaleMessageValue(composer.messages.value) } ]; state[localeMessagesType] = localeMessagesStates; const datetimeFormatsType = "Datetime formats info"; const datetimeFormatsStates = [ { type: datetimeFormatsType, key: "datetimeFormats", editable: false, value: composer.datetimeFormats.value } ]; state[datetimeFormatsType] = datetimeFormatsStates; const numberFormatsType = "Datetime formats info"; const numberFormatsStates = [ { type: numberFormatsType, key: "numberFormats", editable: false, value: composer.numberFormats.value } ]; state[numberFormatsType] = numberFormatsStates; return state; } function addTimelineEvent(event, payload) { if (devtoolsApi) { let groupId; if (payload && "groupId" in payload) { groupId = payload.groupId; delete payload.groupId; } devtoolsApi.addTimelineEvent({ layerId: "vue-i18n-timeline", event: { title: event, groupId, time: Date.now(), meta: {}, data: payload || {}, logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default" } }); } } function editScope(payload, i18n2) { const composer = getComposer$1(payload.nodeId, i18n2); if (composer) { const [field] = payload.path; if (field === "locale" && isString$1(payload.state.value)) { composer.locale.value = payload.state.value; } else if (field === "fallbackLocale" && (isString$1(payload.state.value) || isArray$2(payload.state.value) || isObject$5(payload.state.value))) { composer.fallbackLocale.value = payload.state.value; } else if (field === "inheritLocale" && isBoolean$1(payload.state.value)) { composer.inheritLocale = payload.state.value; } } } function defineMixin(vuei18n, composer, i18n2) { return { beforeCreate() { const instance = vue.getCurrentInstance(); if (!instance) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const options2 = this.$options; if (options2.i18n) { const optionsI18n = options2.i18n; if (options2.__i18n) { optionsI18n.__i18n = options2.__i18n; } optionsI18n.__root = composer; if (this === this.$root) { this.$i18n = mergeToRoot(vuei18n, optionsI18n); } else { optionsI18n.__injectWithOption = true; this.$i18n = createVueI18n(optionsI18n); } } else if (options2.__i18n) { if (this === this.$root) { this.$i18n = mergeToRoot(vuei18n, options2); } else { this.$i18n = createVueI18n({ __i18n: options2.__i18n, __injectWithOption: true, __root: composer }); } } else { this.$i18n = vuei18n; } vuei18n.__onComponentInstanceCreated(this.$i18n); i18n2.__setInstance(instance, this.$i18n); this.$t = (...args) => this.$i18n.t(...args); this.$rt = (...args) => this.$i18n.rt(...args); this.$tc = (...args) => this.$i18n.tc(...args); this.$te = (key, locale) => this.$i18n.te(key, locale); this.$d = (...args) => this.$i18n.d(...args); this.$n = (...args) => this.$i18n.n(...args); this.$tm = (key) => this.$i18n.tm(key); }, mounted() { { this.$el.__VUE_I18N__ = this.$i18n.__composer; const emitter = this.__v_emitter = createEmitter(); const _vueI18n = this.$i18n; _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter); emitter.on("*", addTimelineEvent); } }, beforeUnmount() { const instance = vue.getCurrentInstance(); if (!instance) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } { if (this.__v_emitter) { this.__v_emitter.off("*", addTimelineEvent); delete this.__v_emitter; } const _vueI18n = this.$i18n; _vueI18n.__disableEmitter && _vueI18n.__disableEmitter(); delete this.$el.__VUE_I18N__; } delete this.$t; delete this.$rt; delete this.$tc; delete this.$te; delete this.$d; delete this.$n; delete this.$tm; i18n2.__deleteInstance(instance); delete this.$i18n; } }; } function mergeToRoot(root, options2) { root.locale = options2.locale || root.locale; root.fallbackLocale = options2.fallbackLocale || root.fallbackLocale; root.missing = options2.missing || root.missing; root.silentTranslationWarn = options2.silentTranslationWarn || root.silentFallbackWarn; root.silentFallbackWarn = options2.silentFallbackWarn || root.silentFallbackWarn; root.formatFallbackMessages = options2.formatFallbackMessages || root.formatFallbackMessages; root.postTranslation = options2.postTranslation || root.postTranslation; root.warnHtmlInMessage = options2.warnHtmlInMessage || root.warnHtmlInMessage; root.escapeParameterHtml = options2.escapeParameterHtml || root.escapeParameterHtml; root.sync = options2.sync || root.sync; root.__composer[SetPluralRulesSymbol](options2.pluralizationRules || root.pluralizationRules); const messages2 = getLocaleMessages(root.locale, { messages: options2.messages, __i18n: options2.__i18n }); Object.keys(messages2).forEach((locale) => root.mergeLocaleMessage(locale, messages2[locale])); if (options2.datetimeFormats) { Object.keys(options2.datetimeFormats).forEach((locale) => root.mergeDateTimeFormat(locale, options2.datetimeFormats[locale])); } if (options2.numberFormats) { Object.keys(options2.numberFormats).forEach((locale) => root.mergeNumberFormat(locale, options2.numberFormats[locale])); } return root; } function createI18n(options2 = {}) { const __legacyMode = isBoolean$1(options2.legacy) ? options2.legacy : true; const __globalInjection = !!options2.globalInjection; const __instances = /* @__PURE__ */ new Map(); const __global = __legacyMode ? createVueI18n(options2) : createComposer(options2); const symbol = makeSymbol("vue-i18n"); const i18n2 = { // mode get mode() { return __legacyMode ? "legacy" : "composition"; }, // install plugin async install(app2, ...options22) { { app2.__VUE_I18N__ = i18n2; } app2.__VUE_I18N_SYMBOL__ = symbol; app2.provide(app2.__VUE_I18N_SYMBOL__, i18n2); if (!__legacyMode && __globalInjection) { injectGlobalFields(app2, i18n2.global); } { apply(app2, i18n2, ...options22); } if (__legacyMode) { app2.mixin(defineMixin(__global, __global.__composer, i18n2)); } { const ret = await enableDevTools(app2, i18n2); if (!ret) { throw createI18nError( 21 /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */ ); } const emitter = createEmitter(); if (__legacyMode) { const _vueI18n = __global; _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter); } else { const _composer = __global; _composer[EnableEmitter] && _composer[EnableEmitter](emitter); } emitter.on("*", addTimelineEvent); } }, // global accessor get global() { return __global; }, // @internal __instances, // @internal __getInstance(component) { return __instances.get(component) || null; }, // @internal __setInstance(component, instance) { __instances.set(component, instance); }, // @internal __deleteInstance(component) { __instances.delete(component); } }; return i18n2; } function useI18n(options2 = {}) { const instance = vue.getCurrentInstance(); if (instance == null) { throw createI18nError( 16 /* MUST_BE_CALL_SETUP_TOP */ ); } if (!instance.appContext.app.__VUE_I18N_SYMBOL__) { throw createI18nError( 17 /* NOT_INSLALLED */ ); } const i18n2 = vue.inject(instance.appContext.app.__VUE_I18N_SYMBOL__); if (!i18n2) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; const scope = isEmptyObject(options2) ? "__i18n" in instance.type ? "local" : "global" : !options2.useScope ? "local" : options2.useScope; if (scope === "global") { let messages2 = isObject$5(options2.messages) ? options2.messages : {}; if ("__i18nGlobal" in instance.type) { messages2 = getLocaleMessages(global2.locale.value, { messages: messages2, __i18n: instance.type.__i18nGlobal }); } const locales = Object.keys(messages2); if (locales.length) { locales.forEach((locale) => { global2.mergeLocaleMessage(locale, messages2[locale]); }); } if (isObject$5(options2.datetimeFormats)) { const locales2 = Object.keys(options2.datetimeFormats); if (locales2.length) { locales2.forEach((locale) => { global2.mergeDateTimeFormat(locale, options2.datetimeFormats[locale]); }); } } if (isObject$5(options2.numberFormats)) { const locales2 = Object.keys(options2.numberFormats); if (locales2.length) { locales2.forEach((locale) => { global2.mergeNumberFormat(locale, options2.numberFormats[locale]); }); } } return global2; } if (scope === "parent") { let composer2 = getComposer(i18n2, instance, options2.__useComponent); if (composer2 == null) { { warn(getWarnMessage( 12 /* NOT_FOUND_PARENT_SCOPE */ )); } composer2 = global2; } return composer2; } if (i18n2.mode === "legacy") { throw createI18nError( 18 /* NOT_AVAILABLE_IN_LEGACY_MODE */ ); } const i18nInternal = i18n2; let composer = i18nInternal.__getInstance(instance); if (composer == null) { const type = instance.type; const composerOptions = assign({}, options2); if (type.__i18n) { composerOptions.__i18n = type.__i18n; } if (global2) { composerOptions.__root = global2; } composer = createComposer(composerOptions); setupLifeCycle(i18nInternal, instance, composer); i18nInternal.__setInstance(instance, composer); } return composer; } function getComposer(i18n2, target, useComponent = false) { let composer = null; const root = target.root; let current = target.parent; while (current != null) { const i18nInternal = i18n2; if (i18n2.mode === "composition") { composer = i18nInternal.__getInstance(current); } else { const vueI18n = i18nInternal.__getInstance(current); if (vueI18n != null) { composer = vueI18n.__composer; } if (useComponent && composer && !composer[InejctWithOption]) { composer = null; } } if (composer != null) { break; } if (root === current) { break; } current = current.parent; } return composer; } function setupLifeCycle(i18n2, target, composer) { let emitter = null; vue.onMounted(() => { if (target.vnode.el) { target.vnode.el.__VUE_I18N__ = composer; emitter = createEmitter(); const _composer = composer; _composer[EnableEmitter] && _composer[EnableEmitter](emitter); emitter.on("*", addTimelineEvent); } }, target); vue.onUnmounted(() => { if (target.vnode.el && target.vnode.el.__VUE_I18N__) { emitter && emitter.off("*", addTimelineEvent); const _composer = composer; _composer[DisableEmitter] && _composer[DisableEmitter](); delete target.vnode.el.__VUE_I18N__; } i18n2.__deleteInstance(target); }, target); } const globalExportProps = [ "locale", "fallbackLocale", "availableLocales" ]; const globalExportMethods = ["t", "rt", "d", "n", "tm"]; function injectGlobalFields(app2, composer) { const i18n2 = /* @__PURE__ */ Object.create(null); globalExportProps.forEach((prop) => { const desc = Object.getOwnPropertyDescriptor(composer, prop); if (!desc) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const wrap = vue.isRef(desc.value) ? { get() { return desc.value.value; }, // eslint-disable-next-line @typescript-eslint/no-explicit-any set(val) { desc.value.value = val; } } : { get() { return desc.get && desc.get(); } }; Object.defineProperty(i18n2, prop, wrap); }); app2.config.globalProperties.$i18n = i18n2; globalExportMethods.forEach((method) => { const desc = Object.getOwnPropertyDescriptor(composer, method); if (!desc || !desc.value) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } Object.defineProperty(app2.config.globalProperties, `$${method}`, desc); }); } { initFeatureFlags(); } { const target = getGlobalThis(); target.__INTLIFY__ = true; setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__); } const settings$1 = "Settings"; const agreement$1 = "User privacy Agreement"; const user_management$1 = "User management"; const role_management$1 = "Role management"; const menu_management$1 = "Menu management"; const post_management$1 = "Position management"; const org_management$1 = "Organization management"; const add_user$1 = "Add a user"; const about$1 = "About"; const common$1 = { letcgo: "letcgo", home: "Home", category: "Category", cart: "Cart", my: "My", product: "Product", review: "Review", detail: "Detail", view_all: "View All", none: "None", all: "All", search_products: "Search Products", buy_now: "Buy Now", sold: "Sold", sales_volume: "Sales Volume", go_buy: "Go Buy", add_to_cart: "Add to Cart", redeem_now: "Redeem Now", sold_out: "Sold Out", product_not_exist: "Product not available or has been removed", awaiting_your_first_review: "Awaiting Your First Review", browse_more: "Browse More", select_product_options: "Please Select Product Options", favorite: "Favorite", unfavorite: "Unfavorite", favorite_success: "Favorite Success", points: "Points", cancel: "Cancel", confirm: "Confirm", submit: "Submit", save: "Save", "delete": "Delete", edit: "Edit", close: "Close", back: "Back", next: "Next", previous: "Previous", yes: "Yes", no: "No", ok: "OK", post: "Post", loading: "Loading...", refresh: "Refresh", search: "Search", reset: "Reset", add: "Add", update: "Update", upload: "Upload", download: "Download", level: "Level", no_level: "No Level", select: "Select", select_product_specification: "Please Select Product Specification", clear: "Clear", delete_footprint: "Delete Footprint", select_all: "Select All", my_footprints: "My Footprints", total_goods: "Total {number} items", recommended: "Recommended", price_asc: "Price Low-High", price_desc: "Price High-Low", sales: "Sales", newest: "Newest", enter_keywords: "Enter Keywords", checkout: "Checkout", total: "Total", "default": "Default", empty_cart: "Your cart is empty, go shop around!", select_area: "Select Area", click_to_load_more: "Click to Load More", system: "System", current_version: "Current Version", local_cache: "Local Cache", about_us: "About Us", logout_account: "Log Out", confirm_logout: "Confirm Log Out?", no_data: "No Data", uploading: "Uploading", verifying: "Verifying", fetching: "Fetching", save_success: "Save Successful", update_success: "Update Successful", logging_in: "Logging In", login_success: "Login Successful", registering: "Registering", register_success: "Registration Successful", sending: "Sending", send_success: "Send Successful", binding: "Binding", bind_success: "Bind Successful", unbind: "Unbinding", unbind_success: "Unbind Successful", claiming: "Claiming", claim_success: "Claim Successful", collect_success: "Collect Successful", cancel_success: "Cancel Successful", delete_success: "Delete Successful", clear_success: "Clear Successful", apply_success: "Apply Successful", change_success: "Change Successful", added_to_cart: "Added to Cart", just_now: "Just Now", minutes_ago: "{m} Minutes Ago", hours_ago: "{h} Hours Ago", days_ago: "{d} Days Ago", months_ago: "{m} Months Ago", years_ago: "{y} Years Ago", copy_success: "Copy Successful!", copy_fail: "Copy Failed!", sms_error: "SMS Sending Error", try_later: "Please Try Later", phone_format_error: "Incorrect Phone Format", get_verification_code: "Get Code", use_wechat_browser: "Please Open in WeChat Browser", platform_not_supported: "Platform Not Supported", payment_manually_cancelled: "Payment Manually Cancelled", alipay_payment: "Alipay Payment", copy_link_to_browser: "Copy Link to Browser", copy_link: "Copy Link", wechat_payment: "WeChat Payment", bind_wechat_for_payment: "Bind WeChat for Payment", bind: "Bind", balance_payment: "Balance Payment", mock_payment: "Mock Payment", update_prompt: "Update Prompt", new_version_ready: "New Version Ready, Restart Now?", latest_version: "Latest Version", server_error_try_later: "Server Error, Please Try Later", network_request_error: "Network Request Error", request_error: "Request Error", login_expired: "Your Login Has Expired", please_login: "Please Log In", access_denied: "Access Denied", request_timeout: "Request Timeout", frequent_requests: "Frequent Requests, Please Try Later", server_unavailable: "Service Unimplemented", network_error: "Network Error", service_unavailable: "Service Unavailable", network_timeout: "Network Timeout", http_not_supported: "HTTP Version Not Supported", server_exception: "Server Exception", check_network_connection: "Check Your Network Connection", not_bound_wechat: "WeChat Not Bound, Please Bind First", platform_intro: "Platform Intro", industry_intro: "Industry Intro", latest_news: "Latest News", shared_mall: "Shared Mall", activities: "Activities", videos: "Videos", mall: "Mall", shop_index: "Shop Index", shop_category: "Shop Category", all_product: "All Product" }; const account$1 = { account_login: "Account Login", sms_login: "SMS Login", register: "Register", read_and_agree: "I have read and agree to the", user_agreement: "User Agreement", privacy_policy: "Privacy Policy", and: "and", wechat_authorization_login: "WeChat Authorization Login", wechat_authorization_register: "WeChat Authorization Register", please_agree: "Please check to agree", register_by_sharing_only: "You can only register via sharing", quick_login_failed: "Quick Login Failed", username: "Username", password: "Password", enter_username: "Enter Username", enter_valid_username: "Please enter a valid username!", enter_password: "Enter Password", login: "Login", phone_number: "Phone", verification_code: "Verification Code", enter_verification_code: "Enter Verification Code", get_verification_code: "Get Code", incorrect_phone_format: "Incorrect Phone Format", enter_phone_number: "Enter Phone Number", username_exists: "Username Already Exists!", change_phone_number: "Change Phone", bind_phone_number: "Bind Phone", old_phone_number: "Old Phone", enter_old_phone_number: "Enter Old Phone", security_notice: "For security, use your personal phone number", new_phone_number: "New Phone", enter_new_phone_number: "Enter New Phone", login_again: "Update Successful, Log In Again", change_password: "Change Password", cancel_change: "Cancel Change", password_requirements: "6-12 chars with letters & numbers", modification_successful: "Successful Update", authorization_info: "Authorization Info", complete_profile: "Complete Your Profile", avatar: "Avatar", select_avatar: "Select Avatar", nickname: "Nickname", enter_nickname: "Enter Nickname", confirm_authorization: "Confirm Authorization", authorization_successful: "Authorization Successful", first_time_login: "First-time Login, Verify Phone", continue_login: "Continue Login", change_alipay_account: "Change Alipay Account", bind_alipay_account: "Bind Alipay Account", bind_realname_alipay: "Bind Real-name Verified Alipay Account", name: "Name", enter_name: "Enter Name", account: "Account", enter_account: "Enter Account", change_bank_card: "Change Bank Card", bind_bank_card: "Bind Bank Card", bank_branch: "Bank Branch", bank_branch_example: "E.g., XX Bank Ltd. XX Branch", account_holder: "Account Holder", account_holder_name: "Holder's Name", bank_account_number: "Bank Account Number", select_account_login: "Select Account Login", wechat_no_bind: "This WeChat is not linked to any account, please use another login method", wechat_register: "WeChat Register", wechat_no_account: "Your WeChat has no account, please register via sharing" }; const review$1 = { all_reviews: "All Reviews", positive: "Positive", neutral: "Neutral", negative: "Negative" }; const confirm$1 = { confirm_order: "Confirm Order", shipping_fee: "Shipping Fee", free_shipping: "Free Shipping", order_note: "Order Note", communication_advice: "Contact seller first", quantity: "Quantity", price_details: "Price Details", total_price: "Total Price", total_items: "Total {count} items", commission_deduction: "Commission Deduction", deduction: "Deduct {count} yuan", no_commission: "No Commission Use", consumption_point_deduction: "Point Use", no_consumption_points: "No Consumption Points", total_items_count: "Total {count} items", submit_order: "Submit Order", select_shipping_address: "Select Shipping Address", insufficient_commission: "Insufficient Commission", insufficient_consumption_points: "Insufficient Consumption Points", commission_points_no_mix: "Cannot Combine Commission with Consumption Points" }; const address$1 = { select_shipping_address: "Select Shipping Address", shipping_address: "Shipping Address", import_wechat_address: "Import from WeChat", add_new_shipping_address: "Add Address", no_shipping_address: "No Shipping Address", edit_address: "Edit Address", add_address: "Add Address", recipient: "Recipient", enter_recipient_name: "Enter Recipient's Name", province_city_district: "Province/City/District", select_province_city_district: "Select Province/City/District", detailed_address: "Detailed Address", enter_detailed_address: "Enter Detailed Address", set_as_default_address: "Set as Default Address", confirm_delete_address: "Confirm Delete This Address?", virtual_goods_address: "Virtual Address", edit_virtual_address: "Edit Virtual Address", add_virtual_address: "Add Virtual Address", set_as_default_virtual_address: "Set as Default Virtual Address" }; const selectSku$1 = { insufficient_stock: "Insufficient Stock", select_specification: "Select Specification", amount_less_than_min: "Amount Less Than Minimum Purchase", insufficient_points: "Insufficient Points", min_points_required: "Minimum of 1 Point Required", purchase_quantity: "Purchase Quantity", purchase_amount: "Purchase Amount", available_points: "Available Points: {points}" }; const cashier$1 = { cashier: "Cashier", select_payment_method: "Select Payment Method", phone_number: "Phone Number", enter_phone_number: "Enter Phone Number", verification_code: "Verification Code", enter_verification_code: "Enter Verification Code", checking_payment_environment: "Checking Payment Environment", payment_expired: "Payment Expired", pay_now: "Pay Now", verification_code_cannot_be_empty: "Verification Code Cannot Be Empty", choose_payment_method: "Choose Payment Method", order_paid: "Order Paid", no_payment_order_found: "No Payment Order Found", remaining_payment_time: "Remaining Payment Time {h}:{m}:{s}" }; const share$1 = { share: "Share", poster_loading: "Poster Loading...", long_press_to_save: "Long Press to Save", save_success: "Save Successful", save_failure: "Save Failed" }; const merchant$1 = { merchant_registration: "Merchant Signup", merchant_name: "Merchant Name", enter_merchant_name: "Enter Merchant Name", contact_person: "Contact Person", enter_contact_person: "Enter Contact Person", contact_phone: "Contact Phone", enter_contact_phone: "Enter Contact Phone", legal_person: "Legal Representative", enter_legal_person: "Enter Legal Representative", legal_person_phone: "Legal Representative Phone", enter_legal_person_phone: "Enter Legal Representative Phone", legal_person_id_front: "Legal ID Front", legal_person_id_back: "Legal ID Back", location: "Location", email: "Email", enter_email: "Enter Email", office_address: "Office Address", enter_office_address: "Enter Office Address", rights_phone: "Rights Phone", enter_rights_phone: "Enter Rights Phone", customer_service_phone: "Customer Service Phone", enter_customer_service_phone: "Enter Customer Service Phone", website: "Website", enter_website: "Enter Website", bank: "Bank", enter_bank: "Enter Bank", account_name: "Account Name", enter_account_name: "Enter Account Name", account_number: "Account Number", enter_account_number: "Enter Account Number", business_license: "Business License", brand_authorization: "Brand Authorization", download_template: "Download Template", other_certificates: "Other Certificates", introduction: "Introduction", enter_introduction: "Enter Introduction", status: "Status", review_in_progress: "Review in Progress", review_records: "Review Records", changes: "Changes", save_and_submit: "Save and Submit", existing_merchant_alert: "Existing merchant account for user ({user}), please apply with a different account!", merchant_name_required: "Merchant name is required", introduction_required: "Introduction is required", contact_required: "Contact is required", contact_phone_required: "Contact phone is required", customer_service_phone_required: "Customer service phone is required", legal_person_required: "Legal representative is required", legal_person_phone_required: "Legal representative phone is required", account_name_required: "Account name is required", account_number_required: "Account number is required", bank_required: "Bank is required", under_review: "Under Review", approved: "Approved", rejected: "Rejected", non_exclusive_authorization: "Non-exclusive Brand Authorization", select_location: "Select Location", select_legal_person_id_front: "Select Upload of Legal ID Front (National Emblem)", select_legal_person_id_back: "Select Upload of Legal ID Back (Portrait)", upload_business_license: "Upload Business License", upload_brand_authorization: "Upload Brand Authorization" }; const useGoods$1 = { redeemed: "Redeemed", in_stock: "In Stock", pending_payment: "Pending Payment", awaiting_shipment: "Awaiting Shipment", awaiting_write_off: "Awaiting Write-off", awaiting_delivery: "Awaiting Delivery", awaiting_review: "Awaiting Review", completed: "Completed", closed: "Closed", complete_payment_by: "Please complete the payment by {time}", merchant_not_shipped: "Merchant has not shipped yet, please be patient", merchant_shipped: "Merchant has shipped, please be patient", goods_received: "Goods received, go leave a review", transaction_completed: "Transaction completed, thank you for your support", transaction_closed: "Transaction closed", apply_for_after_sales: "Apply for after-sales", goods_awaiting_return: "Goods awaiting return", merchant_awaiting_goods: "Merchant awaiting goods", waiting_for_refund: "Waiting for refund", refund_successful: "Refund successful", buyer_cancelled: "Buyer cancelled", merchant_refused: "Merchant refused", merchant_refused_goods: "Merchant refused to receive goods", unknown_status: "Unknown status", refund_request_awaiting_merchant: "Refund request awaiting merchant", return_goods_fill_logistics: "Return goods and fill logistics information", return_refund_request_awaiting_merchant: "Return and refund request awaiting merchant", refund_closed: "Refund closed", merchant_disagrees_with_refund_request: "Merchant disagrees with refund request, reason:", merchant_refuses_to_accept_goods: "Merchant refuses to accept goods, disagrees with refund, reason:" }; const menu$1 = { quick_menu: "Quick Menu", search: "Search", personal_center: "Center", shopping_cart: "Cart", browsing_history: "History", my_favorites: "Favorites", customer_service: "Service" }; const user$3 = { name: "Name", username: "Username", nickname: "Nickname", password: "Password", confirm_password: "Confirm password", email: "Email", phone: "Phone", avatar: "Avatar", status: "Status", create_time: "Create time", update_time: "Update time", last_login_time: "Last login time", last_login_ip: "Last login ip", clear_cache: "Clera cache", switch_language: "Switch language", log_out: "Log out", change: "Change", sex: "Sex", male: "Male", female: "Female", user_info: "User Information", unbind_reminder: "Unbinding Reminder", please_login: "Please Login" }; const wallet$1 = { wallet: "Wallet", balance: "Balance", commission: "Commission", consumption_points: "Consumption", team: "Team", people: "People", generation_rules: "Net Worth Rules", benefits: "Net Worth Benefits", recharge: "Recharge", withdraw: "Withdraw", transfer_points: "Transfer Points", points_transfer: "Points Transfer", current_peak: "Current Peak Available:", commission_record: "Commission Record", points_record: "Points Record", withdrawal: "Withdrawal (expected within 24 hours)", commission_rules: "Commission Calculation Rules", exceed_limit: "Exceed Limit", withdrawal_records: "Withdrawal Records", wechat: "WeChat", alipay: "Alipay", bank_card: "Bank Card", credited: "Credited", withdrawal_failed: "Withdrawal Failed", withdrawing: "Withdrawing", select_withdrawal_method: "Select Withdrawal Method", not_bound_click_to_bind: "Not Bound, Click to Bind", withdrawal_amount: "Withdrawal Amount", actual_amount_received: "Actual Amount Received", note: "Note: Actual received amount {commission}, consumption points {consumption}.No withdrawal fee", withdraw_to_wechat: "Withdraw to WeChat", withdraw_to_alipay: "Withdraw to Alipay", withdraw_to_bank_card: "Withdraw to Bank Card", please_select_withdrawal_method: "Please Select Withdrawal Method", enter_withdrawal_amount: "Enter Withdrawal Amount", alipay_not_bound: "Alipay Account Not Bound", bank_card_not_bound: "Bank Card Not Bound", go_bind: "Go Bind", application_successful: "Application Successful", current_exchangeable_amount: "Your Current Exchangeable Amount:", commission_to_points: "Convert to Points", enter_transfer_amount: "Enter Transfer Amount", current_commission_available: "Current Commission Available", transfer_amount_cannot_be_empty: "Conversion Amount Cannot Be Empty", transfer_amount_cannot_be_zero: "Conversion Amount Must Be Greater Than Zero", commission_to_points_irreversible: "Conversion to points is irreversible. Proceed?", conversion_successful: "Conversion Successful", points_recharge: "Points Recharge", recharge_amount: "Recharge Amount", enter_recharge_amount: "Enter Recharge Amount", actual_points_received: "Actual Points Received", note_recharge_bonus: "Note: Recharge {amount} yuan or more to get {multiplier} times the points", recharge_amount_less_than: "Recharge Amount Cannot Be Less Than {point}", recipient: "Recipient", enter_recipient_username: "Enter Recipient's Username", recipient_phone: "Recipient's Phone", enter_recipient_phone: "Enter Recipient's Phone Number", transfer_amount: "Transfer Amount", current_transferable_amount: "Current Transferable Amount:", recipient_cannot_be_empty: "Recipient Cannot Be Empty", recipient_phone_cannot_be_empty: "Recipient's Phone Cannot Be Empty", verification_code_cannot_be_empty: "Verification Code Cannot Be Empty", transfer_amount_less_than_zero: "Transfer Amount Must Be Greater Than Zero", recipient_cannot_be_self: "Recipient Cannot Be Yourself", user_does_not_exist: "User Does Not Exist!", username_phone_mismatch: "Recipient's Username and Phone Number Do Not Match!", cannot_transfer_to_self: "Cannot Transfer to Oneself", transfer_successful: "Transfer Successful" }; const team$1 = { total_people: "Total {count} People", retain_performance: "Keep Score", referrer: "Referrer", direct_referral: "Direct Referral", team_count: "Team: {count} People", new_performance_value: "New Score", no_team_members: "No Team Members" }; const sign$1 = { check_in: "Check-in", check_in_gift: "Gift with Check-in", consecutive_check_ins: "Consecutive Check-ins:", sunday: "Sun", monday: "Mon", tuesday: "Tue", wednesday: "Wed", thursday: "Thu", friday: "Fri", saturday: "Sat", days: "Days", month_year: "{month}/{year}", already_checked_in: "Already Checked In", check_in_description: "Check-in Description", daily_check_in_fixed: "Daily check-in earns {social} social value", congratulations_on_check_in: "Congratulations on Successful Check-in", check_in_not_started: "Check-in Event Has Not Started", daily_check_in_reward: "Earn {social} Points of Social Value for Daily Check-in", level_upgraded: "Your Level has been Upgraded to {level}" }; const order$1 = { payment_result: "Payment Result", payment_successful: "Payment Successful", payment_failed: "Payment Failed", order_closed: "Order Closed", checking_payment_result: "Checking Payment Result...", return_home: "Return Home", retry_payment: "Retry Payment", view_order: "View Order", view_wallet: "View Wallet", my_group_buying: "My Group Buying", get_realtime_shipping_info: "Get Real-time Shipping and Order Status", subscribe_now: "Subscribe Now", pending_payment: "Pay Now", pending_shipment: "To Ship", pending_receipt: "To Receive", pending_review: "To Review", all_orders: "All", my_orders: "My Orders", no_orders: "No Orders", order_number: "Order Number", total_items: "Total {count} Items", total_amount: "Total Amount", group_details: "Group Buying Details", view_details: "View Details", view_logistics: "View Logistics", confirm_receipt: "Confirm Receipt", cancel_order: "Cancel", review_order: "Review", delete_order: "Delete", continue_payment: "Continue Payment", confirm_receipt_question: "Confirm Receipt?", upgrade_wechat: "Please Upgrade WeChat Version", confirm_cancel_order: "Are You Sure You Want to Cancel the Order?", confirm_delete_order: "Are You Sure You Want to Delete the Order?", order_details: "Order Details", apply_for_service: "Apply for Service", refund_in_progress: "Refund in Progress", refund_successful: "Refund Successful", copy: "Copy", customer_message: "Customer Message", order_time: "Order Time", payment_time: "Payment Time", payment_method: "Payment Method", shipping_fee: "Shipping Fee", use_commission: "Use Commission", use_points: "Use Points", discount_amount: "Discount Amount", paid: "Paid", amount_due: "Amount Due", refunded: "Refunded", cancel_request: "Cancel Request", fill_return: "Fill Return", confirm_cancel_request: "Are You Sure You Want to Cancel This Request?", not_logged_in: "You are not logged in, please log in as {user} to continue", account_switch_needed: "You are currently logged in as {user}, please switch to {user} to proceed", product_quality: "Product Quality", service_attitude: "Service Attitude", meet_expectations: "Did the item meet your expectations? Share your experience to help others decide.", confirm_post_review: "Post Review?", missing_order_info: "Missing order information, please check", no_reviews_pending: "No Reviews Pending", after_sales_list: "After-Sales List", apply_for_after_sales: "Apply for Service", reason_for_application: "Reason for Application", select_reason_for_application: "Select a Reason", customer_prompt: "Please describe your issue, photo upload recommended", contact_customer_service: "Contact Support", select_after_sales_type: "Select Service Type", please_fill_in_description: "Please Fill in the Description", after_sales_details: "After-Sales Details", total_refund: "Total Refund", refund_amount: "Refund Amount", refund_commission: "Refund Commission", refund_points: "Refund Points", service_order_number: "Service Id", application_time: "Application Time", after_sales_type: "After-Sales Type", application_reason: "Application Reason", related_description: "Related Description", no_after_sales_details: "No After-Sales Details for This Order", submit_application: "Apply Now", processing: "Processing", completed: "Completed", refund_only: "Refund Only", refund_and_return: "Refund and Return", after_sales_progress: "After-Sales Progress", logistics_tracking: "Logistics Tracking", tracking_number: "Track #", courier_company: "Courier", shipping_time: "Shipped" }; const setting$1 = { signature: "Personal Signature", set: "Settings", bind: "Bind", unbind: "Unbind", physical_address_management: "Physical Address Management", virtual_address_management: "Virtual Address Management", alipay_account: "Alipay Account", bank_card: "Bank Card", enter_platform: "Enter Platform", enter_merchant_backend: "Enter Merchant Backend", my_qrcode: "My QR Code", third_party_account_binding: "Third-party Account Binding", wechat_public_account: "WeChat Public Account", wechat_mini_program: "WeChat Mini Program", wechat_open_platform: "WeChat Open Platform", prompt: "Prompt", confirm_logout: "Confirm logout?" }; const pop$1 = { confirm: "Confirm", cancel: "Cancel", Commission: { usingCommission: "Using Commission", availableCommission: "Your available commission", currentOrderTotalPrice: "Current order price ", canUseMaxCommission: ", maximum ", commission: " commission can be used" }, ConsumptionPoints: { usingPoints: "Using Consumption Points", availablePoints: "Your available consumption points", currentOrderTotalPrice: "Current order price ", canUseMaxPoints: ", maximum ", points: " consumption points can be used" }, congratulations: "Congratulations", commission_earned: "Commission Earned", social_value_earned: "Social Value Earned", order_success: "Order Successful", auto_checkin_success: "Congratulations! Auto Check-in Successful!", daily_checkin_reward: "Earned {point} Points for Daily Check-in", level_upgraded: "Your Level has been Upgraded to", follow_public_account: "Follow Our Public Account", long_press_qrcode_follow: "Long Press QR Code to Follow Public Account", wechat_friend: "WeChat Friend", create_poster: "Create Poster", copy_link: "Copy Link" }; const rules$1 = { username: "Please enter your username", username_taken: "Username is already taken!", usernameNotnull: "Username cannot be empty", nickname: "Please enter your nickname", nicknameNotnull: "Nickname cannot be empty", password: "Please enter your password", passwordNotnull: "Password cannot be empty", confirm_password: "Please confirm your password", confirmPasswordNotnull: "Confirm password cannot be empty", email: "Please enter your email", emailNotnull: "Email cannot be empty", phone: "Please enter your phone number", phoneNotnull: "Phone number cannot be empty", avatar: "Please upload your avatar", avatarNotnull: "Avatar cannot be empty", sex: "Please select your gender", sexNotnull: "Gender cannot be empty", password_error: "Passwords do not match", click_change_password: "Click to change password", modify_success: "Modification successful, please log in again", unbind_warning: "After unbinding, you will no longer be able to log in to this account via WeChat", bind_phone: "Please bind your phone number", enter_username: "Enter Username", username_required: "Username Required", enter_phone: "Enter Phone Number", incorrect_phone_format: "Incorrect Phone Format", enter_password: "Enter Password", password_requirements: "6-12 chars with letters & numbers", enter_verification_code: "Enter Verification Code", enter_name: "Enter Name", enter_chinese_characters: "Enter Chinese Characters", enter_invoice_title: "Enter Invoice Title", enter_tax_number: "Enter Tax Number", enter_bank: "Enter Bank", enter_bank_card_number: "Enter Bank Card Number", correct_bank_card_number: "Enter Correct Bank Card Number", enter_alipay_account: "Enter Alipay Account", correct_account_number: "Enter Correct Account", enter_email: "Enter Email", correct_email: "Enter Correct Email" }; const en$3 = { "lang.en": "EngLish", "lang.zh-hans": "简体中文", settings: settings$1, agreement: agreement$1, user_management: user_management$1, role_management: role_management$1, menu_management: menu_management$1, post_management: post_management$1, org_management: org_management$1, add_user: add_user$1, about: about$1, "title.home": "Home", "title.userinfo": "User Information", "title.settings": "Settings", "title.usercenter": "User Center", "title.product_category": "Categories", "title.cart": "Cart", "title.search": "Search", "title.product_details": "Details", "title.group_buying": "Group Buy", "title.flash_sale": "Flash Sale", "title.product_list": "Products", "title.rate_product": "Rate Product", "title.product_reviews": "Reviews", "title.order_details": "Order Details", "title.confirm_order": "Confirm Order", "title.my_orders": "My Orders", "title.apply_service": "After-Sales", "title.return_logistics": "Return Logistics", "title.after_sales_list": "After-Sales", "title.after_sales_details": "Service Details", "title.after_sales_progress": "Service Progress", "title.logistics_tracking": "Tracking", "title.share": "Share", "title.my_favorites": "Favorites", "title.my_footprints": "Footprints", "title.physical_address": "Shipping Address", "title.virtual_address": "Virtual Address", "title.edit_invoice": "Edit Invoice", "title.manage_invoice": "Manage Invoice", "title.edit_address": "Edit Address", "title.my_balance": "My Balance", "title.wallet": "Wallet", "title.points_source": "Points Source", "title.points_recharge": "Points Recharge", "title.points_transfer": "Points Transfer", "title.commission_to_points": "Convert to Points", "title.withdraw": "Withdraw", "title.withdraw_records": "Withdrawals", "title.commission_exchange": "Exchange", "title.team": "Team", "title.distribution": "Distribution", "title.my_commission": "My Commission", "title.promote_products": "Promote", "title.distribution_orders": "Dist. Orders", "title.my_team": "My Team", "title.promoter_ranking": "Promoter Rank", "title.commission_ranking": "Commission Rank", "title.apply_withdraw": "Withdraw", "title.check_in_center": "Check-In", "title.shop_home": "Shop Home", "title.system_settings": "Settings", "title.rich_text": "Rich Text", "title.faq": "FAQ", "title.error_page": "Error Page", "title.coupon_center": "Coupons", "title.coupons": "Coupons", "title.customer_service": "Support", "title.checkout": "Checkout", "title.fuiou_result": "Payment Result", "title.payment_result": "Payment Result", "title.recharge_balance": "Recharge", "title.recharge_records": "Recharge History", "title.group_details": "Group Details", "title.my_groups": "My Groups", "title.marketing_products": "Marketing", "title.group_activities": "Group Activities", "title.seckill_activities": "Seckill", "title.bargain_list": "Bargain List", "title.bargain_details": "Bargain Details", common: common$1, account: account$1, review: review$1, confirm: confirm$1, address: address$1, selectSku: selectSku$1, cashier: cashier$1, share: share$1, merchant: merchant$1, useGoods: useGoods$1, menu: menu$1, user: user$3, wallet: wallet$1, team: team$1, sign: sign$1, order: order$1, setting: setting$1, pop: pop$1, rules: rules$1 }; const settings = "设置"; const agreement = "用户隐私协议"; const user_management = "用户管理"; const role_management = "角色管理"; const menu_management = "菜单管理"; const post_management = "岗位管理"; const org_management = "组织管理"; const add_user = "新增用户"; const about = "关于"; const common = { letcgo: "常来此购", home: "首页", category: "分类", cart: "购物车", my: "我的", product: "商品", review: "评价", detail: "详情", view_all: "查看全部", none: "无", all: "全部", search_products: "搜索商品", buy_now: "立即购买", sold: "已售", sales_volume: "销量", go_buy: "去购买", add_to_cart: "加入购物车", redeem_now: "立即兑换", sold_out: "已售罄", product_not_exist: "商品不存在或已下架", awaiting_your_first_review: "期待您的第一个评价", browse_more: "再逛逛", select_product_options: "请选择商品规格", favorite: "收藏", unfavorite: "取消收藏", favorite_success: "收藏成功", points: "积分", cancel: "取消", confirm: "确定", submit: "提交", save: "保存", "delete": "删除", edit: "编辑", close: "关闭", back: "返回", next: "下一步", previous: "上一步", yes: "是", no: "否", ok: "好的", post: "发布", loading: "加载中...", refresh: "刷新", search: "搜索", reset: "重置", add: "添加", update: "更新", upload: "上传", download: "下载", level: "等级", no_level: "无等级", select: "选择", select_product_specification: "请选择商品规格", clear: "清空", delete_footprint: "删除足迹", select_all: "全选", my_footprints: "我的足迹", total_goods: "共 {number} 件商品", recommended: "综合推荐", price_asc: "价格升序", price_desc: "价格降序", sales: "销量", newest: "新品优先", enter_keywords: "请输入关键词", checkout: "去结算", total: "合计", "default": "默认", empty_cart: "购物车空空如也,快去逛逛吧~", select_area: "选择区域", click_to_load_more: "点击加载更多", system: "系统", current_version: "当前版本", local_cache: "本地缓存", about_us: "关于我们", logout_account: "注销账号", confirm_logout: "确认注销账号?", no_data: "暂无数据", uploading: "上传中", verifying: "验证中", fetching: "获取中", save_success: "保存成功", update_success: "更新成功", logging_in: "登录中", login_success: "登录成功", registering: "注册中", register_success: "注册成功", sending: "发送中", send_success: "发送成功", binding: "绑定中", bind_success: "绑定成功", unbind: "解除绑定", unbind_success: "解绑成功", claiming: "领取中", claim_success: "领取成功", collect_success: "收藏成功", cancel_success: "取消成功", delete_success: "删除成功", clear_success: "清空成功", apply_success: "申请成功", change_success: "变动成功", added_to_cart: "已添加到购物车", just_now: "刚刚", minutes_ago: "{m}分钟前", hours_ago: "{h}小时前", days_ago: "{d}天前", months_ago: "{m}个月前", years_ago: "{y}年前", copy_success: "复制成功!", copy_fail: "复制失败!", sms_error: "短信发送事件错误", try_later: "请稍后再试", phone_format_error: "手机号码格式不正确", get_verification_code: "获取验证码", use_wechat_browser: "请使用微信网页浏览器打开", platform_not_supported: "暂不支持该平台", payment_manually_cancelled: "支付已手动取消", alipay_payment: "支付宝支付", copy_link_to_browser: "复制链接到外部浏览器", copy_link: "复制链接", wechat_payment: "微信支付", bind_wechat_for_payment: "请先绑定微信再使用微信支付", bind: "绑定", balance_payment: "余额支付", mock_payment: "模拟支付", update_prompt: "更新提示", new_version_ready: "新版本已经准备好,是否重启应用?", latest_version: "当前为最新版本", server_error_try_later: "服务器开小差啦,请稍后再试~", network_request_error: "网络请求出错", request_error: "请求出错", login_expired: "您的登陆已过期", please_login: "请登录", access_denied: "拒绝访问", request_timeout: "请求超时", frequent_requests: "请求频繁, 请稍后再访问", server_unavailable: "服务未实现", network_error: "网络错误", service_unavailable: "服务不可用", network_timeout: "网络超时", http_not_supported: "HTTP 版本不受支持", server_exception: "服务器异常", check_network_connection: "请检查您的网络连接", not_bound_wechat: "您未绑定微信,请先绑定", platform_intro: "平台简介", industry_intro: "产业介绍", latest_news: "最新资讯", shared_mall: "共享商城", activities: "活动", videos: "视频", mall: "商城", shop_index: "店铺首页", shop_category: "店铺分类", all_product: "所有商品" }; const account = { account_login: "账号登录", sms_login: "短信登录", register: "注册", read_and_agree: "我已阅读并遵守", user_agreement: "《用户协议》", privacy_policy: "《隐私协议》", and: "与", wechat_authorization_login: "微信授权登录", wechat_authorization_register: "微信授权注册", please_agree: "请勾选同意", register_by_sharing_only: "您只能通过分享注册", quick_login_failed: "快捷登录失败", username: "用户名", password: "密码", enter_username: "请输入用户名", enter_valid_username: "请输入正确的用户名!", enter_password: "请输入密码", login: "登录", phone_number: "手机号", verification_code: "验证码", enter_verification_code: "请输入验证码", get_verification_code: "获取验证码", incorrect_phone_format: "手机号码格式不正确", enter_phone_number: "请输入手机号", username_exists: "已存在用户名!", change_phone_number: "更换手机号", bind_phone_number: "绑定手机号", old_phone_number: "原手机号", enter_old_phone_number: "请输入原手机号", security_notice: "为了您的账号安全,请使用本人手机号码", new_phone_number: "新手机号", enter_new_phone_number: "请输入新手机号", login_again: "修改成功,请重新登录", change_password: "修改密码", cancel_change: "取消修改", password_requirements: "需包含字母和数字,长度在6-12之间", modification_successful: "修改成功", authorization_info: "授权信息", complete_profile: "完善您的头像、昵称、手机号", avatar: "头像", select_avatar: "请选择头像", nickname: "昵称", enter_nickname: "请输入昵称", confirm_authorization: "确认授权", authorization_successful: "授权成功", first_time_login: "您首次登录,请输入手机号验证", continue_login: "继续登录", change_alipay_account: "更换支付宝账号", bind_alipay_account: "绑定支付宝账号", bind_realname_alipay: "请绑定已实名认证的支付宝账号", name: "名称", enter_name: "请输入名称", account: "账号", enter_account: "请输入账号", change_bank_card: "更换银行卡", bind_bank_card: "绑定银行卡", bank_branch: "开户行", bank_branch_example: "例:xx银行股份有限公司xx分行xx支行", account_holder: "开户名", account_holder_name: "个人姓名", bank_account_number: "银行卡账号", select_account_login: "请选择账号登录", wechat_no_bind: "该微信暂绑定无账号,请使用其他登陆方式", wechat_register: "微信注册", wechat_no_account: "您的微信没有账号,请先注册" }; const review = { all_reviews: "全部评价", positive: "好评", neutral: "中评", negative: "差评" }; const confirm = { confirm_order: "确认订单", shipping_fee: "运费", free_shipping: "包邮", order_note: "订单备注", communication_advice: "建议留言前先与商家沟通", quantity: "数量", price_details: "价格明细", total_price: "商品总价", total_items: "共{count}件商品", commission_deduction: "佣金抵扣", deduction: "抵扣{count}元", no_commission: "不使用佣金", consumption_point_deduction: "消费分抵扣", no_consumption_points: "不使用消费分", total_items_count: "共{count}件", submit_order: "提交订单", select_shipping_address: "请选择收货地址", insufficient_commission: "可用佣金不足", insufficient_consumption_points: "可用消费分不足", commission_points_no_mix: "佣金不能搭配消费分使用" }; const address = { select_shipping_address: "请选择收货地址", shipping_address: "收货地址", import_wechat_address: "导入微信地址", add_new_shipping_address: "新增收货地址", no_shipping_address: "暂无收货地址", edit_address: "编辑地址", add_address: "新增地址", recipient: "收货人", enter_recipient_name: "请填写收货人姓名", province_city_district: "省市区", select_province_city_district: "请选择省市区", detailed_address: "详细地址", enter_detailed_address: "请输入详细地址", set_as_default_address: "设为默认地址", confirm_delete_address: "确认删除此收货地址吗?", virtual_goods_address: "虚拟商品收货地址", edit_virtual_address: "编辑虚拟地址", add_virtual_address: "新增虚拟地址", set_as_default_virtual_address: "设为默认虚拟地址" }; const selectSku = { insufficient_stock: "库存不足", select_specification: "请选择规格", amount_less_than_min: "输入金额少于可购买数量", insufficient_points: "可用积分不足", min_points_required: "最低使用1积分", purchase_quantity: "购买数量", purchase_amount: "购买金额", available_points: "当前可用积分:{points}" }; const cashier = { cashier: "收银台", select_payment_method: "选择支付方式", phone_number: "手机号", enter_phone_number: "请输入手机号", verification_code: "验证码", enter_verification_code: "请输入验证码", checking_payment_environment: "检测支付环境中", payment_expired: "支付已过期", pay_now: "立即支付", verification_code_cannot_be_empty: "验证码不能为空", choose_payment_method: "请选择支付方式", order_paid: "该订单已支付", no_payment_order_found: "未查询到支付单信息", remaining_payment_time: "剩余支付时间 {h}:{m}:{s}" }; const share = { share: "分享", poster_loading: "海报加载中...", long_press_to_save: "长按图片保存", save_success: "保存成功", save_failure: "保存失败" }; const merchant = { merchant_registration: "商家入驻", merchant_name: "商家名称", enter_merchant_name: "请输入商家名称", contact_person: "联络人", enter_contact_person: "请输入联络人", contact_phone: "联络人手机号", enter_contact_phone: "请输入联络人手机号", legal_person: "法人", enter_legal_person: "请输入法人", legal_person_phone: "法人手机号", enter_legal_person_phone: "请输入法人手机号", legal_person_id_front: "法人身份证正面", legal_person_id_back: "法人身份证反面", location: "所在地", email: "邮箱", enter_email: "请输入邮箱", office_address: "办公地址", enter_office_address: "请输入办公地址", rights_phone: "维权电话", enter_rights_phone: "请输入维权电话", customer_service_phone: "客服电话", enter_customer_service_phone: "请输入客服电话", website: "官网", enter_website: "请输入官网", bank: "开户银行", enter_bank: "请输入开户银行", account_name: "账户名称", enter_account_name: "请输入账户名称", account_number: "账户号码", enter_account_number: "请输入账户号码", business_license: "营业执照", brand_authorization: "品牌授权书", download_template: "下载模板", other_certificates: "其他证书", introduction: "简介", enter_introduction: "请输入简介", status: "状态", review_in_progress: "审核中", review_records: "审核记录", changes: "变动", save_and_submit: "保存并提交", existing_merchant_alert: "当前用户({user}),已存在商户账号,请更换账号申请!", merchant_name_required: "商户名称不能为空", introduction_required: "简介不能为空", contact_required: "联络人不能为空", contact_phone_required: "联络人手机号不能为空", customer_service_phone_required: "客服电话不能为空", legal_person_required: "法人不能为空", legal_person_phone_required: "法人电话不能为空", account_name_required: "账户名称不能为空", account_number_required: "账户号码不能为空", bank_required: "开户银行不能为空", under_review: "审核中", approved: "通过", rejected: "拒绝", non_exclusive_authorization: "非独家品牌授权书", select_location: "请选择所在地", select_legal_person_id_front: "请选择上传法人身份证正面(国徽面)", select_legal_person_id_back: "请选择上传法人身份证背面(人像面)", upload_business_license: "请上传营业执照", upload_brand_authorization: "请上传品牌授权书" }; const useGoods = { redeemed: "已兑换", in_stock: "库存", pending_payment: "待付款", awaiting_shipment: "待发货", awaiting_write_off: "待核销", awaiting_delivery: "待收货", awaiting_review: "待评价", completed: "已完成", closed: "已关闭", complete_payment_by: "请在 {time} 前完成支付", merchant_not_shipped: "商家未发货,请耐心等待", merchant_shipped: "商家已发货,请耐心等待", goods_received: "已收货,快去评价一下吧", transaction_completed: "交易完成,感谢您的支持", transaction_closed: "交易关闭", apply_for_after_sales: "申请售后", goods_awaiting_return: "商品待退货", merchant_awaiting_goods: "商家待收货", waiting_for_refund: "等待退款", refund_successful: "退款成功", buyer_cancelled: "买家取消", merchant_refused: "商家拒绝", merchant_refused_goods: "商家拒收货", unknown_status: "未知状态", refund_request_awaiting_merchant: "退款申请待商家处理", return_goods_fill_logistics: "请退货并填写物流信息", return_refund_request_awaiting_merchant: "退货退款申请待商家处理", refund_closed: "退款关闭", merchant_disagrees_with_refund_request: "商家不同意退款申请,拒绝原因:", merchant_refuses_to_accept_goods: "商家拒绝收货,不同意退款,拒绝原因:" }; const menu = { quick_menu: "快捷菜单", search: "搜索", personal_center: "个人中心", shopping_cart: "购物车", browsing_history: "浏览记录", my_favorites: "我的收藏", customer_service: "客服" }; const user$2 = { name: "名称", username: "用户名", nickname: "昵称", password: "密码", confirm_password: "确认密码", email: "邮箱", phone: "手机号", avatar: "头像", status: "状态", create_time: "创建时间", update_time: "更新时间", last_login_time: "最后登录时间", last_login_ip: "最后登录IP", clear_cache: "清理缓存", switch_language: "切换语言", log_out: "退出登录", change: "修改", sex: "性别", male: "男", female: "女", user_info: "用户信息", unbind_reminder: "解绑提醒", please_login: "请登录" }; const wallet = { wallet: "钱包", balance: "余额", commission: "佣金", consumption_points: "消费分", team: "团队", people: "人", generation_rules: "身价产生规则", benefits: "身价权益", recharge: "充值", withdraw: "提现", transfer_points: "转消费分", points_transfer: "消费分转让", current_peak: "当前可获得峰值:", commission_record: "佣金记录", points_record: "消费分记录", withdrawal: "提现 (预计24小时左右到账)", commission_rules: "佣金计算规则", exceed_limit: "超出额度", withdrawal_records: "提现记录", wechat: "微信", alipay: "支付宝", bank_card: "银行卡", credited: "已到账", withdrawal_failed: "提现失败", withdrawing: "提现中", select_withdrawal_method: "选择提现方式", not_bound_click_to_bind: "暂未绑定,点击绑定", withdrawal_amount: "提现金额", actual_amount_received: "实到金额", note: "备注:实际到账金额{commission},消费分{consumption}。免提现手续费", withdraw_to_wechat: "提现到微信", withdraw_to_alipay: "提现到支付宝", withdraw_to_bank_card: "提现到银行卡", please_select_withdrawal_method: "请选择提现方式", enter_withdrawal_amount: "请输入提现金额", alipay_not_bound: "未绑定支付宝账号", bank_card_not_bound: "未绑定银行卡", go_bind: "去绑定", application_successful: "申请成功", current_exchangeable_amount: "您当前可兑换金额:", commission_to_points: "佣金转消费分", enter_transfer_amount: "请输入转让金额", current_commission_available: "您当前可转换的佣金额度", transfer_amount_cannot_be_zero: "转换金额不能小于等于0", commission_to_points_irreversible: "佣金转为消费分后不可逆,是否转换?", conversion_successful: "转换成功", points_recharge: "消费分充值", recharge_amount: "充值金额", enter_recharge_amount: "请输入充值金额", actual_points_received: "实到消费分", note_recharge_bonus: "备注:充值{amount}元及以上,可获得{multiplier}倍消费分", recharge_amount_less_than: "充值金额不能少于{point}", recipient: "接收人", enter_recipient_username: "请输入接收人用户名", recipient_phone: "接收人手机号", enter_recipient_phone: "请输入接收人手机号", transfer_amount: "转让金额", current_transferable_amount: "您当前可转让的金额:", recipient_cannot_be_empty: "接收人不能为空", recipient_phone_cannot_be_empty: "接收人手机号不能为空", verification_code_cannot_be_empty: "验证码不能为空", transfer_amount_cannot_be_empty: "转让金额不能为空", transfer_amount_less_than_zero: "转让金额不能小于等于0", recipient_cannot_be_self: "接收人不能为自己", user_does_not_exist: "用户不存在!", username_phone_mismatch: "接收人用户名与手机号不匹配!", cannot_transfer_to_self: "不能给自己转账", transfer_successful: "转账成功" }; const team = { total_people: "共{count}人", retain_performance: "保留绩效值", referrer: "推荐人", direct_referral: "直推人", team_count: "团队:{count}人", new_performance_value: "新增绩效值:", no_team_members: "暂无团队成员" }; const sign = { check_in: "签到", check_in_gift: "签到有礼", consecutive_check_ins: "已连续签到", days: "天", sunday: "日", monday: "一", tuesday: "二", wednesday: "三", thursday: "四", friday: "五", saturday: "六", month_year: "{year}年{month}月", already_checked_in: "已签到", check_in_description: "签到说明", daily_check_in_fixed: "每日签到固定 {social} 身价", congratulations_on_check_in: "恭喜签到成功", check_in_not_started: "签到活动还未开始", daily_check_in_reward: "获得每日签到{social}点身价", level_upgraded: "您已升级等级为{level}" }; const order = { payment_result: "支付结果", payment_successful: "支付成功", payment_failed: "支付失败", order_closed: "该订单已关闭", checking_payment_result: "检测支付结果...", return_home: "返回首页", retry_payment: "重新支付", view_order: "查看订单", view_wallet: "查看钱包", my_group_buying: "我的拼团", get_realtime_shipping_info: "获取实时发货信息与订单状态", subscribe_now: "立即订阅", pending_payment: "待付款", pending_shipment: "待发货", pending_receipt: "待收货", pending_review: "待评价", all_orders: "全部订单", my_orders: "我的订单", no_orders: "暂无订单", order_number: "订单号", total_items: "共 {count} 件商品", total_amount: "总金额", group_details: "拼团详情", view_details: "查看详情", view_logistics: "查看物流", confirm_receipt: "确认收货", cancel_order: "取消订单", review_order: "评价", delete_order: "删除订单", continue_payment: "继续支付", confirm_receipt_question: "确认收货?", upgrade_wechat: "请升级微信版本", confirm_cancel_order: "确定要取消订单吗?", confirm_delete_order: "确定要删除订单吗?", order_details: "订单详情", apply_for_service: "申请售后", refund_in_progress: "退款中", refund_successful: "退款成功", copy: "复制", customer_message: "用户留言", order_time: "下单时间", payment_time: "支付时间", payment_method: "支付方式", shipping_fee: "运费", use_commission: "使用佣金", use_points: "使用消费分", discount_amount: "优惠金额", paid: "已付款", amount_due: "需付款", refunded: "已退款", cancel_request: "取消申请", fill_return: "填写退货", confirm_cancel_request: "确定要取消此申请吗", not_logged_in: "您尚未登录,请登录: {user}后再试", account_switch_needed: "您当前登录的账号是{user},请切换到{user}后再试", product_quality: "商品质量", service_attitude: "服务态度", meet_expectations: "宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~", confirm_post_review: "发布评论?", missing_order_info: "缺少订单信息,请检查", no_reviews_pending: "无待评价订单", after_sales_list: "售后列表", apply_for_after_sales: "申请售后", reason_for_application: "申请原因", select_reason_for_application: "请选择申请原因", customer_prompt: "客官~请描述您遇到的问题,建议上传照片", contact_customer_service: "联系客服", select_after_sales_type: "请选择售后类型", please_fill_in_description: "请填写相关描述", after_sales_details: "售后详情", total_refund: "退款总额", refund_amount: "退款金额", refund_commission: "退款佣金", refund_points: "退款消费分", service_order_number: "服务单号", application_time: "申请时间", after_sales_type: "售后类型", application_reason: "申请原因", related_description: "相关描述", no_after_sales_details: "暂无该订单售后详情", submit_application: "提交申请", processing: "处理中", completed: "完成", refund_only: "仅退款", refund_and_return: "退款退货", after_sales_progress: "售后进度", logistics_tracking: "物流追踪", tracking_number: "快递单号", courier_company: "快递公司", shipping_time: "发货时间" }; const setting = { signature: "个性签名", set: "设置", bind: "绑定", unbind: "解绑", physical_address_management: "实体收货地址管理", virtual_address_management: "虚拟收货地址管理", alipay_account: "支付宝账号", bank_card: "银行卡", enter_platform: "进入平台", enter_merchant_backend: "进入商家后台", my_qrcode: "我的二维码", third_party_account_binding: "第三方账号绑定", wechat_public_account: "微信公众号", wechat_mini_program: "微信小程序", wechat_open_platform: "微信开放平台", prompt: "提示", confirm_logout: "确认退出账号?" }; const pop = { confirm: "确定", cancel: "取消", Commission: { usingCommission: "使用佣金", availableCommission: "您的可用佣金", currentOrderTotalPrice: "当前订单价格", canUseMaxCommission: ",可使用最高", commission: "佣金" }, ConsumptionPoints: { usingPoints: "使用消费分", availablePoints: "您的可用消费分", currentOrderTotalPrice: "当前订单价格", canUseMaxPoints: ",可使用最高", points: "消费分" }, congratulations: "恭喜", commission_earned: "获得佣金", social_value_earned: "获得身价", order_success: "下单成功", auto_checkin_success: "恭喜!自动签到成功!", daily_checkin_reward: "获得每日签到{point}点身价", level_upgraded: "您已升级等级为", follow_public_account: "关注公众号", long_press_qrcode_follow: "长按二维码关注公众号", wechat_friend: "微信好友", create_poster: "生成海报", copy_link: "复制链接" }; const rules = { username: "请输入用户名", username_taken: "用户名已被使用!", usernameNotnull: "用户名不能为空", nickname: "请输入昵称", nicknameNotnull: "昵称不能为空", password: "请输入密码", passwordNotnull: "密码不能为空", confirm_password: "请确认密码", confirmPasswordNotnull: "确认密码不能为空", email: "请输入邮箱", emailNotnull: "邮箱不能为空", phone: "请输入手机号", phoneNotnull: "手机号不能为空", avatar: "请上传头像", avatarNotnull: "头像不能为空", sex: "请选择性别", sexNotnull: "性别不能为空", password_error: "两次密码不一致", click_change_password: "点击修改密码", bind_phone: "请绑定手机号", unbind_warning: "解绑后您将无法通过微信登录此账号", modify_success: "修改成功,请重新登录", enter_username: "请输入用户名", username_required: "用户名不能为空", enter_phone: "请输入手机号", enter_password: "请输入密码", password_requirements: "需包含字母和数字,长度在6-12之间", enter_verification_code: "请输入验证码", enter_name: "请输入姓名", enter_chinese_characters: "请输入汉字", enter_invoice_title: "请输入发票抬头名称", enter_tax_number: "请输入税号", enter_bank: "请输入开户行", enter_bank_card_number: "请输入银行卡号", correct_bank_card_number: "请输入正确的银行卡号", enter_alipay_account: "请输入支付宝账号", correct_account_number: "请输入正确账号", enter_email: "请输入邮箱", correct_email: "请输入正确邮箱账号" }; const zhHans$3 = { "lang.en": "EngLish", "lang.zh-hans": "简体中文", settings, agreement, user_management, role_management, menu_management, post_management, org_management, add_user, about, "title.home": "首页", "title.userinfo": "用户信息", "title.settings": "用户设置", "title.usercenter": "用户中心", "title.product_category": "商品分类", "title.cart": "购物车", "title.search": "搜索", "title.product_details": "商品详情", "title.group_buying": "拼团商品", "title.flash_sale": "秒杀商品", "title.product_list": "商品列表", "title.rate_product": "评价商品", "title.product_reviews": "商品评价", "title.order_details": "订单详情", "title.confirm_order": "确认订单", "title.my_orders": "我的订单", "title.apply_service": "申请售后", "title.return_logistics": "退货物流", "title.after_sales_list": "售后列表", "title.after_sales_details": "售后详情", "title.after_sales_progress": "售后进度", "title.logistics_tracking": "物流轨迹", "title.share": "分享", "title.my_favorites": "我的收藏", "title.my_footprints": "我的足迹", "title.physical_address": "实体商品收货地址", "title.virtual_address": "虚拟商品收货地址", "title.edit_invoice": "发票抬头编辑", "title.manage_invoice": "发票抬头管理", "title.edit_address": "编辑地址", "title.my_balance": "我的余额", "title.wallet": "钱包", "title.points_source": "消费分来源", "title.points_recharge": "消费分充值", "title.points_transfer": "消费分转账", "title.commission_to_points": "佣金转消费分", "title.withdraw": "提现", "title.withdraw_records": "提现记录", "title.commission_exchange": "佣金兑换", "title.team": "团队", "title.distribution": "分销", "title.my_commission": "我的佣金", "title.promote_products": "推广商品", "title.distribution_orders": "分销订单", "title.my_team": "我的团队", "title.promoter_ranking": "推广人排行榜", "title.commission_ranking": "佣金排行榜", "title.apply_withdraw": "申请提现", "title.check_in_center": "签到中心", "title.shop_home": "店铺", "title.system_settings": "系统设置", "title.rich_text": "富文本", "title.faq": "常见问题", "title.error_page": "错误页面", "title.coupon_center": "领券中心", "title.coupons": "优惠券", "title.customer_service": "客服", "title.checkout": "收银台", "title.fuiou_result": "富友支付结果", "title.payment_result": "支付结果", "title.recharge_balance": "充值余额", "title.recharge_records": "充值记录", "title.group_details": "拼团详情", "title.my_groups": "我的拼团", "title.marketing_products": "营销商品", "title.group_activities": "拼团活动", "title.seckill_activities": "秒杀活动", "title.bargain_list": "砍价列表", "title.bargain_details": "砍价详情", common, account, review, confirm, address, selectSku, cashier, share, merchant, useGoods, menu, user: user$2, wallet, team, sign, order, setting, pop, rules }; const userLanguage = vue.ref(uni.getLocale() || "en-US"); uni.setStorageSync("userLanguage", userLanguage.value); const i18n = createI18n({ locale: userLanguage.value, fallbackLocale: "en-US", messages: { "en": en$3, "zh-Hans": zhHans$3 } }); async function setLanguage(language) { userLanguage.value = language; uni.setStorageSync("userLanguage", language); uni.setLocale(language); location.reload(); } function t$6(key, params) { return i18n.global.t(key, params); } const SocialApi = { // 获得社交用户 getSocialUser: (type) => { return request$1({ url: "/member/social-user/get", method: "GET", params: { type }, custom: { showLoading: false } }); }, // 社交绑定 socialBind: (type, code2, state) => { return request$1({ url: "/member/social-user/bind", method: "POST", data: { type, code: code2, state }, custom: { custom: { showSuccess: true, loadingMsg: t$6("common.binding"), successMsg: t$6("common.bind_success") } } }); }, // 社交绑定 socialUnbind: (type, openid) => { return request$1({ url: "/member/social-user/unbind", method: "DELETE", data: { type, openid }, custom: { showLoading: false, loadingMsg: t$6("common.unbind"), successMsg: t$6("common.unbind_success") } }); } }; const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: SocialApi }, Symbol.toStringTag, { value: "Module" })); const socialType = 32; const load$1 = async () => { }; const login$1 = () => { return new Promise(async (resolve, reject) => { const loginRes = await uni.login({ provider: "weixin", onlyAuthorize: true }); debugger; if (loginRes.errMsg == "login:ok") { const res = await third.wechat.login({ platform: "openPlatform", shareInfo: uni.getStorageSync("shareLog") || {}, payload: encodeURIComponent( JSON.stringify({ code: loginRes.code }) ) }); if (res.error === 0) { resolve(true); } } else { uni.showToast({ icon: "none", title: loginRes.errMsg }); } resolve(false); }); }; async function getInfo() { const { code: code2, data } = await SocialApi.getSocialUser(socialType); if (code2 !== 0) { return void 0; } return data; } const service$1 = { load: load$1, login: login$1, getInfo }; const wechat = service$1; const login = () => { return new Promise(async (resolve, reject) => { await uni.login({ provider: "apple", success: () => { uni.getUserInfo({ provider: "apple", success: async (res) => { if (res.errMsg === "getUserInfo:ok") { const payload = res.userInfo; const { error: error2 } = await third.apple.login({ payload, shareInfo: uni.getStorageSync("shareLog") || {} }); if (error2 === 0) { resolve(true); } else { resolve(false); } } } }); }, fail: (err) => { resolve(false); } }); }); }; const service = { login }; let apple = {}; if (typeof service !== "undefined") { apple = service; } const apple$1 = apple; function email$1(value) { return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value); } function mobile$1(value) { return /^1[3456789]\d{9}$/.test(value); } function url(value) { return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test( value ); } function date(value) { if (!value) return false; if (number(value)) value = +value; return !/Invalid|NaN/.test(new Date(value).toString()); } function dateISO(value) { return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value); } function number(value) { return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value); } function digits(value) { return /^\d+$/.test(value); } function idCard(value) { return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value); } function carNo(value) { const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/; if (value.length === 7) { return creg.test(value); } if (value.length === 8) { return xreg.test(value); } return false; } function amount(value) { return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value); } function chinese(value) { const reg = /^[\u4e00-\u9fa5]+$/gi; return reg.test(value); } function letter(value) { return /^[a-zA-Z]*$/.test(value); } function enOrNum(value) { const reg = /^[0-9a-zA-Z]*$/g; return reg.test(value); } function contains(value, param) { return value.indexOf(param) >= 0; } function range$1(value, param) { return value >= param[0] && value <= param[1]; } function rangeLength(value, param) { return value.length >= param[0] && value.length <= param[1]; } function landline(value) { const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; return reg.test(value); } function empty(value) { switch (typeof value) { case "undefined": return true; case "string": if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0) return true; break; case "boolean": if (!value) return true; break; case "number": if (value === 0 || isNaN(value)) return true; break; case "object": if (value === null || value.length === 0) return true; for (const i2 in value) { return false; } return true; } return false; } function jsonString(value) { if (typeof value === "string") { try { const obj = JSON.parse(value); if (typeof obj === "object" && obj) { return true; } return false; } catch (e2) { return false; } } return false; } function array(value) { if (typeof Array.isArray === "function") { return Array.isArray(value); } return Object.prototype.toString.call(value) === "[object Array]"; } function object(value) { return Object.prototype.toString.call(value) === "[object Object]"; } function code$1(value, len = 6) { return new RegExp(`^\\d{${len}}$`).test(value); } const test$1 = { email: email$1, mobile: mobile$1, url, date, dateISO, number, digits, idCard, carNo, amount, chinese, letter, enOrNum, contains, range: range$1, rangeLength, empty, isEmpty: empty, isNumber: number, jsonString, landline, object, array, code: code$1 }; function strip(num, precision = 15) { return +parseFloat(Number(num).toPrecision(precision)); } function digitLength(num) { const eSplit = num.toString().split(/[eE]/); const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0); return len > 0 ? len : 0; } function float2Fixed(num) { if (num.toString().indexOf("e") === -1) { return Number(num.toString().replace(".", "")); } const dLen = digitLength(num); return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num); } function checkBoundary(num) { { if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) { formatAppLog("warn", "at sheep/helper/digit.js:45", `${num} 超出了精度限制,结果可能不正确`); } } } function iteratorOperation(arr, operation) { const [num1, num2, ...others] = arr; let res = operation(num1, num2); others.forEach((num) => { res = operation(res, num); }); return res; } function times(...nums) { if (nums.length > 2) { return iteratorOperation(nums, times); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); const baseNum = digitLength(num1) + digitLength(num2); const leftValue = num1Changed * num2Changed; checkBoundary(leftValue); return leftValue / Math.pow(10, baseNum); } function divide(...nums) { if (nums.length > 2) { return iteratorOperation(nums, divide); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); checkBoundary(num1Changed); checkBoundary(num2Changed); return times( num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))) ); } function round(num, ratio) { const base = Math.pow(10, ratio); let result2 = divide(Math.round(Math.abs(times(num, base))), base); if (num < 0 && result2 !== 0) { result2 = times(result2, -1); } return result2; } var weixinJsSdk = { exports: {} }; !function(e2, n2) { weixinJsSdk.exports = n2(e2); }(typeof window === "object" && window, function(r2, e2) { if (!r2) { formatAppLog("warn", "at node_modules/weixin-js-sdk/index.js:5", "can't use weixin-js-sdk in server side"); return; } var a2, c2, n2, i2, t2, o2, s2, d2, l2, u2, p2, f2, m2, g2, h2, S2, y2, I2, v2, _2, w2, T2; if (!r2.jWeixin) return a2 = { config: "preVerifyJSAPI", onMenuShareTimeline: "menu:share:timeline", onMenuShareAppMessage: "menu:share:appmessage", onMenuShareQQ: "menu:share:qq", onMenuShareWeibo: "menu:share:weiboApp", onMenuShareQZone: "menu:share:QZone", previewImage: "imagePreview", getLocation: "geoLocation", openProductSpecificView: "openProductViewWithPid", addCard: "batchAddCard", openCard: "batchViewCard", chooseWXPay: "getBrandWCPayRequest", openEnterpriseRedPacket: "getRecevieBizHongBaoRequest", startSearchBeacons: "startMonitoringBeacons", stopSearchBeacons: "stopMonitoringBeacons", onSearchBeacons: "onBeaconsInRange", consumeAndShareCard: "consumedShareCard", openAddress: "editAddress" }, c2 = function() { var e3, n3 = {}; for (e3 in a2) n3[a2[e3]] = e3; return n3; }(), n2 = r2.document, i2 = n2.title, t2 = navigator.userAgent.toLowerCase(), f2 = navigator.platform.toLowerCase(), o2 = !(!f2.match("mac") && !f2.match("win")), s2 = -1 != t2.indexOf("wxdebugger"), d2 = -1 != t2.indexOf("micromessenger"), l2 = -1 != t2.indexOf("android"), u2 = -1 != t2.indexOf("iphone") || -1 != t2.indexOf("ipad"), p2 = (f2 = t2.match(/micromessenger\/(\d+\.\d+\.\d+)/) || t2.match(/micromessenger\/(\d+\.\d+)/)) ? f2[1] : "", m2 = { initStartTime: L2(), initEndTime: 0, preVerifyStartTime: 0, preVerifyEndTime: 0 }, g2 = { version: 1, appId: "", initTime: 0, preVerifyTime: 0, networkType: "", isPreVerifyOk: 1, systemType: u2 ? 1 : l2 ? 2 : -1, clientVersion: p2, url: encodeURIComponent(location.href) }, h2 = {}, S2 = { _completes: [] }, y2 = { state: 0, data: {} }, O2(function() { m2.initEndTime = L2(); }), I2 = false, v2 = [], _2 = { config: function(e3) { C2("config", h2 = e3); var o3 = false !== h2.check; O2(function() { if (o3) k( a2.config, { verifyJsApiList: A2(h2.jsApiList), verifyOpenTagList: A2(h2.openTagList) }, (S2._complete = function(e5) { m2.preVerifyEndTime = L2(), y2.state = 1, y2.data = e5; }, S2.success = function(e5) { g2.isPreVerifyOk = 0; }, S2.fail = function(e5) { S2._fail ? S2._fail(e5) : y2.state = -1; }, (t3 = S2._completes).push(function() { B2(); }), S2.complete = function(e5) { for (var n4 = 0, i4 = t3.length; n4 < i4; ++n4) t3[n4](); S2._completes = []; }, S2) ), m2.preVerifyStartTime = L2(); else { y2.state = 1; for (var e4 = S2._completes, n3 = 0, i3 = e4.length; n3 < i3; ++n3) e4[n3](); S2._completes = []; } var t3; }), _2.invoke || (_2.invoke = function(e4, n3, i3) { r2.WeixinJSBridge && WeixinJSBridge.invoke(e4, P2(n3), i3); }, _2.on = function(e4, n3) { r2.WeixinJSBridge && WeixinJSBridge.on(e4, n3); }); }, ready: function(e3) { (0 != y2.state || (S2._completes.push(e3), !d2 && h2.debug)) && e3(); }, error: function(e3) { p2 < "6.0.2" || (-1 == y2.state ? e3(y2.data) : S2._fail = e3); }, checkJsApi: function(e3) { k( "checkJsApi", { jsApiList: A2(e3.jsApiList) }, (e3._complete = function(e4) { l2 && (i3 = e4.checkResult) && (e4.checkResult = JSON.parse(i3)); var n3, i3 = e4, t3 = i3.checkResult; for (n3 in t3) { var o3 = c2[n3]; o3 && (t3[o3] = t3[n3], delete t3[n3]); } }, e3) ); }, onMenuShareTimeline: function(e3) { M2( a2.onMenuShareTimeline, { complete: function() { k( "shareTimeline", { title: e3.title || i2, desc: e3.title || i2, img_url: e3.imgUrl || "", link: e3.link || location.href, type: e3.type || "link", data_url: e3.dataUrl || "" }, e3 ); } }, e3 ); }, onMenuShareAppMessage: function(n3) { M2( a2.onMenuShareAppMessage, { complete: function(e3) { "favorite" === e3.scene ? k("sendAppMessage", { title: n3.title || i2, desc: n3.desc || "", link: n3.link || location.href, img_url: n3.imgUrl || "", type: n3.type || "link", data_url: n3.dataUrl || "" }) : k( "sendAppMessage", { title: n3.title || i2, desc: n3.desc || "", link: n3.link || location.href, img_url: n3.imgUrl || "", type: n3.type || "link", data_url: n3.dataUrl || "" }, n3 ); } }, n3 ); }, onMenuShareQQ: function(e3) { M2( a2.onMenuShareQQ, { complete: function() { k( "shareQQ", { title: e3.title || i2, desc: e3.desc || "", img_url: e3.imgUrl || "", link: e3.link || location.href }, e3 ); } }, e3 ); }, onMenuShareWeibo: function(e3) { M2( a2.onMenuShareWeibo, { complete: function() { k( "shareWeiboApp", { title: e3.title || i2, desc: e3.desc || "", img_url: e3.imgUrl || "", link: e3.link || location.href }, e3 ); } }, e3 ); }, onMenuShareQZone: function(e3) { M2( a2.onMenuShareQZone, { complete: function() { k( "shareQZone", { title: e3.title || i2, desc: e3.desc || "", img_url: e3.imgUrl || "", link: e3.link || location.href }, e3 ); } }, e3 ); }, updateTimelineShareData: function(e3) { k( "updateTimelineShareData", { title: e3.title, link: e3.link, imgUrl: e3.imgUrl }, e3 ); }, updateAppMessageShareData: function(e3) { k( "updateAppMessageShareData", { title: e3.title, desc: e3.desc, link: e3.link, imgUrl: e3.imgUrl }, e3 ); }, startRecord: function(e3) { k("startRecord", {}, e3); }, stopRecord: function(e3) { k("stopRecord", {}, e3); }, onVoiceRecordEnd: function(e3) { M2("onVoiceRecordEnd", e3); }, playVoice: function(e3) { k("playVoice", { localId: e3.localId }, e3); }, pauseVoice: function(e3) { k("pauseVoice", { localId: e3.localId }, e3); }, stopVoice: function(e3) { k("stopVoice", { localId: e3.localId }, e3); }, onVoicePlayEnd: function(e3) { M2("onVoicePlayEnd", e3); }, uploadVoice: function(e3) { k( "uploadVoice", { localId: e3.localId, isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1 }, e3 ); }, downloadVoice: function(e3) { k( "downloadVoice", { serverId: e3.serverId, isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1 }, e3 ); }, translateVoice: function(e3) { k( "translateVoice", { localId: e3.localId, isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1 }, e3 ); }, chooseImage: function(e3) { k( "chooseImage", { scene: "1|2", count: e3.count || 9, sizeType: e3.sizeType || ["original", "compressed"], sourceType: e3.sourceType || ["album", "camera"] }, (e3._complete = function(e4) { if (l2) { var n3 = e4.localIds; try { n3 && (e4.localIds = JSON.parse(n3)); } catch (e5) { } } }, e3) ); }, getLocation: function(e3) { e3 = e3 || {}, k( a2.getLocation, { type: e3.type || "wgs84" }, (e3._complete = function(e4) { delete e4.type; }, e3) ); }, previewImage: function(e3) { k(a2.previewImage, { current: e3.current, urls: e3.urls }, e3); }, uploadImage: function(e3) { k( "uploadImage", { localId: e3.localId, isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1 }, e3 ); }, downloadImage: function(e3) { k( "downloadImage", { serverId: e3.serverId, isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1 }, e3 ); }, getLocalImgData: function(e3) { false === I2 ? (I2 = true, k( "getLocalImgData", { localId: e3.localId }, (e3._complete = function(e4) { var n3; I2 = false, 0 < v2.length && (n3 = v2.shift(), wx.getLocalImgData(n3)); }, e3) )) : v2.push(e3); }, getNetworkType: function(e3) { k( "getNetworkType", {}, (e3._complete = function(e4) { var n3 = e4, e4 = n3.errMsg, i3 = (n3.errMsg = "getNetworkType:ok", n3.subtype); if (delete n3.subtype, i3) n3.networkType = i3; else { var i3 = e4.indexOf(":"), t3 = e4.substring(i3 + 1); switch (t3) { case "wifi": case "edge": case "wwan": n3.networkType = t3; break; default: n3.errMsg = "getNetworkType:fail"; } } }, e3) ); }, openLocation: function(e3) { k( "openLocation", { latitude: e3.latitude, longitude: e3.longitude, name: e3.name || "", address: e3.address || "", scale: e3.scale || 28, infoUrl: e3.infoUrl || "" }, e3 ); }, hideOptionMenu: function(e3) { k("hideOptionMenu", {}, e3); }, showOptionMenu: function(e3) { k("showOptionMenu", {}, e3); }, closeWindow: function(e3) { k("closeWindow", {}, e3 = e3 || {}); }, hideMenuItems: function(e3) { k("hideMenuItems", { menuList: e3.menuList }, e3); }, showMenuItems: function(e3) { k("showMenuItems", { menuList: e3.menuList }, e3); }, hideAllNonBaseMenuItem: function(e3) { k("hideAllNonBaseMenuItem", {}, e3); }, showAllNonBaseMenuItem: function(e3) { k("showAllNonBaseMenuItem", {}, e3); }, scanQRCode: function(e3) { k( "scanQRCode", { needResult: (e3 = e3 || {}).needResult || 0, scanType: e3.scanType || ["qrCode", "barCode"] }, (e3._complete = function(e4) { var n3; u2 && (n3 = e4.resultStr) && (n3 = JSON.parse(n3), e4.resultStr = n3 && n3.scan_code && n3.scan_code.scan_result); }, e3) ); }, openAddress: function(e3) { k( a2.openAddress, {}, (e3._complete = function(e4) { (e4 = e4).postalCode = e4.addressPostalCode, delete e4.addressPostalCode, e4.provinceName = e4.proviceFirstStageName, delete e4.proviceFirstStageName, e4.cityName = e4.addressCitySecondStageName, delete e4.addressCitySecondStageName, e4.countryName = e4.addressCountiesThirdStageName, delete e4.addressCountiesThirdStageName, e4.detailInfo = e4.addressDetailInfo, delete e4.addressDetailInfo; }, e3) ); }, openProductSpecificView: function(e3) { k( a2.openProductSpecificView, { pid: e3.productId, view_type: e3.viewType || 0, ext_info: e3.extInfo }, e3 ); }, addCard: function(e3) { for (var n3 = e3.cardList, i3 = [], t3 = 0, o3 = n3.length; t3 < o3; ++t3) { var r3 = n3[t3], r3 = { card_id: r3.cardId, card_ext: r3.cardExt }; i3.push(r3); } k( a2.addCard, { card_list: i3 }, (e3._complete = function(e4) { if (n4 = e4.card_list) { for (var n4, i4 = 0, t4 = (n4 = JSON.parse(n4)).length; i4 < t4; ++i4) { var o4 = n4[i4]; o4.cardId = o4.card_id, o4.cardExt = o4.card_ext, o4.isSuccess = !!o4.is_succ, delete o4.card_id, delete o4.card_ext, delete o4.is_succ; } e4.cardList = n4, delete e4.card_list; } }, e3) ); }, chooseCard: function(e3) { k( "chooseCard", { app_id: h2.appId, location_id: e3.shopId || "", sign_type: e3.signType || "SHA1", card_id: e3.cardId || "", card_type: e3.cardType || "", card_sign: e3.cardSign, time_stamp: e3.timestamp + "", nonce_str: e3.nonceStr }, (e3._complete = function(e4) { e4.cardList = e4.choose_card_info, delete e4.choose_card_info; }, e3) ); }, openCard: function(e3) { for (var n3 = e3.cardList, i3 = [], t3 = 0, o3 = n3.length; t3 < o3; ++t3) { var r3 = n3[t3], r3 = { card_id: r3.cardId, code: r3.code }; i3.push(r3); } k(a2.openCard, { card_list: i3 }, e3); }, consumeAndShareCard: function(e3) { k( a2.consumeAndShareCard, { consumedCardId: e3.cardId, consumedCode: e3.code }, e3 ); }, chooseWXPay: function(e3) { k(a2.chooseWXPay, x(e3), e3), B2({ jsApiName: "chooseWXPay" }); }, openEnterpriseRedPacket: function(e3) { k(a2.openEnterpriseRedPacket, x(e3), e3); }, startSearchBeacons: function(e3) { k(a2.startSearchBeacons, { ticket: e3.ticket }, e3); }, stopSearchBeacons: function(e3) { k(a2.stopSearchBeacons, {}, e3); }, onSearchBeacons: function(e3) { M2(a2.onSearchBeacons, e3); }, openEnterpriseChat: function(e3) { k( "openEnterpriseChat", { useridlist: e3.userIds, chatname: e3.groupName }, e3 ); }, launchMiniProgram: function(e3) { k( "launchMiniProgram", { targetAppId: e3.targetAppId, path: function(e4) { var n3; if ("string" == typeof e4 && 0 < e4.length) return n3 = e4.split("?")[0], n3 += ".html", void 0 !== (e4 = e4.split("?")[1]) ? n3 + "?" + e4 : n3; }(e3.path), envVersion: e3.envVersion }, e3 ); }, openBusinessView: function(e3) { k( "openBusinessView", { businessType: e3.businessType, queryString: e3.queryString || "", envVersion: e3.envVersion }, (e3._complete = function(n3) { if (l2) { var e4 = n3.extraData; if (e4) try { n3.extraData = JSON.parse(e4); } catch (e5) { n3.extraData = {}; } } }, e3) ); }, miniProgram: { navigateBack: function(e3) { e3 = e3 || {}, O2(function() { k( "invokeMiniProgramAPI", { name: "navigateBack", arg: { delta: e3.delta || 1 } }, e3 ); }); }, navigateTo: function(e3) { O2(function() { k( "invokeMiniProgramAPI", { name: "navigateTo", arg: { url: e3.url } }, e3 ); }); }, redirectTo: function(e3) { O2(function() { k( "invokeMiniProgramAPI", { name: "redirectTo", arg: { url: e3.url } }, e3 ); }); }, switchTab: function(e3) { O2(function() { k( "invokeMiniProgramAPI", { name: "switchTab", arg: { url: e3.url } }, e3 ); }); }, reLaunch: function(e3) { O2(function() { k( "invokeMiniProgramAPI", { name: "reLaunch", arg: { url: e3.url } }, e3 ); }); }, postMessage: function(e3) { O2(function() { k( "invokeMiniProgramAPI", { name: "postMessage", arg: e3.data || {} }, e3 ); }); }, getEnv: function(e3) { O2(function() { e3({ miniprogram: "miniprogram" === r2.__wxjs_environment }); }); } } }, w2 = 1, T2 = {}, n2.addEventListener( "error", function(e3) { var n3, i3, t3; l2 || (t3 = (n3 = e3.target).tagName, i3 = n3.src, "IMG" != t3 && "VIDEO" != t3 && "AUDIO" != t3 && "SOURCE" != t3) || -1 != i3.indexOf("wxlocalresource://") && (e3.preventDefault(), e3.stopPropagation(), (t3 = n3["wx-id"]) || (t3 = w2++, n3["wx-id"] = t3), T2[t3] || (T2[t3] = true, wx.ready(function() { wx.getLocalImgData({ localId: i3, success: function(e4) { n3.src = e4.localData; } }); }))); }, true ), n2.addEventListener( "load", function(e3) { var n3; l2 || (n3 = (e3 = e3.target).tagName, e3.src, "IMG" != n3 && "VIDEO" != n3 && "AUDIO" != n3 && "SOURCE" != n3) || (n3 = e3["wx-id"]) && (T2[n3] = false); }, true ), e2 && (r2.wx = r2.jWeixin = _2), _2; else return r2.jWeixin; function k(n3, e3, i3) { r2.WeixinJSBridge ? WeixinJSBridge.invoke(n3, P2(e3), function(e4) { V2(n3, e4, i3); }) : C2(n3, i3); } function M2(n3, i3, t3) { r2.WeixinJSBridge ? WeixinJSBridge.on(n3, function(e3) { t3 && t3.trigger && t3.trigger(e3), V2(n3, e3, i3); }) : C2(n3, t3 || i3); } function P2(e3) { return (e3 = e3 || {}).appId = h2.appId, e3.verifyAppId = h2.appId, e3.verifySignType = "sha1", e3.verifyTimestamp = h2.timestamp + "", e3.verifyNonceStr = h2.nonceStr, e3.verifySignature = h2.signature, e3; } function x(e3) { return { timeStamp: e3.timestamp + "", nonceStr: e3.nonceStr, package: e3.package, paySign: e3.paySign, signType: e3.signType || "SHA1" }; } function V2(e3, n3, i3) { "openEnterpriseChat" != e3 && "openBusinessView" !== e3 || (n3.errCode = n3.err_code), delete n3.err_code, delete n3.err_desc, delete n3.err_detail; var t3 = n3.errMsg, e3 = (t3 || (t3 = n3.err_msg, delete n3.err_msg, t3 = function(e4, n4) { var i4 = c2[e4]; i4 && (e4 = i4); i4 = "ok"; { var t4; n4 && (t4 = n4.indexOf(":"), "access denied" != (i4 = (i4 = (i4 = -1 != (i4 = -1 != (i4 = "failed" == (i4 = "confirm" == (i4 = n4.substring(t4 + 1)) ? "ok" : i4) ? "fail" : i4).indexOf("failed_") ? i4.substring(7) : i4).indexOf("fail_") ? i4.substring(5) : i4).replace(/_/g, " ")).toLowerCase()) && "no permission to execute" != i4 || (i4 = "permission denied"), "" == (i4 = "config" == e4 && "function not exist" == i4 ? "ok" : i4)) && (i4 = "fail"); } return n4 = e4 + ":" + i4; }(e3, t3), n3.errMsg = t3), (i3 = i3 || {})._complete && (i3._complete(n3), delete i3._complete), t3 = n3.errMsg || "", h2.debug && !i3.isInnerInvoke && alert(JSON.stringify(n3)), t3.indexOf(":")); switch (t3.substring(e3 + 1)) { case "ok": i3.success && i3.success(n3); break; case "cancel": i3.cancel && i3.cancel(n3); break; default: i3.fail && i3.fail(n3); } i3.complete && i3.complete(n3); } function A2(e3) { if (e3) { for (var n3 = 0, i3 = e3.length; n3 < i3; ++n3) { var t3 = e3[n3], t3 = a2[t3]; t3 && (e3[n3] = t3); } return e3; } } function C2(e3, n3) { var i3; !h2.debug || n3 && n3.isInnerInvoke || ((i3 = c2[e3]) && (e3 = i3), n3 && n3._complete && delete n3._complete, formatAppLog("log", "at node_modules/weixin-js-sdk/index.js:839", '"' + e3 + '",', n3 || "")); } function B2(n3) { var i3; o2 || s2 || h2.debug || p2 < "6.0.2" || g2.systemType < 0 || (i3 = new Image(), g2.appId = h2.appId, g2.initTime = m2.initEndTime - m2.initStartTime, g2.preVerifyTime = m2.preVerifyEndTime - m2.preVerifyStartTime, _2.getNetworkType({ isInnerInvoke: true, success: function(e3) { g2.networkType = e3.networkType; e3 = "https://open.weixin.qq.com/sdk/report?v=" + g2.version + "&o=" + g2.isPreVerifyOk + "&s=" + g2.systemType + "&c=" + g2.clientVersion + "&a=" + g2.appId + "&n=" + g2.networkType + "&i=" + g2.initTime + "&p=" + g2.preVerifyTime + "&u=" + g2.url + "&jsapi_name=" + (n3 ? n3.jsApiName : ""); i3.src = e3; } })); } function L2() { return (/* @__PURE__ */ new Date()).getTime(); } function O2(e3) { d2 && (r2.WeixinJSBridge ? e3() : n2.addEventListener && n2.addEventListener("WeixinJSBridgeReady", e3, false)); } }); var weixinJsSdkExports = weixinJsSdk.exports; const wx$1 = /* @__PURE__ */ getDefaultExportFromCjs(weixinJsSdkExports); function range(min = 0, max = 0, value = 0) { return Math.max(min, Math.min(max, Number(value))); } function getPx(value, unit = false) { if (test$1.number(value)) { return unit ? `${value}px` : Number(value); } if (/(rpx|upx)$/.test(value)) { return unit ? `${uni.upx2px(parseInt(value))}px` : Number(uni.upx2px(parseInt(value))); } return unit ? `${parseInt(value)}px` : parseInt(value); } function sleep(value = 30) { return new Promise((resolve) => { setTimeout(() => { resolve(); }, value); }); } function os$2() { return uni.getSystemInfoSync().platform.toLowerCase(); } function sys$1() { return uni.getSystemInfoSync(); } function random(min, max) { if (min >= 0 && max > 0 && max >= min) { const gab = max - min + 1; return Math.floor(Math.random() * gab + min); } return 0; } function guid(len = 32, firstU = true, radix = null) { const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); const uuid = []; radix = radix || chars.length; if (len) { for (let i2 = 0; i2 < len; i2++) uuid[i2] = chars[0 | Math.random() * radix]; } else { let r2; uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-"; uuid[14] = "4"; for (let i2 = 0; i2 < 36; i2++) { if (!uuid[i2]) { r2 = 0 | Math.random() * 16; uuid[i2] = chars[i2 == 19 ? r2 & 3 | 8 : r2]; } } } if (firstU) { uuid.shift(); return `u${uuid.join("")}`; } return uuid.join(""); } function $parent(name2 = void 0) { let parent2 = this.$parent; while (parent2) { if (parent2.$options && parent2.$options.name !== name2) { parent2 = parent2.$parent; } else { return parent2; } } return false; } function addStyle(customStyle, target = "object") { if (test$1.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") { return customStyle; } if (target === "object") { customStyle = trim$1(customStyle); const styleArray = customStyle.split(";"); const style = {}; for (let i2 = 0; i2 < styleArray.length; i2++) { if (styleArray[i2]) { const item = styleArray[i2].split(":"); style[trim$1(item[0])] = trim$1(item[1]); } } return style; } let string = ""; for (const i2 in customStyle) { const key = i2.replace(/([A-Z])/g, "-$1").toLowerCase(); string += `${key}:${customStyle[i2]};`; } return trim$1(string); } function addUnit(value = "auto", unit = "px") { value = String(value); return test$1.number(value) ? `${value}${unit}` : value; } function deepClone(obj) { if ([null, void 0, NaN, false].includes(obj)) return obj; if (typeof obj !== "object" && typeof obj !== "function") { return obj; } const o2 = test$1.array(obj) ? [] : {}; for (const i2 in obj) { if (obj.hasOwnProperty(i2)) { o2[i2] = typeof obj[i2] === "object" ? deepClone(obj[i2]) : obj[i2]; } } return o2; } function deepMerge(target = {}, source = {}) { target = deepClone(target); if (typeof target !== "object" || typeof source !== "object") return false; for (const prop in source) { if (!source.hasOwnProperty(prop)) continue; if (prop in target) { if (typeof target[prop] !== "object") { target[prop] = source[prop]; } else if (typeof source[prop] !== "object") { target[prop] = source[prop]; } else if (target[prop].concat && source[prop].concat) { target[prop] = target[prop].concat(source[prop]); } else { target[prop] = deepMerge(target[prop], source[prop]); } } else { target[prop] = source[prop]; } } return target; } function error$1(err) { { formatAppLog("error", "at sheep/helper/index.js:241", `SheepJS:${err}`); } } function randomArray(array2 = []) { return array2.sort(() => Math.random() - 0.5); } if (!String.prototype.padStart) { String.prototype.padStart = function(maxLength, fillString = " ") { if (Object.prototype.toString.call(fillString) !== "[object String]") { throw new TypeError("fillString must be String"); } const str = this; if (str.length >= maxLength) return String(str); const fillLength = maxLength - str.length; let times2 = Math.ceil(fillLength / fillString.length); while (times2 >>= 1) { fillString += fillString; if (times2 === 1) { fillString += fillString; } } return fillString.slice(0, fillLength) + str; }; } function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") { let date2; if (!dateTime) { date2 = /* @__PURE__ */ new Date(); } else if (/^\d{10}$/.test(dateTime == null ? void 0 : dateTime.toString().trim())) { date2 = new Date(dateTime * 1e3); } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) { date2 = new Date(Number(dateTime)); } else { date2 = new Date(typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime); } const timeSource = { y: date2.getFullYear().toString(), // 年 m: (date2.getMonth() + 1).toString().padStart(2, "0"), // 月 d: date2.getDate().toString().padStart(2, "0"), // 日 h: date2.getHours().toString().padStart(2, "0"), // 时 M: date2.getMinutes().toString().padStart(2, "0"), // 分 s: date2.getSeconds().toString().padStart(2, "0") // 秒 // 有其他格式化字符需求可以继续添加,必须转化成字符串 }; for (const key in timeSource) { const [ret] = new RegExp(`${key}+`).exec(formatStr) || []; if (ret) { const beginIndex = key === "y" && ret.length === 2 ? 2 : 0; formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex)); } } return formatStr; } function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") { if (timestamp == null) timestamp = Number(/* @__PURE__ */ new Date()); timestamp = parseInt(timestamp); if (timestamp.toString().length == 10) timestamp *= 1e3; let timer2 = (/* @__PURE__ */ new Date()).getTime() - timestamp; timer2 = parseInt(timer2 / 1e3); let tips = ""; switch (true) { case timer2 < 300: tips = t$6("common.just_now"); break; case (timer2 >= 300 && timer2 < 3600): tips = t$6("common.minutes_ago", { m: parseInt(timer2 / 60) }); break; case (timer2 >= 3600 && timer2 < 86400): tips = t$6("common.hours_ago", { h: parseInt(timer2 / 3600) }); break; case (timer2 >= 86400 && timer2 < 2592e3): tips = t$6("common.days_ago", { d: parseInt(timer2 / 86400) }); break; default: if (format2 === false) { if (timer2 >= 2592e3 && timer2 < 365 * 86400) { tips = t$6("common.months_ago", { m: parseInt(timer2 / (86400 * 30)) }); } else { tips = t$6("common.years_ago", { y: parseInt(timer2 / (86400 * 365)) }); } } else { tips = timeFormat(timestamp, format2); } } return tips; } function trim$1(str, pos = "both") { str = String(str); if (pos == "both") { return str.replace(/^\s+|\s+$/g, ""); } if (pos == "left") { return str.replace(/^\s*/, ""); } if (pos == "right") { return str.replace(/(\s*$)/g, ""); } if (pos == "all") { return str.replace(/\s+/g, ""); } return str; } function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") { const prefix = isPrefix ? "?" : ""; const _result = []; if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1) arrayFormat = "brackets"; for (const key in data) { const value = data[key]; if (["", void 0, null].indexOf(value) >= 0) { continue; } if (value.constructor === Array) { switch (arrayFormat) { case "indices": for (let i2 = 0; i2 < value.length; i2++) { _result.push(`${key}[${i2}]=${value[i2]}`); } break; case "brackets": value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); break; case "repeat": value.forEach((_value) => { _result.push(`${key}=${_value}`); }); break; case "comma": let commaStr = ""; value.forEach((_value) => { commaStr += (commaStr ? "," : "") + _value; }); _result.push(`${key}=${commaStr}`); break; default: value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); } } else { _result.push(`${key}=${value}`); } } return _result.length ? prefix + _result.join("&") : ""; } function toast(title, duration2 = 2e3) { uni.showToast({ title: String(title), icon: "none", duration: duration2 }); } function type2icon(type = "success", fill = false) { if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1) type = "success"; let iconName = ""; switch (type) { case "primary": iconName = "info-circle"; break; case "info": iconName = "info-circle"; break; case "error": iconName = "close-circle"; break; case "warning": iconName = "error-circle"; break; case "success": iconName = "checkmark-circle"; break; default: iconName = "checkmark-circle"; } if (fill) iconName += "-fill"; return iconName; } function priceFormat(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") { number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, ""); const n2 = !isFinite(+number2) ? 0 : +number2; const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals); const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator; const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint; let s2 = ""; s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split("."); const re2 = /(-?\d+)(\d{3})/; while (re2.test(s2[0])) { s2[0] = s2[0].replace(re2, `$1${sep}$2`); } if ((s2[1] || "").length < prec) { s2[1] = s2[1] || ""; s2[1] += new Array(prec - s2[1].length + 1).join("0"); } return s2.join(dec); } function getDuration(value, unit = true) { const valueNum = parseInt(value); if (unit) { if (/s$/.test(value)) return value; return value > 30 ? `${value}ms` : `${value}s`; } if (/ms$/.test(value)) return valueNum; if (/s$/.test(value)) return valueNum > 30 ? valueNum : valueNum * 1e3; return valueNum; } function padZero(value) { return `00${value}`.slice(-2); } function getProperty(obj, key) { if (!obj) { return; } if (typeof key !== "string" || key === "") { return ""; } if (key.indexOf(".") !== -1) { const keys = key.split("."); let firstObj = obj[keys[0]] || {}; for (let i2 = 1; i2 < keys.length; i2++) { if (firstObj) { firstObj = firstObj[keys[i2]]; } } return firstObj; } return obj[key]; } function setProperty(obj, key, value) { if (!obj) { return; } const inFn = function(_obj, keys, v2) { if (keys.length === 1) { _obj[keys[0]] = v2; return; } while (keys.length > 1) { const k = keys[0]; if (!_obj[k] || typeof _obj[k] !== "object") { _obj[k] = {}; } keys.shift(); inFn(_obj[k], keys, v2); } }; if (typeof key !== "string" || key === "") ; else if (key.indexOf(".") !== -1) { const keys = key.split("."); inFn(obj, keys, value); } else { obj[key] = value; } } function page() { var _a2; const pages2 = getCurrentPages(); return `/${((_a2 = pages2[pages2.length - 1]) == null ? void 0 : _a2.route) ?? ""}`; } function pages$1() { const pages2 = getCurrentPages(); return pages2; } function getRootUrl() { let url2 = ""; return url2; } function copyText(text) { uni.setClipboardData({ data: text, success: function() { toast(t$6("common.copy_success")); }, fail: function() { toast(t$6("common.copy_fail")); } }); } const $helper = { range, getPx, sleep, os: os$2, sys: sys$1, random, guid, $parent, addStyle, addUnit, deepClone, deepMerge, error: error$1, randomArray, timeFormat, timeFrom, trim: trim$1, queryParams, toast, type2icon, priceFormat, getDuration, padZero, getProperty, setProperty, page, pages: pages$1, test: test$1, getRootUrl, copyText }; 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(dayjs_minExports); const AuthUtil = { // 使用手机 + 密码登录 login: (data) => { return request$1({ url: "/member/auth/login", method: "POST", data, custom: { showSuccess: true, loadingMsg: t$6("common.logging_in"), successMsg: t$6("common.login_success") } }); }, // 使用手机 + 验证码登录 smsLogin: (data) => { return request$1({ url: "/member/auth/sms-login", method: "POST", data, custom: { showSuccess: true, loadingMsg: t$6("common.logging_in"), successMsg: t$6("common.login_success") } }); }, // 账号注册 register: (data) => { return request$1({ url: "/member/auth/sms-register", method: "POST", data, custom: { showSuccess: true, loadingMsg: t$6("common.registering"), successMsg: t$6("common.register_success") } }); }, // 注册校验用户名是否重复 verifyUsername: (username2) => { return request$1({ url: "/member/user/verifyUsername?username=" + username2, method: "GET" }); }, // 根据用户名和手机号查询用户 verifyPhone: (username2, mobile2) => { return request$1({ url: "/member/user/getUserByUserNameWithMobile?username=" + username2 + "&mobile=" + mobile2, method: "GET" }); }, // 发送手机验证码 sendSmsCode: (mobile2, scene) => { return request$1({ url: "/member/auth/send-sms-code", method: "POST", data: { mobile: mobile2, scene }, custom: { loadingMsg: t$6("common.sending"), showSuccess: true, successMsg: t$6("common.send_success") } }); }, // 校验手机验证码 validatePhone: (mobile2, code2, scene) => { return request$1({ url: "/member/auth/validate-sms-code", method: "POST", data: { mobile: mobile2, code: code2, scene } }); }, // 微信公众号登录选择账号登录 selectUsernameLogin: (data) => { return request$1({ url: "/member/auth/select-username-login", method: "POST", data, custom: { showSuccess: true, loadingMsg: t$6("common.logging_in"), successMsg: t$6("common.login_success") } }); }, // 微信公众号注册 officialRegister: (data) => { return request$1({ url: "/member/auth/social-register", method: "POST", data, custom: { showSuccess: true, loadingMsg: t$6("common.registering"), successMsg: t$6("common.register_success") } }); }, // 微信公众号首次登录校验手机 OfficialEnterLogin: (reqVO, registerReqVO) => { return request$1({ url: "/member/auth/social-login-validate-sms-code", method: "POST", data: { reqVO, registerReqVO } }); }, // 登出系统 logout: () => { return request$1({ url: "/member/auth/logout", method: "POST" }); }, // 刷新令牌 refreshToken: (refreshToken2) => { return request$1({ url: "/member/auth/refresh-token", method: "POST", params: { refreshToken: refreshToken2 }, custom: { loading: false, // 不用加载中 showError: false // 不展示错误提示 } }); }, // 社交授权的跳转 socialAuthRedirect: (type, redirectUri) => { return request$1({ url: "/member/auth/social-auth-redirect", method: "GET", params: { type, redirectUri }, custom: { showSuccess: true, loadingMsg: t$6("common.logging_in") } }); }, // 社交快捷登录 socialLogin: (type, code2, state) => { return request$1({ url: "/member/auth/social-login", method: "POST", data: { type, code: code2, state }, custom: { showSuccess: true, loadingMsg: t$6("common.logging_in") } }); }, // 微信小程序的一键登录 weixinMiniAppLogin: (phoneCode, loginCode, state) => { return request$1({ url: "/member/auth/weixin-mini-app-login", method: "POST", data: { phoneCode, loginCode, state }, custom: { showSuccess: true, loadingMsg: t$6("common.logging_in"), successMsg: t$6("common.login_success") } }); }, // 创建微信 JS SDK 初始化所需的签名 createWeixinMpJsapiSignature: (url2) => { return request$1({ url: "/member/auth/create-weixin-jsapi-signature", method: "POST", params: { url: url2 }, custom: { showError: false, showLoading: false } }); }, // 获得消费者跳转到平台或者商户的链接 getConsumerRedirectUrl: () => { return request$1({ url: "/member/auth/redirectLogin", method: "GET" }); } }; const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: AuthUtil }, Symbol.toStringTag, { value: "Module" })); const SignInApi = { // 获得签到规则列表 getSignInConfigList: () => { return request$1({ url: "/member/sign-in/config/list", method: "GET" }); }, // 获得个人签到统计 getSignInRecordSummary: () => { return request$1({ url: "/member/sign-in/record/get-summary", method: "GET" }); }, // 获得 getOwnSignInMoon: (params) => { return request$1({ url: "/member/sign-in/record/get-own-signInMoon", method: "GET", params }); }, // 签到 createSignInRecord: () => { return request$1({ url: "/distri/user-sign-in-log/create", method: "POST" }); }, // 获得签到记录分页 getSignRecordPage: (params) => { formatAppLog("log", "at sheep/api/member/signin.js:37", params); const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&"); return request$1({ url: `/member/sign-in/record/page?${queryString}`, method: "GET" }); } }; const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: SignInApi }, Symbol.toStringTag, { value: "Module" })); let time = 30; let timer = null; async function onSign() { const { code: code2, data } = await SignInApi.createSignInRecord(); if (code2 === 0) { showSignUpModal(data); } if (timer) { clearInterval(timer); } uni.setStorageSync("isRun", false); uni.setStorageSync("isSign", true); } function resetSignStatusIfNeeded() { const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10); const lastCheckDate = uni.getStorageSync("lastCheckDate"); if (today !== lastCheckDate) { uni.setStorageSync("isSign", false); uni.setStorageSync("lastCheckDate", today); } } function autoSign() { resetSignStatusIfNeeded(); const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); if (isLogin.value) { uni.setStorageSync("isRun", true); if (uni.getStorageSync("isRun") && !uni.getStorageSync("isSign")) { timer = setInterval(() => { time--; if (uni.getStorageSync("isSign") || !isLogin.value) { cancelAutoSign(); } if (time <= 0 && !uni.getStorageSync("isSign")) { clearInterval(timer); onSign(); } }, 1e3); } } } function cancelAutoSign() { if (timer) { clearInterval(timer); } time = 30; uni.setStorageSync("isRun", false); } function showSignUpModal(obj) { $store("modal").$patch((state) => { state.signUp = true; state.signUpInfo = obj; }); } function colseSignUpModal() { $store("modal").$patch((state) => { state.signUp = false; }); } function showWalletModal(obj) { $store("modal").$patch((state) => { state.getWallet = true; state.getWalletInfo = obj; }); } function colseWalletModal() { $store("modal").$patch((state) => { state.getWallet = false; }); } function showSubscribeModal() { const modal2 = $store("modal"); modal2.$patch((state) => { state.subscribe = true; }); } function closeSubscribeModal() { const modal2 = $store("modal"); modal2.$patch((state) => { state.subscribe = false; }); } function showAuthModal(type = "accountLogin", isActive = "accountLogin") { const modal2 = $store("modal"); if (modal2.auth !== "") { closeAuthModal(); setTimeout(() => { modal2.$patch((state) => { state.auth = type; state.isActive = isActive; }); }, 100); } else { modal2.$patch((state) => { state.auth = type; state.isActive = isActive; }); } } function closeAuthModal() { $store("modal").$patch((state) => { state.auth = ""; }); } function showShareModal(spuId = 0) { $store("modal").$patch((state) => { state.share = true; state.shareInfo.spuId = spuId; }); } function closeShareModal() { $store("modal").$patch((state) => { state.share = false; }); } function showMenuTools() { $store("modal").$patch((state) => { state.menu = true; }); } function closeMenuTools() { $store("modal").$patch((state) => { state.menu = false; }); } function getSmsCode(event, mobile2) { const modalStore = $store("modal"); const lastSendTimer = modalStore.lastTimer[event]; if (typeof lastSendTimer === "undefined") { $helper.toast(t$6("common.sms_error")); return; } const duration2 = dayjs().unix() - lastSendTimer; const canSend = duration2 >= 60; if (!canSend) { $helper.toast(t$6("common.try_later")); return; } if (mobile2 && !test$1.mobile(mobile2)) { $helper.toast(t$6("common.phone_format_error")); return; } let scene = -1; switch (event) { case "resetPassword": scene = 4; break; case "changePassword": scene = 3; break; case "changeMobileOld": scene = 2; break; case "changeMobileNew": scene = 5; break; case "smsLogin": scene = 1; break; case "consumptionTransfers": scene = 11; break; case "zeroBuy": scene = 12; break; } AuthUtil.sendSmsCode(mobile2, scene).then((res) => { if (res.code === 0) { modalStore.$patch((state) => { state.lastTimer[event] = dayjs().unix(); }); } }); } function getSmsTimer(event, mobile2 = "") { const modalStore = $store("modal"); const lastSendTimer = modalStore.lastTimer[event]; if (typeof lastSendTimer === "undefined") { $helper.toast(t$6("common.sms_error")); return; } const duration2 = vue.ref(dayjs().unix() - lastSendTimer - 60); const canSend = duration2.value >= 0; if (canSend) { return t$6("common.get_verification_code"); } if (!canSend) { setTimeout(() => { duration2.value++; }, 1e3); return -duration2.value.toString() + " s"; } } function saveAdvHistory(adv) { const modal2 = $store("modal"); modal2.$patch((state) => { if (!state.advHistory.includes(adv.imgUrl)) { state.advHistory.push(adv.imgUrl); } }); } let flag; function throttle$1(func, wait = 500, immediate = true) { if (immediate) { if (!flag) { flag = true; typeof func === "function" && func(); setTimeout(() => { flag = false; }, wait); } } else if (!flag) { flag = true; setTimeout(() => { flag = false; typeof func === "function" && func(); }, wait); } } var define_ROUTES_MAP_default = { "/pages/index/FirstIndex": { path: "/pages/index/FirstIndex", aliasPath: "/", meta: { auth: false, sync: true, title: "首页", group: "商城" } }, "/pages/index/FirstActivity": { path: "/pages/index/FirstActivity", meta: { auth: false, sync: true, title: "活动", group: "商城" } }, "/pages/index/FirstVideo": { path: "/pages/index/FirstVideo", meta: { auth: false, sync: true, title: "视频", group: "商城" } }, "/pages/index/FirstList": { path: "/pages/index/FirstList", meta: { auth: false, sync: true, title: "列表", group: "商城" } }, "/pages/index/index": { path: "/pages/index/index", meta: { auth: false, sync: true, title: "首页", group: "商城" } }, "/pages/index/user": { path: "/pages/index/user", meta: { sync: true, title: "个人中心", group: "商城" } }, "/pages/index/category": { path: "/pages/index/category", meta: { sync: true, title: "商品分类", group: "商城" } }, "/pages/index/cart": { path: "/pages/index/cart", meta: { sync: true, title: "购物车", group: "商城" } }, "/pages/index/login": { path: "/pages/index/login" }, "/pages/index/search": { path: "/pages/index/search", meta: { sync: true, title: "搜索", group: "商城" } }, "/pages/index/page": { path: "/pages/index/page", meta: { auth: false, sync: true, title: "自定义页面", group: "商城" } }, "/pages/goods/index": { path: "/pages/goods/index", meta: { sync: true, title: "普通商品", group: "商品" } }, "/pages/goods/groupon": { path: "/pages/goods/groupon", meta: { sync: true, title: "拼团商品", group: "商品" } }, "/pages/goods/seckill": { path: "/pages/goods/seckill", meta: { sync: true, title: "秒杀商品", group: "商品" } }, "/pages/goods/list": { path: "/pages/goods/list", meta: { sync: true, title: "商品列表", group: "商品" } }, "/pages/goods/comment/add": { path: "/pages/goods/comment/add", meta: { auth: true } }, "/pages/goods/comment/list": { path: "/pages/goods/comment/list" }, "/pages/order/detail": { path: "/pages/order/detail", meta: { auth: true, title: "订单详情" } }, "/pages/order/confirm": { path: "/pages/order/confirm", meta: { auth: true, title: "确认订单" } }, "/pages/order/list": { path: "/pages/order/list", meta: { auth: true, sync: true, title: "用户订单", group: "订单中心" } }, "/pages/order/aftersale/apply": { path: "/pages/order/aftersale/apply", meta: { auth: true, title: "申请售后" } }, "/pages/order/aftersale/return-delivery": { path: "/pages/order/aftersale/return-delivery", meta: { auth: true, title: "退货物流" } }, "/pages/order/aftersale/list": { path: "/pages/order/aftersale/list", meta: { auth: true, sync: true, title: "售后订单", group: "订单中心" } }, "/pages/order/aftersale/detail": { path: "/pages/order/aftersale/detail", meta: { auth: true, title: "售后详情" } }, "/pages/order/aftersale/log": { path: "/pages/order/aftersale/log", meta: { auth: true, title: "售后进度" } }, "/pages/order/express/log": { path: "/pages/order/express/log", meta: { auth: true, title: "物流轨迹" } }, "/pages/order/otherlist": { path: "/pages/order/otherlist" }, "/pages/user/info": { path: "/pages/user/info", meta: { auth: true, sync: true, title: "用户信息", group: "用户中心" } }, "/pages/user/setting": { path: "/pages/user/setting", meta: { auth: true, sync: true, title: "用户设置", group: "用户中心" } }, "/pages/user/qrcode-share": { path: "/pages/user/qrcode-share", meta: { auth: true, sync: true, title: "我的二维码/分享页", group: "用户中心" } }, "/pages/user/goods-collect": { path: "/pages/user/goods-collect", meta: { auth: true, sync: true, title: "商品收藏", group: "用户中心" } }, "/pages/user/goods-log": { path: "/pages/user/goods-log", meta: { auth: true, sync: true, title: "浏览记录", group: "用户中心" } }, "/pages/user/address/list": { path: "/pages/user/address/list", meta: { auth: true, sync: true, title: "地址管理", group: "用户中心" } }, "/pages/user/dummyAddress/list": { path: "/pages/user/dummyAddress/list", meta: { auth: true, sync: true, title: "虚拟商品收货地址", group: "用户中心" } }, "/pages/user/invoice/edit": { path: "/pages/user/invoice/edit", meta: { auth: true, title: "发票抬头" } }, "/pages/user/invoice/list": { path: "/pages/user/invoice/list", meta: { auth: true, sync: true, title: "发票抬头管理", group: "用户中心" } }, "/pages/user/address/edit": { path: "/pages/user/address/edit", meta: { auth: true, title: "编辑地址" } }, "/pages/user/dummyAddress/edit": { path: "/pages/user/dummyAddress/edit", meta: { auth: true, title: "编辑地址" } }, "/pages/user/wallet/money": { path: "/pages/user/wallet/money", meta: { auth: true, sync: true, title: "用户余额", group: "用户中心" } }, "/pages/user/wallet/score": { path: "/pages/user/wallet/score", meta: { auth: true, sync: true, title: "钱包", group: "用户中心" } }, "/pages/user/wallet/consumptionLog": { path: "/pages/user/wallet/consumptionLog", meta: { auth: true, sync: true, title: "消费分来源", group: "用户中心" } }, "/pages/user/wallet/topupConsumptionPoints": { path: "/pages/user/wallet/topupConsumptionPoints", meta: { auth: true, sync: true, title: "消费分充值", group: "用户中心" } }, "/pages/user/wallet/consumptionTransfersLog": { path: "/pages/user/wallet/consumptionTransfersLog", meta: { auth: true, sync: true, title: "消费分转账", group: "用户中心" } }, "/pages/user/wallet/consumptionTransfers": { path: "/pages/user/wallet/consumptionTransfers", meta: { auth: true, sync: true, title: "消费分转让", group: "用户中心" } }, "/pages/user/wallet/scoreToConsumption": { path: "/pages/user/wallet/scoreToConsumption", meta: { auth: true, sync: true, title: "佣金转消费分", group: "用户中心" } }, "/pages/user/wallet/withdraw": { path: "/pages/user/wallet/withdraw", meta: { auth: true, sync: true, title: "提现", group: "提现" } }, "/pages/user/wallet/withdrawalLog": { path: "/pages/user/wallet/withdrawalLog", meta: { auth: true, sync: true, title: "提现记录", group: "提现记录" } }, "/pages/user/wallet/scoreToMoney": { path: "/pages/user/wallet/scoreToMoney", meta: { auth: true, sync: true, title: "佣金兑换", group: "用户中心" } }, "/pages/user/wallet/ScoreLog": { path: "/pages/user/wallet/ScoreLog" }, "/pages/user/wallet/maxScoreLog": { path: "/pages/user/wallet/maxScoreLog" }, "/pages/user/wallet/team": { path: "/pages/user/wallet/team", meta: { auth: true, sync: true, title: "团队", group: "用户中心" } }, "/pages/commission/index": { path: "/pages/commission/index", meta: { auth: true, sync: true, title: "分销中心", group: "分销商城" } }, "/pages/commission/wallet": { path: "/pages/commission/wallet", meta: { auth: true, sync: true, title: "用户佣金", group: "分销中心" } }, "/pages/commission/goods": { path: "/pages/commission/goods", meta: { auth: true, sync: true, title: "推广商品", group: "分销商城" } }, "/pages/commission/order": { path: "/pages/commission/order", meta: { auth: true, sync: true, title: "分销订单", group: "分销商城" } }, "/pages/commission/team": { path: "/pages/commission/team", meta: { auth: true, sync: true, title: "我的团队", group: "分销商城" } }, "/pages/commission/promoter": { path: "/pages/commission/promoter", meta: { auth: true, sync: true, title: "推广人排行榜", group: "分销商城" } }, "/pages/commission/commission-ranking": { path: "/pages/commission/commission-ranking", meta: { auth: true, sync: true, title: "佣金排行榜", group: "分销商城" } }, "/pages/commission/withdraw": { path: "/pages/commission/withdraw", meta: { auth: true, sync: true, title: "申请提现", group: "分销商城" } }, "/pages/app/sign": { path: "/pages/app/sign", meta: { auth: true, sync: true, title: "签到中心", group: "应用" } }, "/pages/shop/index": { path: "/pages/shop/index", meta: { auth: true, sync: true, title: "店铺首页", group: "应用" } }, "/pages/shop/category": { path: "/pages/shop/category", meta: { auth: true, sync: true, title: "店铺分类", group: "应用" } }, "/pages/shop/allproduct": { path: "/pages/shop/allproduct", meta: { auth: true, sync: true, title: "所有商品", group: "应用" } }, "/pages/public/setting": { path: "/pages/public/setting", meta: { sync: true, title: "系统设置", group: "通用" } }, "/pages/public/richtext": { path: "/pages/public/richtext", meta: { sync: true, title: "富文本", group: "通用" } }, "/pages/public/faq": { path: "/pages/public/faq", meta: { sync: true, title: "常见问题", group: "通用" } }, "/pages/public/error": { path: "/pages/public/error" }, "/pages/public/webview": { path: "/pages/public/webview" }, "/pages/public/merchant": { path: "/pages/public/merchant" }, "/pages/public/merchantApplyList": { path: "/pages/public/merchantApplyList" }, "/pages/coupon/list": { path: "/pages/coupon/list", meta: { sync: true, title: "领券中心", group: "优惠券" } }, "/pages/coupon/detail": { path: "/pages/coupon/detail", meta: { auth: false, sync: true, title: "优惠券详情", group: "优惠券" } }, "/pages/chat/index": { path: "/pages/chat/index", meta: { auth: true, sync: true, title: "客服", group: "客服" } }, "/pages/chat/speechtotext": { path: "/pages/chat/speechtotext", meta: { auth: true, sync: true, title: "语音转文字", group: "语音转文字" } }, "/pages/pay/index": { path: "/pages/pay/index" }, "/pages/pay/result": { path: "/pages/pay/result" }, "/pages/pay/resultYuan": { path: "/pages/pay/resultYuan" }, "/pages/pay/recharge": { path: "/pages/pay/recharge", meta: { auth: true, sync: true, title: "充值余额", group: "支付" } }, "/pages/pay/recharge-log": { path: "/pages/pay/recharge-log", meta: { auth: true, sync: true, title: "充值记录", group: "支付" } }, "/pages/activity/groupon/detail": { path: "/pages/activity/groupon/detail" }, "/pages/activity/groupon/order": { path: "/pages/activity/groupon/order", meta: { auth: true, sync: true, title: "拼团订单", group: "营销活动" } }, "/pages/activity/index": { path: "/pages/activity/index", meta: { sync: true, title: "营销商品", group: "营销活动" } }, "/pages/activity/groupon/list": { path: "/pages/activity/groupon/list", meta: { sync: true, title: "拼团活动", group: "营销活动" } }, "/pages/activity/seckill/list": { path: "/pages/activity/seckill/list", meta: { sync: true, title: "秒杀活动", group: "营销活动" } }, "/pages/activity/bargain/list": { path: "/pages/activity/bargain/list", meta: { sync: true, title: "砍价列表", group: "营销活动" } }, "/pages/activity/bargain/detail": { path: "/pages/activity/bargain/detail", meta: { sync: true, title: "砍价详情", group: "营销活动" } } }; var define_TABBAR_default = ["/pages/index/index", "/pages/index/cart", "/pages/index/user"]; const _go = (path, params = {}, options2 = { redirect: false }) => { var _a2; let page2 = ""; let query = ""; let url2 = ""; if (lodashExports.isString(path)) { if (lodashExports.startsWith(path, "http")) { page2 = `/pages/public/webview`; query = `url=${encodeURIComponent(path)}`; } else if (lodashExports.startsWith(path, "action:")) { handleAction(path); return; } else { [page2, query] = path.split("?"); } if (!lodashExports.isEmpty(params)) { let query2 = paramsToQuery(params); if (lodashExports.isEmpty(query)) { query = query2; } else { query += "&" + query2; } } } if (lodashExports.isObject(path)) { page2 = path.url; if (!lodashExports.isNil(path.params)) { query = paramsToQuery(path.params); } } const nextRoute = define_ROUTES_MAP_default[page2]; if (!nextRoute) { formatAppLog("log", "at sheep/router/index.js:56", `%c跳转路径参数错误<${page2 || "EMPTY"}>`, "color:red;background:yellow"); return; } if (((_a2 = nextRoute.meta) == null ? void 0 : _a2.auth) && !$store("user").isLogin) { showAuthModal(); return; } url2 = page2; if (!lodashExports.isEmpty(query)) { url2 += `?${query}`; } if (define_TABBAR_default.includes(page2)) { uni.switchTab({ url: url2 }); return; } if (options2.redirect) { uni.redirectTo({ url: url2 }); return; } uni.navigateTo({ url: url2 }); }; function go(...args) { throttle$1(() => { _go(...args); }); } function paramsToQuery(params) { if (lodashExports.isEmpty(params)) { return ""; } let query = []; for (let key in params) { query.push(key + "=" + params[key]); } return query.join("&"); } function back() { uni.navigateBack(); } function redirect(path, params = {}) { go(path, params, { redirect: true }); } function hasHistory() { const pages2 = getCurrentPages(); if (pages2.length > 1) { return true; } return false; } function getCurrentRoute(field = "") { let currentPage = getCurrentPage(); if (field !== "") { return currentPage.$page[field]; } else { return currentPage.$page; } } function getCurrentPage() { let pages2 = getCurrentPages(); return pages2[pages2.length - 1]; } function handleAction(path) { const action = path.split(":"); switch (action[1]) { case "showShareModal": showShareModal(); break; } } function error(errCode, errMsg = "") { redirect("/pages/public/error", { errCode, errMsg }); } const $router = { go, back, hasHistory, redirect, getCurrentPage, getCurrentRoute, error }; const cdn = (url2 = "", cdnurl = "") => { if (!url2) return ""; if (url2.indexOf("http") === 0) { return url2; } if (cdnurl === "") { cdnurl = $store("app").info.cdnurl; } return cdnurl + url2; }; const $url = { // 添加cdn域名前缀 cdn, // 对象存储自动剪裁缩略图 thumb: (url2 = "", params) => { url2 = cdn(url2); return append_thumbnail_params(url2, params); }, // 静态资源地址 static: (url2 = "", staticurl = "") => { if (staticurl === "") { staticurl = staticUrl; } if (staticurl !== "local") { url2 = cdn(url2, staticurl); } return url2; }, // css背景图片地址 css: (url2 = "", staticurl = "") => { if (staticurl === "") { staticurl = staticUrl; } if (staticurl !== "local") { url2 = cdn(url2, staticurl); } if (staticurl === "local") { url2 = plus.io.convertLocalFileSystemURL(url2); } return `url(${url2})`; } }; function append_thumbnail_params(url2, params) { const filesystem = $store("app").info.filesystem; if (filesystem === "public") { return url2; } let width = params.width || "200"; let height = params.height || "200"; let mode = params.mode || "lfit"; let quality = params.quality || 90; let gravity = params.gravity || "center"; let suffix = ""; let crop_str = ""; let quality_str = ""; let size = width + "x" + height; switch (filesystem) { case "aliyun": if (!gravity && gravity != "center") { mode = "mfit"; crop_str = "/crop,g_" + gravityFormat("aliyun", gravity) + ",w_" + width + ",h_" + height; } if (quality > 0 && quality < 100) { quality_str = "/quality,q_" + quality; } suffix = "x-oss-process=image/resize,m_" + mode + ",w_" + width + ",h_" + height; suffix += crop_str + quality_str; break; case "qcloud": let mode_str = "thumbnail"; if (mode == "fill" || !gravity && gravity != "center") { mode_str = "crop"; mode = "fill"; crop_str = "/gravity/" + gravityFormat("qcloud", gravity); } if (quality > 0 && quality < 100) { quality_str = "/rquality/" + quality; } switch (mode) { case "lfit": size = "" + size + ">"; break; case "mfit": size = "!" + size + "r"; case "fill": break; case "pad": size = size + "/pad/1"; break; case "fixed": size = size + "!"; break; } suffix = "imageMogr2/" + mode_str + "/" + size + crop_str + quality_str; break; case "qiniu": if (mode == "fill" || !gravity && gravity != "center") { mode = "mfit"; crop_str = "/gravity/" + gravityFormat("qiniu", gravity) + "/crop/" + size; } if (quality > 0 && quality < 100) { quality_str = "/quality/" + quality; } switch (mode) { case "lfit": case "pad": size = size + ">"; break; case "mfit": size = "!" + size + "r"; break; case "fill": break; case "fixed": size = size + "!"; break; } suffix = "imageMogr2/thumbnail/" + size + crop_str + quality_str; break; } return url2 + "?" + suffix; } const platformMap = ["H5", "WechatOfficialAccount", "WechatMiniProgram", "App"]; const fromMap = ["forward", "poster", "link"]; const getShareInfo = (scene = { title: "", // 自定义分享标题 desc: "", // 自定义描述 image: "", // 自定义分享图片 params: {} // 自定义分享参数 }, poster = { // 自定义海报数据 type: "user" }) => { let shareInfo = { title: "", // 分享标题 desc: "", // 描述 image: "", // 分享图片 path: "", // 分享页面+参数 link: "", // 分享Url+参数 query: "", // 分享参数 poster // 海报所需数据 }; const app2 = $store("app"); const shareConfig = app2.platform.share; const query = buildSpmQuery(scene.params); shareInfo.query = query; shareInfo.link = buildSpmLink(query, shareConfig.linkAddress); if (shareConfig.methods.includes("forward")) { if (shareConfig.forwardInfo.title === "" || shareConfig.forwardInfo.image === "") { formatAppLog("log", "at sheep/platform/share.js:52", "请在平台设置中配置转发信息"); } shareInfo.title = scene.title || shareConfig.forwardInfo.title; shareInfo.image = $url.cdn(scene.image || shareConfig.forwardInfo.image); shareInfo.desc = scene.desc || shareConfig.forwardInfo.subtitle; shareInfo.path = buildSpmPath(query); } return shareInfo; }; const buildSpmQuery = (params) => { const user2 = $store("user"); let shareId = "0"; if (typeof params.shareId === "undefined") { if (user2.isLogin) { shareId = user2.userInfo.id; } } let page2 = "1"; if (typeof params.page !== "undefined") { page2 = params.page; } let query = "0"; if (typeof params.query !== "undefined") { query = params.query; } let platform2 = platformMap.indexOf(_platform.name) + 1; let from = "1"; if (typeof params.from !== "undefined") { from = platformMap.indexOf(params.from) + 1; } return `spm=${shareId}.${page2}.${query}.${platform2}.${from}`; }; const buildSpmPath = (query) => { return `/pages/index/index?${query}`; }; const buildSpmLink = (query, linkAddress = "") => { return `${linkAddress}?${query}`; }; const decryptSpm = (spm) => { const user2 = $store("user"); let shareParamsArray = spm.split("."); let shareParams = { spm, shareId: 0, page: "", query: {}, platform: "", from: "" }; let query; shareParams.shareId = shareParamsArray[0]; switch (shareParamsArray[1]) { case "1": shareParams.page = "/pages/index/index"; break; case "2": shareParams.page = "/pages/goods/index"; shareParams.query = { linkId: shareParamsArray[2] }; formatAppLog("log", "at sheep/platform/share.js:126", shareParams.query); break; case "3": shareParams.page = "/pages/goods/groupon"; query = shareParamsArray[2].split(","); shareParams.query = { id: query[0], activity_id: query[1] }; break; case "4": shareParams.page = "/pages/goods/seckill"; query = shareParamsArray[2].split(","); shareParams.query = { id: query[1] }; break; case "5": shareParams.page = "/pages/activity/groupon/detail"; shareParams.query = { id: shareParamsArray[2] }; break; } shareParams.platform = platformMap[shareParamsArray[3] - 1]; shareParams.from = fromMap[shareParamsArray[4] - 1]; if (shareParams.shareId != 0) { if (user2.isLogin) { user2.addShareLog(shareParams); } else { uni.setStorageSync("shareLog", shareParams); } } if (shareParams.page !== "/pages/index/index") { $router.go(shareParams.page, shareParams.query); } return shareParams; }; const updateShareInfo = (shareInfo) => { }; const $share = { getShareInfo, updateShareInfo, decryptSpm }; const PayOrderApi = { // 获得支付订单 getOrder: (id) => { return request$1({ url: "/pay/order/get", method: "GET", params: { id } }); }, // 获得支付后的订单条件 getByStatus: (id) => { return request$1({ url: "/trade/order/getPayOrderByStatus", method: "GET", params: { id } }); }, // 获得支付后的订单条件2 实际用的 getByStatus2: (id) => { return request$1({ url: "/trade/order/getPayOrderByStatus2", method: "GET", params: { id } }); }, // 富友微信jsapi支付成功 getFuYouPayOrderByStatus: (payOrderNo) => { return request$1({ url: "/trade/order/getFuYouPayOrderByStatus", method: "POST", params: { payOrderNo } }); }, getPayOrder: (tradeOrderId) => { return request$1({ url: "/trade/order/getPayOrder", method: "GET", params: { tradeOrderId } }); }, // 提交支付订单 submitOrder: (data) => { return request$1({ url: "/pay/order/submit", method: "POST", data }); }, // 佣金、消费分抵扣完 0元购 ZeroPurchaseSubmit: (data) => { return request$1({ url: "/trade/order/submit-ZeroPurchase", method: "POST", data }); }, // 第三方富友支付 fuYouSubmitOrder: (data) => { return request$1({ url: "/fuYou/pay/order/submit", method: "POST", data }); } }; const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: PayOrderApi }, Symbol.toStringTag, { value: "Module" })); class SheepPay { constructor(payment, orderType, id, orderType2) { this.payment = payment; this.id = id; this.orderType = orderType; this.orderType2 = orderType2; this.payAction(); } payAction() { const payAction = { WechatOfficialAccount: { wechat: () => { this.wechatOfficialAccountPay(); }, JSAPI: () => { this.fuYouWechatOfficialAccountPay(); }, alipay: () => { this.redirectPay(); }, wallet: () => { this.walletPay(); }, mock: () => { this.mockPay(); }, wx_pub: () => { payAction.WechatOfficialAccount.wechat(); } }, WechatMiniProgram: { wechat: () => { this.wechatMiniProgramPay(); }, JSAPI: () => { this.fuYouWechatOfficialAccountPay(); }, alipay: () => { this.copyPayLink(); }, wallet: () => { this.walletPay(); }, mock: () => { this.mockPay(); }, wx_pub: () => { this.wechatMiniProgramPay(); } }, App: { wechat: () => { this.wechatAppPay(); }, JSAPI: () => { this.fuYouWechatOfficialAccountPay(); }, alipay: () => { this.alipay(); }, wallet: () => { this.walletPay(); }, mock: () => { this.mockPay(); } }, H5: { wechat: () => { this.wechatWapPay(); }, JSAPI: () => { this.fuYouWechatOfficialAccountPay(); }, alipay: () => { this.redirectPay(); }, wallet: () => { this.walletPay(); }, mock: () => { this.mockPay(); }, wx_pub: () => { payAction.WechatOfficialAccount.wechat(); } } }; return payAction[sheep$1.$platform.name][this.payment](); } // 预支付 prepay(channel) { return new Promise(async (resolve, reject) => { let data = { id: this.id, channelCode: channel, channelExtras: {}, orderType: this.orderType2 }; if (["wx_pub", "wx_lite"].includes(channel)) { const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true); if (!openid) { this.bindWeixin(); return; } data.channelExtras.openid = openid; } PayOrderApi.submitOrder(data).then((res) => { res.code === 0 && resolve(res); if (res.code !== 0 && res.msg.indexOf("无效的openid") >= 0) { if (res.msg.indexOf("无效的openid") >= 0 || res.msg.indexOf("下单账号与支付账号不一致") >= 0) { this.bindWeixin(); } } }); }); } // 富友预支付 fuYouPrePay(channel) { return new Promise(async (resolve, reject) => { let data = { id: this.id, channelCode: channel, orderType: this.orderType2, req: { trade_type: channel } }; if (["wx_pub", "wx_lite", "JSAPI"].includes(channel)) { const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true); if (!openid) { this.bindWeixin(); return; } data.req.sub_openid = openid; } PayOrderApi.fuYouSubmitOrder(data).then((res) => { res.code === 0 && resolve(res); if (res.code !== 0 && res.msg.indexOf("无效的openid") >= 0) { if (res.msg.indexOf("无效的openid") >= 0 || res.msg.indexOf("下单账号与支付账号不一致") >= 0) { this.bindWeixin(); } } }); }); } // 微信小程序支付 async wechatMiniProgramPay() { let { code: code2, data } = await this.prepay("wx_lite"); if (code2 !== 0) { return; } const payConfig = JSON.parse(data.displayContent); uni.requestPayment({ provider: "wxpay", timeStamp: payConfig.timeStamp, nonceStr: payConfig.nonceStr, package: payConfig.packageValue, signType: payConfig.signType, paySign: payConfig.paySign, success: (res) => { this.payResult("success"); }, fail: (err) => { if (err.errMsg === "requestPayment:fail cancel") { sheep$1.$helper.toast(t$6("common.payment_manually_cancelled")); } else { this.payResult("fail"); } } }); } // 余额支付 async walletPay() { const { code: code2 } = await this.prepay("wallet"); code2 === 0 && this.payResult("success"); } // 模拟支付 async mockPay() { const { code: code2 } = await this.prepay("mock"); code2 === 0 && this.payResult("success"); } // 支付宝复制链接支付 TODO 非繁人:待接入 async copyPayLink() { let { error: error2, data } = await this.prepay(); if (error2 === 0) { uni.showModal({ title: t$6("common.alipay_payment"), content: t$6("common.copy_link_to_browser"), confirmText: t$6("common.copy_link"), success: (res) => { if (res.confirm) { sheep$1.$helper.copyText(data.pay_data); } } }); } } // 支付宝支付 TODO 非繁人:待接入 async alipay() { let that = this; const { error: error2, data } = await this.prepay(); if (error2 === 0) { uni.requestPayment({ provider: "alipay", orderInfo: data.pay_data, //支付宝订单数据 success: (res) => { that.payResult("success"); }, fail: (err) => { if (err.errMsg === "requestPayment:fail [paymentAlipay:62001]user cancel") { sheep$1.$helper.toast(t$6("common.payment_manually_cancelled")); } else { that.payResult("fail"); } } }); } } // 微信支付 TODO 非繁人:待接入 async wechatAppPay() { let that = this; let { error: error2, data } = await this.prepay(); if (error2 === 0) { uni.requestPayment({ provider: "wxpay", orderInfo: data.pay_data, //微信订单数据(官方说是string。实测为object) success: (res) => { that.payResult("success"); }, fail: (err) => { err.errMsg !== "requestPayment:fail cancel" && that.payResult("fail"); } }); } } // 支付结果跳转,success:成功,fail:失败 payResult(resultType) { sheep$1.$router.redirect("/pages/pay/resultYuan", { id: this.id, orderType: this.orderType, payState: resultType }); } // 引导绑定微信 bindWeixin() { uni.showModal({ title: t$6("common.wechat_payment"), content: t$6("common.bind_wechat_for_payment"), confirmText: t$6("common.bind"), success: function(res) { if (res.confirm) { sheep$1.$platform.useProvider("wechat").bind(); } } }); } } function getPayMethods(channels) { let payMethods = [ { icon: "/static/images/wechat.png", title: t$6("common.wechat_payment"), value: "wx_pub", disabled: false }, { icon: "/static/images/wechat.png", title: t$6("common.wechat_payment"), value: "JSAPI", disabled: false }, { icon: "/static/images/alipay.png", title: t$6("common.alipay_payment"), value: "alipay", disabled: false }, { icon: "/static/images/wallet.png", title: t$6("common.balance_payment"), value: "wallet", disabled: false }, { icon: "/static/images/apple.png", title: "Apple Pay", value: "apple", disabled: false }, { icon: "/static/images/wallet.png", title: t$6("common.mock_payment"), value: "mock", disabled: false } ]; const platform2 = sheep$1.$platform.name; const wechatMethod = payMethods[0]; if (platform2 === "WechatOfficialAccount" && channels.includes("wx_pub") || platform2 === "WechatMiniProgram" && channels.includes("wx_lite") || platform2 === "App" && channels.includes("wx_app")) { wechatMethod.disabled = false; } const alipayMethod = payMethods[1]; if (platform2 === "WechatOfficialAccount" && channels.includes("alipay_wap") || platform2 === "WechatMiniProgram" && channels.includes("alipay_wap") || platform2 === "App" && channels.includes("alipay_app")) { alipayMethod.disabled = false; } const walletMethod = payMethods[2]; if (channels.includes("wallet")) { walletMethod.disabled = false; } const mockMethod = payMethods[4]; if (channels.includes("mock")) { mockMethod.disabled = false; } function filterPayMethods(payMethods2, channels2) { for (let i2 = payMethods2.length - 1; i2 >= 0; i2--) { if (!channels2.includes(payMethods2[i2].value)) { payMethods2.splice(i2, 1); } } } filterPayMethods(payMethods, channels); formatAppLog("log", "at sheep/platform/pay.js:511", payMethods); return payMethods; } const device = uni.getSystemInfoSync(); const os$1 = device.platform; let name = ""; let provider = ""; let platform$4 = ""; let isWechatInstalled = true; name = "App"; platform$4 = "openPlatform"; if (os$1 === "ios") { isWechatInstalled = plus.ios.import("WXApi").isWXAppInstalled(); } if (lodashExports.isEmpty(name)) { uni.showToast({ title: t$6("common.platform_not_supported"), icon: "none" }); } const load = () => { }; const useProvider = (_provider = "") => { if (_provider === "") _provider = provider; if (_provider === "wechat") return wechat; if (_provider === "apple") return apple$1; }; const pay = (payment, orderType, orderSN, orderType2) => { return new SheepPay(payment, orderType, orderSN, orderType2); }; const checkUpdate = (silence = false) => { }; async function checkNetwork() { const networkStatus = await uni.getNetworkType(); if (networkStatus.networkType == "none") { return Promise.resolve(false); } return Promise.resolve(true); } const getCapsule = () => { return { bottom: 56, height: 32, left: 278, right: 365, top: 24, width: 87 }; }; const capsule = getCapsule(); const getNavBar = () => { return device.statusBarHeight + 44; }; const navbar = getNavBar(); function getLandingPage() { let page2 = ""; return page2; } const landingPage = getLandingPage(); const _platform = { name, device, os: os$1, provider, platform: platform$4, useProvider, checkUpdate, checkNetwork, pay, share: $share, load, capsule, navbar, landingPage, isWechatInstalled }; const CartApi = { addCart: (data) => { return request$1({ url: "/trade/cart/add", method: "POST", data, custom: { showSuccess: true, successMsg: t$6("common.added_to_cart") } }); }, updateCartCount: (data) => { return request$1({ url: "/trade/cart/update-count", method: "PUT", data }); }, updateCartSelected: (data) => { return request$1({ url: "/trade/cart/update-selected", method: "PUT", data }); }, deleteCart: (ids) => { return request$1({ url: "/trade/cart/delete", method: "DELETE", params: { ids } }); }, getCartList: () => { return request$1({ url: "/trade/cart/list", method: "GET", custom: { showLoading: false, auth: true } }); } }; const __vite_glob_0_38 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: CartApi }, Symbol.toStringTag, { value: "Module" })); const cart = defineStore({ id: "cart", state: () => ({ shopNameMap: [], shopSkuMap: [], list: [], // 购物车列表 selectedIds: [], // 已选列表 isAllSelected: false, // 是否全选 totalPriceSelected: 0 // 选中项总金额 }), actions: { // 获取购物车列表 async getList() { const { data, code: code2 } = await CartApi.getCartList(); if (code2 === 0) { this.list = data.validList; this.shopSkuMap = data.shopSkuMap; this.shopNameMap = data.shopNameMap; this.selectedIds = []; this.isAllSelected = true; this.totalPriceSelected = 0; this.list.forEach((item) => { if (item.selected) { this.selectedIds.push(item.id); this.totalPriceSelected += item.count * item.sku.price; } else { this.isAllSelected = false; } }); } }, // 添加购物车 async add(goodsInfo) { const { code: code2 } = await CartApi.addCart({ skuId: goodsInfo.id, count: goodsInfo.goods_num }); if (code2 === 0) { await this.getList(); } }, // 更新购物车 async update(goodsInfo) { const { code: code2 } = await CartApi.updateCartCount({ id: goodsInfo.goods_id, count: goodsInfo.goods_num }); if (code2 === 0) { await this.getList(); } }, // 移除购物车 async delete(ids) { let id; if (typeof ids === "number") { id = ids; } else { id = ids.join(","); } const { code: code2 } = await CartApi.deleteCart(id); if (code2 === 0) { await this.getList(); } }, // 单选购物车商品 async selectSingle(goodsId) { const { code: code2 } = await CartApi.updateCartSelected({ ids: [goodsId], selected: !this.selectedIds.includes(goodsId) // 取反 }); if (code2 === 0) { await this.getList(); } }, // 全选购物车商品 async selectAll(flag2) { const { code: code2 } = await CartApi.updateCartSelected({ ids: this.list.map((item) => item.id), selected: flag2 }); if (code2 === 0) { await this.getList(); } }, // 清空购物车。注意,仅用于用户退出时,重置数据 emptyList() { this.list = []; this.selectedIds = []; this.isAllSelected = true; this.totalPriceSelected = 0; } }, persist: { enabled: true, strategies: [{ key: "cart-store" }] } }); const __vite_glob_0_1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: cart }, Symbol.toStringTag, { value: "Module" })); const UserApi = { // 获得基本信息 getUserInfo: () => { return request$1({ url: "/member/user/get", method: "GET", custom: { showLoading: false, auth: true } }); }, // 修改基本信息 updateUser: (data) => { return request$1({ url: "/member/user/update", method: "PUT", data, custom: { auth: true, showSuccess: true, successMsg: t$6("common.update_success") } }); }, updateUserAlipayAccount: (data) => { return request$1({ url: "/member/user/updateByAlipayAccount", method: "PUT", data, custom: { auth: true, showSuccess: true, successMsg: t$6("common.update_success") } }); }, updateUserBankAccount: (data) => { return request$1({ url: "/member/user/updateByBankAccount", method: "PUT", data, custom: { auth: true, showSuccess: true, successMsg: t$6("common.update_success") } }); }, // 修改用户手机 updateUserMobile: (data) => { return request$1({ url: "/member/user/update-mobile", method: "PUT", data, custom: { loadingMsg: t$6("common.verifying"), showSuccess: true, successMsg: t$6("account.modification_successful") } }); }, // 基于微信小程序的授权码,修改用户手机 updateUserMobileByWeixin: (code2) => { return request$1({ url: "/member/user/update-mobile-by-weixin", method: "PUT", data: { code: code2 }, custom: { showSuccess: true, loadingMsg: t$6("common.fetching"), successMsg: t$6("account.modification_successful") } }); }, // 修改密码 updateUserPassword: (data) => { return request$1({ url: "/member/user/update-password", method: "PUT", data, custom: { loadingMsg: t$6("common.verifying"), showSuccess: true, successMsg: t$6("account.modification_successful") } }); }, // 重置密码 resetUserPassword: (data) => { return request$1({ url: "/member/user/reset-password", method: "PUT", data, custom: { loadingMsg: t$6("common.verifying"), showSuccess: true, successMsg: t$6("account.modification_successful") } }); }, // 更新安卓用户的极光id updateAndroidJiGuangId: (registerId) => { return request$1({ url: "/member/user/addRegisterId?registerId=" + registerId, method: "PUT", custom: { showSuccess: false } }); } }; const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: UserApi }, Symbol.toStringTag, { value: "Module" })); const PayWalletApi = { // 获取钱包 getPayWallet() { return request$1({ url: "/pay/wallet/get", method: "GET", custom: { showLoading: false, auth: true } }); }, // 获得佣金等基本信息 getDuserInfo: () => { return request$1({ url: "/distri/duser/getDuserInfo", method: "GET", custom: { showLoading: false, auth: true } }); }, // 获得钱包流水分页 getWalletTransactionPage: (params) => { const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&"); return request$1({ url: `/pay/wallet-transaction/page?${queryString}`, method: "GET" }); }, // 获得钱包流水统计 getWalletTransactionSummary: (params) => { const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`; return request$1({ url: `/pay/wallet-transaction/get-summary?${queryString}`, // url: `/pay/wallet-transaction/get-summary`, method: "GET" // params: params }); }, // 获得钱包充值套餐列表 getWalletRechargePackageList: () => { return request$1({ url: "/pay/wallet-recharge-package/list", method: "GET", custom: { showError: false, showLoading: false } }); }, // 创建钱包充值记录(发起充值) createWalletRecharge: (data) => { return request$1({ url: "/pay/wallet-recharge/create", method: "POST", data }); }, // 消费分充值 topupConsumptionPointsCreate: (data) => { return request$1({ url: "/distri/user-top-up-consumption-points-order/create", method: "POST", data, custom: { showError: true, showLoading: true } }); }, // 获得钱包充值记录分页 getWalletRechargePage: (params) => { return request$1({ url: "/pay/wallet-recharge/page", method: "GET", params, custom: { showError: false, showLoading: false } }); }, // 创建提现申请记录 createWithdrawal: (data) => { return request$1({ url: "/distri/application-for-withdrawal/create", method: "POST", data }); } }; const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: PayWalletApi }, Symbol.toStringTag, { value: "Module" })); const OrderApi = { // 计算订单信息 settlementOrder: (data) => { const data2 = { ...data }; if (!(data.couponId > 0)) { delete data2.couponId; } if (!(data.addressId > 0)) { delete data2.addressId; } if (!data.combinationActivityId > 0) { delete data2.combinationActivityId; } if (!(data.combinationHeadId > 0)) { delete data2.combinationHeadId; } if (!(data.seckillActivityId > 0)) { delete data2.seckillActivityId; } delete data2.items; for (let i2 = 0; i2 < data.items.length; i2++) { data2[encodeURIComponent("items[" + i2 + "].skuId")] = data.items[i2].skuId + ""; data2[encodeURIComponent("items[" + i2 + "].count")] = data.items[i2].count + ""; if (data.items[i2].cartId) { data2[encodeURIComponent("items[" + i2 + "].cartId")] = data.items[i2].cartId + ""; } } const queryString = Object.keys(data2).map((key) => key + "=" + data2[key]).join("&"); return request$1({ url: `/trade/order/settlement?${queryString}`, method: "GET", custom: { showError: true, showLoading: true } }); }, // 创建订单 createOrder: (data) => { return request$1({ url: `/trade/order/create`, method: "POST", data }); }, // 获得订单 getOrder: (id) => { return request$1({ url: `/trade/order/get-detail`, method: "GET", params: { id }, custom: { showLoading: false } }); }, // 订单列表 getOrderPage: (params) => { return request$1({ url: "/trade/order/page", method: "GET", params, custom: { showLoading: false } }); }, // 确认收货 receiveOrder: (id) => { return request$1({ url: `/trade/order/receive`, method: "PUT", params: { id } }); }, // 取消订单 cancelOrder: (id) => { return request$1({ url: `/trade/order/cancel`, method: "DELETE", params: { id } }); }, // 删除订单 deleteOrder: (id) => { return request$1({ url: `/trade/order/delete`, method: "DELETE", params: { id } }); }, // 获得交易订单的物流轨迹 getOrderExpressTrackList: (id) => { return request$1({ url: `/trade/order/get-express-track-list`, method: "GET", params: { id } }); }, // 获得交易订单数量 getOrderCount: () => { return request$1({ url: "/trade/order/get-count", method: "GET", custom: { showLoading: false, auth: true } }); }, // 创建单个评论 createOrderItemComment: (data) => { return request$1({ url: `/trade/order/item/create-comment`, method: "POST", data }); } }; const __vite_glob_0_41 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: OrderApi }, Symbol.toStringTag, { value: "Module" })); const CouponApi = { // 获得优惠劵模板列表 getCouponTemplateListByIds: (ids) => { return request$1({ url: "/promotion/coupon-template/list-by-ids", method: "GET", params: { ids }, custom: { showLoading: false, // 不展示 Loading,避免领取优惠劵时,不成功提示 showError: false } }); }, // 获得优惠劵模版列表 getCouponTemplateList: (spuId, productScope, count) => { return request$1({ url: "/promotion/coupon-template/list", method: "GET", params: { spuId, productScope, count } }); }, // 获得优惠劵模版分页 getCouponTemplatePage: (params) => { return request$1({ url: "/promotion/coupon-template/page", method: "GET", params }); }, // 获得优惠劵模版 getCouponTemplate: (id) => { return request$1({ url: "/promotion/coupon-template/get", method: "GET", params: { id } }); }, // 我的优惠劵列表 getCouponPage: (params) => { return request$1({ url: "/promotion/coupon/page", method: "GET", params }); }, // 领取优惠券 takeCoupon: (templateId) => { return request$1({ url: "/promotion/coupon/take", method: "POST", data: { templateId }, custom: { auth: true, showLoading: true, loadingMsg: t$6("common.claiming"), showSuccess: true, successMsg: t$6("common.claim_success") } }); }, // 获得优惠劵 getCoupon: (id) => { return request$1({ url: "/promotion/coupon/get", method: "GET", params: { id } }); }, // 获得未使用的优惠劵数量 getUnusedCouponCount: () => { return request$1({ url: "/promotion/coupon/get-unused-count", method: "GET", custom: { showLoading: false, auth: true } }); }, // 获得匹配指定商品的优惠劵列表 getMatchCouponList: (price, spuIds, skuIds, categoryIds) => { return request$1({ url: "/promotion/coupon/match-list", method: "GET", params: { price, spuIds: spuIds.join(","), skuIds: skuIds.join(","), categoryIds: categoryIds.join(",") }, custom: { showError: false, showLoading: false // 避免影响 settlementOrder 结算的结果 } }); } }; const __vite_glob_0_28 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: CouponApi }, Symbol.toStringTag, { value: "Module" })); const userInfo = vue.computed(() => sheep$1.$store("user").userInfo); function isBetaUser() { const username2 = userInfo.value.username; return username2 === "ru10" || username2 === "迷鹿" || username2 === "非繁"; } function isAndroid() { return window.Android && window.Android.getIdentifier(); } function getAndroidJiGuangId() { return window.Android && window.Android.getRegistrationID(); } const android = vue.computed(() => isAndroid()); const androidJiGuangId = vue.computed(() => getAndroidJiGuangId()); const defaultUserInfo = { avatar: "", // 头像 nickname: "", // 昵称 gender: 0, // 性别 mobile: "", // 手机号 point: 0, // 佣金 username: "", //用户名 socialStatusLevel: "", socialStatusLevelName: "", socialStatusPoint: 0, socialUpNeed: 0 }; const defaultUserWallet = { integralDO: { currentQuota: 0, // 当前佣金 highQuota: 0, //最高佣金 freezeQuota: 0, //冻结佣金 consumptionPoints: 0 //消费分 }, descNo: 0, //用户直推人人数 descPrice: 0, //团队昨日贡献值 descTotalPrice: 0 // 团队历史总贡献值 }; const defaultNumData = { unusedCouponCount: 0, orderCount: { allCount: 0, unpaidCount: 0, undeliveredCount: 0, deliveredCount: 0, uncommentedCount: 0, afterSaleCount: 0 } }; const user$1 = defineStore({ id: "user", state: () => ({ userInfo: lodashExports.clone(defaultUserInfo), // 用户信息 userWallet: lodashExports.clone(defaultUserWallet), // 用户钱包信息 isLogin: !!uni.getStorageSync("token"), // 登录状态 numData: lodashExports.cloneDeep(defaultNumData), // 用户其他数据 lastUpdateTime: 0 // 上次更新时间 }), actions: { // 获取用户信息 async getInfo() { const { code: code2, data } = await UserApi.getUserInfo(); if (code2 !== 0) { return; } this.userInfo = data; return Promise.resolve(data); }, // 获得用户钱包 async getWallet() { const { code: code2, data } = await PayWalletApi.getDuserInfo(); if (code2 !== 0) { return; } if (android.value) { if (!data.androidRegisterId || data.androidRegisterId !== androidJiGuangId.value) { await UserApi.updateAndroidJiGuangId(androidJiGuangId.value); } } this.userWallet = data; this.userWallet.descNo = data.descNo + 1; uni.setStorageSync("isSign", data.isSign); }, // 获取订单、优惠券等其他资产信息 getNumData() { OrderApi.getOrderCount().then((res) => { if (res.code === 0) { this.numData.orderCount = res.data; } }); CouponApi.getUnusedCouponCount().then((res) => { if (res.code === 0) { this.numData.unusedCouponCount = res.data; } }); }, // 添加分享记录 // TODO 非繁人:整理下; async addShareLog(params) { const { error: error2 } = await userApi.addShareLog(params); if (error2 === 0) uni.removeStorageSync("shareLog"); }, // 设置 token async setToken(token = "", refreshToken2 = "") { if (token === "") { this.isLogin = false; uni.removeStorageSync("token"); uni.removeStorageSync("refresh-token"); } else { this.isLogin = true; uni.setStorageSync("token", token); uni.setStorageSync("refresh-token", refreshToken2); await this.loginAfter(); if (!this.userInfo.language) { const language = uni.getStorageSync("userLanguage"); await UserApi.updateUser({ language }); setLanguage(language); } else { setLanguage(this.userInfo.language); } const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true); if (!openid) { uni.showModal({ title: t$6("common.letcgo"), content: t$6("common.not_bound_wechat"), confirmText: t$6("common.bind"), success: function(res) { if (res.confirm) { sheep$1.$platform.useProvider("wechat").bind(); } } }); } } return this.isLogin; }, // 更新用户相关信息 (手动限流,5 秒之内不刷新) async updateUserData() { if (!this.isLogin) { this.resetUserData(); return; } const nowTime = (/* @__PURE__ */ new Date()).getTime(); if (this.lastUpdateTime + 5e3 > nowTime) { return; } this.lastUpdateTime = nowTime; await this.getInfo(); this.getWallet(); this.getNumData(); return this.userInfo; }, // 重置用户默认数据 resetUserData() { this.setToken(); this.userInfo = lodashExports.clone(defaultUserInfo); this.userWallet = lodashExports.clone(defaultUserWallet); this.numData = lodashExports.cloneDeep(defaultNumData); cart().emptyList(); cancelAutoSign(); uni.removeStorageSync("isSign"); uni.removeStorageSync("openid"); }, // 登录后,加载各种信息 // TODO 非繁人:整理下; async loginAfter() { await this.updateUserData(); cart().getList(); $share.getShareInfo(); autoSign(); const shareLog = uni.getStorageSync("shareLog"); if (!lodashExports.isEmpty(shareLog)) { this.addShareLog({ ...shareLog }); } setTimeout(async () => { const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true); if (!this.userInfo.subscribe && openid) { showSubscribeModal(); } }, 800); }, // 登出系统 async logout() { this.resetUserData(); return !this.isLogin; } }, persist: { enabled: true, strategies: [{ key: "user-store" }] } }); const __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: user$1 }, Symbol.toStringTag, { value: "Module" })); const sys = defineStore({ id: "sys", state: () => ({ theme: "", // 主题, mode: "light", // 明亮模式、暗黑模式(暂未支持) modeAuto: false, // 跟随系统 fontSize: 1 // 设置默认字号等级(0-4) }), getters: {}, actions: { setTheme(theme = "") { var _a2; if (theme === "") { this.theme = ((_a2 = app$1().template) == null ? void 0 : _a2.basic.theme) || "orange"; } else { this.theme = theme; } } }, persist: { enabled: true, strategies: [ { key: "sys-store" } ] } }); const __vite_glob_0_3$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: sys }, Symbol.toStringTag, { value: "Module" })); const app$1 = defineStore({ id: "app", state: () => ({ info: { // 应用信息 name: "", // 商城名称 logo: "", // logo version: "", // 版本号 copyright: "", // 版权信息 I copytime: "", // 版权信息 II cdnurl: "", // 云存储域名 filesystem: "" // 云存储平台 }, platform: { share: { methods: [], // 支持的分享方式 forwardInfo: {}, // 默认转发信息 posterInfo: {}, // 海报信息 linkAddress: "" // 复制链接地址 }, bind_mobile: 0 // 登陆后绑定手机号提醒 (弱提醒,可手动关闭) }, chat: {}, template: { // 店铺装修模板 basic: {}, // 基本信息 home: { // 首页模板 style: {}, data: [] }, user: { // 个人中心模板 style: {}, data: [] } }, shareInfo: {}, // 全局分享信息 has_wechat_trade_managed: 0 // 小程序发货信息管理 0 没有 || 1 有 }), actions: { // 获取Shopro应用配置和模板 async init(templateId = null) { const networkStatus = await _platform.checkNetwork(); if (!networkStatus) { $router.error("NetworkError"); } await adaptTemplate(this.template, templateId); { this.info = { name: "常来此购", logo: "/static/zxlogo.png", version: "1.1.13", copyright: "全部开源,个人与企业可 100% 免费使用", copytime: "Copyright© 2018-2024", cdnurl: "https://file.sheepjs.com", // 云存储域名 filesystem: "qcloud" // 云存储平台 }; this.platform = { share: { methods: ["poster", "link"], // linkAddress: "http://localhost/#/", //跳转链接 linkAddress: "https://zxgz.newfeifan.cn/#/", //跳转链接 posterInfo: { "user_bg": "/static/user-poster-bg.jpg", "goods_bg": "/static/user-poster-bg.jpg", "groupon_bg": "/static/img/shop/config/groupon-poster-bg.png" } }, bind_mobile: 0 }; this.chat = { chat_domain: "https://api.shopro.sheepjs.com/chat", room_id: "admin" }; this.has_wechat_trade_managed = 0; const sysStore = sys(); sysStore.setTheme(); const userStore = user$1(); if (userStore.isLogin) { userStore.loginAfter(); } return Promise.resolve(true); } } }, persist: { enabled: true, strategies: [{ key: "app-store" }] } }); const adaptTemplate = async (appTemplate, templateId) => { var _a2; const { data: diyTemplate } = templateId ? await DiyApi.getDiyTemplate(templateId) : await DiyApi.getUsedDiyTemplate(); if (!diyTemplate) { $router.error("TemplateError"); return; } const tabBar2 = (_a2 = diyTemplate == null ? void 0 : diyTemplate.property) == null ? void 0 : _a2.tabBar; if (tabBar2) { appTemplate.basic.tabbar = tabBar2; if (tabBar2 == null ? void 0 : tabBar2.theme) { appTemplate.basic.theme = tabBar2 == null ? void 0 : tabBar2.theme; } } appTemplate.home = diyTemplate == null ? void 0 : diyTemplate.home; appTemplate.user = diyTemplate == null ? void 0 : diyTemplate.user; }; const __vite_glob_0_0$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: app$1 }, Symbol.toStringTag, { value: "Module" })); const modal = defineStore({ id: "modal", state: () => ({ auth: "", // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername isActive: "", share: false, // 分享弹框 shareInfo: { spuId: 0 }, // 分享弹框信息 signUp: false, // 签到弹框 signUpInfo: {}, // 签到弹框信息 subscribe: false, // 关注弹框 getWallet: false, // 获得佣金/身价弹窗 getWalletInfo: { points: 0, socialStatus: 0 }, // 获得佣金/身价弹窗信息 menu: false, // 快捷菜单弹框 advHistory: [], // 广告弹框记录 lastTimer: { // 短信验证码计时器,为了防止刷新请求做了持久化 smsLogin: 0, // changeMobile: 0, changeMobileOld: 0, changeMobileNew: 0, resetPassword: 0, changePassword: 0, consumptionTransfers: 0, zeroBuy: 0 } }), persist: { enabled: true, strategies: [ { key: "modal-store", paths: ["lastTimer", "advHistory"] } ] } }); const __vite_glob_0_2$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: modal }, Symbol.toStringTag, { value: "Module" })); var _a, _b; const isH5 = typeof uni !== "undefined" ? ["web", "h5", void 0].includes((_b = (_a = uni == null ? void 0 : uni.getSystemInfoSync()) == null ? void 0 : _a.uniPlatform) == null ? void 0 : _b.toLocaleLowerCase()) : true; const updateStorage = (strategy, store, options2) => { const storage = strategy.storage; const storeKey = strategy.key || store.$id; const isCustomStorage = isH5 || (options2 == null ? void 0 : options2.enforceCustomStorage); if (strategy.paths) { const partialState = strategy.paths.reduce((finalObj, key) => { finalObj[key] = store.$state[key]; return finalObj; }, {}); if (isCustomStorage && storage) { storage.setItem(storeKey, JSON.stringify(partialState)); } else { uni.setStorage({ key: storeKey, data: JSON.stringify(partialState) }); } } else if (isCustomStorage && storage) { storage.setItem(storeKey, JSON.stringify(store.$state)); } else { uni.setStorage({ key: storeKey, data: JSON.stringify(store.$state) }); } }; var index = ({ options: options2, store }) => { var _a2, _b2, _c, _d, _e2, _f; if ((_a2 = options2.persist) == null ? void 0 : _a2.enabled) { const defaultStrat = [ { key: store.$id, storage: ((_b2 = options2.persist) == null ? void 0 : _b2.H5Storage) || (window == null ? void 0 : window.sessionStorage) } ]; const strategies = ((_d = (_c = options2.persist) == null ? void 0 : _c.strategies) == null ? void 0 : _d.length) ? (_e2 = options2.persist) == null ? void 0 : _e2.strategies : defaultStrat; strategies.forEach((strategy) => { var _a3, _b3; const storage = strategy.storage || ((_a3 = options2.persist) == null ? void 0 : _a3.H5Storage) || (window == null ? void 0 : window.sessionStorage); const storeKey = strategy.key || store.$id; let storageResult; if (isH5 || ((_b3 = options2.persist) == null ? void 0 : _b3.enforceCustomStorage)) { storageResult = storage.getItem(storeKey); } else { storageResult = uni.getStorageSync(storeKey); } if (storageResult) { store.$patch(JSON.parse(storageResult)); updateStorage(strategy, store, options2.persist); } }); store.$subscribe(() => { strategies.forEach((strategy) => { updateStorage(strategy, store, options2.persist); }); }, { detached: ((_f = options2.persist) == null ? void 0 : _f.detached) ? true : false }); } }; const files$2 = /* @__PURE__ */ Object.assign({ "./app.js": __vite_glob_0_0$1, "./cart.js": __vite_glob_0_1$1, "./modal.js": __vite_glob_0_2$1, "./sys.js": __vite_glob_0_3$1, "./user.js": __vite_glob_0_4$1 }); const modules = {}; Object.keys(files$2).forEach((key) => { modules[key.replace(/(.*\/)*([^.]+).*/gi, "$2")] = files$2[key].default; }); const setupPinia = (app2) => { const pinia = createPinia(); pinia.use(index); app2.use(pinia); }; const $store = (name2) => { return modules[name2](); }; const options = { // 显示操作成功消息 默认不显示 showSuccess: false, // 成功提醒 默认使用后端返回值 successMsg: "", // 显示失败消息 默认显示 showError: true, // 失败提醒 默认使用后端返回信息 errorMsg: "", // 显示请求时loading模态框 默认显示 showLoading: true, // loading提醒文字 loadingMsg: t$6("common.loading"), // 需要授权才能请求 默认放开 auth: false // ... }; let LoadingInstance = { target: null, count: 0 }; function closeLoading() { if (LoadingInstance.count > 0) LoadingInstance.count--; if (LoadingInstance.count === 0) uni.hideLoading(); } const http = new Request$1({ baseURL: baseUrl + apiPath, timeout: 8e3, method: "GET", header: { Accept: "text/json", "Content-Type": "application/json;charset=UTF-8", platform: _platform.name, "Accept-Language": uni.getStorageSync("userLanguage") || uni.getLocale() }, sslVerify: false, custom: options }); http.interceptors.request.use( (config2) => { if (config2.custom.auth && !$store("user").isLogin) { showAuthModal(); return Promise.reject(); } if (config2.custom.showLoading) { LoadingInstance.count++; LoadingInstance.count === 1 && uni.showLoading({ title: config2.custom.loadingMsg, mask: true, fail: () => { uni.hideLoading(); } }); } const token = getAccessToken(); if (token) { config2.header["Authorization"] = token; } config2.header["Accept"] = "*/*"; config2.header["tenant-id"] = "1"; config2.header["terminal"] = "20"; return config2; }, (error2) => { return Promise.reject(error2); } ); http.interceptors.response.use( (response) => { var _a2, _b2; if (response.config.url.indexOf("/member/auth/") >= 0 && ((_b2 = (_a2 = response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.accessToken)) { $store("user").setToken(response.data.data.accessToken, response.data.data.refreshToken); } response.config.custom.showLoading && closeLoading(); if (response.data.code !== 0) { if (response.data.code === 401) { cancelAutoSign(); return refreshToken(response.config); } if (response.config.custom.showError) { cancelAutoSign(); uni.showToast({ title: response.data.msg || t$6("common.server_error_try_later"), icon: "none", mask: true }); } } if (response.config.custom.showSuccess && response.config.custom.successMsg !== "" && response.data.code === 0) { uni.showToast({ title: response.config.custom.successMsg, icon: "none" }); } return Promise.resolve(response.data); }, (error2) => { var _a2; formatAppLog("log", "at sheep/request/index.js:159", "服务器开小差"); cancelAutoSign(); const userStore = $store("user"); const isLogin = userStore.isLogin; let errorMessage = t$6("common.network_request_error"); if (error2 !== void 0) { switch (error2.statusCode) { case 400: errorMessage = t$6("common.request_error"); break; case 401: errorMessage = isLogin ? t$6("common.login_expired") : t$6("common.please_login"); break; case 403: errorMessage = t$6("common.access_denied"); break; case 404: errorMessage = t$6("common.request_error"); break; case 408: errorMessage = t$6("common.request_timeout"); break; case 429: errorMessage = t$6("common.frequent_requests"); break; case 500: errorMessage = t$6("common.server_error_try_later"); break; case 501: errorMessage = t$6("common.server_unavailable"); break; case 502: errorMessage = t$6("common.network_error"); break; case 503: errorMessage = t$6("common.service_unavailable"); break; case 504: errorMessage = t$6("common.network_timeout"); break; case 505: errorMessage = t$6("common.http_not_supported"); break; } if (error2.errMsg.includes("timeout")) errorMessage = t$6("common.request_timeout"); } if (error2 && error2.config) { if (error2.config.custom.showError === false) { uni.showToast({ title: ((_a2 = error2.data) == null ? void 0 : _a2.msg) || errorMessage, icon: "none", mask: true }); } error2.config.custom.showLoading && closeLoading(); } return false; } ); let requestList = []; let isRefreshToken = false; const refreshToken = async (config2) => { if (config2.url.indexOf("/member/auth/refresh-token") >= 0) { return Promise.reject("error"); } if (!isRefreshToken) { isRefreshToken = true; const refreshToken2 = getRefreshToken(); if (!refreshToken2) { return handleAuthorized(); } try { const refreshTokenResult = await AuthUtil.refreshToken(refreshToken2); if (refreshTokenResult.code !== 0) { throw new Error("刷新令牌失败"); } config2.header.Authorization = "Bearer " + getAccessToken(); requestList.forEach((cb) => { cb(); }); requestList = []; return request(config2); } catch (e2) { requestList.forEach((cb) => { cb(); }); return handleAuthorized(); } finally { requestList = []; isRefreshToken = false; } } else { return new Promise((resolve) => { requestList.push(() => { config2.header.Authorization = "Bearer " + getAccessToken(); resolve(request(config2)); }); }); } }; const handleAuthorized = () => { const userStore = $store("user"); userStore.logout(true); showAuthModal(); return Promise.reject({ code: 401, msg: userStore.isLogin ? t$6("common.login_expired") : t$6("common.please_login") }); }; const getAccessToken = () => { return uni.getStorageSync("token"); }; const getRefreshToken = () => { return uni.getStorageSync("refresh-token"); }; const request = (config2) => { return http.middleware(config2); }; const request$1 = request; const ConsumptionApi = { // 获取消费分记录 getConsumptionLog: (params) => { return request$1({ url: "/distri/consumption-change-log/page", method: "GET", params, custom: { showLoading: true, showError: true } }); }, // 消费分转让 createConsumptionLog: (data) => { return request$1({ url: "/distri/consumption-transfer-log/create", method: "POST", data, custom: { showLoading: true, showError: true } }); }, // 获取消费分转让记录 getConsumptionTransfersLog: (params) => { return request$1({ url: "/distri/consumption-transfer-log/page", method: "GET", params, custom: { showLoading: true, showError: true } }); }, quotaTransition: (quota) => { return request$1({ url: "/distri/integral/quotaTransition?quota=" + quota, method: "PUT", custom: { showLoading: true, showError: true } }); } }; const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: ConsumptionApi }, Symbol.toStringTag, { value: "Module" })); const ScoreApi = { getScoreApi: (params) => { return request$1({ url: "/distri/pt-profit-log/page", method: "GET", params, custom: { showLoading: false, showError: false } }); }, getMaxScoreList: (params) => { return request$1({ url: "/distri/pt-profit-log/getMaxAmountPage", method: "GET", params, custom: { showLoading: false, showError: false } }); } }; const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: ScoreApi }, Symbol.toStringTag, { value: "Module" })); const ShareApi = { // 查询商品linkId getLinkId: (category, objectId) => { return request$1({ url: "/distri/share-link/getShareLink", method: "GET", params: { category, objectId }, custom: { showLoading: false, showError: false } }); }, // 根据linkId查id getObjectIdByLinkId: (linkId) => { return request$1({ url: "/distri/share-link/getObjectIdByLinkId", method: "GET", params: { linkId }, custom: { showLoading: false, showError: false } }); } }; const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: ShareApi }, Symbol.toStringTag, { value: "Module" })); const TeamApi = { // 查询商品linkId getTeam: (params) => { return request$1({ url: "/distri/share-path/getTeam", method: "GET", params, custom: { showLoading: true, showError: false } }); } }; const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: TeamApi }, Symbol.toStringTag, { value: "Module" })); const WithdrawalApi = { getWithdrawalPage: (params) => { return request$1({ url: "/distri/application-for-withdrawal/page", method: "GET", params, custom: { showLoading: false, showError: false } }); }, // 获得提现比例 getWithdrawalPercentage: (params) => { return request$1({ url: "/distri/order-percentage/get", method: "GET", params, custom: { showLoading: false, showError: false } }); } }; const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: WithdrawalApi }, Symbol.toStringTag, { value: "Module" })); const FileApi = { // 上传文件 uploadFile: (file) => { uni.getStorageSync("token"); uni.showLoading({ title: t$6("common.uploading") }); return new Promise((resolve, reject) => { uni.uploadFile({ url: baseUrl + apiPath + "/infra/file/upload", filePath: file, name: "file", header: { // Accept: 'text/json', Accept: "*/*", "tenant-id": "1" // Authorization: 'Bearer test247', }, success: (uploadFileRes) => { let result2 = JSON.parse(uploadFileRes.data); if (result2.error === 1) { uni.showToast({ icon: "none", title: result2.msg }); } else { return resolve(result2); } }, fail: (error2) => { formatAppLog("log", "at sheep/api/infra/file.js:40", "上传失败:", error2); return resolve(false); }, complete: () => { uni.hideLoading(); } }); }); }, // 通过图片url获得文件流 getFileIO: async (fileUrl) => { const response = await fetch("https://zxgz.newfeifan.cn/app-api/infra/file/downloadByUrl?fileUrl=" + fileUrl, { method: "GET" }); if (!response.ok) { throw new Error("网络响应不是OK状态"); } const blob = await response.blob(); return blob; } }; const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: FileApi }, Symbol.toStringTag, { value: "Module" })); const AddressApi = { // 获得用户收件地址列表 getAddressList: (addressType = 1) => { return request$1({ url: "/member/address/list", method: "GET", params: { addressType } }); }, // 创建用户收件地址 createAddress: (data) => { return request$1({ url: "/member/address/create", method: "POST", data, custom: { showSuccess: true, successMsg: t$6("common.save_success") } }); }, // 更新用户收件地址 updateAddress: (data) => { return request$1({ url: "/member/address/update", method: "PUT", data, custom: { showSuccess: true, successMsg: t$6("common.update_success") } }); }, // 获得用户收件地址 getAddress: (id, addressType = 1) => { formatAppLog("log", "at sheep/api/member/address.js:38", "123123", addressType); return request$1({ url: "/member/address/get", method: "GET", params: { id, addressType } }); }, // 删除用户收件地址 deleteAddress: (id, addressType = 1) => { return request$1({ url: "/member/address/delete", method: "DELETE", params: { id, addressType } }); } }; const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: AddressApi }, Symbol.toStringTag, { value: "Module" })); const PointApi = { // 获得用户佣金记录分页 getPointRecordPage: (params) => { if (params.addStatus === void 0) { delete params.addStatus; } const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&"); return request$1({ url: `/member/point/record/page?${queryString}`, method: "GET" }); } }; const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: PointApi }, Symbol.toStringTag, { value: "Module" })); const app = { //小程序直播 mplive: { getRoomList: (ids) => request$1({ url: "app/mplive/getRoomList", method: "GET", params: { ids: ids.join(",") } }), getMpLink: () => request$1({ url: "app/mplive/getMpLink", method: "GET" }) } }; const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: app }, Symbol.toStringTag, { value: "Module" })); const chat$1 = { // 获取聊天token unifiedToken: () => request$1({ url: "unifiedToken", custom: { showError: false, showLoading: false } }) }; const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: chat$1 }, Symbol.toStringTag, { value: "Module" })); const third$1 = { // 微信相关 wechat: { // 小程序订阅消息 subscribeTemplate: (params) => request$1({ url: "third/wechat/subscribeTemplate", method: "GET", params: { platform: "miniProgram" }, custom: { showError: false, showLoading: false } }), // 获取微信小程序码 getWxacode: (path) => `${baseUrl}${apiPath}third/wechat/wxacode?platform=miniProgram&payload=${encodeURIComponent( JSON.stringify({ path }) )}` }, // 苹果相关 apple: { // 第三方登录 login: (data) => request$1({ url: "third/apple/login", method: "POST", data, custom: { showSuccess: true, loadingMsg: t$6("common.logging_in") } }) } }; const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: third$1 }, Symbol.toStringTag, { value: "Module" })); const files$1 = /* @__PURE__ */ Object.assign({ "./app.js": __vite_glob_0_12, "./chat.js": __vite_glob_0_13, "./third.js": __vite_glob_0_15 }); let api$1 = {}; Object.keys(files$1).forEach((key) => { api$1 = { ...api$1, [key.replace(/(.*\/)*([^.]+).*/gi, "$2")]: files$1[key].default }; }); const api$2 = api$1; const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: api$2 }, Symbol.toStringTag, { value: "Module" })); const PayChannelApi = { // 获得指定应用的开启的支付渠道编码列表 getEnableChannelCodeList: (appId) => { return request$1({ url: "/pay/channel/get-enable-code-list", method: "GET", params: { appId } }); } }; const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: PayChannelApi }, Symbol.toStringTag, { value: "Module" })); const CategoryApi = { // 查询分类列表 getCategoryList: () => { return request$1({ url: "/product/category/list", method: "GET" }); }, // 查询分类列表,指定编号 getCategoryListByIds: (ids) => { return request$1({ url: "/product/category/list-by-ids", method: "GET", params: { ids } }); } }; const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: CategoryApi }, Symbol.toStringTag, { value: "Module" })); const CommentApi = { // 获得商品评价分页 getCommentPage: (spuId, pageNo, pageSize, type) => { return request$1({ url: "/product/comment/page", method: "GET", params: { spuId, pageNo, pageSize, type }, custom: { showLoading: false, showError: false } }); } }; const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: CommentApi }, Symbol.toStringTag, { value: "Module" })); const FavoriteApi = { // 获得商品收藏分页 getFavoritePage: (data) => { return request$1({ url: "/product/favorite/page", method: "GET", params: data }); }, // 检查是否收藏过商品 isFavoriteExists: (spuId) => { return request$1({ url: "/product/favorite/exits", method: "GET", params: { spuId } }); }, // 添加商品收藏 createFavorite: (spuId) => { return request$1({ url: "/product/favorite/create", method: "POST", data: { spuId }, custom: { auth: true, showSuccess: true, successMsg: t$6("common.collect_success") } }); }, // 添加商品收藏时调用的加身价 createCollectBefore: (spuId) => { return request$1({ url: "/distri/user-collect-before/create", method: "POST", data: { productSpuId: spuId } }); }, // 取消商品收藏 deleteFavorite: (spuId) => { return request$1({ url: "/product/favorite/delete", method: "DELETE", data: { spuId }, custom: { auth: true, showSuccess: true, successMsg: t$6("common.cancel_success") } }); } }; const __vite_glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: FavoriteApi }, Symbol.toStringTag, { value: "Module" })); const SpuHistoryApi = { // 删除商品浏览记录 deleteBrowseHistory: (spuIds) => { return request$1({ url: "/product/browse-history/delete", method: "DELETE", data: { spuIds }, custom: { showSuccess: true, successMsg: t$6("common.delete_success") } }); }, // 清空商品浏览记录 cleanBrowseHistory: () => { return request$1({ url: "/product/browse-history/clean", method: "DELETE", custom: { showSuccess: true, successMsg: t$6("common.clear_success") } }); }, // 获得商品浏览记录分页 getBrowseHistoryPage: (data) => { return request$1({ url: "/product/browse-history/page", method: "GET", data, custom: { showLoading: false } }); } }; const __vite_glob_0_22 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: SpuHistoryApi }, Symbol.toStringTag, { value: "Module" })); const SpuApi = { // 获得商品 SPU 列表 getSpuListByIds: (ids) => { return request$1({ url: "/product/spu/list-by-ids", method: "GET", params: { ids }, custom: { showLoading: false, showError: false } }); }, // 获得商品 SPU 分页 getSpuPage: (params) => { return request$1({ url: "/product/spu/page", method: "GET", params, custom: { showLoading: false, showError: false } }); }, // 查询商品 getSpuDetail: (id) => { return request$1({ url: "/product/spu/get-detail", method: "GET", params: { id }, custom: { showLoading: false, showError: false } }); } }; const __vite_glob_0_23 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: SpuApi }, Symbol.toStringTag, { value: "Module" })); const ActivityApi = { // 获得单个商品,近期参与的每个活动 getActivityListBySpuId: (spuId) => { return request$1({ url: "/promotion/activity/list-by-spu-id", method: "GET", params: { spuId } }); } }; const __vite_glob_0_24 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: ActivityApi }, Symbol.toStringTag, { value: "Module" })); const ArticleApi = { // 获得文章详情 getArticle: (id, title) => { return request$1({ url: "/promotion/article/get", method: "GET", params: { id, title } }); }, // 获得文章列表 getHomeList: () => { return request$1({ url: "/promotion/article/getHomeInfo", method: "GET" }); }, getArticleByCategory: (params) => { return request$1({ url: "/promotion/article/page", method: "GET", params }); } }; const __vite_glob_0_25 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: ArticleApi }, Symbol.toStringTag, { value: "Module" })); const BargainApi = { // 获得砍价记录的概要信息 getBargainRecordSummary: () => { return request$1({ url: "/promotion/bargain-record/get-summary", method: "GET" }); }, // 获得砍价活动分页 getBargainActivityPage: () => { return request$1({ url: "/promotion/bargain-activity/page", method: "GET" }); }, // 获得砍价活动详情 getBargainActivityDetail(params) { return request$1({ url: "/promotion/bargain-activity/get-detail", method: "GET", params }); } }; const __vite_glob_0_26 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: BargainApi }, Symbol.toStringTag, { value: "Module" })); const CombinationApi = { // 获得拼团活动列表 getCombinationActivityList: (count) => { return request$1({ url: "/promotion/combination-activity/list", method: "GET", params: { count } }); }, // 获得拼团活动分页 getCombinationActivityPage: (params) => { return request$1({ url: "/promotion/combination-activity/page", method: "GET", params }); }, // 获得拼团活动明细 getCombinationActivity: (id) => { return request$1({ url: "/promotion/combination-activity/get-detail", method: "GET", params: { id } }); }, // 获得最近 n 条拼团记录(团长发起的) getHeadCombinationRecordList: (activityId, status, count) => { return request$1({ url: "/promotion/combination-record/get-head-list", method: "GET", params: { activityId, status, count } }); }, // 获得我的拼团记录分页 getCombinationRecordPage: (params) => { return request$1({ url: "/promotion/combination-record/page", method: "GET", params }); }, // 获得拼团记录明细 getCombinationRecordDetail: (id) => { return request$1({ url: "/promotion/combination-record/get-detail", method: "GET", params: { id } }); }, // 获得拼团记录的概要信息 getCombinationRecordSummary: () => { return request$1({ url: "/promotion/combination-record/get-summary", method: "GET" }); } }; const __vite_glob_0_27 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: CombinationApi }, Symbol.toStringTag, { value: "Module" })); const PageApi = { // 获得页面 getPage: (params) => { return request$1({ url: "/promotion/diy-page/get", method: "GET", params }); } }; const __vite_glob_0_30 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: PageApi }, Symbol.toStringTag, { value: "Module" })); const RewardActivityApi = { // 获得满减送活动 getRewardActivity: (id) => { return request$1({ url: "/promotion/reward-activity/get", method: "GET", params: { id } }); } }; const __vite_glob_0_31 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: RewardActivityApi }, Symbol.toStringTag, { value: "Module" })); const SeckillApi = { // 获得秒杀时间段列表 getSeckillConfigList: () => { return request$1({ url: "promotion/seckill-config/list", method: "GET" }); }, // 获得当前秒杀活动 getNowSeckillActivity: () => { return request$1({ url: "promotion/seckill-activity/get-now", method: "GET" }); }, // 获得秒杀活动分页 getSeckillActivityPage: (params) => { return request$1({ url: "promotion/seckill-activity/page", method: "GET", params }); }, /** * 获得秒杀活动明细 * @param {number} id 秒杀活动编号 * @return {*} */ getSeckillActivity: (id) => { return request$1({ url: "promotion/seckill-activity/get-detail", method: "GET", params: { id } }); } }; const __vite_glob_0_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: SeckillApi }, Symbol.toStringTag, { value: "Module" })); const SaleApi = { // 申请成为商户 createMerchant: (data) => { return request$1({ url: "/sale/merchant-apply/create", method: "POST", data, custom: { showSuccess: true, successMsg: t$6("common.apply_success") } }); }, // 获取商户信息 getMerchant: () => { return request$1({ url: "/sale/merchant-apply/get", method: "GET" }); }, // 变动商户信息 updateMerchant: (data) => { return request$1({ url: "/sale/merchant-apply/update", method: "PUT", data, custom: { showSuccess: true, successMsg: t$6("common.change_success") } }); }, getMerchantPage: (params) => { return request$1({ url: "/sale/merchant-apply-log/page", method: "GET", params, custom: { showLoading: true } }); }, checkContactNumber: (params) => { return request$1({ url: "/system/users/getUserMobile", method: "GET", params, custom: { showLoading: true } }); }, checkSystemUser: (params) => { return request$1({ url: "/sale/merchant-apply/isSystemUserByMobile", method: "GET", params, custom: { showLoading: true } }); } }; const __vite_glob_0_33 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: SaleApi }, Symbol.toStringTag, { value: "Module" })); const AreaApi = { // 获得地区树 getAreaTree: () => { return request$1({ url: "/system/area/tree", method: "GET" }); } }; const __vite_glob_0_34 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: AreaApi }, Symbol.toStringTag, { value: "Module" })); const VoiceApi = { // 语音转文字 getVoiceToText: () => { return request$1({ url: "/voice2text", method: "POST" }); } }; const __vite_glob_0_35 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: VoiceApi }, Symbol.toStringTag, { value: "Module" })); const AfterSaleApi = { // 获得售后分页 getAfterSalePage: (params) => { return request$1({ url: `/trade/after-sale/page`, method: "GET", params, custom: { showLoading: false } }); }, // 创建售后 createAfterSale: (data) => { return request$1({ url: `/trade/after-sale/create`, method: "POST", data }); }, // 获得售后 getAfterSale: (id) => { return request$1({ url: `/trade/after-sale/get`, method: "GET", params: { id } }); }, // 取消售后 cancelAfterSale: (id) => { return request$1({ url: `/trade/after-sale/cancel`, method: "DELETE", params: { id } }); }, // 获得售后日志列表 getAfterSaleLogList: (afterSaleId) => { return request$1({ url: `/trade/after-sale-log/list`, method: "GET", params: { afterSaleId } }); }, // 退回货物 deliveryAfterSale: (data) => { return request$1({ url: `/trade/after-sale/delivery`, method: "PUT", data }); } }; const __vite_glob_0_36 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: AfterSaleApi }, Symbol.toStringTag, { value: "Module" })); const BrokerageApi = { // 获得个人分销信息 getBrokerageUser: () => { return request$1({ url: "/trade/brokerage-user/get", method: "GET" }); }, // 获得个人分销统计 getBrokerageUserSummary: () => { return request$1({ url: "/trade/brokerage-user/get-summary", method: "GET" }); }, // 获得分销记录分页 getBrokerageRecordPage: (params) => { if (params.status === void 0) { delete params.status; } const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&"); return request$1({ url: `/trade/brokerage-record/page?${queryString}`, method: "GET" }); }, // 创建分销提现 createBrokerageWithdraw: (data) => { return request$1({ url: "/trade/brokerage-withdraw/create", method: "POST", data }); }, // 获得商品的分销金额 getProductBrokeragePrice: (spuId) => { return request$1({ url: "/trade/brokerage-record/get-product-brokerage-price", method: "GET", params: { spuId } }); }, // 获得分销用户排行(基于佣金) getRankByPrice: (params) => { const queryString = `times=${params.times[0]}×=${params.times[1]}`; return request$1({ url: `/trade/brokerage-user/get-rank-by-price?${queryString}`, method: "GET" }); }, // 获得分销用户排行分页(基于佣金) getBrokerageUserChildSummaryPageByPrice: (params) => { const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&"); return request$1({ url: `/trade/brokerage-user/rank-page-by-price?${queryString}`, method: "GET" }); }, // 获得分销用户排行分页(基于用户量) getBrokerageUserRankPageByUserCount: (params) => { const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&"); return request$1({ url: `/trade/brokerage-user/rank-page-by-user-count?${queryString}`, method: "GET" }); }, // 获得下级分销统计分页 getBrokerageUserChildSummaryPage: (params) => { return request$1({ url: "/trade/brokerage-user/child-summary-page", method: "GET", params }); } }; const __vite_glob_0_37 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: BrokerageApi }, Symbol.toStringTag, { value: "Module" })); const TradeConfigApi = { // 获得交易配置 getTradeConfig: () => { return request$1({ url: `/trade/config/get`, method: "GET" }); } }; const __vite_glob_0_39 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: TradeConfigApi }, Symbol.toStringTag, { value: "Module" })); const DeliveryApi = { // 获得快递公司列表 getDeliveryExpressList: () => { return request$1({ url: `/trade/delivery/express/list`, method: "get" }); } }; const __vite_glob_0_40 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: DeliveryApi }, Symbol.toStringTag, { value: "Module" })); const files = /* @__PURE__ */ Object.assign({ "./distri/consumption.js": __vite_glob_0_0, "./distri/score.js": __vite_glob_0_1, "./distri/share.js": __vite_glob_0_2, "./distri/team.js": __vite_glob_0_3, "./distri/withdrawal.js": __vite_glob_0_4, "./infra/file.js": __vite_glob_0_5, "./member/address.js": __vite_glob_0_6, "./member/auth.js": __vite_glob_0_7, "./member/point.js": __vite_glob_0_8, "./member/signin.js": __vite_glob_0_9, "./member/social.js": __vite_glob_0_10, "./member/user.js": __vite_glob_0_11, "./migration/app.js": __vite_glob_0_12, "./migration/chat.js": __vite_glob_0_13, "./migration/index.js": __vite_glob_0_14, "./migration/third.js": __vite_glob_0_15, "./pay/channel.js": __vite_glob_0_16, "./pay/order.js": __vite_glob_0_17, "./pay/wallet.js": __vite_glob_0_18, "./product/category.js": __vite_glob_0_19, "./product/comment.js": __vite_glob_0_20, "./product/favorite.js": __vite_glob_0_21, "./product/history.js": __vite_glob_0_22, "./product/spu.js": __vite_glob_0_23, "./promotion/activity.js": __vite_glob_0_24, "./promotion/article.js": __vite_glob_0_25, "./promotion/bargain.js": __vite_glob_0_26, "./promotion/combination.js": __vite_glob_0_27, "./promotion/coupon.js": __vite_glob_0_28, "./promotion/diy.js": __vite_glob_0_29, "./promotion/page.js": __vite_glob_0_30, "./promotion/rewardActivity.js": __vite_glob_0_31, "./promotion/seckill.js": __vite_glob_0_32, "./sale/sale.js": __vite_glob_0_33, "./system/area.js": __vite_glob_0_34, "./system/voice.js": __vite_glob_0_35, "./trade/afterSale.js": __vite_glob_0_36, "./trade/brokerage.js": __vite_glob_0_37, "./trade/cart.js": __vite_glob_0_38, "./trade/config.js": __vite_glob_0_39, "./trade/delivery.js": __vite_glob_0_40, "./trade/order.js": __vite_glob_0_41 }); let api = {}; Object.keys(files).forEach((key) => { const fileName = key.replace(/(.*\/)*([^.]+).*/gi, "$2"); api = { ...api, [fileName]: files[key].default }; }); const $api = api; const zIndex = { toast: 10090, noNetwork: 10080, popup: 10075, // popup包含popup,actionsheet,keyboard,picker的值 mask: 10070, navbar: 980, topTips: 975, sticky: 970, indexListSticky: 965, popover: 960 }; var relativeTime$1 = { exports: {} }; (function(module, exports) { !function(r2, e2) { module.exports = e2(); }(commonjsGlobal, function() { return function(r2, e2, t2) { r2 = r2 || {}; var n2 = e2.prototype, o2 = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }; function i2(r3, e3, t3, o3) { return n2.fromToBase(r3, e3, t3, o3); } t2.en.relativeTime = o2, n2.fromToBase = function(e3, n3, i3, d3, u2) { for (var f2, a2, s2, l2 = i3.$locale().relativeTime || o2, h2 = r2.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m2 = h2.length, c2 = 0; c2 < m2; c2 += 1) { var y2 = h2[c2]; y2.d && (f2 = d3 ? t2(e3).diff(i3, y2.d, true) : i3.diff(e3, y2.d, true)); var p2 = (r2.rounding || Math.round)(Math.abs(f2)); if (s2 = f2 > 0, p2 <= y2.r || !y2.r) { p2 <= 1 && c2 > 0 && (y2 = h2[c2 - 1]); var v2 = l2[y2.l]; u2 && (p2 = u2("" + p2)), a2 = "string" == typeof v2 ? v2.replace("%d", p2) : v2(p2, n3, y2.l, s2); break; } } if (n3) return a2; var M2 = s2 ? l2.future : l2.past; return "function" == typeof M2 ? M2(a2) : M2.replace("%s", a2); }, n2.to = function(r3, e3) { return i2(r3, e3, this, true); }, n2.from = function(r3, e3) { return i2(r3, e3, this); }; var d2 = function(r3) { return r3.$u ? t2.utc() : t2(); }; n2.toNow = function(r3) { return this.to(d2(this), r3); }, n2.fromNow = function(r3) { return this.from(d2(this), r3); }; }; }); })(relativeTime$1); var relativeTimeExports = relativeTime$1.exports; const relativeTime = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports); var duration$1 = { exports: {} }; (function(module, exports) { !function(t2, s2) { module.exports = s2(); }(commonjsGlobal, function() { var t2, s2, n2 = 1e3, i2 = 6e4, e2 = 36e5, r2 = 864e5, o2 = /\[([^\]]+)]|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, u2 = 31536e6, d2 = 2628e6, a2 = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, h2 = { years: u2, months: d2, days: r2, hours: e2, minutes: i2, seconds: n2, milliseconds: 1, weeks: 6048e5 }, c2 = function(t3) { return t3 instanceof g2; }, f2 = function(t3, s3, n3) { return new g2(t3, n3, s3.$l); }, m2 = function(t3) { return s2.p(t3) + "s"; }, l2 = function(t3) { return t3 < 0; }, $2 = function(t3) { return l2(t3) ? Math.ceil(t3) : Math.floor(t3); }, y2 = function(t3) { return Math.abs(t3); }, v2 = function(t3, s3) { return t3 ? l2(t3) ? { negative: true, format: "" + y2(t3) + s3 } : { negative: false, format: "" + t3 + s3 } : { negative: false, format: "" }; }, g2 = function() { function l3(t3, s3, n3) { var i3 = this; if (this.$d = {}, this.$l = n3, void 0 === t3 && (this.$ms = 0, this.parseFromMilliseconds()), s3) return f2(t3 * h2[m2(s3)], this); if ("number" == typeof t3) return this.$ms = t3, this.parseFromMilliseconds(), this; if ("object" == typeof t3) return Object.keys(t3).forEach(function(s4) { i3.$d[m2(s4)] = t3[s4]; }), this.calMilliseconds(), this; if ("string" == typeof t3) { var e3 = t3.match(a2); if (e3) { var r3 = e3.slice(2).map(function(t4) { return null != t4 ? Number(t4) : 0; }); return this.$d.years = r3[0], this.$d.months = r3[1], this.$d.weeks = r3[2], this.$d.days = r3[3], this.$d.hours = r3[4], this.$d.minutes = r3[5], this.$d.seconds = r3[6], this.calMilliseconds(), this; } } return this; } var y3 = l3.prototype; return y3.calMilliseconds = function() { var t3 = this; this.$ms = Object.keys(this.$d).reduce(function(s3, n3) { return s3 + (t3.$d[n3] || 0) * h2[n3]; }, 0); }, y3.parseFromMilliseconds = function() { var t3 = this.$ms; this.$d.years = $2(t3 / u2), t3 %= u2, this.$d.months = $2(t3 / d2), t3 %= d2, this.$d.days = $2(t3 / r2), t3 %= r2, this.$d.hours = $2(t3 / e2), t3 %= e2, this.$d.minutes = $2(t3 / i2), t3 %= i2, this.$d.seconds = $2(t3 / n2), t3 %= n2, this.$d.milliseconds = t3; }, y3.toISOString = function() { var t3 = v2(this.$d.years, "Y"), s3 = v2(this.$d.months, "M"), n3 = +this.$d.days || 0; this.$d.weeks && (n3 += 7 * this.$d.weeks); var i3 = v2(n3, "D"), e3 = v2(this.$d.hours, "H"), r3 = v2(this.$d.minutes, "M"), o3 = this.$d.seconds || 0; this.$d.milliseconds && (o3 += this.$d.milliseconds / 1e3, o3 = Math.round(1e3 * o3) / 1e3); var u3 = v2(o3, "S"), d3 = t3.negative || s3.negative || i3.negative || e3.negative || r3.negative || u3.negative, a3 = e3.format || r3.format || u3.format ? "T" : "", h3 = (d3 ? "-" : "") + "P" + t3.format + s3.format + i3.format + a3 + e3.format + r3.format + u3.format; return "P" === h3 || "-P" === h3 ? "P0D" : h3; }, y3.toJSON = function() { return this.toISOString(); }, y3.format = function(t3) { var n3 = t3 || "YYYY-MM-DDTHH:mm:ss", i3 = { Y: this.$d.years, YY: s2.s(this.$d.years, 2, "0"), YYYY: s2.s(this.$d.years, 4, "0"), M: this.$d.months, MM: s2.s(this.$d.months, 2, "0"), D: this.$d.days, DD: s2.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: s2.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: s2.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: s2.s(this.$d.seconds, 2, "0"), SSS: s2.s(this.$d.milliseconds, 3, "0") }; return n3.replace(o2, function(t4, s3) { return s3 || String(i3[t4]); }); }, y3.as = function(t3) { return this.$ms / h2[m2(t3)]; }, y3.get = function(t3) { var s3 = this.$ms, n3 = m2(t3); return "milliseconds" === n3 ? s3 %= 1e3 : s3 = "weeks" === n3 ? $2(s3 / h2[n3]) : this.$d[n3], s3 || 0; }, y3.add = function(t3, s3, n3) { var i3; return i3 = s3 ? t3 * h2[m2(s3)] : c2(t3) ? t3.$ms : f2(t3, this).$ms, f2(this.$ms + i3 * (n3 ? -1 : 1), this); }, y3.subtract = function(t3, s3) { return this.add(t3, s3, true); }, y3.locale = function(t3) { var s3 = this.clone(); return s3.$l = t3, s3; }, y3.clone = function() { return f2(this.$ms, this); }, y3.humanize = function(s3) { return t2().add(this.$ms, "ms").locale(this.$l).fromNow(!s3); }, y3.valueOf = function() { return this.asMilliseconds(); }, y3.milliseconds = function() { return this.get("milliseconds"); }, y3.asMilliseconds = function() { return this.as("milliseconds"); }, y3.seconds = function() { return this.get("seconds"); }, y3.asSeconds = function() { return this.as("seconds"); }, y3.minutes = function() { return this.get("minutes"); }, y3.asMinutes = function() { return this.as("minutes"); }, y3.hours = function() { return this.get("hours"); }, y3.asHours = function() { return this.as("hours"); }, y3.days = function() { return this.get("days"); }, y3.asDays = function() { return this.as("days"); }, y3.weeks = function() { return this.get("weeks"); }, y3.asWeeks = function() { return this.as("weeks"); }, y3.months = function() { return this.get("months"); }, y3.asMonths = function() { return this.as("months"); }, y3.years = function() { return this.get("years"); }, y3.asYears = function() { return this.as("years"); }, l3; }(), p2 = function(t3, s3, n3) { return t3.add(s3.years() * n3, "y").add(s3.months() * n3, "M").add(s3.days() * n3, "d").add(s3.hours() * n3, "h").add(s3.minutes() * n3, "m").add(s3.seconds() * n3, "s").add(s3.milliseconds() * n3, "ms"); }; return function(n3, i3, e3) { t2 = e3, s2 = e3().$utils(), e3.duration = function(t3, s3) { var n4 = e3.locale(); return f2(t3, { $l: n4 }, s3); }, e3.isDuration = c2; var r3 = i3.prototype.add, o3 = i3.prototype.subtract; i3.prototype.add = function(t3, s3) { return c2(t3) ? p2(this, t3, 1) : r3.bind(this)(t3, s3); }, i3.prototype.subtract = function(t3, s3) { return c2(t3) ? p2(this, t3, -1) : o3.bind(this)(t3, s3); }; }; }); })(duration$1); var durationExports = duration$1.exports; const duration = /* @__PURE__ */ getDefaultExportFromCjs(durationExports); var zhCn = { exports: {} }; (function(module, exports) { !function(e2, _2) { module.exports = _2(dayjs_minExports); }(commonjsGlobal, function(e2) { function _2(e3) { return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 }; } var t2 = _2(e2), d2 = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(e3, _3) { return "W" === _3 ? e3 + "周" : e3 + "日"; }, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(e3, _3) { var t3 = 100 * e3 + _3; return t3 < 600 ? "凌晨" : t3 < 900 ? "早上" : t3 < 1100 ? "上午" : t3 < 1300 ? "中午" : t3 < 1800 ? "下午" : "晚上"; } }; return t2.default.locale(d2, null, true), d2; }); })(zhCn); dayjs.locale("zh-cn"); dayjs.extend(relativeTime); dayjs.extend(duration); const sheep = { $api, $store, $url, $router, $platform: _platform, $helper, $zIndex: zIndex }; async function ShoproInit() { await $store("app").init(); _platform.load(); } const sheep$1 = sheep; const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const _sfc_main$3v = { __name: "su-video", props: { moveX: { type: [Number], default: 0 }, // 下标索引 uid: { type: [Number, String], default: 0 }, // 视频高度 height: { type: Number, default: 300 }, // 视频宽度 width: { type: Number, default: 750 }, // 指定视频初始播放位置,单位为秒(s) initialTime: { type: Number, default: 1 }, src: { type: String, default: "" }, poster: { type: String, default: "https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto" }, autoplay: { type: Boolean, default: false } }, emits: ["videoTimeupdate"], setup(__props, { expose: __expose, emit: __emit }) { const vm = vue.getCurrentInstance(); const state = vue.reactive({ enableProgressGesture: true, // 手势滑动 showModal: false // 弹框 }); const props = __props; const emits = __emit; const timeupdate = (e2) => { emits("videoTimeupdate", e2); }; const videoErrorCallback = (e2) => { uni.showToast({ title: JSON.stringify(e2), icon: "none" }); formatAppLog("log", "at sheep/ui/su-video/su-video.vue:114", "视频错误信息:", e2.target.errMsg); }; const play = () => { formatAppLog("log", "at sheep/ui/su-video/su-video.vue:119", "视频开始"); }; const pause = () => { formatAppLog("log", "at sheep/ui/su-video/su-video.vue:123", "视频暂停"); }; const end = () => { formatAppLog("log", "at sheep/ui/su-video/su-video.vue:127", "视频结束"); }; const startPlay = () => { vue.nextTick(() => { const video = uni.createVideoContext(`sVideo${props.index}`, vm); video.play(); }); }; const pausePlay = () => { const video = uni.createVideoContext(`sVideo${props.index}`, vm); video.pause(); }; const beforePlay = () => { uni.getNetworkType({ success: (res) => { res.networkType; startPlay(); } }); }; __expose({ pausePlay }); const __returned__ = { vm, state, props, emits, timeupdate, videoErrorCallback, play, pause, end, startPlay, pausePlay, beforePlay, reactive: vue.reactive, nextTick: vue.nextTick, getCurrentInstance: vue.getCurrentInstance, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3u(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "ui-video-wrap" }, [ vue.createElementVNode("video", { id: `sVideo${$props.uid}`, class: "radius", style: vue.normalizeStyle([{ height: $props.height + "rpx" }]), src: $props.src, controls: "", "object-fit": "contain", "enable-progress-gesture": $setup.state.enableProgressGesture, "initial-time": $props.initialTime, "x5-video-player-type": "h5", "x-webkit-airplay": "allow", "webkit-playsinline": "true", onError: $setup.videoErrorCallback, onTimeupdate: $setup.timeupdate, onPlay: $setup.play, onPause: $setup.pause, onEnded: $setup.end, poster: $props.poster, autoplay: $props.autoplay }, [ vue.createElementVNode( "cover-view", { style: vue.normalizeStyle({ transform: "translateX(" + $props.moveX + "px)" }) }, null, 4 /* STYLE */ ) ], 44, ["id", "src", "enable-progress-gesture", "initial-time", "poster", "autoplay"]) ]); } const __easycom_0$t = /* @__PURE__ */ _export_sfc(_sfc_main$3v, [["render", _sfc_render$3u], ["__scopeId", "data-v-f4b9589e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-video/su-video.vue"]]); const _sfc_main$3u = { __name: "su-swiper", props: { circular: { type: Boolean, default: true }, autoplay: { type: Boolean, default: false }, interval: { type: Number, default: 3e3 }, duration: { type: Number, default: 500 }, mode: { type: String, default: "default" }, imageMode: { type: String, default: "scaleToFill" }, list: { type: Array, default() { return []; } }, dotStyle: { type: String, default: "long" //default long tag }, dotCur: { type: String, default: "ss-bg-opactity-block" }, bg: { type: String, default: "bg-none" }, height: { type: Number, default: 0 }, imgHeight: { type: Number, default: 0 }, imgTopRadius: { type: Number, default: 0 }, imgBottomRadius: { type: Number, default: 0 }, isPreview: { type: Boolean, default: false }, seizeHeight: { type: Number, default: 200 } }, setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ imgHeight: 0, cur: 0, moveX: 0, videoPlaySataus: false, heightList: [] }); const refs = vue.reactive({ videoRef: {} }); const props = __props; const swiperChange = (e2) => { if (e2.detail.source !== "touch" && e2.detail.source !== "autoplay") return; state.cur = e2.detail.current; state.videoPlaySataus = false; if (props.list[state.cur].type === "video") { refs.videoRef[`video_${state.cur}`].pausePlay(); } }; const onSwiperItem = (item) => { if (item.type === "video") { state.videoPlaySataus = true; } else { if (item.urlParams && item.urlParams.title) { sheep$1.$router.go(item.url, { title: item.urlParams.title }); } else { sheep$1.$router.go(item.url); } onPreview(); } }; const onPreview = () => { if (!props.isPreview) return; let previewImage = lodashExports.clone(props.list); previewImage.forEach((item, index2) => { if (item.type === "video") { previewImage.splice(index2, 1); } }); uni.previewImage({ urls: previewImage.length < 1 ? [props.src] : previewImage.reduce((pre, cur) => { pre.push(cur.src); return pre; }, []), current: state.cur // longPressActions: { // itemList: ['发送给朋友', '保存图片', '收藏'], // success: function (data) { // __f__('log','at sheep/ui/su-swiper/su-swiper.vue:222','选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); // }, // fail: function (err) { // __f__('log','at sheep/ui/su-swiper/su-swiper.vue:225',err.errMsg); // }, // }, }); }; const transition = (e2) => { state.moveX = e2.detail.dx; }; const animationfinish = (e2) => { state.moveX = 0; }; const videoTimeupdate = (e2) => { props.list[state.cur].currentTime = e2.detail.currentTime; }; const customStyle = vue.computed(() => { let height; if (props.height !== 0) { height = props.height; } if (props.height === 0) { if (state.imgHeight !== 0) { height = state.imgHeight; } else if (props.seizeHeight !== 0) { height = props.seizeHeight; } } return { height: height + "rpx" }; }); function onImgLoad(e2) { if (props.height === 0) { let newHeight = e2.detail.height / e2.detail.width * 750; if (state.imgHeight < newHeight) { state.imgHeight = newHeight; } } } const __returned__ = { state, refs, props, swiperChange, onSwiperItem, onPreview, transition, animationfinish, videoTimeupdate, customStyle, onImgLoad, reactive: vue.reactive, computed: vue.computed, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3t(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_video = resolveEasycom(vue.resolveDynamicComponent("su-video"), __easycom_0$t); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ui-swiper", [$setup.props.mode, $setup.props.bg, $setup.props.ui]]) }, [ vue.createElementVNode("swiper", { circular: $setup.props.circular, current: $setup.state.cur, autoplay: $setup.props.autoplay && !$setup.state.videoPlaySataus, interval: $setup.props.interval, duration: $setup.props.duration, onTransition: $setup.transition, onAnimationfinish: $setup.animationfinish, style: vue.normalizeStyle($setup.customStyle), onChange: $setup.swiperChange }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.props.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { class: vue.normalizeClass(["swiper-item", { cur: $setup.state.cur == index2 }]), key: index2, onClick: ($event) => $setup.onSwiperItem(item) }, [ vue.createElementVNode("view", { class: "ui-swiper-main" }, [ item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "swiper-image", mode: $setup.props.imageMode, src: item.src, width: "100%", height: "100%", onLoad: $setup.onImgLoad }, null, 40, ["mode", "src"])) : (vue.openBlock(), vue.createBlock(_component_su_video, { key: 1, ref_for: true, ref: (el) => $setup.refs.videoRef[`video_${index2}`] = el, poster: $setup.sheep.$url.cdn(item.poster), src: $setup.sheep.$url.cdn(item.src), index: index2, moveX: $setup.state.moveX, initialTime: item.currentTime || 0, height: $props.seizeHeight, onVideoTimeupdate: $setup.videoTimeupdate }, null, 8, ["poster", "src", "index", "moveX", "initialTime", "height"])) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 44, ["circular", "current", "autoplay", "interval", "duration"]), !$setup.state.videoPlaySataus ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ $setup.props.dotStyle != "tag" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["ui-swiper-dot", $setup.props.dotStyle]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.props.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["line-box", [$setup.state.cur == index2 ? "cur" : "", $setup.props.dotCur]]), key: index2 }, null, 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), $setup.props.dotStyle == "tag" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["ui-swiper-dot", $setup.props.dotStyle]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ui-tag radius-lg", [$setup.props.dotCur]]), style: { "pointer-events": "none", "padding": "0 10rpx" } }, [ vue.createElementVNode( "view", { style: { "transform": "scale(0.7)" } }, vue.toDisplayString($setup.state.cur + 1) + " / " + vue.toDisplayString($setup.props.list.length), 1 /* TEXT */ ) ], 2 /* CLASS */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ) ]); } const __easycom_1$d = /* @__PURE__ */ _export_sfc(_sfc_main$3u, [["render", _sfc_render$3t], ["__scopeId", "data-v-b37b3c30"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-swiper/su-swiper.vue"]]); const _sfc_main$3t = { __name: "s-image-banner", props: { data: { type: Object, default: () => ({}) }, styles: { type: Object, default: () => ({}) }, height: { type: Number } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const imgList = vue.computed( () => props.data.items.map((item) => { const src = item.type === "img" ? item.imgUrl : item.videoUrl; return { ...item, type: item.type === "img" ? "image" : "video", src: sheep$1.$url.cdn(src), poster: sheep$1.$url.cdn(item.imgUrl) }; }) ); const __returned__ = { props, imgList, computed: vue.computed, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3s(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_swiper = resolveEasycom(vue.resolveDynamicComponent("su-swiper"), __easycom_1$d); return vue.openBlock(), vue.createBlock(_component_su_swiper, { list: $setup.imgList, dotStyle: $props.data.indicator === "dot" ? "long" : "tag", imageMode: "scaleToFill", dotCur: "bg-mask-40", seizeHeight: 300, autoplay: $props.data.autoplay, interval: $props.data.interval * 1e3, mode: $props.data.type, height: $props.height }, null, 8, ["list", "dotStyle", "autoplay", "interval", "mode", "height"]); } const __easycom_8$1 = /* @__PURE__ */ _export_sfc(_sfc_main$3t, [["render", _sfc_render$3s], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-image-banner/s-image-banner.vue"]]); const _sfc_main$3s = { name: "su-tabbar-item", props: { customStyle: { type: [Object, String], default: () => ({}) }, customClass: { type: String, default: "" }, // 跳转的页面路径 url: { type: String, default: "" }, // 页面跳转的类型 linkType: { type: String, default: "navigateTo" }, // item标签的名称,作为与u-tabbar的value参数匹配的标识符 name: { type: [String, Number, null], default: "" }, // uView内置图标或者绝对路径的图片 icon: { icon: String, default: "" }, // 右上角的角标提示信息 badge: { type: [String, Number, null], default: "" }, // 是否显示圆点,将会覆盖badge参数 dot: { type: Boolean, default: false }, // 描述文本 text: { type: String, default: "" }, // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性 badgeStyle: { type: [Object, String], default: "" }, isCenter: { type: Boolean, default: false }, centerImage: { type: String, default: "" } }, data() { return { isActive: false, // 是否处于激活状态 addStyle, parentData: { value: null, activeColor: "", color: "" }, parent: {} }; }, setup() { const { t: t2 } = useI18n(); return { t: t2 }; }, created() { this.init(); }, methods: { getParentData(parentName = "") { if (!this.parent) this.parent = {}; this.parent = $parent.call(this, parentName); if (this.parent.children) { this.parent.children.indexOf(this) === -1 && this.parent.children.push(this); } if (this.parent && this.parentData) { Object.keys(this.parentData).map((key) => { this.parentData[key] = this.parent[key]; }); } }, init() { this.updateParentData(); if (!this.parent) { formatAppLog("log", "at sheep/ui/su-tabbar-item/su-tabbar-item.vue:168", "u-tabbar-item必须搭配u-tabbar组件使用"); } const index2 = this.parent.children.indexOf(this); this.isActive = (this.name.split("?")[0] || index2) === this.parentData.value; }, updateParentData() { this.getParentData("su-tabbar"); }, // 此方法将会被父组件u-tabbar调用 updateFromParent() { this.init(); }, clickHandler() { this.$nextTick(() => { const index2 = this.parent.children.indexOf(this); const name2 = this.name || index2; if (name2 !== this.parent.value) { this.parent.$emit("change", name2); } this.$emit("click", name2); }); } } }; function _sfc_render$3r(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-tabbar-item", style: vue.normalizeStyle([$data.addStyle($props.customStyle)]) }, [ $props.isCenter ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tabbar-center-item" }, [ vue.createElementVNode("image", { class: "center-image", src: $props.centerImage, mode: "aspectFill" }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "u-tabbar-item__icon" }, [ $props.icon ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, name: $props.icon, color: $data.isActive ? $data.parentData.activeColor : $data.parentData.color, size: 20 }, null, 8, ["name", "color"])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ $data.isActive ? vue.renderSlot(_ctx.$slots, "active-icon", { key: 0 }, void 0, true) : vue.renderSlot(_ctx.$slots, "inactive-icon", { key: 1 }, void 0, true) ], 64 /* STABLE_FRAGMENT */ )), vue.createCommentVNode(` `) ]), vue.renderSlot(_ctx.$slots, "text", {}, () => [ vue.createElementVNode( "text", { class: "u-tabbar-item__text", style: vue.normalizeStyle({ color: $data.isActive ? $data.parentData.activeColor : $data.parentData.color }) }, vue.toDisplayString($props.text), 5 /* TEXT, STYLE */ ) ], true) ], 64 /* STABLE_FRAGMENT */ )) ], 4 /* STYLE */ ); } const __easycom_0$s = /* @__PURE__ */ _export_sfc(_sfc_main$3s, [["render", _sfc_render$3r], ["__scopeId", "data-v-a62e13d6"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-tabbar-item/su-tabbar-item.vue"]]); const _sfc_main$3r = { name: "su-tabbar", props: { customStyle: { type: [Object, String], default: () => ({}) }, customClass: { type: String, default: "" }, // 跳转的页面路径 url: { type: String, default: "" }, // 页面跳转的类型 linkType: { type: String, default: "navigateTo" }, // 当前匹配项的name value: { type: [String, Number, null], default: "" }, // 是否为iPhoneX留出底部安全距离 safeAreaInsetBottom: { type: Boolean, default: true }, // 是否显示上方边框 border: { type: Boolean, default: true }, // 元素层级z-index zIndex: { type: [String, Number], default: 10 }, // 选中标签的颜色 activeColor: { type: String, default: "#1989fa" }, // 未选中标签的颜色 inactiveColor: { type: String, default: "#7d7e80" }, // 是否固定在底部 fixed: { type: Boolean, default: true }, // fixed定位固定在底部时,是否生成一个等高元素防止塌陷 placeholder: { type: Boolean, default: true }, midTabBar: { type: Boolean, default: false } }, data() { return { placeholderHeight: 0, safeBottomHeight: sheep$1.$platform.device.safeAreaInsets.bottom }; }, computed: { tabbarStyle() { const style = { zIndex: this.zIndex }; return deepMerge(style, addStyle(this.customStyle)); }, // 监听多个参数的变化,通过在computed执行对应的操作 updateChild() { return [this.value, this.activeColor, this.inactiveColor]; }, color() { return this.inactiveColor; }, updatePlaceholder() { return [this.fixed, this.placeholder]; } }, watch: { updateChild() { this.updateChildren(); }, updatePlaceholder() { this.setPlaceholderHeight(); } }, created() { this.children = []; }, mounted() { this.setPlaceholderHeight(); }, methods: { updateChildren() { this.children.length && this.children.map((child) => child.updateFromParent()); }, getRect(selector, all) { return new Promise((resolve) => { uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => { if (all && Array.isArray(rect) && rect.length) { resolve(rect); } if (!all && rect) { resolve(rect); } }).exec(); }); }, // 设置用于防止塌陷元素的高度 async setPlaceholderHeight() { if (!this.fixed || !this.placeholder) return; await sleep(20); this.getRect(".u-tabbar__content").then(({ height = 50 }) => { this.placeholderHeight = height; }); } } }; function _sfc_render$3q(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabbar" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-tabbar__content", [$props.border && "u-border-top", $props.fixed && "u-tabbar--fixed", { "mid-tabbar": $props.midTabBar }]]), ref: "u-tabbar__content", onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: vue.normalizeStyle([$options.tabbarStyle]) }, [ vue.createElementVNode("view", { class: "u-tabbar__content__item-wrapper" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), $props.safeAreaInsetBottom ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, style: vue.normalizeStyle([{ height: $data.safeBottomHeight + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ ), $props.placeholder ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-tabbar__placeholder", style: vue.normalizeStyle({ height: $data.placeholderHeight + "px" }) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const __easycom_1$c = /* @__PURE__ */ _export_sfc(_sfc_main$3r, [["render", _sfc_render$3q], ["__scopeId", "data-v-b5af0eb7"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-tabbar/su-tabbar.vue"]]); const _sfc_main$3q = { __name: "s-tabbar", props: { path: { type: String, default: "" }, tabbar: { type: Object, default: () => { } } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const tabbar = vue.computed(() => { var _a2; if (props.tabbar) return props.tabbar; return (_a2 = sheep$1.$store("app").template.basic) == null ? void 0 : _a2.tabbar; }); const tabbarStyle = vue.computed(() => { const backgroundStyle = tabbar.value.style; if (backgroundStyle.bgType === "color") { return { background: backgroundStyle.bgColor }; } if (backgroundStyle.bgType === "img") return { background: `url(${sheep$1.$url.cdn( backgroundStyle.bgImg )}) no-repeat top center / 100% auto` }; }); const getTabbarCenter = (index2) => { if (vue.unref(tabbar).mode !== 2) return false; return vue.unref(tabbar).items % 2 > 0 ? Math.ceil(vue.unref(tabbar).items.length / 2) === index2 + 1 : false; }; const __returned__ = { props, tabbar, tabbarStyle, getTabbarCenter, computed: vue.computed, unref: vue.unref, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3p(_ctx, _cache, $props, $setup, $data, $options) { var _a2, _b2; const _component_su_tabbar_item = resolveEasycom(vue.resolveDynamicComponent("su-tabbar-item"), __easycom_0$s); const _component_su_tabbar = resolveEasycom(vue.resolveDynamicComponent("su-tabbar"), __easycom_1$c); return ((_b2 = (_a2 = $setup.tabbar) == null ? void 0 : _a2.items) == null ? void 0 : _b2.length) > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-page__item" }, [ vue.createVNode(_component_su_tabbar, { value: $props.path, fixed: true, placeholder: true, safeAreaInsetBottom: true, inactiveColor: $setup.tabbar.style.color, activeColor: $setup.tabbar.style.activeColor, midTabBar: $setup.tabbar.mode === 2, customStyle: $setup.tabbarStyle }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.tabbar.items, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_su_tabbar_item, { key: item.text, text: item.text, name: item.url, isCenter: $setup.getTabbarCenter(index2), centerImage: $setup.sheep.$url.cdn(item.iconUrl), onClick: ($event) => $setup.sheep.$router.go(item.url) }, { "active-icon": vue.withCtx(() => [ vue.createElementVNode("image", { class: "u-page__item__slot-icon", src: $setup.sheep.$url.cdn(item.activeIconUrl) }, null, 8, ["src"]) ]), "inactive-icon": vue.withCtx(() => [ vue.createElementVNode("image", { class: "u-page__item__slot-icon", src: $setup.sheep.$url.cdn(item.iconUrl) }, null, 8, ["src"]) ]), _: 2 /* DYNAMIC */ }, 1032, ["text", "name", "isCenter", "centerImage", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["value", "inactiveColor", "activeColor", "midTabBar", "customStyle"]) ])) : vue.createCommentVNode("v-if", true); } const __easycom_3$7 = /* @__PURE__ */ _export_sfc(_sfc_main$3q, [["render", _sfc_render$3p], ["__scopeId", "data-v-434f93ee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-tabbar/s-tabbar.vue"]]); const block0 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("handler"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "2f992f8c"; }; const _sfc_main$3p = { name: "node", options: {}, data() { return { ctrl: {} }; }, props: { name: String, attrs: { type: Object, default() { return {}; } }, childs: Array, opts: Array }, components: {}, mounted() { this.$nextTick(() => { for (this.root = this.$parent; this.root.$options.name !== "mp-html"; this.root = this.root.$parent) ; }); if (this.opts[0]) { let i2; for (i2 = this.childs.length; i2--; ) { if (this.childs[i2].name === "img") break; } if (i2 !== -1) { this.observer = uni.createIntersectionObserver(this).relativeToViewport({ top: 500, bottom: 500 }); this.observer.observe("._img", (res) => { if (res.intersectionRatio) { this.$set(this.ctrl, "load", 1); this.observer.disconnect(); } }); } } }, beforeDestroy() { if (this.observer) { this.observer.disconnect(); } }, methods: { /** * @description 播放视频事件 * @param {Event} e */ play(e2) { this.root.$emit("play"); }, /** * @description 图片点击事件 * @param {Event} e */ imgTap(e2) { const node2 = this.childs[e2.currentTarget.dataset.i]; if (node2.a) { this.linkTap(node2.a); return; } if (node2.attrs.ignore) return; node2.attrs.src = node2.attrs.src || node2.attrs["data-src"]; this.root.$emit("imgtap", node2.attrs); if (this.root.previewImg) { uni.previewImage({ current: parseInt(node2.attrs.i), urls: this.root.imgList }); } }, /** * @description 图片长按 */ imgLongTap(e2) { const attrs = this.childs[e2.currentTarget.dataset.i].attrs; if (this.opts[3] && !attrs.ignore) { uni.showActionSheet({ itemList: ["保存图片"], success: () => { const save = (path) => { uni.saveImageToPhotosAlbum({ filePath: path, success() { uni.showToast({ title: "保存成功" }); } }); }; if (this.root.imgList[attrs.i].startsWith("http")) { uni.downloadFile({ url: this.root.imgList[attrs.i], success: (res) => save(res.tempFilePath) }); } else { save(this.root.imgList[attrs.i]); } } }); } }, /** * @description 图片加载完成事件 * @param {Event} e */ imgLoad(e2) { const i2 = e2.currentTarget.dataset.i; if (!this.childs[i2].w) { this.$set(this.ctrl, i2, e2.detail.width); } else if (this.opts[1] && !this.ctrl[i2] || this.ctrl[i2] === -1) { this.$set(this.ctrl, i2, 1); } this.checkReady(); }, /** * @description 检查是否所有图片加载完毕 */ checkReady() { if (!this.root.lazyLoad) { this.root._unloadimgs -= 1; if (!this.root._unloadimgs) { setTimeout(() => { this.root.getRect().then((rect) => { this.root.$emit("ready", rect); }).catch(() => { this.root.$emit("ready", {}); }); }, 350); } } }, /** * @description 链接点击事件 * @param {Event} e */ linkTap(e2) { const node2 = e2.currentTarget ? this.childs[e2.currentTarget.dataset.i] : {}; const attrs = node2.attrs || e2; const href = attrs.href; this.root.$emit("linktap", Object.assign({ innerText: this.root.getText(node2.children || []) // 链接内的文本内容 }, attrs)); if (href) { if (href[0] === "#") { this.root.navigateTo(href.substring(1)).catch(() => { }); } else if (href.split("?")[0].includes("://")) { if (this.root.copyLink) { plus.runtime.openWeb(href); } } else { uni.navigateTo({ url: href, fail() { uni.switchTab({ url: href, fail() { } }); } }); } } }, /** * @description 错误事件 * @param {Event} e */ mediaError(e2) { const i2 = e2.currentTarget.dataset.i; const node2 = this.childs[i2]; if (node2.name === "video" || node2.name === "audio") { let index2 = (this.ctrl[i2] || 0) + 1; if (index2 > node2.src.length) { index2 = 0; } if (index2 < node2.src.length) { this.$set(this.ctrl, i2, index2); return; } } else if (node2.name === "img") { if (this.opts[2]) { this.$set(this.ctrl, i2, -1); } this.checkReady(); } if (this.root) { this.root.$emit("error", { source: node2.name, attrs: node2.attrs, errMsg: e2.detail.errMsg }); } } } }; function _sfc_render$3o(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node", true); return vue.openBlock(), vue.createElementBlock("view", { id: $props.attrs.id, class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class), style: vue.normalizeStyle($props.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.childs, (n2, i2) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: i2 }, [ vue.createCommentVNode(" 图片 "), vue.createCommentVNode(" 占位图 "), n2.name === "img" && !n2.t && ($props.opts[1] && !$data.ctrl[i2] || $data.ctrl[i2] < 0) ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "_img", style: vue.normalizeStyle(n2.attrs.style), src: $data.ctrl[i2] < 0 ? $props.opts[2] : $props.opts[1], mode: "widthFix" }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 显示图片 "), vue.createCommentVNode(" 表格中的图片,使用 rich-text 防止大小不正确 "), n2.name === "img" && n2.t ? (vue.openBlock(), vue.createElementBlock("rich-text", { key: 1, style: vue.normalizeStyle("display:" + n2.t), nodes: "", "data-i": i2, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])) }, null, 12, ["nodes", "data-i"])) : n2.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", { key: 2, id: n2.attrs.id, class: vue.normalizeClass("_img " + n2.attrs.class), style: vue.normalizeStyle(($data.ctrl[i2] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i2] || 1) + "px;" + n2.attrs.style), src: n2.attrs.src || ($data.ctrl.load ? n2.attrs["data-src"] : ""), mode: !n2.h ? "widthFix" : !n2.w ? "heightFix" : "", "data-i": i2, onLoad: _cache[1] || (_cache[1] = (...args) => $options.imgLoad && $options.imgLoad(...args)), onError: _cache[2] || (_cache[2] = (...args) => $options.mediaError && $options.mediaError(...args)), onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])), onLongpress: _cache[4] || (_cache[4] = (...args) => $options.imgLongTap && $options.imgLongTap(...args)) }, null, 46, ["id", "src", "mode", "data-i"])) : n2.text ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 3 }, [ vue.createCommentVNode(" 文本 "), vue.createElementVNode( "text", { decode: "" }, vue.toDisplayString(n2.text), 1 /* TEXT */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 4 }, "\\n")) : n2.name === "a" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 5 }, [ vue.createCommentVNode(" 链接 "), vue.createElementVNode("view", { id: n2.attrs.id, class: vue.normalizeClass((n2.attrs.href ? "_a " : "") + n2.attrs.class), "hover-class": "_hover", style: vue.normalizeStyle("display:inline;" + n2.attrs.style), "data-i": i2, onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"])) }, [ vue.createVNode(_component_node, { name: "span", childs: n2.children, opts: $props.opts, style: { "display": "inherit" } }, null, 8, ["childs", "opts"]) ], 14, ["id", "data-i"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.html ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 6 }, [ vue.createCommentVNode(" 视频 "), vue.createElementVNode("view", { id: n2.attrs.id, class: vue.normalizeClass("_video " + n2.attrs.class), style: vue.normalizeStyle(n2.attrs.style), innerHTML: n2.html, onVplay: _cache[6] || (_cache[6] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"])) }, null, 46, ["id", "innerHTML"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", { key: 7, style: vue.normalizeStyle(n2.attrs.style), allowfullscreen: n2.attrs.allowfullscreen, frameborder: n2.attrs.frameborder, src: n2.attrs.src }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n2.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", { key: 8, style: vue.normalizeStyle(n2.attrs.style), src: n2.attrs.src }, null, 12, ["src"])) : n2.name === "table" && n2.c || n2.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", { key: 9, id: n2.attrs.id, class: vue.normalizeClass("_" + n2.name + " " + n2.attrs.class), style: vue.normalizeStyle(n2.attrs.style) }, [ n2.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: n2.children, opts: $props.opts }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(n2.children, (tbody, x) => { return vue.openBlock(), vue.createElementBlock( "view", { key: x, class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class), style: vue.normalizeStyle(tbody.attrs.style) }, [ tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: tbody.children, opts: $props.opts }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(tbody.children, (tr, y2) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: y2 }, [ tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ vue.createVNode(_component_node, { childs: tr.children, opts: $props.opts }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(tr.children, (td, z2) => { return vue.openBlock(), vue.createElementBlock( "view", { key: z2, class: vue.normalizeClass("_" + td.name + " " + td.attrs.class), style: vue.normalizeStyle(td.attrs.style) }, [ vue.createVNode(_component_node, { childs: td.children, opts: $props.opts }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ )) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"])) : !n2.c ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 10 }, [ vue.createCommentVNode(" 富文本 "), vue.createElementVNode("rich-text", { id: n2.attrs.id, style: vue.normalizeStyle(n2.f + ";display:inline"), preview: false, selectable: $props.opts[4], "user-select": $props.opts[4], nodes: [n2] }, null, 12, ["id", "selectable", "user-select", "nodes"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.c === 2 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 11 }, [ vue.createCommentVNode(" 继续递归 "), vue.createElementVNode("view", { id: n2.attrs.id, class: vue.normalizeClass("_block _" + n2.name + " " + n2.attrs.class), style: vue.normalizeStyle(n2.f + ";" + n2.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(n2.children, (n22, j2) => { return vue.openBlock(), vue.createBlock(_component_node, { key: j2, style: vue.normalizeStyle(n22.f), name: n22.name, attrs: n22.attrs, childs: n22.children, opts: $props.opts }, null, 8, ["style", "name", "attrs", "childs", "opts"]); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : (vue.openBlock(), vue.createBlock(_component_node, { key: 12, style: vue.normalizeStyle(n2.f), name: n2.name, attrs: n2.attrs, childs: n2.children, opts: $props.opts }, null, 8, ["style", "name", "attrs", "childs", "opts"])) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]); } if (typeof block0 === "function") block0(_sfc_main$3p); const node = /* @__PURE__ */ _export_sfc(_sfc_main$3p, [["render", _sfc_render$3o], ["__scopeId", "data-v-8845ff2f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/mp-html/components/mp-html/node/node.vue"]]); const config = { // 信任的标签(保持标签名不变) trustTags: makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"), // 块级标签(转为 div,其他的非信任标签转为 span) blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"), // 行内标签 inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"), // 要移除的标签 ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"), // 自闭合的标签 voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"), // html 实体 entities: { lt: "<", gt: ">", quot: '"', apos: "'", ensp: " ", emsp: " ", nbsp: " ", semi: ";", ndash: "–", mdash: "—", middot: "·", lsquo: "‘", rsquo: "’", ldquo: "“", rdquo: "”", bull: "•", hellip: "…", larr: "←", uarr: "↑", rarr: "→", darr: "↓" }, // 默认的标签样式 tagStyle: { address: "font-style:italic", big: "display:inline;font-size:1.2em", caption: "display:table-caption;text-align:center", center: "text-align:center", cite: "font-style:italic", dd: "margin-left:40px", mark: "background-color:yellow", pre: "font-family:monospace;white-space:pre", s: "text-decoration:line-through", small: "display:inline;font-size:0.8em", strike: "text-decoration:line-through", u: "text-decoration:underline" }, // svg 大小写对照表 svgDict: { animatetransform: "animateTransform", lineargradient: "linearGradient", viewbox: "viewBox", attributename: "attributeName", repeatcount: "repeatCount", repeatdur: "repeatDur" } }; const tagSelector = {}; const { windowWidth } = uni.getSystemInfoSync(); const blankChar = makeMap(" ,\r,\n, ,\f"); let idIndex = 0; config.ignoreTags.iframe = void 0; config.trustTags.iframe = true; config.ignoreTags.embed = void 0; config.trustTags.embed = true; function makeMap(str) { const map = /* @__PURE__ */ Object.create(null); const list = str.split(","); for (let i2 = list.length; i2--; ) { map[list[i2]] = true; } return map; } function decodeEntity(str, amp) { let i2 = str.indexOf("&"); while (i2 !== -1) { const j2 = str.indexOf(";", i2 + 3); let code2; if (j2 === -1) break; if (str[i2 + 1] === "#") { code2 = parseInt((str[i2 + 2] === "x" ? "0" : "") + str.substring(i2 + 2, j2)); if (!isNaN(code2)) { str = str.substr(0, i2) + String.fromCharCode(code2) + str.substr(j2 + 1); } } else { code2 = str.substring(i2 + 1, j2); if (config.entities[code2] || code2 === "amp" && amp) { str = str.substr(0, i2) + (config.entities[code2] || "&") + str.substr(j2 + 1); } } i2 = str.indexOf("&", i2 + 1); } return str; } function mergeNodes(nodes) { let i2 = nodes.length - 1; for (let j2 = i2; j2 >= -1; j2--) { if (j2 === -1 || nodes[j2].c || !nodes[j2].name || nodes[j2].name !== "div" && nodes[j2].name !== "p" && nodes[j2].name[0] !== "h" || (nodes[j2].attrs.style || "").includes("inline")) { if (i2 - j2 >= 5) { nodes.splice(j2 + 1, i2 - j2, { name: "div", attrs: {}, children: nodes.slice(j2 + 1, i2 + 1) }); } i2 = j2 - 1; } } } function Parser(vm) { this.options = vm || {}; this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle); this.imgList = vm.imgList || []; this.imgList._unloadimgs = 0; this.plugins = vm.plugins || []; this.attrs = /* @__PURE__ */ Object.create(null); this.stack = []; this.nodes = []; this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0; } Parser.prototype.parse = function(content) { for (let i2 = this.plugins.length; i2--; ) { if (this.plugins[i2].onUpdate) { content = this.plugins[i2].onUpdate(content, config) || content; } } new Lexer(this).parse(content); while (this.stack.length) { this.popNode(); } if (this.nodes.length > 50) { mergeNodes(this.nodes); } return this.nodes; }; Parser.prototype.expose = function() { for (let i2 = this.stack.length; i2--; ) { const item = this.stack[i2]; if (item.c || item.name === "a" || item.name === "video" || item.name === "audio") return; item.c = 1; } }; Parser.prototype.hook = function(node2) { for (let i2 = this.plugins.length; i2--; ) { if (this.plugins[i2].onParse && this.plugins[i2].onParse(node2, this) === false) { return false; } } return true; }; Parser.prototype.getUrl = function(url2) { const domain = this.options.domain; if (url2[0] === "/") { if (url2[1] === "/") { url2 = (domain ? domain.split("://")[0] : "http") + ":" + url2; } else if (domain) { url2 = domain + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } else if (!url2.includes("data:") && !url2.includes("://")) { if (domain) { url2 = domain + "/" + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } return url2; }; Parser.prototype.parseStyle = function(node2) { const attrs = node2.attrs; const list = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";")); const styleObj = {}; let tmp = ""; if (attrs.id && !this.xml) { if (this.options.useAnchor) { this.expose(); } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") { attrs.id = void 0; } } if (attrs.width) { styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px"); attrs.width = void 0; } if (attrs.height) { styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px"); attrs.height = void 0; } for (let i2 = 0, len = list.length; i2 < len; i2++) { const info = list[i2].split(":"); if (info.length < 2) continue; const key = info.shift().trim().toLowerCase(); let value = info.join(":").trim(); if (value[0] === "-" && value.lastIndexOf("-") > 0 || value.includes("safe")) { tmp += `;${key}:${value}`; } else if (!styleObj[key] || value.includes("import") || !styleObj[key].includes("import")) { if (value.includes("url")) { let j2 = value.indexOf("(") + 1; if (j2) { while (value[j2] === '"' || value[j2] === "'" || blankChar[value[j2]]) { j2++; } value = value.substr(0, j2) + this.getUrl(value.substr(j2)); } } else if (value.includes("rpx")) { value = value.replace(/[0-9.]+\s*rpx/g, ($2) => parseFloat($2) * windowWidth / 750 + "px"); } styleObj[key] = value; } } node2.attrs.style = tmp; return styleObj; }; Parser.prototype.onTagName = function(name2) { this.tagName = this.xml ? name2 : name2.toLowerCase(); if (this.tagName === "svg") { this.xml = (this.xml || 0) + 1; } }; Parser.prototype.onAttrName = function(name2) { name2 = this.xml ? name2 : name2.toLowerCase(); if (name2.substr(0, 5) === "data-") { if (name2 === "data-src" && !this.attrs.src) { this.attrName = "src"; } else if (this.tagName === "img" || this.tagName === "a") { this.attrName = name2; } else { this.attrName = void 0; } } else { this.attrName = name2; this.attrs[name2] = "T"; } }; Parser.prototype.onAttrVal = function(val) { const name2 = this.attrName || ""; if (name2 === "style" || name2 === "href") { this.attrs[name2] = decodeEntity(val, true); } else if (name2.includes("src")) { this.attrs[name2] = this.getUrl(decodeEntity(val, true)); } else if (name2) { this.attrs[name2] = val; } }; Parser.prototype.onOpenTag = function(selfClose) { const node2 = /* @__PURE__ */ Object.create(null); node2.name = this.tagName; node2.attrs = this.attrs; if (this.options.nodes.length) { node2.type = "node"; } this.attrs = /* @__PURE__ */ Object.create(null); const attrs = node2.attrs; const parent2 = this.stack[this.stack.length - 1]; const siblings = parent2 ? parent2.children : this.nodes; const close = this.xml ? selfClose : config.voidTags[node2.name]; if (tagSelector[node2.name]) { attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : ""); } if (node2.name === "embed") { this.expose(); } if (node2.name === "video" || node2.name === "audio") { if (node2.name === "video" && !attrs.id) { attrs.id = "v" + idIndex++; } if (!attrs.controls && !attrs.autoplay) { attrs.controls = "T"; } node2.src = []; if (attrs.src) { node2.src.push(attrs.src); attrs.src = void 0; } this.expose(); } if (close) { if (!this.hook(node2) || config.ignoreTags[node2.name]) { if (node2.name === "base" && !this.options.domain) { this.options.domain = attrs.href; } else if (node2.name === "source" && parent2 && (parent2.name === "video" || parent2.name === "audio") && attrs.src) { parent2.src.push(attrs.src); } return; } const styleObj = this.parseStyle(node2); if (node2.name === "img") { if (attrs.src) { if (attrs.src.includes("webp")) { node2.webp = "T"; } if (attrs.src.includes("data:") && !attrs["original-src"]) { attrs.ignore = "T"; } if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) { for (let i2 = this.stack.length; i2--; ) { const item = this.stack[i2]; if (item.name === "a") { node2.a = item.attrs; } if (item.name === "table" && !node2.webp && !attrs.src.includes("cloud://")) { if (!styleObj.display || styleObj.display.includes("inline")) { node2.t = "inline-block"; } else { node2.t = styleObj.display; } styleObj.display = void 0; } item.c = 1; } attrs.i = this.imgList.length.toString(); let src = attrs["original-src"] || attrs.src; this.imgList.push(src); if (!node2.t) { this.imgList._unloadimgs += 1; } if (this.options.lazyLoad) { attrs["data-src"] = attrs.src; attrs.src = void 0; } } } if (styleObj.display === "inline") { styleObj.display = ""; } if (attrs.ignore) { styleObj["max-width"] = styleObj["max-width"] || "100%"; attrs.style += ";-webkit-touch-callout:none"; } if (parseInt(styleObj.width) > windowWidth) { styleObj.height = void 0; } if (!isNaN(parseInt(styleObj.width))) { node2.w = "T"; } if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent2 && (parent2.attrs.style || "").includes("height"))) { node2.h = "T"; } } else if (node2.name === "svg") { siblings.push(node2); this.stack.push(node2); this.popNode(); return; } for (const key in styleObj) { if (styleObj[key]) { attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`; } } attrs.style = attrs.style.substr(1) || void 0; } else { if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) { this.pre = node2.pre = 1; } node2.children = []; this.stack.push(node2); } siblings.push(node2); }; Parser.prototype.onCloseTag = function(name2) { name2 = this.xml ? name2 : name2.toLowerCase(); let i2; for (i2 = this.stack.length; i2--; ) { if (this.stack[i2].name === name2) break; } if (i2 !== -1) { while (this.stack.length > i2) { this.popNode(); } } else if (name2 === "p" || name2 === "br") { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push({ name: name2, attrs: { class: tagSelector[name2] || "", style: this.tagStyle[name2] || "" } }); } }; Parser.prototype.popNode = function() { const node2 = this.stack.pop(); let attrs = node2.attrs; const children = node2.children; const parent2 = this.stack[this.stack.length - 1]; const siblings = parent2 ? parent2.children : this.nodes; if (!this.hook(node2) || config.ignoreTags[node2.name]) { if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) { uni.setNavigationBarTitle({ title: children[0].text }); } siblings.pop(); return; } if (node2.pre && this.pre !== 2) { this.pre = node2.pre = void 0; for (let i2 = this.stack.length; i2--; ) { if (this.stack[i2].pre) { this.pre = 1; } } } const styleObj = {}; if (node2.name === "svg") { if (this.xml > 1) { this.xml--; return; } let src = ""; const style = attrs.style; attrs.style = ""; attrs.xmlns = "http://www.w3.org/2000/svg"; (function traversal(node3) { if (node3.type === "text") { src += node3.text; return; } const name2 = config.svgDict[node3.name] || node3.name; src += "<" + name2; for (const item in node3.attrs) { const val = node3.attrs[item]; if (val) { src += ` ${config.svgDict[item] || item}="${val}"`; } } if (!node3.children) { src += "/>"; } else { src += ">"; for (let i2 = 0; i2 < node3.children.length; i2++) { traversal(node3.children[i2]); } src += ""; } })(node2); node2.name = "img"; node2.attrs = { src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"), style, ignore: "T" }; node2.children = void 0; this.xml = false; return; } if (attrs.align) { if (node2.name === "table") { if (attrs.align === "center") { styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto"; } else { styleObj.float = attrs.align; } } else { styleObj["text-align"] = attrs.align; } attrs.align = void 0; } if (attrs.dir) { styleObj.direction = attrs.dir; attrs.dir = void 0; } if (node2.name === "font") { if (attrs.color) { styleObj.color = attrs.color; attrs.color = void 0; } if (attrs.face) { styleObj["font-family"] = attrs.face; attrs.face = void 0; } if (attrs.size) { let size = parseInt(attrs.size); if (!isNaN(size)) { if (size < 1) { size = 1; } else if (size > 7) { size = 7; } styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1]; } attrs.size = void 0; } } if ((attrs.class || "").includes("align-center")) { styleObj["text-align"] = "center"; } Object.assign(styleObj, this.parseStyle(node2)); if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) { styleObj["max-width"] = "100%"; styleObj["box-sizing"] = "border-box"; } if (config.blockTags[node2.name]) { node2.name = "div"; } else if (!config.trustTags[node2.name] && !this.xml) { node2.name = "span"; } if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") { this.expose(); } else if (node2.name === "video") { if ((styleObj.height || "").includes("auto")) { styleObj.height = void 0; } let str = '"; node2.html = str; } else if ((node2.name === "ul" || node2.name === "ol") && node2.c) { const types2 = { a: "lower-alpha", A: "upper-alpha", i: "lower-roman", I: "upper-roman" }; if (types2[attrs.type]) { attrs.style += ";list-style-type:" + types2[attrs.type]; attrs.type = void 0; } for (let i2 = children.length; i2--; ) { if (children[i2].name === "li") { children[i2].c = 1; } } } else if (node2.name === "table") { let padding = parseFloat(attrs.cellpadding); let spacing = parseFloat(attrs.cellspacing); const border = parseFloat(attrs.border); const bordercolor = styleObj["border-color"]; const borderstyle = styleObj["border-style"]; if (node2.c) { if (isNaN(padding)) { padding = 2; } if (isNaN(spacing)) { spacing = 2; } } if (border) { attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`; } if (node2.flag && node2.c) { styleObj.display = "grid"; if (spacing) { styleObj["grid-gap"] = spacing + "px"; styleObj.padding = spacing + "px"; } else if (border) { attrs.style += ";border-left:0;border-top:0"; } const width = []; const trList = []; const cells = []; const map = {}; (function traversal(nodes) { for (let i2 = 0; i2 < nodes.length; i2++) { if (nodes[i2].name === "tr") { trList.push(nodes[i2]); } else { traversal(nodes[i2].children || []); } } })(children); for (let row = 1; row <= trList.length; row++) { let col = 1; for (let j2 = 0; j2 < trList[row - 1].children.length; j2++) { const td = trList[row - 1].children[j2]; if (td.name === "td" || td.name === "th") { while (map[row + "." + col]) { col++; } let style = td.attrs.style || ""; let start = style.indexOf("width") ? style.indexOf(";width") : 0; if (start !== -1) { let end = style.indexOf(";", start + 6); if (end === -1) { end = style.length; } if (!td.attrs.colspan) { width[col] = style.substring(start ? start + 7 : 6, end); } style = style.substr(0, start) + style.substr(end); } style += ";display:flex"; start = style.indexOf("vertical-align"); if (start !== -1) { const val = style.substr(start + 15, 10); if (val.includes("middle")) { style += ";align-items:center"; } else if (val.includes("bottom")) { style += ";align-items:flex-end"; } } else { style += ";align-items:center"; } start = style.indexOf("text-align"); if (start !== -1) { const val = style.substr(start + 11, 10); if (val.includes("center")) { style += ";justify-content: center"; } else if (val.includes("right")) { style += ";justify-content: right"; } } style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style; if (td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`; if (!td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + 1}`; } col += parseInt(td.attrs.colspan) - 1; } if (td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`; if (!td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + 1}`; } for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) { for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) { map[row + rowspan + "." + (col - colspan)] = 1; } } } if (style) { td.attrs.style = style; } cells.push(td); col++; } } if (row === 1) { let temp = ""; for (let i2 = 1; i2 < col; i2++) { temp += (width[i2] ? width[i2] : "auto") + " "; } styleObj["grid-template-columns"] = temp; } } node2.children = cells; } else { if (node2.c) { styleObj.display = "table"; } if (!isNaN(spacing)) { styleObj["border-spacing"] = spacing + "px"; } if (border || padding) { (function traversal(nodes) { for (let i2 = 0; i2 < nodes.length; i2++) { const td = nodes[i2]; if (td.name === "th" || td.name === "td") { if (border) { td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`; } if (padding) { td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`; } } else if (td.children) { traversal(td.children); } } })(children); } } if (this.options.scrollTable && !(attrs.style || "").includes("inline")) { const table = Object.assign({}, node2); node2.name = "div"; node2.attrs = { style: "overflow:auto" }; node2.children = [table]; attrs = table.attrs; } } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) { for (let i2 = this.stack.length; i2--; ) { if (this.stack[i2].name === "table") { this.stack[i2].flag = 1; break; } } } else if (node2.name === "ruby") { node2.name = "span"; for (let i2 = 0; i2 < children.length - 1; i2++) { if (children[i2].type === "text" && children[i2 + 1].name === "rt") { children[i2] = { name: "div", attrs: { style: "display:inline-block;text-align:center" }, children: [{ name: "div", attrs: { style: "font-size:50%;" + (children[i2 + 1].attrs.style || "") }, children: children[i2 + 1].children }, children[i2]] }; children.splice(i2 + 1, 1); } } } else if (node2.c) { (function traversal(node3) { node3.c = 2; for (let i2 = node3.children.length; i2--; ) { const child = node3.children[i2]; if (child.name && (config.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) { traversal(child); } if (!child.c || child.name === "table") { node3.c = 1; } } })(node2); } if ((styleObj.display || "").includes("flex") && !node2.c) { for (let i2 = children.length; i2--; ) { const item = children[i2]; if (item.f) { item.attrs.style = (item.attrs.style || "") + item.f; item.f = void 0; } } } const flex = parent2 && ((parent2.attrs.style || "").includes("flex") || (parent2.attrs.style || "").includes("grid")) && !node2.c; if (flex) { node2.f = ";max-width:100%"; } if (children.length >= 50 && node2.c && !(styleObj.display || "").includes("flex")) { mergeNodes(children); } for (const key in styleObj) { if (styleObj[key]) { const val = `;${key}:${styleObj[key].replace(" !important", "")}`; if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) { node2.f += val; if (key === "width") { attrs.style += ";width:100%"; } } else { attrs.style += val; } } } attrs.style = attrs.style.substr(1) || void 0; }; Parser.prototype.onText = function(text) { if (!this.pre) { let trim2 = ""; let flag2; for (let i2 = 0, len = text.length; i2 < len; i2++) { if (!blankChar[text[i2]]) { trim2 += text[i2]; } else { if (trim2[trim2.length - 1] !== " ") { trim2 += " "; } if (text[i2] === "\n" && !flag2) { flag2 = true; } } } if (trim2 === " ") { if (flag2) return; else { const parent2 = this.stack[this.stack.length - 1]; if (parent2 && parent2.name[0] === "t") return; } } text = trim2; } const node2 = /* @__PURE__ */ Object.create(null); node2.type = "text"; node2.text = decodeEntity(text); if (this.hook(node2)) { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push(node2); } }; function Lexer(handler) { this.handler = handler; } Lexer.prototype.parse = function(content) { this.content = content || ""; this.i = 0; this.start = 0; this.state = this.text; for (let len = this.content.length; this.i !== -1 && this.i < len; ) { this.state(); } }; Lexer.prototype.checkClose = function(method) { const selfClose = this.content[this.i] === "/"; if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") { if (method) { this.handler[method](this.content.substring(this.start, this.i)); } this.i += selfClose ? 2 : 1; this.start = this.i; this.handler.onOpenTag(selfClose); if (this.handler.tagName === "script") { this.i = this.content.indexOf("= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } this.start = ++this.i; this.state = this.tagName; } else if (c2 === "/" || c2 === "!" || c2 === "?") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } const next = this.content[this.i + 2]; if (c2 === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) { this.i += 2; this.start = this.i; this.state = this.endTag; return; } let end = "-->"; if (c2 !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") { end = ">"; } this.i = this.content.indexOf(end, this.i); if (this.i !== -1) { this.i += end.length; this.start = this.i; } } else { this.i++; } }; Lexer.prototype.tagName = function() { if (blankChar[this.content[this.i]]) { this.handler.onTagName(this.content.substring(this.start, this.i)); while (blankChar[this.content[++this.i]]) ; if (this.i < this.content.length && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } } else if (!this.checkClose("onTagName")) { this.i++; } }; Lexer.prototype.attrName = function() { let c2 = this.content[this.i]; if (blankChar[c2] || c2 === "=") { this.handler.onAttrName(this.content.substring(this.start, this.i)); let needVal = c2 === "="; const len = this.content.length; while (++this.i < len) { c2 = this.content[this.i]; if (!blankChar[c2]) { if (this.checkClose()) return; if (needVal) { this.start = this.i; this.state = this.attrVal; return; } if (this.content[this.i] === "=") { needVal = true; } else { this.start = this.i; this.state = this.attrName; return; } } } } else if (!this.checkClose("onAttrName")) { this.i++; } }; Lexer.prototype.attrVal = function() { const c2 = this.content[this.i]; const len = this.content.length; if (c2 === '"' || c2 === "'") { this.start = ++this.i; this.i = this.content.indexOf(c2, this.i); if (this.i === -1) return; this.handler.onAttrVal(this.content.substring(this.start, this.i)); } else { for (; this.i < len; this.i++) { if (blankChar[this.content[this.i]]) { this.handler.onAttrVal(this.content.substring(this.start, this.i)); break; } else if (this.checkClose("onAttrVal")) return; } } while (blankChar[this.content[++this.i]]) ; if (this.i < len && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } }; Lexer.prototype.endTag = function() { const c2 = this.content[this.i]; if (blankChar[c2] || c2 === ">" || c2 === "/") { this.handler.onCloseTag(this.content.substring(this.start, this.i)); if (c2 !== ">") { this.i = this.content.indexOf(">", this.i); if (this.i === -1) return; } this.start = ++this.i; this.state = this.text; } else { this.i++; } }; const plugins = []; const _sfc_main$3o = { name: "mp-html", data() { return { nodes: [] }; }, props: { containerStyle: { type: String, default: "" }, content: { type: String, default: "" }, copyLink: { type: [Boolean, String], default: true }, domain: String, errorImg: { type: String, default: "" }, lazyLoad: { type: [Boolean, String], default: false }, loadingImg: { type: String, default: "" }, pauseVideo: { type: [Boolean, String], default: true }, previewImg: { type: [Boolean, String], default: true }, scrollTable: [Boolean, String], selectable: [Boolean, String], setTitle: { type: [Boolean, String], default: true }, showImgMenu: { type: [Boolean, String], default: true }, tagStyle: Object, useAnchor: [Boolean, Number] }, emits: ["load", "ready", "imgtap", "linktap", "play", "error"], components: { node }, watch: { content(content) { this.setContent(content); } }, created() { this.plugins = []; for (let i2 = plugins.length; i2--; ) { this.plugins.push(new plugins[i2](this)); } }, mounted() { if (this.content && !this.nodes.length) { this.setContent(this.content); } }, beforeDestroy() { this._hook("onDetached"); }, methods: { /** * @description 将锚点跳转的范围限定在一个 scroll-view 内 * @param {Object} page scroll-view 所在页面的示例 * @param {String} selector scroll-view 的选择器 * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名 */ in(page2, selector, scrollTop) { if (page2 && selector && scrollTop) { this._in = { page: page2, selector, scrollTop }; } }, /** * @description 锚点跳转 * @param {String} id 要跳转的锚点 id * @param {Number} offset 跳转位置的偏移量 * @returns {Promise} */ navigateTo(id, offset) { return new Promise((resolve, reject) => { if (!this.useAnchor) { reject(Error("Anchor is disabled")); return; } offset = offset || parseInt(this.useAnchor) || 0; let deep = " "; const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect(); if (this._in) { selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect(); } else { selector.selectViewport().scrollOffset(); } selector.exec((res) => { if (!res[0]) { reject(Error("Label not found")); return; } const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset; if (this._in) { this._in.page[this._in.scrollTop] = scrollTop; } else { uni.pageScrollTo({ scrollTop, duration: 300 }); } resolve(); }); }); }, /** * @description 获取文本内容 * @return {String} */ getText(nodes) { let text = ""; (function traversal(nodes2) { for (let i2 = 0; i2 < nodes2.length; i2++) { const node2 = nodes2[i2]; if (node2.type === "text") { text += node2.text.replace(/&/g, "&"); } else if (node2.name === "br") { text += "\n"; } else { const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7"; if (isBlock && text && text[text.length - 1] !== "\n") { text += "\n"; } if (node2.children) { traversal(node2.children); } if (isBlock && text[text.length - 1] !== "\n") { text += "\n"; } else if (node2.name === "td" || node2.name === "th") { text += " "; } } } })(nodes || this.nodes); return text; }, /** * @description 获取内容大小和位置 * @return {Promise} */ getRect() { return new Promise((resolve, reject) => { uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject(Error("Root label not found"))); }); }, /** * @description 暂停播放媒体 */ pauseMedia() { for (let i2 = (this._videos || []).length; i2--; ) { this._videos[i2].pause(); } const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()'; let page2 = this.$parent; while (!page2.$scope) page2 = page2.$parent; page2.$scope.$getAppWebview().evalJS(command); }, /** * @description 设置媒体播放速率 * @param {Number} rate 播放速率 */ setPlaybackRate(rate) { this.playbackRate = rate; for (let i2 = (this._videos || []).length; i2--; ) { this._videos[i2].playbackRate(rate); } const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate; let page2 = this.$parent; while (!page2.$scope) page2 = page2.$parent; page2.$scope.$getAppWebview().evalJS(command); }, /** * @description 设置内容 * @param {String} content html 内容 * @param {Boolean} append 是否在尾部追加 */ setContent(content, append) { if (!append || !this.imgList) { this.imgList = []; } const nodes = new Parser(this).parse(content); this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes); this._videos = []; this.$nextTick(() => { this._hook("onLoad"); this.$emit("load"); }); if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) { let height = 0; const callback = (rect) => { if (!rect || !rect.height) rect = {}; if (rect.height === height) { this.$emit("ready", rect); } else { height = rect.height; setTimeout(() => { this.getRect().then(callback).catch(callback); }, 350); } }; this.getRect().then(callback).catch(callback); } else { if (!this.imgList._unloadimgs) { this.getRect().then((rect) => { this.$emit("ready", rect); }).catch(() => { this.$emit("ready", {}); }); } } }, /** * @description 调用插件钩子函数 */ _hook(name2) { for (let i2 = plugins.length; i2--; ) { if (this.plugins[i2][name2]) { this.plugins[i2][name2](); } } } } }; function _sfc_render$3n(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node"); return vue.openBlock(), vue.createElementBlock( "view", { id: "_root", class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"), style: vue.normalizeStyle($props.containerStyle) }, [ !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, { key: 1, childs: $data.nodes, opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable], name: "span" }, null, 8, ["childs", "opts"])) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$r = /* @__PURE__ */ _export_sfc(_sfc_main$3o, [["render", _sfc_render$3n], ["__scopeId", "data-v-a290f043"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/mp-html/components/mp-html/mp-html.vue"]]); const _sfc_main$3n = { __name: "su-status-bar", setup(__props, { expose: __expose }) { __expose(); const statusBarHeight = sheep$1.$platform.device.statusBarHeight + "px"; const __returned__ = { statusBarHeight, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3m(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle({ height: $setup.statusBarHeight }), class: "uni-status-bar" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const __easycom_0$q = /* @__PURE__ */ _export_sfc(_sfc_main$3n, [["render", _sfc_render$3m], ["__scopeId", "data-v-78e027a3"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-status-bar/su-status-bar.vue"]]); const icons = { "id": "2852637", "name": "uniui图标库", "font_family": "uniicons", "css_prefix_text": "uniui-", "description": "", "glyphs": [ { "icon_id": "25027049", "name": "yanse", "font_class": "color", "unicode": "e6cf", "unicode_decimal": 59087 }, { "icon_id": "25027048", "name": "wallet", "font_class": "wallet", "unicode": "e6b1", "unicode_decimal": 59057 }, { "icon_id": "25015720", "name": "settings-filled", "font_class": "settings-filled", "unicode": "e6ce", "unicode_decimal": 59086 }, { "icon_id": "25015434", "name": "shimingrenzheng-filled", "font_class": "auth-filled", "unicode": "e6cc", "unicode_decimal": 59084 }, { "icon_id": "24934246", "name": "shop-filled", "font_class": "shop-filled", "unicode": "e6cd", "unicode_decimal": 59085 }, { "icon_id": "24934159", "name": "staff-filled-01", "font_class": "staff-filled", "unicode": "e6cb", "unicode_decimal": 59083 }, { "icon_id": "24932461", "name": "VIP-filled", "font_class": "vip-filled", "unicode": "e6c6", "unicode_decimal": 59078 }, { "icon_id": "24932462", "name": "plus_circle_fill", "font_class": "plus-filled", "unicode": "e6c7", "unicode_decimal": 59079 }, { "icon_id": "24932463", "name": "folder_add-filled", "font_class": "folder-add-filled", "unicode": "e6c8", "unicode_decimal": 59080 }, { "icon_id": "24932464", "name": "yanse-filled", "font_class": "color-filled", "unicode": "e6c9", "unicode_decimal": 59081 }, { "icon_id": "24932465", "name": "tune-filled", "font_class": "tune-filled", "unicode": "e6ca", "unicode_decimal": 59082 }, { "icon_id": "24932455", "name": "a-rilidaka-filled", "font_class": "calendar-filled", "unicode": "e6c0", "unicode_decimal": 59072 }, { "icon_id": "24932456", "name": "notification-filled", "font_class": "notification-filled", "unicode": "e6c1", "unicode_decimal": 59073 }, { "icon_id": "24932457", "name": "wallet-filled", "font_class": "wallet-filled", "unicode": "e6c2", "unicode_decimal": 59074 }, { "icon_id": "24932458", "name": "paihangbang-filled", "font_class": "medal-filled", "unicode": "e6c3", "unicode_decimal": 59075 }, { "icon_id": "24932459", "name": "gift-filled", "font_class": "gift-filled", "unicode": "e6c4", "unicode_decimal": 59076 }, { "icon_id": "24932460", "name": "fire-filled", "font_class": "fire-filled", "unicode": "e6c5", "unicode_decimal": 59077 }, { "icon_id": "24928001", "name": "refreshempty", "font_class": "refreshempty", "unicode": "e6bf", "unicode_decimal": 59071 }, { "icon_id": "24926853", "name": "location-ellipse", "font_class": "location-filled", "unicode": "e6af", "unicode_decimal": 59055 }, { "icon_id": "24926735", "name": "person-filled", "font_class": "person-filled", "unicode": "e69d", "unicode_decimal": 59037 }, { "icon_id": "24926703", "name": "personadd-filled", "font_class": "personadd-filled", "unicode": "e698", "unicode_decimal": 59032 }, { "icon_id": "24923351", "name": "back", "font_class": "back", "unicode": "e6b9", "unicode_decimal": 59065 }, { "icon_id": "24923352", "name": "forward", "font_class": "forward", "unicode": "e6ba", "unicode_decimal": 59066 }, { "icon_id": "24923353", "name": "arrowthinright", "font_class": "arrow-right", "unicode": "e6bb", "unicode_decimal": 59067 }, { "icon_id": "24923353", "name": "arrowthinright", "font_class": "arrowthinright", "unicode": "e6bb", "unicode_decimal": 59067 }, { "icon_id": "24923354", "name": "arrowthinleft", "font_class": "arrow-left", "unicode": "e6bc", "unicode_decimal": 59068 }, { "icon_id": "24923354", "name": "arrowthinleft", "font_class": "arrowthinleft", "unicode": "e6bc", "unicode_decimal": 59068 }, { "icon_id": "24923355", "name": "arrowthinup", "font_class": "arrow-up", "unicode": "e6bd", "unicode_decimal": 59069 }, { "icon_id": "24923355", "name": "arrowthinup", "font_class": "arrowthinup", "unicode": "e6bd", "unicode_decimal": 59069 }, { "icon_id": "24923356", "name": "arrowthindown", "font_class": "arrow-down", "unicode": "e6be", "unicode_decimal": 59070 }, { "icon_id": "24923356", "name": "arrowthindown", "font_class": "arrowthindown", "unicode": "e6be", "unicode_decimal": 59070 }, { "icon_id": "24923349", "name": "arrowdown", "font_class": "bottom", "unicode": "e6b8", "unicode_decimal": 59064 }, { "icon_id": "24923349", "name": "arrowdown", "font_class": "arrowdown", "unicode": "e6b8", "unicode_decimal": 59064 }, { "icon_id": "24923346", "name": "arrowright", "font_class": "right", "unicode": "e6b5", "unicode_decimal": 59061 }, { "icon_id": "24923346", "name": "arrowright", "font_class": "arrowright", "unicode": "e6b5", "unicode_decimal": 59061 }, { "icon_id": "24923347", "name": "arrowup", "font_class": "top", "unicode": "e6b6", "unicode_decimal": 59062 }, { "icon_id": "24923347", "name": "arrowup", "font_class": "arrowup", "unicode": "e6b6", "unicode_decimal": 59062 }, { "icon_id": "24923348", "name": "arrowleft", "font_class": "left", "unicode": "e6b7", "unicode_decimal": 59063 }, { "icon_id": "24923348", "name": "arrowleft", "font_class": "arrowleft", "unicode": "e6b7", "unicode_decimal": 59063 }, { "icon_id": "24923334", "name": "eye", "font_class": "eye", "unicode": "e651", "unicode_decimal": 58961 }, { "icon_id": "24923335", "name": "eye-filled", "font_class": "eye-filled", "unicode": "e66a", "unicode_decimal": 58986 }, { "icon_id": "24923336", "name": "eye-slash", "font_class": "eye-slash", "unicode": "e6b3", "unicode_decimal": 59059 }, { "icon_id": "24923337", "name": "eye-slash-filled", "font_class": "eye-slash-filled", "unicode": "e6b4", "unicode_decimal": 59060 }, { "icon_id": "24923305", "name": "info-filled", "font_class": "info-filled", "unicode": "e649", "unicode_decimal": 58953 }, { "icon_id": "24923299", "name": "reload-01", "font_class": "reload", "unicode": "e6b2", "unicode_decimal": 59058 }, { "icon_id": "24923195", "name": "mic_slash_fill", "font_class": "micoff-filled", "unicode": "e6b0", "unicode_decimal": 59056 }, { "icon_id": "24923165", "name": "map-pin-ellipse", "font_class": "map-pin-ellipse", "unicode": "e6ac", "unicode_decimal": 59052 }, { "icon_id": "24923166", "name": "map-pin", "font_class": "map-pin", "unicode": "e6ad", "unicode_decimal": 59053 }, { "icon_id": "24923167", "name": "location", "font_class": "location", "unicode": "e6ae", "unicode_decimal": 59054 }, { "icon_id": "24923064", "name": "starhalf", "font_class": "starhalf", "unicode": "e683", "unicode_decimal": 59011 }, { "icon_id": "24923065", "name": "star", "font_class": "star", "unicode": "e688", "unicode_decimal": 59016 }, { "icon_id": "24923066", "name": "star-filled", "font_class": "star-filled", "unicode": "e68f", "unicode_decimal": 59023 }, { "icon_id": "24899646", "name": "a-rilidaka", "font_class": "calendar", "unicode": "e6a0", "unicode_decimal": 59040 }, { "icon_id": "24899647", "name": "fire", "font_class": "fire", "unicode": "e6a1", "unicode_decimal": 59041 }, { "icon_id": "24899648", "name": "paihangbang", "font_class": "medal", "unicode": "e6a2", "unicode_decimal": 59042 }, { "icon_id": "24899649", "name": "font", "font_class": "font", "unicode": "e6a3", "unicode_decimal": 59043 }, { "icon_id": "24899650", "name": "gift", "font_class": "gift", "unicode": "e6a4", "unicode_decimal": 59044 }, { "icon_id": "24899651", "name": "link", "font_class": "link", "unicode": "e6a5", "unicode_decimal": 59045 }, { "icon_id": "24899652", "name": "notification", "font_class": "notification", "unicode": "e6a6", "unicode_decimal": 59046 }, { "icon_id": "24899653", "name": "staff", "font_class": "staff", "unicode": "e6a7", "unicode_decimal": 59047 }, { "icon_id": "24899654", "name": "VIP", "font_class": "vip", "unicode": "e6a8", "unicode_decimal": 59048 }, { "icon_id": "24899655", "name": "folder_add", "font_class": "folder-add", "unicode": "e6a9", "unicode_decimal": 59049 }, { "icon_id": "24899656", "name": "tune", "font_class": "tune", "unicode": "e6aa", "unicode_decimal": 59050 }, { "icon_id": "24899657", "name": "shimingrenzheng", "font_class": "auth", "unicode": "e6ab", "unicode_decimal": 59051 }, { "icon_id": "24899565", "name": "person", "font_class": "person", "unicode": "e699", "unicode_decimal": 59033 }, { "icon_id": "24899566", "name": "email-filled", "font_class": "email-filled", "unicode": "e69a", "unicode_decimal": 59034 }, { "icon_id": "24899567", "name": "phone-filled", "font_class": "phone-filled", "unicode": "e69b", "unicode_decimal": 59035 }, { "icon_id": "24899568", "name": "phone", "font_class": "phone", "unicode": "e69c", "unicode_decimal": 59036 }, { "icon_id": "24899570", "name": "email", "font_class": "email", "unicode": "e69e", "unicode_decimal": 59038 }, { "icon_id": "24899571", "name": "personadd", "font_class": "personadd", "unicode": "e69f", "unicode_decimal": 59039 }, { "icon_id": "24899558", "name": "chatboxes-filled", "font_class": "chatboxes-filled", "unicode": "e692", "unicode_decimal": 59026 }, { "icon_id": "24899559", "name": "contact", "font_class": "contact", "unicode": "e693", "unicode_decimal": 59027 }, { "icon_id": "24899560", "name": "chatbubble-filled", "font_class": "chatbubble-filled", "unicode": "e694", "unicode_decimal": 59028 }, { "icon_id": "24899561", "name": "contact-filled", "font_class": "contact-filled", "unicode": "e695", "unicode_decimal": 59029 }, { "icon_id": "24899562", "name": "chatboxes", "font_class": "chatboxes", "unicode": "e696", "unicode_decimal": 59030 }, { "icon_id": "24899563", "name": "chatbubble", "font_class": "chatbubble", "unicode": "e697", "unicode_decimal": 59031 }, { "icon_id": "24881290", "name": "upload-filled", "font_class": "upload-filled", "unicode": "e68e", "unicode_decimal": 59022 }, { "icon_id": "24881292", "name": "upload", "font_class": "upload", "unicode": "e690", "unicode_decimal": 59024 }, { "icon_id": "24881293", "name": "weixin", "font_class": "weixin", "unicode": "e691", "unicode_decimal": 59025 }, { "icon_id": "24881274", "name": "compose", "font_class": "compose", "unicode": "e67f", "unicode_decimal": 59007 }, { "icon_id": "24881275", "name": "qq", "font_class": "qq", "unicode": "e680", "unicode_decimal": 59008 }, { "icon_id": "24881276", "name": "download-filled", "font_class": "download-filled", "unicode": "e681", "unicode_decimal": 59009 }, { "icon_id": "24881277", "name": "pengyouquan", "font_class": "pyq", "unicode": "e682", "unicode_decimal": 59010 }, { "icon_id": "24881279", "name": "sound", "font_class": "sound", "unicode": "e684", "unicode_decimal": 59012 }, { "icon_id": "24881280", "name": "trash-filled", "font_class": "trash-filled", "unicode": "e685", "unicode_decimal": 59013 }, { "icon_id": "24881281", "name": "sound-filled", "font_class": "sound-filled", "unicode": "e686", "unicode_decimal": 59014 }, { "icon_id": "24881282", "name": "trash", "font_class": "trash", "unicode": "e687", "unicode_decimal": 59015 }, { "icon_id": "24881284", "name": "videocam-filled", "font_class": "videocam-filled", "unicode": "e689", "unicode_decimal": 59017 }, { "icon_id": "24881285", "name": "spinner-cycle", "font_class": "spinner-cycle", "unicode": "e68a", "unicode_decimal": 59018 }, { "icon_id": "24881286", "name": "weibo", "font_class": "weibo", "unicode": "e68b", "unicode_decimal": 59019 }, { "icon_id": "24881288", "name": "videocam", "font_class": "videocam", "unicode": "e68c", "unicode_decimal": 59020 }, { "icon_id": "24881289", "name": "download", "font_class": "download", "unicode": "e68d", "unicode_decimal": 59021 }, { "icon_id": "24879601", "name": "help", "font_class": "help", "unicode": "e679", "unicode_decimal": 59001 }, { "icon_id": "24879602", "name": "navigate-filled", "font_class": "navigate-filled", "unicode": "e67a", "unicode_decimal": 59002 }, { "icon_id": "24879603", "name": "plusempty", "font_class": "plusempty", "unicode": "e67b", "unicode_decimal": 59003 }, { "icon_id": "24879604", "name": "smallcircle", "font_class": "smallcircle", "unicode": "e67c", "unicode_decimal": 59004 }, { "icon_id": "24879605", "name": "minus-filled", "font_class": "minus-filled", "unicode": "e67d", "unicode_decimal": 59005 }, { "icon_id": "24879606", "name": "micoff", "font_class": "micoff", "unicode": "e67e", "unicode_decimal": 59006 }, { "icon_id": "24879588", "name": "closeempty", "font_class": "closeempty", "unicode": "e66c", "unicode_decimal": 58988 }, { "icon_id": "24879589", "name": "clear", "font_class": "clear", "unicode": "e66d", "unicode_decimal": 58989 }, { "icon_id": "24879590", "name": "navigate", "font_class": "navigate", "unicode": "e66e", "unicode_decimal": 58990 }, { "icon_id": "24879591", "name": "minus", "font_class": "minus", "unicode": "e66f", "unicode_decimal": 58991 }, { "icon_id": "24879592", "name": "image", "font_class": "image", "unicode": "e670", "unicode_decimal": 58992 }, { "icon_id": "24879593", "name": "mic", "font_class": "mic", "unicode": "e671", "unicode_decimal": 58993 }, { "icon_id": "24879594", "name": "paperplane", "font_class": "paperplane", "unicode": "e672", "unicode_decimal": 58994 }, { "icon_id": "24879595", "name": "close", "font_class": "close", "unicode": "e673", "unicode_decimal": 58995 }, { "icon_id": "24879596", "name": "help-filled", "font_class": "help-filled", "unicode": "e674", "unicode_decimal": 58996 }, { "icon_id": "24879597", "name": "plus-filled", "font_class": "paperplane-filled", "unicode": "e675", "unicode_decimal": 58997 }, { "icon_id": "24879598", "name": "plus", "font_class": "plus", "unicode": "e676", "unicode_decimal": 58998 }, { "icon_id": "24879599", "name": "mic-filled", "font_class": "mic-filled", "unicode": "e677", "unicode_decimal": 58999 }, { "icon_id": "24879600", "name": "image-filled", "font_class": "image-filled", "unicode": "e678", "unicode_decimal": 59e3 }, { "icon_id": "24855900", "name": "locked-filled", "font_class": "locked-filled", "unicode": "e668", "unicode_decimal": 58984 }, { "icon_id": "24855901", "name": "info", "font_class": "info", "unicode": "e669", "unicode_decimal": 58985 }, { "icon_id": "24855903", "name": "locked", "font_class": "locked", "unicode": "e66b", "unicode_decimal": 58987 }, { "icon_id": "24855884", "name": "camera-filled", "font_class": "camera-filled", "unicode": "e658", "unicode_decimal": 58968 }, { "icon_id": "24855885", "name": "chat-filled", "font_class": "chat-filled", "unicode": "e659", "unicode_decimal": 58969 }, { "icon_id": "24855886", "name": "camera", "font_class": "camera", "unicode": "e65a", "unicode_decimal": 58970 }, { "icon_id": "24855887", "name": "circle", "font_class": "circle", "unicode": "e65b", "unicode_decimal": 58971 }, { "icon_id": "24855888", "name": "checkmarkempty", "font_class": "checkmarkempty", "unicode": "e65c", "unicode_decimal": 58972 }, { "icon_id": "24855889", "name": "chat", "font_class": "chat", "unicode": "e65d", "unicode_decimal": 58973 }, { "icon_id": "24855890", "name": "circle-filled", "font_class": "circle-filled", "unicode": "e65e", "unicode_decimal": 58974 }, { "icon_id": "24855891", "name": "flag", "font_class": "flag", "unicode": "e65f", "unicode_decimal": 58975 }, { "icon_id": "24855892", "name": "flag-filled", "font_class": "flag-filled", "unicode": "e660", "unicode_decimal": 58976 }, { "icon_id": "24855893", "name": "gear-filled", "font_class": "gear-filled", "unicode": "e661", "unicode_decimal": 58977 }, { "icon_id": "24855894", "name": "home", "font_class": "home", "unicode": "e662", "unicode_decimal": 58978 }, { "icon_id": "24855895", "name": "home-filled", "font_class": "home-filled", "unicode": "e663", "unicode_decimal": 58979 }, { "icon_id": "24855896", "name": "gear", "font_class": "gear", "unicode": "e664", "unicode_decimal": 58980 }, { "icon_id": "24855897", "name": "smallcircle-filled", "font_class": "smallcircle-filled", "unicode": "e665", "unicode_decimal": 58981 }, { "icon_id": "24855898", "name": "map-filled", "font_class": "map-filled", "unicode": "e666", "unicode_decimal": 58982 }, { "icon_id": "24855899", "name": "map", "font_class": "map", "unicode": "e667", "unicode_decimal": 58983 }, { "icon_id": "24855825", "name": "refresh-filled", "font_class": "refresh-filled", "unicode": "e656", "unicode_decimal": 58966 }, { "icon_id": "24855826", "name": "refresh", "font_class": "refresh", "unicode": "e657", "unicode_decimal": 58967 }, { "icon_id": "24855808", "name": "cloud-upload", "font_class": "cloud-upload", "unicode": "e645", "unicode_decimal": 58949 }, { "icon_id": "24855809", "name": "cloud-download-filled", "font_class": "cloud-download-filled", "unicode": "e646", "unicode_decimal": 58950 }, { "icon_id": "24855810", "name": "cloud-download", "font_class": "cloud-download", "unicode": "e647", "unicode_decimal": 58951 }, { "icon_id": "24855811", "name": "cloud-upload-filled", "font_class": "cloud-upload-filled", "unicode": "e648", "unicode_decimal": 58952 }, { "icon_id": "24855813", "name": "redo", "font_class": "redo", "unicode": "e64a", "unicode_decimal": 58954 }, { "icon_id": "24855814", "name": "images-filled", "font_class": "images-filled", "unicode": "e64b", "unicode_decimal": 58955 }, { "icon_id": "24855815", "name": "undo-filled", "font_class": "undo-filled", "unicode": "e64c", "unicode_decimal": 58956 }, { "icon_id": "24855816", "name": "more", "font_class": "more", "unicode": "e64d", "unicode_decimal": 58957 }, { "icon_id": "24855817", "name": "more-filled", "font_class": "more-filled", "unicode": "e64e", "unicode_decimal": 58958 }, { "icon_id": "24855818", "name": "undo", "font_class": "undo", "unicode": "e64f", "unicode_decimal": 58959 }, { "icon_id": "24855819", "name": "images", "font_class": "images", "unicode": "e650", "unicode_decimal": 58960 }, { "icon_id": "24855821", "name": "paperclip", "font_class": "paperclip", "unicode": "e652", "unicode_decimal": 58962 }, { "icon_id": "24855822", "name": "settings", "font_class": "settings", "unicode": "e653", "unicode_decimal": 58963 }, { "icon_id": "24855823", "name": "search", "font_class": "search", "unicode": "e654", "unicode_decimal": 58964 }, { "icon_id": "24855824", "name": "redo-filled", "font_class": "redo-filled", "unicode": "e655", "unicode_decimal": 58965 }, { "icon_id": "24841702", "name": "list", "font_class": "list", "unicode": "e644", "unicode_decimal": 58948 }, { "icon_id": "24841489", "name": "mail-open-filled", "font_class": "mail-open-filled", "unicode": "e63a", "unicode_decimal": 58938 }, { "icon_id": "24841491", "name": "hand-thumbsdown-filled", "font_class": "hand-down-filled", "unicode": "e63c", "unicode_decimal": 58940 }, { "icon_id": "24841492", "name": "hand-thumbsdown", "font_class": "hand-down", "unicode": "e63d", "unicode_decimal": 58941 }, { "icon_id": "24841493", "name": "hand-thumbsup-filled", "font_class": "hand-up-filled", "unicode": "e63e", "unicode_decimal": 58942 }, { "icon_id": "24841494", "name": "hand-thumbsup", "font_class": "hand-up", "unicode": "e63f", "unicode_decimal": 58943 }, { "icon_id": "24841496", "name": "heart-filled", "font_class": "heart-filled", "unicode": "e641", "unicode_decimal": 58945 }, { "icon_id": "24841498", "name": "mail-open", "font_class": "mail-open", "unicode": "e643", "unicode_decimal": 58947 }, { "icon_id": "24841488", "name": "heart", "font_class": "heart", "unicode": "e639", "unicode_decimal": 58937 }, { "icon_id": "24839963", "name": "loop", "font_class": "loop", "unicode": "e633", "unicode_decimal": 58931 }, { "icon_id": "24839866", "name": "pulldown", "font_class": "pulldown", "unicode": "e632", "unicode_decimal": 58930 }, { "icon_id": "24813798", "name": "scan", "font_class": "scan", "unicode": "e62a", "unicode_decimal": 58922 }, { "icon_id": "24813786", "name": "bars", "font_class": "bars", "unicode": "e627", "unicode_decimal": 58919 }, { "icon_id": "24813788", "name": "cart-filled", "font_class": "cart-filled", "unicode": "e629", "unicode_decimal": 58921 }, { "icon_id": "24813790", "name": "checkbox", "font_class": "checkbox", "unicode": "e62b", "unicode_decimal": 58923 }, { "icon_id": "24813791", "name": "checkbox-filled", "font_class": "checkbox-filled", "unicode": "e62c", "unicode_decimal": 58924 }, { "icon_id": "24813794", "name": "shop", "font_class": "shop", "unicode": "e62f", "unicode_decimal": 58927 }, { "icon_id": "24813795", "name": "headphones", "font_class": "headphones", "unicode": "e630", "unicode_decimal": 58928 }, { "icon_id": "24813796", "name": "cart", "font_class": "cart", "unicode": "e631", "unicode_decimal": 58929 } ] }; const getVal = (val) => { const reg = /^[0-9]*$/g; return typeof val === "number" || reg.test(val) ? val + "px" : val; }; const _sfc_main$3m = { name: "UniIcons", emits: ["click"], props: { type: { type: String, default: "" }, color: { type: String, default: "#333333" }, size: { type: [Number, String], default: 16 }, customPrefix: { type: String, default: "" } }, data() { return { icons: icons.glyphs }; }, computed: { unicode() { let code2 = this.icons.find((v2) => v2.font_class === this.type); if (code2) { return unescape(`%u${code2.unicode}`); } return ""; }, iconSize() { return getVal(this.size); } }, methods: { _onClick() { this.$emit("click"); } } }; function _sfc_render$3l(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }), 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)) }, null, 6 /* CLASS, STYLE */ ); } const __easycom_1$b = /* @__PURE__ */ _export_sfc(_sfc_main$3m, [["render", _sfc_render$3l], ["__scopeId", "data-v-d31e1c47"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]); const isObject$3 = (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$1(message, delimiters); this._caches[message] = tokens; } return compile(tokens, values); } } const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; function parse$1(format2, [startDelimiter, endDelimiter]) { const tokens = []; let position = 0; let text = ""; while (position < format2.length) { let char = format2[position++]; if (char === startDelimiter) { if (text) { tokens.push({ type: "text", value: text }); } text = ""; let sub = ""; char = format2[position++]; while (char !== void 0 && char !== endDelimiter) { sub += char; char = format2[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 index2 = 0; const mode = Array.isArray(values) ? "list" : isObject$3(values) ? "named" : "unknown"; if (mode === "unknown") { return compiled; } while (index2 < tokens.length) { const token = tokens[index2]; 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; } index2++; } 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$1 = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty$1.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 index2 = this.watchers.push(fn) - 1; return () => { this.watchers.splice(index2, 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, i18n2) { if (appVm.$watchLocale) { appVm.$watchLocale((newLocale) => { i18n2.setLocale(newLocale); }); } else { appVm.$watch(() => appVm.$locale, (newLocale) => { i18n2.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 options2 = [ messages2, locale ]; locale = options2[0]; messages2 = options2[1]; } if (typeof locale !== "string") { locale = getDefaultLocale(); } if (typeof fallbackLocale !== "string") { fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN; } const i18n2 = new I18n({ locale, fallbackLocale, messages: messages2, watcher }); let t2 = (key, values) => { if (typeof getApp !== "function") { t2 = function(key2, values2) { return i18n2.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, i18n2); } } return i18n2.t(key2, values2); }; } return t2(key, values); }; return { i18n: i18n2, f(message, values, delimiters) { return i18n2.f(message, values, delimiters); }, t(key, values) { return t2(key, values); }, add(locale2, message, override = true) { return i18n2.add(locale2, message, override); }, watch(fn) { return i18n2.watchLocale(fn); }, getLocale() { return i18n2.getLocale(); }, setLocale(newLocale) { return i18n2.setLocale(newLocale); } }; } const en$2 = { "uni-search-bar.cancel": "cancel", "uni-search-bar.placeholder": "Search enter content" }; const zhHans$2 = { "uni-search-bar.cancel": "cancel", "uni-search-bar.placeholder": "请输入搜索内容" }; const zhHant$2 = { "uni-search-bar.cancel": "cancel", "uni-search-bar.placeholder": "請輸入搜索內容" }; const messages$2 = { en: en$2, "zh-Hans": zhHans$2, "zh-Hant": zhHant$2 }; const { t: t$5 } = initVueI18n(messages$2); const _sfc_main$3l = { name: "UniSearchBar", emits: ["input", "update:modelValue", "clear", "cancel", "confirm", "blur", "focus"], props: { placeholder: { type: String, default: "" }, radius: { type: [Number, String], default: 5 }, clearButton: { type: String, default: "auto" }, cancelButton: { type: String, default: "auto" }, cancelText: { type: String, default: "取消" }, bgColor: { type: String, default: "#F8F8F8" }, maxlength: { type: [Number, String], default: 100 }, value: { type: [Number, String], default: "" }, modelValue: { type: [Number, String], default: "" }, focus: { type: Boolean, default: false }, readonly: { type: Boolean, default: false } }, data() { return { show: false, showSync: false, searchVal: "" }; }, computed: { cancelTextI18n() { return this.cancelText || t$5("uni-search-bar.cancel"); }, placeholderText() { return this.placeholder || t$5("uni-search-bar.placeholder"); } }, watch: { modelValue: { immediate: true, handler(newVal) { this.searchVal = newVal; if (newVal) { this.show = true; } } }, focus: { immediate: true, handler(newVal) { if (newVal) { if (this.readonly) return; this.show = true; this.$nextTick(() => { this.showSync = true; }); } } }, searchVal(newVal, oldVal) { this.$emit("input", newVal); this.$emit("update:modelValue", newVal); } }, methods: { searchClick() { if (this.readonly) return; if (this.show) { return; } this.show = true; this.$nextTick(() => { this.showSync = true; }); }, clear() { this.$emit("clear", { value: this.searchVal }); this.searchVal = ""; }, cancel() { if (this.readonly) return; this.$emit("cancel", { value: this.searchVal }); this.searchVal = ""; this.show = false; this.showSync = false; plus.key.hideSoftKeybord(); }, confirm() { plus.key.hideSoftKeybord(); this.$emit("confirm", { value: this.searchVal }); }, blur() { plus.key.hideSoftKeybord(); this.$emit("blur", { value: this.searchVal }); }, emitFocus(e2) { this.$emit("focus", e2.detail); } } }; function _sfc_render$3k(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-searchbar" }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle({ borderRadius: $props.radius + "px", backgroundColor: $props.bgColor }), class: "uni-searchbar__box", onClick: _cache[5] || (_cache[5] = (...args) => $options.searchClick && $options.searchClick(...args)) }, [ vue.createElementVNode("view", { class: "uni-searchbar__box-icon-search" }, [ vue.renderSlot(_ctx.$slots, "searchIcon", {}, () => [ vue.createVNode(_component_uni_icons, { color: "#c0c4cc", size: "18", type: "search" }) ], true) ]), $data.show || $data.searchVal ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", { key: 0, focus: $data.showSync, disabled: $props.readonly, placeholder: $options.placeholderText, maxlength: $props.maxlength, class: "uni-searchbar__box-search-input", "confirm-type": "search", type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.searchVal = $event), onConfirm: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)), onBlur: _cache[2] || (_cache[2] = (...args) => $options.blur && $options.blur(...args)), onFocus: _cache[3] || (_cache[3] = (...args) => $options.emitFocus && $options.emitFocus(...args)) }, null, 40, ["focus", "disabled", "placeholder", "maxlength"])), [ [vue.vModelText, $data.searchVal] ]) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "uni-searchbar__text-placeholder" }, vue.toDisplayString($props.placeholder), 1 /* TEXT */ )), $data.show && ($props.clearButton === "always" || $props.clearButton === "auto" && $data.searchVal !== "") && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "uni-searchbar__box-icon-clear", onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args)) }, [ vue.renderSlot(_ctx.$slots, "clearIcon", {}, () => [ vue.createVNode(_component_uni_icons, { color: "#c0c4cc", size: "20", type: "clear" }) ], true) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), $props.cancelButton === "always" || $data.show && $props.cancelButton === "auto" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, onClick: _cache[6] || (_cache[6] = (...args) => $options.cancel && $options.cancel(...args)), class: "uni-searchbar__cancel" }, vue.toDisplayString($options.cancelTextI18n), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0$p = /* @__PURE__ */ _export_sfc(_sfc_main$3l, [["render", _sfc_render$3k], ["__scopeId", "data-v-f07ef577"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue"]]); const _sfc_main$3k = { __name: "su-navbar", props: { dark: { type: Boolean, default: false }, modelValue: { type: String, default: "" }, title: { type: String, default: "" }, titleAlign: { type: String, default: "center" // left | center }, rightText: { type: String, default: "" }, leftIcon: { type: String, default: "left" }, rightIcon: { type: String, default: "" }, fixed: { type: [Boolean, String], default: true }, placeholder: { type: [Boolean, String], default: true }, color: { type: String, default: "" }, backgroundColor: { type: String, default: "" }, opacity: { type: [Boolean, String], default: false }, opacityBgUi: { type: String, default: "bg-white" }, statusBar: { type: [Boolean, String], default: false }, shadow: { type: [Boolean, String], default: false }, border: { type: [Boolean, String], default: false }, height: { type: [Number, String], default: 44 }, leftWidth: { type: [Number, String], default: 80 }, rightWidth: { type: [Number, String], default: 0 }, tools: { type: String, default: "title" }, defaultSearch: { type: String, default: "" } }, emits: ["clickLeft", "clickRight", "clickTitle", "search"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const getVal2 = (val) => typeof val === "number" ? val + "px" : val; const emits = __emit; const props = __props; const capsuleStyle = vue.computed(() => { return { width: sheep$1.$platform.capsule.width + "px", height: sheep$1.$platform.capsule.height + "px", margin: "0 " + (sheep$1.$platform.device.windowWidth - sheep$1.$platform.capsule.right) + "px" }; }); const searchModel = vue.computed(() => { return props.defaultSearch; }); const themeBgColor = vue.computed(() => { if (props.dark) { if (props.backgroundColor) { return props.backgroundColor; } else { return props.dark ? "#333" : "#FFF"; } } return props.backgroundColor || "#FFF"; }); const themeColor = vue.computed(() => { if (props.dark) { if (props.color) { return props.color; } else { return props.dark ? "#fff" : "#333"; } } return props.color || "#333"; }); const navbarHeight = vue.computed(() => { return getVal2(props.height); }); const leftIconWidth = vue.computed(() => { return getVal2(props.leftWidth); }); const rightIconWidth = vue.computed(() => { return getVal2(props.rightWidth); }); function onSearch(e2) { emits("search", e2.value); } onLoad(() => { if (uni.report && props.title !== "") { uni.report("title", props.title); } }); const hasHistory2 = sheep$1.$router.hasHistory(); function onClickLeft() { if (hasHistory2) { sheep$1.$router.back(); } else { sheep$1.$router.go("/pages/index/index"); } emits("clickLeft"); } function onClickRight() { showMenuTools(); } function onClickTitle() { emits("clickTitle"); } const __returned__ = { getVal: getVal2, emits, props, capsuleStyle, searchModel, themeBgColor, themeColor, navbarHeight, leftIconWidth, rightIconWidth, onSearch, hasHistory: hasHistory2, onClickLeft, onClickRight, onClickTitle, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get showMenuTools() { return showMenuTools; }, get closeMenuTools() { return closeMenuTools; }, computed: vue.computed, ref: vue.ref }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3j(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q); const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$p); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-navbar", { "uni-dark": $props.dark }]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([{ "uni-navbar--fixed": $props.fixed, "uni-navbar--shadow": $props.shadow, "uni-navbar--border": $props.border }, "uni-navbar__content"]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["fixed-bg", [$props.opacity ? "" : $props.opacityBgUi]]) }, null, 2 /* CLASS */ ), $props.statusBar ? (vue.openBlock(), vue.createBlock(_component_su_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { style: vue.normalizeStyle({ color: $setup.themeColor, height: $setup.navbarHeight, background: $props.backgroundColor }), class: "uni-navbar__header" }, [ vue.createElementVNode( "view", { class: "uni-navbar__header-btns uni-navbar__header-btns-left", style: vue.normalizeStyle({ width: $setup.leftIconWidth }) }, [ vue.renderSlot(_ctx.$slots, "left", {}, () => [ $props.leftIcon.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-navbar__content_view" }, [ vue.createElementVNode("view", { class: "icon-box ss-flex" }, [ vue.createElementVNode("view", { class: "icon-button icon-button-left ss-flex ss-row-center", onClick: $setup.onClickLeft }, [ $setup.hasHistory ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "sicon-back" })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "sicon-home" })) ]), vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "icon-button icon-button-right ss-flex ss-row-center", onClick: _cache[0] || (_cache[0] = (...args) => $setup.showMenuTools && $setup.showMenuTools(...args)) }, [ vue.createElementVNode("text", { class: "sicon-more" }) ]) ]) ])) : vue.createCommentVNode("v-if", true), $props.titleAlign === "left" && $props.title.length && $setup.sheep.$platform.name !== "WechatOfficialAccount" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass([{ "uni-navbar-btn-icon-left": !$props.leftIcon.length > 0 }, "uni-navbar-btn-text"]) }, [ vue.createElementVNode( "text", { style: vue.normalizeStyle({ color: $setup.themeColor, fontSize: "18px" }) }, vue.toDisplayString($props.title), 5 /* TEXT, STYLE */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], true) ], 4 /* STYLE */ ), $props.tools === "search" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ss-flex-1" }, [ vue.renderSlot(_ctx.$slots, "center", {}, () => [ vue.createVNode(_component_uni_search_bar, { class: "ss-flex-1 search-box", radius: 20, placeholder: _ctx.$t("common.enter_keywords"), cancelButton: "none", modelValue: $setup.searchModel, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchModel = $event), onConfirm: $setup.onSearch }, null, 8, ["placeholder", "modelValue"]) ], true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-navbar__header-container", onClick: $setup.onClickTitle }, [ vue.renderSlot(_ctx.$slots, "center", {}, () => [ $props.tools === "title" && $props.titleAlign === "center" && $props.title.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-navbar__header-container-inner" }, [ vue.createElementVNode( "text", { style: vue.normalizeStyle({ color: $setup.themeColor, fontSize: "36rpx" }), class: "ss-line-1" }, vue.toDisplayString($props.title), 5 /* TEXT, STYLE */ ) ])) : vue.createCommentVNode("v-if", true) ], true) ])) ], 4 /* STYLE */ ) ], 2 /* CLASS */ ), $props.placeholder ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-navbar__placeholder" }, [ $props.statusBar ? (vue.openBlock(), vue.createBlock(_component_su_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "uni-navbar__placeholder-view", style: vue.normalizeStyle({ height: $setup.navbarHeight }) }, null, 4 /* STYLE */ ) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 头部问题 ") ], 2 /* CLASS */ ); } const __easycom_0$o = /* @__PURE__ */ _export_sfc(_sfc_main$3k, [["render", _sfc_render$3j], ["__scopeId", "data-v-305eaf98"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-navbar/su-navbar.vue"]]); const _sfc_main$3j = { __name: "su-fixed", props: { noNav: { type: Boolean, default: false }, bottom: { type: Boolean, default: false }, bg: { type: String, default: "" }, bgStyles: { type: Object, default() { } }, val: { type: Number, default: 0 }, width: { type: [String, Number], default: 0 }, alway: { type: Boolean, default: true }, opacity: { type: Boolean, default: false }, index: { type: [Number, String], default: 0 }, placeholder: { type: [Boolean], default: false }, sticky: { type: [Boolean], default: false }, noFixed: { type: Boolean, default: false }, ui: { type: String, default: "" }, clickTo: { type: Boolean, default: false }, //是否需要安全区 isInset: { type: Boolean, default: true } }, setup(__props, { expose: __expose }) { __expose(); const { safeAreaInsets } = sheep$1.$platform.device; const vm = vue.getCurrentInstance(); const uuid = sheep$1.$helper.guid(); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ content: {}, fixed: true, scrollTop: 0, opacityVal: 0 }); const insetHeight = vue.computed(() => { if (state.fixed && props.bottom) { if (props.isInset) { return props.val + "px"; } else { return props.val + safeAreaInsets.bottom + "px"; } } else { return "auto"; } }); const props = __props; state.fixed = !vue.unref(props.sticky); onPageScroll((e2) => { let top = e2.scrollTop; state.scrollTop = top; state.opacityVal = top > sheep$1.$platform.navbar ? 1 : top * 0.01; }); vue.onMounted(() => { vue.nextTick(() => { computedQuery(); }); }); const computedQuery = () => { uni.createSelectorQuery().in(vm).select(`#fixed-${uuid}`).boundingClientRect((data) => { if (data != null) { state.content = data; if (vue.unref(props.sticky)) { setFixed(state.scrollTop); } } }).exec(); }; const setFixed = (value) => { if (vue.unref(props.bottom)) { state.fixed = value >= state.content.bottom - sheep$1.$platform.device.windowHeight + state.content.height + vue.unref(props.val); } else { state.fixed = value >= state.content.top - (vue.unref(props.noNav) ? vue.unref(props.val) : vue.unref(props.val) + sheep$1.$platform.navbar); } }; const toTop = () => { if (props.hasToTop) { uni.pageScrollTo({ scrollTop: state.content.top, duration: 100 }); } }; const __returned__ = { safeAreaInsets, vm, uuid, sys_navBar, state, insetHeight, props, computedQuery, setFixed, toTop, get onPageScroll() { return onPageScroll; }, getCurrentInstance: vue.getCurrentInstance, unref: vue.unref, onMounted: vue.onMounted, reactive: vue.reactive, nextTick: vue.nextTick, computed: vue.computed, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3i(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "ui-fixed" }, [ vue.createElementVNode("view", { class: vue.normalizeClass(["ui-fixed-box", [{ fixed: $setup.state.fixed }]]), id: `fixed-${$setup.uuid}`, style: vue.normalizeStyle([ { left: $props.sticky ? "auto" : "0px", top: $setup.state.fixed && !$props.bottom ? ($props.noNav ? $props.val : $props.val + $setup.sys_navBar) + "px" : "auto", bottom: $setup.insetHeight, zIndex: $props.index + $setup.sheep.$zIndex.navbar }, !$props.alway ? { opacity: $setup.state.opacityVal } : "" ]) }, [ vue.createElementVNode( "view", { class: "ui-fixed-content", onClick: $setup.toTop, style: vue.normalizeStyle([{ zIndex: $props.index + $setup.sheep.$zIndex.navbar }]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), $setup.safeAreaInsets.bottom && $props.bottom && $props.isInset ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "inset-bottom", style: vue.normalizeStyle([{ height: $setup.safeAreaInsets.bottom + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), $props.bottom ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["ui-fixed-bottom", [$props.bg]]) }, null, 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["ui-fixed-bg", [$props.ui, $props.bg]]), style: vue.normalizeStyle([ { zIndex: $props.index + $setup.sheep.$zIndex.navbar - 1 }, $props.bgStyles, $props.opacity ? { opacity: $setup.state.opacityVal } : "" ]) }, null, 6 /* CLASS, STYLE */ ) ], 14, ["id"]), ($props.sticky ? $setup.state.fixed : $props.placeholder && $setup.state.fixed) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "skeleton", style: vue.normalizeStyle([{ height: $setup.state.content.height + "px", width: $props.width + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const __easycom_2$9 = /* @__PURE__ */ _export_sfc(_sfc_main$3j, [["render", _sfc_render$3i], ["__scopeId", "data-v-96c3469f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-fixed/su-fixed.vue"]]); const _sfc_main$3i = { __name: "navbar", props: { sticky: Boolean, zIndex: { type: Number, default: 100 }, back: { //是否返回上一页 type: Boolean, default: true }, backtext: { //返回文本 type: String, default: "" }, bg: { type: String, default: "bg-white" }, status: { //状态栏颜色 可以选择light dark/其他字符串视为黑色 type: String, default: "" }, // 常驻 alway: { type: Boolean, default: true }, opacity: { //是否开启滑动渐变 type: Boolean, default: false }, opacityBg: { //开启滑动渐变后 返回按钮是否添加背景 type: Boolean, default: false }, noFixed: { //是否浮动 type: Boolean, default: false }, ui: { type: String, default: "" }, capsule: { //是否开启胶囊返回 type: Boolean, default: false }, stopBack: { type: Boolean, default: false }, placeholder: { type: [Boolean], default: true }, bgStyles: { type: Object, default() { } } }, emits: ["navback"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const state = vue.reactive({ statusCur: "", capsuleStyle: {}, capsuleBack: {} }); const sys_statusBar = sheep$1.$platform.device.statusBarHeight; const sys_navBar = sheep$1.$platform.navbar; const props = __props; const emits = __emit; vue.onBeforeMount(() => { init(); }); const onNavback = () => { sheep$1.$router.back(); }; const init = () => { state.capsuleStyle = { width: sheep$1.$platform.capsule.width + "px", height: sheep$1.$platform.capsule.height + "px", margin: "0 " + (sheep$1.$platform.device.windowWidth - sheep$1.$platform.capsule.right) + "px" }; state.capsuleBack = state.capsuleStyle; }; const __returned__ = { state, sys_statusBar, sys_navBar, props, emits, onNavback, init, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3h(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); return vue.openBlock(), vue.createBlock(_component_su_fixed, { noFixed: $setup.props.noFixed, alway: $setup.props.alway, bgStyles: $setup.props.bgStyles, val: 0, index: $setup.props.zIndex, noNav: "", bg: $setup.props.bg, ui: $setup.props.ui, opacity: $setup.props.opacity, placeholder: $setup.props.placeholder, sticky: $setup.props.sticky }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_status_bar), vue.createCommentVNode(` :class="[{ 'border-bottom': !props.opacity && props.bg != 'bg-none' }]" `), vue.createElementVNode("view", { class: "ui-navbar-box" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([ "ui-bar", $setup.props.status == "" ? `text-a` : $setup.props.status == "light" ? "text-white" : "text-black" ]), style: vue.normalizeStyle([{ height: $setup.sys_navBar - $setup.sys_statusBar + "px" }]) }, [ vue.renderSlot(_ctx.$slots, "item", {}, void 0, true), vue.createElementVNode("view", { class: "right" }) ], 6 /* CLASS, STYLE */ ) ]) ]), _: 3 /* FORWARDED */ }, 8, ["noFixed", "alway", "bgStyles", "index", "bg", "ui", "opacity", "placeholder", "sticky"]); } const Navbar = /* @__PURE__ */ _export_sfc(_sfc_main$3i, [["render", _sfc_render$3h], ["__scopeId", "data-v-81e1f503"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-custom-navbar/components/navbar.vue"]]); const _sfc_main$3h = { __name: "s-search-block", props: { data: { type: Object, default: () => ({}) }, // 输入框背景色 elBackground: { type: String, default: "" }, height: { type: Number, default: 36 }, // 图标颜色 iconColor: { type: String, default: "#b0b3bf" }, // 字体颜色 fontColor: { type: String, default: "#b0b3bf" }, // placeholder placeholder: { type: String, default: "这是一个搜索框" }, radius: { type: Number, default: 10 }, width: { type: String, default: "100%" }, navbar: { type: Boolean, default: true } }, emits: ["click"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const state = vue.reactive({ searchVal: "" }); const emits = __emit; const props = __props; const click2 = () => { emits("click"); }; function onSearch(e2) { if (e2.value) { sheep$1.$router.go("/pages/goods/list", { keyword: e2.value }); setTimeout(() => { state.searchVal = ""; }, 100); } } const __returned__ = { state, emits, props, click: click2, onSearch, computed: vue.computed, reactive: vue.reactive, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3g(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$p); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["search-content ss-flex ss-col-center ss-row-between", [{ "border-content": $props.navbar }]]), onClick: $setup.click, style: vue.normalizeStyle([ { borderRadius: $props.radius + "px", background: $props.elBackground, height: $props.height + "px", width: $props.width } ]) }, [ $props.navbar ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "search-icon _icon-search ss-m-l-10", style: vue.normalizeStyle([{ color: $setup.props.iconColor }]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "search-input ss-flex-1 ss-line-1", style: vue.normalizeStyle([{ color: $props.fontColor, width: $props.width }]) }, vue.toDisplayString($props.placeholder), 5 /* TEXT, STYLE */ ) ])) : vue.createCommentVNode("v-if", true), !$props.navbar ? (vue.openBlock(), vue.createBlock(_component_uni_search_bar, { key: 1, class: "ss-flex-1", radius: $props.data.borderRadius, placeholder: $props.data.placeholder, cancelButton: "none", clearButton: "none", onConfirm: $setup.onSearch, modelValue: $setup.state.searchVal, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.searchVal = $event) }, null, 8, ["radius", "placeholder", "modelValue"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "keyword-link ss-flex" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.data.hotKeywords, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createElementVNode("view", { class: "ss-m-r-16", style: vue.normalizeStyle([{ color: $props.data.textColor }]), onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/goods/list", { keyword: item }), ["stop"]) }, vue.toDisplayString(item), 13, ["onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), $props.data.hotKeywords && $props.data.hotKeywords.length && $props.navbar ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "ss-flex" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.data.hotKeywords, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "button", { class: "ss-reset-button keyword-btn", key: index2, style: vue.normalizeStyle([{ color: $props.data.textColor, marginRight: "10rpx" }]) }, vue.toDisplayString(item), 5 /* TEXT, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$n = /* @__PURE__ */ _export_sfc(_sfc_main$3h, [["render", _sfc_render$3g], ["__scopeId", "data-v-1f3fe5bf"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-search-block/s-search-block.vue"]]); const _sfc_main$3g = { __name: "navbar-item", props: { data: { type: Object, default: () => ({}) }, width: { type: String, default: "1px" } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const height = vue.computed(() => sheep$1.$platform.capsule.height); const __returned__ = { props, height, get sheep() { return sheep$1; }, computed: vue.computed }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3f(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_search_block = resolveEasycom(vue.resolveDynamicComponent("s-search-block"), __easycom_0$n); return vue.openBlock(), vue.createElementBlock("view", { class: "ss-flex ss-col-center" }, [ $props.data.type === "text" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "nav-title inline", style: vue.normalizeStyle([{ color: $props.data.textColor, width: $props.width }]) }, vue.toDisplayString($props.data.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), $props.data.type === "image" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, style: vue.normalizeStyle([{ width: $props.width }]), class: "menu-icon-wrap ss-flex ss-row-center ss-col-center", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go($props.data.url)) }, [ vue.createElementVNode("image", { class: "nav-image", src: $setup.sheep.$url.cdn($props.data.src), mode: "aspectFit" }, null, 8, ["src"]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $props.data.type == "search" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "ss-flex-1", style: vue.normalizeStyle([{ width: $props.width }]) }, [ vue.createVNode(_component_s_search_block, { placeholder: $props.data.placeholder || "搜索关键字", radius: $props.data.borderRadius, elBackground: "#fff", height: $setup.height, width: $props.width, onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/index/search")) }, null, 8, ["placeholder", "radius", "height", "width"]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const NavbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$3g, [["render", _sfc_render$3f], ["__scopeId", "data-v-c063d35d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-custom-navbar/components/navbar-item.vue"]]); const _sfc_main$3f = { __name: "s-custom-navbar", props: { data: { type: Object, default: () => ({}) }, showLeftButton: { type: Boolean, default: false } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const hasHistory2 = sheep$1.$router.hasHistory(); const sticky = vue.computed(() => { if (props.data.mode == "inner") { if (props.data.alway) { return false; } } if (props.data.mode == "normal") { return false; } }); const navList = vue.computed(() => { if (!props.data.list) return []; return props.data.list.app; }); const windowWidth2 = sheep$1.$platform.device.windowWidth; const cell = vue.computed(() => { if (vue.unref(navList).length) { let cell2 = (windowWidth2 - 90) / 8; return cell2; } }); const parseImgStyle = (item) => { let obj = { width: item.width * cell.value + (item.width - 1) * 10 + "px", left: item.left * cell.value + (item.left + 1) * 10 + "px", "border-radius": item.borderRadius + "px" }; return obj; }; const isAlway = vue.computed( () => props.data.mode === "inner" ? Boolean(props.data.alwaysShow) : true ); const isOpacity = vue.computed( () => props.data.mode === "normal" ? false : props.showLeftButton ? false : props.data.mode === "inner" ); const isPlaceholder = vue.computed(() => props.data.mode === "normal"); const bgStyles = vue.computed(() => { if (props.data.type) { return { background: props.data.type == "color" ? props.data.color : `url(${sheep$1.$url.cdn(props.data.src)}) no-repeat top center / 100% 100%` }; } }); function onClickLeft() { if (hasHistory2) { sheep$1.$router.back(); } else { sheep$1.$router.go("/pages/index/index"); } } function onClickRight() { showMenuTools(); } const __returned__ = { props, hasHistory: hasHistory2, sticky, navList, windowWidth: windowWidth2, cell, parseImgStyle, isAlway, isOpacity, isPlaceholder, bgStyles, onClickLeft, onClickRight, computed: vue.computed, unref: vue.unref, get sheep() { return sheep$1; }, Navbar, NavbarItem, get showMenuTools() { return showMenuTools; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3e(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createBlock($setup["Navbar"], { alway: $setup.isAlway, back: false, bg: "", placeholder: $setup.isPlaceholder, bgStyles: $setup.bgStyles, opacity: $setup.isOpacity, sticky: $setup.sticky }, { item: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav-box" }, [ $props.showLeftButton ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "nav-icon" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["icon-box ss-flex", { "inner-icon-box": $props.data.mode == "inner" }]) }, [ vue.createElementVNode("view", { class: "icon-button icon-button-left ss-flex ss-row-center", onClick: $setup.onClickLeft }, [ $setup.hasHistory ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "sicon-back" })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "sicon-home" })) ]), vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "icon-button icon-button-right ss-flex ss-row-center", onClick: $setup.onClickRight }, [ vue.createElementVNode("text", { class: "sicon-more" }) ]) ], 2 /* CLASS */ ) ])) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.navList, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["nav-item", [{ "ss-flex ss-col-center ss-row-center": item.type !== "search" }]]), key: index2, style: vue.normalizeStyle([$setup.parseImgStyle(item)]) }, [ vue.createVNode($setup["NavbarItem"], { data: item, width: $setup.parseImgStyle(item).width }, null, 8, ["data", "width"]) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["alway", "placeholder", "bgStyles", "opacity", "sticky"]); } const __easycom_1$a = /* @__PURE__ */ _export_sfc(_sfc_main$3f, [["render", _sfc_render$3e], ["__scopeId", "data-v-6417c6b5"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-custom-navbar/s-custom-navbar.vue"]]); const _sfc_main$3e = { __name: "su-inner-navbar", props: { zIndex: { type: Number, default: 100 }, title: { //返回文本 type: String, default: "" }, bg: { type: String, default: "bg-white" }, // 常驻 alway: { type: Boolean, default: true }, opacity: { //是否开启滑动渐变 type: Boolean, default: true }, noFixed: { //是否浮动 type: Boolean, default: true }, ui: { type: String, default: "" }, capsule: { //是否开启胶囊返回 type: Boolean, default: false }, stopBack: { type: Boolean, default: false }, placeholder: { type: [Boolean], default: false }, bgStyles: { type: Object, default() { } } }, emits: ["navback", "clickLeft"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const state = vue.reactive({ statusCur: "", capsuleStyle: {}, capsuleBack: {}, isDark: true }); const sys_statusBar = sheep$1.$platform.device.statusBarHeight; const sys_navBar = sheep$1.$platform.navbar; const props = __props; const emits = __emit; const hasHistory2 = sheep$1.$router.hasHistory(); vue.onBeforeMount(() => { init(); }); onPageScroll((e2) => { let top = e2.scrollTop; state.isDark = top < sheep$1.$platform.navbar; }); function onClickLeft() { if (hasHistory2) { sheep$1.$router.back(); } else { sheep$1.$router.go("/pages/index/index"); } emits("clickLeft"); } function onClickRight() { showMenuTools(); } const init = () => { state.capsuleStyle = { width: sheep$1.$platform.capsule.width + "px", height: sheep$1.$platform.capsule.height + "px" }; state.capsuleBack = state.capsuleStyle; }; const __returned__ = { state, sys_statusBar, sys_navBar, props, emits, hasHistory: hasHistory2, onClickLeft, onClickRight, init, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, get sheep() { return sheep$1; }, get onPageScroll() { return onPageScroll; }, get showMenuTools() { return showMenuTools; }, get closeMenuTools() { return closeMenuTools; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3d(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); return vue.openBlock(), vue.createBlock(_component_su_fixed, { noFixed: $setup.props.noFixed, alway: $setup.props.alway, bgStyles: $setup.props.bgStyles, val: 0, index: $setup.props.zIndex, noNav: "", bg: $setup.props.bg, ui: $setup.props.ui, opacity: $setup.props.opacity, placeholder: $setup.props.placeholder }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_status_bar), vue.createCommentVNode(` :class="[{ 'border-bottom': !props.opacity && props.bg != 'bg-none' }]" `), vue.createElementVNode("view", { class: "ui-navbar-box" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ui-bar ss-p-x-20", $setup.state.isDark ? "text-white" : "text-black"]), style: vue.normalizeStyle([{ height: $setup.sys_navBar - $setup.sys_statusBar + "px" }]) }, [ vue.createElementVNode("view", { class: "icon-box ss-flex" }, [ vue.createElementVNode("view", { class: "icon-button icon-button-left ss-flex ss-row-center", onClick: $setup.onClickLeft }, [ $setup.hasHistory ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "sicon-back" })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "sicon-home" })) ]), vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "icon-button icon-button-right ss-flex ss-row-center", onClick: $setup.onClickRight }, [ vue.createElementVNode("text", { class: "sicon-more" }) ]) ]), vue.renderSlot(_ctx.$slots, "center", {}, () => [ vue.createElementVNode( "view", { class: "center navbar-title" }, vue.toDisplayString($props.title), 1 /* TEXT */ ) ], true) ], 6 /* CLASS, STYLE */ ) ]) ]), _: 3 /* FORWARDED */ }, 8, ["noFixed", "alway", "bgStyles", "index", "bg", "ui", "opacity", "placeholder"]); } const __easycom_2$8 = /* @__PURE__ */ _export_sfc(_sfc_main$3e, [["render", _sfc_render$3d], ["__scopeId", "data-v-374b2fee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-inner-navbar/su-inner-navbar.vue"]]); class MPAnimation { constructor(options2, _this) { this.options = options2; this.animation = uni.createAnimation(options2); 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 = {}, config2 = {}) { let ref = this.$.$refs["ani"].ref; if (!ref) return; return new Promise((resolve, reject) => { nvueAnimation.transition(ref, { styles, ...config2 }, (res) => { resolve(); }); }); } _nvueNextAnimate(animates, step = 0, fn) { let obj = animates[step]; if (obj) { let { styles, config: config2 } = obj; this._animateRun(styles, config2).then(() => { step += 1; this._nvueNextAnimate(animates, step, fn); }); } else { this.currentStepAnimates = {}; typeof fn === "function" && fn(); this.isEnd = true; } } step(config2 = {}) { this.animation.step(config2); 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$3d = { 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: "" } }, 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, config2 = {}) { 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:161", `方法 ${i2} 不存在`); } } this.animation.step(config2); 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 ? 1 : 0, "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(name2) { return name2.replace(/([A-Z])/g, "-$1").toLowerCase(); } } }; function _sfc_render$3c(_ctx, _cache, $props, $setup, $data, $options) { return $data.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, 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.createCommentVNode("v-if", true); } const __easycom_0$m = /* @__PURE__ */ _export_sfc(_sfc_main$3d, [["render", _sfc_render$3c], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]); const _sfc_main$3c = { name: "SuPopup", components: {}, emits: ["change", "maskClick", "close"], props: { // 开启状态 show: { type: Boolean, default: false }, // 顶部,底部时有效 space: { type: Number, default: 0 }, // 默认圆角 round: { type: [String, Number], default: 0 }, // 是否显示关闭 showClose: { type: Boolean, default: false }, // 开启动画 animation: { type: Boolean, default: true }, // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层 // message: 消息提示 ; dialog : 对话框 type: { type: String, default: "bottom" }, // maskClick isMaskClick: { type: Boolean, default: null }, // TODO 2 个版本后废弃属性 ,使用 isMaskClick maskClick: { type: Boolean, default: null }, // 可设置none backgroundColor: { type: String, default: "#ffffff" }, backgroundImage: { type: String, default: "" }, safeArea: { type: Boolean, default: true }, maskBackgroundColor: { type: String, default: "rgba(0, 0, 0, 0.4)" }, zIndex: { type: [String, Number], default: 10075 } }, watch: { show: { handler: function(newValue, oldValue) { if (typeof oldValue === "undefined" && !newValue) { return; } if (newValue) { this.open(); } else { this.close(); } }, immediate: true }, /** * 监听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 { sheep: sheep$1, 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: { position: "fixed", left: 0, right: 0 }, maskShow: true, mkclick: true, popupstyle: this.isDesktop ? "fixforpc-top" : "top" }; }, computed: { isDesktop() { return this.popupWidth >= 500 && this.popupHeight >= 500; }, bg() { if (this.backgroundColor === "" || this.backgroundColor === "none") { return "transparent"; } return this.backgroundColor; }, borderRadius() { if (this.round) { if (this.type === "bottom") { return { "border-top-left-radius": parseFloat(this.round) + "px", "border-top-right-radius": parseFloat(this.round) + "px" }; } if (this.type === "center") { return { "border-top-left-radius": parseFloat(this.round) + "px", "border-top-right-radius": parseFloat(this.round) + "px", "border-bottom-left-radius": parseFloat(this.round) + "px", "border-bottom-right-radius": parseFloat(this.round) + "px" }; } if (this.type === "top") { return { "border-bottom-left-radius": parseFloat(this.round) + "px", "border-bottom-right-radius": parseFloat(this.round) + "px" }; } } } }, mounted() { const fixSize = () => { const { windowWidth: windowWidth2, windowHeight, windowTop, safeArea, screenHeight, safeAreaInsets } = sheep$1.$platform.device; this.popupWidth = windowWidth2; this.popupHeight = windowHeight + (windowTop || 0); if (safeArea && this.safeArea) { this.safeAreaInsets = safeAreaInsets.bottom; } else { this.safeAreaInsets = 0; } }; fixSize(); }, // TODO vue3 unmounted() { this.setH5Visible(); }, 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() { }, /** * 公用方法,不显示遮罩层 */ closeMask() { this.maskShow = false; }, /** * 公用方法,遮罩层禁止点击 */ disableMask() { this.mkclick = false; }, // TODO nvue 取消冒泡 clear(e2) { e2.stopPropagation(); this.clearPropagation = true; }, open(direction) { if (this.showPopup) { clearTimeout(this.timer); this.showPopup = false; } 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 sheep/ui/su-popup/su-popup.vue:384", "缺少类型:", 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 }); this.$emit("close"); 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, top: this.space + "px", backgroundColor: this.bg }; 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 + this.space + "px", backgroundColor: this.bg }; 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" }; 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, 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, display: "flex", flexDirection: "column" }; if (type) return; this.showPopup = true; this.showTrans = true; } } }; const __injectCSSVars__ = () => { vue.useCssVars((_ctx) => ({ "f2bacd7c-backgroundImage": _ctx.backgroundImage })); }; const __setup__ = _sfc_main$3c.setup; _sfc_main$3c.setup = __setup__ ? (props, ctx) => { __injectCSSVars__(); return __setup__(props, ctx); } : __injectCSSVars__; function _sfc_render$3b(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$m); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); return $data.showPopup ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]]), style: vue.normalizeStyle([{ zIndex: $props.zIndex }]), onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop", "prevent"])) }, [ 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, ...$options.borderRadius }, duration: $data.duration, show: $data.showTrans, onClick: $options.onTap }, { default: vue.withCtx(() => [ $data.showPopup ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]), style: vue.normalizeStyle([{ backgroundColor: $options.bg }, $options.borderRadius]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args)) }, [ $props.showClose ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 0, class: "close-icon", color: "#F6F6F6", type: "closeempty", size: "32", onClick: $options.close }, null, 8, ["onClick"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]), _: 3 /* FORWARDED */ }, 8, ["mode-class", "styles", "duration", "show", "onClick"]) ], 32 /* NEED_HYDRATION */ ) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __easycom_4$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3c, [["render", _sfc_render$3b], ["__scopeId", "data-v-f2bacd7c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-popup/su-popup.vue"]]); const formatToFraction = (num) => { if (typeof num === "undefined") return 0; const parsedNumber = typeof num === "string" ? parseFloat(num) : num; return parseFloat((parsedNumber / 100).toFixed(2)); }; const floatToFixed2 = (num) => { let str = "0.00"; if (typeof num === "undefined") { return str; } const f2 = formatToFraction(num); const decimalPart = f2.toString().split(".")[1]; const len = decimalPart ? decimalPart.length : 0; switch (len) { case 0: str = f2.toString() + ".00"; break; case 1: str = f2.toString() + ".0"; break; case 2: str = f2.toString(); break; } return str; }; function formatDate(date2, format2) { if (!date2) { return ""; } if (format2 === void 0) { format2 = "YYYY-MM-DD HH:mm:ss"; } return dayjs(date2).format(format2); } function handleTree(data, id = "id", parentId = "parentId", children = "children", rootId = 0) { const cloneData = JSON.parse(JSON.stringify(data)); const treeData = cloneData.filter((father) => { let branchArr = cloneData.filter((child) => { return father[id] === child[parentId]; }); branchArr.length > 0 ? father.children = branchArr : ""; return father[parentId] === rootId; }); return treeData !== "" ? treeData : data; } function resetPagination(pagination) { pagination.list = []; pagination.total = 0; pagination.pageNo = 1; } function formatSales(type, num) { let prefix = type !== "exact" && num < 10 ? t$6("common.sales_volume") : t$6("common.sold"); return formatNum(prefix, type, num); } function formatStock(type, num) { return formatNum(t$6("useGoods.in_stock"), type, num); } function formatNum(prefix, type, num) { num = num || 0; if (type === "exact") { return prefix + num; } if (num < 10) { return `${prefix}≤10`; } let pow = Math.pow(10, `${num}`.length - 1); return `${prefix}${num / pow * pow}+`; } const VIDEO_SUFFIX_LIST = [".avi", ".mp4"]; function formatGoodsSwiper(urlList) { return (urlList == null ? void 0 : urlList.filter((url2) => url2).map((url2, key) => { const isVideo = VIDEO_SUFFIX_LIST.some((suffix) => url2.includes(suffix)); const type = isVideo ? "video" : "image"; const src = $url.cdn(url2); return { type, src }; })) || []; } function formatOrderColor(order2) { if (order2.status === 0) { return "info-color"; } if (order2.status === 10 || order2.status === 20 || order2.status === 30 && !order2.commentStatus) { return "warning-color"; } if (order2.status === 30 && order2.commentStatus) { return "success-color"; } return "danger-color"; } function formatOrderStatus(order2) { if (order2.status === 0) { return t$6("useGoods.pending_payment"); } if (order2.status === 10 && order2.deliveryType === 1 || order2.status === 10 && order2.deliveryType === 3) { return t$6("useGoods.awaiting_shipment"); } if (order2.status === 10 && order2.deliveryType === 2) { return t$6("useGoods.awaiting_write_off"); } if (order2.status === 20) { return t$6("useGoods.awaiting_delivery"); } if (order2.status === 30 && !order2.commentStatus) { return t$6("useGoods.awaiting_review"); } if (order2.status === 30 && order2.commentStatus) { return t$6("useGoods.completed"); } return t$6("useGoods.closed"); } function formatOrderStatusDescription(order2) { if (order2.status === 0) { return t$6("useGoods.complete_payment_by", { time: formatDate(order2.payExpireTime) }); } if (order2.status === 10) { return t$6("useGoods.merchant_not_shipped"); } if (order2.status === 20) { return t$6("useGoods.merchant_shipped"); } if (order2.status === 30 && !order2.commentStatus) { return t$6("useGoods.goods_received"); } if (order2.status === 30 && order2.commentStatus) { return t$6("useGoods.transaction_completed"); } return t$6("useGoods.transaction_closed"); } function handleOrderButtons(order2) { var _a2, _b2; console.log(); order2.buttons = []; if (order2.type === 3) { order2.buttons.push("combination"); } if (order2.status === 20) { order2.buttons.push("express"); order2.buttons.push("confirm"); } if (order2.logisticsId > 0) { order2.buttons.push("express"); } if (order2.status === 0) { order2.buttons.push("cancel"); order2.buttons.push("pay"); } if (order2.status === 30 && !order2.commentStatus) { order2.buttons.push("comment"); } if (order2.status === 40) { order2.buttons.push("delete"); } if ([10, 20, 30].includes((_a2 = order2.items[0]) == null ? void 0 : _a2.refundStatus)) { order2.buttons.push("aftersaleCancel"); } if (((_b2 = order2.items[0]) == null ? void 0 : _b2.refundStatus) === 20) { order2.buttons.push("aftersaleDelivery"); } } function formatAfterSaleStatus(afterSale) { if (afterSale.status === 10) { return t$6("useGoods.apply_for_after_sales"); } if (afterSale.status === 20) { return t$6("useGoods.goods_awaiting_return"); } if (afterSale.status === 30) { return t$6("useGoods.merchant_awaiting_goods"); } if (afterSale.status === 40) { return t$6("useGoods.waiting_for_refund"); } if (afterSale.status === 50) { return t$6("useGoods.refund_successful"); } if (afterSale.status === 61) { return t$6("useGoods.buyer_cancelled"); } if (afterSale.status === 62) { return t$6("useGoods.merchant_refused"); } if (afterSale.status === 63) { return t$6("useGoods.merchant_refused_goods"); } return t$6("useGoods.unknown_status"); } function formatAfterSaleStatusDescription(afterSale) { if (afterSale.status === 10) { return t$6("useGoods.refund_request_awaiting_merchant"); } if (afterSale.status === 20) { return t$6("useGoods.return_goods_fill_logistics"); } if (afterSale.status === 30) { return t$6("useGoods.return_refund_request_awaiting_merchant"); } if (afterSale.status === 40) { return t$6("useGoods.waiting_for_refund"); } if (afterSale.status === 50) { return t$6("useGoods.refund_successful"); } if (afterSale.status === 61) { return t$6("useGoods.refund_closed"); } if (afterSale.status === 62) { return t$6("useGoods.merchant_disagrees_with_refund_request") + `${afterSale.auditReason}`; } if (afterSale.status === 63) { return t$6("useGoods.merchant_refuses_to_accept_goods") + `${afterSale.auditReason}`; } return t$6("useGoods.unknown_status"); } function handleAfterSaleButtons(afterSale) { formatAppLog("log", "at sheep/hooks/useGoods.js:291", afterSale); afterSale.buttons = []; if ([10, 20, 30].includes(afterSale.status)) { afterSale.buttons.push("cancel"); } if (afterSale.status === 20) { afterSale.buttons.push("delivery"); } } function useDurationTime(toTime, fromTime = "") { toTime = getDayjsTime(toTime); if (fromTime === "") { fromTime = dayjs(); } let duration2 = vue.ref(toTime - fromTime); if (duration2.value > 0) { setTimeout(() => { if (duration2.value > 0) { duration2.value -= 1e3; } }, 1e3); } let durationTime = dayjs.duration(duration2.value); return { h: (durationTime.months() * 30 * 24 + durationTime.days() * 24 + durationTime.hours()).toString().padStart(2, "0"), m: durationTime.minutes().toString().padStart(2, "0"), s: durationTime.seconds().toString().padStart(2, "0"), ms: durationTime.$ms }; } function getDayjsTime(time2) { time2 = time2.toString(); if (time2.indexOf("-") > 0) { return dayjs(time2); } if (time2.length > 10) { return dayjs(parseInt(time2)); } if (time2.length === 10) { return dayjs.unix(parseInt(time2)); } } function fen2yuan(price) { return (price / 100).toFixed(2); } function fen2yuan6(price) { return (price / 100).toFixed(6); } function points2point(point) { return (point / 1e6).toFixed(3).slice(0, -1); } function convertProductPropertyList(skus) { let result2 = []; for (const sku of skus) { if (!sku.properties) { continue; } for (const property of sku.properties) { let resultProperty = result2.find((item) => item.id === property.propertyId); if (!resultProperty) { resultProperty = { id: property.propertyId, name: property.propertyName, values: [] }; result2.push(resultProperty); } let resultValue = resultProperty.values.find((item) => item.id === property.valueId); if (!resultValue) { resultProperty.values.push({ id: property.valueId, name: property.valueName }); } } } return result2; } function formatRewardActivityRule(activity, rule) { if (activity.conditionType === 10) { return `满 ${fen2yuan(rule.limit)} 元减 ${fen2yuan(rule.discountPrice)} 元`; } if (activity.conditionType === 20) { return `满 ${rule.limit} 件减 ${fen2yuan(rule.discountPrice)} 元`; } return ""; } const _sfc_main$3b = { __name: "s-wallet-modal", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "bd9b951b-headerBg": vue.unref(headerBg) })); const headerBg = sheep$1.$url.css("/static/images/sign.png"); const show = vue.computed(() => sheep$1.$store("modal").getWallet); const state = vue.computed(() => sheep$1.$store("modal").getWalletInfo); const __returned__ = { headerBg, show, state, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, watch: vue.watch, get sheep() { return sheep$1; }, get showWalletModal() { return showWalletModal; }, get colseWalletModal() { return colseWalletModal; }, get points2point() { return points2point; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3a(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 规格弹窗 "), vue.createCommentVNode(" showClose "), vue.createVNode(_component_su_popup, { show: $setup.show, onClose: $setup.colseWalletModal, type: "center", round: "10" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode("view", { class: "ss-m-t-56 ss-flex-col ss-col-center" }, [ vue.createElementVNode("text", { class: "cicon-check-round" }), !$setup.state.msg ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: "score-title" }, vue.toDisplayString($setup.t("pop.congratulations")), 1 /* TEXT */ ), $setup.state.points && $setup.state.points !== "null" && $setup.points2point($setup.state.points) > 0 || $setup.state.socialStatus && $setup.state.socialStatus !== "null" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ $setup.state.points && $setup.points2point($setup.state.points) > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "model-title ss-flex ss-col-center ss-m-t-15 ss-font-35" }, vue.toDisplayString($setup.t("pop.commission_earned")) + ":" + vue.toDisplayString($setup.points2point($setup.state.points)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $setup.state.socialStatus ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "model-title ss-flex ss-col-center ss-m-t-15 ss-font-35" }, vue.toDisplayString($setup.t("pop.social_value_earned")) + ":" + vue.toDisplayString($setup.state.socialStatus), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "model-title ss-flex ss-col-center ss-m-y-15" }, vue.toDisplayString($setup.t("pop.order_success")), 1 /* TEXT */ )) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "model-title ss-flex ss-col-center ss-m-y-15" }, vue.toDisplayString($setup.state.msg), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "model-bg ss-flex-col ss-col-center ss-row-right" }, [ vue.createElementVNode("view", { class: "ss-m-b-40" }, [ vue.createElementVNode( "button", { class: "ss-reset-button confirm-btn", onClick: _cache[0] || (_cache[0] = ($event) => { $setup.colseWalletModal(); }) }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$3b, [["render", _sfc_render$3a], ["__scopeId", "data-v-bd9b951b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-wallet-modal/s-wallet-modal.vue"]]); const _sfc_main$3a = { __name: "s-signup-modal", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "a1af371b-headerBg": vue.unref(headerBg) })); const headerBg = sheep$1.$url.css("/static/images/sign.png"); const show = vue.computed(() => sheep$1.$store("modal").signUp); const state = vue.computed(() => sheep$1.$store("modal").signUpInfo); vue.watch(() => show.value, (newValue) => { if (newValue) { setTimeout(colseSignUpModal, 3e3); } }); const __returned__ = { headerBg, show, state, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, watch: vue.watch, get sheep() { return sheep$1; }, get t() { return t$6; }, get colseSignUpModal() { return colseSignUpModal; }, get showSignUpModal() { return showSignUpModal; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$39(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 规格弹窗 "), vue.createCommentVNode(" showClose "), vue.createVNode(_component_su_popup, { show: $setup.show, onClose: $setup.colseSignUpModal, type: "center", round: "10" }, { default: vue.withCtx(() => { var _a2, _b2, _c; return [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode("view", { class: "ss-m-t-56 ss-flex-col ss-col-center" }, [ vue.createElementVNode("text", { class: "cicon-check-round" }), vue.createElementVNode( "view", { class: "score-title" }, vue.toDisplayString($setup.t("pop.auto_checkin_success")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "model-title ss-flex ss-col-center ss-m-t-22 ss-m-b-30" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("pop.daily_checkin_reward", { point: (_a2 = $setup.state) == null ? void 0 : _a2.social })) + " ", 1 /* TEXT */ ), vue.createCommentVNode(" 获得每日签到{{state?.social}}点身价 ") ]), ((_b2 = $setup.state) == null ? void 0 : _b2.upgradeOrNot) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "model-title ss-flex ss-col-center ss-m-b-30" }, vue.toDisplayString($setup.t("pop.level_upgraded")) + vue.toDisplayString((_c = $setup.state) == null ? void 0 : _c.socialStatusName), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "model-bg ss-flex-col ss-col-center ss-row-right" }, [ vue.createElementVNode("view", { class: "ss-m-b-40" }, [ vue.createElementVNode( "button", { class: "ss-reset-button confirm-btn", onClick: _cache[0] || (_cache[0] = ($event) => { $setup.colseSignUpModal(); }) }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]) ]) ]; }), _: 1 /* STABLE */ }, 8, ["show", "onClose"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const __easycom_5$2 = /* @__PURE__ */ _export_sfc(_sfc_main$3a, [["render", _sfc_render$39], ["__scopeId", "data-v-a1af371b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-signup-modal/s-signup-modal.vue"]]); var qsCanvas = { exports: {} }; (function(module) { (function() { var _nc; const platform2 = getPlatform(), isUni = platform2 == "uni", isNode = platform2 == "node", isWeb = platform2 == "web", imgCache = {}, vmCache = {}, asyncDrawWhiteList = Object.freeze([ "init", "initAsyncDrawMode", "initArgs", "initCanvas", "handleCtx", "initData", "draw", "toImage", "updateCanvasWH", "clear", "restoreAsyncDrawMode" ]), calcMethods = Object.freeze([ "setPaintbrush", "setPaintbrushProp", "resetPaintbrush", "savePaintbrush", "restorePaintbrush", "calcText", "calcImg", "measureText", "loadImage" ]), asyncDrawMethods = Object.freeze([ "setPaintbrush", "setPaintbrushProp", "resetPaintbrush", "savePaintbrush", "restorePaintbrush", "drawText", "drawStraightLine", "drawDoubleStraightLine", "drawDotted", "drawDottedStraightLine", "drawLine", "drawTextDecoration", "drawImg", "drawQrCode", "setCircle", "setRect" ]), allSelfMethods = Object.freeze([ "setPaintbrush", "setPaintbrushProp", "resetPaintbrush", "savePaintbrush", "restorePaintbrush", "drawText", "drawStraightLine", "drawDoubleStraightLine", "drawDotted", "drawDottedStraightLine", "drawLine", "drawTextDecoration", "drawImg", "drawQrCode", "setCircle", "setRect", "calcText", "calcImg", "measureText", "loadImage", "drawArray", "drawItem" ]), needReturnMethods = Object.freeze(["drawText", "drawImg"]), commonMethods = Object.freeze([ "drawImage", "putImageData", "getImageData", "createImageData", "addPage", "save", "restore", "rotate", "translate", "transform", "getTransform", "resetTransform", "setTransform", "isPointInPath", "scale", "clip", "fill", "stroke", "fillText", "strokeText", "fillRect", "strokeRect", "clearRect", "rect", "measureText", "moveTo", "lineTo", "bezierCurveTo", "quadraticCurveTo", "beginPath", "closePath", "arc", "arcTo", "ellipse", "setLineDash", "getLineDash", "createPattern", "createLinearGradient", "createRadialGradient" ]); let nodeCanvas, id = 1; function notUnd(t2) { return String(t2) != "undefined"; } function isNull(a2) { return !((a2 || a2 == 0) && !["undefined", "null"].includes(String(a2))); } function getPlatform() { if (notUnd(typeof uni)) return "uni"; if (notUnd(typeof window) && notUnd(typeof document)) return "web"; return "node"; } function getCtx(vm, args) { if (isUni) { if (!args.canvasId) { throw new Error("canvasId 不能为空"); } } let canvas, obj = {}; switch (platform2) { case "uni": canvas = uni.createCanvasContext(args.canvasId, vm); obj.canvas = canvas; obj.ctx = canvas; break; case "web": canvas = (args == null ? void 0 : args.canvasId) ? document.getElementById(args == null ? void 0 : args.canvasId) : document.createElement("canvas"); canvas.width = (args == null ? void 0 : args.width) || 10; canvas.height = (args == null ? void 0 : args.height) || 10; obj.canvas = canvas; obj.ctx = canvas.getContext("2d"); break; case "node": canvas = nodeCanvas.createCanvas((args == null ? void 0 : args.width) || 10, (args == null ? void 0 : args.height) || 10); obj.canvas = canvas; obj.ctx = canvas.getContext("2d"); break; } return obj; } const _QSCanvas = class _QSCanvas { constructor(obj, vm) { __privateAdd(this, _nc, void 0); this._id = id++; vmCache[this._id] = vm; if (obj) { this.init(obj); } } init(obj = {}) { this.initArgs(obj).initData().initCanvas().handleCtx().resetPaintbrush(); if (this._data.asyncDrawMode === true) { __privateSet(this, _nc, new _QSCanvas({ asyncDrawMode: false })); this.initAsyncDrawMode(); } } initAsyncDrawMode() { if (isUni) return; const ctxMethods = this._data.ctxMethods; const arr = [.../* @__PURE__ */ new Set([...allSelfMethods, ...ctxMethods])]; for (let i2 = 0; i2 < arr.length; i2++) { const item = arr[i2]; this.handleAsyncDrawModeItem(item); } } handleAsyncDrawModeItem(i2) { if (isUni) return; if (asyncDrawWhiteList.includes(i2)) { formatAppLog("log", "at node_modules/qs-canvas/index.js:124", "白名单跳过"); return; } if (typeof this[i2] == "function") { if (!this._data.nMethods[i2]) this._data.nMethods[i2] = this[i2]; let _this = this; this[i2] = function() { let r2; if (calcMethods.includes(i2)) { r2 = __privateGet(_this, _nc)[i2](...arguments); } if (r2 && r2 !== _this && r2 !== __privateGet(_this, _nc)) return r2; if (asyncDrawMethods.includes(i2) || _this._data.ctxMethods.includes(i2)) { _this._data.asyncDrawQueue.push({ method: i2, args: arguments }); } if (needReturnMethods.includes(i2)) { return __privateGet(_this, _nc)[i2](...arguments); } }; } } restoreAsyncDrawMode() { if (isUni) return; const nMethods = this._data.nMethods; for (const i2 in nMethods) { this[i2] = nMethods[i2]; } } initArgs(obj = {}) { this._args = obj; return this; } initCanvas() { const canvasObj = getCtx(vmCache[this._id], this._args); this.canvas = canvasObj.canvas; this.ctx = canvasObj.ctx; return this; } /** * 使QSCanvas拥有原有方法 */ handleCtx() { const ctx = this.ctx; const active = (i2) => { this._data.ctxMethods.push(i2); this[i2] = ctx[i2].bind(ctx); return; }; for (const i2 in ctx) { if (typeof ctx[i2] == "function") { if (!this[i2]) { active(i2); } } } for (let k = 0; k < commonMethods.length; k++) { const i2 = commonMethods[k]; if (typeof ctx[i2] == "function") { if (!this[i2]) { active(i2); } } } return this; } initData() { this._data = { oldPaintbrushProps: {}, savedPaintbrushProps: [], font: { fontStyle: "normal", fontVariant: "normal", fontWeight: "normal", fontSize: 10, fontFamily: "sans-serif" }, height: this._args.height || 10, width: this._args.width || 10, whChange: false, asyncDrawQueue: [], nMethods: {}, asyncDrawMode: isNode || isWeb ? this._args.asyncDrawMode !== false : false, ctxMethods: [] }; return this; } /** * 设置画笔 */ setPaintbrush(obj = {}) { filterPaintbrushProps(obj); for (const k in obj) { this.setPaintbrushProp(k, obj[k]); } return this; } /** * 设置画笔操作兼容uni */ setPaintbrushProp(prop, data) { if (isNull(prop) || isNull(data)) return; prop = hyphen2Hump(prop); const ctx = this.ctx; if (prop == "font") { if (data) { if (typeof data != "object") { formatAppLog("warn", "at node_modules/qs-canvas/index.js:235", "font属性需Object格式"); return; } for (const k in data) if (isNull(data[k])) delete data[k]; const font = { ...this._data.font, ...data }; if (isUni) font.fontSize = Math.round(font.fontSize); this._data.font = font; const f2 = this._data.font; this._data.oldPaintbrushProps[prop] = f2; const setFont = () => { ctx.font = `${f2.fontStyle || "normal"} ${f2.fontVariant || "normal"} ${f2.fontWeight || "normal"} ${f2.fontSize ?? 10}px ${f2.fontFamily || "sans-serif"}`; }; if (isUni) { setFont(); } else setFont(); } } else { this._data.oldPaintbrushProps[prop] = data; const fnn = "set" + prop[0].toUpperCase() + prop.slice(1); if (typeof (ctx == null ? void 0 : ctx[fnn]) == "function") { ctx[fnn](data); } else { ctx[prop] = data; } } return this; } /** * 重置画笔 */ resetPaintbrush(obj = {}) { this.setPaintbrush({ fillStyle: "#000000", strokeStyle: "#000000", shadowColor: "#000000", shadowBlur: 0, shadowOffsetX: 0, shadowOffsetY: 0, lineCap: "butt", lineJoin: "miter", lineWidth: 1, miterLimit: 10, font: this._data.font, textAlign: "start", textBaseline: "top", globalAlpha: 1, globalCompositeOperation: "source-over", ...obj }); return this; } saveAndSetPaintbrush(paintbrushProps = {}) { this.savePaintbrush(); this.setPaintbrush(paintbrushProps); return this; } /** * 保存画笔设置 */ savePaintbrush() { this._data.savedPaintbrushProps.unshift({ ...this._data.oldPaintbrushProps }); return this; } /** * 恢复上次保存的画笔设置 */ restorePaintbrush() { const savedProps = this._data.savedPaintbrushProps.shift(); if (savedProps) this._data.oldPaintbrushProps = { ...this._data.oldPaintbrushProps, ...savedProps }; this.resetPaintbrush({ ...this._data.oldPaintbrushProps }); return this; } /** * 更新画布宽高 */ updateCanvasWH(obj = {}) { var _a2, _b2, _c; let { width, height, delay } = obj, setCanvasWH = (_a2 = this._args) == null ? void 0 : _a2.setCanvasWH; width = width || ((_b2 = this._data) == null ? void 0 : _b2.width) || 10; height = height || ((_c = this._data) == null ? void 0 : _c.height) || 10; return new Promise((rs2, rj) => { if (isUni) { if (!setCanvasWH || typeof setCanvasWH != "function") { rj("setCanvasWH异常, uni-app 请在初始化时传入setCanvasWH函数"); return; } setCanvasWH({ height, width }); setTimeout(() => { rs2(); }, delay ?? 50); } else { this.canvas.height = height; this.canvas.width = width; rs2(); } }).then((r2) => { if (this._data.width != width || this._data.height != height) { this._data.whChange = true; } this._data.width = width; this._data.height = height; if (!this._data.asyncDrawMode) this.resetPaintbrush(this._data.oldPaintbrushProps); }); } /** * 清除画布内容 */ clear() { this.ctx.clearRect(0, 0, this._data.width || 999999, this._data.height || 999999); return this; } /** * 兼容uni draw */ draw(obj = {}) { const { reserve } = obj; return new Promise((rs2, rj) => { if (isUni) { let done = false; const settimeoutkey = setTimeout(() => { if (!done) { rs2(); } else { clearTimeout(settimeoutkey); } }, 3e3); this.ctx.draw(reserve ?? false, () => { done = true; clearTimeout(settimeoutkey); rs2(); }); } else { if (this._data.asyncDrawMode) { if (reserve !== true) this.clear(); this.restoreAsyncDrawMode(); this.resetPaintbrush(); const arr = this._data.asyncDrawQueue; new Promise(async (resolve, reject) => { for (let i2 = 0; i2 < arr.length; i2++) { const item = arr[i2]; try { const r2 = this[item.method].call(this, ...item.args); if (typeof (r2 == null ? void 0 : r2.then) == "function") await r2; } catch (error2) { reject(error2); return; } } resolve(); }).then(() => { this._data.asyncDrawQueue = []; this.initAsyncDrawMode(); rs2(); }).catch((err) => { this.initAsyncDrawMode(); rj(err); }); } else { rs2(); } } }); } /** * canvas2image */ toImage(obj = {}) { return new Promise((rs2, rj) => { if (isUni) { const canvasId = this._args.canvasId; if (!canvasId) { rj("canvasId不存在"); return; } uni.canvasToTempFilePath({ ...obj, canvasId, success: (r2) => { var _a2; (_a2 = obj.success) == null ? void 0 : _a2.call(obj, r2); rs2(r2.tempFilePath); }, fail: (err) => { var _a2; (_a2 = obj.fail) == null ? void 0 : _a2.call(obj, err); rj(err); } }, vmCache[this._id]); } else { rs2(this.canvas.toDataURL(`image/${["jpg", "jpeg"].includes(obj.fileType) ? "jpeg" : "png"}`, obj.quality ?? 1)); } }); } /** * 计算文字多行 */ calcText(obj = {}) { const line = obj.line || -1; return new Promise((rs2, rj) => { try { let run = function(text, endLine) { let endLineWidth = 0; const textWidth = mt2(text).width; if (endLine) { if (textWidth < obj.maxWidth || text.length < 2) { return { index: text.length, ellipsis: false, width: textWidth }; } else { endLineWidth = mt2("...").width; } } const textWidthEndLineWidth = textWidth + endLineWidth; if (textWidthEndLineWidth < obj.maxWidth || text.length < 2) { return { index: text.length, ellipsis: false, width: textWidthEndLineWidth }; } let loop = true, mid = Math.floor((text.length + 1) / 2), oldMid = 1, mode = "", tw; while (loop) { if (mid <= 1) { loop = false; break; } if (mid > text.length) { mid = text.length; loop = false; break; } const t2 = text.substr(0, mid); tw = mt2(t2).width + endLineWidth; if (tw > obj.maxWidth) { text = t2; if (mode == "xy" && Math.abs(oldMid - mid) < 1) { loop = false; } else { mode = "dy"; oldMid = mid; mid = Math.floor((t2.length + 1) / 2); } } else if (tw == obj.maxWidth) { loop = false; } else { if (mid <= 1 || Math.abs(oldMid - mid) < 1) { loop = false; } else { mode = "xy"; oldMid = mid; mid += Math.floor((text.length - mid) / 2); } } } return { index: mid, ellipsis: endLine, width: tw }; }; this.saveAndSetPaintbrush({ ...obj.paintbrushProps || {} }); const mt2 = this.measureText; let splitTexts = [], str = obj.val, width = 0; const font = { ...this._data.font }; if (obj.maxWidth) { let i2 = 0; while (str.length) { const endLine = line > 0 && splitTexts.length + 1 >= line, { index: len, ellipsis, width: width2 } = run(str, endLine); const txt = str.substr(0, len); splitTexts.push({ ...obj, val: txt, y: i2 ? obj.y + (font.fontSize + (obj.lineHeight || 0)) * i2 : obj.y, width: width2 }); if (endLine) { if (ellipsis) splitTexts[splitTexts.length - 1].val += "..."; str = ""; } else str = str.slice(len); i2++; } width = splitTexts.length == 1 ? splitTexts[0].width : splitTexts.length > 1 ? obj.maxWidth : 0; } else { splitTexts = [obj]; width = mt2(obj.val).width; } this.restorePaintbrush(); rs2({ ...obj, calcTexts: splitTexts, _calc: true, left: obj.x, top: obj.y, right: obj.x + width, bottom: splitTexts[splitTexts.length - 1].y + font.fontSize, width, height: splitTexts[splitTexts.length - 1].y + font.fontSize - obj.y, fontSize: font.fontSize }); } catch (error2) { rj(error2); } }); } /* 绘制 */ /** * 绘制文本 */ drawText(obj = {}) { return new Promise(async (rs2, rj) => { try { if (!obj.val) { formatAppLog("warn", "at node_modules/qs-canvas/index.js:547", `需绘制的文本为空`); rs2(); return; } this.saveAndSetPaintbrush({ ...obj.paintbrushProps || {} }); const ft2 = (obj2) => { this.fillText(obj2.val, obj2.x, obj2.y); }, ftItem = (item) => { ft2(item); if (item.textDecoration) this.drawTextDecoration(item); }; const calcR = obj._calc ? obj : await this.calcText(obj); for (let i2 = 0; i2 < calcR.calcTexts.length; i2++) { ftItem(calcR.calcTexts[i2]); } this.restorePaintbrush(); rs2(calcR); } catch (error2) { rj(error2); } }); } drawStraightLine(obj = {}) { const { x1, y1, x2, y2, paintbrushProps } = obj, ctx = this.ctx; ctx.beginPath(); ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); this.saveAndSetPaintbrush(paintbrushProps || {}); ctx.stroke(); this.restorePaintbrush(); } drawDoubleStraightLine(obj = {}) { let { gap } = obj; gap = gap ?? 1; this.drawStraightLine(obj); this.drawStraightLine({ ...obj, y1: obj.y1 + gap, y2: obj.y2 + gap }); } drawDotted(obj = {}) { this.setCircle(obj); if (obj.clip) obj.clip = false; this.saveAndSetPaintbrush(obj.paintbrushProps || {}); this.ctx.fill(); this.restorePaintbrush(); } drawDottedStraightLine(obj = {}) { let { x1, x2, y1, y2, gap, width, paintbrushProps } = obj; x2 = x2 - width; gap = gap || 1; const len = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); const points = getPoints(x1, y1, x2, y2, Math.floor((len - gap) / (width + gap)), 9999999999); this.saveAndSetPaintbrush(paintbrushProps); this.drawDotted({ x: x1, y: y1, d: width }); for (let i2 = 0; i2 < points.length; i2++) this.drawDotted({ x: points[i2][0], y: points[i2][1], d: width }); this.drawDotted({ x: x2, y: y2, d: width }); this.restorePaintbrush(); } drawLine(obj = {}) { const { style } = obj; switch (style) { case "double": obj.gap = (obj.width || 1) * 1.5; this.drawDoubleStraightLine(obj); break; case "solide": this.drawStraightLine(obj); break; case "dotted": obj.gap = (obj.gap || 1) * 1.5; obj.paintbrushProps = { fillStyle: obj.color }; this.drawDottedStraightLine(obj); break; } } /** * { ...(drawText属性), textDecoration: { line, //类型 同css text-decoration-line color, //线颜色 width, //线宽度 * } * } */ drawTextDecoration(obj = {}) { this.savePaintbrush(); const oldProps = this._data.oldPaintbrushProps, tw = this.measureText(obj.val).width, tD = obj.textDecoration, line = tD.line || "line-through", color = tD.color || obj.color || oldProps.fillStyle || "#000000", width = tD.thickness || tD.width || (obj.fontSize ? obj.fontSize * 0.1 : false) || 1, style = tD.style || "solide", offset = tD.offset || 0, gap = tD.gap ?? 1, fontSize = obj.fontSize || this._data.font.fontSize; this.setPaintbrush({ lineWidth: width, strokeStyle: color }); let y2 = 0; switch (line) { case "line-through": y2 = obj.y + fontSize / 2 - width / 2; break; case "underline": y2 = obj.y + fontSize; break; case "overline": y2 = obj.y; break; } switch (oldProps.textBaseline) { case "top": y2 += width / 2; break; case "bottom": y2 -= fontSize; break; case "center": y2 -= fontSize / 2; break; } y2 += offset; switch (line) { case "line-through": case "underline": case "overline": this.drawLine({ x1: obj.x, y1: y2, x2: obj.x + tw, y2, style, gap, width, color }); break; } this.restorePaintbrush(); } /** * 绘制图片 */ drawImg(obj = {}) { return new Promise(async (rs2, rj) => { try { if (!obj.val) { formatAppLog("warn", "at node_modules/qs-canvas/index.js:687", `需绘制的图片为空`); rs2(); return; } const calcR = obj._calc ? obj : await this.calcImg(obj); if ((calcR == null ? void 0 : calcR.drawImageArgs) && Array.isArray(calcR.drawImageArgs)) this.ctx.drawImage(...(calcR == null ? void 0 : calcR.drawImageArgs) || []); rs2(calcR); } catch (error2) { rj(error2); } }); } calcImg(obj = {}) { return new Promise(async (rs2, rj) => { try { if (!obj.val) { formatAppLog("warn", "at node_modules/qs-canvas/index.js:704", `需绘制的图片为空`); rs2(); return; } const img = await this.loadImage(obj.val), mode = obj.mode || "scaleToFill"; let arr, x = obj.x || 0, y2 = obj.y || 0, w2 = obj.width || 0, h2 = obj.height || 0, sw = img.width, sh = img.height, sx = 0, sy = 0; const get_6 = () => { if (isUni) { } return [sx, sy, sw, sh, x, y2, w2, h2]; }; switch (mode) { case "aspectFit": h2 = img.height / img.width * w2; if (h2 < obj.height) { y2 = Number(obj.y) + obj.height / 2 - h2 / 2; } else { h2 = obj.height; w2 = img.width / img.height * h2; x = Number(obj.x) + obj.width / 2 - w2 / 2; } arr = get_6(); break; case "aspectFill": h2 = img.height / img.width * w2; if (h2 < obj.height) { h2 = obj.height; sx = img.width / img.height * obj.height; sx = (sx - obj.width) / sx * img.width / 2; sw = img.width - sx * 2; } else { sy = (h2 - obj.height) / h2 * img.height / 2; sh = img.height - sy * 2; } w2 = obj.width; h2 = obj.height; arr = get_6(); break; case "widthFix": h2 = obj.height = img.height / img.width * obj.width; arr = [x, y2, w2, h2]; break; case "heightFix": w2 = obj.width = img.width / img.height * obj.height; arr = [x, y2, w2, h2]; break; default: arr = [x, y2, w2, h2]; } arr.unshift(isUni ? img.toString() : img); rs2({ ...obj, drawImageArgs: [...arr], img, left: obj.x, top: obj.y, right: obj.x + obj.width, bottom: obj.y + obj.height, _calc: true }); } catch (error2) { rj(error2); } }); } /** * 绘制二维码 * 诗小柒 的二维码生成器代码 */ drawQrCode(obj = {}) { return new Promise((rs2, rj) => { if (!(obj == null ? void 0 : obj.val)) { formatAppLog("warn", "at node_modules/qs-canvas/index.js:771", "绘制二维码val为空"); rs2(); return; } this.savePaintbrush(); let qrcodeAlgObjCache = []; let options2 = { text: String(obj.val || "") || "", // 生成内容 size: Number(obj.size || 0) || 200, // 二维码大小 background: String(obj.background || "") || "#ffffff", // 背景色 foreground: String(obj.foreground || "") || "#000000", // 前景色 pdground: String(obj.pdground || "") || "#000000", // 定位角点颜色 correctLevel: Number(obj.correctLevel || 0) || 3, // 容错级别 dx: Number(obj.x || 0) || 0, // x轴距离 dy: Number(obj.y || 0) || 0 // y轴距离 }; let qrCodeAlg = null; let d2 = 0; for (var i2 = 0, l2 = qrcodeAlgObjCache.length; i2 < l2; i2++) { d2 = i2; if (qrcodeAlgObjCache[i2].text == options2.text && qrcodeAlgObjCache[i2].text.correctLevel == options2.correctLevel) { qrCodeAlg = qrcodeAlgObjCache[i2].obj; break; } } if (d2 == l2) { qrCodeAlg = new QRCodeAlg(options2.text, options2.correctLevel); qrcodeAlgObjCache.push({ text: options2.text, correctLevel: options2.correctLevel, obj: qrCodeAlg }); } let getForeGround = function(config2) { let options3 = config2.options; if (options3.pdground && (config2.row > 1 && config2.row < 5 && config2.col > 1 && config2.col < 5 || config2.row > config2.count - 6 && config2.row < config2.count - 2 && config2.col > 1 && config2.col < 5 || config2.row > 1 && config2.row < 5 && config2.col > config2.count - 6 && config2.col < config2.count - 2)) { return options3.pdground; } return options3.foreground; }; let count = qrCodeAlg.getModuleCount(); let ratioSize = options2.size; let tileW = ratioSize / count; let tileH = ratioSize / count; for (let row = 0; row < count; row++) { for (let col = 0; col < count; col++) { let w2 = (col + 1) * tileW - col * tileW; let h2 = (row + 1) * tileW - row * tileW; let foreground = getForeGround({ row, col, count, options: options2 }); this.setPaintbrush({ fillStyle: qrCodeAlg.modules[row][col] ? foreground : options2.background }); this.ctx.fillRect(options2.dx + col * tileW, options2.dy + row * tileH, w2, h2); } } this.restorePaintbrush(); rs2({ ...obj, height: obj.size, width: obj.size, left: obj.x, top: obj.y, right: obj.x + obj.width, bottom: obj.y + obj.size }); }); } /** * 圆形 */ setCircle(obj = {}) { const ctx = this.ctx; let { x, y: y2, d: d2, mode } = obj; mode = mode || "leftTop"; const r2 = d2 / 2; if (obj.clip) ctx.save(); ctx.beginPath(); switch (mode) { case "leftTop": ctx.arc(x + r2, y2 + r2, r2, 0, 2 * Math.PI); break; case "center": ctx.arc(x, y2, r2, 0, 2 * Math.PI); break; } ctx.closePath(); if (obj.clip) ctx.clip(); return this; } /** * 矩形 */ setRect(obj = {}) { const ctx = this.ctx; const { x, y: y2, r: r2, height, width } = obj; if (obj.clip) ctx.save(); ctx.beginPath(); if (r2 && r2 > 0) { ctx.arc(x + r2, y2 + r2, r2, 1 * Math.PI, 1.5 * Math.PI); ctx.lineTo(x + width - r2, y2); ctx.arc(x + width - r2, y2 + r2, r2, 1.5 * Math.PI, 0); ctx.lineTo(x + width, y2 + height - r2); ctx.arc(x + width - r2, y2 + height - r2, r2, 0, 0.5 * Math.PI); ctx.lineTo(x + r2, y2 + height); ctx.arc(x + r2, y2 + height - r2, r2, 0.5 * Math.PI, 1 * Math.PI); ctx.lineTo(x, y2 + r2); } else { ctx.moveTo(x, y2); ctx.lineTo(x + width, y2); ctx.lineTo(x + width, y2 + height); ctx.lineTo(x, y2 + height); ctx.lineTo(x, y2); } ctx.closePath(); if (obj.clip) ctx.clip(); return this; } /** * 加载图片 */ loadImage(url2) { return new Promise(async (resolve, reject) => { if (!url2) { formatAppLog("warn", "at node_modules/qs-canvas/index.js:899", "加载图片url为空"); resolve(); return; } if (imgCache[url2]) { resolve(imgCache[url2]); return; } let img; try { switch (platform2) { case "uni": img = await new Promise((rs2, rj) => { if (url2._loaded) { rs2(url2); return; } if (~url2.indexOf("data:image")) { let tempFilePath = url2, imageInfoR = {}; imgTools.base64ToPath(url2).then((t2) => { tempFilePath = t2; uni.getImageInfo({ src: tempFilePath, success: (imgInfo) => { imageInfoR = imgInfo; const uniImg = new String(tempFilePath); for (const i2 in imageInfoR) uniImg[i2] = imageInfoR[i2]; uniImg._loaded = true; rs2(uniImg); }, fail: (err) => rj(err) }); }).catch((err) => { rj(err); }); } else if (url2.substr(0, 4) == "http") { uni.downloadFile({ url: url2, success: ({ tempFilePath }) => { uni.getImageInfo({ src: tempFilePath, success: (imageInfoR) => { const uniImg = new String(tempFilePath); for (const i2 in imageInfoR) uniImg[i2] = imageInfoR[i2]; uniImg._loaded = true; rs2(uniImg); }, fail: (err) => rj(err) }); }, fail: (error2) => rj(error2) }); } else { uni.getImageInfo({ src: url2, success: (imageInfoR) => { const uniImg = new String(url2); for (const i2 in imageInfoR) uniImg[i2] = imageInfoR[i2]; uniImg._loaded = true; rs2(uniImg); }, fail: (err) => rj(err) }); } }); break; case "web": img = await new Promise((rs2, rj) => { if (typeof url2 != "string") { rs2(url2); return; } const imgObj = new Image(); imgObj.onload = () => { rs2(imgObj); }; imgObj.onerror = (err) => { rj(err); }; imgObj.src = url2; }); break; case "node": img = await new Promise((rs2, rj) => { if (typeof url2 != "string") { rs2(url2); return; } nodeCanvas.loadImage(url2).then((res) => { rs2(res); }).catch((err) => { rj(err); }); }); break; } } catch (error2) { reject(error2); } imgCache[url2] = img; resolve(img); }); } drawArray(data) { return new Promise(async (rs2, rj) => { try { if (!data) { rj("drawArray需绘制参数不存在"); return; } if (!Array.isArray(data)) { rj("drawArray参数需要是Array"); return; } data = [...data].sort((a2, b2) => ((a2 == null ? void 0 : a2.zIndex) ?? 0) - ((b2 == null ? void 0 : b2.zIndex) ?? 0)); const arr = []; for (let i2 = 0; i2 < data.length; i2++) { const item = data[i2]; let r2; switch (typeof item) { case "function": r2 = item(); if (typeof (r2 == null ? void 0 : r2.then) == "function") r2 = await r2; break; case "object": if (Array.isArray(item)) r2 = await this.drawArray(item); else r2 = await this.drawItem(item); break; } arr.push({ item, result: r2 }); } rs2(arr); } catch (error2) { rj(error2); } }); } drawItem(obj = {}) { return new Promise(async (rs2, rj) => { var _a2, _b2; try { let r2; switch (obj.type) { case "text": r2 = await this.drawText(obj); break; case "image": r2 = await this.drawImg(obj); break; case "qrcode": r2 = await this.drawQrCode(obj); break; case "method": r2 = (_a2 = this[obj.name]) == null ? void 0 : _a2.call(this, ...obj.data ? Array.isArray(obj.data) ? obj.data : [obj.data] : []); if (typeof (r2 == null ? void 0 : r2.then) == "function") r2 = await r2; break; case "function": r2 = (_b2 = obj.val) == null ? void 0 : _b2.call(obj); if (typeof (r2 == null ? void 0 : r2.then) == "function") r2 = await r2; break; } rs2(r2); } catch (error2) { rj(error2); } }); } drawRichText(html) { return new Promise(async (rs2, rj) => { if (!html) { rj("drawRichText需绘制参数不存在"); return; } if (typeof html == "string") html = htmlParse(html); const result2 = []; function run(arr, parent2) { return new Promise(async (res, rej) => { var _a2; for (let i2 = 0; i2 < arr.length; i2++) { const item = arr[i2]; if (item.type == "text") ; else { switch (item.name) { } } result2.push(item); if ((_a2 = item.children) == null ? void 0 : _a2.length) { item.__handle = function(obj) { }; try { await run(item.children, item); } catch (error2) { rej(error2); return; } } } res(result2); }); } try { rs2({ html, htmlParses: await run(html) }); } catch (error2) { rj(error2); } }); } }; _nc = new WeakMap(); let QSCanvas2 = _QSCanvas; function filterPaintbrushProps(obj) { switch (obj == null ? void 0 : obj.textBaseline) { case "normal": if (isUni) obj.textBaseline = "alphabetic"; break; case "hanging": if (isUni) obj.textBaseline = "top"; break; case "ideographic": if (isUni) obj.textBaseline = "bottom"; break; } switch (obj == null ? void 0 : obj.textAlign) { case "start": obj.textAlign = "left"; break; case "end": obj.textAlign = "right"; break; } } function hyphen2Hump(s2) { if (!s2) return ""; const arr = s2.split("-"); for (var i2 = 1; i2 < arr.length; i2++) { arr[i2] = arr[i2].charAt(0).toUpperCase() + arr[i2].substring(1); } return arr.join(""); } function getPoints(x1, y1, x2, y2, pointCount, level) { let a2, b2, rSquare, k, kv, points = []; if (x1 === x2) { a2 = x1 + (y2 - y1) * level; b2 = y1 + (y2 - y1) / 2; rSquare = (x1 - a2) ** 2 + (y1 - b2) ** 2; } else if (y1 === y2) { a2 = x1 + (x2 - x1) / 2; b2 = y1 - (x2 - x1) * level; rSquare = (x1 - a2) ** 2 + (y1 - b2) ** 2; } else { let xc = (x1 + x2) / 2, yc = (y1 + y2) / 2, lenSquare = ((x2 - x1) ** 2 + (y2 - y1) ** 2) * level ** 2; k = (x2 - x1) / (y1 - y2); let l2 = yc - k * xc; let a1 = 1 + k ** 2, b1 = 2 * k * (l2 - yc) - 2 * xc, c1 = xc ** 2 + (l2 - yc) ** 2 - lenSquare; kv = -1 / k; a2 = (-b1 + Math.sqrt(b1 ** 2 - 4 * a1 * c1) * (kv > 0 && x2 > x1 || kv < 0 && x2 < x1 ? 1 : -1)) / (2 * a1); b2 = k * a2 + l2; rSquare = (x1 - a2) ** 2 + (y1 - b2) ** 2; } if (x1 === x2 || Math.abs(kv) > 1) { let yDistance = y2 - y1; let yDis = yDistance / (pointCount + 1); for (let i2 = 0; i2 < pointCount; i2++) { let y3 = y1 + yDis * (i2 + 1); let x = Math.sqrt(rSquare - (y3 - b2) ** 2) * (y2 > y1 ? -1 : 1) + a2; points.push([x, y3]); } } else { let xDistance = x2 - x1; let xDis = xDistance / (pointCount + 1); for (let i2 = 0; i2 < pointCount; i2++) { let x = x1 + xDis * (i2 + 1); let y3 = Math.sqrt(rSquare - (x - a2) ** 2) * (x2 > x1 ? 1 : -1) + b2; points.push([x, y3]); } } return points; } var QRCodeAlg = function() { function unicodeFormat8(code2) { var c0, c1, c2; if (code2 < 128) { return [code2]; } else if (code2 < 2048) { c0 = 192 + (code2 >> 6); c1 = 128 + (code2 & 63); return [c0, c1]; } else { c0 = 224 + (code2 >> 12); c1 = 128 + (code2 >> 6 & 63); c2 = 128 + (code2 & 63); return [c0, c1, c2]; } } function getUTF8Bytes(string) { var utf8codes = []; for (var i3 = 0; i3 < string.length; i3++) { var code2 = string.charCodeAt(i3); var utf8 = unicodeFormat8(code2); for (var j2 = 0; j2 < utf8.length; j2++) { utf8codes.push(utf8[j2]); } } return utf8codes; } function QRCodeAlg2(data, errorCorrectLevel) { this.typeNumber = -1; this.errorCorrectLevel = errorCorrectLevel; this.modules = null; this.moduleCount = 0; this.dataCache = null; this.rsBlocks = null; this.totalDataCount = -1; this.data = data; this.utf8bytes = getUTF8Bytes(data); this.make(); } QRCodeAlg2.prototype = { constructor: QRCodeAlg2, getModuleCount: function() { return this.moduleCount; }, make: function() { this.getRightType(); this.dataCache = this.createData(); this.createQrcode(); }, makeImpl: function(maskPattern) { this.moduleCount = this.typeNumber * 4 + 17; this.modules = new Array(this.moduleCount); for (var row = 0; row < this.moduleCount; row++) { this.modules[row] = new Array(this.moduleCount); } this.setupPositionProbePattern(0, 0); this.setupPositionProbePattern(this.moduleCount - 7, 0); this.setupPositionProbePattern(0, this.moduleCount - 7); this.setupPositionAdjustPattern(); this.setupTimingPattern(); this.setupTypeInfo(true, maskPattern); if (this.typeNumber >= 7) { this.setupTypeNumber(true); } this.mapData(this.dataCache, maskPattern); }, setupPositionProbePattern: function(row, col) { for (var r2 = -1; r2 <= 7; r2++) { if (row + r2 <= -1 || this.moduleCount <= row + r2) continue; for (var c2 = -1; c2 <= 7; c2++) { if (col + c2 <= -1 || this.moduleCount <= col + c2) continue; if (0 <= r2 && r2 <= 6 && (c2 == 0 || c2 == 6) || 0 <= c2 && c2 <= 6 && (r2 == 0 || r2 == 6) || 2 <= r2 && r2 <= 4 && 2 <= c2 && c2 <= 4) { this.modules[row + r2][col + c2] = true; } else { this.modules[row + r2][col + c2] = false; } } } }, createQrcode: function() { var minLostPoint = 0; var pattern2 = 0; var bestModules = null; for (var i3 = 0; i3 < 8; i3++) { this.makeImpl(i3); var lostPoint = QRUtil.getLostPoint(this); if (i3 == 0 || minLostPoint > lostPoint) { minLostPoint = lostPoint; pattern2 = i3; bestModules = this.modules; } } this.modules = bestModules; this.setupTypeInfo(false, pattern2); if (this.typeNumber >= 7) { this.setupTypeNumber(false); } }, setupTimingPattern: function() { for (var r2 = 8; r2 < this.moduleCount - 8; r2++) { if (this.modules[r2][6] != null) { continue; } this.modules[r2][6] = r2 % 2 == 0; if (this.modules[6][r2] != null) { continue; } this.modules[6][r2] = r2 % 2 == 0; } }, setupPositionAdjustPattern: function() { var pos = QRUtil.getPatternPosition(this.typeNumber); for (var i3 = 0; i3 < pos.length; i3++) { for (var j2 = 0; j2 < pos.length; j2++) { var row = pos[i3]; var col = pos[j2]; if (this.modules[row][col] != null) { continue; } for (var r2 = -2; r2 <= 2; r2++) { for (var c2 = -2; c2 <= 2; c2++) { if (r2 == -2 || r2 == 2 || c2 == -2 || c2 == 2 || r2 == 0 && c2 == 0) { this.modules[row + r2][col + c2] = true; } else { this.modules[row + r2][col + c2] = false; } } } } } }, setupTypeNumber: function(test2) { var bits = QRUtil.getBCHTypeNumber(this.typeNumber); for (var i3 = 0; i3 < 18; i3++) { var mod = !test2 && (bits >> i3 & 1) == 1; this.modules[Math.floor(i3 / 3)][i3 % 3 + this.moduleCount - 8 - 3] = mod; this.modules[i3 % 3 + this.moduleCount - 8 - 3][Math.floor(i3 / 3)] = mod; } }, setupTypeInfo: function(test2, maskPattern) { var data = QRErrorCorrectLevel[this.errorCorrectLevel] << 3 | maskPattern; var bits = QRUtil.getBCHTypeInfo(data); for (var i3 = 0; i3 < 15; i3++) { var mod = !test2 && (bits >> i3 & 1) == 1; if (i3 < 6) { this.modules[i3][8] = mod; } else if (i3 < 8) { this.modules[i3 + 1][8] = mod; } else { this.modules[this.moduleCount - 15 + i3][8] = mod; } var mod = !test2 && (bits >> i3 & 1) == 1; if (i3 < 8) { this.modules[8][this.moduleCount - i3 - 1] = mod; } else if (i3 < 9) { this.modules[8][15 - i3 - 1 + 1] = mod; } else { this.modules[8][15 - i3 - 1] = mod; } } this.modules[this.moduleCount - 8][8] = !test2; }, createData: function() { var buffer = new QRBitBuffer(); var lengthBits = this.typeNumber > 9 ? 16 : 8; buffer.put(4, 4); buffer.put(this.utf8bytes.length, lengthBits); for (var i3 = 0, l2 = this.utf8bytes.length; i3 < l2; i3++) { buffer.put(this.utf8bytes[i3], 8); } if (buffer.length + 4 <= this.totalDataCount * 8) { buffer.put(0, 4); } while (buffer.length % 8 != 0) { buffer.putBit(false); } while (true) { if (buffer.length >= this.totalDataCount * 8) { break; } buffer.put(QRCodeAlg2.PAD0, 8); if (buffer.length >= this.totalDataCount * 8) { break; } buffer.put(QRCodeAlg2.PAD1, 8); } return this.createBytes(buffer); }, createBytes: function(buffer) { var offset = 0; var maxDcCount = 0; var maxEcCount = 0; var length = this.rsBlock.length / 3; var rsBlocks = new Array(); for (var i3 = 0; i3 < length; i3++) { var count = this.rsBlock[i3 * 3 + 0]; var totalCount = this.rsBlock[i3 * 3 + 1]; var dataCount = this.rsBlock[i3 * 3 + 2]; for (var j2 = 0; j2 < count; j2++) { rsBlocks.push([dataCount, totalCount]); } } var dcdata = new Array(rsBlocks.length); var ecdata = new Array(rsBlocks.length); for (var r2 = 0; r2 < rsBlocks.length; r2++) { var dcCount = rsBlocks[r2][0]; var ecCount = rsBlocks[r2][1] - dcCount; maxDcCount = Math.max(maxDcCount, dcCount); maxEcCount = Math.max(maxEcCount, ecCount); dcdata[r2] = new Array(dcCount); for (var i3 = 0; i3 < dcdata[r2].length; i3++) { dcdata[r2][i3] = 255 & buffer.buffer[i3 + offset]; } offset += dcCount; var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); var rawPoly = new QRPolynomial(dcdata[r2], rsPoly.getLength() - 1); var modPoly = rawPoly.mod(rsPoly); ecdata[r2] = new Array(rsPoly.getLength() - 1); for (var i3 = 0; i3 < ecdata[r2].length; i3++) { var modIndex = i3 + modPoly.getLength() - ecdata[r2].length; ecdata[r2][i3] = modIndex >= 0 ? modPoly.get(modIndex) : 0; } } var data = new Array(this.totalDataCount); var index2 = 0; for (var i3 = 0; i3 < maxDcCount; i3++) { for (var r2 = 0; r2 < rsBlocks.length; r2++) { if (i3 < dcdata[r2].length) { data[index2++] = dcdata[r2][i3]; } } } for (var i3 = 0; i3 < maxEcCount; i3++) { for (var r2 = 0; r2 < rsBlocks.length; r2++) { if (i3 < ecdata[r2].length) { data[index2++] = ecdata[r2][i3]; } } } return data; }, mapData: function(data, maskPattern) { var inc = -1; var row = this.moduleCount - 1; var bitIndex = 7; var byteIndex = 0; for (var col = this.moduleCount - 1; col > 0; col -= 2) { if (col == 6) col--; while (true) { for (var c2 = 0; c2 < 2; c2++) { if (this.modules[row][col - c2] == null) { var dark = false; if (byteIndex < data.length) { dark = (data[byteIndex] >>> bitIndex & 1) == 1; } var mask = QRUtil.getMask(maskPattern, row, col - c2); if (mask) { dark = !dark; } this.modules[row][col - c2] = dark; bitIndex--; if (bitIndex == -1) { byteIndex++; bitIndex = 7; } } } row += inc; if (row < 0 || this.moduleCount <= row) { row -= inc; inc = -inc; break; } } } } }; QRCodeAlg2.PAD0 = 236; QRCodeAlg2.PAD1 = 17; var QRErrorCorrectLevel = [1, 0, 3, 2]; var QRMaskPattern = { PATTERN000: 0, PATTERN001: 1, PATTERN010: 2, PATTERN011: 3, PATTERN100: 4, PATTERN101: 5, PATTERN110: 6, PATTERN111: 7 }; var QRUtil = { PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0, G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0, G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1, getBCHTypeInfo: function(data) { var d2 = data << 10; while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { d2 ^= QRUtil.G15 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15); } return (data << 10 | d2) ^ QRUtil.G15_MASK; }, getBCHTypeNumber: function(data) { var d2 = data << 12; while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { d2 ^= QRUtil.G18 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18); } return data << 12 | d2; }, getBCHDigit: function(data) { var digit = 0; while (data != 0) { digit++; data >>>= 1; } return digit; }, getPatternPosition: function(typeNumber) { return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; }, getMask: function(maskPattern, i3, j2) { switch (maskPattern) { case QRMaskPattern.PATTERN000: return (i3 + j2) % 2 == 0; case QRMaskPattern.PATTERN001: return i3 % 2 == 0; case QRMaskPattern.PATTERN010: return j2 % 3 == 0; case QRMaskPattern.PATTERN011: return (i3 + j2) % 3 == 0; case QRMaskPattern.PATTERN100: return (Math.floor(i3 / 2) + Math.floor(j2 / 3)) % 2 == 0; case QRMaskPattern.PATTERN101: return i3 * j2 % 2 + i3 * j2 % 3 == 0; case QRMaskPattern.PATTERN110: return (i3 * j2 % 2 + i3 * j2 % 3) % 2 == 0; case QRMaskPattern.PATTERN111: return (i3 * j2 % 3 + (i3 + j2) % 2) % 2 == 0; default: throw new Error("bad maskPattern:" + maskPattern); } }, getErrorCorrectPolynomial: function(errorCorrectLength) { var a2 = new QRPolynomial([1], 0); for (var i3 = 0; i3 < errorCorrectLength; i3++) { a2 = a2.multiply(new QRPolynomial([1, QRMath.gexp(i3)], 0)); } return a2; }, getLostPoint: function(qrCode) { var moduleCount = qrCode.getModuleCount(), lostPoint = 0, darkCount = 0; for (var row = 0; row < moduleCount; row++) { var sameCount = 0; var head = qrCode.modules[row][0]; for (var col = 0; col < moduleCount; col++) { var current = qrCode.modules[row][col]; if (col < moduleCount - 6) { if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) { if (col < moduleCount - 10) { if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) { lostPoint += 40; } } else if (col > 3) { if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) { lostPoint += 40; } } } } if (row < moduleCount - 1 && col < moduleCount - 1) { var count = 0; if (current) count++; if (qrCode.modules[row + 1][col]) count++; if (qrCode.modules[row][col + 1]) count++; if (qrCode.modules[row + 1][col + 1]) count++; if (count == 0 || count == 4) { lostPoint += 3; } } if (head ^ current) { sameCount++; } else { head = current; if (sameCount >= 5) { lostPoint += 3 + sameCount - 5; } sameCount = 1; } if (current) { darkCount++; } } } for (var col = 0; col < moduleCount; col++) { var sameCount = 0; var head = qrCode.modules[0][col]; for (var row = 0; row < moduleCount; row++) { var current = qrCode.modules[row][col]; if (row < moduleCount - 6) { if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) { if (row < moduleCount - 10) { if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) { lostPoint += 40; } } else if (row > 3) { if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) { lostPoint += 40; } } } } if (head ^ current) { sameCount++; } else { head = current; if (sameCount >= 5) { lostPoint += 3 + sameCount - 5; } sameCount = 1; } } } var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; lostPoint += ratio * 10; return lostPoint; } }; var QRMath = { glog: function(n2) { if (n2 < 1) { throw new Error("glog(" + n2 + ")"); } return QRMath.LOG_TABLE[n2]; }, gexp: function(n2) { while (n2 < 0) { n2 += 255; } while (n2 >= 256) { n2 -= 255; } return QRMath.EXP_TABLE[n2]; }, EXP_TABLE: new Array(256), LOG_TABLE: new Array(256) }; for (var i2 = 0; i2 < 8; i2++) { QRMath.EXP_TABLE[i2] = 1 << i2; } for (var i2 = 8; i2 < 256; i2++) { QRMath.EXP_TABLE[i2] = QRMath.EXP_TABLE[i2 - 4] ^ QRMath.EXP_TABLE[i2 - 5] ^ QRMath.EXP_TABLE[i2 - 6] ^ QRMath.EXP_TABLE[i2 - 8]; } for (var i2 = 0; i2 < 255; i2++) { QRMath.LOG_TABLE[QRMath.EXP_TABLE[i2]] = i2; } function QRPolynomial(num, shift) { if (num.length == void 0) { throw new Error(num.length + "/" + shift); } var offset = 0; while (offset < num.length && num[offset] == 0) { offset++; } this.num = new Array(num.length - offset + shift); for (var i3 = 0; i3 < num.length - offset; i3++) { this.num[i3] = num[i3 + offset]; } } QRPolynomial.prototype = { get: function(index2) { return this.num[index2]; }, getLength: function() { return this.num.length; }, multiply: function(e2) { var num = new Array(this.getLength() + e2.getLength() - 1); for (var i3 = 0; i3 < this.getLength(); i3++) { for (var j2 = 0; j2 < e2.getLength(); j2++) { num[i3 + j2] ^= QRMath.gexp(QRMath.glog(this.get(i3)) + QRMath.glog(e2.get(j2))); } } return new QRPolynomial(num, 0); }, mod: function(e2) { var tl = this.getLength(), el = e2.getLength(); if (tl - el < 0) { return this; } var num = new Array(tl); for (var i3 = 0; i3 < tl; i3++) { num[i3] = this.get(i3); } while (num.length >= el) { var ratio = QRMath.glog(num[0]) - QRMath.glog(e2.get(0)); for (var i3 = 0; i3 < e2.getLength(); i3++) { num[i3] ^= QRMath.gexp(QRMath.glog(e2.get(i3)) + ratio); } while (num[0] == 0) { num.shift(); } } return new QRPolynomial(num, 0); } }; var RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]]; QRCodeAlg2.prototype.getRightType = function() { for (var typeNumber = 1; typeNumber < 41; typeNumber++) { var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel]; if (rsBlock == void 0) { throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel); } var length = rsBlock.length / 3; var totalDataCount = 0; for (var i3 = 0; i3 < length; i3++) { var count = rsBlock[i3 * 3 + 0]; var dataCount = rsBlock[i3 * 3 + 2]; totalDataCount += dataCount * count; } var lengthBytes = typeNumber > 9 ? 2 : 1; if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) { this.typeNumber = typeNumber; this.rsBlock = rsBlock; this.totalDataCount = totalDataCount; break; } } }; function QRBitBuffer() { this.buffer = new Array(); this.length = 0; } QRBitBuffer.prototype = { get: function(index2) { var bufIndex = Math.floor(index2 / 8); return this.buffer[bufIndex] >>> 7 - index2 % 8 & 1; }, put: function(num, length) { for (var i3 = 0; i3 < length; i3++) { this.putBit(num >>> length - i3 - 1 & 1); } }, putBit: function(bit) { var bufIndex = Math.floor(this.length / 8); if (this.buffer.length <= bufIndex) { this.buffer.push(0); } if (bit) { this.buffer[bufIndex] |= 128 >>> this.length % 8; } this.length++; } }; return QRCodeAlg2; }(); var htmlParse = function() { var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; var empty2 = makeMap2("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"); var block = makeMap2("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"); var inline = makeMap2("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"); var closeSelf = makeMap2("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); var fillAttrs = makeMap2("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"); var special = makeMap2("script,style"); function HTMLParser(html, handler) { var index2; var chars; var match; var stack = []; var last = html; stack.last = function() { return this[this.length - 1]; }; while (html) { chars = true; if (!stack.last() || !special[stack.last()]) { if (html.indexOf(""); if (index2 >= 0) { if (handler.comment) { handler.comment(html.substring(4, index2)); } html = html.substring(index2 + 3); chars = false; } } else if (html.indexOf("]*>"), function(all, text2) { text2 = text2.replace(/|/g, "$1$2"); if (handler.chars) { handler.chars(text2); } return ""; }); parseEndTag("", stack.last()); } if (html == last) { throw "Parse Error: " + html; } last = html; } parseEndTag(); function parseStartTag(tag, tagName, rest, unary) { tagName = tagName.toLowerCase(); if (block[tagName]) { while (stack.last() && inline[stack.last()]) { parseEndTag("", stack.last()); } } if (closeSelf[tagName] && stack.last() == tagName) { parseEndTag("", tagName); } unary = empty2[tagName] || !!unary; if (!unary) { stack.push(tagName); } if (handler.start) { var attrs = []; rest.replace(attr, function(match2, name2) { var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name2] ? name2 : ""; attrs.push({ name: name2, value, escaped: value.replace(/(^|[^\\])"/g, '$1\\"') }); }); if (handler.start) { handler.start(tagName, attrs, unary); } } } function parseEndTag(tag, tagName) { if (!tagName) { var pos = 0; } else { for (var pos = stack.length - 1; pos >= 0; pos--) { if (stack[pos] == tagName) { break; } } } if (pos >= 0) { for (var i2 = stack.length - 1; i2 >= pos; i2--) { if (handler.end) { handler.end(stack[i2]); } } stack.length = pos; } } } function makeMap2(str) { var obj = {}; var items = str.split(","); for (var i2 = 0; i2 < items.length; i2++) { obj[items[i2]] = true; } return obj; } function removeDOCTYPE(html) { return html.replace(/<\?xml.*\?>\n/, "").replace(/\n/, "").replace(/\n/, ""); } function parseAttrs(attrs) { return attrs.reduce(function(pre, attr2) { var value = attr2.value; var name2 = attr2.name; if (pre[name2]) { pre[name2] = pre[name2] + " " + value; } else { pre[name2] = value; } return pre; }, {}); } function parseHtml(html) { html = removeDOCTYPE(html); var stacks = []; var results = { node: "root", children: [] }; HTMLParser(html, { start: function start(tag, attrs, unary) { var node2 = { name: tag }; if (attrs.length !== 0) { node2.attrs = parseAttrs(attrs); } if (unary) { var parent2 = stacks[0] || results; if (!parent2.children) { parent2.children = []; } parent2.children.push(node2); } else { stacks.unshift(node2); } }, end: function end(tag) { var node2 = stacks.shift(); if (node2.name !== tag) formatAppLog("error", "at node_modules/qs-canvas/index.js:1260", "invalid state: mismatch end tag"); if (stacks.length === 0) { results.children.push(node2); } else { var parent2 = stacks[0]; if (!parent2.children) { parent2.children = []; } parent2.children.push(node2); } }, chars: function chars(text) { var node2 = { type: "text", text }; if (stacks.length === 0) { results.children.push(node2); } else { var parent2 = stacks[0]; if (!parent2.children) { parent2.children = []; } parent2.children.push(node2); } }, comment: function comment(text) { var node2 = { node: "comment", text }; var parent2 = stacks[0]; if (!parent2.children) { parent2.children = []; } parent2.children.push(node2); } }); return results.children; } return parseHtml; }(); var imgTools = /* @__PURE__ */ function() { function getLocalFilePath(path) { if (path.indexOf("_www") === 0 || path.indexOf("_doc") === 0 || path.indexOf("_documents") === 0 || path.indexOf("_downloads") === 0) { return path; } if (path.indexOf("file://") === 0) { return path; } if (path.indexOf("/storage/emulated/0/") === 0) { return path; } if (path.indexOf("/") === 0) { var localFilePath = plus.io.convertAbsoluteFileSystem(path); if (localFilePath !== path) { return localFilePath; } else { path = path.substr(1); } } return "_www/" + path; } function dataUrlToBase64(str) { var array2 = str.split(","); return array2[array2.length - 1]; } var index2 = 0; function getNewFileId() { return Date.now() + String(index2++); } function biggerThan(v1, v2) { var v1Array = v1.split("."); var v2Array = v2.split("."); var update = false; for (var index3 = 0; index3 < v2Array.length; index3++) { var diff = v1Array[index3] - v2Array[index3]; if (diff !== 0) { update = diff > 0; break; } } return update; } function pathToBase64(path) { return new Promise(function(resolve, reject) { if (typeof window === "object" && "document" in window) { if (typeof FileReader === "function") { var xhr = new XMLHttpRequest(); xhr.open("GET", path, true); xhr.responseType = "blob"; xhr.onload = function() { if (this.status === 200) { let fileReader = new FileReader(); fileReader.onload = function(e2) { resolve(e2.target.result); }; fileReader.onerror = reject; fileReader.readAsDataURL(this.response); } }; xhr.onerror = reject; xhr.send(); return; } var canvas = document.createElement("canvas"); var c2x = canvas.getContext("2d"); var img = new Image(); img.onload = function() { canvas.width = img.width; canvas.height = img.height; c2x.drawImage(img, 0, 0); resolve(canvas.toDataURL()); canvas.height = canvas.width = 0; }; img.onerror = reject; img.src = path; return; } if (typeof plus === "object") { plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { entry.file(function(file) { var fileReader = new plus.io.FileReader(); fileReader.onload = function(data) { resolve(data.target.result); }; fileReader.onerror = function(error2) { reject(error2); }; fileReader.readAsDataURL(file); }, function(error2) { reject(error2); }); }, function(error2) { reject(error2); }); return; } if (typeof wx === "object" && wx.canIUse("getFileSystemManager")) { wx.getFileSystemManager().readFile({ filePath: path, encoding: "base64", success: function(res) { resolve("data:image/png;base64," + res.data); }, fail: function(error2) { reject(error2); } }); return; } reject(new Error("not support")); }); } function base64ToPath(base64) { return new Promise(function(resolve, reject) { if (typeof window === "object" && "document" in window) { base64 = base64.split(","); var type = base64[0].match(/:(.*?);/)[1]; var str = atob(base64[1]); var n2 = str.length; var array2 = new Uint8Array(n2); while (n2--) { array2[n2] = str.charCodeAt(n2); } return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array2], { type }))); } var extName = base64.split(",")[0].match(/data\:\S+\/(\S+);/); if (extName) { extName = extName[1]; } else { reject(new Error("base64 error")); } var fileName = getNewFileId() + "." + extName; if (typeof plus === "object") { var basePath = "_doc"; var dirPath = "uniapp_temp"; var filePath = basePath + "/" + dirPath + "/" + fileName; if (!biggerThan(plus.os.name === "Android" ? "1.9.9.80627" : "1.9.9.80472", plus.runtime.innerVersion)) { plus.io.resolveLocalFileSystemURL(basePath, function(entry) { entry.getDirectory(dirPath, { create: true, exclusive: false }, function(entry2) { entry2.getFile(fileName, { create: true, exclusive: false }, function(entry3) { entry3.createWriter(function(writer) { writer.onwrite = function() { resolve(filePath); }; writer.onerror = reject; writer.seek(0); writer.writeAsBinary(dataUrlToBase64(base64)); }, reject); }, reject); }, reject); }, reject); return; } var bitmap = new plus.nativeObj.Bitmap(fileName); bitmap.loadBase64Data(base64, function() { bitmap.save(filePath, {}, function() { bitmap.clear(); resolve(filePath); }, function(error2) { bitmap.clear(); reject(error2); }); }, function(error2) { bitmap.clear(); reject(error2); }); return; } function getEnvPath() { var _a2, _b2, _c, _d, _e2, _f; if (typeof my === "object" && ((_a2 = my == null ? void 0 : my.env) == null ? void 0 : _a2.USER_DATA_PATH)) { return my.env.USER_DATA_PATH; } if (typeof swan === "object" && ((_b2 = swan == null ? void 0 : swan.env) == null ? void 0 : _b2.USER_DATA_PATH)) { return swan.env.USER_DATA_PATH; } if (typeof tt === "object" && ((_c = tt == null ? void 0 : tt.env) == null ? void 0 : _c.USER_DATA_PATH)) { return tt.env.USER_DATA_PATH; } if (typeof qq === "object" && ((_d = qq == null ? void 0 : qq.env) == null ? void 0 : _d.USER_DATA_PATH)) { return qq.env.USER_DATA_PATH; } if (typeof qh === "object" && ((_e2 = qh == null ? void 0 : qh.env) == null ? void 0 : _e2.USER_DATA_PATH)) { return qh.env.USER_DATA_PATH; } if (typeof wx === "object" && ((_f = wx == null ? void 0 : wx.env) == null ? void 0 : _f.USER_DATA_PATH)) { return wx.env.USER_DATA_PATH; } return "https://user"; } try { var filePath = getEnvPath() + "/" + fileName; uni.getFileSystemManager().writeFile({ filePath, data: dataUrlToBase64(base64), encoding: "base64", success: function() { resolve(filePath); }, fail: function(error2) { reject(error2); } }); } catch (e2) { reject(new Error("not support")); } }); } return { pathToBase64, base64ToPath }; }(); if (notUnd("object")) { module.exports = QSCanvas2; } return QSCanvas2; })(); })(qsCanvas); var qsCanvasExports = qsCanvas.exports; const QSCanvas = /* @__PURE__ */ getDefaultExportFromCjs(qsCanvasExports); var define_import_meta_env_default = { SHOPRO_VERSION: "v1.8.3", SHOPRO_BASE_URL: "https://zxgz.newfeifan.cn", SHOPRO_DEV_BASE_URL: "https://zxgz.newfeifan.cn", SHOPRO_API_PATH: "/app-api", SHOPRO_DEV_PORT: "3000", SHOPRO_STATIC_URL: "http://localhost", SHOPRO_MPLIVE_ON: "0", BASE_URL: "/", MODE: "development", DEV: true, PROD: false, SSR: false }; const _sfc_main$39 = { __name: "s-follow-modal", setup(__props, { expose: __expose }) { __expose(); const show = vue.computed(() => sheep$1.$store("modal").subscribe); const imagePath = vue.ref(""); async function drawQrCode(url2) { formatAppLog("log", "at sheep/components/s-follow-modal/s-follow-modal.vue:47", url2); const qsc = new QSCanvas({ canvasId: "myCanvas", width: 300, height: 300, setCanvasWH: (canvas) => { canvas.width = 300; canvas.height = 300; } }); await qsc.drawQrCode({ val: url2, // 二维码内容 x: 25, y: 15, size: 250, // 二维码大小 background: "#ffffff", // 背景色 foreground: "#000000", // 前景色 pdground: "#000000", // 定位角点颜色 correctLevel: 3 // 容错级别 }); const qrY = 15; const qrHeight = 250; const textX = 300 / 2; const textY = qrY + qrHeight + 15; await qsc.drawText({ val: t$6("pop.long_press_qrcode_follow"), // 文字内容 x: textX, y: textY, maxWidth: 250, // 文字的最大宽度,确保文字不会超出画布 paintbrushProps: { fillStyle: "#333", // 文字颜色 textAlign: "center", // 文字水平居中 textBaseline: "middle", // 文字垂直居中 font: { // 字体属性以对象格式传递 fontStyle: "normal", // 字体样式 fontVariant: "normal", // 字体变体 fontWeight: "normal", // 字体粗细 fontSize: 14, // 字体大小 fontFamily: "sans-serif" // 字体系列 } } }); await qsc.draw(); const imagePathData = await qsc.toImage(); if (imagePathData) { imagePath.value = imagePathData; } } function createQrcode() { let SHOPRO_DEV_BASE_URL = "https://zxgz.newfeifan.cn"; formatAppLog("log", "at sheep/components/s-follow-modal/s-follow-modal.vue:113", "当前接口Url", SHOPRO_DEV_BASE_URL); if (SHOPRO_DEV_BASE_URL.includes("letcgo.com")) { drawQrCode(define_import_meta_env_default.SHOPRO_MP_HOME_PAGE_LETCGO); } else { drawQrCode(define_import_meta_env_default.SHOPRO_MP_HOME_PAGE_FEIFAN); } } vue.watchEffect(() => { if (show.value) { vue.nextTick().then(() => { createQrcode(); }); } }); const __returned__ = { show, imagePath, drawQrCode, createQrcode, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, watchEffect: vue.watchEffect, nextTick: vue.nextTick, get sheep() { return sheep$1; }, get QSCanvas() { return QSCanvas; }, get onShow() { return onShow; }, get closeSubscribeModal() { return closeSubscribeModal; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$38(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 关注 "), vue.createVNode(_component_su_popup, { show: $setup.show, round: "10", onClose: $setup.closeSubscribeModal }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "login-wrap" }, [ vue.createElementVNode("view", { class: "head-box" }, [ vue.createElementVNode("view", { class: "ss-m-b-20" }, [ vue.createElementVNode( "view", { class: "head-title ss-m-r-40 head-title-animation" }, vue.toDisplayString($setup.t("pop.follow_public_account")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ss-flex ss-row-center" }, [ vue.createElementVNode("canvas", { class: "hideCanvas", "canvas-id": "myCanvas", style: { "width": "300px", "height": "300px" } }), vue.createElementVNode("image", { src: $setup.imagePath, mode: "widthFix" }, null, 8, ["src"]) ]) ]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const __easycom_6$1 = /* @__PURE__ */ _export_sfc(_sfc_main$39, [["render", _sfc_render$38], ["__scopeId", "data-v-7b106c15"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-follow-modal/s-follow-modal.vue"]]); const _sfc_main$38 = { name: "uni-easyinput", emits: ["click", "iconClick", "update:modelValue", "input", "focus", "blur", "confirm"], model: { prop: "modelValue", event: "update:modelValue" }, 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: String, 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: 15 }, inputBorder: { type: Boolean, default: true }, prefixIcon: { type: String, default: "" }, suffixIcon: { type: String, default: "" }, trim: { type: [Boolean, String], default: true }, passwordIcon: { type: Boolean, default: true }, styles: { type: Object, default() { return { color: "#333", disableColor: "#ffffff", borderColor: "#ffffff" }; } }, errorMessage: { type: [String, Boolean], default: "" }, paddingLeft: { type: [Number, String], default: 0 } }, data() { return { focused: false, errMsg: "", val: "", showMsg: "", border: false, isFirstBorder: false, showClearIcon: false, showPassword: false }; }, computed: { msg() { return this.errorMessage || this.errMsg; }, // 因为uniapp的input组件的maxlength组件必须要数值,这里转为数值,用户可以传入字符串数值 inputMaxlength() { return Number(this.maxlength); } }, watch: { value(newVal) { if (this.errMsg) this.errMsg = ""; this.val = newVal; if (this.form && this.formItem && !this.is_reset) { this.is_reset = false; this.formItem.setValue(newVal); } }, modelValue(newVal) { if (this.errMsg) this.errMsg = ""; this.val = newVal; if (this.form && this.formItem && !this.is_reset) { this.is_reset = false; this.formItem.setValue(newVal); } }, focus(newVal) { this.$nextTick(() => { this.focused = this.focus; }); } }, created() { if (!this.value && this.value !== 0) { this.val = this.modelValue; } if (!this.modelValue && this.modelValue !== 0) { this.val = this.value; } this.form = this.getForm("uniForms"); this.formItem = this.getForm("uniFormsItem"); if (this.form && this.formItem) { if (this.formItem.name) { if (!this.is_reset) { this.is_reset = false; this.formItem.setValue(this.val); } this.rename = this.formItem.name; this.form.inputChildrens.push(this); } } }, mounted() { this.$nextTick(() => { this.focused = this.focus; }); }, methods: { /** * 初始化变量值 */ init() { }, onClickIcon(type) { this.$emit("iconClick", type); }, /** * 获取父元素实例 */ getForm(name2 = "uniForms") { let parent2 = this.$parent; let parentName = parent2.$options.name; while (parentName !== name2) { parent2 = parent2.$parent; if (!parent2) return false; parentName = parent2.$options.name; } return parent2; }, onEyes() { this.showPassword = !this.showPassword; }, 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); }, onFocus(event) { this.$emit("focus", event); }, onBlur(event) { event.detail.value; this.$emit("blur", event); }, onConfirm(e2) { this.$emit("confirm", e2.detail.value); }, onClear(event) { this.val = ""; this.$emit("input", ""); this.$emit("update:modelValue", ""); }, fieldClick() { this.$emit("click"); }, 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$37(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-easyinput", { "uni-easyinput-error": $options.msg }]), style: vue.normalizeStyle({ color: $props.inputBorder && $options.msg ? "#e43d33" : $props.styles.color }) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-easyinput__content", { "is-input-border": $props.inputBorder, "is-input-error-border": $props.inputBorder && $options.msg, "is-textarea": $props.type === "textarea", "is-disabled": $props.disabled }]), style: vue.normalizeStyle({ "border-color": $props.inputBorder && $options.msg ? "#dd524d" : $props.styles.borderColor, "background-color": $props.disabled ? $props.styles.disableColor : "" }) }, [ $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")) }, null, 8, ["type"])) : vue.createCommentVNode("v-if", 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, onInput: _cache[1] || (_cache[1] = (...args) => $options.onInput && $options.onInput(...args)), onBlur: _cache[2] || (_cache[2] = (...args) => $options.onBlur && $options.onBlur(...args)), onFocus: _cache[3] || (_cache[3] = (...args) => $options.onFocus && $options.onFocus(...args)), onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)) }, null, 42, ["name", "value", "placeholder", "placeholderStyle", "disabled", "maxlength", "focus", "autoHeight"])) : (vue.openBlock(), vue.createElementBlock("input", { key: 2, type: $props.type === "password" ? "text" : $props.type, class: "uni-easyinput__content-input", style: vue.normalizeStyle({ "padding-right": $props.type === "password" || $props.clearable || $props.prefixIcon ? "" : "10px", "padding-left": $props.paddingLeft + "px" }), 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, onFocus: _cache[5] || (_cache[5] = (...args) => $options.onFocus && $options.onFocus(...args)), onBlur: _cache[6] || (_cache[6] = (...args) => $options.onBlur && $options.onBlur(...args)), onInput: _cache[7] || (_cache[7] = (...args) => $options.onInput && $options.onInput(...args)), onChange: _cache[8] || (_cache[8] = (...args) => $options.onInput && $options.onInput(...args)), onConfirm: _cache[9] || (_cache[9] = (...args) => $options.onConfirm && $options.onConfirm(...args)), "cursor-spacing": 30, "always-embed": "" }, null, 44, ["type", "name", "value", "password", "placeholder", "placeholderStyle", "disabled", "maxlength", "focus", "confirmType"])), $props.type === "password" && $props.passwordIcon ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 3 }, [ $data.val ? (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: 18, color: "#c0c4cc", onClick: $options.onEyes }, null, 8, ["class", "type", "onClick"])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : $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[10] || (_cache[10] = ($event) => $options.onClickIcon("suffix")) }, null, 8, ["type"])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 5 }, [ $props.clearable && $data.val && !$props.disabled ? (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: "#c0c4cc", onClick: $options.onClear }, null, 8, ["class", "size", "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_0$l = /* @__PURE__ */ _export_sfc(_sfc_main$38, [["render", _sfc_render$37], ["__scopeId", "data-v-09fd5285"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue"]]); const _sfc_main$37 = { name: "uniFormsItem", props: { // 自定义内容 custom: { type: Boolean, default: false }, // 是否显示报错信息 showMessage: { type: Boolean, default: true }, name: String, required: Boolean, validateTrigger: { type: String, default: "" }, leftIcon: String, iconColor: { type: String, default: "#606266" }, label: String, // 左边标题的宽度单位px labelWidth: { type: [Number, String], default: "" }, // 对齐方式,left|center|right labelAlign: { type: String, default: "" }, // lable的位置,可选为 left-左边,top-上边 labelPosition: { type: String, default: "" }, errorMessage: { type: [String, Boolean], default: "" }, // 表单校验规则 rules: { type: Array, default() { return []; } } }, data() { return { errorTop: false, errorBottom: false, labelMarginBottom: "", errorWidth: "", errMsg: "", val: "", labelPos: "", labelWid: "", labelAli: "", showMsg: "undertext", border: false, isFirstBorder: false, isArray: false, arrayField: "" }; }, computed: { msg() { return this.errorMessage || this.errMsg; }, fieldStyle() { let style = {}; if (this.labelPos == "top") { style.padding = "0 0"; this.labelMarginBottom = "6px"; } if (this.labelPos == "left" && this.msg !== false && this.msg != "") { style.paddingBottom = "0px"; this.errorBottom = true; this.errorTop = false; } else if (this.labelPos == "top" && this.msg !== false && this.msg != "") { this.errorBottom = false; this.errorTop = true; } else { this.errorTop = false; this.errorBottom = false; } return style; }, // uni不支持在computed中写style.justifyContent = 'center'的形式,故用此方法 justifyContent() { if (this.labelAli === "left") return "flex-start"; if (this.labelAli === "center") return "center"; if (this.labelAli === "right") return "flex-end"; }, labelLeft() { return (this.labelPos === "left" ? parseInt(this.labelWid) : 0) + "rpx"; } }, watch: { validateTrigger(trigger) { this.formTrigger = trigger; } }, created() { this.form = this.getForm(); this.group = this.getForm("uniGroup"); this.formRules = []; this.formTrigger = this.validateTrigger; if (this.name && this.name.indexOf("[") !== -1 && this.name.indexOf("]") !== -1) { this.isArray = true; this.arrayField = this.name; this.form.formData[this.name] = this.form._getValue(this.name, ""); } }, mounted() { if (this.form) { this.form.childrens.push(this); } this.init(); }, unmounted() { this.__isUnmounted = true; this.unInit(); }, methods: { init() { if (this.form) { let { formRules, validator: validator2, formData, value, labelPosition, labelWidth, labelAlign, errShowType } = this.form; this.labelPos = this.labelPosition ? this.labelPosition : labelPosition; if (this.label) { this.labelWid = this.labelWidth ? this.labelWidth : labelWidth || 140; } else { this.labelWid = this.labelWidth ? this.labelWidth : labelWidth || "auto"; } if (this.labelWid && this.labelWid !== "auto") { this.labelWid += "rpx"; } this.labelAli = this.labelAlign ? this.labelAlign : labelAlign; if (!this.form.isFirstBorder) { this.form.isFirstBorder = true; this.isFirstBorder = true; } if (this.group) { if (!this.group.isFirstBorder) { this.group.isFirstBorder = true; this.isFirstBorder = true; } } this.border = this.form.border; this.showMsg = errShowType; let name2 = this.isArray ? this.arrayField : this.name; if (!name2) return; if (formRules && this.rules.length > 0) { if (!formRules[name2]) { formRules[name2] = { rules: this.rules }; } validator2.updateSchema(formRules); } this.formRules = formRules[name2] || {}; this.validator = validator2; } else { this.labelPos = this.labelPosition || "left"; this.labelWid = this.labelWidth || 130; this.labelAli = this.labelAlign || "left"; } }, unInit() { if (this.form) { this.form.childrens.forEach((item, index2) => { if (item === this) { this.form.childrens.splice(index2, 1); delete this.form.formData[item.name]; } }); } }, /** * 获取父元素实例 */ getForm(name2 = "uniForms") { let parent2 = this.$parent; let parentName = parent2.$options.name; while (parentName !== name2) { parent2 = parent2.$parent; if (!parent2) return false; parentName = parent2.$options.name; } return parent2; }, /** * 移除该表单项的校验结果 */ clearValidate() { this.errMsg = ""; }, /** * 子组件调用,如 easyinput * @param {Object} value */ setValue(value) { let name2 = this.isArray ? this.arrayField : this.name; if (name2) { if (this.errMsg) this.errMsg = ""; this.form.formData[name2] = this.form._getValue(name2, value); if (!this.formRules || typeof this.formRules && JSON.stringify(this.formRules) === "{}") return; this.triggerCheck(this.form._getValue(this.name, value)); } }, /** * 校验规则 * @param {Object} value */ async triggerCheck(value, formTrigger) { this.errMsg = ""; if (!this.validator || Object.keys(this.formRules).length === 0) return; const isNoField = this.isRequired(this.formRules.rules || []); let isTrigger = this.isTrigger( this.formRules.validateTrigger, this.validateTrigger, this.form.validateTrigger ); let result2 = null; if (!!isTrigger || formTrigger) { let name2 = this.isArray ? this.arrayField : this.name; result2 = await this.validator.validateUpdate( { [name2]: value }, this.form.formData ); } if (!isNoField && (value === void 0 || value === "")) { result2 = null; } const inputComp = this.form.inputChildrens.find((child) => child.rename === this.name); if ((isTrigger || formTrigger) && result2 && result2.errorMessage) { if (inputComp) { inputComp.errMsg = result2.errorMessage; } if (this.form.errShowType === "toast") { uni.showToast({ title: result2.errorMessage || "校验错误", icon: "none" }); } if (this.form.errShowType === "modal") { uni.showModal({ title: "提示", content: result2.errorMessage || "校验错误" }); } } else { if (inputComp) { inputComp.errMsg = ""; } } this.errMsg = !result2 ? "" : result2.errorMessage; this.form.validateCheck(result2 ? result2 : null); return result2 ? result2 : null; }, /** * 触发时机 * @param {Object} event */ isTrigger(rule, itemRlue, parentRule) { if (rule === "submit" || !rule) { if (rule === void 0) { if (itemRlue !== "bind") { if (!itemRlue) { return parentRule === "bind" ? true : false; } return false; } return true; } return false; } return true; }, // 是否有必填字段 isRequired(rules2) { let isNoField = false; for (let i2 = 0; i2 < rules2.length; i2++) { const ruleData = rules2[i2]; if (ruleData.required) { isNoField = true; break; } } return isNoField; } } }; function _sfc_render$36(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-forms-item", { "uni-forms-item--border": $data.border, "is-first-border": $data.border && $data.isFirstBorder, "uni-forms-item-error": $options.msg }]) }, [ vue.createElementVNode("view", { class: "uni-forms-item__box" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-forms-item__inner", ["is-direction-" + $data.labelPos]]) }, [ vue.createElementVNode( "view", { class: "uni-forms-item__label", style: vue.normalizeStyle({ width: $data.labelWid, justifyContent: $options.justifyContent }) }, [ vue.renderSlot(_ctx.$slots, "label", {}, () => [ $props.required ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "is-required" }, "*")) : vue.createCommentVNode("v-if", true), $props.leftIcon ? (vue.openBlock(), vue.createBlock(_component_uni_icons, { key: 1, class: "label-icon", size: "16", type: $props.leftIcon, color: $props.iconColor }, null, 8, ["type", "color"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "label-text" }, vue.toDisplayString($props.label), 1 /* TEXT */ ), $props.label ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "label-seat" })) : vue.createCommentVNode("v-if", true) ], true) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-forms-item__content", { "is-input-error-border": $options.msg }]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ) ], 2 /* CLASS */ ), $options.msg ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-error-message", { "uni-error-msg--boeder": $data.border }]), style: vue.normalizeStyle({ paddingLeft: $options.labelLeft }) }, [ vue.createElementVNode( "text", { class: "uni-error-message-text" }, vue.toDisplayString($data.showMsg === "undertext" ? $options.msg : ""), 1 /* TEXT */ ) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ], 2 /* CLASS */ ) ]); } const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$37, [["render", _sfc_render$36], ["__scopeId", "data-v-462874dd"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue"]]); var pattern = { email: /^\S+?@\S+?\.\S+?$/, idcard: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, url: new RegExp( "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i" ) }; const FORMAT_MAPPING = { "int": "integer", "bool": "boolean", "double": "number", "long": "number", "password": "string" // "fileurls": 'array' }; function formatMessage(args, resources = "") { var defaultMessage = ["label"]; defaultMessage.forEach((item) => { if (args[item] === void 0) { args[item] = ""; } }); let str = resources; for (let key in args) { let reg = new RegExp("{" + key + "}"); str = str.replace(reg, args[key]); } return str; } function isEmptyValue(value, type) { if (value === void 0 || value === null) { return true; } if (typeof value === "string" && !value) { return true; } if (Array.isArray(value) && !value.length) { return true; } if (type === "object" && !Object.keys(value).length) { return true; } return false; } const types = { integer(value) { return types.number(value) && parseInt(value, 10) === value; }, string(value) { return typeof value === "string"; }, number(value) { if (isNaN(value)) { return false; } return typeof value === "number"; }, "boolean": function(value) { return typeof value === "boolean"; }, "float": function(value) { return types.number(value) && !types.integer(value); }, array(value) { return Array.isArray(value); }, object(value) { return typeof value === "object" && !types.array(value); }, date(value) { return value instanceof Date; }, timestamp(value) { if (!this.integer(value) || Math.abs(value).toString().length > 16) { return false; } return true; }, file(value) { return typeof value.url === "string"; }, email(value) { return typeof value === "string" && !!value.match(pattern.email) && value.length < 255; }, url(value) { return typeof value === "string" && !!value.match(pattern.url); }, pattern(reg, value) { try { return new RegExp(reg).test(value); } catch (e2) { return false; } }, method(value) { return typeof value === "function"; }, idcard(value) { return typeof value === "string" && !!value.match(pattern.idcard); }, "url-https"(value) { return this.url(value) && value.startsWith("https://"); }, "url-scheme"(value) { return value.startsWith("://"); }, "url-web"(value) { return false; } }; class RuleValidator { constructor(message) { this._message = message; } async validateRule(fieldKey, fieldValue, value, data, allData) { var result2 = null; let rules2 = fieldValue.rules; let hasRequired = rules2.findIndex((item) => { return item.required; }); if (hasRequired < 0) { if (value === null || value === void 0) { return result2; } if (typeof value === "string" && !value.length) { return result2; } } var message = this._message; if (rules2 === void 0) { return message["default"]; } for (var i2 = 0; i2 < rules2.length; i2++) { let rule = rules2[i2]; let vt2 = this._getValidateType(rule); Object.assign(rule, { label: fieldValue.label || `["${fieldKey}"]` }); if (RuleValidatorHelper[vt2]) { result2 = RuleValidatorHelper[vt2](rule, value, message); if (result2 != null) { break; } } if (rule.validateExpr) { let now2 = Date.now(); let resultExpr = rule.validateExpr(value, allData, now2); if (resultExpr === false) { result2 = this._getMessage(rule, rule.errorMessage || this._message["default"]); break; } } if (rule.validateFunction) { result2 = await this.validateFunction(rule, value, data, allData, vt2); if (result2 !== null) { break; } } } if (result2 !== null) { result2 = message.TAG + result2; } return result2; } async validateFunction(rule, value, data, allData, vt2) { let result2 = null; try { let callbackMessage = null; const res = await rule.validateFunction(rule, value, allData || data, (message) => { callbackMessage = message; }); if (callbackMessage || typeof res === "string" && res || res === false) { result2 = this._getMessage(rule, callbackMessage || res, vt2); } } catch (e2) { result2 = this._getMessage(rule, e2.message, vt2); } return result2; } _getMessage(rule, message, vt2) { return formatMessage(rule, message || rule.errorMessage || this._message[vt2] || message["default"]); } _getValidateType(rule) { var result2 = ""; if (rule.required) { result2 = "required"; } else if (rule.format) { result2 = "format"; } else if (rule.arrayType) { result2 = "arrayTypeFormat"; } else if (rule.range) { result2 = "range"; } else if (rule.maximum !== void 0 || rule.minimum !== void 0) { result2 = "rangeNumber"; } else if (rule.maxLength !== void 0 || rule.minLength !== void 0) { result2 = "rangeLength"; } else if (rule.pattern) { result2 = "pattern"; } else if (rule.validateFunction) { result2 = "validateFunction"; } return result2; } } const RuleValidatorHelper = { required(rule, value, message) { if (rule.required && isEmptyValue(value, rule.format || typeof value)) { return formatMessage(rule, rule.errorMessage || message.required); } return null; }, range(rule, value, message) { const { range: range2, errorMessage } = rule; let list = new Array(range2.length); for (let i2 = 0; i2 < range2.length; i2++) { const item = range2[i2]; if (types.object(item) && item.value !== void 0) { list[i2] = item.value; } else { list[i2] = item; } } let result2 = false; if (Array.isArray(value)) { result2 = new Set(value.concat(list)).size === list.length; } else { if (list.indexOf(value) > -1) { result2 = true; } } if (!result2) { return formatMessage(rule, errorMessage || message["enum"]); } return null; }, rangeNumber(rule, value, message) { if (!types.number(value)) { return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); } let { minimum, maximum, exclusiveMinimum, exclusiveMaximum } = rule; let min = exclusiveMinimum ? value <= minimum : value < minimum; let max = exclusiveMaximum ? value >= maximum : value > maximum; if (minimum !== void 0 && min) { return formatMessage(rule, rule.errorMessage || message["number"][exclusiveMinimum ? "exclusiveMinimum" : "minimum"]); } else if (maximum !== void 0 && max) { return formatMessage(rule, rule.errorMessage || message["number"][exclusiveMaximum ? "exclusiveMaximum" : "maximum"]); } else if (minimum !== void 0 && maximum !== void 0 && (min || max)) { return formatMessage(rule, rule.errorMessage || message["number"].range); } return null; }, rangeLength(rule, value, message) { if (!types.string(value) && !types.array(value)) { return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); } let min = rule.minLength; let max = rule.maxLength; let val = value.length; if (min !== void 0 && val < min) { return formatMessage(rule, rule.errorMessage || message["length"].minLength); } else if (max !== void 0 && val > max) { return formatMessage(rule, rule.errorMessage || message["length"].maxLength); } else if (min !== void 0 && max !== void 0 && (val < min || val > max)) { return formatMessage(rule, rule.errorMessage || message["length"].range); } return null; }, pattern(rule, value, message) { if (!types["pattern"](rule.pattern, value)) { return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); } return null; }, format(rule, value, message) { var customTypes = Object.keys(types); var format2 = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format || rule.arrayType; if (customTypes.indexOf(format2) > -1) { if (!types[format2](value)) { return formatMessage(rule, rule.errorMessage || message.typeError); } } return null; }, arrayTypeFormat(rule, value, message) { if (!Array.isArray(value)) { return formatMessage(rule, rule.errorMessage || message.typeError); } for (let i2 = 0; i2 < value.length; i2++) { const element = value[i2]; let formatResult = this.format(rule, element, message); if (formatResult !== null) { return formatResult; } } return null; } }; class SchemaValidator extends RuleValidator { constructor(schema, options2) { super(SchemaValidator.message); this._schema = schema; this._options = options2 || null; } updateSchema(schema) { this._schema = schema; } async validate(data, allData) { let result2 = this._checkFieldInSchema(data); if (!result2) { result2 = await this.invokeValidate(data, false, allData); } return result2.length ? result2[0] : null; } async validateAll(data, allData) { let result2 = this._checkFieldInSchema(data); if (!result2) { result2 = await this.invokeValidate(data, true, allData); } return result2; } async validateUpdate(data, allData) { let result2 = this._checkFieldInSchema(data); if (!result2) { result2 = await this.invokeValidateUpdate(data, false, allData); } return result2.length ? result2[0] : null; } async invokeValidate(data, all, allData) { let result2 = []; let schema = this._schema; for (let key in schema) { let value = schema[key]; let errorMessage = await this.validateRule(key, value, data[key], data, allData); if (errorMessage != null) { result2.push({ key, errorMessage }); if (!all) break; } } return result2; } async invokeValidateUpdate(data, all, allData) { let result2 = []; for (let key in data) { let errorMessage = await this.validateRule(key, this._schema[key], data[key], data, allData); if (errorMessage != null) { result2.push({ key, errorMessage }); if (!all) break; } } return result2; } _checkFieldInSchema(data) { var keys = Object.keys(data); var keys2 = Object.keys(this._schema); if (new Set(keys.concat(keys2)).size === keys2.length) { return ""; } var noExistFields = keys.filter((key) => { return keys2.indexOf(key) < 0; }); var errorMessage = formatMessage({ field: JSON.stringify(noExistFields) }, SchemaValidator.message.TAG + SchemaValidator.message["defaultInvalid"]); return [{ key: "invalid", errorMessage }]; } } function Message() { return { TAG: "", default: "验证错误", defaultInvalid: "提交的字段{field}在数据库中并不存在", validateFunction: "验证无效", required: "{label}必填", "enum": "{label}超出范围", timestamp: "{label}格式无效", whitespace: "{label}不能为空", typeError: "{label}类型无效", date: { format: "{label}日期{value}格式无效", parse: "{label}日期无法解析,{value}无效", invalid: "{label}日期{value}无效" }, length: { minLength: "{label}长度不能少于{minLength}", maxLength: "{label}长度不能超过{maxLength}", range: "{label}必须介于{minLength}和{maxLength}之间" }, number: { minimum: "{label}不能小于{minimum}", maximum: "{label}不能大于{maximum}", exclusiveMinimum: "{label}不能小于等于{minimum}", exclusiveMaximum: "{label}不能大于等于{maximum}", range: "{label}必须介于{minimum}and{maximum}之间" }, pattern: { mismatch: "{label}格式不匹配" } }; } SchemaValidator.message = new Message(); const _sfc_main$36 = { name: "uniForms", components: {}, emits: ["input", "reset", "validate", "submit"], props: { // 即将弃用 value: { type: Object, default() { return {}; } }, // 替换 value 属性 modelValue: { type: Object, default() { return {}; } }, // 表单校验规则 rules: { type: Object, default() { return {}; } }, // 校验触发器方式,默认 关闭 validateTrigger: { type: String, default: "" }, // label 位置,可选值 top/left labelPosition: { type: String, default: "left" }, // label 宽度,单位 px labelWidth: { type: [String, Number], default: "" }, // label 居中方式,可选值 left/center/right labelAlign: { type: String, default: "left" }, errShowType: { type: String, default: "undertext" }, border: { type: Boolean, default: false } }, data() { return { formData: {} }; }, computed: { dataValue() { if (JSON.stringify(this.modelValue) === "{}") { return this.value; } else { return this.modelValue; } } }, watch: { rules(newVal) { this.init(newVal); }, labelPosition() { this.childrens.forEach((vm) => { vm.init(); }); } }, created() { let getbinddata = getApp().$vm.$.appContext.config.globalProperties.binddata; if (!getbinddata) { getApp().$vm.$.appContext.config.globalProperties.binddata = function(name2, value, formName) { if (formName) { this.$refs[formName].setValue(name2, value); } else { let formVm; for (let i2 in this.$refs) { const vm = this.$refs[i2]; if (vm && vm.$options && vm.$options.name === "uniForms") { formVm = vm; break; } } if (!formVm) return formatAppLog("error", "at uni_modules/uni-forms/components/uni-forms/uni-forms.vue:152", "当前 uni-froms 组件缺少 ref 属性"); formVm.setValue(name2, value); } }; } this.unwatchs = []; this.childrens = []; this.inputChildrens = []; this.checkboxChildrens = []; this.formRules = []; this.init(this.rules); }, // mounted() { // this.init(this.rules) // }, methods: { init(formRules) { if (Object.keys(formRules).length === 0) { this.formData = this.dataValue; return; } this.formRules = formRules; this.validator = new SchemaValidator(formRules); this.registerWatch(); }, // 监听 watch registerWatch() { this.unwatchs.forEach((v2) => v2()); this.childrens.forEach((v2) => { v2.init(); }); Object.keys(this.dataValue).forEach((key) => { let watch = this.$watch( "dataValue." + key, (value) => { if (!value) return; if (value.toString() === "[object Object]") { for (let i2 in value) { let name2 = `${key}[${i2}]`; this.formData[name2] = this._getValue(name2, value[i2]); } } else { this.formData[key] = this._getValue(key, value); } }, { deep: true, immediate: true } ); this.unwatchs.push(watch); }); }, /** * 公开给用户使用 * 设置校验规则 * @param {Object} formRules */ setRules(formRules) { this.init(formRules); }, /** * 公开给用户使用 * 设置自定义表单组件 value 值 * @param {String} name 字段名称 * @param {String} value 字段值 */ setValue(name2, value, callback) { let example = this.childrens.find((child) => child.name === name2); if (!example) return null; value = this._getValue(example.name, value); this.formData[name2] = value; example.val = value; return example.triggerCheck(value, callback); }, /** * 表单重置 * @param {Object} event */ resetForm(event) { this.childrens.forEach((item) => { item.errMsg = ""; const inputComp = this.inputChildrens.find((child) => child.rename === item.name); if (inputComp) { inputComp.errMsg = ""; inputComp.is_reset = true; inputComp.$emit("input", inputComp.multiple ? [] : ""); inputComp.$emit("update:modelValue", inputComp.multiple ? [] : ""); } }); this.childrens.forEach((item) => { if (item.name) { this.formData[item.name] = this._getValue(item.name, ""); } }); this.$emit("reset", event); }, /** * 触发表单校验,通过 @validate 获取 * @param {Object} validate */ validateCheck(validate) { if (validate === null) validate = null; this.$emit("validate", validate); }, /** * 校验所有或者部分表单 */ async validateAll(invalidFields, type, keepitem, callback) { let childrens = []; for (let i2 in invalidFields) { const item = this.childrens.find((v2) => v2.name === i2); if (item) { childrens.push(item); } } if (!callback && typeof keepitem === "function") { callback = keepitem; } let promise; if (!callback && typeof callback !== "function" && Promise) { promise = new Promise((resolve, reject) => { callback = function(valid, invalidFields2) { !valid ? resolve(invalidFields2) : reject(valid); }; }); } let results = []; let newFormData = {}; if (this.validator) { for (let key in childrens) { const child = childrens[key]; let name2 = child.isArray ? child.arrayField : child.name; if (child.isArray) { if (child.name.indexOf("[") !== -1 && child.name.indexOf("]") !== -1) { const fieldData = child.name.split("["); const fieldName = fieldData[0]; const fieldValue = fieldData[1].replace("]", ""); if (!newFormData[fieldName]) { newFormData[fieldName] = {}; } newFormData[fieldName][fieldValue] = this._getValue(name2, invalidFields[name2]); } } else { newFormData[name2] = this._getValue(name2, invalidFields[name2]); } const result2 = await child.triggerCheck(invalidFields[name2], true); if (result2) { results.push(result2); if (this.errShowType === "toast" || this.errShowType === "modal") break; } } } else { newFormData = invalidFields; } if (Array.isArray(results)) { if (results.length === 0) results = null; } if (Array.isArray(keepitem)) { keepitem.forEach((v2) => { newFormData[v2] = this.dataValue[v2]; }); } if (type === "submit") { this.$emit("submit", { detail: { value: newFormData, errors: results } }); } else { this.$emit("validate", results); } callback && typeof callback === "function" && callback(results, newFormData); if (promise && callback) { return promise; } else { return null; } }, submitForm() { }, /** * 外部调用方法 * 手动提交校验表单 * 对整个表单进行校验的方法,参数为一个回调函数。 */ submit(keepitem, callback, type) { for (let i2 in this.dataValue) { const itemData = this.childrens.find((v2) => v2.name === i2); if (itemData) { if (this.formData[i2] === void 0) { this.formData[i2] = this._getValue(i2, this.dataValue[i2]); } } } if (!type) { formatAppLog("warn", "at uni_modules/uni-forms/components/uni-forms/uni-forms.vue:371", "submit 方法即将废弃,请使用validate方法代替!"); } return this.validateAll(this.formData, "submit", keepitem, callback); }, /** * 外部调用方法 * 校验表单 * 对整个表单进行校验的方法,参数为一个回调函数。 */ validate(keepitem, callback) { return this.submit(keepitem, callback, true); }, /** * 部分表单校验 * @param {Object} props * @param {Object} cb */ validateField(props, callback) { props = [].concat(props); let invalidFields = {}; this.childrens.forEach((item) => { if (props.indexOf(item.name) !== -1) { invalidFields = Object.assign({}, invalidFields, { [item.name]: this.formData[item.name] }); } }); return this.validateAll(invalidFields, "submit", [], callback); }, /** * 对整个表单进行重置,将所有字段值重置为初始值并移除校验结果 */ resetFields() { this.resetForm(); }, /** * 移除表单项的校验结果。传入待移除的表单项的 prop 属性或者 prop 组成的数组,如不传则移除整个表单的校验结果 */ clearValidate(props) { props = [].concat(props); this.childrens.forEach((item) => { const inputComp = this.inputChildrens.find((child) => child.rename === item.name); if (props.length === 0) { item.errMsg = ""; if (inputComp) { inputComp.errMsg = ""; } } else { if (props.indexOf(item.name) !== -1) { item.errMsg = ""; if (inputComp) { inputComp.errMsg = ""; } } } }); }, /** * 把 value 转换成指定的类型 * @param {Object} key * @param {Object} value */ _getValue(key, value) { const rules2 = this.formRules[key] && this.formRules[key].rules || []; const isRuleNum = rules2.find((val) => val.format && this.type_filter(val.format)); const isRuleBool = rules2.find((val) => val.format && val.format === "boolean" || val.format === "bool"); if (isRuleNum) { value = isNaN(value) ? value : value === "" || value === null ? null : Number(value); } if (isRuleBool) { value = !value ? false : true; } return value; }, /** * 过滤数字类型 * @param {Object} format */ type_filter(format2) { return format2 === "int" || format2 === "double" || format2 === "number" || format2 === "timestamp"; } } }; function _sfc_render$35(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-forms", { "uni-forms--top": !$props.border }]) }, [ vue.createElementVNode( "form", { onSubmit: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.submitForm && $options.submitForm(...args), ["stop"])), onReset: _cache[1] || (_cache[1] = (...args) => $options.resetForm && $options.resetForm(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 32 /* NEED_HYDRATION */ ) ], 2 /* CLASS */ ); } const __easycom_2$7 = /* @__PURE__ */ _export_sfc(_sfc_main$36, [["render", _sfc_render$35], ["__scopeId", "data-v-9a1e3c32"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-forms/components/uni-forms/uni-forms.vue"]]); const username = { rules: [ { required: true, errorMessage: t$6("rules.enter_username") }, { validateFunction: function(rule, value, data, callback) { if (!value) { callback(t$6("rules.username_required")); } return true; } } ] }; const mobile = { rules: [ { required: true, errorMessage: t$6("rules.enter_phone") }, { validateFunction: function(rule, value, data, callback) { if (!test$1.mobile(value)) { callback(t$6("rules.incorrect_phone_format")); } return true; } } ] }; const password = { rules: [ { required: true, errorMessage: t$6("rules.enter_password") }, { validateFunction: function(rule, value, data, callback) { if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/.test(value)) { callback(t$6("rules.password_requirements")); } return true; } } ] }; const code = { rules: [ { required: true, errorMessage: t$6("rules.enter_verification_code") } ] }; ({ rules: [ { required: true, errorMessage: t$6("rules.enter_name") }, { validateFunction: function(rule, value, data, callback) { if (!test$1.chinese(value)) { callback(t$6("rules.enter_chinese_characters")); } return true; } } ] }); ({ rules: [ { required: true, errorMessage: t$6("rules.enter_invoice_title") }, { validateFunction: function(rule, value, data, callback) { if (!test$1.chinese(value)) { callback(t$6("rules.enter_chinese_characters")); } return true; } } ] }); ({ rules: [ { required: true, errorMessage: t$6("rules.enter_tax_number") } ] }); ({ rules: [ { required: true, errorMessage: t$6("rules.enter_bank") }, { validateFunction: function(rule, value, data, callback) { if (!test$1.chinese(value)) { callback(t$6("rules.enter_chinese_characters")); } return true; } } ] }); const bankCode = { rules: [ { required: true, errorMessage: t$6("rules.enter_bank_card_number") }, { validateFunction: function(rule, value, data, callback) { if (!/^\d+$/.test(value)) { callback(t$6("rules.correct_bank_card_number")); } return true; } } ] }; const alipayAccount$1 = { rules: [ { required: true, errorMessage: t$6("rules.enter_alipay_account") }, { validateFunction: function(rule, value, data, callback) { let isEmail = test$1.email(value); let isMobile = test$1.mobile(value); if (!isEmail && !isMobile) { callback(t$6("rules.correct_account_number")); } return true; } } ] }; const email = { rules: [ { required: true, errorMessage: t$6("rules.enter_email") }, { validateFunction: function(rule, value, data, callback) { let isEmail = test$1.email(value); if (!isEmail) { callback(t$6("rules.correct_email")); } return true; } } ] }; const _sfc_main$35 = { __name: "account-login", props: { agreeStatus: { type: Boolean, default: false } }, emits: ["onConfirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const accountLoginRef = vue.ref(null); const emits = __emit; const props = __props; const state = vue.reactive({ model: { username: "", // 账号 password: "" // 密码 }, rules: { username, password } }); async function accountLoginSubmit() { const validate = await vue.unref(accountLoginRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/account-login.vue:73", "error: ", error2); }); if (!validate) return; if (!props.agreeStatus) { emits("onConfirm", true); sheep$1.$helper.toast(t$6("account.please_agree")); return; } const { code: code2, data } = await AuthUtil.login(state.model); if (code2 === 0) { closeAuthModal(); } } const __returned__ = { accountLoginRef, emits, props, state, accountLoginSubmit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() { return sheep$1; }, get username() { return username; }, get password() { return password; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get AuthUtil() { return AuthUtil; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$34(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "accountLoginRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "160", labelAlign: "center", class: "loginUniForm" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "username", label: $setup.t("account.username"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_username"), modelValue: $setup.state.model.username, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "password", label: $setup.t("account.password"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { type: "password", placeholder: $setup.t("account.enter_password"), modelValue: $setup.state.model.password, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.password = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [ vue.createCommentVNode(` `), vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.accountLoginSubmit }, vue.toDisplayString($setup.t("account.login")), 1 /* TEXT */ ) ]) ]); } const accountLogin = /* @__PURE__ */ _export_sfc(_sfc_main$35, [["render", _sfc_render$34], ["__scopeId", "data-v-f21c903c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/account-login.vue"]]); const countryData = [ { english_name: "China", chinese_name: "中国", country_code: "CN", phone_code: "86" }, { english_name: "Hong Kong", chinese_name: "中国香港", country_code: "HK", phone_code: "852" }, { english_name: "Taiwan", chinese_name: "中国台湾", country_code: "TW", phone_code: "886" }, { english_name: "Macau", chinese_name: "中国澳门", country_code: "MO", phone_code: "853" }, { english_name: "Central African Republic", chinese_name: "中非共和国", country_code: "CF", phone_code: "236" }, { english_name: "Chile", chinese_name: "智利", country_code: "CL", phone_code: "56" }, { english_name: "Gibraltar", chinese_name: "直布罗陀", country_code: "GI", phone_code: "350" }, { english_name: "Chad", chinese_name: "乍得", country_code: "TD", phone_code: "235" }, { english_name: "Zambia", chinese_name: "赞比亚", country_code: "ZM", phone_code: "260" }, { english_name: "Vietnam", chinese_name: "越南", country_code: "VN", phone_code: "84" }, { english_name: "Jordan", chinese_name: "约旦", country_code: "JO", phone_code: "962" }, { english_name: "Virgin Islands, British", chinese_name: "英属处女群岛", country_code: "VG", phone_code: "1340" }, { english_name: "United Kingdom", chinese_name: "英国", country_code: "GB", phone_code: "44" }, { english_name: "Indonesia", chinese_name: "印度尼西亚", country_code: "ID", phone_code: "62" }, { english_name: "India", chinese_name: "印度", country_code: "IN", phone_code: "91" }, { english_name: "Italy", chinese_name: "意大利", country_code: "IT", phone_code: "39" }, { english_name: "Israel", chinese_name: "以色列", country_code: "IL", phone_code: "972" }, { english_name: "Iran", chinese_name: "伊朗", country_code: "IR", phone_code: "98" }, { english_name: "Iraq", chinese_name: "伊拉克", country_code: "IQ", phone_code: "964" }, { english_name: "Yemen", chinese_name: "也门", country_code: "YE", phone_code: "967" }, { english_name: "Armenia", chinese_name: "亚美尼亚", country_code: "AM", phone_code: "374" }, { english_name: "Jamaica", chinese_name: "牙买加", country_code: "JM", phone_code: "1876" }, { english_name: "Syria", chinese_name: "叙利亚", country_code: "SY", phone_code: "963" }, { english_name: "Hungary", chinese_name: "匈牙利", country_code: "HU", phone_code: "36" }, { english_name: "New Zealand", chinese_name: "新西兰", country_code: "NZ", phone_code: "64" }, { english_name: "New Caledonia", chinese_name: "新喀里多尼亚", country_code: "NC", phone_code: "687" }, { english_name: "Singapore", chinese_name: "新加坡", country_code: "SG", phone_code: "65" }, { english_name: "Ivory Coast", chinese_name: "象牙海岸", country_code: "CI", phone_code: "225" }, { english_name: "Greece", chinese_name: "希腊", country_code: "GR", phone_code: "30" }, { english_name: "Spain", chinese_name: "西班牙", country_code: "ES", phone_code: "34" }, { english_name: "Uzbekistan", chinese_name: "乌兹别克斯坦", country_code: "UZ", phone_code: "998" }, { english_name: "Uruguay", chinese_name: "乌拉圭", country_code: "UY", phone_code: "598" }, { english_name: "Ukraine", chinese_name: "乌克兰", country_code: "UA", phone_code: "380" }, { english_name: "Uganda", chinese_name: "乌干达", country_code: "UG", phone_code: "256" }, { english_name: "Brunei", chinese_name: "文莱", country_code: "BN", phone_code: "673" }, { english_name: "Venezuela", chinese_name: "委内瑞拉", country_code: "VE", phone_code: "58" }, { english_name: "Vanuatu", chinese_name: "瓦努阿图", country_code: "VU", phone_code: "678" }, { english_name: "Turkmenistan", chinese_name: "土库曼斯坦", country_code: "TM", phone_code: "993" }, { english_name: "Turkey", chinese_name: "土耳其", country_code: "TR", phone_code: "90" }, { english_name: "Tunisia", chinese_name: "突尼斯", country_code: "TN", phone_code: "216" }, { english_name: "Trinidad and Tobago", chinese_name: "特立尼达和多巴哥", country_code: "TT", phone_code: "1868" }, { english_name: "Turks and Caicos Islands", chinese_name: "特克斯和凯科斯群岛", country_code: "TC", phone_code: "1649" }, { english_name: "Tonga", chinese_name: "汤加", country_code: "TO", phone_code: "676" }, { english_name: "Tanzania", chinese_name: "坦桑尼亚", country_code: "TZ", phone_code: "255" }, { english_name: "Thailand", chinese_name: "泰国", country_code: "TH", phone_code: "66" }, { english_name: "Tajikistan", chinese_name: "塔吉克斯坦", country_code: "TJ", phone_code: "992" }, { english_name: "Somalia", chinese_name: "索马里", country_code: "SO", phone_code: "252" }, { english_name: "Solomon Islands", chinese_name: "所罗门群岛", country_code: "SB", phone_code: "677" }, { english_name: "Suriname", chinese_name: "苏里南", country_code: "SR", phone_code: "597" }, { english_name: "Sudan", chinese_name: "苏丹", country_code: "SD", phone_code: "249" }, { english_name: "Swaziland", chinese_name: "斯威士兰", country_code: "SZ", phone_code: "268" }, { english_name: "Slovenia", chinese_name: "斯洛文尼亚", country_code: "SI", phone_code: "386" }, { english_name: "Slovakia", chinese_name: "斯洛伐克", country_code: "SK", phone_code: "421" }, { english_name: "Sri Lanka", chinese_name: "斯里兰卡", country_code: "LK", phone_code: "94" }, { english_name: "Saint Vincent and The Grenadines", chinese_name: "圣文森特和格林纳丁斯", country_code: "VC", phone_code: "1784" }, { english_name: "San Marino", chinese_name: "圣马力诺", country_code: "SM", phone_code: "378" }, { english_name: "Saint Maarten (Dutch Part)", chinese_name: "圣马丁岛(荷兰部分)", country_code: "SX", phone_code: "1721" }, { english_name: "Saint Lucia", chinese_name: "圣露西亚", country_code: "LC", phone_code: "1758" }, { english_name: "Saint Kitts and Nevis", chinese_name: "圣基茨和尼维斯", country_code: "KN", phone_code: "1869" }, { english_name: "Sao Tome and Principe", chinese_name: "圣多美和普林西比", country_code: "ST", phone_code: "239" }, { english_name: "Saint Pierre and Miquelon", chinese_name: "圣彼埃尔和密克隆岛", country_code: "PM", phone_code: "508" }, { english_name: "Saudi Arabia", chinese_name: "沙特阿拉伯", country_code: "SA", phone_code: "966" }, { english_name: "Seychelles", chinese_name: "塞舌尔", country_code: "SC", phone_code: "248" }, { english_name: "Cyprus", chinese_name: "塞浦路斯", country_code: "CY", phone_code: "357" }, { english_name: "Senegal", chinese_name: "塞内加尔", country_code: "SN", phone_code: "221" }, { english_name: "Sierra Leone", chinese_name: "塞拉利昂", country_code: "SL", phone_code: "232" }, { english_name: "Serbia", chinese_name: "塞尔维亚", country_code: "RS", phone_code: "381" }, { english_name: "Samoa", chinese_name: "萨摩亚", country_code: "WS", phone_code: "685" }, { english_name: "El Salvador", chinese_name: "萨尔瓦多", country_code: "SV", phone_code: "503" }, { english_name: "Switzerland", chinese_name: "瑞士", country_code: "CH", phone_code: "41" }, { english_name: "Sweden", chinese_name: "瑞典", country_code: "SE", phone_code: "46" }, { english_name: "Japan", chinese_name: "日本", country_code: "JP", phone_code: "81" }, { english_name: "Portugal", chinese_name: "葡萄牙", country_code: "PT", phone_code: "351" }, { english_name: "Palau", chinese_name: "帕劳", country_code: "PW", phone_code: "680" }, { english_name: "Norway", chinese_name: "挪威", country_code: "NO", phone_code: "47" }, { english_name: "Nigeria", chinese_name: "尼日利亚", country_code: "NG", phone_code: "234" }, { english_name: "Niger", chinese_name: "尼日尔", country_code: "NE", phone_code: "227" }, { english_name: "Nepal", chinese_name: "尼泊尔", country_code: "NP", phone_code: "977" }, { english_name: "Nicaragua", chinese_name: "尼加拉瓜", country_code: "NI", phone_code: "505" }, { english_name: "South Africa", chinese_name: "南非", country_code: "ZA", phone_code: "27" }, { english_name: "Namibia", chinese_name: "纳米比亚", country_code: "NA", phone_code: "264" }, { english_name: "Mexico", chinese_name: "墨西哥", country_code: "MX", phone_code: "52" }, { english_name: "Mozambique", chinese_name: "莫桑比克", country_code: "MZ", phone_code: "258" }, { english_name: "Monaco", chinese_name: "摩纳哥", country_code: "MC", phone_code: "377" }, { english_name: "Morocco", chinese_name: "摩洛哥", country_code: "MA", phone_code: "212" }, { english_name: "Moldova", chinese_name: "摩尔多瓦", country_code: "MD", phone_code: "373" }, { english_name: "Myanmar", chinese_name: "缅甸", country_code: "MM", phone_code: "95" }, { english_name: "Peru", chinese_name: "秘鲁", country_code: "PE", phone_code: "51" }, { english_name: "Bangladesh", chinese_name: "孟加拉国", country_code: "BD", phone_code: "880" }, { english_name: "Montserrat", chinese_name: "蒙特塞拉特岛", country_code: "MS", phone_code: "1664" }, { english_name: "Mongolia", chinese_name: "蒙古", country_code: "MN", phone_code: "976" }, { english_name: "Virgin Islands, US", chinese_name: "美属维尔京群岛", country_code: "VI", phone_code: "1284" }, { english_name: "American Samoa", chinese_name: "美属萨摩亚", country_code: "AS", phone_code: "1684" }, { english_name: "United States", chinese_name: "美国", country_code: "US", phone_code: "1" }, { english_name: "Mauritania", chinese_name: "毛里塔尼亚", country_code: "MR", phone_code: "222" }, { english_name: "Mauritius", chinese_name: "毛里求斯", country_code: "MU", phone_code: "230" }, { english_name: "Mayotte", chinese_name: "马约特", country_code: "YT", phone_code: "269" }, { english_name: "Martinique", chinese_name: "马提尼克", country_code: "MQ", phone_code: "596" }, { english_name: "Macedonia", chinese_name: "马其顿", country_code: "MK", phone_code: "389" }, { english_name: "Mali", chinese_name: "马里", country_code: "ML", phone_code: "223" }, { english_name: "Malaysia", chinese_name: "马来西亚", country_code: "MY", phone_code: "60" }, { english_name: "Malawi", chinese_name: "马拉维", country_code: "MW", phone_code: "265" }, { english_name: "Malta", chinese_name: "马耳他", country_code: "MT", phone_code: "356" }, { english_name: "Maldives", chinese_name: "马尔代夫", country_code: "MV", phone_code: "960" }, { english_name: "Madagascar", chinese_name: "马达加斯加", country_code: "MG", phone_code: "261" }, { english_name: "Romania", chinese_name: "罗马尼亚", country_code: "RO", phone_code: "40" }, { english_name: "Rwanda", chinese_name: "卢旺达", country_code: "RW", phone_code: "250" }, { english_name: "Luxembourg", chinese_name: "卢森堡", country_code: "LU", phone_code: "352" }, { english_name: "Réunion Island", chinese_name: "留尼汪", country_code: "RE", phone_code: "262" }, { english_name: "Liechtenstein", chinese_name: "列支敦士登", country_code: "LI", phone_code: "423" }, { english_name: "Libya", chinese_name: "利比亚", country_code: "LY", phone_code: "218" }, { english_name: "Liberia", chinese_name: "利比里亚", country_code: "LR", phone_code: "231" }, { english_name: "Lithuania", chinese_name: "立陶宛", country_code: "LT", phone_code: "370" }, { english_name: "Lebanon", chinese_name: "黎巴嫩", country_code: "LB", phone_code: "961" }, { english_name: "Laos", chinese_name: "老挝", country_code: "LA", phone_code: "856" }, { english_name: "Lesotho", chinese_name: "莱索托", country_code: "LS", phone_code: "266" }, { english_name: "Latvia", chinese_name: "拉脱维亚", country_code: "LV", phone_code: "371" }, { english_name: "Curacao", chinese_name: "库拉索", country_code: "CW", phone_code: "599" }, { english_name: "Cook Islands", chinese_name: "库克群岛", country_code: "CK", phone_code: "682" }, { english_name: "Kenya", chinese_name: "肯尼亚", country_code: "KE", phone_code: "254" }, { english_name: "Croatia", chinese_name: "克罗地亚", country_code: "HR", phone_code: "385" }, { english_name: "Kuwait", chinese_name: "科威特", country_code: "KW", phone_code: "965" }, { english_name: "Comoros", chinese_name: "科摩罗", country_code: "KM", phone_code: "269" }, { english_name: "Cape Verde", chinese_name: "开普", country_code: "CV", phone_code: "238" }, { english_name: "Cayman Islands", chinese_name: "开曼群岛", country_code: "KY", phone_code: "1345" }, { english_name: "Qatar", chinese_name: "卡塔尔", country_code: "QA", phone_code: "974" }, { english_name: "Cameroon", chinese_name: "喀麦隆", country_code: "CM", phone_code: "237" }, { english_name: "Zimbabwe", chinese_name: "津巴布韦", country_code: "ZW", phone_code: "263" }, { english_name: "Czech", chinese_name: "捷克", country_code: "CZ", phone_code: "420" }, { english_name: "Cambodia", chinese_name: "柬埔寨", country_code: "KH", phone_code: "855" }, { english_name: "Gabon", chinese_name: "加蓬", country_code: "GA", phone_code: "241" }, { english_name: "Ghana", chinese_name: "加纳", country_code: "GH", phone_code: "233" }, { english_name: "Canada", chinese_name: "加拿大", country_code: "CA", phone_code: "1" }, { english_name: "Guinea-Bissau", chinese_name: "几内亚比绍共和国", country_code: "GW", phone_code: "245" }, { english_name: "Guinea", chinese_name: "几内亚", country_code: "GN", phone_code: "224" }, { english_name: "Kyrgyzstan", chinese_name: "吉尔吉斯斯坦", country_code: "KG", phone_code: "996" }, { english_name: "Djibouti", chinese_name: "吉布提", country_code: "DJ", phone_code: "253" }, { english_name: "Kiribati", chinese_name: "基里巴斯", country_code: "KI", phone_code: "686" }, { english_name: "Honduras", chinese_name: "洪都拉斯", country_code: "HN", phone_code: "504" }, { english_name: "Montenegro", chinese_name: "黑山", country_code: "ME", phone_code: "382" }, { english_name: "Netherlands", chinese_name: "荷兰", country_code: "NL", phone_code: "31" }, { english_name: "South Korea", chinese_name: "韩国", country_code: "KR", phone_code: "82" }, { english_name: "Haiti", chinese_name: "海地", country_code: "HT", phone_code: "509" }, { english_name: "Kazakhstan", chinese_name: "哈萨克斯坦", country_code: "KZ", phone_code: "7" }, { english_name: "Guyana", chinese_name: "圭亚那", country_code: "GY", phone_code: "592" }, { english_name: "Guam", chinese_name: "关岛", country_code: "GU", phone_code: "1671" }, { english_name: "Guatemala", chinese_name: "瓜地马拉", country_code: "GT", phone_code: "502" }, { english_name: "Guadeloupe", chinese_name: "瓜德罗普岛", country_code: "GP", phone_code: "590" }, { english_name: "Cuba", chinese_name: "古巴", country_code: "CU", phone_code: "53" }, { english_name: "Georgia", chinese_name: "格鲁吉亚", country_code: "GE", phone_code: "995" }, { english_name: "Greenland", chinese_name: "格陵兰岛", country_code: "GL", phone_code: "299" }, { english_name: "Grenada", chinese_name: "格林纳达", country_code: "GD", phone_code: "1473" }, { english_name: "Costa Rica", chinese_name: "哥斯达黎加", country_code: "CR", phone_code: "506" }, { english_name: "Colombia", chinese_name: "哥伦比亚", country_code: "CO", phone_code: "57" }, { english_name: "Democratic Republic of the Congo", chinese_name: "刚果民主共和国", country_code: "CD", phone_code: "243" }, { english_name: "Republic Of The Congo", chinese_name: "刚果共和国", country_code: "CG", phone_code: "242" }, { english_name: "Gambia", chinese_name: "冈比亚", country_code: "GM", phone_code: "220" }, { english_name: "Finland", chinese_name: "芬兰", country_code: "FI", phone_code: "358" }, { english_name: "Fiji", chinese_name: "斐济", country_code: "FJ", phone_code: "679" }, { english_name: "Philippines", chinese_name: "菲律宾", country_code: "PH", phone_code: "63" }, { english_name: "French Guiana", chinese_name: "法属圭亚那", country_code: "GF", phone_code: "594" }, { english_name: "French Polynesia", chinese_name: "法属波利尼西亚", country_code: "PF", phone_code: "689" }, { english_name: "Faroe Islands", chinese_name: "法罗群岛", country_code: "FO", phone_code: "298" }, { english_name: "France", chinese_name: "法国", country_code: "FR", phone_code: "33" }, { english_name: "Eritrea", chinese_name: "厄立特里亚", country_code: "ER", phone_code: "291" }, { english_name: "Ecuador", chinese_name: "厄瓜多尔", country_code: "EC", phone_code: "593" }, { english_name: "Russia", chinese_name: "俄罗斯", country_code: "RU", phone_code: "7" }, { english_name: "Dominican Republic", chinese_name: "多米尼加共和国", country_code: "DO", phone_code: "1809" }, { english_name: "Dominica", chinese_name: "多米尼加", country_code: "DM", phone_code: "1767" }, { english_name: "Togo", chinese_name: "多哥", country_code: "TG", phone_code: "228" }, { english_name: "Timor-Leste", chinese_name: "东帝汶", country_code: "TL", phone_code: "670" }, { english_name: "Germany", chinese_name: "德国", country_code: "DE", phone_code: "49" }, { english_name: "Denmark", chinese_name: "丹麦", country_code: "DK", phone_code: "45" }, { english_name: "Equatorial Guinea", chinese_name: "赤道几内亚", country_code: "GQ", phone_code: "240" }, { english_name: "Burundi", chinese_name: "布隆迪", country_code: "BI", phone_code: "257" }, { english_name: "Burkina Faso", chinese_name: "布基纳法索", country_code: "BF", phone_code: "226" }, { english_name: "Bhutan", chinese_name: "不丹", country_code: "BT", phone_code: "975" }, { english_name: "Botswana", chinese_name: "博茨瓦纳", country_code: "BW", phone_code: "267" }, { english_name: "Belize", chinese_name: "伯利兹", country_code: "BZ", phone_code: "501" }, { english_name: "Bolivia", chinese_name: "玻利维亚", country_code: "BO", phone_code: "591" }, { english_name: "Bosnia and Herzegovina", chinese_name: "波斯尼亚和黑塞哥维那", country_code: "BA", phone_code: "387" }, { english_name: "Poland", chinese_name: "波兰", country_code: "PL", phone_code: "48" }, { english_name: "Puerto Rico", chinese_name: "波多黎各", country_code: "PR", phone_code: "1787" }, { english_name: "Iceland", chinese_name: "冰岛", country_code: "IS", phone_code: "354" }, { english_name: "Belgium", chinese_name: "比利时", country_code: "BE", phone_code: "32" }, { english_name: "Benin", chinese_name: "贝宁", country_code: "BJ", phone_code: "229" }, { english_name: "Bulgaria", chinese_name: "保加利亚", country_code: "BG", phone_code: "359" }, { english_name: "Bermuda", chinese_name: "百慕大群岛", country_code: "BM", phone_code: "1441" }, { english_name: "Belarus", chinese_name: "白俄罗斯", country_code: "BY", phone_code: "375" }, { english_name: "Brazil", chinese_name: "巴西", country_code: "BR", phone_code: "55" }, { english_name: "Panama", chinese_name: "巴拿马", country_code: "PA", phone_code: "507" }, { english_name: "Bahrain", chinese_name: "巴林", country_code: "BH", phone_code: "973" }, { english_name: "Palestine", chinese_name: "巴勒斯坦", country_code: "BL", phone_code: "970" }, { english_name: "Paraguay", chinese_name: "巴拉圭", country_code: "PY", phone_code: "595" }, { english_name: "Pakistan", chinese_name: "巴基斯坦", country_code: "PK", phone_code: "92" }, { english_name: "Bahamas", chinese_name: "巴哈马", country_code: "BS", phone_code: "1242" }, { english_name: "Papua New Guinea", chinese_name: "巴布亚新几内亚", country_code: "PG", phone_code: "675" }, { english_name: "Barbados", chinese_name: "巴巴多斯", country_code: "BB", phone_code: "1246" }, { english_name: "Australia", chinese_name: "澳大利亚", country_code: "AU", phone_code: "61" }, { english_name: "Austria", chinese_name: "奥地利", country_code: "AT", phone_code: "43" }, { english_name: "Antigua and Barbuda", chinese_name: "安提瓜和巴布达", country_code: "AG", phone_code: "1268" }, { english_name: "Anguilla", chinese_name: "安圭拉", country_code: "AI", phone_code: "1264" }, { english_name: "Angola", chinese_name: "安哥拉", country_code: "AO", phone_code: "244" }, { english_name: "Andorra", chinese_name: "安道尔", country_code: "AD", phone_code: "376" }, { english_name: "Estonia", chinese_name: "爱沙尼亚", country_code: "EE", phone_code: "372" }, { english_name: "Ireland", chinese_name: "爱尔兰", country_code: "IE", phone_code: "353" }, { english_name: "Ethiopia", chinese_name: "埃塞俄比亚", country_code: "ET", phone_code: "251" }, { english_name: "Egypt", chinese_name: "埃及", country_code: "EG", phone_code: "20" }, { english_name: "Azerbaijan", chinese_name: "阿塞拜疆", country_code: "AZ", phone_code: "994" }, { english_name: "Oman", chinese_name: "阿曼", country_code: "OM", phone_code: "968" }, { english_name: "Aruba", chinese_name: "阿鲁巴", country_code: "AW", phone_code: "297" }, { english_name: "United Arab Emirates", chinese_name: "阿拉伯联合酋长国", country_code: "AE", phone_code: "971" }, { english_name: "Argentina", chinese_name: "阿根廷", country_code: "AR", phone_code: "54" }, { english_name: "Afghanistan", chinese_name: "阿富汗", country_code: "AF", phone_code: "93" }, { english_name: "Algeria", chinese_name: "阿尔及利亚", country_code: "DZ", phone_code: "213" }, { english_name: "Albania", chinese_name: "阿尔巴尼亚", country_code: "AL", phone_code: "355" } ]; const metadata$1 = { "version": 4, "country_calling_codes": { "1": ["US", "AG", "AI", "AS", "BB", "BM", "BS", "CA", "DM", "DO", "GD", "GU", "JM", "KN", "KY", "LC", "MP", "MS", "PR", "SX", "TC", "TT", "VC", "VG", "VI"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, "countries": { "AC": ["247", "00", "(?:[01589]\\d|[46])\\d{4}", [5, 6]], "AD": ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]]], "AE": ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AF": ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0"], "AG": ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268"], "AI": ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264"], "AL": ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0"], "AM": ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0"], "AO": ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]]], "AR": ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1"], "AS": ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684"], "AT": ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AU": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, ["163\\d{2,6}", [5, 6, 7, 8, 9]], ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "AW": ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]]], "AX": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", 0, "00"], "AZ": ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0"], "BA": ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0"], "BB": ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246"], "BD": ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0"], "BE": ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0"], "BF": ["226", "00", "[025-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[025-7]"]]]], "BG": ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0"], "BH": ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]]], "BI": ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]]], "BJ": ["229", "00", "[24-689]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-689]"]]]], "BL": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441"], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]]], "BO": ["591", "00(?:1\\d)?", "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"]], ["(\\d{8})", "$1", ["[67]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?"], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]"], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37)", "4(?:02|37)0|[34]00"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2"], "BS": ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242"], "BT": ["975", "00", "[17]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]]], "BW": ["267", "00", "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]]], "BY": ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, 0, "8~10"], "BZ": ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]]], "CA": ["1", "011", "(?:[2-8]\\d|90)\\d{8}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}", [10]], ["", [10]], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", [10]], ["900[2-9]\\d{6}", [10]], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}", [10]], 0, ["310\\d{4}", [7]], 0, ["600[2-9]\\d{6}", [10]]]], "CC": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CD": ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0"], "CF": ["236", "00", "(?:[27]\\d{3}|8776)\\d{4}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[278]"]]]], "CG": ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]]], "CH": ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0"], "CI": ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]]], "CK": ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]]], "CL": ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9[2-9]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]]], "CM": ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]]], "CN": ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["80"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, 0, "00"], "CO": ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|91"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?"], "CR": ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))"], "CU": ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0"], "CV": ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]]], "CW": ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]"], "CX": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CY": ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]]], "CZ": ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]]], "DE": ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|31)"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0"], "DJ": ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]]], "DK": ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]]], "DM": ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767"], "DO": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9"], "DZ": ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0"], "EC": ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0"], "EE": ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "EG": ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0"], "EH": ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, "528[89]"], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0"], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]]], "ET": ["251", "00", "(?:11|[2-579]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], "0"], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", 0, "00"], "FJ": ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "FK": ["500", "00", "[2-7]\\d{4}", [5]], "FM": ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]]], "FO": ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{6})", "$1", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))"], "FR": ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0"], "GA": ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1"], "GB": ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", [9, 10]], ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]], 0, " x"], "GD": ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473"], "GE": ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0"], "GF": ["594", "00", "[56]94\\d{6}|(?:80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[56]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0"], "GG": ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0", "1481$1", 0, 0, [["1481[25-9]\\d{5}", [10]], ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]]], "GH": ["233", "00", "(?:[235]\\d{3}|800)\\d{5}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "0$1"]], "0"], "GI": ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]]], "GL": ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]]], "GM": ["220", "00", "[2-9]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "GN": ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]]], "GP": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "GQ": ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]]], "GR": ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]]], "GT": ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "GU": ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671"], "GW": ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]]], "GY": ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "HK": ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "HN": ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]]], "HR": ["385", "00", "(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}", [6, 7, 8, 9], [["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0"], "HT": ["509", "00", "(?:[2-489]\\d|55)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]]], "HU": ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06"], "ID": ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0"], "IE": ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "IL": ["972", "0(?:0|1[2-9])", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0"], "IM": ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0", "1624$1", 0, "74576|(?:16|7[56])24"], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["1(?:6|8[06])", "1(?:6|8[06]0)"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0"], "IO": ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]]], "IQ": ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0"], "IR": ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0"], "IS": ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "IT": ["39", "00", "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, [["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}", [6, 7, 8, 9, 10, 11]], ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]], ["80(?:0\\d{3}|3)\\d{3}", [6, 9]], ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", [6, 8, 9, 10]], ["1(?:78\\d|99)\\d{6}", [9, 10]], ["3[2-8]\\d{9,10}", [11, 12]], 0, 0, ["55\\d{8}", [10]], ["84(?:[08]\\d{3}|[17])\\d{3}", [6, 9]]]], "JE": ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0", "1534$1", 0, 0, [["1534[0-24-8]\\d{5}"], ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"], ["80(?:07(?:35|81)|8901)\\d{4}"], ["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"], ["701511\\d{4}"], 0, ["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"], ["56\\d{8}"]]], "JM": ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876"], "JO": ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0"], "JP": ["81", "010", "00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["[36]|4(?:2[09]|7[01])", "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[257-9]"], "0$1"]], "0", 0, "(000[259]\\d{6})$|(?:(?:003768)0?)|0", "$1"], "KE": ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0"], "KG": ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "KH": ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "KI": ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0"], "KM": ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]]], "KN": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869"], "KP": ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0"], "KR": ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?"], "KW": ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]]], "KY": ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345"], "KZ": ["7", "810", "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "33|7", 0, "8~10"], "LA": ["856", "00", "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["30[0135-9]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0"], "LB": ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0"], "LC": ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758"], "LI": ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0"], "LK": ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0"], "LR": ["231", "00", "(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0"], "LS": ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]]], "LT": ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]"], "LU": ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["2(?:[0367]|4[3-8])"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["2(?:[0367]|4[3-8])"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"], "LV": ["371", "00", "(?:[268]\\d|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|8[01]"]]]], "LY": ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0"], "MA": ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5[45]"], "0$1"], ["(\\d{4})(\\d{5})", "$1-$2", ["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8"], "0$1"], ["(\\d{3})(\\d{6})", "$1-$2", ["[5-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"], ["80[0-7]\\d{6}"], ["89\\d{7}"], 0, 0, 0, 0, ["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]], "MC": ["377", "00", "(?:[3489]|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["6"], "0$1"]], "0"], "MD": ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0"], "ME": ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0"], "MF": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "MG": ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1"], "MH": ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1"], "MK": ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0"], "ML": ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]]], "MM": ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0"], "MN": ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[12]1"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0"], "MO": ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]]], "MP": ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670"], "MQ": ["596", "00", "596\\d{6}|(?:69|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664"], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, 0, "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[137-9]"], "0$1"]], "0"], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0"], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1"], "NG": ["234", "009", "38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}", [8, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["3"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0"], "NI": ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]]], "NL": ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0"], "NO": ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]"], "NP": ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0"], "NR": ["674", "00", "(?:444|(?:55|8\\d)\\d|666)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-68]"]]]], "NU": ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]]], "NZ": ["64", "0(?:0|161)", "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "00"], "OM": ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]]], "PA": ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]]], "PE": ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, 0, "00", " Anexo "], "PF": ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "PG": ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "PH": ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0"], "PK": ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0"], "PL": ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]]], "PM": ["508", "00", "[45]\\d{5}|(?:708|8\\d\\d)\\d{6}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[45]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "PR": ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939"], "PS": ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "PT": ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]]], "PW": ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "PY": ["595", "00", "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0"], "QA": ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[16]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]]], "RE": ["262", "00", "(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"], ["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"], ["80\\d{7}"], ["89[1-37-9]\\d{6}"], 0, 0, 0, 0, ["9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}"], ["8(?:1[019]|2[0156]|84|90)\\d{6}"]]], "RO": ["40", "00", "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, " int "], "RS": ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0"], "RU": ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "3[04-689]|[489]", 0, "8~10"], "RW": ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0"], "SA": ["966", "00", "92\\d{7}|(?:[15]|8\\d)\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["81"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0"], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0"], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]"], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[0139]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, 0, "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79"], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1/$2 $3 $4", ["[3-5]"], "0$1"]], "0"], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0"], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1"], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|77|9[2-9]"]]], "0"], "SR": ["597", "00", "(?:[2-5]|68|[78]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-8]"]]]], "SS": ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "ST": ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]]], "SV": ["503", "00", "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[267]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]]], "SX": ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721"], "SY": ["963", "00", "[1-39]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-5]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1", 1]], "0"], "SZ": ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]]], "TA": ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8"], "TC": ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649"], "TD": ["235", "00|16", "(?:22|[689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "TG": ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]]], "TH": ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "TJ": ["992", "810", "[0-57-9]\\d{8}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[0-57-9]"]]], 0, 0, 0, 0, 0, 0, 0, "8~10"], "TK": ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7]], "TL": ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]]], "TM": ["993", "810", "(?:[1-6]\\d|71)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, 0, "8~10"], "TN": ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]]], "TO": ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]]], "TR": ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5(?:[0-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0"], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868"], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[258]0"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", "[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, "#"], "TZ": ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0"], "UA": ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "0~0"], "UG": ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[27-9]|4(?:6[45]|[7-9])"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[34]"], "0$1"]], "0"], "US": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"], 0, 0, 0, ["305209\\d{4}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", [6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, 0, "00", " int. "], "UZ": ["998", "00", "(?:20|33|[5-79]\\d|88)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698"], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784"], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0"], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284"], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340"], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", 1], ["(\\d{4})(\\d{4,6})", "$1 $2", ["1"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0"], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]]], "WF": ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "WS": ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "XK": ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0"], "YE": ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0"], "YT": ["262", "00", "(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", [9], 0, "0", 0, 0, 0, 0, 0, [["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"], ["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"], ["80\\d{7}"], 0, 0, 0, 0, 0, ["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]], "ZA": ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "ZM": ["260", "00", "800\\d{6}|(?:21|63|[79]\\d)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[79]"], "0$1"]], "0"], "ZW": ["263", "00", "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", [5, 6, 7, 8, 9, 10], [["(\\d{3})(\\d{3,5})", "$1 $2", ["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"], "0$1"], ["(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]|39|54"], "0$1"], ["(\\d{4})(\\d{3,5})", "$1 $2", ["(?:25|54)8", "258|5483"], "0$1"]], "0"] }, "nonGeographic": { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[35-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[35-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|51"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } }; function withMetadataArgument$1(func, _arguments) { var args = Array.prototype.slice.call(_arguments); args.push(metadata$1); return func.apply(this, args); } function _typeof$1(obj) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { return typeof obj2; } : function(obj2) { return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; }, _typeof$1(obj); } function _defineProperties$8(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$8(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$8(Constructor.prototype, protoProps); if (staticProps) _defineProperties$8(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result2; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result2 = Reflect.construct(Super, arguments, NewTarget); } else { result2 = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result2); }; } function _possibleConstructorReturn(self2, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self2); } function _assertThisInitialized(self2) { if (self2 === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self2; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0; _wrapNativeSuper = function _wrapNativeSuper2(Class2) { if (Class2 === null || !_isNativeFunction(Class2)) return Class2; if (typeof Class2 !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class2)) return _cache.get(Class2); _cache.set(Class2, Wrapper); } function Wrapper() { return _construct(Class2, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class2); }; return _wrapNativeSuper(Class); } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct2(Parent2, args2, Class2) { var a2 = [null]; a2.push.apply(a2, args2); var Constructor = Function.bind.apply(Parent2, a2); var instance = new Constructor(); if (Class2) _setPrototypeOf(instance, Class2.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })); return true; } catch (e2) { return false; } } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _setPrototypeOf(o2, p2) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o3, p3) { o3.__proto__ = p3; return o3; }; return _setPrototypeOf(o2, p2); } function _getPrototypeOf(o2) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o3) { return o3.__proto__ || Object.getPrototypeOf(o3); }; return _getPrototypeOf(o2); } var ParseError = /* @__PURE__ */ function(_Error) { _inherits(ParseError2, _Error); var _super = _createSuper(ParseError2); function ParseError2(code2) { var _this; _classCallCheck$8(this, ParseError2); _this = _super.call(this, code2); Object.setPrototypeOf(_assertThisInitialized(_this), ParseError2.prototype); _this.name = _this.constructor.name; return _this; } return _createClass$8(ParseError2); }(/* @__PURE__ */ _wrapNativeSuper(Error)); var MIN_LENGTH_FOR_NSN = 2; var MAX_LENGTH_FOR_NSN = 17; var MAX_LENGTH_COUNTRY_CODE = 3; var VALID_DIGITS = "0-90-9٠-٩۰-۹"; var DASHES = "-‐-―−ー-"; var SLASHES = "//"; var DOTS = ".."; var WHITESPACE = "  ­​⁠ "; var BRACKETS = "()()[]\\[\\]"; var TILDES = "~⁓∼~"; var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES); var PLUS_CHARS = "++"; function compare(a2, b2) { a2 = a2.split("-"); b2 = b2.split("-"); var pa = a2[0].split("."); var pb = b2[0].split("."); for (var i2 = 0; i2 < 3; i2++) { var na = Number(pa[i2]); var nb = Number(pb[i2]); if (na > nb) return 1; if (nb > na) return -1; if (!isNaN(na) && isNaN(nb)) return 1; if (isNaN(na) && !isNaN(nb)) return -1; } if (a2[1] && b2[1]) { return a2[1] > b2[1] ? 1 : a2[1] < b2[1] ? -1 : 0; } return !a2[1] && b2[1] ? 1 : a2[1] && !b2[1] ? -1 : 0; } var objectConstructor = {}.constructor; function isObject$2(object2) { return object2 !== void 0 && object2 !== null && object2.constructor === objectConstructor; } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { return typeof obj2; } : function(obj2) { return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; }, _typeof(obj); } function _classCallCheck$7(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$7(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$7(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$7(Constructor.prototype, protoProps); if (staticProps) _defineProperties$7(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var V3 = "1.2.0"; var V4 = "1.7.35"; var DEFAULT_EXT_PREFIX = " ext. "; var CALLING_CODE_REG_EXP = /^\d+$/; var Metadata = /* @__PURE__ */ function() { function Metadata2(metadata2) { _classCallCheck$7(this, Metadata2); validateMetadata(metadata2); this.metadata = metadata2; setVersion.call(this, metadata2); } _createClass$7(Metadata2, [{ key: "getCountries", value: function getCountries() { return Object.keys(this.metadata.countries).filter(function(_2) { return _2 !== "001"; }); } }, { key: "getCountryMetadata", value: function getCountryMetadata(countryCode) { return this.metadata.countries[countryCode]; } }, { key: "nonGeographic", value: function nonGeographic() { if (this.v1 || this.v2 || this.v3) return; return this.metadata.nonGeographic || this.metadata.nonGeographical; } }, { key: "hasCountry", value: function hasCountry(country) { return this.getCountryMetadata(country) !== void 0; } }, { key: "hasCallingCode", value: function hasCallingCode(callingCode) { if (this.getCountryCodesForCallingCode(callingCode)) { return true; } if (this.nonGeographic()) { if (this.nonGeographic()[callingCode]) { return true; } } else { var countryCodes = this.countryCallingCodes()[callingCode]; if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") { return true; } } } }, { key: "isNonGeographicCallingCode", value: function isNonGeographicCallingCode(callingCode) { if (this.nonGeographic()) { return this.nonGeographic()[callingCode] ? true : false; } else { return this.getCountryCodesForCallingCode(callingCode) ? false : true; } } // Deprecated. }, { key: "country", value: function country(countryCode) { return this.selectNumberingPlan(countryCode); } }, { key: "selectNumberingPlan", value: function selectNumberingPlan(countryCode, callingCode) { if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) { callingCode = countryCode; countryCode = null; } if (countryCode && countryCode !== "001") { if (!this.hasCountry(countryCode)) { throw new Error("Unknown country: ".concat(countryCode)); } this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this); } else if (callingCode) { if (!this.hasCallingCode(callingCode)) { throw new Error("Unknown calling code: ".concat(callingCode)); } this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this); } else { this.numberingPlan = void 0; } return this; } }, { key: "getCountryCodesForCallingCode", value: function getCountryCodesForCallingCode(callingCode) { var countryCodes = this.countryCallingCodes()[callingCode]; if (countryCodes) { if (countryCodes.length === 1 && countryCodes[0].length === 3) { return; } return countryCodes; } } }, { key: "getCountryCodeForCallingCode", value: function getCountryCodeForCallingCode(callingCode) { var countryCodes = this.getCountryCodesForCallingCode(callingCode); if (countryCodes) { return countryCodes[0]; } } }, { key: "getNumberingPlanMetadata", value: function getNumberingPlanMetadata(callingCode) { var countryCode = this.getCountryCodeForCallingCode(callingCode); if (countryCode) { return this.getCountryMetadata(countryCode); } if (this.nonGeographic()) { var metadata2 = this.nonGeographic()[callingCode]; if (metadata2) { return metadata2; } } else { var countryCodes = this.countryCallingCodes()[callingCode]; if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") { return this.metadata.countries["001"]; } } } // Deprecated. }, { key: "countryCallingCode", value: function countryCallingCode() { return this.numberingPlan.callingCode(); } // Deprecated. }, { key: "IDDPrefix", value: function IDDPrefix() { return this.numberingPlan.IDDPrefix(); } // Deprecated. }, { key: "defaultIDDPrefix", value: function defaultIDDPrefix() { return this.numberingPlan.defaultIDDPrefix(); } // Deprecated. }, { key: "nationalNumberPattern", value: function nationalNumberPattern() { return this.numberingPlan.nationalNumberPattern(); } // Deprecated. }, { key: "possibleLengths", value: function possibleLengths() { return this.numberingPlan.possibleLengths(); } // Deprecated. }, { key: "formats", value: function formats() { return this.numberingPlan.formats(); } // Deprecated. }, { key: "nationalPrefixForParsing", value: function nationalPrefixForParsing() { return this.numberingPlan.nationalPrefixForParsing(); } // Deprecated. }, { key: "nationalPrefixTransformRule", value: function nationalPrefixTransformRule() { return this.numberingPlan.nationalPrefixTransformRule(); } // Deprecated. }, { key: "leadingDigits", value: function leadingDigits() { return this.numberingPlan.leadingDigits(); } // Deprecated. }, { key: "hasTypes", value: function hasTypes() { return this.numberingPlan.hasTypes(); } // Deprecated. }, { key: "type", value: function type(_type) { return this.numberingPlan.type(_type); } // Deprecated. }, { key: "ext", value: function ext() { return this.numberingPlan.ext(); } }, { key: "countryCallingCodes", value: function countryCallingCodes() { if (this.v1) return this.metadata.country_phone_code_to_countries; return this.metadata.country_calling_codes; } // Deprecated. }, { key: "chooseCountryByCountryCallingCode", value: function chooseCountryByCountryCallingCode(callingCode) { return this.selectNumberingPlan(callingCode); } }, { key: "hasSelectedNumberingPlan", value: function hasSelectedNumberingPlan() { return this.numberingPlan !== void 0; } }]); return Metadata2; }(); var NumberingPlan = /* @__PURE__ */ function() { function NumberingPlan2(metadata2, globalMetadataObject) { _classCallCheck$7(this, NumberingPlan2); this.globalMetadataObject = globalMetadataObject; this.metadata = metadata2; setVersion.call(this, globalMetadataObject.metadata); } _createClass$7(NumberingPlan2, [{ key: "callingCode", value: function callingCode() { return this.metadata[0]; } // Formatting information for regions which share // a country calling code is contained by only one region // for performance reasons. For example, for NANPA region // ("North American Numbering Plan Administration", // which includes USA, Canada, Cayman Islands, Bahamas, etc) // it will be contained in the metadata for `US`. }, { key: "getDefaultCountryMetadataForRegion", value: function getDefaultCountryMetadataForRegion() { return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode()); } // Is always present. }, { key: "IDDPrefix", value: function IDDPrefix() { if (this.v1 || this.v2) return; return this.metadata[1]; } // Is only present when a country supports multiple IDD prefixes. }, { key: "defaultIDDPrefix", value: function defaultIDDPrefix() { if (this.v1 || this.v2) return; return this.metadata[12]; } }, { key: "nationalNumberPattern", value: function nationalNumberPattern() { if (this.v1 || this.v2) return this.metadata[1]; return this.metadata[2]; } // "possible length" data is always present in Google's metadata. }, { key: "possibleLengths", value: function possibleLengths() { if (this.v1) return; return this.metadata[this.v2 ? 2 : 3]; } }, { key: "_getFormats", value: function _getFormats(metadata2) { return metadata2[this.v1 ? 2 : this.v2 ? 3 : 4]; } // For countries of the same region (e.g. NANPA) // formats are all stored in the "main" country for that region. // E.g. "RU" and "KZ", "US" and "CA". }, { key: "formats", value: function formats() { var _this = this; var formats2 = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || []; return formats2.map(function(_2) { return new Format(_2, _this); }); } }, { key: "nationalPrefix", value: function nationalPrefix() { return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5]; } }, { key: "_getNationalPrefixFormattingRule", value: function _getNationalPrefixFormattingRule(metadata2) { return metadata2[this.v1 ? 4 : this.v2 ? 5 : 6]; } // For countries of the same region (e.g. NANPA) // national prefix formatting rule is stored in the "main" country for that region. // E.g. "RU" and "KZ", "US" and "CA". }, { key: "nationalPrefixFormattingRule", value: function nationalPrefixFormattingRule() { return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion()); } }, { key: "_nationalPrefixForParsing", value: function _nationalPrefixForParsing() { return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7]; } }, { key: "nationalPrefixForParsing", value: function nationalPrefixForParsing() { return this._nationalPrefixForParsing() || this.nationalPrefix(); } }, { key: "nationalPrefixTransformRule", value: function nationalPrefixTransformRule() { return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8]; } }, { key: "_getNationalPrefixIsOptionalWhenFormatting", value: function _getNationalPrefixIsOptionalWhenFormatting() { return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9]; } // For countries of the same region (e.g. NANPA) // "national prefix is optional when formatting" flag is // stored in the "main" country for that region. // E.g. "RU" and "KZ", "US" and "CA". }, { key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat", value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() { return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion()); } }, { key: "leadingDigits", value: function leadingDigits() { return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10]; } }, { key: "types", value: function types2() { return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11]; } }, { key: "hasTypes", value: function hasTypes() { if (this.types() && this.types().length === 0) { return false; } return !!this.types(); } }, { key: "type", value: function type(_type2) { if (this.hasTypes() && getType(this.types(), _type2)) { return new Type(getType(this.types(), _type2), this); } } }, { key: "ext", value: function ext() { if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX; return this.metadata[13] || DEFAULT_EXT_PREFIX; } }]); return NumberingPlan2; }(); var Format = /* @__PURE__ */ function() { function Format2(format2, metadata2) { _classCallCheck$7(this, Format2); this._format = format2; this.metadata = metadata2; } _createClass$7(Format2, [{ key: "pattern", value: function pattern2() { return this._format[0]; } }, { key: "format", value: function format2() { return this._format[1]; } }, { key: "leadingDigitsPatterns", value: function leadingDigitsPatterns() { return this._format[2] || []; } }, { key: "nationalPrefixFormattingRule", value: function nationalPrefixFormattingRule() { return this._format[3] || this.metadata.nationalPrefixFormattingRule(); } }, { key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat", value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() { return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat(); } }, { key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat", value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() { return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat(); } // Checks whether national prefix formatting rule contains national prefix. }, { key: "usesNationalPrefix", value: function usesNationalPrefix() { return this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a "dummy" one. !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) ? true : false; } }, { key: "internationalFormat", value: function internationalFormat() { return this._format[5] || this.format(); } }]); return Format2; }(); var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/; var Type = /* @__PURE__ */ function() { function Type2(type, metadata2) { _classCallCheck$7(this, Type2); this.type = type; this.metadata = metadata2; } _createClass$7(Type2, [{ key: "pattern", value: function pattern2() { if (this.metadata.v1) return this.type; return this.type[0]; } }, { key: "possibleLengths", value: function possibleLengths() { if (this.metadata.v1) return; return this.type[1] || this.metadata.possibleLengths(); } }]); return Type2; }(); function getType(types2, type) { switch (type) { case "FIXED_LINE": return types2[0]; case "MOBILE": return types2[1]; case "TOLL_FREE": return types2[2]; case "PREMIUM_RATE": return types2[3]; case "PERSONAL_NUMBER": return types2[4]; case "VOICEMAIL": return types2[5]; case "UAN": return types2[6]; case "PAGER": return types2[7]; case "VOIP": return types2[8]; case "SHARED_COST": return types2[9]; } } function validateMetadata(metadata2) { if (!metadata2) { throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments."); } if (!isObject$2(metadata2) || !isObject$2(metadata2.countries)) { throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(isObject$2(metadata2) ? "an object of shape: { " + Object.keys(metadata2).join(", ") + " }" : "a " + typeOf(metadata2) + ": " + metadata2, ".")); } } var typeOf = function typeOf2(_2) { return _typeof(_2); }; function getCountryCallingCode(country, metadata2) { metadata2 = new Metadata(metadata2); if (metadata2.hasCountry(country)) { return metadata2.country(country).countryCallingCode(); } throw new Error("Unknown country: ".concat(country)); } function isSupportedCountry(country, metadata2) { return metadata2.countries.hasOwnProperty(country); } function setVersion(metadata2) { var version = metadata2.version; if (typeof version === "number") { this.v1 = version === 1; this.v2 = version === 2; this.v3 = version === 3; this.v4 = version === 4; } else { if (!version) { this.v1 = true; } else if (compare(version, V3) === -1) { this.v2 = true; } else if (compare(version, V4) === -1) { this.v3 = true; } else { this.v4 = true; } } } var RFC3966_EXTN_PREFIX = ";ext="; var getExtensionDigitsPattern = function getExtensionDigitsPattern2(maxLength) { return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})"); }; function createExtensionPattern(purpose) { var extLimitAfterExplicitLabel = "20"; var extLimitAfterLikelyLabel = "15"; var extLimitAfterAmbiguousChar = "9"; var extLimitWhenNotSure = "6"; var possibleSeparatorsBetweenNumberAndExtLabel = "[  \\t,]*"; var possibleCharsAfterExtLabel = "[:\\..]?[  \\t,-]*"; var optionalExtnSuffix = "#?"; var explicitExtLabels = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"; var ambiguousExtLabels = "(?:[xx##~~]|int|int)"; var ambiguousSeparator = "[- ]+"; var possibleSeparatorsNumberExtLabelNoComma = "[  \\t]*"; var autoDiallingAndExtLabelsFound = "(?:,{2}|;)"; var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel); var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix; var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix; var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#"; var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix; var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix; return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn; } var MIN_LENGTH_PHONE_NUMBER_PATTERN = "[" + VALID_DIGITS + "]{" + MIN_LENGTH_FOR_NSN + "}"; var VALID_PHONE_NUMBER = "[" + PLUS_CHARS + "]{0,1}(?:[" + VALID_PUNCTUATION + "]*[" + VALID_DIGITS + "]){3,}[" + VALID_PUNCTUATION + VALID_DIGITS + "]*"; var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp("^[" + PLUS_CHARS + "]{0,1}(?:[" + VALID_PUNCTUATION + "]*[" + VALID_DIGITS + "]){1,2}$", "i"); var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + // Phone number extensions "(?:" + createExtensionPattern() + ")?"; var VALID_PHONE_NUMBER_PATTERN = new RegExp( // Either a short two-digit-only phone number "^" + MIN_LENGTH_PHONE_NUMBER_PATTERN + "$|^" + VALID_PHONE_NUMBER_WITH_EXTENSION + "$", "i" ); function isViablePhoneNumber(number2) { return number2.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number2); } function isViablePhoneNumberStart(number2) { return VALID_PHONE_NUMBER_START_REG_EXP.test(number2); } var EXTN_PATTERN = new RegExp("(?:" + createExtensionPattern() + ")$", "i"); function extractExtension(number2) { var start = number2.search(EXTN_PATTERN); if (start < 0) { return {}; } var numberWithoutExtension = number2.slice(0, start); var matches = number2.match(EXTN_PATTERN); var i2 = 1; while (i2 < matches.length) { if (matches[i2]) { return { number: numberWithoutExtension, ext: matches[i2] }; } i2++; } } function _createForOfIteratorHelperLoose$8(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$b(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$b(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$b(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$b(o2, minLen); } function _arrayLikeToArray$b(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } var DIGITS = { "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "0": "0", // Fullwidth digit 0 "1": "1", // Fullwidth digit 1 "2": "2", // Fullwidth digit 2 "3": "3", // Fullwidth digit 3 "4": "4", // Fullwidth digit 4 "5": "5", // Fullwidth digit 5 "6": "6", // Fullwidth digit 6 "7": "7", // Fullwidth digit 7 "8": "8", // Fullwidth digit 8 "9": "9", // Fullwidth digit 9 "٠": "0", // Arabic-indic digit 0 "١": "1", // Arabic-indic digit 1 "٢": "2", // Arabic-indic digit 2 "٣": "3", // Arabic-indic digit 3 "٤": "4", // Arabic-indic digit 4 "٥": "5", // Arabic-indic digit 5 "٦": "6", // Arabic-indic digit 6 "٧": "7", // Arabic-indic digit 7 "٨": "8", // Arabic-indic digit 8 "٩": "9", // Arabic-indic digit 9 "۰": "0", // Eastern-Arabic digit 0 "۱": "1", // Eastern-Arabic digit 1 "۲": "2", // Eastern-Arabic digit 2 "۳": "3", // Eastern-Arabic digit 3 "۴": "4", // Eastern-Arabic digit 4 "۵": "5", // Eastern-Arabic digit 5 "۶": "6", // Eastern-Arabic digit 6 "۷": "7", // Eastern-Arabic digit 7 "۸": "8", // Eastern-Arabic digit 8 "۹": "9" // Eastern-Arabic digit 9 }; function parseDigit(character) { return DIGITS[character]; } function parseDigits(string) { var result2 = ""; for (var _iterator = _createForOfIteratorHelperLoose$8(string.split("")), _step; !(_step = _iterator()).done; ) { var character = _step.value; var digit = parseDigit(character); if (digit) { result2 += digit; } } return result2; } function _createForOfIteratorHelperLoose$7(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$a(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$a(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$a(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$a(o2, minLen); } function _arrayLikeToArray$a(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function parseIncompletePhoneNumber(string) { var result2 = ""; for (var _iterator = _createForOfIteratorHelperLoose$7(string.split("")), _step; !(_step = _iterator()).done; ) { var character = _step.value; result2 += parsePhoneNumberCharacter(character, result2) || ""; } return result2; } function parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent) { if (character === "+") { if (prevParsedCharacters) { if (typeof emitEvent === "function") { emitEvent("end"); } return; } return "+"; } return parseDigit(character); } function _createForOfIteratorHelperLoose$6(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$9(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$9(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$9(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$9(o2, minLen); } function _arrayLikeToArray$9(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function mergeArrays(a2, b2) { var merged = a2.slice(); for (var _iterator = _createForOfIteratorHelperLoose$6(b2), _step; !(_step = _iterator()).done; ) { var element = _step.value; if (a2.indexOf(element) < 0) { merged.push(element); } } return merged.sort(function(a3, b3) { return a3 - b3; }); } function checkNumberLength(nationalNumber, metadata2) { return checkNumberLengthForType(nationalNumber, void 0, metadata2); } function checkNumberLengthForType(nationalNumber, type, metadata2) { var type_info = metadata2.type(type); var possible_lengths = type_info && type_info.possibleLengths() || metadata2.possibleLengths(); if (!possible_lengths) { return "IS_POSSIBLE"; } if (type === "FIXED_LINE_OR_MOBILE") { if (!metadata2.type("FIXED_LINE")) { return checkNumberLengthForType(nationalNumber, "MOBILE", metadata2); } var mobile_type = metadata2.type("MOBILE"); if (mobile_type) { possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths()); } } else if (type && !type_info) { return "INVALID_LENGTH"; } var actual_length = nationalNumber.length; var minimum_length = possible_lengths[0]; if (minimum_length === actual_length) { return "IS_POSSIBLE"; } if (minimum_length > actual_length) { return "TOO_SHORT"; } if (possible_lengths[possible_lengths.length - 1] < actual_length) { return "TOO_LONG"; } return possible_lengths.indexOf(actual_length, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH"; } function isPossiblePhoneNumber(input, options2, metadata2) { if (options2 === void 0) { options2 = {}; } metadata2 = new Metadata(metadata2); if (options2.v2) { if (!input.countryCallingCode) { throw new Error("Invalid phone number object passed"); } metadata2.selectNumberingPlan(input.countryCallingCode); } else { if (!input.phone) { return false; } if (input.country) { if (!metadata2.hasCountry(input.country)) { throw new Error("Unknown country: ".concat(input.country)); } metadata2.country(input.country); } else { if (!input.countryCallingCode) { throw new Error("Invalid phone number object passed"); } metadata2.selectNumberingPlan(input.countryCallingCode); } } if (metadata2.possibleLengths()) { return isPossibleNumber(input.phone || input.nationalNumber, metadata2); } else { if (input.countryCallingCode && metadata2.isNonGeographicCallingCode(input.countryCallingCode)) { return true; } else { throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.'); } } } function isPossibleNumber(nationalNumber, metadata2) { switch (checkNumberLength(nationalNumber, metadata2)) { case "IS_POSSIBLE": return true; default: return false; } } function matchesEntirely(text, regular_expression) { text = text || ""; return new RegExp("^(?:" + regular_expression + ")$").test(text); } function _createForOfIteratorHelperLoose$5(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$8(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$8(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$8(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$8(o2, minLen); } function _arrayLikeToArray$8(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } var NON_FIXED_LINE_PHONE_TYPES = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"]; function getNumberType(input, options2, metadata2) { options2 = options2 || {}; if (!input.country && !input.countryCallingCode) { return; } metadata2 = new Metadata(metadata2); metadata2.selectNumberingPlan(input.country, input.countryCallingCode); var nationalNumber = options2.v2 ? input.nationalNumber : input.phone; if (!matchesEntirely(nationalNumber, metadata2.nationalNumberPattern())) { return; } if (isNumberTypeEqualTo(nationalNumber, "FIXED_LINE", metadata2)) { if (metadata2.type("MOBILE") && metadata2.type("MOBILE").pattern() === "") { return "FIXED_LINE_OR_MOBILE"; } if (!metadata2.type("MOBILE")) { return "FIXED_LINE_OR_MOBILE"; } if (isNumberTypeEqualTo(nationalNumber, "MOBILE", metadata2)) { return "FIXED_LINE_OR_MOBILE"; } return "FIXED_LINE"; } for (var _iterator = _createForOfIteratorHelperLoose$5(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done; ) { var type = _step.value; if (isNumberTypeEqualTo(nationalNumber, type, metadata2)) { return type; } } } function isNumberTypeEqualTo(nationalNumber, type, metadata2) { type = metadata2.type(type); if (!type || !type.pattern()) { return false; } if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) { return false; } return matchesEntirely(nationalNumber, type.pattern()); } function isValidNumber(input, options2, metadata2) { options2 = options2 || {}; metadata2 = new Metadata(metadata2); metadata2.selectNumberingPlan(input.country, input.countryCallingCode); if (metadata2.hasTypes()) { return getNumberType(input, options2, metadata2.metadata) !== void 0; } var nationalNumber = options2.v2 ? input.nationalNumber : input.phone; return matchesEntirely(nationalNumber, metadata2.nationalNumberPattern()); } function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata2) { var _metadata = new Metadata(metadata2); var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode); if (!possibleCountries) { return []; } return possibleCountries.filter(function(country) { return couldNationalNumberBelongToCountry(nationalNumber, country, metadata2); }); } function couldNationalNumberBelongToCountry(nationalNumber, country, metadata2) { var _metadata = new Metadata(metadata2); _metadata.selectNumberingPlan(country); if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) { return true; } return false; } function applyInternationalSeparatorStyle(formattedNumber) { return formattedNumber.replace(new RegExp("[".concat(VALID_PUNCTUATION, "]+"), "g"), " ").trim(); } var FIRST_GROUP_PATTERN = /(\$\d)/; function formatNationalNumberUsingFormat(number2, format2, _ref) { var useInternationalFormat = _ref.useInternationalFormat, withNationalPrefix = _ref.withNationalPrefix; _ref.carrierCode; _ref.metadata; var formattedNumber = number2.replace(new RegExp(format2.pattern()), useInternationalFormat ? format2.internationalFormat() : ( // This library doesn't use `domestic_carrier_code_formatting_rule`, // because that one is only used when formatting phone numbers // for dialing from a mobile phone, and this is not a dialing library. // carrierCode && format.domesticCarrierCodeFormattingRule() // // First, replace the $CC in the formatting rule with the desired carrier code. // // Then, replace the $FG in the formatting rule with the first group // // and the carrier code combined in the appropriate way. // ? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode)) // : ( // withNationalPrefix && format.nationalPrefixFormattingRule() // ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) // : format.format() // ) withNationalPrefix && format2.nationalPrefixFormattingRule() ? format2.format().replace(FIRST_GROUP_PATTERN, format2.nationalPrefixFormattingRule()) : format2.format() )); if (useInternationalFormat) { return applyInternationalSeparatorStyle(formattedNumber); } return formattedNumber; } var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/; function getIddPrefix(country, callingCode, metadata2) { var countryMetadata = new Metadata(metadata2); countryMetadata.selectNumberingPlan(country, callingCode); if (countryMetadata.defaultIDDPrefix()) { return countryMetadata.defaultIDDPrefix(); } if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) { return countryMetadata.IDDPrefix(); } } function formatRFC3966(_ref) { var number2 = _ref.number, ext = _ref.ext; if (!number2) { return ""; } if (number2[0] !== "+") { throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.'); } return "tel:".concat(number2).concat(ext ? ";ext=" + ext : ""); } function _createForOfIteratorHelperLoose$4(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$7(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$7(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$7(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$7(o2, minLen); } function _arrayLikeToArray$7(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function ownKeys$4(object2, enumerableOnly) { var keys = Object.keys(object2); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object2); enumerableOnly && (symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object2, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread$4(target) { for (var i2 = 1; i2 < arguments.length; i2++) { var source = null != arguments[i2] ? arguments[i2] : {}; i2 % 2 ? ownKeys$4(Object(source), true).forEach(function(key) { _defineProperty$4(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var DEFAULT_OPTIONS = { formatExtension: function formatExtension(formattedNumber, extension, metadata2) { return "".concat(formattedNumber).concat(metadata2.ext()).concat(extension); } }; function formatNumber(input, format2, options2, metadata2) { if (options2) { options2 = _objectSpread$4(_objectSpread$4({}, DEFAULT_OPTIONS), options2); } else { options2 = DEFAULT_OPTIONS; } metadata2 = new Metadata(metadata2); if (input.country && input.country !== "001") { if (!metadata2.hasCountry(input.country)) { throw new Error("Unknown country: ".concat(input.country)); } metadata2.country(input.country); } else if (input.countryCallingCode) { metadata2.selectNumberingPlan(input.countryCallingCode); } else return input.phone || ""; var countryCallingCode = metadata2.countryCallingCode(); var nationalNumber = options2.v2 ? input.nationalNumber : input.phone; var number2; switch (format2) { case "NATIONAL": if (!nationalNumber) { return ""; } number2 = formatNationalNumber$1(nationalNumber, input.carrierCode, "NATIONAL", metadata2, options2); return addExtension(number2, input.ext, metadata2, options2.formatExtension); case "INTERNATIONAL": if (!nationalNumber) { return "+".concat(countryCallingCode); } number2 = formatNationalNumber$1(nationalNumber, null, "INTERNATIONAL", metadata2, options2); number2 = "+".concat(countryCallingCode, " ").concat(number2); return addExtension(number2, input.ext, metadata2, options2.formatExtension); case "E.164": return "+".concat(countryCallingCode).concat(nationalNumber); case "RFC3966": return formatRFC3966({ number: "+".concat(countryCallingCode).concat(nationalNumber), ext: input.ext }); case "IDD": if (!options2.fromCountry) { return; } var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options2.fromCountry, metadata2); return addExtension(formattedNumber, input.ext, metadata2, options2.formatExtension); default: throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(format2, '"')); } } function formatNationalNumber$1(number2, carrierCode, formatAs, metadata2, options2) { var format2 = chooseFormatForNumber(metadata2.formats(), number2); if (!format2) { return number2; } return formatNationalNumberUsingFormat(number2, format2, { useInternationalFormat: formatAs === "INTERNATIONAL", withNationalPrefix: format2.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options2 && options2.nationalPrefix === false ? false : true, carrierCode, metadata: metadata2 }); } function chooseFormatForNumber(availableFormats, nationalNnumber) { for (var _iterator = _createForOfIteratorHelperLoose$4(availableFormats), _step; !(_step = _iterator()).done; ) { var format2 = _step.value; if (format2.leadingDigitsPatterns().length > 0) { var lastLeadingDigitsPattern = format2.leadingDigitsPatterns()[format2.leadingDigitsPatterns().length - 1]; if (nationalNnumber.search(lastLeadingDigitsPattern) !== 0) { continue; } } if (matchesEntirely(nationalNnumber, format2.pattern())) { return format2; } } } function addExtension(formattedNumber, ext, metadata2, formatExtension) { return ext ? formatExtension(formattedNumber, ext, metadata2) : formattedNumber; } function formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata2) { var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata2.metadata); if (fromCountryCallingCode === countryCallingCode) { var formattedNumber = formatNationalNumber$1(nationalNumber, carrierCode, "NATIONAL", metadata2); if (countryCallingCode === "1") { return countryCallingCode + " " + formattedNumber; } return formattedNumber; } var iddPrefix = getIddPrefix(fromCountry, void 0, metadata2.metadata); if (iddPrefix) { return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber$1(nationalNumber, null, "INTERNATIONAL", metadata2)); } } function ownKeys$3(object2, enumerableOnly) { var keys = Object.keys(object2); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object2); enumerableOnly && (symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object2, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread$3(target) { for (var i2 = 1; i2 < arguments.length; i2++) { var source = null != arguments[i2] ? arguments[i2] : {}; i2 % 2 ? ownKeys$3(Object(source), true).forEach(function(key) { _defineProperty$3(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck$6(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$6(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$6(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$6(Constructor.prototype, protoProps); if (staticProps) _defineProperties$6(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var PhoneNumber = /* @__PURE__ */ function() { function PhoneNumber2(countryOrCountryCallingCode, nationalNumber, metadata2) { _classCallCheck$6(this, PhoneNumber2); if (!countryOrCountryCallingCode) { throw new TypeError("`country` or `countryCallingCode` not passed"); } if (!nationalNumber) { throw new TypeError("`nationalNumber` not passed"); } if (!metadata2) { throw new TypeError("`metadata` not passed"); } var _getCountryAndCountry = getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadata2), country = _getCountryAndCountry.country, countryCallingCode = _getCountryAndCountry.countryCallingCode; this.country = country; this.countryCallingCode = countryCallingCode; this.nationalNumber = nationalNumber; this.number = "+" + this.countryCallingCode + this.nationalNumber; this.getMetadata = function() { return metadata2; }; } _createClass$6(PhoneNumber2, [{ key: "setExt", value: function setExt(ext) { this.ext = ext; } }, { key: "getPossibleCountries", value: function getPossibleCountries() { if (this.country) { return [this.country]; } return getPossibleCountriesForNumber(this.countryCallingCode, this.nationalNumber, this.getMetadata()); } }, { key: "isPossible", value: function isPossible() { return isPossiblePhoneNumber(this, { v2: true }, this.getMetadata()); } }, { key: "isValid", value: function isValid() { return isValidNumber(this, { v2: true }, this.getMetadata()); } }, { key: "isNonGeographic", value: function isNonGeographic() { var metadata2 = new Metadata(this.getMetadata()); return metadata2.isNonGeographicCallingCode(this.countryCallingCode); } }, { key: "isEqual", value: function isEqual(phoneNumber) { return this.number === phoneNumber.number && this.ext === phoneNumber.ext; } // This function was originally meant to be an equivalent for `validatePhoneNumberLength()`, // but later it was found out that it doesn't include the possible `TOO_SHORT` result // returned from `parsePhoneNumberWithError()` in the original `validatePhoneNumberLength()`, // so eventually I simply commented out this method from the `PhoneNumber` class // and just left the `validatePhoneNumberLength()` function, even though that one would require // and additional step to also validate the actual country / calling code of the phone number. // validateLength() { // const metadata = new Metadata(this.getMetadata()) // metadata.selectNumberingPlan(this.countryCallingCode) // const result = checkNumberLength(this.nationalNumber, metadata) // if (result !== 'IS_POSSIBLE') { // return result // } // } }, { key: "getType", value: function getType2() { return getNumberType(this, { v2: true }, this.getMetadata()); } }, { key: "format", value: function format2(_format, options2) { return formatNumber(this, _format, options2 ? _objectSpread$3(_objectSpread$3({}, options2), {}, { v2: true }) : { v2: true }, this.getMetadata()); } }, { key: "formatNational", value: function formatNational(options2) { return this.format("NATIONAL", options2); } }, { key: "formatInternational", value: function formatInternational(options2) { return this.format("INTERNATIONAL", options2); } }, { key: "getURI", value: function getURI(options2) { return this.format("RFC3966", options2); } }]); return PhoneNumber2; }(); var isCountryCode = function isCountryCode2(value) { return /^[A-Z]{2}$/.test(value); }; function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) { var country; var countryCallingCode; var metadata2 = new Metadata(metadataJson); if (isCountryCode(countryOrCountryCallingCode)) { country = countryOrCountryCallingCode; metadata2.selectNumberingPlan(country); countryCallingCode = metadata2.countryCallingCode(); } else { countryCallingCode = countryOrCountryCallingCode; } return { country, countryCallingCode }; } var CAPTURING_DIGIT_PATTERN = new RegExp("([" + VALID_DIGITS + "])"); function stripIddPrefix(number2, country, callingCode, metadata2) { if (!country) { return; } var countryMetadata = new Metadata(metadata2); countryMetadata.selectNumberingPlan(country, callingCode); var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix()); if (number2.search(IDDPrefixPattern) !== 0) { return; } number2 = number2.slice(number2.match(IDDPrefixPattern)[0].length); var matchedGroups = number2.match(CAPTURING_DIGIT_PATTERN); if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) { if (matchedGroups[1] === "0") { return; } } return number2; } function extractNationalNumberFromPossiblyIncompleteNumber(number2, metadata2) { if (number2 && metadata2.numberingPlan.nationalPrefixForParsing()) { var prefixPattern = new RegExp("^(?:" + metadata2.numberingPlan.nationalPrefixForParsing() + ")"); var prefixMatch = prefixPattern.exec(number2); if (prefixMatch) { var nationalNumber; var carrierCode; var capturedGroupsCount = prefixMatch.length - 1; var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount]; if (metadata2.nationalPrefixTransformRule() && hasCapturedGroups) { nationalNumber = number2.replace(prefixPattern, metadata2.nationalPrefixTransformRule()); if (capturedGroupsCount > 1) { carrierCode = prefixMatch[1]; } } else { var prefixBeforeNationalNumber = prefixMatch[0]; nationalNumber = number2.slice(prefixBeforeNationalNumber.length); if (hasCapturedGroups) { carrierCode = prefixMatch[1]; } } var nationalPrefix; if (hasCapturedGroups) { var possiblePositionOfTheFirstCapturedGroup = number2.indexOf(prefixMatch[1]); var possibleNationalPrefix = number2.slice(0, possiblePositionOfTheFirstCapturedGroup); if (possibleNationalPrefix === metadata2.numberingPlan.nationalPrefix()) { nationalPrefix = metadata2.numberingPlan.nationalPrefix(); } } else { nationalPrefix = prefixMatch[0]; } return { nationalNumber, nationalPrefix, carrierCode }; } } return { nationalNumber: number2 }; } function extractNationalNumber(number2, metadata2) { var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number2, metadata2), carrierCode = _extractNationalNumbe.carrierCode, nationalNumber = _extractNationalNumbe.nationalNumber; if (nationalNumber !== number2) { if (!shouldHaveExtractedNationalPrefix(number2, nationalNumber, metadata2)) { return { nationalNumber: number2 }; } if (metadata2.possibleLengths()) { if (!isPossibleIncompleteNationalNumber(nationalNumber, metadata2)) { return { nationalNumber: number2 }; } } } return { nationalNumber, carrierCode }; } function shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata2) { if (matchesEntirely(nationalNumberBefore, metadata2.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata2.nationalNumberPattern())) { return false; } return true; } function isPossibleIncompleteNationalNumber(nationalNumber, metadata2) { switch (checkNumberLength(nationalNumber, metadata2)) { case "TOO_SHORT": case "INVALID_LENGTH": return false; default: return true; } } function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number2, country, callingCode, metadata2) { var countryCallingCode = country ? getCountryCallingCode(country, metadata2) : callingCode; if (number2.indexOf(countryCallingCode) === 0) { metadata2 = new Metadata(metadata2); metadata2.selectNumberingPlan(country, callingCode); var possibleShorterNumber = number2.slice(countryCallingCode.length); var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, metadata2), possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber; var _extractNationalNumbe2 = extractNationalNumber(number2, metadata2), nationalNumber = _extractNationalNumbe2.nationalNumber; if (!matchesEntirely(nationalNumber, metadata2.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata2.nationalNumberPattern()) || checkNumberLength(nationalNumber, metadata2) === "TOO_LONG") { return { countryCallingCode, number: possibleShorterNumber }; } } return { number: number2 }; } function extractCountryCallingCode(number2, country, callingCode, metadata2) { if (!number2) { return {}; } var isNumberWithIddPrefix; if (number2[0] !== "+") { var numberWithoutIDD = stripIddPrefix(number2, country, callingCode, metadata2); if (numberWithoutIDD && numberWithoutIDD !== number2) { isNumberWithIddPrefix = true; number2 = "+" + numberWithoutIDD; } else { if (country || callingCode) { var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number2, country, callingCode, metadata2), countryCallingCode = _extractCountryCallin.countryCallingCode, shorterNumber = _extractCountryCallin.number; if (countryCallingCode) { return { countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN", countryCallingCode, number: shorterNumber }; } } return { // No need to set it to `UNSPECIFIED`. It can be just `undefined`. // countryCallingCodeSource: 'UNSPECIFIED', number: number2 }; } } if (number2[1] === "0") { return {}; } metadata2 = new Metadata(metadata2); var i2 = 2; while (i2 - 1 <= MAX_LENGTH_COUNTRY_CODE && i2 <= number2.length) { var _countryCallingCode = number2.slice(1, i2); if (metadata2.hasCallingCode(_countryCallingCode)) { metadata2.selectNumberingPlan(_countryCallingCode); return { countryCallingCodeSource: isNumberWithIddPrefix ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN", countryCallingCode: _countryCallingCode, number: number2.slice(i2) }; } i2++; } return {}; } function _createForOfIteratorHelperLoose$3(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$6(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$6(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$6(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$6(o2, minLen); } function _arrayLikeToArray$6(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function getCountryByNationalNumber(nationalPhoneNumber, _ref) { var countries = _ref.countries; _ref.defaultCountry; var metadata2 = _ref.metadata; metadata2 = new Metadata(metadata2); for (var _iterator = _createForOfIteratorHelperLoose$3(countries), _step; !(_step = _iterator()).done; ) { var country = _step.value; metadata2.country(country); if (metadata2.leadingDigits()) { if (nationalPhoneNumber && nationalPhoneNumber.search(metadata2.leadingDigits()) === 0) { return country; } } else if (getNumberType({ phone: nationalPhoneNumber, country }, void 0, metadata2.metadata)) { return country; } } } var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; function getCountryByCallingCode(callingCode, _ref) { var nationalPhoneNumber = _ref.nationalNumber, defaultCountry = _ref.defaultCountry, metadata2 = _ref.metadata; if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) { if (metadata2.isNonGeographicCallingCode(callingCode)) { return "001"; } } var possibleCountries = metadata2.getCountryCodesForCallingCode(callingCode); if (!possibleCountries) { return; } if (possibleCountries.length === 1) { return possibleCountries[0]; } return getCountryByNationalNumber(nationalPhoneNumber, { countries: possibleCountries, defaultCountry, metadata: metadata2.metadata }); } var PLUS_SIGN = "+"; var RFC3966_VISUAL_SEPARATOR_ = "[\\-\\.\\(\\)]?"; var RFC3966_PHONE_DIGIT_ = "([" + VALID_DIGITS + "]|" + RFC3966_VISUAL_SEPARATOR_ + ")"; var RFC3966_GLOBAL_NUMBER_DIGITS_ = "^\\" + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + "*[" + VALID_DIGITS + "]" + RFC3966_PHONE_DIGIT_ + "*$"; var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, "g"); var ALPHANUM_ = VALID_DIGITS; var RFC3966_DOMAINLABEL_ = "[" + ALPHANUM_ + "]+((\\-)*[" + ALPHANUM_ + "])*"; var VALID_ALPHA_ = "a-zA-Z"; var RFC3966_TOPLABEL_ = "[" + VALID_ALPHA_ + "]+((\\-)*[" + ALPHANUM_ + "])*"; var RFC3966_DOMAINNAME_ = "^(" + RFC3966_DOMAINLABEL_ + "\\.)*" + RFC3966_TOPLABEL_ + "\\.?$"; var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, "g"); var RFC3966_PREFIX_ = "tel:"; var RFC3966_PHONE_CONTEXT_ = ";phone-context="; var RFC3966_ISDN_SUBADDRESS_ = ";isub="; function extractPhoneContext(numberToExtractFrom) { var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_); if (indexOfPhoneContext < 0) { return null; } var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length; if (phoneContextStart >= numberToExtractFrom.length) { return ""; } var phoneContextEnd = numberToExtractFrom.indexOf(";", phoneContextStart); if (phoneContextEnd >= 0) { return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd); } else { return numberToExtractFrom.substring(phoneContextStart); } } function isPhoneContextValid(phoneContext) { if (phoneContext === null) { return true; } if (phoneContext.length === 0) { return false; } return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext); } function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) { var extractFormattedPhoneNumber2 = _ref.extractFormattedPhoneNumber; var phoneContext = extractPhoneContext(numberToParse); if (!isPhoneContextValid(phoneContext)) { throw new ParseError("NOT_A_NUMBER"); } var phoneNumberString; if (phoneContext === null) { phoneNumberString = extractFormattedPhoneNumber2(numberToParse) || ""; } else { phoneNumberString = ""; if (phoneContext.charAt(0) === PLUS_SIGN) { phoneNumberString += phoneContext; } var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_); var indexOfNationalNumber; if (indexOfRfc3966Prefix >= 0) { indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length; } else { indexOfNationalNumber = 0; } var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_); phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext); } var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_); if (indexOfIsdn > 0) { phoneNumberString = phoneNumberString.substring(0, indexOfIsdn); } if (phoneNumberString !== "") { return phoneNumberString; } } var MAX_INPUT_STRING_LENGTH = 250; var PHONE_NUMBER_START_PATTERN = new RegExp("[" + PLUS_CHARS + VALID_DIGITS + "]"); var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp("[^" + VALID_DIGITS + "#]+$"); function parse(text, options2, metadata2) { options2 = options2 || {}; metadata2 = new Metadata(metadata2); if (options2.defaultCountry && !metadata2.hasCountry(options2.defaultCountry)) { if (options2.v2) { throw new ParseError("INVALID_COUNTRY"); } throw new Error("Unknown country: ".concat(options2.defaultCountry)); } var _parseInput = parseInput(text, options2.v2, options2.extract), formattedPhoneNumber = _parseInput.number, ext = _parseInput.ext, error2 = _parseInput.error; if (!formattedPhoneNumber) { if (options2.v2) { if (error2 === "TOO_SHORT") { throw new ParseError("TOO_SHORT"); } throw new ParseError("NOT_A_NUMBER"); } return {}; } var _parsePhoneNumber = parsePhoneNumber$4(formattedPhoneNumber, options2.defaultCountry, options2.defaultCallingCode, metadata2), country = _parsePhoneNumber.country, nationalNumber = _parsePhoneNumber.nationalNumber, countryCallingCode = _parsePhoneNumber.countryCallingCode, countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource, carrierCode = _parsePhoneNumber.carrierCode; if (!metadata2.hasSelectedNumberingPlan()) { if (options2.v2) { throw new ParseError("INVALID_COUNTRY"); } return {}; } if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) { if (options2.v2) { throw new ParseError("TOO_SHORT"); } return {}; } if (nationalNumber.length > MAX_LENGTH_FOR_NSN) { if (options2.v2) { throw new ParseError("TOO_LONG"); } return {}; } if (options2.v2) { var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata2.metadata); if (country) { phoneNumber.country = country; } if (carrierCode) { phoneNumber.carrierCode = carrierCode; } if (ext) { phoneNumber.ext = ext; } phoneNumber.__countryCallingCodeSource = countryCallingCodeSource; return phoneNumber; } var valid = (options2.extended ? metadata2.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata2.nationalNumberPattern()) : false; if (!options2.extended) { return valid ? result(country, nationalNumber, ext) : {}; } return { country, countryCallingCode, carrierCode, valid, possible: valid ? true : options2.extended === true && metadata2.possibleLengths() && isPossibleNumber(nationalNumber, metadata2) ? true : false, phone: nationalNumber, ext }; } function _extractFormattedPhoneNumber(text, extract, throwOnError) { if (!text) { return; } if (text.length > MAX_INPUT_STRING_LENGTH) { if (throwOnError) { throw new ParseError("TOO_LONG"); } return; } if (extract === false) { return text; } var startsAt = text.search(PHONE_NUMBER_START_PATTERN); if (startsAt < 0) { return; } return text.slice(startsAt).replace(AFTER_PHONE_NUMBER_END_PATTERN, ""); } function parseInput(text, v2, extract) { var number2 = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, { extractFormattedPhoneNumber: function extractFormattedPhoneNumber2(text2) { return _extractFormattedPhoneNumber(text2, extract, v2); } }); if (!number2) { return {}; } if (!isViablePhoneNumber(number2)) { if (isViablePhoneNumberStart(number2)) { return { error: "TOO_SHORT" }; } return {}; } var withExtensionStripped = extractExtension(number2); if (withExtensionStripped.ext) { return withExtensionStripped; } return { number: number2 }; } function result(country, nationalNumber, ext) { var result2 = { country, phone: nationalNumber }; if (ext) { result2.ext = ext; } return result2; } function parsePhoneNumber$4(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata2) { var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata2.metadata), countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource, countryCallingCode = _extractCountryCallin.countryCallingCode, number2 = _extractCountryCallin.number; var country; if (countryCallingCode) { metadata2.selectNumberingPlan(countryCallingCode); } else if (number2 && (defaultCountry || defaultCallingCode)) { metadata2.selectNumberingPlan(defaultCountry, defaultCallingCode); if (defaultCountry) { country = defaultCountry; } countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata2.metadata); } else return {}; if (!number2) { return { countryCallingCodeSource, countryCallingCode }; } var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number2), metadata2), nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode; var exactCountry = getCountryByCallingCode(countryCallingCode, { nationalNumber, defaultCountry, metadata: metadata2 }); if (exactCountry) { country = exactCountry; if (exactCountry === "001") ; else { metadata2.country(country); } } return { country, countryCallingCode, countryCallingCodeSource, nationalNumber, carrierCode }; } function ownKeys$2(object2, enumerableOnly) { var keys = Object.keys(object2); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object2); enumerableOnly && (symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object2, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread$2(target) { for (var i2 = 1; i2 < arguments.length; i2++) { var source = null != arguments[i2] ? arguments[i2] : {}; i2 % 2 ? ownKeys$2(Object(source), true).forEach(function(key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function parsePhoneNumberWithError(text, options2, metadata2) { return parse(text, _objectSpread$2(_objectSpread$2({}, options2), {}, { v2: true }), metadata2); } function ownKeys$1(object2, enumerableOnly) { var keys = Object.keys(object2); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object2); enumerableOnly && (symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object2, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread$1(target) { for (var i2 = 1; i2 < arguments.length; i2++) { var source = null != arguments[i2] ? arguments[i2] : {}; i2 % 2 ? ownKeys$1(Object(source), true).forEach(function(key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray$2(arr, i2) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i2) || _unsupportedIterableToArray$5(arr, i2) || _nonIterableRest$2(); } function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$5(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$5(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$5(o2, minLen); } function _arrayLikeToArray$5(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function _iterableToArrayLimit$2(arr, i2) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s2, _e2; try { for (_i = _i.call(arr); !(_n = (_s2 = _i.next()).done); _n = true) { _arr.push(_s2.value); if (i2 && _arr.length === i2) break; } } catch (err) { _d = true; _e2 = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e2; } } return _arr; } function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; } function normalizeArguments(args) { var _Array$prototype$slic = Array.prototype.slice.call(args), _Array$prototype$slic2 = _slicedToArray$2(_Array$prototype$slic, 4), arg_1 = _Array$prototype$slic2[0], arg_2 = _Array$prototype$slic2[1], arg_3 = _Array$prototype$slic2[2], arg_4 = _Array$prototype$slic2[3]; var text; var options2; var metadata2; if (typeof arg_1 === "string") { text = arg_1; } else throw new TypeError("A text for parsing must be a string."); if (!arg_2 || typeof arg_2 === "string") { if (arg_4) { options2 = arg_3; metadata2 = arg_4; } else { options2 = void 0; metadata2 = arg_3; } if (arg_2) { options2 = _objectSpread$1({ defaultCountry: arg_2 }, options2); } } else if (isObject$2(arg_2)) { if (arg_3) { options2 = arg_2; metadata2 = arg_3; } else { metadata2 = arg_2; } } else throw new Error("Invalid second argument: ".concat(arg_2)); return { text, options: options2, metadata: metadata2 }; } function ownKeys(object2, enumerableOnly) { var keys = Object.keys(object2); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object2); enumerableOnly && (symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object2, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i2 = 1; i2 < arguments.length; i2++) { var source = null != arguments[i2] ? arguments[i2] : {}; i2 % 2 ? ownKeys(Object(source), true).forEach(function(key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function parsePhoneNumber$3(text, options2, metadata2) { if (options2 && options2.defaultCountry && !isSupportedCountry(options2.defaultCountry, metadata2)) { options2 = _objectSpread(_objectSpread({}, options2), {}, { defaultCountry: void 0 }); } try { return parsePhoneNumberWithError(text, options2, metadata2); } catch (error2) { if (error2 instanceof ParseError) ; else { throw error2; } } } function parsePhoneNumber$2() { var _normalizeArguments = normalizeArguments(arguments), text = _normalizeArguments.text, options2 = _normalizeArguments.options, metadata2 = _normalizeArguments.metadata; return parsePhoneNumber$3(text, options2, metadata2); } function _classCallCheck$5(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$5(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$5(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$5(Constructor.prototype, protoProps); if (staticProps) _defineProperties$5(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var AsYouTypeState = /* @__PURE__ */ function() { function AsYouTypeState2(_ref) { var onCountryChange = _ref.onCountryChange, onCallingCodeChange = _ref.onCallingCodeChange; _classCallCheck$5(this, AsYouTypeState2); this.onCountryChange = onCountryChange; this.onCallingCodeChange = onCallingCodeChange; } _createClass$5(AsYouTypeState2, [{ key: "reset", value: function reset(_ref2) { var country = _ref2.country, callingCode = _ref2.callingCode; this.international = false; this.missingPlus = false; this.IDDPrefix = void 0; this.callingCode = void 0; this.digits = ""; this.resetNationalSignificantNumber(); this.initCountryAndCallingCode(country, callingCode); } }, { key: "resetNationalSignificantNumber", value: function resetNationalSignificantNumber() { this.nationalSignificantNumber = this.getNationalDigits(); this.nationalSignificantNumberMatchesInput = true; this.nationalPrefix = void 0; this.carrierCode = void 0; this.complexPrefixBeforeNationalSignificantNumber = void 0; } }, { key: "update", value: function update(properties) { for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; this[key] = properties[key]; } } }, { key: "initCountryAndCallingCode", value: function initCountryAndCallingCode(country, callingCode) { this.setCountry(country); this.setCallingCode(callingCode); } }, { key: "setCountry", value: function setCountry(country) { this.country = country; this.onCountryChange(country); } }, { key: "setCallingCode", value: function setCallingCode(callingCode) { this.callingCode = callingCode; this.onCallingCodeChange(callingCode, this.country); } }, { key: "startInternationalNumber", value: function startInternationalNumber(country, callingCode) { this.international = true; this.initCountryAndCallingCode(country, callingCode); } }, { key: "appendDigits", value: function appendDigits(nextDigits) { this.digits += nextDigits; } }, { key: "appendNationalSignificantNumberDigits", value: function appendNationalSignificantNumberDigits(nextDigits) { this.nationalSignificantNumber += nextDigits; } /** * Returns the part of `this.digits` that corresponds to the national number. * Basically, all digits that have been input by the user, except for the * international prefix and the country calling code part * (if the number is an international one). * @return {string} */ }, { key: "getNationalDigits", value: function getNationalDigits() { if (this.international) { return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0)); } return this.digits; } }, { key: "getDigitsWithoutInternationalPrefix", value: function getDigitsWithoutInternationalPrefix() { if (this.international) { if (this.IDDPrefix) { return this.digits.slice(this.IDDPrefix.length); } } return this.digits; } }]); return AsYouTypeState2; }(); function _createForOfIteratorHelperLoose$2(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$4(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$4(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$4(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$4(o2, minLen); } function _arrayLikeToArray$4(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } var DIGIT_PLACEHOLDER = "x"; var DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER); function repeat(string, times2) { if (times2 < 1) { return ""; } var result2 = ""; while (times2 > 1) { if (times2 & 1) { result2 += string; } times2 >>= 1; string += string; } return result2 + string; } function cutAndStripNonPairedParens(string, cutBeforeIndex) { if (string[cutBeforeIndex] === ")") { cutBeforeIndex++; } return stripNonPairedParens(string.slice(0, cutBeforeIndex)); } function stripNonPairedParens(string) { var dangling_braces = []; var i2 = 0; while (i2 < string.length) { if (string[i2] === "(") { dangling_braces.push(i2); } else if (string[i2] === ")") { dangling_braces.pop(); } i2++; } var start = 0; var cleared_string = ""; dangling_braces.push(string.length); for (var _i = 0, _dangling_braces = dangling_braces; _i < _dangling_braces.length; _i++) { var index2 = _dangling_braces[_i]; cleared_string += string.slice(start, index2); start = index2 + 1; } return cleared_string; } function populateTemplateWithDigits(template, position, digits2) { for (var _iterator2 = _createForOfIteratorHelperLoose$2(digits2.split("")), _step2; !(_step2 = _iterator2()).done; ) { var digit = _step2.value; if (template.slice(position + 1).search(DIGIT_PLACEHOLDER_MATCHER) < 0) { return; } position = template.search(DIGIT_PLACEHOLDER_MATCHER); template = template.replace(DIGIT_PLACEHOLDER_MATCHER, digit); } return [template, position]; } function formatCompleteNumber(state, format2, _ref) { var metadata2 = _ref.metadata, shouldTryNationalPrefixFormattingRule = _ref.shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref.getSeparatorAfterNationalPrefix; var matcher = new RegExp("^(?:".concat(format2.pattern(), ")$")); if (matcher.test(state.nationalSignificantNumber)) { return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format2, { metadata: metadata2, shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix }); } } function canFormatCompleteNumber(nationalSignificantNumber, metadata2) { return checkNumberLength(nationalSignificantNumber, metadata2) === "IS_POSSIBLE"; } function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format2, _ref2) { var metadata2 = _ref2.metadata, shouldTryNationalPrefixFormattingRule = _ref2.shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref2.getSeparatorAfterNationalPrefix; state.nationalSignificantNumber; state.international; state.nationalPrefix; state.carrierCode; if (shouldTryNationalPrefixFormattingRule(format2)) { var formattedNumber = formatNationalNumber(state, format2, { useNationalPrefixFormattingRule: true, getSeparatorAfterNationalPrefix, metadata: metadata2 }); if (formattedNumber) { return formattedNumber; } } return formatNationalNumber(state, format2, { useNationalPrefixFormattingRule: false, getSeparatorAfterNationalPrefix, metadata: metadata2 }); } function formatNationalNumber(state, format2, _ref3) { var metadata2 = _ref3.metadata, useNationalPrefixFormattingRule = _ref3.useNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref3.getSeparatorAfterNationalPrefix; var formattedNationalNumber = formatNationalNumberUsingFormat(state.nationalSignificantNumber, format2, { carrierCode: state.carrierCode, useInternationalFormat: state.international, withNationalPrefix: useNationalPrefixFormattingRule, metadata: metadata2 }); if (!useNationalPrefixFormattingRule) { if (state.nationalPrefix) { formattedNationalNumber = state.nationalPrefix + getSeparatorAfterNationalPrefix(format2) + formattedNationalNumber; } else if (state.complexPrefixBeforeNationalSignificantNumber) { formattedNationalNumber = state.complexPrefixBeforeNationalSignificantNumber + " " + formattedNationalNumber; } } if (isValidFormattedNationalNumber(formattedNationalNumber, state)) { return formattedNationalNumber; } } function isValidFormattedNationalNumber(formattedNationalNumber, state) { return parseDigits(formattedNationalNumber) === state.getNationalDigits(); } function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$4(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$4(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$4(Constructor.prototype, protoProps); if (staticProps) _defineProperties$4(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var PatternParser = /* @__PURE__ */ function() { function PatternParser2() { _classCallCheck$4(this, PatternParser2); } _createClass$4(PatternParser2, [{ key: "parse", value: function parse2(pattern2) { this.context = [{ or: true, instructions: [] }]; this.parsePattern(pattern2); if (this.context.length !== 1) { throw new Error("Non-finalized contexts left when pattern parse ended"); } var _this$context$ = this.context[0], branches = _this$context$.branches, instructions = _this$context$.instructions; if (branches) { return { op: "|", args: branches.concat([expandSingleElementArray(instructions)]) }; } if (instructions.length === 0) { throw new Error("Pattern is required"); } if (instructions.length === 1) { return instructions[0]; } return instructions; } }, { key: "startContext", value: function startContext(context) { this.context.push(context); } }, { key: "endContext", value: function endContext() { this.context.pop(); } }, { key: "getContext", value: function getContext() { return this.context[this.context.length - 1]; } }, { key: "parsePattern", value: function parsePattern(pattern2) { if (!pattern2) { throw new Error("Pattern is required"); } var match = pattern2.match(OPERATOR); if (!match) { if (ILLEGAL_CHARACTER_REGEXP.test(pattern2)) { throw new Error("Illegal characters found in a pattern: ".concat(pattern2)); } this.getContext().instructions = this.getContext().instructions.concat(pattern2.split("")); return; } var operator = match[1]; var before = pattern2.slice(0, match.index); var rightPart = pattern2.slice(match.index + operator.length); switch (operator) { case "(?:": if (before) { this.parsePattern(before); } this.startContext({ or: true, instructions: [], branches: [] }); break; case ")": if (!this.getContext().or) { throw new Error('")" operator must be preceded by "(?:" operator'); } if (before) { this.parsePattern(before); } if (this.getContext().instructions.length === 0) { throw new Error('No instructions found after "|" operator in an "or" group'); } var _this$getContext = this.getContext(), branches = _this$getContext.branches; branches.push(expandSingleElementArray(this.getContext().instructions)); this.endContext(); this.getContext().instructions.push({ op: "|", args: branches }); break; case "|": if (!this.getContext().or) { throw new Error('"|" operator can only be used inside "or" groups'); } if (before) { this.parsePattern(before); } if (!this.getContext().branches) { if (this.context.length === 1) { this.getContext().branches = []; } else { throw new Error('"branches" not found in an "or" group context'); } } this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions)); this.getContext().instructions = []; break; case "[": if (before) { this.parsePattern(before); } this.startContext({ oneOfSet: true }); break; case "]": if (!this.getContext().oneOfSet) { throw new Error('"]" operator must be preceded by "[" operator'); } this.endContext(); this.getContext().instructions.push({ op: "[]", args: parseOneOfSet(before) }); break; default: throw new Error("Unknown operator: ".concat(operator)); } if (rightPart) { this.parsePattern(rightPart); } } }]); return PatternParser2; }(); function parseOneOfSet(pattern2) { var values = []; var i2 = 0; while (i2 < pattern2.length) { if (pattern2[i2] === "-") { if (i2 === 0 || i2 === pattern2.length - 1) { throw new Error("Couldn't parse a one-of set pattern: ".concat(pattern2)); } var prevValue = pattern2[i2 - 1].charCodeAt(0) + 1; var nextValue = pattern2[i2 + 1].charCodeAt(0) - 1; var value = prevValue; while (value <= nextValue) { values.push(String.fromCharCode(value)); value++; } } else { values.push(pattern2[i2]); } i2++; } return values; } var ILLEGAL_CHARACTER_REGEXP = /[\(\)\[\]\?\:\|]/; var OPERATOR = new RegExp( // any of: "(\\||\\(\\?\\:|\\)|\\[|\\])" ); function expandSingleElementArray(array2) { if (array2.length === 1) { return array2[0]; } return array2; } function _createForOfIteratorHelperLoose$1(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$3(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$3(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$3(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$3(o2, minLen); } function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$3(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); if (staticProps) _defineProperties$3(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var PatternMatcher = /* @__PURE__ */ function() { function PatternMatcher2(pattern2) { _classCallCheck$3(this, PatternMatcher2); this.matchTree = new PatternParser().parse(pattern2); } _createClass$3(PatternMatcher2, [{ key: "match", value: function match(string) { var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, allowOverflow = _ref.allowOverflow; if (!string) { throw new Error("String is required"); } var result2 = _match(string.split(""), this.matchTree, true); if (result2 && result2.match) { delete result2.matchedChars; } if (result2 && result2.overflow) { if (!allowOverflow) { return; } } return result2; } }]); return PatternMatcher2; }(); function _match(characters, tree, last) { if (typeof tree === "string") { var characterString = characters.join(""); if (tree.indexOf(characterString) === 0) { if (characters.length === tree.length) { return { match: true, matchedChars: characters }; } return { partialMatch: true // matchedChars: characters }; } if (characterString.indexOf(tree) === 0) { if (last) { if (characters.length > tree.length) { return { overflow: true }; } } return { match: true, matchedChars: characters.slice(0, tree.length) }; } return; } if (Array.isArray(tree)) { var restCharacters = characters.slice(); var i2 = 0; while (i2 < tree.length) { var subtree = tree[i2]; var result2 = _match(restCharacters, subtree, last && i2 === tree.length - 1); if (!result2) { return; } else if (result2.overflow) { return result2; } else if (result2.match) { restCharacters = restCharacters.slice(result2.matchedChars.length); if (restCharacters.length === 0) { if (i2 === tree.length - 1) { return { match: true, matchedChars: characters }; } else { return { partialMatch: true // matchedChars: characters }; } } } else { if (result2.partialMatch) { return { partialMatch: true // matchedChars: characters }; } else { throw new Error("Unsupported match result:\n".concat(JSON.stringify(result2, null, 2))); } } i2++; } if (last) { return { overflow: true }; } return { match: true, matchedChars: characters.slice(0, characters.length - restCharacters.length) }; } switch (tree.op) { case "|": var partialMatch; for (var _iterator = _createForOfIteratorHelperLoose$1(tree.args), _step; !(_step = _iterator()).done; ) { var branch = _step.value; var _result = _match(characters, branch, last); if (_result) { if (_result.overflow) { return _result; } else if (_result.match) { return { match: true, matchedChars: _result.matchedChars }; } else { if (_result.partialMatch) { partialMatch = true; } else { throw new Error("Unsupported match result:\n".concat(JSON.stringify(_result, null, 2))); } } } } if (partialMatch) { return { partialMatch: true // matchedChars: ... }; } return; case "[]": for (var _iterator2 = _createForOfIteratorHelperLoose$1(tree.args), _step2; !(_step2 = _iterator2()).done; ) { var _char = _step2.value; if (characters[0] === _char) { if (characters.length === 1) { return { match: true, matchedChars: characters }; } if (last) { return { overflow: true }; } return { match: true, matchedChars: [_char] }; } } return; default: throw new Error("Unsupported instruction tree: ".concat(tree)); } } function _createForOfIteratorHelperLoose(o2, allowArrayLike) { var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"]; if (it2) return (it2 = it2.call(o2)).next.bind(it2); if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$2(o2)) || allowArrayLike && o2 && typeof o2.length === "number") { if (it2) o2 = it2; var i2 = 0; return function() { if (i2 >= o2.length) return { done: true }; return { done: false, value: o2[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$2(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$2(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$2(o2, minLen); } function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$2(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var DUMMY_DIGIT = "9"; var LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15; var LONGEST_DUMMY_PHONE_NUMBER = repeat(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH); var NATIONAL_PREFIX_SEPARATORS_PATTERN = /[- ]/; var CREATE_CHARACTER_CLASS_PATTERN = function() { return /\[([^\[\]])*\]/g; }; var CREATE_STANDALONE_DIGIT_PATTERN = function() { return /\d(?=[^,}][^,}])/g; }; var NON_ALTERING_FORMAT_REG_EXP = new RegExp("[" + VALID_PUNCTUATION + "]*\\$1[" + VALID_PUNCTUATION + "]*(\\$\\d[" + VALID_PUNCTUATION + "]*)*$"); var MIN_LEADING_DIGITS_LENGTH = 3; var AsYouTypeFormatter = /* @__PURE__ */ function() { function AsYouTypeFormatter2(_ref) { _ref.state; var metadata2 = _ref.metadata; _classCallCheck$2(this, AsYouTypeFormatter2); this.metadata = metadata2; this.resetFormat(); } _createClass$2(AsYouTypeFormatter2, [{ key: "resetFormat", value: function resetFormat() { this.chosenFormat = void 0; this.template = void 0; this.nationalNumberTemplate = void 0; this.populatedNationalNumberTemplate = void 0; this.populatedNationalNumberTemplatePosition = -1; } }, { key: "reset", value: function reset(numberingPlan, state) { this.resetFormat(); if (numberingPlan) { this.isNANP = numberingPlan.callingCode() === "1"; this.matchingFormats = numberingPlan.formats(); if (state.nationalSignificantNumber) { this.narrowDownMatchingFormats(state); } } else { this.isNANP = void 0; this.matchingFormats = []; } } /** * Formats an updated phone number. * @param {string} nextDigits — Additional phone number digits. * @param {object} state — `AsYouType` state. * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats. */ }, { key: "format", value: function format2(nextDigits, state) { var _this = this; if (canFormatCompleteNumber(state.nationalSignificantNumber, this.metadata)) { for (var _iterator = _createForOfIteratorHelperLoose(this.matchingFormats), _step; !(_step = _iterator()).done; ) { var format3 = _step.value; var formattedCompleteNumber = formatCompleteNumber(state, format3, { metadata: this.metadata, shouldTryNationalPrefixFormattingRule: function shouldTryNationalPrefixFormattingRule(format4) { return _this.shouldTryNationalPrefixFormattingRule(format4, { international: state.international, nationalPrefix: state.nationalPrefix }); }, getSeparatorAfterNationalPrefix: function getSeparatorAfterNationalPrefix(format4) { return _this.getSeparatorAfterNationalPrefix(format4); } }); if (formattedCompleteNumber) { this.resetFormat(); this.chosenFormat = format3; this.setNationalNumberTemplate(formattedCompleteNumber.replace(/\d/g, DIGIT_PLACEHOLDER), state); this.populatedNationalNumberTemplate = formattedCompleteNumber; this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(DIGIT_PLACEHOLDER); return formattedCompleteNumber; } } } return this.formatNationalNumberWithNextDigits(nextDigits, state); } // Formats the next phone number digits. }, { key: "formatNationalNumberWithNextDigits", value: function formatNationalNumberWithNextDigits(nextDigits, state) { var previouslyChosenFormat = this.chosenFormat; var newlyChosenFormat = this.chooseFormat(state); if (newlyChosenFormat) { if (newlyChosenFormat === previouslyChosenFormat) { return this.formatNextNationalNumberDigits(nextDigits); } else { return this.formatNextNationalNumberDigits(state.getNationalDigits()); } } } }, { key: "narrowDownMatchingFormats", value: function narrowDownMatchingFormats(_ref2) { var _this2 = this; var nationalSignificantNumber = _ref2.nationalSignificantNumber, nationalPrefix = _ref2.nationalPrefix, international = _ref2.international; var leadingDigits = nationalSignificantNumber; var leadingDigitsPatternIndex = leadingDigits.length - MIN_LEADING_DIGITS_LENGTH; if (leadingDigitsPatternIndex < 0) { leadingDigitsPatternIndex = 0; } this.matchingFormats = this.matchingFormats.filter(function(format2) { return _this2.formatSuits(format2, international, nationalPrefix) && _this2.formatMatches(format2, leadingDigits, leadingDigitsPatternIndex); }); if (this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1) { this.resetFormat(); } } }, { key: "formatSuits", value: function formatSuits(format2, international, nationalPrefix) { if (nationalPrefix && !format2.usesNationalPrefix() && // !format.domesticCarrierCodeFormattingRule() && !format2.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) { return false; } if (!international && !nationalPrefix && format2.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()) { return false; } return true; } }, { key: "formatMatches", value: function formatMatches(format2, leadingDigits, leadingDigitsPatternIndex) { var leadingDigitsPatternsCount = format2.leadingDigitsPatterns().length; if (leadingDigitsPatternsCount === 0) { return true; } leadingDigitsPatternIndex = Math.min(leadingDigitsPatternIndex, leadingDigitsPatternsCount - 1); var leadingDigitsPattern = format2.leadingDigitsPatterns()[leadingDigitsPatternIndex]; if (leadingDigits.length < MIN_LEADING_DIGITS_LENGTH) { try { return new PatternMatcher(leadingDigitsPattern).match(leadingDigits, { allowOverflow: true }) !== void 0; } catch (error2) { formatAppLog("error", "at node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js:343", error2); return true; } } return new RegExp("^(".concat(leadingDigitsPattern, ")")).test(leadingDigits); } }, { key: "getFormatFormat", value: function getFormatFormat(format2, international) { return international ? format2.internationalFormat() : format2.format(); } }, { key: "chooseFormat", value: function chooseFormat(state) { var _this3 = this; var _loop = function _loop2() { var format2 = _step2.value; if (_this3.chosenFormat === format2) { return "break"; } if (!NON_ALTERING_FORMAT_REG_EXP.test(_this3.getFormatFormat(format2, state.international))) { return "continue"; } if (!_this3.createTemplateForFormat(format2, state)) { _this3.matchingFormats = _this3.matchingFormats.filter(function(_2) { return _2 !== format2; }); return "continue"; } _this3.chosenFormat = format2; return "break"; }; for (var _iterator2 = _createForOfIteratorHelperLoose(this.matchingFormats.slice()), _step2; !(_step2 = _iterator2()).done; ) { var _ret = _loop(); if (_ret === "break") break; if (_ret === "continue") continue; } if (!this.chosenFormat) { this.resetFormat(); } return this.chosenFormat; } }, { key: "createTemplateForFormat", value: function createTemplateForFormat(format2, state) { if (format2.pattern().indexOf("|") >= 0) { return; } var template = this.getTemplateForFormat(format2, state); if (template) { this.setNationalNumberTemplate(template, state); return true; } } }, { key: "getSeparatorAfterNationalPrefix", value: function getSeparatorAfterNationalPrefix(format2) { if (this.isNANP) { return " "; } if (format2 && format2.nationalPrefixFormattingRule() && NATIONAL_PREFIX_SEPARATORS_PATTERN.test(format2.nationalPrefixFormattingRule())) { return " "; } return ""; } }, { key: "getInternationalPrefixBeforeCountryCallingCode", value: function getInternationalPrefixBeforeCountryCallingCode(_ref3, options2) { var IDDPrefix = _ref3.IDDPrefix, missingPlus = _ref3.missingPlus; if (IDDPrefix) { return options2 && options2.spacing === false ? IDDPrefix : IDDPrefix + " "; } if (missingPlus) { return ""; } return "+"; } }, { key: "getTemplate", value: function getTemplate(state) { if (!this.template) { return; } var index2 = -1; var i2 = 0; var internationalPrefix = state.international ? this.getInternationalPrefixBeforeCountryCallingCode(state, { spacing: false }) : ""; while (i2 < internationalPrefix.length + state.getDigitsWithoutInternationalPrefix().length) { index2 = this.template.indexOf(DIGIT_PLACEHOLDER, index2 + 1); i2++; } return cutAndStripNonPairedParens(this.template, index2 + 1); } }, { key: "setNationalNumberTemplate", value: function setNationalNumberTemplate(template, state) { this.nationalNumberTemplate = template; this.populatedNationalNumberTemplate = template; this.populatedNationalNumberTemplatePosition = -1; if (state.international) { this.template = this.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\d\+]/g, DIGIT_PLACEHOLDER) + repeat(DIGIT_PLACEHOLDER, state.callingCode.length) + " " + template; } else { this.template = template; } } /** * Generates formatting template for a national phone number, * optionally containing a national prefix, for a format. * @param {Format} format * @param {string} nationalPrefix * @return {string} */ }, { key: "getTemplateForFormat", value: function getTemplateForFormat(format2, _ref4) { var nationalSignificantNumber = _ref4.nationalSignificantNumber, international = _ref4.international, nationalPrefix = _ref4.nationalPrefix, complexPrefixBeforeNationalSignificantNumber = _ref4.complexPrefixBeforeNationalSignificantNumber; var pattern2 = format2.pattern(); { pattern2 = pattern2.replace(CREATE_CHARACTER_CLASS_PATTERN(), "\\d").replace(CREATE_STANDALONE_DIGIT_PATTERN(), "\\d"); } var digits2 = LONGEST_DUMMY_PHONE_NUMBER.match(pattern2)[0]; if (nationalSignificantNumber.length > digits2.length) { return; } var strictPattern = new RegExp("^" + pattern2 + "$"); var nationalNumberDummyDigits = nationalSignificantNumber.replace(/\d/g, DUMMY_DIGIT); if (strictPattern.test(nationalNumberDummyDigits)) { digits2 = nationalNumberDummyDigits; } var numberFormat = this.getFormatFormat(format2, international); var nationalPrefixIncludedInTemplate; if (this.shouldTryNationalPrefixFormattingRule(format2, { international, nationalPrefix })) { var numberFormatWithNationalPrefix = numberFormat.replace(FIRST_GROUP_PATTERN, format2.nationalPrefixFormattingRule()); if (parseDigits(format2.nationalPrefixFormattingRule()) === (nationalPrefix || "") + parseDigits("$1")) { numberFormat = numberFormatWithNationalPrefix; nationalPrefixIncludedInTemplate = true; if (nationalPrefix) { var i2 = nationalPrefix.length; while (i2 > 0) { numberFormat = numberFormat.replace(/\d/, DIGIT_PLACEHOLDER); i2--; } } } } var template = digits2.replace(new RegExp(pattern2), numberFormat).replace(new RegExp(DUMMY_DIGIT, "g"), DIGIT_PLACEHOLDER); if (!nationalPrefixIncludedInTemplate) { if (complexPrefixBeforeNationalSignificantNumber) { template = repeat(DIGIT_PLACEHOLDER, complexPrefixBeforeNationalSignificantNumber.length) + " " + template; } else if (nationalPrefix) { template = repeat(DIGIT_PLACEHOLDER, nationalPrefix.length) + this.getSeparatorAfterNationalPrefix(format2) + template; } } if (international) { template = applyInternationalSeparatorStyle(template); } return template; } }, { key: "formatNextNationalNumberDigits", value: function formatNextNationalNumberDigits(digits2) { var result2 = populateTemplateWithDigits(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, digits2); if (!result2) { this.resetFormat(); return; } this.populatedNationalNumberTemplate = result2[0]; this.populatedNationalNumberTemplatePosition = result2[1]; return cutAndStripNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1); } }, { key: "shouldTryNationalPrefixFormattingRule", value: function shouldTryNationalPrefixFormattingRule(format2, _ref5) { var international = _ref5.international, nationalPrefix = _ref5.nationalPrefix; if (format2.nationalPrefixFormattingRule()) { var usesNationalPrefix = format2.usesNationalPrefix(); if (usesNationalPrefix && nationalPrefix || !usesNationalPrefix && !international) { return true; } } } }]); return AsYouTypeFormatter2; }(); function _slicedToArray$1(arr, i2) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i2) || _unsupportedIterableToArray$1(arr, i2) || _nonIterableRest$1(); } function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$1(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray$1(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$1(o2, minLen); } function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function _iterableToArrayLimit$1(arr, i2) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s2, _e2; try { for (_i = _i.call(arr); !(_n = (_s2 = _i.next()).done); _n = true) { _arr.push(_s2.value); if (i2 && _arr.length === i2) break; } } catch (err) { _d = true; _e2 = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e2; } } return _arr; } function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; } function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$1(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = "[" + VALID_PUNCTUATION + VALID_DIGITS + "]+"; var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp("^" + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + "$", "i"); var VALID_FORMATTED_PHONE_NUMBER_PART = "(?:[" + PLUS_CHARS + "][" + VALID_PUNCTUATION + VALID_DIGITS + "]*|[" + VALID_PUNCTUATION + VALID_DIGITS + "]+)"; var AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp("[^" + VALID_PUNCTUATION + VALID_DIGITS + "]+.*$"); var COMPLEX_NATIONAL_PREFIX = /[^\d\[\]]/; var AsYouTypeParser = /* @__PURE__ */ function() { function AsYouTypeParser2(_ref) { var defaultCountry = _ref.defaultCountry, defaultCallingCode = _ref.defaultCallingCode, metadata2 = _ref.metadata, onNationalSignificantNumberChange = _ref.onNationalSignificantNumberChange; _classCallCheck$1(this, AsYouTypeParser2); this.defaultCountry = defaultCountry; this.defaultCallingCode = defaultCallingCode; this.metadata = metadata2; this.onNationalSignificantNumberChange = onNationalSignificantNumberChange; } _createClass$1(AsYouTypeParser2, [{ key: "input", value: function input(text, state) { var _extractFormattedDigi = extractFormattedDigitsAndPlus(text), _extractFormattedDigi2 = _slicedToArray$1(_extractFormattedDigi, 2), formattedDigits = _extractFormattedDigi2[0], hasPlus = _extractFormattedDigi2[1]; var digits2 = parseDigits(formattedDigits); var justLeadingPlus; if (hasPlus) { if (!state.digits) { state.startInternationalNumber(); if (!digits2) { justLeadingPlus = true; } } } if (digits2) { this.inputDigits(digits2, state); } return { digits: digits2, justLeadingPlus }; } /** * Inputs "next" phone number digits. * @param {string} digits * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means "don't format the national phone number at this stage". */ }, { key: "inputDigits", value: function inputDigits(nextDigits, state) { var digits2 = state.digits; var hasReceivedThreeLeadingDigits = digits2.length < 3 && digits2.length + nextDigits.length >= 3; state.appendDigits(nextDigits); if (hasReceivedThreeLeadingDigits) { this.extractIddPrefix(state); } if (this.isWaitingForCountryCallingCode(state)) { if (!this.extractCountryCallingCode(state)) { return; } } else { state.appendNationalSignificantNumberDigits(nextDigits); } if (!state.international) { if (!this.hasExtractedNationalSignificantNumber) { this.extractNationalSignificantNumber(state.getNationalDigits(), function(stateUpdate) { return state.update(stateUpdate); }); } } } }, { key: "isWaitingForCountryCallingCode", value: function isWaitingForCountryCallingCode(_ref2) { var international = _ref2.international, callingCode = _ref2.callingCode; return international && !callingCode; } // Extracts a country calling code from a number // being entered in internatonal format. }, { key: "extractCountryCallingCode", value: function extractCountryCallingCode$1(state) { var _extractCountryCallin = extractCountryCallingCode("+" + state.getDigitsWithoutInternationalPrefix(), this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), countryCallingCode = _extractCountryCallin.countryCallingCode, number2 = _extractCountryCallin.number; if (countryCallingCode) { state.setCallingCode(countryCallingCode); state.update({ nationalSignificantNumber: number2 }); return true; } } }, { key: "reset", value: function reset(numberingPlan) { if (numberingPlan) { this.hasSelectedNumberingPlan = true; var nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing(); this.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing); } else { this.hasSelectedNumberingPlan = void 0; this.couldPossiblyExtractAnotherNationalSignificantNumber = void 0; } } /** * Extracts a national (significant) number from user input. * Google's library is different in that it only applies `national_prefix_for_parsing` * and doesn't apply `national_prefix_transform_rule` after that. * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539 * @return {boolean} [extracted] */ }, { key: "extractNationalSignificantNumber", value: function extractNationalSignificantNumber(nationalDigits, setState) { if (!this.hasSelectedNumberingPlan) { return; } var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata), nationalPrefix = _extractNationalNumbe.nationalPrefix, nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode; if (nationalNumber === nationalDigits) { return; } this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState); return true; } /** * In Google's code this function is called "attempt to extract longer NDD". * "Some national prefixes are a substring of others", they say. * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were. */ }, { key: "extractAnotherNationalSignificantNumber", value: function extractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) { if (!this.hasExtractedNationalSignificantNumber) { return this.extractNationalSignificantNumber(nationalDigits, setState); } if (!this.couldPossiblyExtractAnotherNationalSignificantNumber) { return; } var _extractNationalNumbe2 = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata), nationalPrefix = _extractNationalNumbe2.nationalPrefix, nationalNumber = _extractNationalNumbe2.nationalNumber, carrierCode = _extractNationalNumbe2.carrierCode; if (nationalNumber === prevNationalSignificantNumber) { return; } this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState); return true; } }, { key: "onExtractedNationalNumber", value: function onExtractedNationalNumber(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) { var complexPrefixBeforeNationalSignificantNumber; var nationalSignificantNumberMatchesInput; var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber); if (nationalSignificantNumberIndex >= 0 && nationalSignificantNumberIndex === nationalDigits.length - nationalSignificantNumber.length) { nationalSignificantNumberMatchesInput = true; var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex); if (prefixBeforeNationalNumber !== nationalPrefix) { complexPrefixBeforeNationalSignificantNumber = prefixBeforeNationalNumber; } } setState({ nationalPrefix, carrierCode, nationalSignificantNumber, nationalSignificantNumberMatchesInput, complexPrefixBeforeNationalSignificantNumber }); this.hasExtractedNationalSignificantNumber = true; this.onNationalSignificantNumberChange(); } }, { key: "reExtractNationalSignificantNumber", value: function reExtractNationalSignificantNumber(state) { if (this.extractAnotherNationalSignificantNumber(state.getNationalDigits(), state.nationalSignificantNumber, function(stateUpdate) { return state.update(stateUpdate); })) { return true; } if (this.extractIddPrefix(state)) { this.extractCallingCodeAndNationalSignificantNumber(state); return true; } if (this.fixMissingPlus(state)) { this.extractCallingCodeAndNationalSignificantNumber(state); return true; } } }, { key: "extractIddPrefix", value: function extractIddPrefix(state) { var international = state.international, IDDPrefix = state.IDDPrefix, digits2 = state.digits; state.nationalSignificantNumber; if (international || IDDPrefix) { return; } var numberWithoutIDD = stripIddPrefix(digits2, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata); if (numberWithoutIDD !== void 0 && numberWithoutIDD !== digits2) { state.update({ IDDPrefix: digits2.slice(0, digits2.length - numberWithoutIDD.length) }); this.startInternationalNumber(state, { country: void 0, callingCode: void 0 }); return true; } } }, { key: "fixMissingPlus", value: function fixMissingPlus(state) { if (!state.international) { var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), newCallingCode = _extractCountryCallin2.countryCallingCode; _extractCountryCallin2.number; if (newCallingCode) { state.update({ missingPlus: true }); this.startInternationalNumber(state, { country: state.country, callingCode: newCallingCode }); return true; } } } }, { key: "startInternationalNumber", value: function startInternationalNumber(state, _ref3) { var country = _ref3.country, callingCode = _ref3.callingCode; state.startInternationalNumber(country, callingCode); if (state.nationalSignificantNumber) { state.resetNationalSignificantNumber(); this.onNationalSignificantNumberChange(); this.hasExtractedNationalSignificantNumber = void 0; } } }, { key: "extractCallingCodeAndNationalSignificantNumber", value: function extractCallingCodeAndNationalSignificantNumber(state) { if (this.extractCountryCallingCode(state)) { this.extractNationalSignificantNumber(state.getNationalDigits(), function(stateUpdate) { return state.update(stateUpdate); }); } } }]); return AsYouTypeParser2; }(); function extractFormattedPhoneNumber(text) { var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART); if (startsAt < 0) { return; } text = text.slice(startsAt); var hasPlus; if (text[0] === "+") { hasPlus = true; text = text.slice("+".length); } text = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, ""); if (hasPlus) { text = "+" + text; } return text; } function _extractFormattedDigitsAndPlus(text) { var extractedNumber = extractFormattedPhoneNumber(text) || ""; if (extractedNumber[0] === "+") { return [extractedNumber.slice("+".length), true]; } return [extractedNumber]; } function extractFormattedDigitsAndPlus(text) { var _extractFormattedDigi3 = _extractFormattedDigitsAndPlus(text), _extractFormattedDigi4 = _slicedToArray$1(_extractFormattedDigi3, 2), formattedDigits = _extractFormattedDigi4[0], hasPlus = _extractFormattedDigi4[1]; if (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) { formattedDigits = ""; } return [formattedDigits, hasPlus]; } function _slicedToArray(arr, i2) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i2) || _unsupportedIterableToArray(arr, i2) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o2, minLen) { if (!o2) return; if (typeof o2 === "string") return _arrayLikeToArray(o2, minLen); var n2 = Object.prototype.toString.call(o2).slice(8, -1); if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name; if (n2 === "Map" || n2 === "Set") return Array.from(o2); if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray(o2, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) { arr2[i2] = arr[i2]; } return arr2; } function _iterableToArrayLimit(arr, i2) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s2, _e2; try { for (_i = _i.call(arr); !(_n = (_s2 = _i.next()).done); _n = true) { _arr.push(_s2.value); if (i2 && _arr.length === i2) break; } } catch (err) { _d = true; _e2 = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e2; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i2 = 0; i2 < props.length; i2++) { var descriptor = props[i2]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var AsYouType$1 = /* @__PURE__ */ function() { function AsYouType2(optionsOrDefaultCountry, metadata2) { _classCallCheck(this, AsYouType2); this.metadata = new Metadata(metadata2); var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry), _this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2), defaultCountry = _this$getCountryAndCa2[0], defaultCallingCode = _this$getCountryAndCa2[1]; this.defaultCountry = defaultCountry; this.defaultCallingCode = defaultCallingCode; this.reset(); } _createClass(AsYouType2, [{ key: "getCountryAndCallingCode", value: function getCountryAndCallingCode(optionsOrDefaultCountry) { var defaultCountry; var defaultCallingCode; if (optionsOrDefaultCountry) { if (isObject$2(optionsOrDefaultCountry)) { defaultCountry = optionsOrDefaultCountry.defaultCountry; defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode; } else { defaultCountry = optionsOrDefaultCountry; } } if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) { defaultCountry = void 0; } return [defaultCountry, defaultCallingCode]; } /** * Inputs "next" phone number characters. * @param {string} text * @return {string} Formatted phone number characters that have been input so far. */ }, { key: "input", value: function input(text) { var _this$parser$input = this.parser.input(text, this.state), digits2 = _this$parser$input.digits, justLeadingPlus = _this$parser$input.justLeadingPlus; if (justLeadingPlus) { this.formattedOutput = "+"; } else if (digits2) { this.determineTheCountryIfNeeded(); if (this.state.nationalSignificantNumber) { this.formatter.narrowDownMatchingFormats(this.state); } var formattedNationalNumber; if (this.metadata.hasSelectedNumberingPlan()) { formattedNationalNumber = this.formatter.format(digits2, this.state); } if (formattedNationalNumber === void 0) { if (this.parser.reExtractNationalSignificantNumber(this.state)) { this.determineTheCountryIfNeeded(); var nationalDigits = this.state.getNationalDigits(); if (nationalDigits) { formattedNationalNumber = this.formatter.format(nationalDigits, this.state); } } } this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber(); } return this.formattedOutput; } }, { key: "reset", value: function reset() { var _this = this; this.state = new AsYouTypeState({ onCountryChange: function onCountryChange(country) { _this.country = country; }, onCallingCodeChange: function onCallingCodeChange(callingCode, country) { _this.metadata.selectNumberingPlan(country, callingCode); _this.formatter.reset(_this.metadata.numberingPlan, _this.state); _this.parser.reset(_this.metadata.numberingPlan); } }); this.formatter = new AsYouTypeFormatter({ state: this.state, metadata: this.metadata }); this.parser = new AsYouTypeParser({ defaultCountry: this.defaultCountry, defaultCallingCode: this.defaultCallingCode, metadata: this.metadata, state: this.state, onNationalSignificantNumberChange: function onNationalSignificantNumberChange() { _this.determineTheCountryIfNeeded(); _this.formatter.reset(_this.metadata.numberingPlan, _this.state); } }); this.state.reset({ country: this.defaultCountry, callingCode: this.defaultCallingCode }); this.formattedOutput = ""; return this; } /** * Returns `true` if the phone number is being input in international format. * In other words, returns `true` if and only if the parsed phone number starts with a `"+"`. * @return {boolean} */ }, { key: "isInternational", value: function isInternational() { return this.state.international; } /** * Returns the "calling code" part of the phone number when it's being input * in an international format. * If no valid calling code has been entered so far, returns `undefined`. * @return {string} [callingCode] */ }, { key: "getCallingCode", value: function getCallingCode() { if (this.isInternational()) { return this.state.callingCode; } } // A legacy alias. }, { key: "getCountryCallingCode", value: function getCountryCallingCode2() { return this.getCallingCode(); } /** * Returns a two-letter country code of the phone number. * Returns `undefined` for "non-geographic" phone numbering plans. * Returns `undefined` if no phone number has been input yet. * @return {string} [country] */ }, { key: "getCountry", value: function getCountry() { var digits2 = this.state.digits; if (digits2) { return this._getCountry(); } } /** * Returns a two-letter country code of the phone number. * Returns `undefined` for "non-geographic" phone numbering plans. * @return {string} [country] */ }, { key: "_getCountry", value: function _getCountry() { var country = this.state.country; return country; } }, { key: "determineTheCountryIfNeeded", value: function determineTheCountryIfNeeded() { if (!this.state.country || this.isCountryCallingCodeAmbiguous()) { this.determineTheCountry(); } } // Prepends `+CountryCode ` in case of an international phone number }, { key: "getFullNumber", value: function getFullNumber(formattedNationalNumber) { var _this2 = this; if (this.isInternational()) { var prefix = function prefix2(text) { return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, { spacing: text ? true : false }) + text; }; var callingCode = this.state.callingCode; if (!callingCode) { return prefix("".concat(this.state.getDigitsWithoutInternationalPrefix())); } if (!formattedNationalNumber) { return prefix(callingCode); } return prefix("".concat(callingCode, " ").concat(formattedNationalNumber)); } return formattedNationalNumber; } }, { key: "getNonFormattedNationalNumberWithPrefix", value: function getNonFormattedNationalNumberWithPrefix() { var _this$state = this.state, nationalSignificantNumber = _this$state.nationalSignificantNumber, complexPrefixBeforeNationalSignificantNumber = _this$state.complexPrefixBeforeNationalSignificantNumber, nationalPrefix = _this$state.nationalPrefix; var number2 = nationalSignificantNumber; var prefix = complexPrefixBeforeNationalSignificantNumber || nationalPrefix; if (prefix) { number2 = prefix + number2; } return number2; } }, { key: "getNonFormattedNumber", value: function getNonFormattedNumber() { var nationalSignificantNumberMatchesInput = this.state.nationalSignificantNumberMatchesInput; return this.getFullNumber(nationalSignificantNumberMatchesInput ? this.getNonFormattedNationalNumberWithPrefix() : this.state.getNationalDigits()); } }, { key: "getNonFormattedTemplate", value: function getNonFormattedTemplate() { var number2 = this.getNonFormattedNumber(); if (number2) { return number2.replace(/[\+\d]/g, DIGIT_PLACEHOLDER); } } }, { key: "isCountryCallingCodeAmbiguous", value: function isCountryCallingCodeAmbiguous() { var callingCode = this.state.callingCode; var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode); return countryCodes && countryCodes.length > 1; } // Determines the country of the phone number // entered so far based on the country phone code // and the national phone number. }, { key: "determineTheCountry", value: function determineTheCountry() { this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, { nationalNumber: this.state.nationalSignificantNumber, defaultCountry: this.defaultCountry, metadata: this.metadata })); } /** * Returns a E.164 phone number value for the user's input. * * For example, for country `"US"` and input `"(222) 333-4444"` * it will return `"+12223334444"`. * * For international phone number input, it will also auto-correct * some minor errors such as using a national prefix when writing * an international phone number. For example, if the user inputs * `"+44 0 7400 000000"` then it will return an auto-corrected * `"+447400000000"` phone number value. * * Will return `undefined` if no digits have been input, * or when inputting a phone number in national format and no * default country or default "country calling code" have been set. * * @return {string} [value] */ }, { key: "getNumberValue", value: function getNumberValue() { var _this$state2 = this.state, digits2 = _this$state2.digits, callingCode = _this$state2.callingCode, country = _this$state2.country, nationalSignificantNumber = _this$state2.nationalSignificantNumber; if (!digits2) { return; } if (this.isInternational()) { if (callingCode) { return "+" + callingCode + nationalSignificantNumber; } else { return "+" + digits2; } } else { if (country || callingCode) { var callingCode_ = country ? this.metadata.countryCallingCode() : callingCode; return "+" + callingCode_ + nationalSignificantNumber; } } } /** * Returns an instance of `PhoneNumber` class. * Will return `undefined` if no national (significant) number * digits have been entered so far, or if no `defaultCountry` has been * set and the user enters a phone number not in international format. */ }, { key: "getNumber", value: function getNumber() { var _this$state3 = this.state, nationalSignificantNumber = _this$state3.nationalSignificantNumber, carrierCode = _this$state3.carrierCode, callingCode = _this$state3.callingCode; var country = this._getCountry(); if (!nationalSignificantNumber) { return; } if (!country && !callingCode) { return; } if (country) { if (country === this.defaultCountry) { var metadata2 = new Metadata(this.metadata.metadata); metadata2.selectNumberingPlan(country); var _callingCode = metadata2.numberingPlan.callingCode(); var ambiguousCountries = this.metadata.getCountryCodesForCallingCode(_callingCode); if (ambiguousCountries.length > 1) { var exactCountry = getCountryByNationalNumber(nationalSignificantNumber, { countries: ambiguousCountries, defaultCountry: this.defaultCountry, metadata: this.metadata.metadata }); if (exactCountry) { country = exactCountry; } } } } var phoneNumber = new PhoneNumber(country || callingCode, nationalSignificantNumber, this.metadata.metadata); if (carrierCode) { phoneNumber.carrierCode = carrierCode; } return phoneNumber; } /** * Returns `true` if the phone number is "possible". * Is just a shortcut for `PhoneNumber.isPossible()`. * @return {boolean} */ }, { key: "isPossible", value: function isPossible() { var phoneNumber = this.getNumber(); if (!phoneNumber) { return false; } return phoneNumber.isPossible(); } /** * Returns `true` if the phone number is "valid". * Is just a shortcut for `PhoneNumber.isValid()`. * @return {boolean} */ }, { key: "isValid", value: function isValid() { var phoneNumber = this.getNumber(); if (!phoneNumber) { return false; } return phoneNumber.isValid(); } /** * @deprecated * This method is used in `react-phone-number-input/source/input-control.js` * in versions before `3.0.16`. */ }, { key: "getNationalNumber", value: function getNationalNumber() { return this.state.nationalSignificantNumber; } /** * Returns the phone number characters entered by the user. * @return {string} */ }, { key: "getChars", value: function getChars() { return (this.state.international ? "+" : "") + this.state.digits; } /** * Returns the template for the formatted phone number. * @return {string} */ }, { key: "getTemplate", value: function getTemplate() { return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || ""; } }]); return AsYouType2; }(); function parsePhoneNumber$1() { return withMetadataArgument$1(parsePhoneNumber$2, arguments); } function AsYouType(country) { return AsYouType$1.call(this, country, metadata$1); } AsYouType.prototype = Object.create(AsYouType$1.prototype, {}); AsYouType.prototype.constructor = AsYouType; const metadata = { "version": 4, "country_calling_codes": { "1": ["US", "AG", "AI", "AS", "BB", "BM", "BS", "CA", "DM", "DO", "GD", "GU", "JM", "KN", "KY", "LC", "MP", "MS", "PR", "SX", "TC", "TT", "VC", "VG", "VI"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, "countries": { "AC": ["247", "00", "(?:[01589]\\d|[46])\\d{4}", [5, 6], 0, 0, 0, 0, 0, 0, 0, [0, ["4\\d{4}", [5]]]], "AD": ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["690\\d{6}|[356]\\d{5}", [6, 9]]]], "AE": ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["5[024-68]\\d{7}", [9]]]], "AF": ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7\\d{8}"]]], "AG": ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268", [0, ["268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}"]]], "AI": ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264", [0, ["264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}"]]], "AL": ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:[78][2-9]|9\\d)\\d{6}", [9]]]], "AM": ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"]]], "AO": ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]], 0, 0, 0, 0, 0, 0, [0, ["9[1-79]\\d{7}"]]], "AR": ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1", 0, 0, [0, ["93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:7(?:55|77)|865))[2-8]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:284|3(?:02|23)|920)|3(?:4(?:46|8[27]|92)|541|878))[2-7]\\d{5}|9(?:2(?:(?:26|62)2|320|477|9(?:42|83))|3(?:329|4(?:62|76|89)|564))[2-6]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|[17][2-6]|3[4-6]|5[3-6]|8[3-68]))))\\d{6}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|35|5[17])))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}"]]], "AS": ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684", [0, ["684(?:2(?:48|5[2468]|7[26])|7(?:3[13]|70|82))\\d{4}"]]], "AT": ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}", [7, 8, 9, 10, 11, 12, 13]]]], "AU": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [0, ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]]], "0011"], "AW": ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}"]]], "AX": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", [0, ["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", [6, 7, 8, 9, 10]]], "00"], "AZ": ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}"]]], "BA": ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}"]]], "BB": ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246", [0, ["246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}"]]], "BD": ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}", [10]]]], "BE": ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4[5-9]\\d{7}", [9]]]], "BF": ["226", "00", "[025-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[025-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:0[1-7]|5[0-8]|[67]\\d)\\d{6}"]]], "BG": ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}", [8, 9]]]], "BH": ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}"]]], "BI": ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:29|[67][125-9])\\d{6}"]]], "BJ": ["229", "00", "[24-689]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-689]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:4[0-8]|[56]\\d|9[013-9])\\d{6}"]]], "BL": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [0, ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441", [0, ["441(?:[2378]\\d|5[0-39]|9[02])\\d{5}"]]], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:22[89]|[78]\\d\\d)\\d{4}"]]], "BO": ["591", "00(?:1\\d)?", "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"]], ["(\\d{8})", "$1", ["[67]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?", 0, 0, 0, [0, ["[67]\\d{7}", [8]]]], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]", [0, ["(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}"]]], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37)", "4(?:02|37)0|[34]00"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2", 0, 0, [0, ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}", [10, 11]]]], "BS": ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242", [0, ["242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}"]]], "BT": ["975", "00", "[17]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:1[67]|77)\\d{6}", [8]]]], "BW": ["267", "00", "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:321|7[1-8]\\d)\\d{5}", [8]]]], "BY": ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, [0, ["(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}", [9]]], "8~10"], "BZ": ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]], 0, 0, 0, 0, 0, 0, [0, ["6[0-35-7]\\d{5}", [7]]]], "CA": ["1", "011", "(?:[2-8]\\d|90)\\d{8}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [0, ["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}", [10]]]], "CC": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [0, ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]]], "0011"], "CD": ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}", [7, 9]]]], "CF": ["236", "00", "(?:[27]\\d{3}|8776)\\d{4}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[278]"]]], 0, 0, 0, 0, 0, 0, [0, ["7[024-7]\\d{6}"]]], "CG": ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]], 0, 0, 0, 0, 0, 0, [0, ["026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}"]]], "CH": ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6[89]|7[235-9])\\d{7}", [9]]]], "CI": ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]], 0, 0, 0, 0, 0, 0, [0, ["0[157]\\d{8}"]]], "CK": ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]], 0, 0, 0, 0, 0, 0, [0, ["[578]\\d{4}"]]], "CL": ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9[2-9]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]], 0, 0, 0, 0, 0, 0, [0, ["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:2\\d\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-3])|600)|646[59])|80[1-9]\\d\\d|9(?:3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|7[1-9]\\d\\d|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}", [9]]]], "CM": ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:24[23]|6(?:[25-9]\\d|40))\\d{6}", [9]]]], "CN": ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["80"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, [0, ["1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}", [11]]], "00"], "CO": ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|91"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?", 0, 0, 0, [0, ["333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:24[1-9]|3(?:00|3[0-24-9]))|9101)\\d{6}|3(?:0[0-5]|1\\d|2[0-3]|5[01]|70)\\d{7}", [10]]]], "CR": ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))", 0, 0, 0, [0, ["(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}", [8]]]], "CU": ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:5\\d|6[2-4])\\d{6}", [8]]]], "CV": ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:36|5[1-389]|9\\d)\\d{5}"]]], "CW": ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]", [0, ["953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}"]]], "CX": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [0, ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]]], "0011"], "CY": ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["9(?:10|[4-79]\\d)\\d{5}"]]], "CZ": ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:60[1-8]\\d|7(?:0(?:[2-5]\\d|60)|19[01]|[2379]\\d\\d))\\d{5}", [9]]]], "DE": ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|31)"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["16[023]\\d{7,8}|1(?:5310|7[0-57-9]\\d)\\d{6}|1(?:5[0-25-9]|76)\\d{8}", [10, 11]]]], "DJ": ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]], 0, 0, 0, 0, 0, 0, [0, ["77\\d{6}"]]], "DK": ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[2-7]\\d|8[126-9]|9[1-46-9])\\d{6}"]]], "DM": ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767", [0, ["767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}"]]], "DO": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9", [0, ["8[024]9[2-9]\\d{6}"]]], "DZ": ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:5(?:4[0-29]|5\\d|6[0-3])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}", [9]]]], "EC": ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}", [9]]]], "EE": ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|(?:2[0-59]|[3-79]\\d)\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[13-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}", [7, 8]]]], "EG": ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["1[0-25]\\d{8}", [10]]]], "EH": ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, "528[89]", [0, ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"]]], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:17[1-3]|7\\d\\d)\\d{4}"]]], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:590[16]00\\d|9(?:6906(?:09|10)|7390\\d\\d))\\d\\d|(?:6\\d|7[1-48])\\d{7}"]]], "ET": ["251", "00", "(?:11|[2-579]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|22|77|86|99)|9\\d\\d)\\d{6}"]]], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", [0, ["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", [6, 7, 8, 9, 10]]], "00"], "FJ": ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[279]\\d|45|5[01568]|8[034679])\\d{5}", [7]]], "00"], "FK": ["500", "00", "[2-7]\\d{4}", [5], 0, 0, 0, 0, 0, 0, 0, [0, ["[56]\\d{4}"]]], "FM": ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]], 0, 0, 0, 0, 0, 0, [0, ["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}"]]], "FO": ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{6})", "$1", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))", 0, 0, 0, [0, ["(?:[27][1-9]|5\\d|9[16])\\d{4}"]]], "FR": ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}"]]], "GA": ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1", 0, 0, [0, ["(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}"]]], "GB": ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]]], 0, " x"], "GD": ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473", [0, ["473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[68])|5(?:2[01]|3[3-8])|901)\\d{4}"]]], "GE": ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|111|22[02]|77\\d)|1(?:1(?:[03][01]|[124]\\d|5[2-6]|7[0-4])|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}"]]], "GF": ["594", "00", "[56]94\\d{6}|(?:80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[56]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["694(?:[0-249]\\d|3[0-8])\\d{4}"]]], "GG": ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0", "1481$1", 0, 0, [0, ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]]]], "GH": ["233", "00", "(?:[235]\\d{3}|800)\\d{5}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}", [9]]]], "GI": ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]], 0, 0, 0, 0, 0, 0, [0, ["5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}"]]], "GL": ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["[245]\\d{5}"]]], "GM": ["220", "00", "[2-9]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[23679]\\d|4[015]|5[0-489])\\d{5}"]]], "GN": ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]], 0, 0, 0, 0, 0, 0, [0, ["6[0-356]\\d{7}", [9]]]], "GP": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"]]], "GQ": ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:222|55\\d)\\d{6}"]]], "GR": ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["68[57-9]\\d{7}|(?:69|94)\\d{8}", [10]]]], "GT": ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[3-5]\\d\\d|80[0-4])\\d{5}", [8]]]], "GU": ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671", [0, ["671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}"]]], "GW": ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]], 0, 0, 0, 0, 0, 0, [0, ["9(?:5\\d|6[569]|77)\\d{6}", [9]]]], "GY": ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["510\\d{4}|(?:6\\d|7[0-5])\\d{5}"]]], "HK": ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:4(?:44[0-25-9]|6(?:1[0-7]|4[0-57-9]|6[0-4])|74[0-2])|5(?:73[0-6]|95[0-8])|6(?:26[013-8]|66[0-3])|70(?:7[1-8]|8[0-4])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[01]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-9]|6[02357-9]|7[05])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-49]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}", [8]]], "00"], "HN": ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["[37-9]\\d{7}", [8]]]], "HR": ["385", "00", "(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}", [6, 7, 8, 9], [["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-7])))\\d{4}|98\\d{6}", [8, 9]]]], "HT": ["509", "00", "(?:[2-489]\\d|55)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[34]\\d|55)\\d{6}"]]], "HU": ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06", 0, 0, 0, 0, 0, [0, ["(?:[257]0|3[01])\\d{7}", [9]]]], "ID": ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["8[1-35-9]\\d{7,10}", [9, 10, 11, 12]]]], "IE": ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["8(?:22|[35-9]\\d)\\d{6}", [9]]]], "IL": ["972", "0(?:0|1[2-9])", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0", 0, 0, 0, 0, 0, [0, ["55(?:410|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}", [9]]]], "IM": ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0", "1624$1", 0, "74576|(?:16|7[56])24", [0, ["76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}"]]], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["1(?:6|8[06])", "1(?:6|8[06]0)"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0", 0, 0, 0, 0, 0, [0, ["(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}", [10]]]], "IO": ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]], 0, 0, 0, 0, 0, 0, [0, ["38\\d{5}"]]], "IQ": ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7[3-9]\\d{8}", [10]]]], "IR": ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["9(?:(?:0(?:[0-35]\\d|4[4-6])|(?:[13]\\d|2[0-3])\\d)\\d|9(?:[0-46]\\d\\d|5[15]0|8(?:[12]\\d|88)|9(?:0[0-3]|[19]\\d|21|69|77|8[7-9])))\\d{5}", [10]]]], "IS": ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}"]], "00"], "IT": ["39", "00", "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, [0, ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]]]], "JE": ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0", "1534$1", 0, 0, [0, ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"]]], "JM": ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876", [0, ["(?:658295|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}"]]], "JO": ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:[78][0-25-9]|9\\d)\\d{6}", [9]]]], "JP": ["81", "010", "00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["[36]|4(?:2[09]|7[01])", "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[257-9]"], "0$1"]], "0", 0, "(000[259]\\d{6})$|(?:(?:003768)0?)|0", "$1", 0, 0, [0, ["[7-9]0[1-9]\\d{7}", [10]]]], "KE": ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1(?:0[0-8]|1[0-7]|2[014]|30)|7\\d\\d)\\d{6}", [9]]]], "KG": ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}", [9]]]], "KH": ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}", [8, 9]]]], "KI": ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0", 0, 0, 0, 0, 0, [0, ["(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}", [8]]]], "KM": ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]], 0, 0, 0, 0, 0, 0, [0, ["[34]\\d{6}"]]], "KN": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869", [0, ["869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}"]]], "KP": ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["19[1-3]\\d{7}", [10]]]], "KR": ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?", 0, 0, 0, [0, ["1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}", [9, 10]]]], "KW": ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}", [8]]]], "KY": ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345", [0, ["345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}"]]], "KZ": ["7", "810", "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "33|7", [0, ["7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}", [10]]], "8~10"], "LA": ["856", "00", "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["30[0135-9]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["208[78]\\d{6}|(?:20[23579]|30[24])\\d{7}", [10]]]], "LB": ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0", 0, 0, 0, 0, 0, [0, ["793(?:[01]\\d|2[0-4])\\d{3}|(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[89]|9[12]))\\d{5}"]]], "LC": ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758", [0, ["758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}"]]], "LI": ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0", 0, 0, 0, [0, ["(?:6(?:(?:4[5-9]|5[0-469])\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}"]]], "LK": ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:[0-25-8]\\d|4[0-4])\\d{6}"]]], "LR": ["231", "00", "(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:(?:(?:22|33)0|555|(?:77|88)\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}", [7, 9]]]], "LS": ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]], 0, 0, 0, 0, 0, 0, [0, ["[56]\\d{7}"]]], "LT": ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]", 0, 0, 0, [0, ["6\\d{7}"]]], "LU": ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["2(?:[0367]|4[3-8])"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["2(?:[0367]|4[3-8])"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)", 0, 0, 0, [0, ["6(?:[269][18]|5[1568]|7[189]|81)\\d{6}", [9]]]], "LV": ["371", "00", "(?:[268]\\d|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|8[01]"]]], 0, 0, 0, 0, 0, 0, [0, ["23(?:23[0-57-9]|33[0238])\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[024-9]|3[0-24-9]))\\d{4}"]]], "LY": ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["9[1-6]\\d{7}"]]], "MA": ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5[45]"], "0$1"], ["(\\d{4})(\\d{5})", "$1-$2", ["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8"], "0$1"], ["(\\d{3})(\\d{6})", "$1-$2", ["[5-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"]]], "MC": ["377", "00", "(?:[3489]|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4(?:[469]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}"]]], "MD": ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["562\\d{5}|(?:6\\d|7[16-9])\\d{6}"]]], "ME": ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}", [8]]]], "MF": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [0, ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"]]], "MG": ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1", 0, 0, [0, ["3[2-47-9]\\d{7}"]]], "MH": ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1", 0, 0, 0, 0, 0, [0, ["(?:(?:23|54)5|329|45[35-8])\\d{4}"]]], "MK": ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-48]\\d|6[01]|7[01578])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}"]]], "ML": ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[01]|[679]\\d|8[2-49])\\d{6}"]]], "MM": ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}", [7, 8, 9, 10]]]], "MN": ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[12]1"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:83[01]|92[039])\\d{5}|(?:5[05]|6[069]|8[015689]|9[013-9])\\d{6}", [8]]]], "MO": ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]], 0, 0, 0, 0, 0, 0, [0, ["6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}", [8]]]], "MP": ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670", [0, ["670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}"]]], "MQ": ["596", "00", "596\\d{6}|(?:69|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["69[67]\\d{6}"]]], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]], 0, 0, 0, 0, 0, 0, [0, ["[2-4][0-46-9]\\d{6}"]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664", [0, ["664(?:3(?:49|9[1-6])|49[2-6])\\d{4}"]]], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-4]|3[013]))\\d{5}", [8]]], "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:46[46]|[79]\\d\\d)\\d{4}", [7]]], "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[137-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["111\\d{6}|(?:31|77|[89][89])\\d{7}", [9]]]], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["657[12]\\d{6}|(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"]], "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-7]))|(?:[269]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}", [9, 10]]]], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["8[2-79]\\d{7}", [9]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:60|8[1245])\\d{7}", [9]]]], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5[0-4]|[79]\\d|8[0-79])\\d{4}"]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:23|7[0467]|[89]\\d)\\d{6}"]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1", 0, 0, [0, ["(?:14|3[58])\\d{4}"]]], "NG": ["234", "009", "38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}", [8, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["3"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}", [10]]]], "NI": ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}"]]], "NL": ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6[1-58]|970\\d)\\d{7}", [9, 11]]]], "NO": ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]", [0, ["(?:4[015-8]|9\\d)\\d{6}", [8]]]], "NP": ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0", 0, 0, 0, 0, 0, [0, ["9(?:00|6[0-3]|7[024-6]|8[0-24-68])\\d{7}", [10]]]], "NR": ["674", "00", "(?:444|(?:55|8\\d)\\d|666)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-68]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:55[3-9]|666|8\\d\\d)\\d{4}"]]], "NU": ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[56]|888[1-9])\\d{3}"]]], "NZ": ["64", "0(?:0|161)", "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}", [8, 9, 10]]], "00"], "OM": ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:1505|90[1-9]\\d)\\d{4}|(?:7[126-9]|9[1-9])\\d{6}", [8]]]], "PA": ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}", [7, 8]]]], "PE": ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, [0, ["9\\d{8}", [9]]], "00", " Anexo "], "PF": ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["8[7-9]\\d{6}", [8]]]], "PG": ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7\\d|8[1-38])\\d{6}", [8]]], "00"], "PH": ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}", [10]]]], "PK": ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [0, ["3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}", [10]]]], "PL": ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["21(?:1[013-5]|2\\d)\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}", [9]]]], "PM": ["508", "00", "[45]\\d{5}|(?:708|8\\d\\d)\\d{6}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[45]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:4[02-489]|5[02-9]|708[45][0-5])\\d{4}"]]], "PR": ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939", [0, ["(?:787|939)[2-9]\\d{6}"]]], "PS": ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["5[69]\\d{7}", [9]]]], "PT": ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}"]]], "PW": ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:(?:46|83)[0-5]|6[2-4689]0)\\d{4}|(?:45|77|88)\\d{5}"]]], "PY": ["595", "00", "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, [0, ["9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}", [9]]]], "QA": ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[16]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["[35-7]\\d{7}", [8]]]], "RE": ["262", "00", "(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"]]], "RO": ["40", "00", "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}", [9]]], 0, " int "], "RS": ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:[0-689]|7\\d)\\d{6,7}", [8, 9, 10]]]], "RU": ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "3[04-689]|[489]", [0, ["9\\d{9}", [10]]], "8~10"], "RW": ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7[237-9]\\d{7}", [9]]]], "SA": ["966", "00", "92\\d{7}|(?:[15]|8\\d)\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["81"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, 0, 0, 0, 0, [0, ["579[01]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}", [9]]]], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]], 0, 0, 0, 0, 0, 0, [0, ["48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}"]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, [0, ["2[125-8]\\d{5}"]], "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1[0-2]|9[0-3569])\\d{7}"]]], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0", 0, 0, 0, 0, 0, [0, ["7[02369]\\d{7}", [9]]]], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, ["8(?:09[0-689]|96[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-5])|9[0-8]\\d)\\d{5}", [8]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]", [0, ["[56]\\d{4}", [5]]]], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[0139]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [0, ["65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}", [8]]], "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79", [0, ["(?:4[015-8]|9\\d)\\d{6}", [8]]]], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1/$2 $3 $4", ["[3-5]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}", [9]]]], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [0, ["(?:25|3[0-5]|66|7[2-9]|8[08]|9[09])\\d{6}"]]], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1", 0, 0, [0, ["6[16]\\d{6}", [8]]]], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]], 0, 0, 0, 0, 0, 0, [0, ["7(?:(?:[06-8]\\d|[19]0|21)\\d|5(?:0[01]|[19]0|2[25]|[38]3|[4-7]\\d))\\d{5}"]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|77|9[2-9]"]]], "0", 0, 0, 0, 0, 0, [0, ["(?:(?:15|(?:3[59]|4[89]|6\\d|7[79]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}", [7, 8, 9]]]], "SR": ["597", "00", "(?:[2-5]|68|[78]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-8]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[124-7]|8[124-9])\\d{5}", [7]]]], "SS": ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:12|9[1257-9])\\d{7}"]]], "ST": ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], 0, 0, 0, 0, 0, 0, [0, ["900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}"]]], "SV": ["503", "00", "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[267]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, [0, ["[67]\\d{7}", [8]]]], "SX": ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721", [0, ["7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}"]]], "SY": ["963", "00", "[1-39]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-5]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [0, ["9[1-689]\\d{7}", [9]]]], "SZ": ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]], 0, 0, 0, 0, 0, 0, [0, ["7[6-9]\\d{6}", [8]]]], "TA": ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8"], "TC": ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649", [0, ["649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}"]]], "TD": ["235", "00|16", "(?:22|[689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[69]\\d|77|8[56])\\d{6}"]], "00"], "TG": ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[019]|9[0-36-9])\\d{6}"]]], "TH": ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["67(?:1[0-8]|2[4-7])\\d{5}|(?:14|6[1-6]|[89]\\d)\\d{7}", [9]]]], "TJ": ["992", "810", "[0-57-9]\\d{8}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[0-57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0178]|2[02]|[34]0|5[05]|7[01578]|8[078])\\d{7}"]], "8~10"], "TK": ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7], 0, 0, 0, 0, 0, 0, 0, [0, ["7[2-4]\\d{2,5}"]]], "TL": ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [0, ["7[2-8]\\d{6}", [8]]]], "TM": ["993", "810", "(?:[1-6]\\d|71)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, [0, ["(?:6\\d|71)\\d{6}"]], "8~10"], "TN": ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}"]]], "TO": ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}", [7]]]], "TR": ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5(?:[0-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [0, ["561(?:011|61\\d)\\d{4}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}", [10]]]], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868", [0, ["868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}"]]], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[01]\\d|90)\\d{4}", [6, 7]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[258]0"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", "[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:40001[0-2]|9[0-8]\\d{4})\\d{3}", [9]]], 0, "#"], "TZ": ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6[125-9]|7[13-9])\\d{7}"]]], "UA": ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}", [9]]], "0~0"], "UG": ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[27-9]|4(?:6[45]|[7-9])"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[34]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["72[48]0\\d{5}|7(?:[015-8]\\d|2[067]|36|4[0-6]|9[89])\\d{6}"]]], "US": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [0, ["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", [6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, [0, ["9[1-9]\\d{6}", [8]]], "00", " int. "], "UZ": ["998", "00", "(?:20|33|[5-79]\\d|88)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:(?:[25]0|33|88|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}"]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698", [0, ["3[1-9]\\d{8}|3[2-9]\\d{7}", [9, 10]]]], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784", [0, ["784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}"]]], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4(?:1[24-8]|2[46])\\d{7}"]]], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284", [0, ["284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}"]]], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340", [0, ["340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}"]]], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", 1], ["(\\d{4})(\\d{4,6})", "$1 $2", ["1"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [0, ["(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}", [9]]]], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[58]\\d|7[013-7])\\d{5}", [7]]]], "WF": ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:72|8[23])\\d{4}", [6]]]], "WS": ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[1-35-7]|8(?:[3-7]|9\\d{3}))\\d{5}", [7, 10]]]], "XK": ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4[3-9]\\d{6}", [8]]]], "YE": ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7[01378]\\d{7}", [9]]]], "YT": ["262", "00", "(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", [9], 0, "0", 0, 0, 0, 0, 0, [0, ["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"]]], "ZA": ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:6\\d\\d|7(?:[0-46-9]\\d|5[0-4]))\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}", [5, 6, 7, 8, 9]]]], "ZM": ["260", "00", "800\\d{6}|(?:21|63|[79]\\d)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[79]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:7[5-79]|9[5-8])\\d{7}"]]], "ZW": ["263", "00", "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", [5, 6, 7, 8, 9, 10], [["(\\d{3})(\\d{3,5})", "$1 $2", ["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"], "0$1"], ["(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]|39|54"], "0$1"], ["(\\d{4})(\\d{3,5})", "$1 $2", ["(?:25|54)8", "258|5483"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:[1278]\\d|3[1-9])\\d{6}", [9]]]] }, "nonGeographic": { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[35-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[35-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|51"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } }; function withMetadataArgument(func, _arguments) { var args = Array.prototype.slice.call(_arguments); args.push(metadata); return func.apply(this, args); } function parsePhoneNumber() { return withMetadataArgument(parsePhoneNumber$2, arguments); } const _imports_0$9 = "/static/icon/select-icon.png"; const _sfc_main$34 = { __name: "phone-international-input", props: { verifyUsername: { type: Boolean } }, emits: ["input"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const country = vue.ref(countryData); const selectedCode = vue.ref(""); const selectedCountryCode = vue.ref(""); const selectedIndex = vue.ref(0); const findIndexByCode = (code2) => { return country.value.findIndex((item) => item.phone_code == code2); }; const pickChange = (e2) => { selectedIndex.value = e2.detail.value; selectedCode.value = country.value[selectedIndex.value].phone_code; selectedCountryCode.value = country.value[selectedIndex.value].country_code; }; onLoad(() => { const chinaIndex = findIndexByCode("86"); if (chinaIndex !== -1) { selectedIndex.value = chinaIndex; selectedCode.value = country.value[chinaIndex].phone_code; selectedCountryCode.value = country.value[chinaIndex].country_code; } }); const props = __props; const emits = __emit; const verifyMobile = (e2) => { const phone = e2; if (phone == "") { emits("input", phone, t$6("account.phone_number")); } else { try { const phoneParseMobile = parsePhoneNumber(phone, selectedCountryCode.value); if (phoneParseMobile.isValid()) { emits("input", phone, ""); } else { emits("input", phone, t$6("account.incorrect_phone_format")); } } catch (e3) { } } }; const state = vue.reactive({ codeText: t$6("account.get_verification_code"), model: { mobile: "" // 手机号 } }); const __returned__ = { country, selectedCode, selectedCountryCode, selectedIndex, findIndexByCode, pickChange, props, emits, verifyMobile, state, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() { return sheep$1; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get onLoad() { return onLoad; }, get countryData() { return countryData; }, get parsePhoneNumberFromString() { return parsePhoneNumber$1; }, get AsYouType() { return AsYouType; }, get parseMobile() { return parsePhoneNumber; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$33(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode("picker", { mode: "selector", range: $setup.country.map((item) => item.chinese_name + " +" + item.phone_code), value: $setup.selectedIndex, onChange: $setup.pickChange, style: { "float": "left", "height": "100%", "width": "110rpx", "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("view", null, [ vue.createTextVNode( "+" + vue.toDisplayString($setup.selectedCode) + " ", 1 /* TEXT */ ), vue.createElementVNode("image", { src: _imports_0$9, style: { "width": "20rpx", "height": "20rpx" } }) ]) ], 40, ["range", "value"]), vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.phone_number"), modelValue: $setup.state.model.mobile, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event), onInput: $setup.verifyMobile, inputBorder: false, type: "number", style: { "float": "left", "width": "calc(100% - 110rpx)" } }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "disabled": !$props.verifyUsername || $setup.selectedCode != 86 }]), disabled: !$props.verifyUsername || $setup.selectedCode != 86, onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("smsLogin", $setup.state.model.mobile)) }, vue.toDisplayString($setup.getSmsTimer("smsLogin")), 11, ["disabled"]) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ], 64 /* STABLE_FRAGMENT */ ); } const phoneInternationalInput = /* @__PURE__ */ _export_sfc(_sfc_main$34, [["render", _sfc_render$33], ["__scopeId", "data-v-5db53ad8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/phone-international-input.vue"]]); const _sfc_main$33 = { __name: "sms-login", props: { agreeStatus: { type: Boolean, default: false } }, emits: ["onConfirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const mobileInput = (mobile2, mobileError) => { state.model.mobile = mobile2; state.mobileErrorMsg = mobileError; }; const smsLoginRef = vue.ref(null); const emits = __emit; const props = __props; const state = vue.reactive({ verifyUsername: true, usernameErrorMsg: "", isMobileEnd: false, // 手机号输入完毕 codeText: t$6("account.get_verification_code"), mobileErrorMsg: "", model: { username: "", mobile: "", // 手机号 code: "" // 验证码 }, rules: { username, code, mobile } }); let lastUsername = vue.ref(""); async function verifyUsername(e2) { const username2 = e2.detail.value; if (username2 == "" || username2 == lastUsername.value) { return false; } lastUsername.value = username2; const { data } = await AuthUtil.verifyUsername(username2); if (data) { state.usernameErrorMsg = t$6("account.enter_valid_username"); state.verifyUsername = data; } else { state.usernameErrorMsg = ""; state.verifyUsername = data; } } async function smsLoginSubmit() { const linkId = uni.getStorageSync("linkId"); if (linkId) { state.model.linkId = linkId; } const validate = await vue.unref(smsLoginRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/sms-login.vue:120", "error: ", error2); }); if (!validate) { return; } if (!props.agreeStatus) { emits("onConfirm", true); sheep$1.$helper.toast(t$6("account.please_agree")); return; } const { code: code2 } = await AuthUtil.smsLogin(state.model); if (code2 === 0) { closeAuthModal(); } } const __returned__ = { mobileInput, smsLoginRef, emits, props, state, get lastUsername() { return lastUsername; }, set lastUsername(v2) { lastUsername = v2; }, verifyUsername, smsLoginSubmit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() { return sheep$1; }, get code() { return code; }, get mobile() { return mobile; }, get username() { return username; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get AuthUtil() { return AuthUtil; }, phoneInternationalInput, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$32(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "smsLoginRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "160", labelAlign: "center", class: "loginUniForm" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "username", label: $setup.t("account.username"), class: "loginUniFormItem", "error-message": $setup.state.usernameErrorMsg }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_username"), modelValue: $setup.state.model.username, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event), inputBorder: false, clearable: false, onBlur: $setup.verifyUsername }, { right: vue.withCtx(() => [ $setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "icon" }, [ vue.createElementVNode("image", { style: "", src: $setup.sheep.$url.static("/static/images/shibai.png") }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "icon" }, [ vue.createElementVNode("image", { src: $setup.sheep.$url.static("/static/images/chenggong.png") }, null, 8, ["src"]) ])) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label", "error-message"]), vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.phone_number"), class: "mobile loginUniFormItem ss-p-t-10", "error-message": $setup.state.mobileErrorMsg }, { default: vue.withCtx(() => [ vue.createVNode($setup["phoneInternationalInput"], { "verify-username": !$setup.state.verifyUsername, onInput: $setup.mobileInput }, null, 8, ["verify-username"]) ]), _: 1 /* STABLE */ }, 8, ["label", "error-message"]), vue.createVNode(_component_uni_forms_item, { name: "code", label: $setup.t("account.verification_code"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_verification_code"), modelValue: $setup.state.model.code, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.code = $event), inputBorder: false, type: "number", maxlength: "4" }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [ vue.createCommentVNode(` `), vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.smsLoginSubmit }, vue.toDisplayString($setup.t("account.login")), 1 /* TEXT */ ) ]) ]); } const smsLogin = /* @__PURE__ */ _export_sfc(_sfc_main$33, [["render", _sfc_render$32], ["__scopeId", "data-v-7636e637"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/sms-login.vue"]]); const _sfc_main$32 = { __name: "register", props: { agreeStatus: { type: Boolean, default: false } }, emits: ["onConfirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const mobileInput = (mobile2, mobileError) => { state.model.mobile = mobile2; state.mobileErrorMsg = mobileError; }; const state = vue.reactive({ verifyUsername: false, // 校验用户名是否可用 codeText: "获取验证码", mobileErrorMsg: "", usernameErrorMsg: "", model: { username: "", // 用户名 password: "", // 密码 mobile: "", // 手机号 code: "" // 验证码 }, rules: { username, password, code } }); const smsLoginRef = vue.ref(null); const emits = __emit; const props = __props; let lastUsername = vue.ref(""); async function verifyUsername(e2) { const username2 = e2.detail.value; if (username2 == "" || username2 == lastUsername.value) { return false; } lastUsername.value = username2; const { data } = await AuthUtil.verifyUsername(username2); if (data) { state.usernameErrorMsg = ""; state.verifyUsername = data; } else { state.usernameErrorMsg = t$6("account.username_exists"); state.verifyUsername = data; } } async function registerSubmit() { formatAppLog("log", "at sheep/components/s-auth-modal/components/register.vue:117", state.model); const validate = await vue.unref(smsLoginRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/register.vue:122", "error: ", error2); }); if (!validate) { return; } if (!props.agreeStatus) { emits("onConfirm", true); sheep$1.$helper.toast(t$6("account.please_agree")); return; } const { code: code2 } = await AuthUtil.register(state.model); if (code2 === 0) { closeAuthModal(); } } const __returned__ = { mobileInput, state, smsLoginRef, emits, props, get lastUsername() { return lastUsername; }, set lastUsername(v2) { lastUsername = v2; }, verifyUsername, registerSubmit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() { return sheep$1; }, get code() { return code; }, get mobile() { return mobile; }, get username() { return username; }, get password() { return password; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get AuthUtil() { return AuthUtil; }, phoneInternationalInput, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$31(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "smsLoginRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center", class: "loginUniForm" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "username", label: $setup.t("account.username"), class: "loginUniFormItem", "error-message": $setup.state.usernameErrorMsg }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_username"), modelValue: $setup.state.model.username, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event), inputBorder: false, clearable: false, onBlur: $setup.verifyUsername }, { right: vue.withCtx(() => [ !$setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "icon" }, [ vue.createElementVNode("image", { style: "", src: $setup.sheep.$url.static("/static/images/shibai.png") }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "icon" }, [ vue.createElementVNode("image", { src: $setup.sheep.$url.static("/static/images/chenggong.png") }, null, 8, ["src"]) ])) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label", "error-message"]), vue.createVNode(_component_uni_forms_item, { name: "password", label: $setup.t("account.password"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { type: "password", placeholder: $setup.t("account.enter_password"), modelValue: $setup.state.model.password, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.password = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.phone_number"), class: "mobile loginUniFormItem ss-p-t-10", "error-message": $setup.state.mobileErrorMsg }, { default: vue.withCtx(() => [ vue.createVNode($setup["phoneInternationalInput"], { "verify-username": $setup.state.verifyUsername, onInput: $setup.mobileInput }, null, 8, ["verify-username"]) ]), _: 1 /* STABLE */ }, 8, ["label", "error-message"]), vue.createVNode(_component_uni_forms_item, { name: "code", label: $setup.t("account.verification_code"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_verification_code"), modelValue: $setup.state.model.code, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.code = $event), inputBorder: false, type: "number", maxlength: "4" }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [ vue.createCommentVNode(` `), vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.registerSubmit }, vue.toDisplayString($setup.t("account.register")), 1 /* TEXT */ ) ]) ]); } const register = /* @__PURE__ */ _export_sfc(_sfc_main$32, [["render", _sfc_render$31], ["__scopeId", "data-v-5a48a10b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/register.vue"]]); const _sfc_main$31 = { __name: "reset-password", setup(__props, { expose: __expose }) { __expose(); const resetPasswordRef = vue.ref(null); const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); const state = vue.reactive({ isMobileEnd: false, // 手机号输入完毕 model: { mobile: "", // 手机号 code: "", // 验证码 password: "" // 密码 }, rules: { code, mobile, password } }); const resetPasswordSubmit = async () => { const validate = await vue.unref(resetPasswordRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/reset-password.vue:102", "error: ", error2); }); if (!validate) { return; } const { code: code2 } = await UserApi.resetUserPassword(state.model); if (code2 !== 0) { return; } showAuthModal("accountLogin"); }; const __returned__ = { resetPasswordRef, isLogin, state, resetPasswordSubmit, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() { return sheep$1; }, get code() { return code; }, get mobile() { return mobile; }, get password() { return password; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get UserApi() { return UserApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$30(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 标题栏 "), vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [ vue.createElementVNode("view", { class: "head-title ss-m-b-20" }, "重置密码"), vue.createElementVNode("view", { class: "head-subtitle" }, "为了您的账号安全,设置密码前请先进行安全验证") ]), vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "resetPasswordRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "mobile", label: "手机号" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: "请输入手机号", modelValue: $setup.state.model.mobile, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event), type: "number", inputBorder: false }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]), disabled: $setup.state.isMobileEnd, onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("resetPassword", $setup.state.model.mobile)) }, vue.toDisplayString($setup.getSmsTimer("resetPassword")), 11, ["disabled"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "code", label: "验证码" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: "请输入验证码", modelValue: $setup.state.model.code, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.code = $event), type: "number", maxlength: "4", inputBorder: false }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "password", label: "密码" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { type: "password", placeholder: "请输入密码", modelValue: $setup.state.model.password, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.password = $event), inputBorder: false }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: "ss-reset-button login-btn-start", onClick: $setup.resetPasswordSubmit }, " 确认 ") ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), !$setup.isLogin ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: "ss-reset-button type-btn", onClick: _cache[5] || (_cache[5] = ($event) => $setup.showAuthModal("accountLogin")) }, " 返回登录 ")) : vue.createCommentVNode("v-if", true) ]); } const resetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$31, [["render", _sfc_render$30], ["__scopeId", "data-v-859b5179"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/reset-password.vue"]]); const _sfc_main$30 = { __name: "change-mobile", setup(__props, { expose: __expose }) { __expose(); const step = vue.ref(0); const changeMobileRef = vue.ref(null); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const state = vue.reactive({ isMobileEnd: false, // 手机号输入完毕 model: { oldMobile: "", oldCode: "", mobile: "", // 手机号 code: "" // 验证码 }, rules: { code, mobile } }); async function nextStep() { const validate = await vue.unref(changeMobileRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/change-mobile.vue:113", "error: ", error2); }); if (!validate) { return; } const { code: code2, data } = await AuthUtil.validatePhone(state.model.oldMobile, state.model.oldCode, 2); formatAppLog("log", "at sheep/components/s-auth-modal/components/change-mobile.vue:122", "下一步的请求校验", data); if (data) { step.value = 1; } } async function changeMobileSubmit() { const validate = await vue.unref(changeMobileRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/change-mobile.vue:133", "error: ", error2); }); if (!validate) { return; } const { code: code2 } = await UserApi.updateUserMobile({ "mobile": state.model.mobile, "code": state.model.code }); if (code2 !== 0) { return; } uni.showToast({ icon: "success", title: t$6("account.login_again") }); setTimeout(function() { sheep$1.$store("user").logout(); closeAuthModal(); sheep$1.$router.go("/pages/index/user"); }, 1e3); } async function getPhoneNumber(e2) { if (e2.detail.errMsg !== "getPhoneNumber:ok") { return; } const result2 = await sheep$1.$platform.useProvider().bindUserPhoneNumber(e2.detail); if (result2) { sheep$1.$store("user").getInfo(); closeAuthModal(); } } const __returned__ = { step, changeMobileRef, userInfo: userInfo2, state, nextStep, changeMobileSubmit, getPhoneNumber, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() { return sheep$1; }, get code() { return code; }, get mobile() { return mobile; }, get closeAuthModal() { return closeAuthModal; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get UserApi() { return UserApi; }, get AuthUtil() { return AuthUtil; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2$(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 标题栏 "), vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [ vue.createElementVNode( "view", { class: "head-title ss-m-b-20" }, vue.toDisplayString($setup.userInfo.mobile ? $setup.t("account.change_phone_number") : $setup.t("account.bind_phone_number")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "head-subtitle" }, vue.toDisplayString($setup.t("account.security_notice")), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 表单项 "), !$setup.step ? (vue.openBlock(), vue.createBlock(_component_uni_forms, { key: 0, ref: "changeMobileRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.old_phone_number") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_old_phone_number"), modelValue: $setup.state.model.oldMobile, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.oldMobile = $event), inputBorder: false, type: "number" }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]), disabled: $setup.state.isMobileEnd, onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("changeMobileOld", $setup.state.model.oldMobile)) }, vue.toDisplayString($setup.getSmsTimer("changeMobileOld")), 11, ["disabled"]) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "code", label: $setup.t("account.verification_code") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_verification_code"), modelValue: $setup.state.model.oldCode, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.oldCode = $event), inputBorder: false, type: "number", maxlength: "4" }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.nextStep }, vue.toDisplayString($setup.t("common.next")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"])) : (vue.openBlock(), vue.createBlock(_component_uni_forms, { key: 1, ref: "changeMobileRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.new_phone_number") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_new_phone_number"), modelValue: $setup.state.model.mobile, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.mobile = $event), inputBorder: false, type: "number" }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]), disabled: $setup.state.isMobileEnd, onClick: _cache[4] || (_cache[4] = ($event) => $setup.getSmsCode("changeMobileNew", $setup.state.model.mobile)) }, vue.toDisplayString($setup.getSmsTimer("changeMobileNew")), 11, ["disabled"]) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "code", label: $setup.t("account.verification_code") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_verification_code"), modelValue: $setup.state.model.code, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.model.code = $event), inputBorder: false, type: "number", maxlength: "4" }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.changeMobileSubmit }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"])), vue.createCommentVNode(" 微信独有:读取手机号 "), vue.createCommentVNode(` `) ]); } const changeMobile = /* @__PURE__ */ _export_sfc(_sfc_main$30, [["render", _sfc_render$2$], ["__scopeId", "data-v-146b49fd"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/change-mobile.vue"]]); const _sfc_main$2$ = { __name: "change-password", setup(__props, { expose: __expose }) { __expose(); const changePasswordRef = vue.ref(null); const state = vue.reactive({ isMobileEnd: false, // 手机号输入完毕 model: { mobile: "", // 手机号 code: "", // 验证码 password: "" // 密码 }, rules: { code, password } }); async function changePasswordSubmit() { if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/.test(state.model.password)) { uni.showToast({ icon: "error", title: t$6("account.password_requirements") }); } const validate = await vue.unref(changePasswordRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/change-password.vue:90", "error: ", error2); }); if (!validate) { return; } const { code: code2 } = await UserApi.updateUserPassword(state.model); if (code2 !== 0) { return; } uni.showToast({ icon: "success", title: t$6("account.modification_successful") }); setTimeout(function() { closeAuthModal(); }, 1e3); } const __returned__ = { changePasswordRef, state, changePasswordSubmit, get sheep() { return sheep$1; }, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get code() { return code; }, get password() { return password; }, get closeAuthModal() { return closeAuthModal; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get UserApi() { return UserApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2_(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 标题栏 "), vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [ vue.createElementVNode( "view", { class: "head-title ss-m-b-20" }, vue.toDisplayString($setup.t("account.change_password")), 1 /* TEXT */ ), vue.createCommentVNode(' 如密码丢失或未设置,请点击忘记密码重新设置 ') ]), vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "changePasswordRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "code", label: $setup.t("account.verification_code") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_verification_code"), modelValue: $setup.state.model.code, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.code = $event), type: "number", maxlength: "4", inputBorder: false }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]), disabled: $setup.state.isMobileEnd, onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("changePassword")) }, vue.toDisplayString($setup.getSmsTimer("changePassword")), 11, ["disabled"]) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "reNewPassword", label: $setup.t("account.password") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { type: "password", placeholder: $setup.t("account.enter_password"), modelValue: $setup.state.model.password, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.password = $event), inputBorder: false }, { right: vue.withCtx(() => [ vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.changePasswordSubmit }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createElementVNode( "button", { class: "ss-reset-button type-btn", onClick: _cache[4] || (_cache[4] = (...args) => $setup.closeAuthModal && $setup.closeAuthModal(...args)) }, vue.toDisplayString($setup.t("account.cancel_change")), 1 /* TEXT */ ) ]); } const changePassword = /* @__PURE__ */ _export_sfc(_sfc_main$2$, [["render", _sfc_render$2_], ["__scopeId", "data-v-639aa0c2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/change-password.vue"]]); const _sfc_main$2_ = { __name: "mp-authorization", props: { agreeStatus: { type: Boolean, default: false } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const accountLoginRef = vue.ref(null); const state = vue.reactive({ model: { nickname: userInfo2.value.nickname, avatar: userInfo2.value.avatar }, rules: {}, disabledStyle: { color: "#999", disableColor: "#fff" } }); function onChooseAvatar(e2) { const tempUrl = e2.detail.avatarUrl || ""; uploadAvatar(tempUrl); } async function uploadAvatar(tempUrl) { if (!tempUrl) { return; } let { data } = await FileApi.uploadFile(tempUrl); state.model.avatar = data; } async function onConfirm() { const { model } = state; const { nickname, avatar } = model; if (!nickname) { sheep$1.$helper.toast(t$6("account.select_avatar")); return; } if (!avatar) { sheep$1.$helper.toast(t$6("account.enter_nickname")); return; } const { code: code2 } = await UserApi.updateUser({ avatar: state.model.avatar, nickname: state.model.nickname }); if (code2 === 0) { sheep$1.$helper.toast(t$6("account.authorization_successful")); await sheep$1.$store("user").getInfo(); closeAuthModal(); } } const __returned__ = { props, userInfo: userInfo2, accountLoginRef, state, onChooseAvatar, uploadAvatar, onConfirm, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, get sheep() { return sheep$1; }, get closeAuthModal() { return closeAuthModal; }, get FileApi() { return FileApi; }, get UserApi() { return UserApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2Z(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 标题栏 "), vue.createElementVNode("view", { class: "head-box ss-m-b-60 ss-flex-col" }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [ vue.createElementVNode( "view", { class: "head-title ss-m-r-40 head-title-animation" }, vue.toDisplayString($setup.t("account.authorization_info")), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "head-subtitle" }, vue.toDisplayString($setup.t("account.complete_profile")), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "accountLoginRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center" }, { default: vue.withCtx(() => [ vue.createCommentVNode(" 获取头像昵称:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/userProfile.html "), vue.createVNode(_component_uni_forms_item, { name: "avatar", label: $setup.t("account.avatar") }, { default: vue.withCtx(() => [ vue.createElementVNode( "button", { class: "ss-reset-button avatar-btn", "open-type": "chooseAvatar", onChooseavatar: $setup.onChooseAvatar }, [ vue.createElementVNode("image", { class: "avatar-img", src: $setup.sheep.$url.cdn($setup.state.model.avatar), mode: "aspectFill", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/info")) }, null, 8, ["src"]), vue.createElementVNode("text", { class: "cicon-forward" }) ], 32 /* NEED_HYDRATION */ ) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "nickname", label: $setup.t("account.nickname") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { type: "nickname", placeholder: $setup.t("account.enter_nickname"), modelValue: $setup.state.model.nickname, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.nickname = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createElementVNode("view", { class: "foot-box" }, [ vue.createElementVNode( "button", { class: "ss-reset-button authorization-btn", onClick: $setup.onConfirm }, vue.toDisplayString($setup.t("account.confirm_authorization")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]) ]); } const mpAuthorization = /* @__PURE__ */ _export_sfc(_sfc_main$2_, [["render", _sfc_render$2Z], ["__scopeId", "data-v-bf1cb4c0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/mp-authorization.vue"]]); const _sfc_main$2Z = { __name: "officialAccountFirstLogin", emits: ["onConfirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const smsLoginRef = vue.ref(null); const emits = __emit; const state = vue.reactive({ isMobileEnd: false, // 手机号输入完毕 codeText: "获取验证码", model: { mobile: "", // 手机号 code: "" // 验证码 }, rules: { code, mobile } }); async function OfficialEnterLogin() { const validate = await vue.unref(smsLoginRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/officialAccountFirstLogin.vue:85", "error: ", error2); }); if (!validate) { return; } const { code: code2 } = await AuthUtil.smsLogin(state.model); if (code2 === 0) { closeAuthModal(); } } const __returned__ = { smsLoginRef, emits, state, OfficialEnterLogin, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() { return sheep$1; }, get code() { return code; }, get mobile() { return mobile; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get AuthUtil() { return AuthUtil; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2Y(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "head-box" }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [ vue.createElementVNode( "view", { class: "isActive head-title" }, vue.toDisplayString($setup.t("account.first_time_login")), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "smsLoginRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center", class: "loginUniForm" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.phone_number"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_phone_number"), modelValue: $setup.state.model.mobile, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event), inputBorder: false, type: "number" }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]), disabled: $setup.state.isMobileEnd, onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("smsLogin", $setup.state.model.mobile)) }, vue.toDisplayString($setup.getSmsTimer("smsLogin")), 11, ["disabled"]) ]), _: 1 /* STABLE */ }, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "code", label: $setup.t("account.verification_code"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_verification_code"), modelValue: $setup.state.model.code, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.code = $event), inputBorder: false, type: "number", maxlength: "4" }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [ vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.OfficialEnterLogin }, vue.toDisplayString($setup.t("account.continue_login")), 1 /* TEXT */ ) ]) ]); } const officialAccountFirstLogin = /* @__PURE__ */ _export_sfc(_sfc_main$2Z, [["render", _sfc_render$2Y], ["__scopeId", "data-v-4de4e8c0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/officialAccountFirstLogin.vue"]]); const _sfc_main$2Y = { __name: "alipay-account", props: { agreeStatus: { type: Boolean, default: false } }, emits: ["onConfirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const alipayAccountRef = vue.ref(null); const emits = __emit; const props = __props; const state = vue.reactive({ model: { alipayName: "", // 名称 alipayAccount: "" // 账号 }, rules: { alipayAccount: alipayAccount$1 } }); async function submit() { if (!state.model.alipayName || !state.model.alipayAccount) { return false; } const validate = await vue.unref(alipayAccountRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/alipay-account.vue:87", "error: ", error2); }); if (!validate) return; const { code: code2 } = await UserApi.updateUserAlipayAccount({ alipayName: state.model.alipayName, alipayAccount: state.model.alipayAccount }); if (code2 === 0) { uni.showToast({ icon: "success", title: t$6("account.change_password") }); closeAuthModal(); uni.$emit("alipayAccountChangeComplete"); } } onLoad(async (options2) => { state.model.alipayName = userInfo2.value.alipayName; state.model.alipayAccount = userInfo2.value.alipayAccount; }); const __returned__ = { userInfo: userInfo2, alipayAccountRef, emits, props, state, submit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() { return sheep$1; }, get alipayAccount() { return alipayAccount$1; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get AuthUtil() { return AuthUtil; }, get UserApi() { return UserApi; }, get onLoad() { return onLoad; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2X(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 标题栏 "), vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [ vue.createElementVNode( "view", { class: "head-title ss-m-b-20" }, vue.toDisplayString($setup.userInfo.alipayName && $setup.userInfo.alipayAccount ? $setup.t("account.change_alipay_account") : $setup.t("account.bind_alipay_account")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "head-subtitle" }, vue.toDisplayString($setup.t("account.bind_realname_alipay")), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "alipayAccountRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "140", labelAlign: "center", class: "loginUniForm" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { label: $setup.t("account.name"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_name"), modelValue: $setup.state.model.alipayName, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.alipayName = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "alipayAccount", label: $setup.t("account.account"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.enter_account"), modelValue: $setup.state.model.alipayAccount, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.alipayAccount = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [ vue.createCommentVNode(` `), vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.submit }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]); } const alipayAccount = /* @__PURE__ */ _export_sfc(_sfc_main$2Y, [["render", _sfc_render$2X], ["__scopeId", "data-v-754d55b7"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/alipay-account.vue"]]); const _sfc_main$2X = { __name: "bank-account", props: { agreeStatus: { type: Boolean, default: false } }, emits: ["onConfirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const alipayAccountRef = vue.ref(null); const emits = __emit; const props = __props; const state = vue.reactive({ model: { accountName: "", // 开户名 bankName: "", // 开户行 bankAccount: "" //银行账号 }, rules: { bankCode } }); async function submit() { if (!state.model.accountName || !state.model.bankName || !state.model.bankAccount) { return false; } const validate = await vue.unref(alipayAccountRef).validate().catch((error2) => { formatAppLog("log", "at sheep/components/s-auth-modal/components/bank-account.vue:94", "error: ", error2); }); if (!validate) return; const { code: code2 } = await UserApi.updateUserBankAccount({ accountName: state.model.accountName, bankName: state.model.bankName, bankAccount: state.model.bankAccount }); if (code2 === 0) { uni.showToast({ icon: "success", title: t$6("account.change_password") }); closeAuthModal(); uni.$emit("bankAccountChangeComplete"); } } onLoad(async (options2) => { state.model.accountName = userInfo2.value.accountName; state.model.bankName = userInfo2.value.bankName; state.model.bankAccount = userInfo2.value.bankAccount; }); const __returned__ = { userInfo: userInfo2, alipayAccountRef, emits, props, state, submit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() { return sheep$1; }, get bankCode() { return bankCode; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get AuthUtil() { return AuthUtil; }, get UserApi() { return UserApi; }, get onLoad() { return onLoad; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2W(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createCommentVNode(" 标题栏 "), vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [ vue.createElementVNode( "view", { class: "head-title ss-m-b-20" }, vue.toDisplayString($setup.userInfo.bankName && $setup.userInfo.accountName && $setup.userInfo.bankAccount ? $setup.t("account.change_bank_card") : $setup.t("account.bind_bank_card")), 1 /* TEXT */ ), vue.createCommentVNode(' 请绑定已实名认证的支付宝开户行 ') ]), vue.createCommentVNode(" 表单项 "), vue.createVNode(_component_uni_forms, { ref: "alipayAccountRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event), rules: $setup.state.rules, validateTrigger: "bind", labelWidth: "160", labelAlign: "left", class: "loginUniForm" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms_item, { label: $setup.t("account.bank_branch"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.bank_branch_example"), modelValue: $setup.state.model.bankName, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.bankName = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { label: $setup.t("account.account_holder"), class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.account_holder_name"), modelValue: $setup.state.model.accountName, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.accountName = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { label: $setup.t("account.bank_account_number"), name: "bankCode", class: "loginUniFormItem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { placeholder: $setup.t("account.bank_account_number"), modelValue: $setup.state.model.bankAccount, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.bankAccount = $event), inputBorder: false }, null, 8, ["placeholder", "modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [ vue.createCommentVNode(` `), vue.createElementVNode( "button", { class: "ss-reset-button login-btn-start", onClick: $setup.submit }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]); } const bankAccount = /* @__PURE__ */ _export_sfc(_sfc_main$2X, [["render", _sfc_render$2W], ["__scopeId", "data-v-e0d6f1a0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/bank-account.vue"]]); const _sfc_main$2W = { __name: "s-auth-modal", setup(__props, { expose: __expose }) { __expose(); const appInfo = vue.computed(() => sheep$1.$store("app").info); const linkId = uni.getStorageSync("linkId"); const modalStore = sheep$1.$store("modal"); const authType = vue.computed(() => modalStore.auth); const isActive = vue.computed(() => modalStore.isActive); const state = vue.reactive({ protocol: false }); const currentProtocol = vue.ref(false); function onChange() { state.protocol = !state.protocol; } function onProtocol(title) { closeAuthModal(); sheep$1.$router.go("/pages/public/richtext", { title }); } function onConfirm(e2) { currentProtocol.value = e2; setTimeout(() => { currentProtocol.value = false; }, 1e3); } const thirdLogin = async (provider2) => { if (!state.protocol) { currentProtocol.value = true; setTimeout(() => { currentProtocol.value = false; }, 1e3); sheep$1.$helper.toast(t$6("account.please_agree")); return; } const loginRes = await sheep$1.$platform.useProvider(provider2).login(); if (loginRes) { closeAuthModal(); } }; const thirdRegister = async (provider2) => { if (!state.protocol) { currentProtocol.value = true; setTimeout(() => { currentProtocol.value = false; }, 1e3); sheep$1.$helper.toast(t$6("account.please_agree")); return; } const loginRes = await sheep$1.$platform.useProvider(provider2).register(); if (loginRes) { closeAuthModal(); } }; const getPhoneNumber = async (e2) => { if (e2.detail.errMsg !== "getPhoneNumber:ok") { sheep$1.$helper.toast(t$6("account.quick_login_failed")); return; } let result2 = await sheep$1.$platform.useProvider().mobileLogin(e2.detail); if (result2) { closeAuthModal(); } }; const __returned__ = { appInfo, linkId, modalStore, authType, isActive, state, currentProtocol, onChange, onProtocol, onConfirm, thirdLogin, thirdRegister, getPhoneNumber, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, get sheep() { return sheep$1; }, accountLogin, smsLogin, register, resetPassword, changeMobile, changePassword, mpAuthorization, get officialAccountFirstLogin() { return officialAccountFirstLogin; }, alipayAccount, bankAccount, get closeAuthModal() { return closeAuthModal; }, get showAuthModal() { return showAuthModal; }, get wx() { return wx$1; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2V(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 规格弹窗 "), vue.createVNode(_component_su_popup, { show: $setup.authType !== "", round: "10", showClose: true, onClose: $setup.closeAuthModal }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "login-wrap" }, [ vue.createCommentVNode(" 标题栏 "), ["smsLogin", "accountLogin", "register"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "head-box" }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([$setup.isActive == "accountLogin" ? `head-title ss-m-r-40 head-title-animation` : `head-title-active ss-m-r-40`]), onClick: _cache[0] || (_cache[0] = ($event) => { $setup.isActive = "accountLogin"; $setup.showAuthModal("accountLogin", "accountLogin"); }) }, vue.toDisplayString($setup.t("account.account_login")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass([$setup.isActive == "smsLogin" ? `head-title head-title-line head-title-animation ss-m-r-40` : ` ss-m-r-40 head-title-active head-title-line`]), onClick: _cache[1] || (_cache[1] = ($event) => { $setup.isActive = "smsLogin"; $setup.showAuthModal("smsLogin", "smsLogin"); }) }, vue.toDisplayString($setup.t("account.sms_login")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass([$setup.isActive == "register" ? `head-title head-title-line head-title-animation` : `head-title-active head-title-line`]), onClick: _cache[2] || (_cache[2] = ($event) => { $setup.isActive = "register"; $setup.showAuthModal("register", "register"); }) }, [ vue.createCommentVNode(' v-if="linkId" '), vue.createTextVNode( " " + vue.toDisplayString($setup.t("account.register")), 1 /* TEXT */ ) ], 2 /* CLASS */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 用户协议的勾选 "), ["smsLogin", "accountLogin", "register"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["agreement-box ss-flex ss-row-center", { shake: $setup.currentProtocol }]) }, [ vue.createElementVNode("label", { class: "radio ss-flex ss-col-center", onClick: $setup.onChange }, [ vue.createElementVNode("radio", { checked: $setup.state.protocol, color: "var(--ui-BG-Main)", style: { "transform": "scale(0.8)" }, onClick: vue.withModifiers($setup.onChange, ["stop"]) }, null, 8, ["checked"]), vue.createElementVNode("view", { class: "agreement-text ss-flex ss-col-center ss-m-l-8" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("account.read_and_agree")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "tcp-text", onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $setup.onProtocol("用户协议"), ["stop"])) }, vue.toDisplayString($setup.t("account.user_agreement")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "agreement-text" }, vue.toDisplayString($setup.t("account.and")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "tcp-text", onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => $setup.onProtocol("隐私协议"), ["stop"])) }, vue.toDisplayString($setup.t("account.privacy_policy")), 1 /* TEXT */ ) ]) ]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 微信公众号授权登陆 在验证码登录 账号登录中显示"), ["accountLogin", "smsLogin"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center" }, [ ["WechatOfficialAccount", "WechatMiniProgram", "App"].includes($setup.sheep.$platform.name) && $setup.sheep.$platform.isWechatInstalled ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "wx-login-btn", onClick: _cache[5] || (_cache[5] = ($event) => $setup.thirdLogin("wechat")) }, [ vue.createElementVNode("image", { class: "auto-login-img", src: $setup.sheep.$url.static("/static/images/wechat.png") }, null, 8, ["src"]), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("account.wechat_authorization_login")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 微信公众号授权登陆 在账号注册中显示 "), ["register"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center" }, [ ["WechatOfficialAccount", "WechatMiniProgram", "App"].includes($setup.sheep.$platform.name) && $setup.sheep.$platform.isWechatInstalled ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "wx-login-btn", onClick: _cache[6] || (_cache[6] = ($event) => $setup.thirdRegister("wechat")) }, [ vue.createElementVNode("image", { class: "auto-login-img", src: $setup.sheep.$url.static("/static/images/wechat.png") }, null, 8, ["src"]), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("account.wechat_authorization_register")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 1. 微信公众号授权登录 第一次登陆时弹窗绑定手机号 accountLogin "), $setup.authType === "officialAccountFirstLogin" ? (vue.openBlock(), vue.createBlock($setup["officialAccountFirstLogin"], { key: 4, agreeStatus: $setup.state.protocol, onOnConfirm: $setup.onConfirm }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 1. 账号密码登录 accountLogin "), $setup.authType === "accountLogin" ? (vue.openBlock(), vue.createBlock($setup["accountLogin"], { key: 5, agreeStatus: $setup.state.protocol, onOnConfirm: $setup.onConfirm }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 2. 短信登录 smsLogin "), $setup.authType === "smsLogin" ? (vue.openBlock(), vue.createBlock($setup["smsLogin"], { key: 6, agreeStatus: $setup.state.protocol, onOnConfirm: $setup.onConfirm }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 注册 "), $setup.authType === "register" ? (vue.openBlock(), vue.createBlock($setup["register"], { key: 7, agreeStatus: $setup.state.protocol, onOnConfirm: $setup.onConfirm }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 3. 忘记密码 resetPassword"), vue.createCommentVNode(` `), vue.createCommentVNode(" 4. 绑定手机号 changeMobile "), $setup.authType === "changeMobile" ? (vue.openBlock(), vue.createBlock($setup["changeMobile"], { key: 8 })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 5. 修改密码 changePassword"), $setup.authType === "changePassword" ? (vue.openBlock(), vue.createBlock($setup["changePassword"], { key: 9 })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 6. 微信小程序授权 "), $setup.authType === "mpAuthorization" ? (vue.openBlock(), vue.createBlock($setup["mpAuthorization"], { key: 10 })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 绑定支付宝账号 "), $setup.authType === "alipayAccount" ? (vue.openBlock(), vue.createBlock($setup["alipayAccount"], { key: 11 })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 绑定银行卡号 "), $setup.authType === "bankAccount" ? (vue.openBlock(), vue.createBlock($setup["bankAccount"], { key: 12 })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 7. 第三方登录 "), vue.createCommentVNode(` ') ]), vue.createElementVNode("view", { class: "total-box-footer ss-font-28 ss-flex ss-row-right ss-col-center ss-m-r-28" }, [ vue.createElementVNode( "view", { class: "total-num ss-m-r-20" }, vue.toDisplayString($setup.t("confirm.total_items_count", { count: $setup.totalItemCount })), 1 /* TEXT */ ), vue.createElementVNode( "view", null, vue.toDisplayString($setup.t("common.total")) + ":", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "total-num text-red ss-flex" }, [ $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_0$6, class: "ss-m-r-10", style: { "width": "30rpx", "height": "30rpx" } })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")), $setup.state.orderPayload.highPrecision ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2 }, vue.toDisplayString($setup.fen2yuan6($setup.state.orderInfo.price.virtualTotalPrice)), 1 /* TEXT */ )) : $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 3 }, vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.payPrice) - 0.01), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 4 }, vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.payPrice)), 1 /* TEXT */ )) ]) ]) ]), vue.createCommentVNode(" 佣金"), vue.createVNode(_component_s_points_pop, { modelValue: $setup.state.couponInfo, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.couponInfo = $event), currentMemberPoints: $setup.state.currentMemberPoints, currentTotalPrice: $setup.state.currentTotalPrice, currentDeliveryPrice: $setup.state.currentDeliveryPrice, show: $setup.state.showPoints, onConfirm: $setup.onInputPoints, onClose: _cache[3] || (_cache[3] = ($event) => $setup.state.showPoints = false) }, null, 8, ["modelValue", "currentMemberPoints", "currentTotalPrice", "currentDeliveryPrice", "show"]), vue.createCommentVNode(" 消费分 "), vue.createVNode(_component_s_consumptionPoints_pop, { modelValue: $setup.state.couponInfo, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.couponInfo = $event), currentMemberConsumptionPoints: $setup.state.currentMemberConsumptionPoints, currentTotalPrice: $setup.state.currentTotalPrice, currentDeliveryPrice: $setup.state.currentDeliveryPrice, show: $setup.state.showConsumptionPoints, onConfirm: $setup.onInputConsumptionPoints, onClose: _cache[5] || (_cache[5] = ($event) => $setup.state.showConsumptionPoints = false) }, null, 8, ["modelValue", "currentMemberConsumptionPoints", "currentTotalPrice", "currentDeliveryPrice", "show"]), vue.createCommentVNode(" 满额折扣弹框 TODO 非繁人:后续要把优惠信息打进去 "), vue.createCommentVNode(' '), vue.createCommentVNode(" 底部 "), vue.createVNode(_component_su_fixed, { bottom: "", opacity: false, bg: "bg-white", placeholder: "", noFixed: false, index: 200 }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box border-top ss-flex ss-row-between ss-p-x-20 ss-col-center" }, [ vue.createElementVNode("view", { class: "total-box-footer ss-flex ss-col-center" }, [ $setup.state.orderPayload.highPrecision ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_0$6, style: { "width": "30rpx", "height": "30rpx" } })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString($setup.fen2yuan6($setup.state.orderInfo.price.virtualPayPrice) - 0.01) + " ¥0.01 ", 1 /* TEXT */ ) ])) : $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "total-num ss-font-30 text-red" }, [ $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_0$6, style: { "width": "30rpx", "height": "30rpx" } })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString($setup.state.usedPoint) + " ¥0.01 ", 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "total-num ss-font-30 text-red" }, " ¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.payPrice - 100 * $setup.state.usedPoint - 100 * $setup.state.usedConsumptionPoints)), 1 /* TEXT */ )) ]), vue.createElementVNode( "button", { class: "ss-reset-button ui-BG-Main-Gradient ss-r-40 submit-btn ui-Shadow-Main", onClick: $setup.onConfirm }, vue.toDisplayString($setup.t("confirm.submit_order")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesOrderConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-324e7894"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/confirm.vue"]]); const _sfc_main$1s = { __name: "list", setup(__props, { expose: __expose }) { __expose(); const pagination = { list: [], current_page: 1, total: 1, last_page: 1 }; const state = vue.reactive({ currentTab: 0, // 选中的 tabMaps 下标 pagination: { list: [], current_page: 1, total: 1, last_page: 1 }, loadStatus: "" }); const tabMaps = vue.reactive([ { name: t$6("order.all_orders"), num: 0, isShow: false }, { name: t$6("order.pending_payment"), value: 0, num: 0, isShow: true }, { name: t$6("order.pending_shipment"), value: 10, num: 0, isShow: true }, { name: t$6("order.pending_receipt"), value: 20, num: 0, isShow: true }, { name: t$6("order.pending_review"), value: 30, num: 0, isShow: true } ]); function onTabsChange(e2) { if (state.currentTab === e2.index) { return; } state.pagination.list = []; state.pagination.current_page = 1; state.pagination.total = 1; state.pagination.last_page = 1; state.currentTab = e2.index; getOrderList(); } function onOrderDetail(id) { sheep$1.$router.go("/pages/order/detail", { id }); } function onOrderGroupon(order2) { sheep$1.$router.go("/pages/activity/groupon/detail", { id: order2.ext.groupon_id }); } function onPay(id) { sheep$1.$router.go("/pages/pay/index", { id, type: 1, openType: 2 }); } function onComment(id) { sheep$1.$router.go("/pages/goods/comment/add", { id }); } async function onConfirm(order2, ignore = false) { let isOpenBusinessView = true; uni.showModal({ title: t$6("setting.prompt"), content: t$6("order.confirm_receipt_question"), success: async function(res) { if (res.confirm) { if (sheep$1.$platform.name === "WechatMiniProgram" && !lodashExports.isEmpty(order2.wechat_extra_data) && isOpenBusinessView && !ignore) { mpConfirm(order2); return; } const { code: code2 } = await OrderApi.receiveOrder(order2.id); if (code2 === 0) { state.pagination = pagination; await getOrderList(); } } } }); } async function onExpress(id) { sheep$1.$router.go("/pages/order/express/log", { id }); } async function onCancel(orderId) { uni.showModal({ title: t$6("setting.prompt"), content: t$6("order.confirm_cancel_order"), success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await OrderApi.cancelOrder(orderId); if (code2 === 0) { let index2 = state.pagination.list.findIndex((order2) => order2.id === orderId); const orderInfo = state.pagination.list[index2]; orderInfo.status = 40; handleOrderButtons(orderInfo); state.pagination = pagination; await getOrderList(); } } }); } function onDelete(orderId) { uni.showModal({ title: t$6("setting.prompt"), content: t$6("order.confirm_delete_order"), success: async function(res) { if (res.confirm) { const { code: code2 } = await OrderApi.deleteOrder(orderId); if (code2 === 0) { let index2 = state.pagination.list.findIndex((order2) => order2.id === orderId); state.pagination.list.splice(index2, 1); await getOrderList(); } } } }); } async function getOrderCount() { let { data } = await OrderApi.getOrderCount(); tabMaps[0].num = data.allCount; tabMaps[1].num = data.unpaidCount; tabMaps[2].num = data.undeliveredCount; tabMaps[3].num = data.deliveredCount; tabMaps[4].num = data.uncommentedCount; } async function getOrderList(page2 = 1, list_rows = 5) { state.loadStatus = "loading"; let { code: code2, data } = await OrderApi.getOrderPage({ pageNo: page2, pageSize: list_rows, status: tabMaps[state.currentTab].value, commentStatus: tabMaps[state.currentTab].value === 30 ? false : null }); getOrderCount(); if (code2 !== 0) { return; } let orderList = _$1.concat(state.pagination.list, data.list); data.list.forEach((order2) => handleOrderButtons(order2)); state.pagination.list = orderList; state.pagination.total = data.total; state.pagination.last_page = Math.ceil(data.total / 5); if (state.pagination.current_page < state.pagination.last_page) { state.loadStatus = "more"; } else { state.loadStatus = "noMore"; } } onLoad(async (options2) => { if (options2.points !== void 0 || options2.scoialStatus !== void 0) { showWalletModal({ points: options2.points, socialStatus: options2.socialStatus }); } if (options2.type) { state.currentTab = options2.type; } await getOrderList(); }); onShow(async () => { if (state.loadStatus == "loading") { return; } state.pagination.list = []; state.pagination.current_page = 1; state.pagination.total = 1; state.pagination.last_page = 1; await getOrderList(); }); function loadMore() { if (state.loadStatus !== "noMore") { state.pagination.current_page += 1; getOrderList(state.pagination.current_page); } } onReachBottom(() => { loadMore(); }); onPullDownRefresh(() => { state.pagination.list = []; state.pagination.current_page = 1; state.pagination.total = 1; state.pagination.last_page = 1; getOrderList(); setTimeout(function() { uni.stopPullDownRefresh(); }, 800); }); const __returned__ = { pagination, state, tabMaps, onTabsChange, onOrderDetail, onOrderGroupon, onPay, onComment, onConfirm, onExpress, onCancel, onDelete, getOrderCount, getOrderList, loadMore, reactive: vue.reactive, computed: vue.computed, watchEffect: vue.watchEffect, get onLoad() { return onLoad; }, get onShow() { return onShow; }, get onReachBottom() { return onReachBottom; }, get onPullDownRefresh() { return onPullDownRefresh; }, get fen2yuan() { return fen2yuan; }, get formatOrderColor() { return formatOrderColor; }, get formatOrderStatus() { return formatOrderStatus; }, get handleOrderButtons() { return handleOrderButtons; }, get sheep() { return sheep$1; }, get _() { return _$1; }, get isEmpty() { return lodashExports.isEmpty; }, get OrderApi() { return OrderApi; }, get showWalletModal() { return showWalletModal; }, get colseWalletModal() { return colseWalletModal; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("order.my_orders") }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_tabs, { list: $setup.tabMaps, scrollable: false, onChange: $setup.onTabsChange, current: $setup.state.currentTab, badge: true }, null, 8, ["list", "current"]) ]), _: 1 /* STABLE */ }), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/order-empty.png", text: $setup.t("order.no_orders") }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (order2, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20", key: order2.id, onClick: ($event) => $setup.onOrderDetail(order2.id) }, [ vue.createElementVNode("view", { class: "order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20" }, [ vue.createElementVNode( "view", { class: "order-no" }, vue.toDisplayString($setup.t("order.order_number")) + ":" + vue.toDisplayString(order2.no), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["order-state ss-font-26", $setup.formatOrderColor(order2)]) }, vue.toDisplayString($setup.formatOrderStatus(order2)), 3 /* TEXT, CLASS */ ) ]), vue.createCommentVNode(" {{order.deliveryType}} "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(order2.items, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "border-bottom", key: item.id }, [ vue.createVNode(_component_s_goods_item, { img: item.picUrl, title: item.spuName, skuText: item.properties.map((property) => property.valueName).join(" "), price: item.spuPayType === 2 ? item.highPrecisionPrice : item.price, num: item.count, virtualPirce: item.spuPayType === 2 }, null, 8, ["img", "title", "skuText", "price", "num", "virtualPirce"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20" }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "discounts-title pay-color" }, vue.toDisplayString($setup.t("order.total_items", { count: order2.productCount })) + " ,", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "discounts-money pay-color" }, vue.toDisplayString($setup.t("order.total_amount")) + ":¥" + vue.toDisplayString($setup.fen2yuan(order2.payPrice)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["order-card-footer ss-flex ss-col-center ss-p-x-20", order2.buttons.length > 3 ? "ss-row-between" : "ss-row-right"]) }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ order2.buttons.includes("combination") ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onOrderGroupon(order2), ["stop"]) }, vue.toDisplayString($setup.t("order.group_details")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.buttons.length === 0 ? (vue.openBlock(), vue.createElementBlock("button", { key: 1, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onOrderDetail(order2.id), ["stop"]) }, vue.toDisplayString($setup.t("order.view_details")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.buttons.includes("express") ? (vue.openBlock(), vue.createElementBlock("button", { key: 2, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onExpress(order2.id), ["stop"]) }, vue.toDisplayString($setup.t("order.view_logistics")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.buttons.includes("confirm") ? (vue.openBlock(), vue.createElementBlock("button", { key: 3, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onConfirm(order2), ["stop"]) }, vue.toDisplayString($setup.t("order.confirm_receipt")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.buttons.includes("cancel") ? (vue.openBlock(), vue.createElementBlock("button", { key: 4, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onCancel(order2.id), ["stop"]) }, vue.toDisplayString($setup.t("order.cancel_order")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.buttons.includes("comment") ? (vue.openBlock(), vue.createElementBlock("button", { key: 5, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onComment(order2.id), ["stop"]) }, vue.toDisplayString($setup.t("order.review_order")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.buttons.includes("delete") ? (vue.openBlock(), vue.createElementBlock("button", { key: 6, class: "delete-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onDelete(order2.id), ["stop"]) }, vue.toDisplayString($setup.t("order.delete_order")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.buttons.includes("pay") ? (vue.openBlock(), vue.createElementBlock("button", { key: 7, class: "tool-btn ss-reset-button ui-BG-Main-Gradient", onClick: vue.withModifiers(($event) => $setup.onPay(order2.payOrderId), ["stop"]) }, vue.toDisplayString($setup.t("order.continue_payment")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ], 2 /* CLASS */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 加载更多 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: _ctx.loadmore }, null, 8, ["status", "onClick"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-456ecf67"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/list.vue"]]); const _sfc_main$1r = { __name: "apply", setup(__props, { expose: __expose }) { __expose(); const form = vue.ref(null); const state = vue.reactive({ orderId: 0, // 订单编号 itemId: 0, // 订单项编号 order: {}, // 订单 item: {}, // 订单项 config: {}, // 交易配置 // 售后类型 wayList: [ // { // text: t('order.refund_only') // value: '10', // }, { text: t$6("order.refund_and_return"), value: "20" } ], reasonList: [], // 可选的申请原因数组 showModal: false, // 是否显示申请原因弹窗 currentValue: "" // 当前选择的售后原因 }); const formData = vue.reactive({ way: "", applyReason: "", applyDescription: "", applyPicUrls: [] }); const rules2 = vue.reactive({}); async function submit() { if (formData.way == "") { uni.showToast({ title: t$6("order.select_after_sales_type"), icon: "error", duration: 1e3 }); return false; } if (state.currentValue == "") { uni.showToast({ title: t$6("order.reason_for_application"), icon: "error", duration: 1e3 }); return false; } if (formData.applyDescription == "") { uni.showToast({ title: t$6("order.please_fill_in_description"), icon: "error", duration: 1e3 }); return false; } let data = { orderItemId: state.itemId, refundPrice: state.item.payPrice, ...formData }; const { code: code2 } = await AfterSaleApi.createAfterSale(data); if (code2 === 0) { uni.showToast({ title: t$6("wallet.application_successful") }); sheep$1.$router.go("/pages/order/aftersale/list"); } } function onRefundChange(e2) { formData.way = e2.detail.value; state.reasonList = formData.way === "10" ? state.config.afterSaleRefundReasons || [] : state.config.afterSaleReturnReasons || []; formData.applyReason = ""; state.currentValue = ""; } function onChange(e2) { state.currentValue = e2.detail.value; } function onReason() { formData.applyReason = state.currentValue; state.showModal = false; } onLoad(async (options2) => { if (!options2.orderId || !options2.itemId) { sheep$1.$helper.toast(`缺少订单信息,请检查`); return; } state.orderId = options2.orderId; state.itemId = parseInt(options2.itemId); const { code: code2, data } = await OrderApi.getOrder(state.orderId); if (code2 !== 0) { return; } state.order = data; state.item = data.items.find((item) => item.id === state.itemId) || {}; if (state.order.status === 10) { state.wayList.splice(1, 1); } state.config = (await TradeConfigApi.getTradeConfig()).data; formData.way = "20"; formData.type = "20"; state.reasonList = state.config.afterSaleReturnReasons || []; }); const __returned__ = { form, state, formData, rules: rules2, submit, onRefundChange, onChange, onReason, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, reactive: vue.reactive, ref: vue.ref, get OrderApi() { return OrderApi; }, get TradeConfigApi() { return TradeConfigApi; }, get fen2yuan() { return fen2yuan; }, get AfterSaleApi() { return AfterSaleApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5); const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("order.apply_for_after_sales") }, { default: vue.withCtx(() => { var _a2; return [ vue.createCommentVNode(" 售后商品 "), vue.createElementVNode("view", { class: "goods-box" }, [ vue.createVNode(_component_s_goods_item, { img: $setup.state.item.picUrl, title: $setup.state.item.spuName, skuText: (_a2 = $setup.state.item.properties) == null ? void 0 : _a2.map((property) => property.valueName).join(" "), price: $setup.state.item.price, num: $setup.state.item.count }, null, 8, ["img", "title", "skuText", "price", "num"]) ]), vue.createVNode(_component_uni_forms, { ref: "form", modelValue: $setup.formData, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.formData = $event), rules: $setup.rules, "label-position": "top" }, { default: vue.withCtx(() => [ vue.createCommentVNode(" 售后类型 "), vue.createElementVNode("view", { class: "refund-item" }, [ vue.createElementVNode( "view", { class: "item-title ss-m-b-20" }, vue.toDisplayString($setup.t("order.after_sales_type")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ss-flex-col" }, [ vue.createElementVNode( "radio-group", { onChange: $setup.onRefundChange }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.wayList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("label", { class: "ss-flex ss-col-center ss-p-y-10", key: index2 }, [ vue.createElementVNode("radio", { checked: $setup.formData.type === item.value, color: "var(--ui-BG-Main)", style: { "transform": "scale(0.8)" }, value: item.value }, null, 8, ["checked", "value"]), vue.createElementVNode( "view", { class: "item-value ss-m-l-8" }, vue.toDisplayString(item.text), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]) ]), vue.createCommentVNode(" 退款金额 "), vue.createElementVNode("view", { class: "refund-item ss-flex ss-col-center ss-row-between", onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showModal = true) }, [ vue.createElementVNode( "text", { class: "item-title" }, vue.toDisplayString($setup.t("order.refund_amount")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ss-flex refund-cause ss-col-center" }, [ vue.createElementVNode( "text", { class: "ss-m-r-20" }, "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.item.payPrice)), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 申请原因 "), vue.createElementVNode("view", { class: "refund-item ss-flex ss-col-center ss-row-between", onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.showModal = true) }, [ vue.createElementVNode( "text", { class: "item-title" }, vue.toDisplayString($setup.t("order.application_reason")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ss-flex refund-cause ss-col-center" }, [ $setup.formData.applyReason ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "ss-m-r-20" }, vue.toDisplayString($setup.formData.applyReason), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "ss-m-r-20" }, vue.toDisplayString($setup.t("order.select_reason_for_application")), 1 /* TEXT */ )), vue.createElementVNode("text", { class: "cicon-forward", style: { "height": "28rpx" } }) ]) ]), vue.createCommentVNode(" 留言 "), vue.createElementVNode("view", { class: "refund-item" }, [ vue.createElementVNode( "view", { class: "item-title ss-m-b-20" }, vue.toDisplayString($setup.t("order.related_description")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "describe-box" }, [ vue.createVNode(_component_uni_easyinput, { inputBorder: false, class: "describe-content", type: "textarea", maxlength: "120", autoHeight: "", modelValue: $setup.formData.applyDescription, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.applyDescription = $event), placeholder: $setup.t("order.customer_prompt") }, null, 8, ["modelValue", "placeholder"]), vue.createCommentVNode(" TODO 非繁人:上传的测试 "), vue.createElementVNode("view", { class: "upload-img" }, [ vue.createVNode(_component_s_uploader, { url: $setup.formData.applyPicUrls, "onUpdate:url": _cache[3] || (_cache[3] = ($event) => $setup.formData.applyPicUrls = $event), fileMediatype: "image", limit: "9", mode: "grid", imageStyles: { width: "168rpx", height: "168rpx" } }, null, 8, ["url"]) ]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "rules"]), vue.createCommentVNode(" 底部按钮 "), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "foot-wrap" }, [ vue.createElementVNode("view", { class: "foot_box ss-flex ss-col-center ss-row-between ss-p-x-30" }, [ vue.createCommentVNode(` `), vue.createElementVNode( "button", { class: "ss-reset-button ui-BG-Main-Gradient sub-btn", onClick: $setup.submit }, vue.toDisplayString($setup.t("common.submit")), 1 /* TEXT */ ) ]) ]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 申请原因弹窗 "), vue.createVNode(_component_su_popup, { show: $setup.state.showModal, round: "10", showClose: true, onClose: _cache[5] || (_cache[5] = ($event) => $setup.state.showModal = false) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "modal-box page_box" }, [ vue.createElementVNode( "view", { class: "modal-head item-title head_box ss-flex ss-row-center ss-col-center" }, vue.toDisplayString($setup.t("order.application_reason")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "modal-content content_box" }, [ vue.createElementVNode( "radio-group", { onChange: $setup.onChange }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.reasonList, (item) => { return vue.openBlock(), vue.createElementBlock("label", { class: "radio ss-flex ss-col-center", key: item }, [ vue.createElementVNode( "view", { class: "ss-flex-1 ss-p-20" }, vue.toDisplayString(item), 1 /* TEXT */ ), vue.createElementVNode("radio", { value: item, color: "var(--ui-BG-Main)", checked: item === $setup.state.currentValue }, null, 8, ["value", "checked"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]), vue.createElementVNode("view", { class: "modal-foot foot_box ss-flex ss-row-center ss-col-center" }, [ vue.createElementVNode( "button", { class: "ss-reset-button close-btn ui-BG-Main-Gradient", onClick: $setup.onReason }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ]; }), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesOrderAftersaleApply = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-5be4d0ee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/apply.vue"]]); const _sfc_main$1q = { __name: "return-delivery", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ id: 0, // 售后编号 expressIndex: 0, // 选中的 expresses 下标 expresses: [] // 可选的快递列表 }); function bindPickerChange(e2) { state.expressIndex = e2.detail.value; } async function subRefund(e2) { if (!state.expresses[state.expressIndex].id) { sheep$1.$helper.toast(`请选择物流公司`); return false; } if (!e2.detail.value.logisticsNo) { sheep$1.$helper.toast(`请填写物流单号`); return false; } let data = { id: state.id, logisticsId: state.expresses[state.expressIndex].id, logisticsNo: e2.detail.value.logisticsNo }; const { code: code2 } = await AfterSaleApi.deliveryAfterSale(data); if (code2 !== 0) { return; } uni.showToast({ title: "填写退货成功" }); sheep$1.$router.go("/pages/order/aftersale/detail", { id: state.id }); } async function getExpressList() { const { code: code2, data } = await DeliveryApi.getDeliveryExpressList(); if (code2 !== 0) { return; } state.expresses = data; state.expresses.unshift({ "id": 0, "name": "请选择" }); } onLoad((options2) => { if (!options2.id) { sheep$1.$helper.toast(`缺少订单信息,请检查`); return; } state.id = options2.id; getExpressList(); }); const __returned__ = { state, bindPickerChange, subRefund, getExpressList, get onLoad() { return onLoad; }, reactive: vue.reactive, get sheep() { return sheep$1; }, get AfterSaleApi() { return AfterSaleApi; }, get DeliveryApi() { return DeliveryApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "退货物流" }, { default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", null, [ vue.createElementVNode( "form", { onSubmit: $setup.subRefund, "report-submit": "true" }, [ vue.createElementVNode("view", { class: "apply-return" }, [ vue.createElementVNode("view", { class: "list borRadius14" }, [ vue.createElementVNode("view", { class: "item acea-row row-between-wrapper", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("view", null, "物流公司"), vue.createElementVNode("picker", { mode: "selector", class: "num", onChange: $setup.bindPickerChange, value: $setup.state.expressIndex, range: $setup.state.expresses, "range-key": "name" }, [ vue.createElementVNode("view", { class: "picker acea-row row-between-wrapper", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode( "view", { class: "reason" }, vue.toDisplayString((_a2 = $setup.state.expresses[$setup.state.expressIndex]) == null ? void 0 : _a2.name), 1 /* TEXT */ ), vue.createCommentVNode(" TODO 非繁人:这里样式有问题,少了 > 按钮 "), vue.createElementVNode("image", { src: _imports_0$9, class: "select-icon" }) ]) ], 40, ["value", "range"]) ]), vue.createElementVNode("view", { class: "item textarea acea-row row-between", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("view", null, "物流单号"), vue.createElementVNode("input", { placeholder: "请填写物流单号", class: "num", name: "logisticsNo", "placeholder-class": "placeholder" }) ]), vue.createElementVNode("button", { class: "returnBnt bg-color ss-reset-button ui-BG-Main-Gradient sub-btn", "form-type": "submit", style: { "background": "linear-gradient(90deg,var(--ui-BG-Main),var(--ui-BG-Main-gradient))!important" } }, "提交") ]) ]) ], 32 /* NEED_HYDRATION */ ) ]) ]; }), _: 1 /* STABLE */ }); } const PagesOrderAftersaleReturnDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-e2252b3c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/return-delivery.vue"]]); const _sfc_main$1p = { __name: "list", setup(__props, { expose: __expose }) { __expose(); const paginationNull = { list: [], total: 0, pageNo: 1, pageSize: 10 }; const state = vue.reactive({ currentTab: 0, showApply: false, pagination: { list: [], total: 0, pageNo: 1, pageSize: 10 }, loadStatus: "" }); const tabMaps = [ { name: t$6("common.all"), value: "all" } // { // name: '申请中', // value: 'nooper', // }, // { // name: '处理中', // value: 'ing', // }, // { // name: '已完成', // value: 'completed', // }, // { // name: '已拒绝', // value: 'refuse', // }, ]; function onTabsChange(e2) { state.pagination = paginationNull; state.currentTab = e2.index; getOrderList(); } async function getOrderList() { state.loadStatus = "loading"; let { data, code: code2 } = await AfterSaleApi.getAfterSalePage({ // type: tabMaps[state.currentTab].value, pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } data.list.forEach((order2) => handleAfterSaleButtons(order2)); state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } function onApply(orderId) { uni.showModal({ title: t$6("setting.prompt"), content: t$6("order.confirm_cancel_request"), success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await AfterSaleApi.cancelAfterSale(orderId); if (code2 === 0) { state.pagination = paginationNull; await getOrderList(); } } }); } onLoad(async (options2) => { if (options2.type) { state.currentTab = options2.type; } await getOrderList(); }); function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getOrderList(); } onReachBottom(() => { loadMore(); }); const __returned__ = { paginationNull, state, tabMaps, onTabsChange, getOrderList, onApply, loadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, reactive: vue.reactive, get _() { return _$1; }, get formatAfterSaleStatus() { return formatAfterSaleStatus; }, get formatAfterSaleStatusDescription() { return formatAfterSaleStatusDescription; }, get handleAfterSaleButtons() { return handleAfterSaleButtons; }, get AfterSaleApi() { return AfterSaleApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("order.after_sales_list") }, { default: vue.withCtx(() => [ vue.createCommentVNode(" tab "), vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_tabs, { list: $setup.tabMaps, scrollable: false, onChange: $setup.onTabsChange, current: $setup.state.currentTab }, null, 8, ["current"]) ]), _: 1 /* STABLE */ }), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/data-empty.png", text: $setup.t("common.no_data") }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 列表 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (order2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-box ss-m-y-20", key: order2.id, onClick: ($event) => $setup.sheep.$router.go("/pages/order/aftersale/detail", { id: order2.id }) }, [ vue.createElementVNode("view", { class: "order-head ss-flex ss-col-center ss-row-between" }, [ vue.createElementVNode( "text", { class: "no" }, vue.toDisplayString($setup.t("order.service_order_number")) + ":" + vue.toDisplayString(order2.no), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "state" }, vue.toDisplayString($setup.formatAfterSaleStatus(order2)), 1 /* TEXT */ ) ]), vue.createVNode(_component_s_goods_item, { img: order2.picUrl, title: order2.spuName, skuText: order2.properties.map((property) => property.valueName).join(" "), price: order2.refundPrice }, null, 8, ["img", "title", "skuText", "price"]), vue.createElementVNode("view", { class: "apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20" }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "title ss-m-r-20" }, vue.toDisplayString(order2.way === 10 ? $setup.t("order.refund_only") : $setup.t("order.refund_and_return")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "value" }, vue.toDisplayString($setup.formatAfterSaleStatusDescription(order2)), 1 /* TEXT */ ) ]), vue.createElementVNode("text", { class: "_icon-forward" }) ]), vue.createElementVNode("view", { class: "tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20" }, [ vue.createCommentVNode(" TODO 功能缺失:填写退货信息 "), vue.createElementVNode("view", null, [ (order2 == null ? void 0 : order2.buttons.includes("cancel")) ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: "ss-reset-button tool-btn", onClick: vue.withModifiers(($event) => $setup.onApply(order2.id), ["stop"]) }, vue.toDisplayString($setup.t("order.cancel_request")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesOrderAftersaleList = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-c5e81116"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/list.vue"]]); const _sfc_main$1o = { __name: "detail", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "915d84ff-headerBg": vue.unref(headerBg) })); const userInfo2 = sheep$1.$store("user").userInfo; const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const headerBg = sheep$1.$url.css("/static/img/shop/order/order_bg.png"); const state = vue.reactive({ id: 0, // 售后编号 info: {}, // 收货信息 loading: false, active: 0, // 在 list 的激活位置 list: [{ title: t$6("order.submit_application") }, { title: t$6("order.processing") }, { title: t$6("order.completed") }] // 时间轴 }); function onApply(id) { uni.showModal({ title: t$6("setting.prompt"), content: t$6("order.confirm_cancel_request"), success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await AfterSaleApi.cancelAfterSale(id); if (code2 === 0) { await getDetail(id); } } }); } const onCopy = () => { sheep$1.$helper.copyText(state.info.no); }; async function getDetail(id) { state.loading = true; const { code: code2, data } = await AfterSaleApi.getAfterSale(id); if (code2 !== 0) { state.info = null; return; } state.info = data; handleAfterSaleButtons(state.info); if ([10].includes(state.info.status)) { state.active = 0; } else if ([20, 30, 40].includes(state.info.status)) { state.active = 1; } else if ([50].includes(state.info.status)) { state.active = 2; } else if ([61, 62, 63].includes(state.info.status)) { state.active = 2; } } const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); vue.watch( () => isLogin.value, (newVal) => { if (newVal) { window.location.reload(); } } ); onLoad((options2) => { if (!isLogin.value) { showAuthModal(); sheep$1.$helper.toast(t$6("order.not_logged_in", { user: options2.username }), 3e3); } else { if (options2.username) { formatAppLog("log", "at pages/order/aftersale/detail.vue:236", JSON.parse(uni.getStorageSync("user-store")).userInfo.username); if (options2.username != JSON.parse(uni.getStorageSync("user-store")).userInfo.username) { sheep$1.$helper.toast(t$6("order.account_switch_needed", { user1: JSON.parse(uni.getStorageSync("user-store")).userInfo.username, user2: options2.username }), 3e3); } } } if (!options2.id) { sheep$1.$helper.toast(t$6("order.missing_order_info")); return; } state.id = options2.id; getDetail(options2.id); }); const __returned__ = { userInfo: userInfo2, statusBarHeight, headerBg, state, onApply, onCopy, getDetail, isLogin, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, reactive: vue.reactive, computed: vue.computed, watch: vue.watch, get isEmpty() { return lodashExports.isEmpty; }, get showAuthModal() { return showAuthModal; }, get fen2yuan() { return fen2yuan; }, get points2point() { return points2point; }, get formatAfterSaleStatusDescription() { return formatAfterSaleStatusDescription; }, get handleAfterSaleButtons() { return handleAfterSaleButtons; }, get AfterSaleApi() { return AfterSaleApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("order.after_sales_details"), navbar: !$setup.isEmpty($setup.state.info) && $setup.state.loading ? "inner" : "normal" }, { default: vue.withCtx(() => [ !$setup.isEmpty($setup.state.info) && $setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content_box" }, [ vue.createCommentVNode(" 步骤条 "), vue.createElementVNode( "view", { class: "steps-box ss-flex", style: vue.normalizeStyle([ { marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx", paddingTop: Number($setup.statusBarHeight + 88) + "rpx" } ]) }, [ vue.createElementVNode("view", { class: "ss-flex" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "steps-item", key: index2 }, [ vue.createElementVNode("view", { class: "ss-flex" }, [ $setup.state.list.length - 1 === index2 && [61, 62, 63].includes($setup.state.info.status) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "sicon-circleclose" })) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: vue.normalizeClass(["sicon-circlecheck", $setup.state.active >= index2 ? "activity-color" : "info-color"]) }, null, 2 /* CLASS */ )), $setup.state.list.length - 1 !== index2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: vue.normalizeClass(["line", $setup.state.active >= index2 ? "activity-bg" : "info-bg"]) }, null, 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["steps-item-title", $setup.state.active >= index2 ? "activity-color" : "info-color"]) }, vue.toDisplayString(item.title), 3 /* TEXT, CLASS */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 4 /* STYLE */ ), vue.createCommentVNode(" 服务状态 "), vue.createElementVNode("view", { class: "status-box ss-flex ss-col-center ss-row-between ss-m-x-20", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/order/aftersale/log", { id: $setup.state.id })) }, [ vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode( "view", { class: "status-text" }, vue.toDisplayString($setup.formatAfterSaleStatusDescription($setup.state.info)), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "status-time" }, vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.info.updateTime, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]), vue.createElementVNode("text", { class: "ss-iconfont _icon-forward", style: { "color": "#666" } }) ]), vue.createCommentVNode(" 退款金额 "), vue.createElementVNode("view", { class: "aftersale-content ss-m-y-20" }, [ vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.total_refund")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, " ¥" + vue.toDisplayString($setup.fen2yuan($setup.state.info.refundPriceTotal)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.refund_amount")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.info.refundPrice)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.refund_commission")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, "¥" + vue.toDisplayString($setup.points2point($setup.state.info.refundIntegral)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.refund_points")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, "¥" + vue.toDisplayString($setup.points2point($setup.state.info.refundConsumptionPoints)), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 服务商品 "), vue.createElementVNode("view", { class: "order-shop" }, [ vue.createVNode(_component_s_goods_item, { price: $setup.state.info.refundPriceTotal, img: $setup.state.info.picUrl, title: $setup.state.info.spuName, titleWidth: 480, skuText: $setup.state.info.properties.map((property) => property.valueName).join(" "), num: $setup.state.info.count }, null, 8, ["price", "img", "title", "skuText", "num"]) ]), vue.createCommentVNode(" 服务内容 "), vue.createElementVNode("view", { class: "aftersale-content" }, [ vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.service_order_number")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content ss-m-r-16" }, vue.toDisplayString($setup.state.info.no), 1 /* TEXT */ ), vue.createElementVNode( "button", { class: "ss-reset-button copy-btn", onClick: $setup.onCopy }, vue.toDisplayString($setup.t("order.copy")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.application_time")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.info.createTime, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.after_sales_type")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, vue.toDisplayString($setup.state.info.way === 10 ? $setup.t("order.refund_only") : $setup.t("order.refund_and_return")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.application_reason")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, vue.toDisplayString($setup.state.info.applyReason), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [ vue.createElementVNode( "view", { class: "item-title" }, vue.toDisplayString($setup.t("order.related_description")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "item-content" }, vue.toDisplayString($setup.state.info.applyDescription), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 操作区 "), $setup.isEmpty($setup.state.info) && $setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, icon: "/static/order-empty.png", text: $setup.t("order.no_after_sales_details") }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), !$setup.isEmpty($setup.state.info) ? (vue.openBlock(), vue.createBlock(_component_su_fixed, { key: 2, bottom: "", placeholder: "", bg: "bg-white" }, { default: vue.withCtx(() => { var _a2, _b2; return [ vue.createElementVNode("view", { class: "foot_box" }, [ ((_a2 = $setup.state.info.buttons) == null ? void 0 : _a2.includes("cancel")) ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "ss-reset-button btn", onClick: _cache[1] || (_cache[1] = ($event) => $setup.onApply($setup.state.info.id)) }, vue.toDisplayString($setup.t("order.cancel_request")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), ((_b2 = $setup.state.info.buttons) == null ? void 0 : _b2.includes("delivery")) ? (vue.openBlock(), vue.createElementBlock( "button", { key: 1, class: "ss-reset-button btn", onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/order/aftersale/return-delivery", { id: $setup.state.info.id })) }, vue.toDisplayString($setup.t("order.fill_return")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(` `) ]) ]; }), _: 1 /* STABLE */ })) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["title", "navbar"]); } const PagesOrderAftersaleDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-915d84ff"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/detail.vue"]]); const _sfc_main$1n = { __name: "log-item", props: { item: { type: Object, // 当前日志 default() { } }, index: { type: Number, // item 在 data 的下标 default: 0 }, data: { type: Object, // 日志列表 default() { } } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const __returned__ = { props, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "log-item ss-flex" }, [ vue.createElementVNode("view", { class: "log-icon ss-flex-col ss-col-center ss-m-r-20" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["cicon-title", $props.index === 0 ? "activity-color" : ""]) }, null, 2 /* CLASS */ ), $props.data.length - 1 !== $props.index ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "text" }, vue.toDisplayString($props.item.content), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "date" }, vue.toDisplayString($setup.sheep.$helper.timeFormat($props.item.createTime, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]) ]); } const logItem = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-3a1a95e5"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/log-item.vue"]]); const _sfc_main$1m = { __name: "log", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ list: [] }); async function getDetail(id) { const { data } = await AfterSaleApi.getAfterSaleLogList(id); state.list = data; } onLoad((options2) => { state.aftersaleId = options2.id; getDetail(options2.id); }); const __returned__ = { state, getDetail, get onLoad() { return onLoad; }, reactive: vue.reactive, logItem, get AfterSaleApi() { return AfterSaleApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: _ctx.$t("order.after_sales_progress") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "log-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id }, [ vue.createVNode($setup["logItem"], { item, index: index2, data: $setup.state.list }, null, 8, ["item", "index", "data"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesOrderAftersaleLog = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-2fedae8f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/log.vue"]]); const _sfc_main$1l = { name: "UniSwiperDot", emits: ["clickItem"], props: { info: { type: Array, default() { return []; } }, current: { type: Number, default: 0 }, dotsStyles: { type: Object, default() { return {}; } }, // 类型 :default(默认) indexes long nav mode: { type: String, default: "default" }, // 只在 nav 模式下生效,变量名称 field: { type: String, default: "" } }, data() { return { dots: { width: 6, height: 6, bottom: 10, color: "#fff", backgroundColor: "rgba(0, 0, 0, .3)", border: "1px rgba(0, 0, 0, .3) solid", selectedBackgroundColor: "#333", selectedBorder: "1px rgba(0, 0, 0, .9) solid" } }; }, watch: { dotsStyles(newVal) { this.dots = Object.assign(this.dots, this.dotsStyles); }, mode(newVal) { if (newVal === "indexes") { this.dots.width = 14; this.dots.height = 14; } else { this.dots.width = 6; this.dots.height = 6; } } }, created() { if (this.mode === "indexes") { this.dots.width = 12; this.dots.height = 12; } this.dots = Object.assign(this.dots, this.dotsStyles); }, methods: { clickItem(index2) { this.$emit("clickItem", index2); } } }; function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-swiper__warp" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), $props.mode === "default" ? (vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }), class: "uni-swiper__dots-box", key: "default" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.info, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.clickItem(index2), style: vue.normalizeStyle({ "width": (index2 === $props.current ? $data.dots.width * 2 : $data.dots.width) + "px", "height": $data.dots.width / 2 + "px", "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, "border-radius": "0px" }), key: index2, class: "uni-swiper__dots-item uni-swiper__dots-bar" }, null, 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $props.mode === "dot" ? (vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }), class: "uni-swiper__dots-box", key: "dot" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.info, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.clickItem(index2), style: vue.normalizeStyle({ "width": $data.dots.width + "px", "height": $data.dots.height + "px", "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, "border": index2 !== $props.current ? $data.dots.border : $data.dots.selectedBorder }), key: index2, class: "uni-swiper__dots-item" }, null, 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $props.mode === "round" ? (vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }), class: "uni-swiper__dots-box", key: "round" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.info, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.clickItem(index2), class: vue.normalizeClass([[index2 === $props.current && "uni-swiper__dots-long"], "uni-swiper__dots-item"]), style: vue.normalizeStyle({ "width": (index2 === $props.current ? $data.dots.width * 3 : $data.dots.width) + "px", "height": $data.dots.height + "px", "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, "border": index2 !== $props.current ? $data.dots.border : $data.dots.selectedBorder }), key: index2 }, null, 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $props.mode === "nav" ? (vue.openBlock(), vue.createElementBlock( "view", { key: "nav", style: vue.normalizeStyle({ "background-color": $props.dotsStyles.backgroundColor, "bottom": "0" }), class: "uni-swiper__dots-box uni-swiper__dots-nav" }, [ vue.createElementVNode( "text", { style: vue.normalizeStyle({ "color": $props.dotsStyles.color }), class: "uni-swiper__dots-nav-item" }, vue.toDisplayString($props.current + 1 + "/" + $props.info.length + " " + $props.info[$props.current][$props.field]), 5 /* TEXT, STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $props.mode === "indexes" ? (vue.openBlock(), vue.createElementBlock( "view", { key: "indexes", style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }), class: "uni-swiper__dots-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.info, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.clickItem(index2), style: vue.normalizeStyle({ "width": $data.dots.width + "px", "height": $data.dots.height + "px", "color": index2 === $props.current ? $data.dots.selectedColor : $data.dots.color, "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, "border": index2 !== $props.current ? $data.dots.border : $data.dots.selectedBorder }), key: index2, class: "uni-swiper__dots-item uni-swiper__dots-indexes" }, [ vue.createElementVNode( "text", { class: "uni-swiper__dots-indexes-text" }, vue.toDisplayString(index2 + 1), 1 /* TEXT */ ) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-0667e3db"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue"]]); const _sfc_main$1k = { __name: "log", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ info: [], tracks: [] }); const goodsImages = vue.computed(() => { let array2 = []; if (state.info.items) { state.info.items.forEach((item) => { array2.push({ image: item.picUrl }); }); } return array2; }); async function getExpressDetail(id) { const { data } = await OrderApi.getOrderExpressTrackList(id); state.tracks = data; } async function getOrderDetail(id) { const { data } = await OrderApi.getOrder(id); state.info = data; } onLoad((options2) => { getExpressDetail(options2.id); getOrderDetail(options2.id); }); const __returned__ = { state, goodsImages, getExpressDetail, getOrderDetail, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, computed: vue.computed, reactive: vue.reactive, get OrderApi() { return OrderApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_swiper_dot = resolveEasycom(vue.resolveDynamicComponent("uni-swiper-dot"), __easycom_0$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: _ctx.$t("order.logistics_tracking") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "log-wrap" }, [ vue.createCommentVNode(" 商品信息 "), $setup.goodsImages.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "log-card ss-flex ss-m-20 ss-r-10" }, [ vue.createVNode(_component_uni_swiper_dot, { info: $setup.goodsImages, current: $setup.state.current, mode: "round" }, { default: vue.withCtx(() => [ vue.createElementVNode("swiper", { class: "swiper-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.goodsImages, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index2 }, [ vue.createElementVNode("view", { class: "image-container", style: { "width": "100%", "height": "100%" } }, [ vue.createElementVNode("view", { style: { "width": "100%", "height": "106rpx", "padding-top": "15%" } }, [ vue.createElementVNode("image", { class: "log-card-img", mode: "aspectFill", src: $setup.sheep.$url.static(item.image), style: { "width": "100%", "height": "100%", "object-fit": "cover" } }, null, 8, ["src"]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["info", "current"]), vue.createElementVNode("view", { class: "log-card-msg" }, [ vue.createCommentVNode(" TODO 非繁人:优化点:展示状态 "), vue.createCommentVNode(' '), vue.createCommentVNode(" 物流状态:"), vue.createCommentVNode(' {{ state.info.status_text }}'), vue.createCommentVNode(" "), vue.createElementVNode( "view", { class: "ss-m-b-16 TrackingNumber" }, vue.toDisplayString(_ctx.$t("order.tracking_number") + ":" + $setup.state.info.logisticsNo), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "ss-m-b-16" }, vue.toDisplayString(_ctx.$t("order.courier_company") + ":" + $setup.state.info.logisticsName), 1 /* TEXT */ ), vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("order.shipping_time") + ":" + $setup.sheep.$helper.timeFormat($setup.state.info.deliveryTime, "yyyy-mm-dd hh:MM")), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 物流轨迹 "), vue.createElementVNode("view", { class: "log-content ss-m-20 ss-r-10" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.tracks, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "log-content-box ss-flex", key: item.title }, [ vue.createElementVNode("view", { class: "log-icon ss-flex-col ss-col-center ss-m-r-20" }, [ vue.createElementVNode("text", { class: "cicon-title" }), $setup.state.tracks.length - 1 !== index2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "log-content-msg" }, [ vue.createCommentVNode(" TODO 非繁人:优化点:展示状态 "), vue.createCommentVNode(' '), vue.createCommentVNode(" {{ item.status_text }}"), vue.createCommentVNode(" "), vue.createElementVNode( "view", { class: "log-msg-desc ss-m-b-16" }, vue.toDisplayString(item.content), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "log-msg-date ss-m-b-40" }, vue.toDisplayString($setup.sheep.$helper.timeFormat(item.time, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesOrderExpressLog = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-d9d25552"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/express/log.vue"]]); const _sfc_main$1j = { __name: "otherlist", setup(__props, { expose: __expose }) { __expose(); const tradeManaged = vue.computed(() => sheep$1.$store("app").has_wechat_trade_managed); const pagination = { data: [], current_page: 1, total: 1, last_page: 1 }; const state = vue.reactive({ currentTab: 0, pagination: { data: [], current_page: 1, total: 1, last_page: 1 }, loadStatus: "", deleteOrderId: 0, error: 0 }); const tabMaps = [ { name: "全部", value: "all" }, { name: "待付款", value: "unpaid" }, { name: "待发货", value: "nosend" }, { name: "待收货", value: "noget" }, { name: "待评价", value: "nocomment" } ]; function onTabsChange(e2) { if (state.currentTab === e2.index) return; state.pagination = pagination; state.currentTab = e2.index; getOrderList(); } function onOrderDetail(orderSN) { sheep$1.$router.go("/pages/order/detail", { orderSN }); } function onOrderGroupon(order2) { sheep$1.$router.go("/pages/activity/groupon/detail", { id: order2.ext.groupon_id }); } function onOrderInvoice(invoiceId) { sheep$1.$router.go("/pages/order/invoice", { invoiceId }); } function onPay(orderSN) { sheep$1.$router.go("/pages/pay/index", { orderSN }); } function onComment(orderSN) { sheep$1.$router.go("/pages/goods/comment/add", { orderSN }); } async function onConfirm(order2, ignore = false) { if (sheep$1.$platform.name === "WechatMiniProgram" && !lodashExports.isEmpty(order2.wechat_extra_data) && tradeManaged.value === 1 && !ignore) { mpConfirm(order2); return; } const { error: error2 } = await sheep$1.$api.order.confirm(order2.id); if (error2 === 0) { state.pagination = pagination; getOrderList(); } } async function onExpress(orderId) { sheep$1.$router.go("/pages/order/express/list", { orderId }); } async function onCancel(orderId) { uni.showModal({ title: "提示", content: "确定要取消订单吗?", success: async function(res) { if (res.confirm) { const { error: error2, data } = await sheep$1.$api.order.cancel(orderId); if (error2 === 0) { let index2 = state.pagination.data.findIndex((order2) => order2.id === orderId); state.pagination.data[index2] = data; } } } }); } function onDelete(orderId) { uni.showModal({ title: "提示", content: "确定要删除订单吗?", success: async function(res) { if (res.confirm) { const { error: error2, data } = await sheep$1.$api.order.delete(orderId); if (error2 === 0) { let index2 = state.pagination.data.findIndex((order2) => order2.id === orderId); state.pagination.data.splice(index2, 1); } } } }); } async function onRefund(orderId) { uni.showModal({ title: "提示", content: "确定要申请退款吗?", success: async function(res) { if (res.confirm) { const { error: error2, data } = await sheep$1.$api.order.applyRefund(orderId); if (error2 === 0) { let index2 = state.pagination.data.findIndex((order2) => order2.id === orderId); state.pagination.data[index2] = data; } } } }); } async function getOrderList(page2 = 1, list_rows = 5) { state.loadStatus = "loading"; let res = await sheep$1.$api.order.list({ type: tabMaps[state.currentTab].value, list_rows, page: page2 }); state.error = res.error; if (res.error === 0) { let orderList = _$1.concat(state.pagination.data, res.data.data); state.pagination = { ...res.data, data: orderList }; if (state.pagination.current_page < state.pagination.last_page) { state.loadStatus = "more"; } else { state.loadStatus = "noMore"; } } } onLoad(async (options2) => { if (options2.type) { state.currentTab = options2.type; } getOrderList(); }); function loadmore() { if (state.loadStatus !== "noMore") { getOrderList(state.pagination.current_page + 1); } } onReachBottom(() => { loadmore(); }); onPullDownRefresh(() => { state.pagination = pagination; getOrderList(); setTimeout(function() { uni.stopPullDownRefresh(); }, 800); }); const __returned__ = { tradeManaged, pagination, state, tabMaps, onTabsChange, onOrderDetail, onOrderGroupon, onOrderInvoice, onPay, onComment, onConfirm, onExpress, onCancel, onDelete, onRefund, getOrderList, loadmore, computed: vue.computed, reactive: vue.reactive, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, get onPullDownRefresh() { return onPullDownRefresh; }, get formatOrderColor() { return formatOrderColor; }, get sheep() { return sheep$1; }, get _() { return _$1; }, get isEmpty() { return lodashExports.isEmpty; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "我的订单" }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_tabs, { list: $setup.tabMaps, scrollable: false, onChange: $setup.onTabsChange, current: $setup.state.currentTab }, null, 8, ["current"]) ]), _: 1 /* STABLE */ }), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/order-empty.png", text: "暂无订单" })) : vue.createCommentVNode("v-if", true), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.data, (order2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20", key: order2.id, onClick: ($event) => $setup.onOrderDetail(order2.order_sn) }, [ vue.createElementVNode("view", { class: "order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20" }, [ vue.createElementVNode( "view", { class: "order-no" }, "订单号:" + vue.toDisplayString(order2.order_sn), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["order-state ss-font-26", $setup.formatOrderColor(order2.status_code)]) }, vue.toDisplayString(order2.status_text), 3 /* TEXT, CLASS */ ) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(order2.items, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "border-bottom", key: item.id }, [ vue.createVNode(_component_s_goods_item, { img: item.goods_image, title: item.goods_title, skuText: item.goods_sku_text, price: item.goods_price, score: order2.score_amount, num: item.goods_num }, { tool: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-flex" }, [ item.btns.includes("aftersale") ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: "ss-reset-button apply-btn", onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/apply", { item: JSON.stringify(item) }), ["stop"]) }, " 申请售后 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.btns.includes("re_aftersale") ? (vue.openBlock(), vue.createElementBlock("button", { key: 1, class: "ss-reset-button apply-btn", onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/apply", { item: JSON.stringify(item) }), ["stop"]) }, " 重新售后 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.btns.includes("aftersale_info") ? (vue.openBlock(), vue.createElementBlock("button", { key: 2, class: "ss-reset-button apply-btn", onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/detail", { id: item.ext.aftersale_id }), ["stop"]) }, " 售后详情 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.btns.includes("buy_again") ? (vue.openBlock(), vue.createElementBlock("button", { key: 3, class: "ss-reset-button apply-btn", onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.goods_id }), ["stop"]) }, " 再次购买 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ]), _: 2 /* DYNAMIC */ }, 1032, ["img", "title", "skuText", "price", "score", "num"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20" }, [ order2.total_discount_fee > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ss-flex ss-col-center ss-m-r-8" }, [ vue.createElementVNode("view", { class: "discounts-title" }, "优惠:¥"), vue.createElementVNode( "view", { class: "discounts-money" }, vue.toDisplayString(order2.total_discount_fee), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-m-r-8" }, [ vue.createElementVNode("view", { class: "discounts-title" }, "运费:¥"), vue.createElementVNode( "view", { class: "discounts-money" }, vue.toDisplayString(order2.dispatch_amount), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ vue.createElementVNode("view", { class: "discounts-title pay-color" }, "总金额:"), vue.createElementVNode( "view", { class: "discounts-money pay-color" }, "¥" + vue.toDisplayString(order2.order_amount), 1 /* TEXT */ ), order2.score_amount ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "+")) : vue.createCommentVNode("v-if", true), order2.score_amount ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "discounts-money pay-color ss-flex ss-col-center" }, [ vue.createElementVNode("image", { src: $setup.sheep.$url.static("/static/images/score1.svg"), class: "score-img" }, null, 8, ["src"]), vue.createElementVNode( "view", null, vue.toDisplayString(order2.score_amount), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["order-card-footer ss-flex ss-col-center ss-p-x-20", order2.btns.length > 3 ? "ss-row-between" : "ss-row-right"]) }, [ vue.createCommentVNode(' \n \n \n '), vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ order2.btns.includes("groupon") ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onOrderGroupon(order2), ["stop"]) }, vue.toDisplayString(order2.status_code === "groupon_ing" ? "邀请拼团" : "拼团详情"), 9, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("invoice") ? (vue.openBlock(), vue.createElementBlock("button", { key: 1, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => { var _a2; return $setup.onOrderInvoice((_a2 = order2.invoice) == null ? void 0 : _a2.id); }, ["stop"]) }, " 查看发票 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.length === 0 ? (vue.openBlock(), vue.createElementBlock("button", { key: 2, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onOrderDetail(order2.order_sn), ["stop"]) }, " 查看详情 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("confirm") ? (vue.openBlock(), vue.createElementBlock("button", { key: 3, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onConfirm(order2), ["stop"]) }, " 确认收货 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("express") ? (vue.openBlock(), vue.createElementBlock("button", { key: 4, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onExpress(order2.id), ["stop"]) }, " 查看物流 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("apply_refund") ? (vue.openBlock(), vue.createElementBlock("button", { key: 5, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onRefund(order2.id), ["stop"]) }, " 申请退款 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("re_apply_refund") ? (vue.openBlock(), vue.createElementBlock("button", { key: 6, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onRefund(order2.id), ["stop"]) }, " 重新退款 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("cancel") ? (vue.openBlock(), vue.createElementBlock("button", { key: 7, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onCancel(order2.id), ["stop"]) }, " 取消订单 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("comment") ? (vue.openBlock(), vue.createElementBlock("button", { key: 8, class: "tool-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onComment(order2.order_sn), ["stop"]) }, " 评价晒单 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("delete") ? (vue.openBlock(), vue.createElementBlock("button", { key: 9, class: "delete-btn ss-reset-button", onClick: vue.withModifiers(($event) => $setup.onDelete(order2.id), ["stop"]) }, " 删除订单 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), order2.btns.includes("pay") ? (vue.openBlock(), vue.createElementBlock("button", { key: 10, class: "tool-btn ss-reset-button ui-BG-Main-Gradient", onClick: vue.withModifiers(($event) => $setup.onPay(order2.order_sn), ["stop"]) }, " 继续支付 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ], 2 /* CLASS */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 加载更多 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: $setup.loadmore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }); } const PagesOrderOtherlist = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-ad14ec43"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/otherlist.vue"]]); const _sfc_main$1i = { __name: "su-radio", props: { customStyle: { type: Object, default: () => ({}) }, ui: { type: String, default: "check" //check line }, modelValue: { type: [String, Number, Boolean], default: false }, disabled: { type: Boolean, default: false }, bg: { type: String, default: "ui-BG-Main" }, unbg: { type: String, default: "borderss" }, src: { type: String, default: "" }, label: { type: String, default: "" }, labelStyle: { type: Object, default: () => ({}) }, none: { type: Boolean, default: false } }, emits: ["change", "update:modelValue"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const vm = vue.getCurrentInstance(); const state = vue.reactive({ currentValue: false }); const emits = __emit; const props = __props; vue.watchPostEffect(() => { state.currentValue = props.modelValue; emits("update:modelValue", state.currentValue); }); const isChecked = vue.computed(() => state.currentValue); const onRaido = () => { if (props.disabled) return; state.currentValue = !state.currentValue; emits("update:modelValue", state.currentValue); emits("change", { label: props.label, value: state.currentValue }); }; const __returned__ = { vm, state, emits, props, isChecked, onRaido, computed: vue.computed, reactive: vue.reactive, watchPostEffect: vue.watchPostEffect, getCurrentInstance: vue.getCurrentInstance }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["ui-radio ss-flex ss-col-center", [{ disabled: $props.disabled }, { img: $props.src }, $props.ui]]), onClick: $setup.onRaido, style: vue.normalizeStyle([$props.customStyle]) }, [ vue.renderSlot(_ctx.$slots, "leftLabel", {}, void 0, true), !$props.none ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["ui-radio-input", [$setup.isChecked ? "cur " + $props.bg : $props.unbg, $props.src ? "radius" : "round"]]) }, null, 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), $props.src ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: "ui-radio-img radius", src: $props.src, mode: "aspectFill" }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "ui-radio-content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "view", { class: "ui-label-text", style: vue.normalizeStyle([$props.labelStyle]) }, vue.toDisplayString($props.label), 5 /* TEXT, STYLE */ ) ], true) ])), $props.ui.includes("card") ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: vue.normalizeClass(["ui-radio-bg round", [$setup.isChecked ? "cur " + $props.bg : ""]]) }, null, 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-c395529d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-radio/su-radio.vue"]]); const placeholderStyle$2 = "color:#BBBBBB;font-size:28rpx;line-height:normal"; const _sfc_main$1h = { __name: "info", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const state = vue.reactive({ verifyUsername: true, usernameErrorMsg: "", model: {}, // 个人信息 rules: {}, thirdInfo: {} // 社交用户的信息 }); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sexRadioMap = [ { name: t2("user.male"), value: "1" }, { name: t2("user.female"), value: "2" } ]; function onChangeGender(e2) { state.model.sex = e2.detail.value; } const onChangeMobile = () => { showAuthModal("changeMobile"); }; function onChooseAvatar(e2) { const tempUrl = e2.detail.avatarUrl || ""; uploadAvatar(tempUrl); } function onChangeAvatar() { uni.chooseImage({ success: async (chooseImageRes) => { const tempUrl = chooseImageRes.tempFilePaths[0]; await uploadAvatar(tempUrl); } }); } async function uploadAvatar(tempUrl) { if (!tempUrl) { return; } const compressedImage = await compressImage(tempUrl); let { data } = await FileApi.uploadFile(compressedImage); state.model.avatar = data; } function compressImage(imagePath, scale = 0.5) { return new Promise((resolve, reject) => { const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); const img = new Image(); img.src = imagePath; img.onload = () => { const originalWidth = img.width; const originalHeight = img.height; const newWidth = originalWidth * scale; const newHeight = originalHeight * scale; canvas.width = newWidth; canvas.height = newHeight; ctx.drawImage(img, 0, 0, newWidth, newHeight); const compressedImage = canvas.toDataURL("image/jpeg", 0.7); resolve(compressedImage); }; img.onerror = (err) => { reject(err); }; }); } function onSetPassword() { showAuthModal("changePassword"); } async function bindThirdOauth() { let result2 = await sheep$1.$platform.useProvider("wechat").bind(); if (result2) { await getUserInfo(); } } function unBindThirdOauth() { uni.showModal({ title: t2("rules.unbind_reminder"), content: t2("rules.unbind_warning"), cancelText: t2("common.cancel"), confirmText: t2("common.confirm"), success: async function(res) { if (!res.confirm) { return; } const result2 = await sheep$1.$platform.useProvider("wechat").unbind(state.thirdInfo.openid); if (result2) { await getUserInfo(); } } }); } let lastUsername = vue.ref(""); async function verifyUsername(e2) { const username2 = e2.detail.value; if (username2 == "" || username2 == lastUsername.value) { return false; } else if (username2 === state.username) { state.usernameErrorMsg = ""; state.verifyUsername = true; return false; } lastUsername.value = username2; const { data } = await AuthUtil.verifyUsername(username2); if (!data) { state.usernameErrorMsg = t2("rules.username_taken"); state.verifyUsername = data; } else { state.usernameErrorMsg = ""; state.verifyUsername = data; } } async function onSubmit() { const { code: code2 } = await UserApi.updateUser({ avatar: state.model.avatar, nickname: state.model.nickname, username: state.model.username, sex: state.model.sex }); if (code2 === 0 && state.model.username !== state.username) { uni.showToast({ icon: "success", title: t2("rules.modify_success") }); setTimeout(function() { sheep$1.$store("user").logout(); closeAuthModal(); sheep$1.$router.go("/pages/index/user"); }, 1e3); } if (code2 === 0) { await getUserInfo(); } } const getUserInfo = async () => { const userInfo3 = await sheep$1.$store("user").getInfo(); state.model = lodashExports.clone(userInfo3); state.username = userInfo3.username; if (sheep$1.$platform.name !== "H5") { let result2 = await sheep$1.$platform.useProvider("wechat").getInfo(); state.thirdInfo = result2 || {}; } }; onShow(async () => { await getUserInfo(); }); onLoad(async (options2) => { getUserInfo(); }); const __returned__ = { t: t2, state, userInfo: userInfo2, placeholderStyle: placeholderStyle$2, sexRadioMap, onChangeGender, onChangeMobile, onChooseAvatar, onChangeAvatar, uploadAvatar, compressImage, onSetPassword, bindThirdOauth, unBindThirdOauth, get lastUsername() { return lastUsername; }, set lastUsername(v2) { lastUsername = v2; }, verifyUsername, onSubmit, getUserInfo, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; }, get onLoad() { return onLoad; }, get onShow() { return onShow; }, get showAuthModal() { return showAuthModal; }, get FileApi() { return FileApi; }, get UserApi() { return UserApi; }, get AuthUtil() { return AuthUtil; }, get closeAuthModal() { return closeAuthModal; }, get useI18n() { return useI18n; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_image = resolveEasycom(vue.resolveDynamicComponent("su-image"), __easycom_0$f); const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_su_radio = resolveEasycom(vue.resolveDynamicComponent("su-radio"), __easycom_3$2); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: _ctx.$t("user.user_info"), class: "set-userinfo-wrap" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms, { model: $setup.state.model, rules: $setup.state.rules, labelPosition: "left", border: "", class: "form-box", labelWidth: "160" }, { default: vue.withCtx(() => { var _a2; return [ vue.createCommentVNode(" 头像 "), vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-p-t-60 ss-p-b-0 bg-white" }, [ vue.createElementVNode("view", { class: "header-box-content" }, [ vue.createVNode(_component_su_image, { class: "content-img", isPreview: "", current: 0, src: (_a2 = $setup.state.model) == null ? void 0 : _a2.avatar, height: 160, width: 160, radius: 80, mode: "scaleToFill" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "avatar-action" }, [ vue.createElementVNode( "button", { class: "ss-reset-button avatar-action-btn", onClick: $setup.onChangeAvatar }, vue.toDisplayString(_ctx.$t("user.change")), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "username", label: _ctx.$t("user.username"), "error-message": $setup.state.usernameErrorMsg }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.username, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event), placeholder: _ctx.$t("rules.username"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, onBlur: $setup.verifyUsername, clearable: false }, { right: vue.withCtx(() => [ !$setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "icon" }, [ vue.createElementVNode("image", { style: "", src: $setup.sheep.$url.static("/static/images/shibai.png") }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "icon" }, [ vue.createElementVNode("image", { src: $setup.sheep.$url.static("/static/images/chenggong.png") }, null, 8, ["src"]) ])) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label", "error-message"]), vue.createVNode(_component_uni_forms_item, { name: "nickname", label: _ctx.$t("user.nickname") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.nickname, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.nickname = $event), type: "nickname", placeholder: $setup.t("rules.nickname"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "sex", label: _ctx.$t("user.sex") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-h-100" }, [ vue.createElementVNode( "radio-group", { onChange: $setup.onChangeGender, class: "ss-flex ss-col-center" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.sexRadioMap, (item) => { var _a3; return vue.createElementVNode("label", { class: "radio", key: item.value }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-m-r-32" }, [ vue.createElementVNode("radio", { value: item.value, color: "var(--ui-BG-Main)", style: { "transform": "scale(0.8)" }, checked: parseInt(item.value) === ((_a3 = $setup.state.model) == null ? void 0 : _a3.sex) }, null, 8, ["value", "checked"]), vue.createElementVNode( "view", { class: "gender-name" }, vue.toDisplayString(item.name), 1 /* TEXT */ ) ]) ]); }), 64 /* STABLE_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "mobile", label: _ctx.$t("user.phone"), onClick: $setup.onChangeMobile }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.userInfo.mobile, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.userInfo.mobile = $event), placeholder: $setup.t("user.bind_phone"), inputBorder: false, disabled: "", styles: { disableColor: "#fff" }, placeholderStyle: $setup.placeholderStyle, clearable: false }, { right: vue.withCtx(() => { var _a3; return [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ ((_a3 = $setup.userInfo.verification) == null ? void 0 : _a3.mobile) ? (vue.openBlock(), vue.createBlock(_component_su_radio, { key: 0, modelValue: true })) : (vue.openBlock(), vue.createElementBlock("button", { key: 1, class: "ss-reset-button ss-flex ss-col-center ss-row-center" }, [ vue.createElementVNode("text", { class: "_icon-forward", style: { "color": "#bbbbbb", "font-size": "26rpx" } }) ])) ]) ]; }), _: 1 /* STABLE */ }, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "password", label: _ctx.$t("user.password"), onClick: $setup.onSetPassword }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.userInfo.password, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.userInfo.password = $event), placeholder: _ctx.$t("rules.click_change_password"), inputBorder: false, styles: { disableColor: "#fff" }, disabled: "", placeholderStyle: "color:#BBBBBB;font-size:28rpx;line-height:normal", clearable: false }, { right: vue.withCtx(() => { var _a3; return [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ ((_a3 = $setup.userInfo.verification) == null ? void 0 : _a3.password) ? (vue.openBlock(), vue.createBlock(_component_su_radio, { key: 0, class: "ss-flex", modelValue: true })) : (vue.openBlock(), vue.createElementBlock("button", { key: 1, class: "ss-reset-button ss-flex ss-col-center ss-row-center" }, [ vue.createElementVNode("text", { class: "_icon-forward", style: { "color": "#bbbbbb", "font-size": "26rpx" } }) ])) ]) ]; }), _: 1 /* STABLE */ }, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]) ]; }), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "", bg: "none" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-p-20" }, [ vue.createElementVNode( "button", { class: "ss-rest-button logout-btn", onClick: $setup.onSubmit }, vue.toDisplayString(_ctx.$t("common.save")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-aab93774"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/info.vue"]]); const avatarWidth = 45; const _sfc_main$1g = { name: "UniListChat", emits: ["click"], props: { title: { type: String, default: "" }, note: { type: String, default: "" }, clickable: { type: Boolean, default: false }, link: { type: [Boolean, String], default: false }, to: { type: String, default: "" }, badgeText: { type: [String, Number], default: "" }, badgePositon: { type: String, default: "right" }, time: { type: String, default: "" }, avatarCircle: { type: Boolean, default: false }, avatar: { type: String, default: "" }, avatarList: { type: Array, default() { return []; } } }, // inject: ['list'], computed: { isSingle() { if (this.badgeText === "dot") { return "uni-badge--dot"; } else { const badgeText = this.badgeText.toString(); if (badgeText.length > 1) { return "uni-badge--complex"; } else { return "uni-badge--single"; } } }, computedAvatar() { if (this.avatarList.length > 4) { this.imageWidth = avatarWidth * 0.31; return "avatarItem--3"; } else if (this.avatarList.length > 1) { this.imageWidth = avatarWidth * 0.47; return "avatarItem--2"; } else { this.imageWidth = avatarWidth; return "avatarItem--1"; } } }, data() { return { isFirstChild: false, border: true, // avatarList: 3, imageWidth: 50 }; }, mounted() { this.list = this.getForm(); if (this.list) { if (!this.list.firstChildAppend) { this.list.firstChildAppend = true; this.isFirstChild = true; } this.border = this.list.border; } }, methods: { /** * 获取父元素实例 */ getForm(name2 = "uniList") { let parent2 = this.$parent; let parentName = parent2.$options.name; while (parentName !== name2) { parent2 = parent2.$parent; if (!parent2) return false; parentName = parent2.$options.name; } return parent2; }, onClick() { if (this.to !== "") { this.openPage(); return; } if (this.clickable || this.link) { this.$emit("click", { data: {} }); } }, openPage() { if (["navigateTo", "redirectTo", "reLaunch", "switchTab"].indexOf(this.link) !== -1) { this.pageApi(this.link); } else { this.pageApi("navigateTo"); } }, pageApi(api2) { uni[api2]({ url: this.to, success: (res) => { this.$emit("click", { data: res }); }, fail: (err) => { this.$emit("click", { data: err }); formatAppLog("error", "at uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue:212", err.errMsg); } }); } } }; function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { "hover-class": !$props.clickable && !$props.link ? "" : "uni-list-chat--hover", class: "uni-list-chat", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.onClick && $options.onClick(...args), ["stop"])) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass({ "uni-list--border": $data.border, "uni-list-chat--first": $data.isFirstChild }) }, null, 2 /* CLASS */ ), vue.createElementVNode("view", { class: "uni-list-chat__container" }, [ vue.createElementVNode("view", { class: "uni-list-chat__header-warp" }, [ $props.avatarCircle || $props.avatarList.length === 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-list-chat__header", { "header--circle": $props.avatarCircle }]) }, [ vue.createElementVNode("image", { class: vue.normalizeClass(["uni-list-chat__header-image", { "header--circle": $props.avatarCircle }]), src: $props.avatar, mode: "aspectFill" }, null, 10, ["src"]) ], 2 /* CLASS */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 头像组 "), vue.createElementVNode("view", { class: "uni-list-chat__header" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.avatarList, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { key: index2, class: vue.normalizeClass(["uni-list-chat__header-box", $options.computedAvatar]), style: vue.normalizeStyle({ width: $data.imageWidth + "px", height: $data.imageWidth + "px" }) }, [ vue.createElementVNode("image", { class: "uni-list-chat__header-image", style: vue.normalizeStyle({ width: $data.imageWidth + "px", height: $data.imageWidth + "px" }), src: item.url, mode: "aspectFill" }, null, 12, ["src"]) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) ]), $props.badgeText && $props.badgePositon === "left" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-list-chat__badge uni-list-chat__badge-pos", [$options.isSingle]]) }, [ vue.createElementVNode( "text", { class: "uni-list-chat__badge-text" }, vue.toDisplayString($props.badgeText === "dot" ? "" : $props.badgeText), 1 /* TEXT */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "uni-list-chat__content" }, [ vue.createElementVNode("view", { class: "uni-list-chat__content-main" }, [ vue.createElementVNode( "text", { class: "uni-list-chat__content-title uni-ellipsis" }, vue.toDisplayString($props.title), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "uni-list-chat__content-note uni-ellipsis" }, vue.toDisplayString($props.note), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "uni-list-chat__content-extra" }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "uni-list-chat__content-extra-text" }, vue.toDisplayString($props.time), 1 /* TEXT */ ), $props.badgeText && $props.badgePositon === "right" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-list-chat__badge", [$options.isSingle, $props.badgePositon === "right" ? "uni-list-chat--right" : ""]]) }, [ vue.createElementVNode( "text", { class: "uni-list-chat__badge-text" }, vue.toDisplayString($props.badgeText === "dot" ? "" : $props.badgeText), 1 /* TEXT */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], true) ]) ]) ]) ], 8, ["hover-class"]); } const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-20df4ef0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue"]]); const placeholderStyle$1 = "color:#BBBBBB;font-size:28rpx;line-height:normal"; const _sfc_main$1f = { __name: "setting", setup(__props, { expose: __expose }) { __expose(); const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); const { t: t2 } = useI18n(); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const alipayAccount2 = vue.computed(() => { let account2 = userInfo2.value.alipayAccount; if (!account2) { return false; } if (/^\d{11}$/.test(account2)) { return `${account2.substring(0, 3)}****${account2.substring(7)}`; } else if (/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(account2)) { const atIndex = account2.indexOf("@"); if (atIndex <= 3) { return account2; } const username2 = account2.substring(0, Math.ceil(atIndex / 2)); const domain = account2.substring(atIndex); return `${username2}***${domain}`; } }); const bankAccount2 = vue.computed(() => { let account2 = userInfo2.value.bankAccount; if (!account2) { return false; } if (account2.length === 8) { return account2.substring(0, 2) + "********" + account2.substr(-2); } else { return account2.substring(0, 4) + "******" + account2.substr(-4); } }); const onChangeAlipayAccount = () => { showAuthModal("alipayAccount"); }; const onChangeBankAccount = () => { showAuthModal("bankAccount"); }; const state = vue.reactive({ model: {}, // 个人信息 rules: {}, thirdInfo: {} // 社交用户的信息 }); async function bindThirdOauth() { let result2 = await sheep$1.$platform.useProvider("wechat").bind(); if (result2) { await getUserInfo(); } } function unBindThirdOauth() { uni.showModal({ title: t2("user.unbind_reminder"), content: t2("rules.unbind_warning"), cancelText: t2("common.cancel"), confirmText: t2("common.confirm"), success: async function(res) { if (!res.confirm) { return; } const result2 = await sheep$1.$platform.useProvider("wechat").unbind(state.thirdInfo.openid); if (result2) { await getUserInfo(); } } }); } async function onSubmit() { const { code: code2 } = await UserApi.updateUser({ avatar: state.model.avatar, nickname: state.model.nickname, sex: state.model.sex }); if (code2 === 0) { await getUserInfo(); } } const getUserInfo = async () => { const userInfo3 = await sheep$1.$store("user").getInfo(); state.model = lodashExports.clone(userInfo3); if (sheep$1.$platform.name !== "H5") { const result2 = await sheep$1.$platform.useProvider("wechat").getInfo(); state.thirdInfo = result2 || {}; } }; function onLogout() { uni.showModal({ title: t2("setting.prompt"), content: t2("setting.confirm_logout"), cancelText: t2("common.cancel"), confirmText: t2("common.confirm"), success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await AuthUtil.logout(); if (code2 !== 0) { return; } sheep$1.$store("user").logout(); uni.removeStorageSync("linkId"); sheep$1.$router.go("/pages/index/user"); } }); } async function goBackEnd(type) { const { code: code2, data } = await AuthUtil.getConsumerRedirectUrl(); if (code2 === 0) { window.location.href = data; } } const currentLang = vue.computed(() => { return uni.getStorageSync("userLanguage"); }); const changeLanguage = async () => { formatAppLog("log", "at pages/user/setting.vue:363", currentLang.value); if (currentLang.value === "en") { await UserApi.updateUser({ language: "zh-Hans" }); setLanguage("zh-Hans"); } else { await UserApi.updateUser({ language: "en" }); setLanguage("en"); } }; vue.onBeforeMount(() => { getUserInfo(); }); onLoad(() => { uni.$on("alipayAccountChangeComplete", getUserInfo); uni.$on("bankAccountChangeComplete", getUserInfo); }); const __returned__ = { isLogin, t: t2, userInfo: userInfo2, userWallet, alipayAccount: alipayAccount2, bankAccount: bankAccount2, onChangeAlipayAccount, onChangeBankAccount, state, placeholderStyle: placeholderStyle$1, bindThirdOauth, unBindThirdOauth, onSubmit, getUserInfo, onLogout, goBackEnd, currentLang, changeLanguage, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; }, get showAuthModal() { return showAuthModal; }, get showShareModal() { return showShareModal; }, get FileApi() { return FileApi; }, get UserApi() { return UserApi; }, get AuthUtil() { return AuthUtil; }, get isBetaUser() { return isBetaUser; }, get onLoad() { return onLoad; }, get setLanguage() { return setLanguage; }, get useI18n() { return useI18n; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_list_chat = resolveEasycom(vue.resolveDynamicComponent("uni-list-chat"), __easycom_0$5); const _component_uni_list_item = resolveEasycom(vue.resolveDynamicComponent("uni-list-item"), __easycom_0$i); const _component_su_image = resolveEasycom(vue.resolveDynamicComponent("su-image"), __easycom_0$f); const _component_uni_list = resolveEasycom(vue.resolveDynamicComponent("uni-list"), __easycom_1$6); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: _ctx.$t("setting.set"), class: "set-userinfo-wrap" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms, { model: $setup.state.model, rules: $setup.state.rules, labelPosition: "left", border: "", class: "form-box" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white" }, [ vue.createVNode(_component_uni_list, { border: false, class: "" }, { default: vue.withCtx(() => { var _a2, _b2; return [ vue.createVNode(_component_uni_list_chat, { clickable: "", "avatar-circle": true, title: (_a2 = $setup.state.model) == null ? void 0 : _a2.nickname, avatar: (_b2 = $setup.state.model) == null ? void 0 : _b2.avatar, note: _ctx.$t("setting.signature"), onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/info")) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "chat-custom-right" }, [ vue.createElementVNode("text", { class: "_icon-forward", style: { "color": "#bbbbbb", "font-size": "32rpx" } }) ]) ]), _: 1 /* STABLE */ }, 8, ["title", "avatar", "note"]), vue.createVNode(_component_uni_list_item, { clickable: "", onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/address/list")), title: _ctx.$t("setting.physical_address_management"), showArrow: "", border: false }, null, 8, ["title"]), vue.createVNode(_component_uni_list_item, { clickable: "", onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/user/dummyAddress/list")), title: _ctx.$t("setting.virtual_address_management"), showArrow: "", border: false }, null, 8, ["title"]), vue.createVNode(_component_uni_list_item, { title: "支付宝账号", showArrow: "", clickable: "", border: false, onClick: $setup.onChangeAlipayAccount }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString(_ctx.$t("setting.alipay_account")) + "  " + vue.toDisplayString($setup.alipayAccount ? $setup.alipayAccount : "未绑定"), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_list_item, { title: "银行卡", showArrow: "", clickable: "", border: false, onClick: $setup.onChangeBankAccount }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString(_ctx.$t("setting.bank_card")) + "  " + vue.toDisplayString($setup.bankAccount ? $setup.bankAccount : "未绑定"), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(` `), vue.createCommentVNode(` `), $setup.userWallet.isPtSystemUser ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, { key: 0, clickable: true, onClick: _cache[3] || (_cache[3] = ($event) => $setup.goBackEnd("pt")), title: "进入平台", showArrow: "", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString(_ctx.$t("setting.enter_platform")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) : vue.createCommentVNode("v-if", true), $setup.userWallet.isShSystemUser ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, { key: 1, clickable: true, onClick: _cache[4] || (_cache[4] = ($event) => $setup.goBackEnd("sh")), title: "进入商家后台", showArrow: "", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString(_ctx.$t("setting.enter_merchant_backend")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) : vue.createCommentVNode("v-if", true), $setup.isBetaUser() ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, { key: 2, clickable: true, onClick: _cache[5] || (_cache[5] = ($event) => $setup.changeLanguage()), title: "切换语言", showArrow: "", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString($setup.currentLang === "en" ? "Switch to Chinese" : "切换为英文"), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_uni_list_item, { title: "我的二维码", clickable: "", onClick: _cache[6] || (_cache[6] = ($event) => $setup.sheep.$router.go("/pages/user/qrcode-share")), border: false }, { body: vue.withCtx(() => { var _a3; return [ vue.createElementVNode("p", { style: { "width": "100%", "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("setting.enter_merchant_backend")) + "      ", 1 /* TEXT */ ), vue.createVNode(_component_su_image, { class: "content-img", style: { "border": "1px solid #f4f4f4" }, current: 0, src: (_a3 = $setup.state.model) == null ? void 0 : _a3.avatar, height: 100, width: 100, radius: 0, mode: "scaleToFill" }, null, 8, ["src"]) ]) ]; }), _: 1 /* STABLE */ }) ]; }), _: 1 /* STABLE */ }) ]) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createCommentVNode(" 当前社交平台的绑定关系,只处理 wechat 微信场景 "), $setup.sheep.$platform.name !== "H5" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createElementVNode( "view", { class: "title-box ss-p-l-30" }, vue.toDisplayString(_ctx.$t("setting.third_party_account_binding")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "account-list ss-flex ss-row-between" }, [ "WechatOfficialAccount" === $setup.sheep.$platform.name ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ss-flex ss-col-center" }, [ vue.createElementVNode("image", { class: "list-img", src: $setup.sheep.$url.static("/static/images/WechatOfficialAccount.png") }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "list-name" }, vue.toDisplayString(_ctx.$t("setting.wechat_public_account")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), "WechatMiniProgram" === $setup.sheep.$platform.name ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "ss-flex ss-col-center" }, [ vue.createElementVNode("image", { class: "list-img", src: $setup.sheep.$url.static("/static/images/WechatMiniProgram.png") }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "list-name" }, vue.toDisplayString(_ctx.$t("setting.wechat_mini_program")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), "App" === $setup.sheep.$platform.name ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "ss-flex ss-col-center" }, [ vue.createElementVNode("image", { class: "list-img", src: $setup.sheep.$url.static("/static/images/wechat.png") }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "list-name" }, vue.toDisplayString(_ctx.$t("setting.wechat_open_platform")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ $setup.state.thirdInfo ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info ss-flex ss-col-center" }, [ vue.createElementVNode("image", { class: "avatar ss-m-r-20", src: $setup.sheep.$url.cdn($setup.state.thirdInfo.avatar) }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "name" }, vue.toDisplayString($setup.state.thirdInfo.nickname), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "bind-box ss-m-l-20" }, [ $setup.state.thirdInfo.openid ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "ss-reset-button relieve-btn", onClick: $setup.unBindThirdOauth }, vue.toDisplayString(_ctx.$t("setting.unbind")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "button", { key: 1, class: "ss-reset-button bind-btn", onClick: $setup.bindThirdOauth }, vue.toDisplayString(_ctx.$t("setting.bind")), 1 /* TEXT */ )) ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-p-x-20 ss-p-b-40" }, [ $setup.isLogin ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "loginout-btn ss-reset-button", onClick: $setup.onLogout }, vue.toDisplayString(_ctx.$t("user.log_out")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(' \n \n \n \n ') ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserSetting = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-806b15dc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/setting.vue"]]); const _sfc_main$1e = { __name: "qrcode-share", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ linkId: 0 }); const poster = vue.reactive({ canvasId: "canvasId", width: sheep$1.$platform.device.windowWidth * 0.9, height: 600, src: "" }); const vm = vue.getCurrentInstance(); async function getPoster(params) { poster.src = ""; poster.shareInfo = { "title": "", "desc": "", "image": "", "path": "", "link": "https://zxgz.newfeifan.cn/#/pages/index/user?linkId=" + state.linkId, "poster": { "type": "user" } }; poster.canvasId = "canvasId-" + (/* @__PURE__ */ new Date()).getTime(); const canvas = await useCanvas(poster, vm); return canvas; } async function getLink() { ShareApi.getLinkId(1).then((res) => { if (res.code !== 0) { return; } state.linkId = res.data.linkId; getPoster(); }); } const onSavePoster = () => { if (["WechatOfficialAccount", "H5"].includes(sheep$1.$platform.name)) { sheep$1.$helper.toast(t$6("share.long_press_to_save")); return; } uni.saveImageToPhotosAlbum({ filePath: poster.src, success: (res) => { onClosePoster(); sheep$1.$helper.toast(t$6("share.save_success")); }, fail: (err) => { sheep$1.$helper.toast(t$6("share.save_failure")); formatAppLog("log", "at pages/user/qrcode-share.vue:106", "图片保存失败:", err); } }); }; onLoad(async () => { await getLink(); }); const __returned__ = { state, poster, vm, getPoster, getLink, onSavePoster, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, getCurrentInstance: vue.getCurrentInstance, get onLoad() { return onLoad; }, get sheep() { return sheep$1; }, get useCanvas() { return useCanvas; }, get showAuthModal() { return showAuthModal; }, get showShareModal() { return showShareModal; }, get ShareApi() { return ShareApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("share.share"), class: "set-userinfo-wrap" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-flex-col ss-col-center ss-row-center" }, [ $setup.poster.src === "" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "poster-title ss-flex ss-row-center", style: vue.normalizeStyle({ height: $setup.poster.height + "px", width: $setup.poster.width + "px" }) }, vue.toDisplayString($setup.t("share.poster_loading")), 5 /* TEXT, STYLE */ )) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: "poster-img ss-m-20", src: $setup.poster.src, style: vue.normalizeStyle({ height: $setup.poster.height + "px", width: $setup.poster.width + "px" }), "show-menu-by-longpress": true }, null, 12, ["src"])), vue.createElementVNode("canvas", { class: "hideCanvas", "canvas-id": $setup.poster.canvasId, id: $setup.poster.canvasId, style: vue.normalizeStyle({ height: $setup.poster.height + "px", width: $setup.poster.width + "px" }) }, null, 12, ["canvas-id", "id"]) ]), vue.createElementVNode("view", { class: "modal-footer ss-flex ss-p-x-20" }, [ vue.createElementVNode( "button", { class: "confirm-btn", onClick: $setup.onSavePoster }, vue.toDisplayString(["wechatOfficialAccount", "H5"].includes($setup.sheep.$platform.name) ? $setup.t("share.long_press_to_save") : $setup.t("share.long_press_to_save")), 1 /* TEXT */ ), vue.createCommentVNode(' ') ]) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserQrcodeShare = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-845d3787"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/qrcode-share.vue"]]); function isArray$1(value) { if (typeof Array.isArray === "function") { return Array.isArray(value); } else { return Object.prototype.toString.call(value) === "[object Array]"; } } function isObject$1(value) { return Object.prototype.toString.call(value) === "[object Object]"; } function cloneDeep(obj) { const d2 = isArray$1(obj) ? obj : {}; if (isObject$1(obj)) { for (const key in obj) { if (obj[key]) { if (obj[key] && typeof obj[key] === "object") { d2[key] = cloneDeep(obj[key]); } else { d2[key] = obj[key]; } } } } return d2; } const _sfc_main$1d = { __name: "goods-log", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "e113b195-sys_navBar": vue.unref(sys_navBar) })); const sys_navBar = sheep$1.$platform.navbar; const pagination = { list: [], pageNo: 1, total: 1, pageSize: 10 }; const state = vue.reactive({ pagination: cloneDeep(pagination), loadStatus: "", editMode: false, selectedSpuIdList: [], selectAll: false }); async function getList() { state.loadStatus = "loading"; const { code: code2, data } = await SpuHistoryApi.getBrowseHistoryPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } const onSelect = (id) => { if (!state.selectedSpuIdList.includes(id)) { state.selectedSpuIdList.push(id); } else { state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(id), 1); } state.selectAll = state.selectedSpuIdList.length === state.pagination.list.length; }; const onSelectAll = () => { state.selectAll = !state.selectAll; if (!state.selectAll) { state.selectedSpuIdList = []; } else { state.pagination.list.forEach((item) => { if (state.selectedSpuIdList.includes(item.spuId)) { state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(item.spuId), 1); } state.selectedSpuIdList.push(item.spuId); }); } }; async function onDelete() { if (state.selectedSpuIdList.length <= 0) { return; } const { code: code2 } = await SpuHistoryApi.deleteBrowseHistory(state.selectedSpuIdList); if (code2 === 0) { reload(); } } async function onClean() { const { code: code2 } = await SpuHistoryApi.cleanBrowseHistory(); if (code2 === 0) { reload(); } } function reload() { state.editMode = false; state.selectedSpuIdList = []; state.selectAll = false; state.pagination = pagination; getList(); } function loadMore() { if (state.loadStatus !== "noMore") { state.pagination.pageNo += 1; getList(); } } onReachBottom(() => { loadMore(); }); onLoad(() => { getList(); }); const __returned__ = { sys_navBar, pagination, state, getList, onSelect, onSelectAll, onDelete, onClean, reload, loadMore, get sheep() { return sheep$1; }, reactive: vue.reactive, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, get _() { return _$1; }, get SpuHistoryApi() { return SpuHistoryApi; }, get cloneDeep() { return cloneDeep; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: _ctx.$t("common.delete_footprint"), bgStyle: { color: "#f2f2f2" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "cart-box ss-flex ss-flex-col ss-row-between" }, [ vue.createCommentVNode(" 头部 "), vue.createElementVNode("view", { class: "cart-header ss-flex ss-col-center ss-row-between ss-p-x-30" }, [ vue.createElementVNode("view", { class: "header-left ss-flex ss-col-center ss-font-26" }, [ vue.createCommentVNode(" 共 "), vue.createElementVNode("text", { class: "goods-number ui-TC-Main ss-flex" }, [ vue.createCommentVNode(" {{ state.pagination.total }} "), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("common.total_goods", { number: $setup.state.pagination.total })), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 件商品 ") ]), vue.createElementVNode("view", { class: "header-right" }, [ $setup.state.editMode && $setup.state.pagination.total ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "ss-reset-button", onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.editMode = false) }, vue.toDisplayString(_ctx.$t("common.cancel")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), !$setup.state.editMode && $setup.state.pagination.total ? (vue.openBlock(), vue.createElementBlock( "button", { key: 1, class: "ss-reset-button ui-TC-Main", onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.editMode = true) }, vue.toDisplayString(_ctx.$t("common.edit")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createCommentVNode(" 内容 "), vue.createElementVNode("view", { class: "cart-content" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "goods-box ss-r-10 ss-m-b-14", key: item.id }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ $setup.state.editMode ? (vue.openBlock(), vue.createElementBlock("label", { key: 0, class: "check-box ss-flex ss-col-center ss-p-l-10", onClick: ($event) => $setup.onSelect(item.spuId) }, [ vue.createElementVNode("radio", { checked: $setup.state.selectedSpuIdList.includes(item.spuId), color: "var(--ui-BG-Main)", style: { "transform": "scale(0.8)" }, onClick: vue.withModifiers(($event) => $setup.onSelect(item.spuId), ["stop"]) }, null, 8, ["checked", "onClick"]) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_s_goods_item, { title: item.spuName, img: item.picUrl, price: item.price, skuText: item.introduction, priceColor: "#FF3000", titleWidth: 400, onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.spuId }) }, null, 8, ["title", "img", "price", "skuText", "onClick"]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createCommentVNode(" 底部 "), vue.withDirectives(vue.createVNode( _component_su_fixed, { bottom: "", val: 0, placeholder: "" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "cart-footer ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom" }, [ vue.createElementVNode("view", { class: "footer-left ss-flex ss-col-center" }, [ vue.createElementVNode("label", { class: "check-box ss-flex ss-col-center ss-p-r-30", onClick: $setup.onSelectAll }, [ vue.createElementVNode("radio", { checked: $setup.state.selectAll, color: "var(--ui-BG-Main)", style: { "transform": "scale(0.7)" }, onClick: vue.withModifiers($setup.onSelectAll, ["stop"]) }, null, 8, ["checked"]), vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("common.select_all")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "footer-right ss-flex" }, [ vue.createElementVNode( "button", { class: vue.normalizeClass([ "ss-reset-button pay-btn ss-font-28 ", { "ui-BG-Main-Gradient": $setup.state.selectedSpuIdList.length > 0, "ui-Shadow-Main": $setup.state.selectedSpuIdList.length > 0 } ]), onClick: $setup.onDelete }, vue.toDisplayString(_ctx.$t("common.delete_footprint")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "button", { class: "ss-reset-button ui-BG-Main-Gradient pay-btn ss-font-28 ui-Shadow-Main ml-2", onClick: $setup.onClean }, vue.toDisplayString(_ctx.$t("common.clear")), 1 /* TEXT */ ) ]) ]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.editMode] ]) ]), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 0, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无浏览记录", icon: "/static/collect-empty.png" })) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserGoodsLog = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-e113b195"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/goods-log.vue"]]); const _sfc_main$1c = { __name: "list", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ list: [], // 地址列表 loading: true }); const onSelect = (addressInfo) => { uni.$emit("SELECT_ADDRESS", { addressInfo }); sheep$1.$router.back(); }; function importWechatAddress() { } onShow(async () => { state.list = (await AddressApi.getAddressList()).data; state.loading = false; }); vue.onBeforeMount(() => { if (!!uni.getStorageSync("areaData")) { return; } AreaApi.getAreaTree().then((res) => { if (res.code === 0) { uni.setStorageSync("areaData", res.data); } }); }); const __returned__ = { state, onSelect, importWechatAddress, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get onShow() { return onShow; }, get sheep() { return sheep$1; }, get isEmpty() { return lodashExports.isEmpty; }, get AreaApi() { return AreaApi; }, get AddressApi() { return AddressApi; }, get $helper() { return $helper; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_address_item = resolveEasycom(vue.resolveDynamicComponent("s-address-item"), __easycom_0$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("address.shipping_address"), bgStyle: { color: "#FFF" } }, { default: vue.withCtx(() => [ $setup.state.list.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.list, (item) => { return vue.openBlock(), vue.createBlock(_component_s_address_item, { hasBorderBottom: "", key: item.id, item, onClick: ($event) => $setup.onSelect(item) }, null, 8, ["item", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-flex ss-row-between ss-p-20" }, [ vue.createCommentVNode(" 微信小程序和微信H5 "), ["WechatMiniProgram", "WechatOfficialAccount"].includes($setup.sheep.$platform.name) ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, onClick: $setup.importWechatAddress, class: "border ss-reset-button sync-wxaddress ss-m-20 ss-flex ss-row-center ss-col-center" }, [ vue.createElementVNode("text", { class: "cicon-weixin ss-p-r-10", style: { "color": "#09bb07", "font-size": "40rpx" } }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("address.import_wechat_address")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "button", { class: "add-btn ss-reset-button ui-Shadow-Main", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/address/edit")) }, vue.toDisplayString($setup.t("address.add_new_shipping_address")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }), $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: $setup.t("no_shipping_address"), icon: "/static/data-empty.png" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserAddressList = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-5a5957ad"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/address/list.vue"]]); const _sfc_main$1b = { __name: "list", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ list: [], // 地址列表 loading: true }); const onSelect = (addressInfo) => { uni.$emit("SELECT_ADDRESS", { addressInfo }); sheep$1.$router.back(); }; function importWechatAddress() { } onShow(async () => { state.list = (await AddressApi.getAddressList(2)).data; state.loading = false; }); vue.onBeforeMount(() => { if (!!uni.getStorageSync("areaData")) { return; } AreaApi.getAreaTree().then((res) => { if (res.code === 0) { uni.setStorageSync("areaData", res.data); } }); }); const __returned__ = { state, onSelect, importWechatAddress, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get onShow() { return onShow; }, get sheep() { return sheep$1; }, get isEmpty() { return lodashExports.isEmpty; }, get AreaApi() { return AreaApi; }, get AddressApi() { return AddressApi; }, get $helper() { return $helper; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_address_item = resolveEasycom(vue.resolveDynamicComponent("s-address-item"), __easycom_0$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("address.virtual_goods_address"), bgStyle: { color: "#FFF" } }, { default: vue.withCtx(() => [ $setup.state.list.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.list, (item) => { return vue.openBlock(), vue.createBlock(_component_s_address_item, { spuType: "0", hasBorderBottom: "", key: item.id, item, onClick: ($event) => $setup.onSelect(item) }, null, 8, ["item", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-flex ss-row-between ss-p-20" }, [ vue.createCommentVNode(" 微信小程序和微信H5 "), vue.createElementVNode( "button", { class: "add-btn ss-reset-button ui-Shadow-Main", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/dummyAddress/edit")) }, vue.toDisplayString($setup.t("address.add_new_shipping_address")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }), $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: $setup.t("address.no_shipping_address"), icon: "/static/data-empty.png" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserDummyAddressList = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-d0cb4d27"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/dummyAddress/list.vue"]]); const _sfc_main$1a = { __name: "edit", setup(__props, { expose: __expose }) { __expose(); const invoiceFormRef = vue.ref(null); const currentProtocol = vue.ref(false); const state = vue.reactive({ showRegion: false, model: { invoiceType: 1, invoiceTitleType: 1, invoiceTitle: "", taxIDNumber: "" }, rules: {}, protocol: false }); function onChange() { state.protocol = !state.protocol; } function onProtocol(title) { sheep$1.$router.go("/pages/public/richtext", { title }); } const rules2 = { invoiceType: { rules: [{ required: true, errorMessage: "请选择发票类型" }] }, invoiceTitleType: { rules: [{ required: true, errorMessage: "请选择抬头类型" }] }, invoiceTitle: { rules: [{ required: true, errorMessage: "请输入发票抬头" }] }, taxIDNumber: { rules: [{ required: true, errorMessage: "请输入单位税号" }] } }; const invoiceType = (e2) => { state.model.invoiceType = e2.detail.value; state.model.invoiceTitleType = 1; }; const invoiceTitleType = (e2) => { state.model.invoiceTitleType = e2.detail.value; }; const onSave = async () => { const validate = await vue.unref(invoiceFormRef).validate().catch((error2) => { formatAppLog("log", "at pages/user/invoice/edit.vue:207", "error: ", error2); }); if (!validate) { return; } if (!state.protocol) { currentProtocol.value = true; setTimeout(function() { currentProtocol.value = false; }, 500); return; } const formData = { ...state.model }; const { code: code2 } = state.model.id > 0 ? await AddressApi.updateAddress(formData) : await AddressApi.createAddress(formData); if (code2 === 0) { sheep$1.$router.back(); } }; const onDelete = () => { uni.showModal({ title: "提示", content: "确认删除此收货地址吗?", success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await AddressApi.deleteAddress(state.model.id); if (code2 === 0) { sheep$1.$router.back(); } } }); }; onLoad(async (options2) => { }); const __returned__ = { invoiceFormRef, currentProtocol, state, onChange, onProtocol, rules: rules2, invoiceType, invoiceTitleType, onSave, onDelete, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get _() { return _$1; }, get mobile() { return mobile; }, get AreaApi() { return AreaApi; }, get AddressApi() { return AddressApi; }, get $helper() { return $helper; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" {{ru}} "), vue.createVNode(_component_s_layout, { title: $setup.state.model.id ? "编辑发票抬头" : "新增发票抬头" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms, { ref: "invoiceFormRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.state.model = $event), rules: $setup.rules, validateTrigger: "bind", labelWidth: "160", labelAlign: "left", border: "", labelStyle: { fontWeight: "bold" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white form-box ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "invoiceType", label: "发票类型" }, { default: vue.withCtx(() => [ vue.createElementVNode( "radio-group", { onChange: $setup.invoiceType }, [ vue.createElementVNode("radio", { value: "1", checked: $setup.state.model.invoiceType == 1, color: "var(--ui-BG-Main)", class: "radio ss-m-r-30", style: { "transform": "scale(0.9)" } }, "纸质普票 ", 8, ["checked"]), vue.createElementVNode("radio", { value: "2", checked: $setup.state.model.invoiceType == 2, color: "var(--ui-BG-Main)", class: "radio", style: { "transform": "scale(0.9)" } }, "专用发票", 8, ["checked"]) ], 32 /* NEED_HYDRATION */ ) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 当为专用发票时,不用选择抬头类型 "), $setup.state.model.invoiceType == 1 ? (vue.openBlock(), vue.createBlock(_component_uni_forms_item, { key: 0, name: "invoiceTitleType", label: "抬头类型", class: "form-item" }, { default: vue.withCtx(() => [ vue.createElementVNode( "radio-group", { class: "uni-flex uni-row radio-group", onChange: $setup.invoiceTitleType }, [ vue.createElementVNode("radio", { value: "1", checked: $setup.state.model.invoiceTitleType == 1, color: "var(--ui-BG-Main)", class: "radio ss-m-r-30", style: { "transform": "scale(0.9)" } }, "个人 ", 8, ["checked"]), vue.createElementVNode("radio", { value: "2", checked: $setup.state.model.invoiceTitleType == 2, color: "var(--ui-BG-Main)", style: { "transform": "scale(0.9)" }, class: "radio" }, "单位", 8, ["checked"]) ], 32 /* NEED_HYDRATION */ ) ]), _: 1 /* STABLE */ })) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "发票抬头", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.invoiceTitle = $event), placeholder: "请输入发票抬头", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), $setup.state.model.invoiceTitleType == 2 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createVNode(_component_uni_forms_item, { name: "taxIDNumber", label: "单位税号", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.taxIDNumber, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.taxIDNumber = $event), type: "number", placeholder: "请输入单位税号", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "注册地址", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "选填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "注册电话", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "选填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "开户银行", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "选填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "银行账号", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "选填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $setup.state.model.invoiceType == 2 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createVNode(_component_uni_forms_item, { name: "taxIDNumber", label: "单位税号", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.taxIDNumber, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.model.taxIDNumber = $event), type: "number", placeholder: "请输入单位税号", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "注册地址", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "必填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "注册电话", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "必填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "开户银行", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "必填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "invoiceTitle", label: "银行账号", class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.invoiceTitle, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.state.model.invoiceTitle = $event), type: "number", placeholder: "必填", inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]), $setup.state.model.invoiceType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ss-m-y-20 bg-white ss-p-x-30 ss-flex ss-row-between ss-col-center default-box" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["default-box-title", { shake: $setup.currentProtocol }]) }, [ vue.createElementVNode("label", { class: "radio ss-flex ss-col-center", onClick: $setup.onChange }, [ vue.createElementVNode("radio", { checked: $setup.state.protocol, color: "var(--ui-BG-Main)", style: { "transform": "scale(0.8)" }, onClick: vue.withModifiers($setup.onChange, ["stop"]) }, null, 8, ["checked"]), vue.createElementVNode("view", { class: "agreement-text ss-flex ss-col-center ss-m-l-8" }, [ vue.createTextVNode(" 我已阅读并同意 "), vue.createElementVNode("view", { class: "tcp-text", onClick: _cache[11] || (_cache[11] = vue.withModifiers(($event) => $setup.onProtocol("专用发票抬头确认书"), ["stop"])) }, " 《专用发票抬头确认书》 ") ]) ]) ], 2 /* CLASS */ ) ])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_su_fixed, { bottom: "", opacity: false, bg: "", placeholder: "", noFixed: false, index: 10 }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-flex-col ss-row-between ss-p-20" }, [ vue.createElementVNode("view", { class: "ss-m-b-20" }, [ vue.createElementVNode("button", { class: "ss-reset-button save-btn ui-Shadow-Main", onClick: $setup.onSave }, "保存") ]), $setup.state.model.id ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: "ss-reset-button cancel-btn", onClick: $setup.onDelete }, " 删除 ")) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["title"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesUserInvoiceEdit = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-1891008f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/invoice/edit.vue"]]); const _sfc_main$19 = { __name: "list", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ list: [], // 地址列表 loading: true }); const onSelect = (addressInfo) => { uni.$emit("SELECT_ADDRESS", { addressInfo }); sheep$1.$router.back(); }; function importWechatAddress() { } onShow(async () => { state.list = (await AddressApi.getAddressList()).data; state.loading = false; }); vue.onBeforeMount(() => { if (!!uni.getStorageSync("areaData")) { return; } AreaApi.getAreaTree().then((res) => { if (res.code === 0) { uni.setStorageSync("areaData", res.data); } }); }); const __returned__ = { state, onSelect, importWechatAddress, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get onShow() { return onShow; }, get sheep() { return sheep$1; }, get isEmpty() { return lodashExports.isEmpty; }, get AreaApi() { return AreaApi; }, get AddressApi() { return AddressApi; }, get $helper() { return $helper; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_address_item = resolveEasycom(vue.resolveDynamicComponent("s-address-item"), __easycom_0$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "发票抬头管理", bgStyle: { color: "#FFF" } }, { default: vue.withCtx(() => [ $setup.state.list.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.list, (item) => { return vue.openBlock(), vue.createBlock(_component_s_address_item, { hasBorderBottom: "", key: item.id, item, onClick: ($event) => $setup.onSelect(item) }, null, 8, ["item", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-flex ss-row-between ss-p-20" }, [ vue.createCommentVNode(" 微信小程序和微信H5 "), vue.createCommentVNode(` `), vue.createElementVNode("button", { class: "add-btn ss-reset-button ui-Shadow-Main", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/invoice/edit")) }, " 新增发票抬头 ") ]) ]), _: 1 /* STABLE */ }), $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无发票抬头", icon: "/static/data-empty.png" })) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }); } const PagesUserInvoiceList = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-17d2e25a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/invoice/list.vue"]]); const __default__ = { name: "UiSwitch" }; const _sfc_main$18 = /* @__PURE__ */ Object.assign(__default__, { props: { modelValue: { type: [Boolean, Number], default: false }, ui: { type: String, default: "" }, bg: { type: String, default: "ui-BG-Main" }, text: { type: String, default: "" }, size: { type: String, default: "sm" }, disabled: { type: Boolean, default: false } }, emits: ["update:modelValue"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emits = __emit; const change = () => { emits("update:modelValue", !props.modelValue); }; const __returned__ = { props, emits, change }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["ui-switch", [{ disabled: $setup.props.disabled }, $setup.props.ui]]) }, [ vue.createElementVNode("view", { class: "ui-switch-wrapper", onClick: $setup.change }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ui-switch-input", [ { "ui-switch-input-checked": $setup.props.modelValue }, $setup.props.modelValue ? $setup.props.bg : "", $setup.props.text, $setup.props.size ]]) }, null, 2 /* CLASS */ ) ]) ], 2 /* CLASS */ ); } const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-8eb57d65"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-switch/su-switch.vue"]]); const _sfc_main$17 = { name: "SuToolbar", props: { // 是否展示工具条 show: { type: Boolean, default: true }, // 取消按钮的文字 cancelText: { type: String, default: "取消" }, // 确认按钮的文字 confirmText: { type: String, default: "确认" }, // 取消按钮的颜色 cancelColor: { type: String, default: "#909193" }, // 确认按钮的颜色 confirmColor: { type: String, default: "#3c9cff" }, // 标题文字 title: { type: String, default: "" } }, methods: { // 点击取消按钮 cancel() { this.$emit("cancel"); }, // 点击确定按钮 confirm() { this.$emit("confirm"); }, // 阻止事件冒泡 preventEvent(e2) { e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation(); }, // 空操作 noop(e2) { this.preventEvent(e2); } } }; function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) { return $props.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-toolbar", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.noop && $options.noop(...args), ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "u-toolbar__cancel__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-toolbar__wrapper__cancel", onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)), style: vue.normalizeStyle({ color: $props.cancelColor }) }, vue.toDisplayString($props.cancelText), 5 /* TEXT, STYLE */ ) ]), $props.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-toolbar__title u-line-1" }, vue.toDisplayString($props.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-toolbar__confirm__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-toolbar__wrapper__confirm", onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)), style: vue.normalizeStyle({ color: $props.confirmColor }) }, vue.toDisplayString($props.confirmText), 5 /* TEXT, STYLE */ ) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-2c641e39"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-toolbar/su-toolbar.vue"]]); const _sfc_main$16 = { __name: "su-region-picker", props: { show: { type: Boolean, default: false }, // "取消"按钮的颜色 cancelColor: { type: String, default: "#6666" }, // "确定"按钮的颜色 confirmColor: { type: String, default: "var(--ui-BG-Main)" }, // 取消按钮的文字 cancelText: { type: String, default: t$6("common.cancel") }, // 确认按钮的文字 confirmText: { type: String, default: t$6("common.confirm") } }, emits: ["confirm", "cancel", "change"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const areaData = uni.getStorageSync("areaData"); const getSizeByNameLength = (name2) => { let length = name2.length; if (length <= 7) return ""; if (length < 9) { return "font-size:28rpx"; } else { return "font-size: 24rpx"; } }; const state = vue.reactive({ currentIndex: [0, 0, 0], moving: false // 列是否还在滑动中,微信小程序如果在滑动中就点确定,结果可能不准确 }); const emits = __emit; const provinceList = areaData; const cityList = vue.computed(() => { return areaData[state.currentIndex[0]].children; }); const districtList = vue.computed(() => { var _a2; return (_a2 = cityList.value[state.currentIndex[1]]) == null ? void 0 : _a2.children; }); const pickstart = () => { }; const pickend = () => { }; const init = () => { }; const onCancel = () => { emits("cancel"); }; const change = (e2) => { if (state.currentIndex[0] === e2.detail.value[0] && state.currentIndex[1] === e2.detail.value[1]) { state.currentIndex[2] = e2.detail.value[2]; return; } else { if (state.currentIndex[0] !== e2.detail.value[0]) { e2.detail.value[1] = 0; } e2.detail.value[2] = 0; state.currentIndex = e2.detail.value; } emits("change", state.currentIndex); }; const onConfirm = (event = null) => { let index2 = state.currentIndex; let province = provinceList[index2[0]]; let city = cityList.value[index2[1]]; let district = districtList.value[index2[2]]; let result2 = { province_name: province.name, province_id: province.id, city_name: city.name, city_id: city.id, district_name: district.name, district_id: district.id }; if (event) emits(event, result2); }; const __returned__ = { props, areaData, getSizeByNameLength, state, emits, provinceList, cityList, districtList, pickstart, pickend, init, onCancel, change, onConfirm, computed: vue.computed, reactive: vue.reactive, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_toolbar = resolveEasycom(vue.resolveDynamicComponent("su-toolbar"), __easycom_0$4); const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createBlock(_component_su_popup, { show: $props.show, onClose: $setup.onCancel, round: "20" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ui-region-picker" }, [ vue.createVNode(_component_su_toolbar, { cancelColor: $props.cancelColor, confirmColor: $props.confirmColor, cancelText: $props.cancelText, confirmText: $props.confirmText, title: $setup.t("common.select_area"), onCancel: $setup.onCancel, onConfirm: _cache[0] || (_cache[0] = ($event) => $setup.onConfirm("confirm")) }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title"]), vue.createElementVNode("view", { class: "ui-picker-body" }, [ vue.createElementVNode("picker-view", { value: $setup.state.currentIndex, onChange: $setup.change, class: "ui-picker-view", onPickstart: $setup.pickstart, onPickend: $setup.pickend }, [ vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.provinceList, (province) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ui-column-item", key: province.id }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle($setup.getSizeByNameLength(province.name)) }, vue.toDisplayString(province.name), 5 /* TEXT, STYLE */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.cityList, (city) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ui-column-item", key: city.id }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle($setup.getSizeByNameLength(city.name)) }, vue.toDisplayString(city.name), 5 /* TEXT, STYLE */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("picker-view-column", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.districtList, (district) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ui-column-item", key: district.id }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle($setup.getSizeByNameLength(district.name)) }, vue.toDisplayString(district.name), 5 /* TEXT, STYLE */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 40, ["value"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]); } const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-124df58f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-region-picker/su-region-picker.vue"]]); const _sfc_main$15 = { __name: "edit", setup(__props, { expose: __expose }) { __expose(); const addressFormRef = vue.ref(null); const state = vue.reactive({ showRegion: false, model: { name: "", mobile: "", detailAddress: "", defaultStatus: false, areaName: "" }, rules: {} }); const rules2 = { name: { rules: [{ required: true, errorMessage: t$6("address.enter_recipient_name") }] }, mobile, detailAddress: { rules: [{ required: true, errorMessage: t$6("address.enter_detailed_address") }] }, areaName: { rules: [{ required: true, errorMessage: t$6("address.select_province_city_district") }] } }; const onRegionConfirm = (e2) => { state.model.areaName = `${e2.province_name} ${e2.city_name} ${e2.district_name}`; state.model.areaId = e2.district_id; state.showRegion = false; }; const getAreaData = () => { if (_$1.isEmpty(uni.getStorageSync("areaData"))) { AreaApi.getAreaTree().then((res) => { if (res.code === 0) { uni.setStorageSync("areaData", res.data); } }); } }; const onSave = async () => { formatAppLog("log", "at pages/user/address/edit.vue:128", state); const validate = await vue.unref(addressFormRef).validate().catch((error2) => { formatAppLog("log", "at pages/user/address/edit.vue:133", "error: ", error2); }); if (!validate) { return; } const formData = { ...state.model }; const { code: code2 } = state.model.id > 0 ? await AddressApi.updateAddress(formData) : await AddressApi.createAddress(formData); if (code2 === 0) { sheep$1.$router.back(); } }; const onDelete = () => { uni.showModal({ title: t$6("setting.prompt"), content: t$6("address.confirm_delete_address"), success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await AddressApi.deleteAddress(state.model.id); if (code2 === 0) { sheep$1.$router.back(); } } }); }; onLoad(async (options2) => { getAreaData(); if (options2.id) { let { code: code2, data } = await AddressApi.getAddress(options2.id); if (code2 !== 0) { return; } state.model = data; } if (options2.data) { let data = JSON.parse(options2.data); const areaData = uni.getStorageSync("areaData"); let provinceArr = areaData.filter((item) => item.name == data.province_name); data.province_id = provinceArr[0].id; let provinceArr2 = provinceArr[0].children.filter((item) => item.name == data.city_name); data.city_id = provinceArr2[0].id; let provinceArr3 = provinceArr2[0].children.filter((item) => item.name == data.district_name); data.district_id = provinceArr3[0].id; state.model = { name: data.consignee, mobile: data.mobile, detailAddress: data.address, defaultStatus: data.is_default, areaName: data.province_name + " " + data.city_name + " " + data.district_name, areaId: data.district_id }; } }); const __returned__ = { addressFormRef, state, rules: rules2, onRegionConfirm, getAreaData, onSave, onDelete, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get _() { return _$1; }, get mobile() { return mobile; }, get AreaApi() { return AreaApi; }, get AddressApi() { return AddressApi; }, get $helper() { return $helper; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); const _component_su_switch = resolveEasycom(vue.resolveDynamicComponent("su-switch"), __easycom_2); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_su_region_picker = resolveEasycom(vue.resolveDynamicComponent("su-region-picker"), __easycom_5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.state.model.id ? $setup.t("address.edit_address") : $setup.t("address.add_address") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms, { ref: "addressFormRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.model = $event), rules: $setup.rules, validateTrigger: "bind", labelWidth: "160", labelAlign: "left", border: "", labelStyle: { fontWeight: "bold" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white form-box ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "name", label: $setup.t("address.recipient"), class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.name, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.name = $event), placeholder: $setup.t("address.enter_recipient_name"), inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal", maxlength: 10 }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.phone_number"), class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.mobile, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event), type: "number", placeholder: $setup.t("account.enter_phone_number"), inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "areaName", label: $setup.t("address.province_city_district"), onClick: _cache[3] || (_cache[3] = ($event) => $setup.state.showRegion = true), class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.areaName, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.areaName = $event), disabled: "", inputBorder: false, styles: { disableColor: "#fff", color: "#333" }, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal", placeholder: $setup.t("address.select_province_city_district") }, { right: vue.withCtx(() => [ vue.createVNode(_component_uni_icons, { type: "right" }) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "detailAddress", label: $setup.t("address.detailed_address"), formItemStyle: { alignItems: "flex-start" }, labelStyle: { lineHeight: "5em" }, class: "textarea-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { inputBorder: false, type: "textarea", modelValue: $setup.state.model.detailAddress, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.detailAddress = $event), placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal", placeholder: $setup.t("address.enter_detailed_address"), clearable: "" }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), vue.createElementVNode("view", { class: "ss-m-y-20 bg-white ss-p-x-30 ss-flex ss-row-between ss-col-center default-box" }, [ vue.createElementVNode( "view", { class: "default-box-title" }, vue.toDisplayString($setup.t("address.set_as_default_address")), 1 /* TEXT */ ), vue.createVNode(_component_su_switch, { style: { "transform": "scale(0.8)" }, modelValue: $setup.state.model.defaultStatus, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.defaultStatus = $event) }, null, 8, ["modelValue"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_su_fixed, { bottom: "", opacity: false, bg: "", placeholder: "", noFixed: false, index: 10 }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-flex-col ss-row-between ss-p-20" }, [ vue.createElementVNode("view", { class: "ss-m-b-20" }, [ vue.createElementVNode( "button", { class: "ss-reset-button save-btn ui-Shadow-Main", onClick: $setup.onSave }, vue.toDisplayString($setup.t("common.save")), 1 /* TEXT */ ) ]), $setup.state.model.id ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "ss-reset-button cancel-btn", onClick: $setup.onDelete }, vue.toDisplayString($setup.t("common.delete")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 省市区弹窗 "), vue.createVNode(_component_su_region_picker, { show: $setup.state.showRegion, onCancel: _cache[7] || (_cache[7] = ($event) => $setup.state.showRegion = false), onConfirm: $setup.onRegionConfirm }, null, 8, ["show"]) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserAddressEdit = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-e04c42e1"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/address/edit.vue"]]); const _sfc_main$14 = { __name: "edit", setup(__props, { expose: __expose }) { __expose(); const addressFormRef = vue.ref(null); const state = vue.reactive({ showRegion: false, model: { name: "", mobile: "", detailAddress: "", defaultStatus: false, areaName: "", addressType: 2 }, rules: {} }); const rules2 = { name: { rules: [{ required: true, errorMessage: t$6("address.enter_recipient_name") }] }, mobile, detailAddress: { rules: [{ required: true, errorMessage: t$6("address.enter_detailed_address") }] } }; const onRegionConfirm = (e2) => { state.model.areaName = `${e2.province_name} ${e2.city_name} ${e2.district_name}`; state.model.areaId = e2.district_id; state.showRegion = false; }; const getAreaData = () => { if (_$1.isEmpty(uni.getStorageSync("areaData"))) { AreaApi.getAreaTree().then((res) => { if (res.code === 0) { uni.setStorageSync("areaData", res.data); } }); } }; const onSave = async () => { formatAppLog("log", "at pages/user/dummyAddress/edit.vue:116", state); const validate = await vue.unref(addressFormRef).validate().catch((error2) => { formatAppLog("log", "at pages/user/dummyAddress/edit.vue:121", "error: ", error2); }); if (!validate) { return; } const formData = { ...state.model }; const { code: code2 } = state.model.id > 0 ? await AddressApi.updateAddress(formData) : await AddressApi.createAddress(formData); if (code2 === 0) { sheep$1.$router.back(); } }; const onDelete = () => { uni.showModal({ title: t$6("setting.prompt"), content: t$6("address.confirm_delete_address"), success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await AddressApi.deleteAddress(state.model.id, 2); if (code2 === 0) { sheep$1.$router.back(); } } }); }; onLoad(async (options2) => { getAreaData(); if (options2.id) { let { code: code2, data } = await AddressApi.getAddress(options2.id, 2); if (code2 !== 0) { return; } state.model = data; } if (options2.data) { let data = JSON.parse(options2.data); const areaData = uni.getStorageSync("areaData"); let provinceArr = areaData.filter((item) => item.name == data.province_name); data.province_id = provinceArr[0].id; let provinceArr2 = provinceArr[0].children.filter((item) => item.name == data.city_name); data.city_id = provinceArr2[0].id; let provinceArr3 = provinceArr2[0].children.filter((item) => item.name == data.district_name); data.district_id = provinceArr3[0].id; state.model = { name: data.consignee, mobile: data.mobile, detailAddress: data.address, defaultStatus: data.is_default, areaName: data.province_name + " " + data.city_name + " " + data.district_name, areaId: data.district_id }; } }); const __returned__ = { addressFormRef, state, rules: rules2, onRegionConfirm, getAreaData, onSave, onDelete, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get _() { return _$1; }, get mobile() { return mobile; }, get AreaApi() { return AreaApi; }, get AddressApi() { return AddressApi; }, get $helper() { return $helper; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_su_switch = resolveEasycom(vue.resolveDynamicComponent("su-switch"), __easycom_2); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_su_region_picker = resolveEasycom(vue.resolveDynamicComponent("su-region-picker"), __easycom_5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" {{ru}} "), vue.createVNode(_component_s_layout, { title: $setup.state.model.id ? $setup.t("address.edit_virtual_address") : $setup.t("address.add_virtual_address") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms, { ref: "addressFormRef", modelValue: $setup.state.model, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model = $event), rules: $setup.rules, validateTrigger: "bind", labelWidth: "160", labelAlign: "left", border: "", labelStyle: { fontWeight: "bold" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white form-box ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "name", label: $setup.t("address.recipient"), class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.name, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.name = $event), placeholder: $setup.t("address.enter_recipient_name"), inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal", maxlength: 10 }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.phone_number"), class: "form-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.mobile, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event), type: "number", placeholder: $setup.t("account.enter_phone_number"), inputBorder: false, placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal" }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "detailAddress", label: $setup.t("address.detailed_address"), formItemStyle: { alignItems: "flex-start" }, labelStyle: { lineHeight: "5em" }, class: "textarea-item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { inputBorder: false, type: "textarea", modelValue: $setup.state.model.detailAddress, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.detailAddress = $event), placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal", placeholder: $setup.t("address.enter_detailed_address"), clearable: "" }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), vue.createElementVNode("view", { class: "ss-m-y-20 bg-white ss-p-x-30 ss-flex ss-row-between ss-col-center default-box" }, [ vue.createElementVNode( "view", { class: "default-box-title" }, vue.toDisplayString($setup.t("address.set_as_default_virtual_address")), 1 /* TEXT */ ), vue.createVNode(_component_su_switch, { style: { "transform": "scale(0.8)" }, modelValue: $setup.state.model.defaultStatus, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.defaultStatus = $event) }, null, 8, ["modelValue"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_su_fixed, { bottom: "", opacity: false, bg: "", placeholder: "", noFixed: false, index: 10 }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-flex-col ss-row-between ss-p-20" }, [ vue.createElementVNode("view", { class: "ss-m-b-20" }, [ vue.createElementVNode( "button", { class: "ss-reset-button save-btn ui-Shadow-Main", onClick: $setup.onSave }, vue.toDisplayString($setup.t("common.save")), 1 /* TEXT */ ) ]), $setup.state.model.id ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "ss-reset-button cancel-btn", onClick: $setup.onDelete }, vue.toDisplayString($setup.t("common.delete")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 省市区弹窗 "), vue.createVNode(_component_su_region_picker, { show: $setup.state.showRegion, onCancel: _cache[5] || (_cache[5] = ($event) => $setup.state.showRegion = false), onConfirm: $setup.onRegionConfirm }, null, 8, ["show"]) ]), _: 1 /* STABLE */ }, 8, ["title"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesUserDummyAddressEdit = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-bc658567"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/dummyAddress/edit.vue"]]); class Calendar { constructor({ date: date2, selected, startDate, endDate, range: range2 // multipleStatus } = {}) { this.date = this.getDate(/* @__PURE__ */ new Date()); this.selected = selected || []; this.startDate = startDate; this.endDate = endDate; this.range = range2; this.cleanMultipleStatus(); this.weeks = {}; this.lastHover = false; } /** * 设置日期 * @param {Object} date */ setDate(date2) { this.selectDate = this.getDate(date2); this._getWeek(this.selectDate.fullDate); } /** * 清理多选状态 */ cleanMultipleStatus() { this.multipleStatus = { before: "", after: "", data: [] }; } /** * 重置开始日期 */ resetSatrtDate(startDate) { this.startDate = startDate; } /** * 重置结束日期 */ resetEndDate(endDate) { this.endDate = endDate; } /** * 获取任意时间 */ getDate(date2, AddDayCount = 0, str = "day") { if (!date2) { date2 = /* @__PURE__ */ new Date(); } if (typeof date2 !== "object") { date2 = date2.replace(/-/g, "/"); } const dd = new Date(date2); switch (str) { case "day": dd.setDate(dd.getDate() + AddDayCount); break; case "month": if (dd.getDate() === 31) { dd.setDate(dd.getDate() + AddDayCount); } else { dd.setMonth(dd.getMonth() + AddDayCount); } break; case "year": dd.setFullYear(dd.getFullYear() + AddDayCount); break; } const y2 = dd.getFullYear(); const m2 = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1; const d2 = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); return { fullDate: y2 + "-" + m2 + "-" + d2, year: y2, month: m2, date: d2, day: dd.getDay() }; } /** * 获取上月剩余天数 */ _getLastMonthDays(firstDay, full) { let dateArr = []; for (let i2 = firstDay; i2 > 0; i2--) { const beforeDate = new Date(full.year, full.month - 1, -i2 + 1).getDate(); dateArr.push({ date: beforeDate, month: full.month - 1, disable: true }); } return dateArr; } /** * 获取本月天数 */ _currentMonthDys(dateData, full) { let dateArr = []; let fullDate = this.date.fullDate; for (let i2 = 1; i2 <= dateData; i2++) { let nowDate = full.year + "-" + (full.month < 10 ? full.month : full.month) + "-" + (i2 < 10 ? "0" + i2 : i2); let isDay = fullDate === nowDate; let info = this.selected && this.selected.find((item) => { if (this.dateEqual(nowDate, item.date)) { return item; } }); let disableBefore = true; let disableAfter = true; if (this.startDate) { disableBefore = this.dateCompare(this.startDate, nowDate); } if (this.endDate) { disableAfter = this.dateCompare(nowDate, this.endDate); } let multiples = this.multipleStatus.data; let checked = false; let multiplesStatus = -1; if (this.range) { if (multiples) { multiplesStatus = multiples.findIndex((item) => { return this.dateEqual(item, nowDate); }); } if (multiplesStatus !== -1) { checked = true; } } let data = { fullDate: nowDate, year: full.year, date: i2, multiple: this.range ? checked : false, beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after), afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after), month: full.month, disable: !(disableBefore && disableAfter), isDay, userChecked: false }; if (info) { data.extraInfo = info; } dateArr.push(data); } return dateArr; } /** * 获取下月天数 */ _getNextMonthDays(surplus, full) { let dateArr = []; for (let i2 = 1; i2 < surplus + 1; i2++) { dateArr.push({ date: i2, month: Number(full.month) + 1, disable: true }); } return dateArr; } /** * 获取当前日期详情 * @param {Object} date */ getInfo(date2) { if (!date2) { date2 = /* @__PURE__ */ new Date(); } const dateInfo = this.canlender.find((item) => item.fullDate === this.getDate(date2).fullDate); return dateInfo; } /** * 比较时间大小 */ dateCompare(startDate, endDate) { startDate = new Date(startDate.replace("-", "/").replace("-", "/")); endDate = new Date(endDate.replace("-", "/").replace("-", "/")); if (startDate <= endDate) { return true; } else { return false; } } /** * 比较时间是否相等 */ dateEqual(before, after) { before = new Date(before.replace("-", "/").replace("-", "/")); after = new Date(after.replace("-", "/").replace("-", "/")); if (before.getTime() - after.getTime() === 0) { return true; } else { return false; } } /** * 比较真实起始日期 */ isLogicBefore(currentDay, before, after) { let logicBefore = before; if (before && after) { logicBefore = this.dateCompare(before, after) ? before : after; } return this.dateEqual(logicBefore, currentDay); } isLogicAfter(currentDay, before, after) { let logicAfter = after; if (before && after) { logicAfter = this.dateCompare(before, after) ? after : before; } return this.dateEqual(logicAfter, currentDay); } /** * 获取日期范围内所有日期 * @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.getDate(new Date(parseInt(k))).fullDate); } return arr; } /** * 获取多选状态 */ setMultiple(fullDate) { let { before, after } = this.multipleStatus; if (!this.range) return; 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.lastHover = false; } else { this.multipleStatus.after = fullDate; if (this.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._getWeek(fullDate); } /** * 鼠标 hover 更新多选状态 */ setHoverMultiple(fullDate) { let { before, after } = this.multipleStatus; if (!this.range) return; if (this.lastHover) return; if (!before) { this.multipleStatus.before = fullDate; } else { this.multipleStatus.after = fullDate; if (this.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._getWeek(fullDate); } /** * 更新默认值多选状态 */ setDefaultMultiple(before, after) { this.multipleStatus.before = before; this.multipleStatus.after = after; if (before && after) { if (this.dateCompare(before, after)) { this.multipleStatus.data = this.geDateAll(before, after); this._getWeek(after); } else { this.multipleStatus.data = this.geDateAll(after, before); this._getWeek(before); } } } /** * 获取每周数据 * @param {Object} dateData */ _getWeek(dateData) { const { fullDate, year, month, date: date2, day } = this.getDate(dateData); let firstDay = new Date(year, month - 1, 1).getDay(); let currentDay = new Date(year, month, 0).getDate(); let dates = { lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天 currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数 nextMonthDays: [], // 下个月开始几天 weeks: [] }; let canlender = []; const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length); dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData)); canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays); let weeks = {}; for (let i2 = 0; i2 < canlender.length; i2++) { if (i2 % 7 === 0) { weeks[parseInt(i2 / 7)] = new Array(7); } weeks[parseInt(i2 / 7)][i2 % 7] = canlender[i2]; } this.canlender = canlender; this.weeks = weeks; } //静态方法 // static init(date) { // if (!this.instance) { // this.instance = new Calendar(date); // } // return this.instance; // } } const _sfc_main$13 = { props: { weeks: { type: Object, default() { return {}; } }, calendar: { type: Object, default: () => { return {}; } }, selected: { type: Array, default: () => { return []; } }, lunar: { type: Boolean, default: false }, checkHover: { type: Boolean, default: false } }, methods: { choiceDate(weeks) { this.$emit("change", weeks); }, handleMousemove(weeks) { this.$emit("handleMouse", weeks); } } }; function _sfc_render$12(_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--isDay": $props.weeks.isDay }) }, null, 2 /* CLASS */ ) ], 34 /* CLASS, NEED_HYDRATION */ ); } const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-3c762a01"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]); const en = { "uni-datetime-picker.selectDate": "select date", "uni-datetime-picker.selectTime": "select time", "uni-datetime-picker.selectDateTime": "select datetime", "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-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" }; const zhHans = { "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-calender.SUN": "日", "uni-calender.MON": "一", "uni-calender.TUE": "二", "uni-calender.WED": "三", "uni-calender.THU": "四", "uni-calender.FRI": "五", "uni-calender.SAT": "六" }; const zhHant = { "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-calender.SUN": "日", "uni-calender.MON": "一", "uni-calender.TUE": "二", "uni-calender.WED": "三", "uni-calender.THU": "四", "uni-calender.FRI": "五", "uni-calender.SAT": "六" }; const messages = { en, "zh-Hans": zhHans, "zh-Hant": zhHant }; const { t: t$2 } = initVueI18n(messages); const _sfc_main$12 = { name: "UniDatetimePicker", components: {}, 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 }; }, 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: { value: { handler(newVal, oldVal) { if (newVal) { this.parseValue(this.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(this.fixIosDateFormat(newVal), "start"); }, immediate: true }, end: { handler(newVal) { this.parseDatetimeRange(this.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$2("uni-datetime-picker.selectTime"); }, okText() { return t$2("uni-datetime-picker.ok"); }, clearText() { return t$2("uni-datetime-picker.clear"); }, cancelText() { return t$2("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(datetime2) { let defaultValue = null; if (datetime2) { defaultValue = this.compareValueWithStartAndEnd(datetime2, 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) && typeof value !== NaN) { 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) && Number(point) !== NaN) { 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 range2 = []; for (let i2 = this["min" + this.capitalize(value)]; i2 <= this["max" + this.capitalize(value)]; i2++) { range2.push(i2); } return range2; }, // 字符串首字母大写 capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); }, // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项 checkValue(name2, value, values) { if (values.indexOf(value) === -1) { this[name2] = values[0]; } }, // 每个月的实际天数 daysInMonth(year, month) { return new Date(year, month, 0).getDate(); }, //兼容 iOS、safari 日期格式 fixIosDateFormat(value) { if (typeof value === "string") { value = value.replace(/-/g, "/"); } return value; }, /** * 生成时间戳 * @param {Object} time */ createTimeStamp(time2) { if (!time2) return; if (typeof time2 === "number") { return time2; } else { time2 = time2.replace(/-/g, "/"); if (this.type === "date") { time2 = time2 + " 00:00:00"; } return Date.parse(time2); } }, /** * 生成日期或时间的字符串 */ 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 = this.fixIosDateFormat(this.value); 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$11(_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, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index2 }, [ 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, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index2 }, [ 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, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index2 }, [ 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, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index2 }, [ 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, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index2 }, [ 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, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker-item", key: index2 }, [ 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$12, [["render", _sfc_render$11], ["__scopeId", "data-v-1d532b70"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]); const { t: t$1 } = initVueI18n(messages); const _sfc_main$11 = { components: { calendarItem, timePicker }, props: { date: { type: String, default: "" }, defTime: { type: [String, Object], default: "" }, selectableTimes: { type: [Object], default() { return {}; } }, selected: { type: Array, default() { return []; } }, lunar: { type: Boolean, default: false }, startDate: { type: String, default: "" }, endDate: { type: String, default: "" }, range: { type: Boolean, default: false }, typeHasTime: { type: Boolean, default: false }, insert: { type: Boolean, default: true }, showMonth: { type: Boolean, default: true }, clearDate: { type: Boolean, default: true }, left: { type: Boolean, default: true }, right: { type: Boolean, default: true }, checkHover: { type: Boolean, default: true }, hideSecond: { type: [Boolean], default: false }, pleStatus: { type: Object, default() { return { before: "", after: "", data: [], fulldate: "" }; } } }, 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, oldVal) { if (!this.range) { this.tempSingleDate = newVal; setTimeout(() => { this.init(newVal); }, 100); } } }, defTime: { immediate: true, handler(newVal, oldVal) { if (!this.range) { this.time = newVal; } else { this.timeRange.startTime = newVal.start; this.timeRange.endTime = newVal.end; } } }, startDate(val) { this.cale.resetSatrtDate(val); this.cale.setDate(this.nowDate.fullDate); this.weeks = this.cale.weeks; }, endDate(val) { this.cale.resetEndDate(val); this.cale.setDate(this.nowDate.fullDate); this.weeks = this.cale.weeks; }, selected(newVal) { this.cale.setSelectInfo(this.nowDate.fullDate, newVal); this.weeks = this.cale.weeks; }, pleStatus: { immediate: true, handler(newVal, oldVal) { 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 { this.cale.setDefaultMultiple(before, after); if (which === "left") { this.setDate(before); this.weeks = this.cale.weeks; } else { this.setDate(after); this.weeks = this.cale.weeks; } this.cale.lastHover = true; } }, 16); } } }, computed: { reactStartTime() { const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate; const res = activeDate === this.startDate ? this.selectableTimes.start : ""; return res; }, reactEndTime() { const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate; const res = activeDate === this.endDate ? this.selectableTimes.end : ""; return res; }, /** * for i18n */ selectDateText() { return t$1("uni-datetime-picker.selectDate"); }, startDateText() { return this.startPlaceholder || t$1("uni-datetime-picker.startDate"); }, endDateText() { return this.endPlaceholder || t$1("uni-datetime-picker.endDate"); }, okText() { return t$1("uni-datetime-picker.ok"); }, monText() { return t$1("uni-calender.MON"); }, TUEText() { return t$1("uni-calender.TUE"); }, WEDText() { return t$1("uni-calender.WED"); }, THUText() { return t$1("uni-calender.THU"); }, FRIText() { return t$1("uni-calender.FRI"); }, SATText() { return t$1("uni-calender.SAT"); }, SUNText() { return t$1("uni-calender.SUN"); } }, created() { this.cale = new Calendar({ // date: new Date(), selected: this.selected, startDate: this.startDate, endDate: this.endDate, range: this.range // multipleStatus: this.pleStatus }); 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; }, // 取消穿透 clean() { this.close(); }, 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(); }, bindDateChange(e2) { const value = e2.detail.value + "-1"; this.init(value); }, /** * 初始化日期显示 * @param {Object} date */ init(date2) { this.cale.setDate(date2); this.weeks = this.cale.weeks; this.nowDate = this.calendar = this.cale.getInfo(date2); }, // choiceDate(weeks) { // if (weeks.disable) return // this.calendar = weeks // // 设置多选 // this.cale.setMultiple(this.calendar.fullDate, true) // this.weeks = this.cale.weeks // this.tempSingleDate = this.calendar.fullDate // this.tempRange.before = this.cale.multipleStatus.before // this.tempRange.after = this.cale.multipleStatus.after // this.change() // }, /** * 打开日历弹窗 */ 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() { if (!this.insert) return; this.setEmit("change"); }, /** * 选择月份触发 */ monthSwitch() { let { year, month } = this.nowDate; this.$emit("monthSwitch", { year, month: Number(month) }); }, /** * 派发事件 * @param {Object} name */ setEmit(name2) { let { year, month, date: date2, fullDate, lunar, extraInfo } = this.calendar; this.$emit(name2, { range: this.cale.multipleStatus, year, month, date: date2, time: this.time, timeRange: this.timeRange, fulldate: fullDate, lunar, 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; this.tempRange.before = this.cale.multipleStatus.before; this.tempRange.after = this.cale.multipleStatus.after; this.change(); }, /** * 回到今天 */ backtoday() { let date2 = this.cale.getDate(/* @__PURE__ */ new Date()).fullDate; this.init(date2); this.change(); }, /** * 比较时间大小 */ dateCompare(startDate, endDate) { startDate = new Date(startDate.replace("-", "/").replace("-", "/")); endDate = new Date(endDate.replace("-", "/").replace("-", "/")); if (startDate <= endDate) { return true; } else { return false; } }, /** * 上个月 */ pre() { const preDate = this.cale.getDate(this.nowDate.fullDate, -1, "month").fullDate; this.setDate(preDate); this.monthSwitch(); }, /** * 下个月 */ next() { const nextDate = this.cale.getDate(this.nowDate.fullDate, 1, "month").fullDate; this.setDate(nextDate); this.monthSwitch(); }, /** * 设置日期 * @param {Object} date */ setDate(date2) { this.cale.setDate(date2); this.weeks = this.cale.weeks; this.nowDate = this.cale.getInfo(date2); } } }; function _sfc_render$10(_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$b); return vue.openBlock(), vue.createElementBlock( "view", { class: "uni-calendar", onMouseleave: _cache[9] || (_cache[9] = (...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.clean && $options.clean(...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 }]) }, [ $props.left ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-calendar__header-btn-box", onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.pre && $options.pre(...args), ["stop"])) }, [ vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" }) ])) : vue.createCommentVNode("v-if", true), 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 || "") + " 年 " + ($data.nowDate.month || "") + " 月"), 1 /* TEXT */ ) ], 40, ["value"]), $props.right ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-calendar__header-btn-box", onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.next && $options.next(...args), ["stop"])) }, [ vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" }) ])) : vue.createCommentVNode("v-if", true), !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "dialog-close", onClick: _cache[4] || (_cache[4] = (...args) => $options.clean && $options.clean(...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), vue.createCommentVNode(' 回到今天 ') ], 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, lunar: $props.lunar, checkHover: $props.range, onChange: $options.choiceDate, onHandleMouse: $options.handleMouse }, null, 8, ["weeks", "calendar", "selected", "lunar", "checkHover", "onChange", "onHandleMouse"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), !$props.insert && !$props.range && $props.typeHasTime ? (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.reactStartTime, end: $options.reactEndTime, 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.typeHasTime ? (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.reactStartTime, 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.createVNode(_component_uni_icons, { type: "arrowthinright", color: "#999", style: { "line-height": "50px" } }), 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.reactEndTime, 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(' \n {{okText}}\n '), vue.createElementVNode("view", { class: "uni-datetime-picker--btn", onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args)) }, "确认") ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ); } const calendar = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-1d379219"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]); const { t } = initVueI18n(messages); const _sfc_main$10 = { name: "UniDatetimePicker", components: { calendar, timePicker }, data() { return { isRange: false, hasTime: false, mobileRange: false, // 单选 singleVal: "", tempSingleDate: "", defSingleDate: "", time: "", // 范围选 caleRange: { startDate: "", startTime: "", endDate: "", endTime: "" }, range: { startDate: "", // startTime: '', endDate: "" // endTime: '' }, tempRange: { startDate: "", startTime: "", endDate: "", endTime: "" }, // 左右日历同步数据 startMultipleStatus: { before: "", after: "", data: [], fulldate: "" }, endMultipleStatus: { before: "", after: "", data: [], fulldate: "" }, visible: false, popup: false, popover: null, isEmitValue: false, isPhone: false, isFirstShow: true }; }, 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 } }, watch: { type: { immediate: true, handler(newVal, oldVal) { if (newVal.indexOf("time") !== -1) { this.hasTime = true; } else { this.hasTime = false; } if (newVal.indexOf("range") !== -1) { this.isRange = true; } else { this.isRange = false; } } }, modelValue: { immediate: true, handler(newVal, oldVal) { if (this.isEmitValue) { this.isEmitValue = false; return; } this.initPicker(newVal); } }, start: { immediate: true, handler(newVal, oldVal) { if (!newVal) return; const { defDate, defTime } = this.parseDate(newVal); this.caleRange.startDate = defDate; if (this.hasTime) { this.caleRange.startTime = defTime; } } }, end: { immediate: true, handler(newVal, oldVal) { if (!newVal) return; const { defDate, defTime } = this.parseDate(newVal); this.caleRange.endDate = defDate; if (this.hasTime) { this.caleRange.endTime = defTime; } } } }, computed: { reactStartTime() { const activeDate = this.isRange ? this.tempRange.startDate : this.tempSingleDate; const res = activeDate === this.caleRange.startDate ? this.caleRange.startTime : ""; return res; }, reactEndTime() { const activeDate = this.isRange ? this.tempRange.endDate : this.tempSingleDate; const res = activeDate === this.caleRange.endDate ? this.caleRange.endTime : ""; return res; }, reactMobDefTime() { const times2 = { start: this.tempRange.startTime, end: this.tempRange.endTime }; return this.isRange ? times2 : this.time; }, mobSelectableTime() { return { start: this.caleRange.startTime, end: this.caleRange.endTime }; }, datePopupWidth() { return this.isRange ? 653 : 301; }, /** * for i18n */ singlePlaceholderText() { return this.placeholder || (this.type === "date" ? this.selectDateText : t( "uni-datetime-picker.selectDateTime" )); }, startPlaceholderText() { return this.startPlaceholder || this.startDateText; }, endPlaceholderText() { return this.endPlaceholder || this.endDateText; }, selectDateText() { return t("uni-datetime-picker.selectDate"); }, selectTimeText() { return t("uni-datetime-picker.selectTime"); }, startDateText() { return this.startPlaceholder || t("uni-datetime-picker.startDate"); }, startTimeText() { return t("uni-datetime-picker.startTime"); }, endDateText() { return this.endPlaceholder || t("uni-datetime-picker.endDate"); }, endTimeText() { return t("uni-datetime-picker.endTime"); }, okText() { return t("uni-datetime-picker.ok"); }, clearText() { return t("uni-datetime-picker.clear"); }, showClearIcon() { const { clearIcon, disabled, singleVal, range: range2 } = this; const bool = clearIcon && !disabled && (singleVal || range2.startDate && range2.endDate); return bool; } }, created() { this.form = this.getForm("uniForms"); this.formItem = this.getForm("uniFormsItem"); }, mounted() { this.platform(); }, methods: { /** * 获取父元素实例 */ getForm(name2 = "uniForms") { let parent2 = this.$parent; let parentName = parent2.$options.name; while (parentName !== name2) { parent2 = parent2.$parent; if (!parent2) return false; parentName = parent2.$options.name; } return parent2; }, initPicker(newVal) { if (!newVal || Array.isArray(newVal) && !newVal.length) { this.$nextTick(() => { this.clear(false); }); return; } if (!Array.isArray(newVal) && !this.isRange) { const { defDate, defTime } = this.parseDate(newVal); this.singleVal = defDate; this.tempSingleDate = defDate; this.defSingleDate = defDate; if (this.hasTime) { this.singleVal = defDate + " " + defTime; this.time = defTime; } } else { const [before, after] = newVal; if (!before && !after) return; const defBefore = this.parseDate(before); const defAfter = this.parseDate(after); const startDate = defBefore.defDate; const endDate = defAfter.defDate; this.range.startDate = this.tempRange.startDate = startDate; this.range.endDate = this.tempRange.endDate = endDate; if (this.hasTime) { this.range.startDate = defBefore.defDate + " " + defBefore.defTime; this.range.endDate = defAfter.defDate + " " + defAfter.defTime; this.tempRange.startTime = defBefore.defTime; this.tempRange.endTime = defAfter.defTime; } const defaultRange = { before: defBefore.defDate, after: defAfter.defDate }; 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() { const systemInfo = uni.getSystemInfoSync(); this.isPhone = systemInfo.windowWidth <= 500; this.windowWidth = systemInfo.windowWidth; }, show(event) { if (this.disabled) { return; } this.platform(); if (this.isPhone) { this.$refs.mobile.open(); return; } this.popover = { top: "10px" }; const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor"); dateEditor.boundingClientRect((rect) => { if (this.windowWidth - rect.left < this.datePopupWidth) { this.popover.right = 0; } }).exec(); setTimeout(() => { this.popup = !this.popup; if (!this.isPhone && this.isRange && this.isFirstShow) { this.isFirstShow = false; const { startDate, endDate } = this.range; if (startDate && endDate) { if (this.diffDate(startDate, endDate) < 30) { this.$refs.right.next(); } } else { this.$refs.right.next(); this.$refs.right.cale.lastHover = false; } } }, 50); }, close() { setTimeout(() => { this.popup = false; this.$emit("maskClick", this.value); }, 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.formItem && this.formItem.setValue(value); this.$emit("change", value); this.$emit("input", value); this.$emit("update:modelValue", value); this.isEmitValue = true; }, createTimestamp(date2) { date2 = this.fixIosDateFormat(date2); return Date.parse(new Date(date2)); }, singleChange(e2) { this.tempSingleDate = e2.fulldate; if (this.hasTime) return; this.confirmSingleChange(); }, confirmSingleChange() { if (!this.tempSingleDate) { this.popup = false; return; } if (this.hasTime) { this.singleVal = this.tempSingleDate + " " + (this.time ? this.time : "00:00:00"); } else { this.singleVal = this.tempSingleDate; } this.setEmit(this.singleVal); this.popup = 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); }, 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); }, mobileChange(e2) { if (this.isRange) { const { before, after } = e2.range; 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.singleVal = e2.fulldate + " " + e2.time; } else { this.singleVal = e2.fulldate; } this.setEmit(this.singleVal); } 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.popup = false; return; } let start, end; if (!this.hasTime) { start = this.range.startDate = this.tempRange.startDate; end = this.range.endDate = this.tempRange.endDate; } else { start = this.range.startDate = this.tempRange.startDate + " " + (this.tempRange.startTime ? this.tempRange.startTime : "00:00:00"); end = this.range.endDate = this.tempRange.endDate + " " + (this.tempRange.endTime ? this.tempRange.endTime : "00:00:00"); } const displayRange = [start, end]; this.setEmit(displayRange); this.popup = false; }, handleStartAndEnd(before, after, temp = false) { if (!(before && after)) return; const type = temp ? "tempRange" : "range"; if (this.dateCompare(before, after)) { this[type].startDate = before; this[type].endDate = after; } else { this[type].startDate = after; this[type].endDate = before; } }, /** * 比较时间大小 */ dateCompare(startDate, endDate) { startDate = new Date(startDate.replace("-", "/").replace("-", "/")); endDate = new Date(endDate.replace("-", "/").replace("-", "/")); if (startDate <= endDate) { return true; } else { return false; } }, /** * 比较时间差 */ 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.singleVal = ""; this.tempSingleDate = ""; this.time = ""; if (this.isPhone) { this.$refs.mobile && this.$refs.mobile.clearCalender(); } else { this.$refs.pcSingle && this.$refs.pcSingle.clearCalender(); } if (needEmit) { this.formItem && this.formItem.setValue(""); this.$emit("change", ""); this.$emit("input", ""); this.$emit("update:modelValue", ""); } } else { this.range.startDate = ""; this.range.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.next(); } if (needEmit) { this.formItem && this.formItem.setValue([]); this.$emit("change", []); this.$emit("input", []); this.$emit("update:modelValue", []); } } }, parseDate(date2) { date2 = this.fixIosDateFormat(date2); const defVal = new Date(date2); const year = defVal.getFullYear(); const month = defVal.getMonth() + 1; const day = defVal.getDate(); const hour = defVal.getHours(); const minute = defVal.getMinutes(); const second = defVal.getSeconds(); const defDate = year + "-" + this.lessTen(month) + "-" + this.lessTen(day); const defTime = this.lessTen(hour) + ":" + this.lessTen(minute) + (this.hideSecond ? "" : ":" + this.lessTen(second)); return { defDate, defTime }; }, lessTen(item) { return item < 10 ? "0" + item : item; }, //兼容 iOS、safari 日期格式 fixIosDateFormat(value) { if (typeof value === "string") { value = value.replace(/-/g, "/"); } return value; }, leftMonthSwitch(e2) { }, rightMonthSwitch(e2) { } } }; function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); 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[4] || (_cache[4] = (...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, { type: "calendar", color: "#e1e1e1", size: "22" }), vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__x-input", type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.singleVal = $event), placeholder: $options.singlePlaceholderText, disabled: true }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.singleVal] ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-date-x uni-date-range" }, [ vue.createVNode(_component_uni_icons, { type: "calendar", color: "#e1e1e1", size: "22" }), vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__x-input t-c", type: "text", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.range.startDate = $event), placeholder: $options.startPlaceholderText, disabled: true }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.range.startDate] ]), vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString($props.rangeSeparator), 1 /* TEXT */ ) ], true), vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__x-input t-c", type: "text", "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.range.endDate = $event), placeholder: $options.endPlaceholderText, disabled: true }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.range.endDate] ]) ])), $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "uni-date__icon-clear", onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"])) }, [ vue.createVNode(_component_uni_icons, { type: "clear", color: "#e1e1e1", size: "18" }) ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ) ], true) ]), vue.withDirectives(vue.createElementVNode( "view", { class: "uni-date-mask", onClick: _cache[5] || (_cache[5] = (...args) => $options.close && $options.close(...args)) }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.popup] ]), !$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.popover) }, [ 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 t-c", type: "text", "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.tempSingleDate = $event), placeholder: $options.selectDateText }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.tempSingleDate] ]), vue.createVNode(_component_time_picker, { type: "time", modelValue: $data.time, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.time = $event), border: false, disabled: !$data.tempSingleDate, start: $options.reactStartTime, end: $options.reactEndTime, hideSecond: $props.hideSecond, style: { "width": "100%" } }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-date__input t-c", type: "text", "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.time = $event), placeholder: $options.selectTimeText, disabled: !$data.tempSingleDate }, null, 8, ["placeholder", "disabled"]), [ [vue.vModelText, $data.time] ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_calendar, { ref: "pcSingle", showMonth: false, "start-date": $data.caleRange.startDate, "end-date": $data.caleRange.endDate, date: $data.defSingleDate, onChange: $options.singleChange, style: { "padding": "0 8px" } }, null, 8, ["start-date", "end-date", "date", "onChange"]), $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "popup-x-footer" }, [ vue.createCommentVNode(' 此刻 '), vue.createElementVNode( "text", { class: "confirm", onClick: _cache[9] || (_cache[9] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args)) }, vue.toDisplayString($options.okText), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "uni-date-popper__arrow" }) ], 4 /* STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "uni-date-range--x", style: vue.normalizeStyle($data.popover) }, [ 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[10] || (_cache[10] = ($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[12] || (_cache[12] = ($event) => $data.tempRange.startTime = $event), start: $options.reactStartTime, 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[11] || (_cache[11] = ($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[13] || (_cache[13] = ($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[15] || (_cache[15] = ($event) => $data.tempRange.endTime = $event), end: $options.reactEndTime, 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[14] || (_cache[14] = ($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.caleRange.startDate, "end-date": $data.caleRange.endDate, range: true, onChange: $options.leftChange, pleStatus: $data.endMultipleStatus, onFirstEnterCale: $options.updateRightCale, onMonthSwitch: $options.leftMonthSwitch, style: { "padding": "0 8px" } }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale", "onMonthSwitch"]), vue.createVNode(_component_calendar, { ref: "right", showMonth: false, "start-date": $data.caleRange.startDate, "end-date": $data.caleRange.endDate, range: true, onChange: $options.rightChange, pleStatus: $data.startMultipleStatus, onFirstEnterCale: $options.updateLeftCale, onMonthSwitch: $options.rightMonthSwitch, style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" } }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale", "onMonthSwitch"]) ]), $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "popup-x-footer" }, [ vue.createElementVNode( "text", { class: "", onClick: _cache[16] || (_cache[16] = (...args) => $options.clear && $options.clear(...args)) }, vue.toDisplayString($options.clearText), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "confirm", onClick: _cache[17] || (_cache[17] = (...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.popup] ]) : vue.createCommentVNode("v-if", true), vue.withDirectives(vue.createVNode(_component_calendar, { ref: "mobile", clearDate: false, date: $data.defSingleDate, defTime: $options.reactMobDefTime, "start-date": $data.caleRange.startDate, "end-date": $data.caleRange.endDate, selectableTimes: $options.mobSelectableTime, pleStatus: $data.endMultipleStatus, showMonth: false, range: $data.isRange, typeHasTime: $data.hasTime, insert: false, hideSecond: $props.hideSecond, onConfirm: $options.mobileChange }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "pleStatus", "range", "typeHasTime", "hideSecond", "onConfirm"]), [ [vue.vShow, $data.isPhone] ]) ]); } const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-9802168a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]); const _sfc_main$$ = { __name: "money", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "69f29528-headerBg": vue.unref(headerBg) })); const headerBg = sheep$1.$url.css("/static/img/shop/user/wallet_card_bg.png"); const state = vue.reactive({ showMoney: false, date: [], // 筛选的时间段 currentTab: 0, pagination: { list: [], total: 0, pageNo: 1, pageSize: 8 }, summary: { totalIncome: 0, totalExpense: 0 }, loadStatus: "", today: "" }); const tabMaps = [ { name: "全部", value: "" }, { name: "收入", value: "1" }, { name: "支出", value: "2" } ]; const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const dateFilterText = vue.computed(() => { if (state.date[0] === state.date[1]) { return state.date[0]; } else { return state.date.join("~"); } }); async function getLogList() { state.loadStatus = "loading"; const { data, code: code2 } = await PayWalletApi.getWalletTransactionPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize, type: tabMaps[state.currentTab].value, "createTime[0]": state.date[0] + " 00:00:00", "createTime[1]": state.date[1] + " 23:59:59" }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } async function getSummary() { const { data, code: code2 } = await PayWalletApi.getWalletTransactionSummary({ "createTime": [state.date[0] + " 00:00:00", state.date[1] + " 23:59:59"] }); if (code2 !== 0) { return; } state.summary = data; } onLoad(() => { state.today = dayjs().format("YYYY-MM-DD"); state.date = [state.today, state.today]; getLogList(); getSummary(); sheep$1.$store("user").getWallet(); }); function onChange(e2) { state.currentTab = e2.index; resetPagination(state.pagination); getLogList(); getSummary(); } function onChangeTime(e2) { state.date[0] = e2[0]; state.date[1] = e2[e2.length - 1]; resetPagination(state.pagination); getLogList(); getSummary(); } onReachBottom(() => { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); }); const __returned__ = { headerBg, state, tabMaps, userWallet, dateFilterText, getLogList, getSummary, onChange, onChangeTime, computed: vue.computed, reactive: vue.reactive, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, get sheep() { return sheep$1; }, get dayjs() { return dayjs; }, get _() { return _$1; }, get PayWalletApi() { return PayWalletApi; }, get fen2yuan() { return fen2yuan; }, get resetPagination() { return resetPagination; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$3); const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "wallet-wrap", title: "钱包" }, { default: vue.withCtx(() => [ vue.createCommentVNode(" 钱包卡片 "), vue.createElementVNode("view", { class: "header-box ss-flex ss-row-center ss-col-center" }, [ vue.createElementVNode("view", { class: "card-box ui-BG-Main ui-Shadow-Main" }, [ vue.createElementVNode("view", { class: "card-head ss-flex ss-col-center" }, [ vue.createElementVNode("view", { class: "card-title ss-m-r-10" }, "钱包余额(元)"), vue.createElementVNode( "view", { onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showMoney = !$setup.state.showMoney), class: vue.normalizeClass(["ss-eye-icon", $setup.state.showMoney ? "cicon-eye" : "cicon-eye-off"]) }, null, 2 /* CLASS */ ) ]), vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-col-center ss-m-t-64" }, [ vue.createElementVNode( "view", { class: "money-num" }, vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.userWallet.balance) : "*****"), 1 /* TEXT */ ), vue.createElementVNode("button", { class: "ss-reset-button topup-btn", onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/pay/recharge")) }, " 充值 ") ]) ]) ]), vue.createVNode(_component_su_sticky, null, { default: vue.withCtx(() => [ vue.createCommentVNode(" 统计 "), vue.createElementVNode("view", { class: "filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between" }, [ vue.createVNode(_component_uni_datetime_picker, { modelValue: $setup.state.data, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.data = $event), type: "daterange", onChange: $setup.onChangeTime, end: $setup.state.today }, { default: vue.withCtx(() => [ vue.createElementVNode("button", { class: "ss-reset-button date-btn" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.dateFilterText), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "cicon-drop-down ss-seldate-icon" }) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "end"]), vue.createElementVNode("view", { class: "total-box" }, [ vue.createElementVNode( "view", { class: "ss-m-b-10" }, "总收入¥" + vue.toDisplayString($setup.fen2yuan($setup.state.summary.totalIncome)), 1 /* TEXT */ ), vue.createElementVNode( "view", null, "总支出¥" + vue.toDisplayString($setup.fen2yuan($setup.state.summary.totalExpense)), 1 /* TEXT */ ) ]) ]), vue.createVNode(_component_su_tabs, { list: $setup.tabMaps, onChange: $setup.onChange, scrollable: false, current: $setup.state.currentTab }, null, 8, ["current"]) ]), _: 1 /* STABLE */ }), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, text: "暂无数据", icon: "/static/data-empty.png" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 钱包记录 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "wallet-list ss-flex border-bottom", key: item.id }, [ vue.createElementVNode("view", { class: "list-content" }, [ vue.createElementVNode("view", { class: "title-box ss-flex ss-row-between ss-m-b-20" }, [ vue.createElementVNode( "text", { class: "title ss-line-1" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "money" }, [ item.price >= 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "add" }, "+" + vue.toDisplayString($setup.fen2yuan(item.price)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "minus" }, vue.toDisplayString($setup.fen2yuan(item.price)), 1 /* TEXT */ )) ]) ]), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.createTime, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" } }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }); } const PagesUserWalletMoney = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-69f29528"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/money.vue"]]); const _sfc_main$_ = { __name: "ScoreLog", props: { isFreeze: { type: String, default: "" } }, setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const props = __props; const state = vue.reactive({ currentTab: 0, pagination: { list: [], total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "", showModel: false, showQueModel: false }); async function getLogList(isFreeze) { state.loadStatus = "loading"; let { code: code2, data } = await ScoreApi.getScoreApi({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize, isFreeze }); if (code2 !== 0) { return; } let list = _$1.concat(state.pagination.list, data.list); state.pagination.list = list; state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } const title = (item) => { let title2 = item.profitStatusName + ""; if (item.username) { title2 += "(" + item.username + ")"; } if ([3].includes(item.profitStatus) && props.isFreeze == "false" && item.ancestorQuotaAmount) { title2 += "(" + t$6("wallet.exceed_limit") + ":" + points2point(item.ancestorQuotaAmount) + ")"; } if ([22].includes(item.profitStatus) && props.isFreeze == "false" && item.accumulatedQuotaAmount) { title2 += "(" + t$6("wallet.exceed_limit") + ":" + points2point(item.accumulatedQuotaAmount) + ")"; } return title2; }; function onLoadMore(isFreeze) { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(props.isFreeze); } onReachBottom(() => { onLoadMore(); }); onLoad(() => { getLogList(props.isFreeze); }); const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, props, state, getLogList, title, onLoadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get points2point() { return points2point; }, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; }, get ScoreApi() { return ScoreApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 佣金确权 "), vue.createVNode(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: "", navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode( "scroll-view", { class: "list-box", "scroll-y": "true", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => { }, ["stop"])) }, [ $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "padding": "20rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-item ss-flex ss-col-center ss-row-between", key: item.id, style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString($setup.title(item)) + " ", 1 /* TEXT */ ), $props.isFreeze == "true" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "float": "right" }, class: vue.normalizeClass(["color-red", { "color-green": item.freezeAmount < 0 }]) }, vue.toDisplayString(item.freezeAmount > 0 ? "+" + $setup.points2point(item.freezeAmount) : $setup.points2point(item.freezeAmount)), 3 /* TEXT, CLASS */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: { "float": "right" }, class: vue.normalizeClass(["color-red", { "color-green": item.amount < 0 }]) }, vue.toDisplayString(item.amount > 0 ? "+" + $setup.points2point(item.amount) : $setup.points2point(item.amount)), 3 /* TEXT, CLASS */ )) ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ", 1 /* TEXT */ ), vue.createCommentVNode(" 冻结佣金 "), $props.isFreeze == "true" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "float": "right" } }, vue.toDisplayString($setup.t("wallet.balance")) + ":" + vue.toDisplayString($setup.points2point(item.afterFreezeAmount)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: { "float": "right" } }, vue.toDisplayString($setup.t("wallet.balance")) + ":" + vue.toDisplayString($setup.points2point(item.afterAmount)), 1 /* TEXT */ )) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无数据", paddingTop: "200", icon: "/static/data-empty.png" })), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: $setup.t("common.click_to_load_more") }, onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)), onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true)) }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesUserWalletScoreLog = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-ccce11dc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/ScoreLog.vue"]]); const _sfc_main$Z = { __name: "score", setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ currentTab: 0, pagination: { list: [], total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "", showModel: false }); function close() { state.showModel = false; } const pointsPercentage = vue.computed(() => { const currentQuota = parseFloat(points2point(userWallet.value.integralDO.accumulatedQuota + userWallet.value.integralDO.ancestorQuota)); const highQuotaTotal = parseFloat(points2point(userWallet.value.integralDO.highQuotaTotal)); const percentage = currentQuota / highQuotaTotal * 100; return Math.min(percentage, 100); }); const percentageColor = vue.computed(() => { if (pointsPercentage.value >= 90) { return "#fe0000"; } else if (pointsPercentage.value >= 75) { return "#d8b800"; } else { return "#0c912f"; } }); const circleStyle = vue.computed(() => { return { // background: `conic-gradient(${percentageColor.value} ${pointsPercentage.value}%, #ddd ${pointsPercentage.value}%)` background: percentageColor.value }; }); onLoad((options2) => { uni.$on("createWithDrawComplete", sheep$1.$store("user").getWallet); uni.$on("consumptionTransfersComplete", sheep$1.$store("user").getWallet); }); const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, close, pointsPercentage, percentageColor, circleStyle, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get points2point() { return points2point; }, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; }, get ScoreApi() { return ScoreApi; }, get ScoreLog() { return PagesUserWalletScoreLog; }, get richtext() { return PagesPublicRichtext; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_list_item = resolveEasycom(vue.resolveDynamicComponent("uni-list-item"), __easycom_0$i); const _component_uni_list = resolveEasycom(vue.resolveDynamicComponent("uni-list"), __easycom_1$6); const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: $setup.t("wallet.wallet"), navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "score-box bg-white ss-flex-col ss-row-center ss-col-center" }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-y-30 w-100" }, [ vue.createElementVNode("view", { class: "ss-flex", style: { "flex-direction": "column", "flex": "1", "border-right": "1px solid #f6f6f6" } }, [ vue.createElementVNode( "view", { class: "ss-m-b-10 circle value-box ss-flex ss-row-center", style: vue.normalizeStyle($setup.circleStyle) }, [ vue.createElementVNode( "view", null, vue.toDisplayString($setup.t("wallet.commission")), 1 /* TEXT */ ) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "ss-m-b-30 ss-font-40", style: vue.normalizeStyle({ color: $setup.percentageColor }) }, [ vue.createElementVNode( "text", { class: "all-title ss-m-r-8" }, vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.currentQuota)), 1 /* TEXT */ ) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "ss-flex" }, [ vue.createElementVNode("view", { class: "all-title ss-m-r-8" }, [ vue.createElementVNode( "button", { class: "btn ss-reset-button", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/withdraw")) }, vue.toDisplayString($setup.t("wallet.withdraw")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "all-title ss-m-r-8" }, [ vue.createElementVNode( "button", { class: "btn ss-reset-button", onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/scoreToConsumption")) }, vue.toDisplayString($setup.t("wallet.transfer_points")), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "ss-flex", style: { "flex-direction": "column", "flex": "1" } }, [ vue.createElementVNode("view", { class: "ss-m-b-10 circle value-box ss-flex ss-row-center", style: { "background": "#0c912f" } }, [ vue.createElementVNode( "view", null, vue.toDisplayString($setup.t("wallet.consumption_points")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "ss-m-b-30 ss-font-40", style: { "color": "#0c912f" } }, [ vue.createElementVNode( "text", { class: "all-title ss-m-r-8" }, vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.consumptionPoints)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "ss-flex" }, [ vue.createElementVNode("view", { class: "all-title ss-m-x-8" }, [ vue.createElementVNode( "button", { class: "btn ss-reset-button", onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/topupConsumptionPoints")) }, vue.toDisplayString($setup.t("wallet.recharge")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "all-title ss-m-x-8" }, [ vue.createElementVNode( "button", { class: "btn ss-reset-button", onClick: _cache[3] || (_cache[3] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/consumptionTransfers")) }, vue.toDisplayString($setup.t("wallet.points_transfer")), 1 /* TEXT */ ) ]) ]) ]) ]), vue.createCommentVNode(" 分割线 "), vue.createElementVNode("view", { style: { "width": "100%", "height": "20rpx", "background-color": "#ececec" } }), vue.createVNode(_component_uni_list, { border: false, class: "ss-p-t-10 ss-w-100" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_list_item, { clickable: "", onClick: _cache[4] || (_cache[4] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/maxScoreLog")), title: "当前可获得峰值", showArrow: "", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString($setup.t("wallet.current_peak") + $setup.points2point($setup.userWallet.integralDO.accumulatedQuota + $setup.userWallet.integralDO.ancestorQuota)) + "/" + vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.highQuotaTotal)), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(` `), vue.createVNode(_component_uni_list_item, { clickable: "", onClick: _cache[5] || (_cache[5] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/ScoreLog", { isFreeze: false })), title: "佣金记录", showArrow: "", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString($setup.t("wallet.commission_record")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_list_item, { clickable: "", onClick: _cache[6] || (_cache[6] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/consumptionLog")), title: "消费分记录", showArrow: "", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString($setup.t("wallet.points_record")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(` `), vue.createVNode(_component_uni_list_item, { clickable: "", onClick: _cache[7] || (_cache[7] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/withdrawalLog")), title: "提现记录", showArrow: "", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString($setup.t("wallet.withdrawal")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_list_item, { clickable: "", onClick: _cache[8] || (_cache[8] = ($event) => $setup.state.showModel = true), title: "佣金计算规则", border: false }, { body: vue.withCtx(() => [ vue.createElementVNode( "p", { style: { "width": "100%" } }, vue.toDisplayString($setup.t("wallet.commission_rules")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), vue.createCommentVNode(" 佣金计算规则 "), vue.createVNode(_component_su_popup, { show: $setup.state.showModel, type: "center", round: "10", isMaskClick: false, showClose: "", onClose: $setup.close }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "head-nav" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([$setup.state.navIndex == 0 ? "activite" : "", "ss-m-l-20"]), onClick: _cache[9] || (_cache[9] = ($event) => _ctx.checkIndex(0)) }, vue.toDisplayString($setup.t("wallet.commission_rules")), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("scroll-view", { class: "scroll-view_H", "scroll-y": "true" }, [ vue.createVNode($setup["richtext"], { title: "佣金计算规则", type: "tab" }) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserWalletScore = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-aa108703"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/score.vue"]]); const _sfc_main$Y = { __name: "consumptionLog", setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ currentTab: 0, pagination: { list: [], total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "", showModel: false, showQueModel: false }); async function getLogList() { state.loadStatus = "loading"; let { code: code2, data } = await ConsumptionApi.getConsumptionLog({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } let list = _$1.concat(state.pagination.list, data.list); state.pagination.list = list; state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } const title = (item) => { let title2 = item.profitStatusName + ""; if (item.username) { title2 += "(" + item.username + ")"; } return title2; }; function onLoadMore(isFreeze) { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); } onReachBottom(() => { onLoadMore(); }); onLoad(() => { getLogList(); }); const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, title, onLoadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get points2point() { return points2point; }, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; }, get ConsumptionApi() { return ConsumptionApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 消费分来源 "), vue.createVNode(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: "", navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode( "scroll-view", { class: "list-box", "scroll-y": "true", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => { }, ["stop"])) }, [ $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "padding": "20rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-item ss-flex ss-col-center ss-row-between", key: item.id, style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString(item.consumptionStatusName) + vue.toDisplayString([3, 4].includes(item.consumptionStatus) ? "(" + item.generateUserName + ")" : "") + " " + vue.toDisplayString(item.consumptionStatus === 1 ? "(" + $setup.t("wallet.balance") + ":" + $setup.points2point(item.practicalConsumptionPoints) + ")" : "") + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" }, class: vue.normalizeClass(["color-red", { "color-green": item.consumptionPoints < 0 }]) }, vue.toDisplayString(item.consumptionPoints > 0 ? "+" + $setup.points2point(item.consumptionPoints) : $setup.points2point(item.consumptionPoints)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" } }, vue.toDisplayString($setup.t("wallet.balance")) + ":" + vue.toDisplayString($setup.points2point(item.afterConsumptionPoints)), 1 /* TEXT */ ) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无数据", paddingTop: "200", icon: "/static/data-empty.png" })), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: $setup.t("common.click_to_load_more") }, onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)), onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true)) }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesUserWalletConsumptionLog = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-663b1435"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/consumptionLog.vue"]]); var md5$1 = { exports: {} }; (function(module) { (function($2) { function safeAdd(x, y2) { var lsw = (x & 65535) + (y2 & 65535); var msw = (x >> 16) + (y2 >> 16) + (lsw >> 16); return msw << 16 | lsw & 65535; } function bitRotateLeft(num, cnt) { return num << cnt | num >>> 32 - cnt; } function md5cmn(q2, a2, b2, x, s2, t2) { return safeAdd(bitRotateLeft(safeAdd(safeAdd(a2, q2), safeAdd(x, t2)), s2), b2); } function md5ff(a2, b2, c2, d2, x, s2, t2) { return md5cmn(b2 & c2 | ~b2 & d2, a2, b2, x, s2, t2); } function md5gg(a2, b2, c2, d2, x, s2, t2) { return md5cmn(b2 & d2 | c2 & ~d2, a2, b2, x, s2, t2); } function md5hh(a2, b2, c2, d2, x, s2, t2) { return md5cmn(b2 ^ c2 ^ d2, a2, b2, x, s2, t2); } function md5ii(a2, b2, c2, d2, x, s2, t2) { return md5cmn(c2 ^ (b2 | ~d2), a2, b2, x, s2, t2); } function binlMD5(x, len) { x[len >> 5] |= 128 << len % 32; x[(len + 64 >>> 9 << 4) + 14] = len; var i2; var olda; var oldb; var oldc; var oldd; var a2 = 1732584193; var b2 = -271733879; var c2 = -1732584194; var d2 = 271733878; for (i2 = 0; i2 < x.length; i2 += 16) { olda = a2; oldb = b2; oldc = c2; oldd = d2; a2 = md5ff(a2, b2, c2, d2, x[i2], 7, -680876936); d2 = md5ff(d2, a2, b2, c2, x[i2 + 1], 12, -389564586); c2 = md5ff(c2, d2, a2, b2, x[i2 + 2], 17, 606105819); b2 = md5ff(b2, c2, d2, a2, x[i2 + 3], 22, -1044525330); a2 = md5ff(a2, b2, c2, d2, x[i2 + 4], 7, -176418897); d2 = md5ff(d2, a2, b2, c2, x[i2 + 5], 12, 1200080426); c2 = md5ff(c2, d2, a2, b2, x[i2 + 6], 17, -1473231341); b2 = md5ff(b2, c2, d2, a2, x[i2 + 7], 22, -45705983); a2 = md5ff(a2, b2, c2, d2, x[i2 + 8], 7, 1770035416); d2 = md5ff(d2, a2, b2, c2, x[i2 + 9], 12, -1958414417); c2 = md5ff(c2, d2, a2, b2, x[i2 + 10], 17, -42063); b2 = md5ff(b2, c2, d2, a2, x[i2 + 11], 22, -1990404162); a2 = md5ff(a2, b2, c2, d2, x[i2 + 12], 7, 1804603682); d2 = md5ff(d2, a2, b2, c2, x[i2 + 13], 12, -40341101); c2 = md5ff(c2, d2, a2, b2, x[i2 + 14], 17, -1502002290); b2 = md5ff(b2, c2, d2, a2, x[i2 + 15], 22, 1236535329); a2 = md5gg(a2, b2, c2, d2, x[i2 + 1], 5, -165796510); d2 = md5gg(d2, a2, b2, c2, x[i2 + 6], 9, -1069501632); c2 = md5gg(c2, d2, a2, b2, x[i2 + 11], 14, 643717713); b2 = md5gg(b2, c2, d2, a2, x[i2], 20, -373897302); a2 = md5gg(a2, b2, c2, d2, x[i2 + 5], 5, -701558691); d2 = md5gg(d2, a2, b2, c2, x[i2 + 10], 9, 38016083); c2 = md5gg(c2, d2, a2, b2, x[i2 + 15], 14, -660478335); b2 = md5gg(b2, c2, d2, a2, x[i2 + 4], 20, -405537848); a2 = md5gg(a2, b2, c2, d2, x[i2 + 9], 5, 568446438); d2 = md5gg(d2, a2, b2, c2, x[i2 + 14], 9, -1019803690); c2 = md5gg(c2, d2, a2, b2, x[i2 + 3], 14, -187363961); b2 = md5gg(b2, c2, d2, a2, x[i2 + 8], 20, 1163531501); a2 = md5gg(a2, b2, c2, d2, x[i2 + 13], 5, -1444681467); d2 = md5gg(d2, a2, b2, c2, x[i2 + 2], 9, -51403784); c2 = md5gg(c2, d2, a2, b2, x[i2 + 7], 14, 1735328473); b2 = md5gg(b2, c2, d2, a2, x[i2 + 12], 20, -1926607734); a2 = md5hh(a2, b2, c2, d2, x[i2 + 5], 4, -378558); d2 = md5hh(d2, a2, b2, c2, x[i2 + 8], 11, -2022574463); c2 = md5hh(c2, d2, a2, b2, x[i2 + 11], 16, 1839030562); b2 = md5hh(b2, c2, d2, a2, x[i2 + 14], 23, -35309556); a2 = md5hh(a2, b2, c2, d2, x[i2 + 1], 4, -1530992060); d2 = md5hh(d2, a2, b2, c2, x[i2 + 4], 11, 1272893353); c2 = md5hh(c2, d2, a2, b2, x[i2 + 7], 16, -155497632); b2 = md5hh(b2, c2, d2, a2, x[i2 + 10], 23, -1094730640); a2 = md5hh(a2, b2, c2, d2, x[i2 + 13], 4, 681279174); d2 = md5hh(d2, a2, b2, c2, x[i2], 11, -358537222); c2 = md5hh(c2, d2, a2, b2, x[i2 + 3], 16, -722521979); b2 = md5hh(b2, c2, d2, a2, x[i2 + 6], 23, 76029189); a2 = md5hh(a2, b2, c2, d2, x[i2 + 9], 4, -640364487); d2 = md5hh(d2, a2, b2, c2, x[i2 + 12], 11, -421815835); c2 = md5hh(c2, d2, a2, b2, x[i2 + 15], 16, 530742520); b2 = md5hh(b2, c2, d2, a2, x[i2 + 2], 23, -995338651); a2 = md5ii(a2, b2, c2, d2, x[i2], 6, -198630844); d2 = md5ii(d2, a2, b2, c2, x[i2 + 7], 10, 1126891415); c2 = md5ii(c2, d2, a2, b2, x[i2 + 14], 15, -1416354905); b2 = md5ii(b2, c2, d2, a2, x[i2 + 5], 21, -57434055); a2 = md5ii(a2, b2, c2, d2, x[i2 + 12], 6, 1700485571); d2 = md5ii(d2, a2, b2, c2, x[i2 + 3], 10, -1894986606); c2 = md5ii(c2, d2, a2, b2, x[i2 + 10], 15, -1051523); b2 = md5ii(b2, c2, d2, a2, x[i2 + 1], 21, -2054922799); a2 = md5ii(a2, b2, c2, d2, x[i2 + 8], 6, 1873313359); d2 = md5ii(d2, a2, b2, c2, x[i2 + 15], 10, -30611744); c2 = md5ii(c2, d2, a2, b2, x[i2 + 6], 15, -1560198380); b2 = md5ii(b2, c2, d2, a2, x[i2 + 13], 21, 1309151649); a2 = md5ii(a2, b2, c2, d2, x[i2 + 4], 6, -145523070); d2 = md5ii(d2, a2, b2, c2, x[i2 + 11], 10, -1120210379); c2 = md5ii(c2, d2, a2, b2, x[i2 + 2], 15, 718787259); b2 = md5ii(b2, c2, d2, a2, x[i2 + 9], 21, -343485551); a2 = safeAdd(a2, olda); b2 = safeAdd(b2, oldb); c2 = safeAdd(c2, oldc); d2 = safeAdd(d2, oldd); } return [a2, b2, c2, d2]; } function binl2rstr(input) { var i2; var output = ""; var length32 = input.length * 32; for (i2 = 0; i2 < length32; i2 += 8) { output += String.fromCharCode(input[i2 >> 5] >>> i2 % 32 & 255); } return output; } function rstr2binl(input) { var i2; var output = []; output[(input.length >> 2) - 1] = void 0; for (i2 = 0; i2 < output.length; i2 += 1) { output[i2] = 0; } var length8 = input.length * 8; for (i2 = 0; i2 < length8; i2 += 8) { output[i2 >> 5] |= (input.charCodeAt(i2 / 8) & 255) << i2 % 32; } return output; } function rstrMD5(s2) { return binl2rstr(binlMD5(rstr2binl(s2), s2.length * 8)); } function rstrHMACMD5(key, data) { var i2; var bkey = rstr2binl(key); var ipad = []; var opad = []; var hash; ipad[15] = opad[15] = void 0; if (bkey.length > 16) { bkey = binlMD5(bkey, key.length * 8); } for (i2 = 0; i2 < 16; i2 += 1) { ipad[i2] = bkey[i2] ^ 909522486; opad[i2] = bkey[i2] ^ 1549556828; } hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8); return binl2rstr(binlMD5(opad.concat(hash), 512 + 128)); } function rstr2hex(input) { var hexTab = "0123456789abcdef"; var output = ""; var x; var i2; for (i2 = 0; i2 < input.length; i2 += 1) { x = input.charCodeAt(i2); output += hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15); } return output; } function str2rstrUTF8(input) { return unescape(encodeURIComponent(input)); } function rawMD5(s2) { return rstrMD5(str2rstrUTF8(s2)); } function hexMD5(s2) { return rstr2hex(rawMD5(s2)); } function rawHMACMD5(k, d2) { return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d2)); } function hexHMACMD5(k, d2) { return rstr2hex(rawHMACMD5(k, d2)); } function md52(string, key, raw) { if (!key) { if (!raw) { return hexMD5(string); } return rawMD5(string); } if (!raw) { return hexHMACMD5(key, string); } return rawHMACMD5(key, string); } if (module.exports) { module.exports = md52; } else { $2.md5 = md52; } })(commonjsGlobal); })(md5$1); var md5Exports = md5$1.exports; const md5 = /* @__PURE__ */ getDefaultExportFromCjs(md5Exports); const _sfc_main$X = { __name: "topupConsumptionPoints", setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const state = vue.reactive({ model: {}, payPrice: void 0, percentage: { consumptionMagnification: 0, userTopUpConsumptionPoints: 0, triggerMagnificationPoints: 0 } }); const consumption = vue.computed(() => { if (!state.payPrice) { return 0; } let result2; if (state.payPrice >= parseFloat(state.percentage.triggerMagnificationPoints)) { result2 = (parseFloat(state.percentage.consumptionMagnification) * state.payPrice).toFixed(2); } else { result2 = state.payPrice; } return result2; }); async function validateInput(value) { const strPoints = value.toString(); const [integerPart, decimalPart] = strPoints.split("."); if (decimalPart) { vue.nextTick(() => { }); } } const submit = async () => { if (!state.payPrice) { sheep$1.$helper.toast(t$6("wallet.enter_recharge_amount")); return; } if (parseFloat(state.payPrice) < state.percentage.userTopUpConsumptionPoints) { sheep$1.$helper.toast(t$6("wallet.recharge_amount_less_than", { point: state.percentage.userTopUpConsumptionPoints })); return; } let { code: code2, data } = await PayWalletApi.topupConsumptionPointsCreate({ payPrice: state.payPrice, topUpConsumptionPoints: state.payPrice, userName: userInfo2.value.username }); if (code2 === 0) { sheep$1.$router.redirect("/pages/pay/index", { id: data.payOrderId, type: 2 }); } }; const getpercentage = async () => { const { code: code2, data } = await WithdrawalApi.getWithdrawalPercentage(); if (code2 === 0) { state.percentage = data; } }; onLoad(async (options2) => { await getpercentage(); }); const __returned__ = { userWallet, userInfo: userInfo2, state, consumption, validateInput, submit, getpercentage, computed: vue.computed, reactive: vue.reactive, watchEffect: vue.watchEffect, nextTick: vue.nextTick, onUnmounted: vue.onUnmounted, get onLoad() { return onLoad; }, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; }, get fen2yuan() { return fen2yuan; }, get points2point() { return points2point; }, get md5() { return md5; }, get PayWalletApi() { return PayWalletApi; }, get WithdrawalApi() { return WithdrawalApi; }, get showAuthModal() { return showAuthModal; }, get showShareModal() { return showShareModal; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("wallet.points_recharge") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white ss-modal-box ss-flex-col" }, [ vue.createCommentVNode(" 提现金额 "), vue.createElementVNode("view", { class: "modal-content ss-m-t-30" }, [ vue.createVNode(_component_uni_forms, { model: $setup.state.model, rules: $setup.state.rules, validateTrigger: "bind", labelPosition: "left", border: "", class: "form-box", labelWidth: "200", ref: "FormRef" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "quota", label: $setup.t("wallet.recharge_amount"), required: true }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.payPrice, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.payPrice = $event), type: "number", placeholder: $setup.t("wallet.enter_recharge_amount"), inputBorder: false, clearable: false, onInput: $setup.validateInput, maxlength: 9 }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "quota", label: $setup.t("wallet.actual_points_received") }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "ss-flex ss-h-100" }, vue.toDisplayString($setup.consumption), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createElementVNode( "view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30 text-red text-center" }, vue.toDisplayString($setup.t("wallet.note_recharge_bonus", { amount: $setup.state.percentage.triggerMagnificationPoints, multiplier: parseFloat($setup.state.percentage.consumptionMagnification) })), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "modal-footer ss-flex ss-row-center ss-col-center ss-m-t-80 ss-m-b-40 ss-flex-5" }, [ vue.createElementVNode( "button", { class: "ss-reset-button save-btn", onClick: $setup.submit }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserWalletTopupConsumptionPoints = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-b526252b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/topupConsumptionPoints.vue"]]); const _sfc_main$W = { __name: "consumptionTransfersLog", setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ currentTab: 0, pagination: { list: [], total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "", showModel: false, showQueModel: false }); async function getLogList() { state.loadStatus = "loading"; let { code: code2, data } = await ConsumptionApi.getConsumptionTransfersLog({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } let list = _$1.concat(state.pagination.list, data.list); state.pagination.list = list; state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } const currentUserId = userWallet.value.integralDO.userId; const formatChangeValue = (item) => { if (currentUserId === item.recipientUserId) { return points2point(item.recipientPoints); } else { return points2point(item.consumptionPoints); } }; const formatValue = (item) => { if (currentUserId === item.recipientUserId) { return points2point(item.afterRecipientConsumptionPoints); } else { return points2point(item.afterTransferConsumptionPoints); } }; function onLoadMore(isFreeze) { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); } onReachBottom(() => { onLoadMore(); }); onLoad(() => { getLogList(); }); const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, currentUserId, formatChangeValue, formatValue, onLoadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get points2point() { return points2point; }, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; }, get ConsumptionApi() { return ConsumptionApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 消费分转账 "), vue.createVNode(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: "", navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode( "scroll-view", { class: "list-box", "scroll-y": "true", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => { }, ["stop"])) }, [ $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "padding": "20rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-item ss-flex ss-col-center ss-row-between", key: item.id, style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString(item.transferUserName + " > " + item.recipientUserName) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" }, class: vue.normalizeClass(["color-red", { "color-green": $setup.formatChangeValue(item) < 0 }]) }, vue.toDisplayString($setup.formatChangeValue(item)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" } }, "余额:" + vue.toDisplayString($setup.formatValue(item)), 1 /* TEXT */ ) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无数据", paddingTop: "200", icon: "/static/data-empty.png" })), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: "点击加载更多" }, onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)), onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true)) }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesUserWalletConsumptionTransfersLog = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-3ab7db52"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/consumptionTransfersLog.vue"]]); const _sfc_main$V = { __name: "consumptionTransfers", setup(__props, { expose: __expose }) { __expose(); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const state = vue.reactive({ verifyUsername: true, verifyMobile: true, usernameErrorMsg: "", mobileErrorMsg: "", model: { recipientUserName: void 0, recipientUserId: void 0, recipientUserPhone: void 0, consumptionPoints: void 0, smsCodeUseReqDTO: { mobile: void 0, scene: 11, code: void 0 } }, rules: { recipientUserName: { rules: [{ required: true, errorMessage: t$6("wallet.recipient_cannot_be_empty") }] }, recipientUserPhone: { rules: [{ required: true, errorMessage: t$6("wallet.recipient_phone_cannot_be_empty") }] }, "smsCodeUseReqDTO.code": { rules: [{ required: true, errorMessage: t$6("wallet.verification_code_cannot_be_empty") }] }, consumptionPoints: { rules: [ { required: true, errorMessage: t$6("wallet.transfer_amount_cannot_be_empty") }, { validateFunction: function(rule, value, data, callback) { if (value <= 0) { callback(t$6("wallet.transfer_amount_less_than_zero")); } return true; } } ] } } }); const canUseConsumptionPoints = vue.computed(() => points2point(userWallet.value.integralDO.consumptionPoints)); let lastUsername = vue.ref(""); async function verifyUsername(e2) { const username2 = e2.detail.value; if (username2 == lastUsername.value) return; if (username2 == "") { state.verifyUsername = true; return false; } else if (username2 === userInfo2.value.username) { state.usernameErrorMsg = t$6("wallet.recipient_cannot_be_self"); return false; } lastUsername.value = username2; const { data } = await AuthUtil.verifyUsername(username2); if (data) { state.usernameErrorMsg = t$6("wallet.user_does_not_exist"); } else { state.usernameErrorMsg = ""; } state.verifyUsername = data; } async function verifyPhone(e2) { const phone = e2.detail.value; if (phone == "" || !state.model.recipientUserName) { state.verifyMobile = true; return false; } const { data } = await AuthUtil.verifyPhone(state.model.recipientUserName, phone); if (!data || data.mobile !== phone) { state.mobileErrorMsg = t$6("wallet.username_phone_mismatch"); state.verifyMobile = true; } else { state.mobileErrorMsg = ""; state.model.recipientUserId = data.id; state.verifyMobile = false; } } async function validateInput(value) { const intValue = parseInt(value); const strPoints = value.toString(); const [integerPart, decimalPart] = strPoints.split("."); if (decimalPart) { parseFloat(`${integerPart}.${decimalPart.slice(0, 2)}`); vue.nextTick(() => { state.model.consumptionPoints = integerPart; }); } if (intValue > parseInt(canUseConsumptionPoints.value)) { vue.nextTick(() => { state.model.consumptionPoints = parseInt(canUseConsumptionPoints.value); }); } else { vue.nextTick(() => { state.model.consumptionPoints = intValue; }); } } const FormRef = vue.ref(null); const onSubmit = async () => { if (state.model.recipientUserName === userInfo2.value.username) { uni.showToast({ title: t$6("wallet.cannot_transfer_to_self"), icon: "none", duration: 2e3 }); return; } else if (state.verifyUsername) { return; } else if (state.verifyMobile) { return; } const validate = await vue.unref(FormRef).validate().catch((error2) => { formatAppLog("log", "at pages/user/wallet/consumptionTransfers.vue:259", "error: ", error2); }); if (!validate) { return; } const { data, code: code2 } = await ConsumptionApi.createConsumptionLog(state.model); if (code2 === 0) { showWalletModal({ msg: t$6("wallet.transfer_successful") }); uni.$emit("consumptionTransfersComplete"); sheep$1.$router.redirect("/pages/user/wallet/score"); } }; const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); vue.watch( () => isLogin.value, (newVal) => { if (newVal) { window.location.reload(); } }, { deep: true // 深度监听 } ); onLoad(async (options2) => { if (!isLogin.value) { showAuthModal(); } state.model.smsCodeUseReqDTO.mobile = userInfo2.value.mobile; }); const __returned__ = { userInfo: userInfo2, userWallet, state, canUseConsumptionPoints, get lastUsername() { return lastUsername; }, set lastUsername(v2) { lastUsername = v2; }, verifyUsername, verifyPhone, validateInput, FormRef, onSubmit, isLogin, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, unref: vue.unref, watch: vue.watch, nextTick: vue.nextTick, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; }, get onLoad() { return onLoad; }, get points2point() { return points2point; }, get email() { return email; }, get AuthUtil() { return AuthUtil; }, get ConsumptionApi() { return ConsumptionApi; }, get showAuthModal() { return showAuthModal; }, get closeAuthModal() { return closeAuthModal; }, get getSmsCode() { return getSmsCode; }, get getSmsTimer() { return getSmsTimer; }, get showWalletModal() { return showWalletModal; }, get colseWalletModal() { return colseWalletModal; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "set-wrap", title: $setup.t("wallet.points_transfer"), bgStyle: { color: "#FFF" } }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms, { model: $setup.state.model, rules: $setup.state.rules, validateTrigger: "bind", labelPosition: "left", border: "", class: "form-box", labelWidth: "200", ref: "FormRef" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "recipientUserName", label: $setup.t("wallet.recipient"), required: true, "error-message": $setup.state.usernameErrorMsg }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.recipientUserName, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.recipientUserName = $event), type: "recipientUserName", placeholder: $setup.t("wallet.enter_recipient_username"), inputBorder: false, clearable: false, onBlur: $setup.verifyUsername }, { right: vue.withCtx(() => [ $setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "icon" }, [ vue.createElementVNode("image", { style: "", src: $setup.sheep.$url.static("/static/images/shibai.png") }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "icon" }, [ vue.createElementVNode("image", { src: $setup.sheep.$url.static("/static/images/chenggong.png") }, null, 8, ["src"]) ])) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label", "error-message"]), vue.createVNode(_component_uni_forms_item, { name: "recipientUserPhone", label: $setup.t("wallet.recipient_phone"), required: true, "error-message": $setup.state.mobileErrorMsg }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.recipientUserPhone, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.recipientUserPhone = $event), type: "number", placeholder: $setup.t("wallet.enter_recipient_phone"), inputBorder: false, clearable: false, onBlur: $setup.verifyPhone }, { right: vue.withCtx(() => [ $setup.state.verifyMobile ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "icon" }, [ vue.createElementVNode("image", { style: "", src: $setup.sheep.$url.static("/static/images/shibai.png") }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "icon" }, [ vue.createElementVNode("image", { src: $setup.sheep.$url.static("/static/images/chenggong.png") }, null, 8, ["src"]) ])) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label", "error-message"]), vue.createVNode(_component_uni_forms_item, { name: "mobile", label: $setup.t("account.phone_number"), class: "mobile loginUniFormItem ss-p-t-10" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.smsCodeUseReqDTO.mobile, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.smsCodeUseReqDTO.mobile = $event), type: "smsCodeUseReqDTO", placeholder: $setup.t("account.enter_phone_number"), inputBorder: false, clearable: false, disabled: true }, { right: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "disabled": $setup.verifyUsername == true || $setup.state.verifyMobile == true }]), disabled: $setup.verifyUsername == true || $setup.state.verifyMobile == true, onClick: _cache[2] || (_cache[2] = ($event) => $setup.getSmsCode("consumptionTransfers", $setup.state.model.smsCodeUseReqDTO.mobile)) }, vue.toDisplayString($setup.getSmsTimer("consumptionTransfers")), 11, ["disabled"]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "smsCodeUseReqDTO.code", label: $setup.t("account.verification_code"), required: true }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.smsCodeUseReqDTO.code, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.smsCodeUseReqDTO.code = $event), type: "number", placeholder: $setup.t("account.enter_verification_code"), inputBorder: false, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "consumptionPoints", label: $setup.t("wallet.transfer_amount"), required: true }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.consumptionPoints, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.consumptionPoints = $event), type: "number", placeholder: $setup.t("wallet.enter_transfer_amount"), inputBorder: false, clearable: false, onInput: $setup.validateInput }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("wallet.current_transferable_amount")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text-red" }, vue.toDisplayString($setup.canUseConsumptionPoints), 1 /* TEXT */ ), vue.createCommentVNode(` `) ]), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "", bg: "none" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-p-20 ss-flex" }, [ vue.createElementVNode( "button", { class: "ss-rest-button btn", onClick: $setup.onSubmit }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserWalletConsumptionTransfers = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-889a76b8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/consumptionTransfers.vue"]]); const _sfc_main$U = { __name: "scoreToConsumption", setup(__props, { expose: __expose }) { __expose(); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const state = vue.reactive({ model: { quota: void 0 }, rules: { quota: { rules: [ { required: true, errorMessage: t$6("wallet.transfer_amount_cannot_be_empty") }, { validateFunction: function(rule, value, data, callback) { if (value <= 0) { callback(t$6("wallet.transfer_amount_cannot_be_zero")); } return true; } } ] } } }); const currentQuota = vue.computed(() => points2point(userWallet.value.integralDO.currentQuota)); async function validateInput(value) { const intValue = parseInt(value); const strPoints = value.toString(); const [integerPart, decimalPart] = strPoints.split("."); if (decimalPart) { vue.nextTick(() => { state.model.quota = integerPart; }); } if (intValue > parseInt(currentQuota.value)) { vue.nextTick(() => { state.model.quota = parseInt(currentQuota.value); }); } else { vue.nextTick(() => { state.model.quota = intValue; }); } } const FormRef = vue.ref(null); const onSubmit = async () => { const validate = await vue.unref(FormRef).validate().catch((error2) => { formatAppLog("log", "at pages/user/wallet/scoreToConsumption.vue:116", "error: ", error2); }); if (!validate) { return; } uni.showModal({ title: t$6("setting.prompt"), content: t$6("wallet.commission_to_points_irreversible"), success: async function(res) { if (!res.confirm) { return; } const { data, code: code2 } = await ConsumptionApi.quotaTransition(state.model.quota); if (code2 === 0) { uni.showToast({ title: t$6("wallet.conversion_successful"), icon: "none", duration: 2e3 }); uni.$emit("consumptionTransfersComplete"); sheep$1.$router.redirect("/pages/user/wallet/score"); } } }); }; const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); vue.watch( () => isLogin.value, (newVal) => { if (newVal) { window.location.reload(); } }, { deep: true // 深度监听 } ); onLoad(async (options2) => { if (!isLogin.value) { showAuthModal(); } }); const __returned__ = { userInfo: userInfo2, userWallet, state, currentQuota, validateInput, FormRef, onSubmit, isLogin, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, unref: vue.unref, watch: vue.watch, nextTick: vue.nextTick, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; }, get onLoad() { return onLoad; }, get points2point() { return points2point; }, get email() { return email; }, get AuthUtil() { return AuthUtil; }, get ConsumptionApi() { return ConsumptionApi; }, get showAuthModal() { return showAuthModal; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "set-wrap", title: $setup.t("wallet.commission_to_points"), bgStyle: { color: "#FFF" } }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_forms, { model: $setup.state.model, rules: $setup.state.rules, validateTrigger: "bind", labelPosition: "left", border: "", class: "form-box", labelWidth: "200", ref: "FormRef" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "quota", label: $setup.t("wallet.consumption_points"), required: true }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.quota, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.quota = $event), type: "number", placeholder: $setup.t("wallet.enter_transfer_amount"), inputBorder: false, clearable: false, onInput: $setup.validateInput }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("wallet.current_commission_available")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text-red" }, vue.toDisplayString($setup.currentQuota), 1 /* TEXT */ ), vue.createCommentVNode(' ') ]), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "", bg: "none" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-p-20 ss-flex" }, [ vue.createElementVNode( "button", { class: "ss-rest-button btn", onClick: $setup.onSubmit }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserWalletScoreToConsumption = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-27522d6e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/scoreToConsumption.vue"]]); const _sfc_main$T = { __name: "withdraw", setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const canUseMoney = vue.computed(() => points2point(userWallet.value.integralDO.currentQuota)); const alipayAccount2 = (account2) => { if (!account2) { return false; } if (/^\d{11}$/.test(account2)) { return `${account2.substring(0, 3)}****${account2.substring(7)}`; } else if (/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(account2)) { const atIndex = account2.indexOf("@"); if (atIndex <= 3) { return account2; } const username2 = account2.substring(0, Math.ceil(atIndex / 2)); const domain = account2.substring(atIndex); return `${username2}***${domain}`; } }; const bankAccount2 = (account2) => { if (!account2) { return false; } if (account2.length === 8) { return account2.substring(0, 2) + "********" + account2.substr(-2); } else { return account2.substring(0, 4) + "******" + account2.substr(-4); } }; const state = vue.reactive({ model: {}, orderType: "goods", // 订单类型; goods - 商品订单, recharge - 充值订单 outMent: "", outMoney: void 0, disabled: true, withdrawalPercentage: { withdrawCommission: 0, withdrawConsumption: 0 }, outMethods: [ // { // title: t('wallet.withdraw_to_wechat'), // value: '1' // }, { title: t$6("wallet.withdraw_to_alipay"), value: "2", account: "" }, { title: t$6("wallet.withdraw_to_bank_card"), value: "3", account: "" } ] }); const withdrawCommission = vue.computed(() => { return state.withdrawalPercentage.withdrawCommission * 100 + "%"; }); const withdrawConsumption = vue.computed(() => { return state.withdrawalPercentage.withdrawConsumption * 100 + "%"; }); const commission = vue.computed(() => { if (!state.outMoney) { return 0; } let result2 = parseFloat(state.withdrawalPercentage.withdrawCommission) * state.outMoney; result2 = Math.floor(result2 * 100) / 100; return result2; }); const consumption = vue.computed(() => { if (!state.outMoney) { return 0; } let result2 = parseFloat(state.withdrawalPercentage.withdrawConsumption) * state.outMoney; result2 = Math.floor(result2 * 100) / 100; return result2; }); const handleBind = async (type) => { if (type === "2") { showAuthModal("alipayAccount"); } else if (type === "3") { showAuthModal("bankAccount"); } }; const submit = async () => { if (state.outMent === "") { sheep$1.$helper.toast(t$6("wallet.please_select_withdrawal_method")); return; } if (!state.outMoney) { sheep$1.$helper.toast(t$6("wallet.enter_withdrawal_amount")); return; } if (state.outMent === "2" && !userInfo2.value.alipayAccount) { uni.showModal({ title: t$6("setting.prompt"), content: t$6("wallet.alipay_not_bound"), confirmText: t$6("wallet.go_bind"), success: async function(res) { if (!res.confirm) { return; } showAuthModal("alipayAccount"); } }); return; } if (state.outMent === "3" && !userInfo2.value.bankAccount) { uni.showModal({ title: t$6("setting.prompt"), content: t$6("wallet.bank_card_not_bound"), confirmText: t$6("wallet.go_bind"), success: async function(res) { if (!res.confirm) { return; } showAuthModal("bankAccount"); } }); return; } let { code: code2, data } = await PayWalletApi.createWithdrawal({ amountTotal: state.outMoney, withdrawalType: state.outMent }); if (code2 === 0) { uni.showToast({ icon: "success", title: t$6("wallet.application_successful") }); sheep$1.$router.redirect("/pages/user/wallet/withdrawalLog"); uni.$emit("createWithDrawComplete"); } }; function onTapOut(e2) { state.outMent = e2.detail.value; } async function useAllPonints() { const { code: code2, data } = await PayWalletApi.getDuserInfo(); const userCanUsePoints = parseFloat(points2point(data.integralDO.currentQuota)); state.outMoney = parseInt(userCanUsePoints); state.disable = false; } vue.watchEffect(() => { if (parseFloat(state.outMoney) > parseFloat(canUseMoney.value)) { vue.nextTick(() => { state.outMoney = parseInt(canUseMoney.value); }); } if (canUseMoney.value == 0 || canUseMoney.value < 0) { state.disabled = true; } if (canUseMoney.value > 0) { state.disabled = false; } }); const getUserInfo = async () => { const userInfo3 = await sheep$1.$store("user").getInfo(); state.model = lodashExports.clone(userInfo3); state.outMethods.forEach((item) => { if (item.value === "2") { item.account = alipayAccount2(state.model.alipayAccount); } else if (item.value === "3") { item.account = bankAccount2(state.model.bankAccount); } }); }; const getWithdrawalPercentage = async () => { const { code: code2, data } = await WithdrawalApi.getWithdrawalPercentage(); if (code2 === 0) { state.withdrawalPercentage = data; } }; onLoad(async (options2) => { await getUserInfo(); await getWithdrawalPercentage(); uni.$on("alipayAccountChangeComplete", getUserInfo); uni.$on("bankAccountChangeComplete", getUserInfo); }); const __returned__ = { userWallet, userInfo: userInfo2, canUseMoney, alipayAccount: alipayAccount2, bankAccount: bankAccount2, state, withdrawCommission, withdrawConsumption, commission, consumption, handleBind, submit, onTapOut, useAllPonints, getUserInfo, getWithdrawalPercentage, computed: vue.computed, reactive: vue.reactive, watchEffect: vue.watchEffect, nextTick: vue.nextTick, onUnmounted: vue.onUnmounted, get onLoad() { return onLoad; }, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; }, get fen2yuan() { return fen2yuan; }, get points2point() { return points2point; }, get md5() { return md5; }, get PayWalletApi() { return PayWalletApi; }, get WithdrawalApi() { return WithdrawalApi; }, get showAuthModal() { return showAuthModal; }, get showShareModal() { return showShareModal; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("wallet.withdraw") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white ss-modal-box ss-flex-col" }, [ vue.createCommentVNode(" 提现方式 "), vue.createElementVNode("view", { class: "modal-content" }, [ vue.createElementVNode( "view", { class: "out-title ss-p-l-30 ss-m-y-30" }, vue.toDisplayString($setup.t("wallet.select_withdrawal_method")), 1 /* TEXT */ ), vue.createElementVNode( "radio-group", { onChange: $setup.onTapOut }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.outMethods, (item) => { return vue.openBlock(), vue.createElementBlock("label", { class: "out-type-item", key: item.title }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["out-item ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom", { "disabled-out-item": item.disabled }]) }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ vue.createElementVNode("view", { class: "check-box ss-flex ss-col-center ss-p-l-10" }, [ vue.createElementVNode("radio", { value: item.value, color: "var(--ui-BG-Main)", style: { "transform": "scale(0.8)" }, disabled: item.disabled, checked: $setup.state.payment === item.value }, null, 8, ["value", "disabled", "checked"]) ]), vue.createElementVNode( "text", { class: "out-title" }, vue.toDisplayString(item.title), 1 /* TEXT */ ) ]), item.account ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "float": "right" } }, vue.toDisplayString(item.account), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, style: { "float": "right" }, onClick: ($event) => $setup.handleBind(item.value) }, vue.toDisplayString($setup.t("wallet.not_bound_click_to_bind")) + " >", 9, ["onClick"])) ], 2 /* CLASS */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]), vue.createCommentVNode(" 提现金额 "), vue.createElementVNode("view", { class: "modal-content ss-m-t-30" }, [ vue.createVNode(_component_uni_forms, { model: $setup.state.model, rules: $setup.state.rules, validateTrigger: "bind", labelPosition: "left", border: "", class: "form-box", labelWidth: "200", ref: "FormRef" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "quota", label: $setup.t("wallet.withdrawal_amount"), required: true }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.outMoney, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.outMoney = $event), type: "number", placeholder: $setup.t("wallet.enter_withdrawal_amount"), inputBorder: false, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "quota", label: $setup.t("wallet.actual_amount_received") }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "ss-flex ss-h-100" }, vue.toDisplayString($setup.commission), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "quota", label: $setup.t("wallet.consumption_points") }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "ss-flex ss-h-100" }, vue.toDisplayString($setup.consumption), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createCommentVNode(' 提现金额\n \n ¥\n \n '), vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("wallet.current_exchangeable_amount")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text-red" }, vue.toDisplayString($setup.canUseMoney), 1 /* TEXT */ ), vue.createElementVNode( "button", { class: "ss-m-l-10 all-btn", onClick: $setup.useAllPonints }, vue.toDisplayString($setup.t("common.all")), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30 text-red text-center" }, vue.toDisplayString($setup.t("wallet.note", { commission: $setup.withdrawCommission, consumption: $setup.withdrawConsumption })), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 工具 "), vue.createElementVNode("view", { class: "modal-footer ss-flex ss-row-center ss-col-center ss-m-t-80 ss-m-b-40 ss-flex-5" }, [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button save-btn", { "disabled-btn": $setup.state.disabled }]), onClick: $setup.submit, disabled: $setup.state.disabled }, vue.toDisplayString($setup.t("common.confirm")), 11, ["disabled"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesUserWalletWithdraw = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-2fe623b9"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/withdraw.vue"]]); const _sfc_main$S = { __name: "withdrawalLog", setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ currentTab: 0, pagination: { list: [], total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "" }); async function getLogList() { state.loadStatus = "loading"; let { code: code2, data } = await WithdrawalApi.getWithdrawalPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } let list = _$1.concat(state.pagination.list, data.list); state.pagination.list = list; state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } onLoad(() => { getLogList(); }); function onLoadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); } onReachBottom(() => { onLoadMore(); }); const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, onLoadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get points2point() { return points2point; }, get fen2yuan() { return fen2yuan; }, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; }, get WithdrawalApi() { return WithdrawalApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 提现记录 "), vue.createVNode(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: $setup.t("wallet.withdrawal_records"), navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode( "scroll-view", { class: "list-box", "scroll-y": "true", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => { }, ["stop"])) }, [ $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "padding": "20rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-item ss-flex ss-col-center ss-row-between", key: item.id, style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString(item.withdrawalType === 1 ? $setup.t("wallet.wechat") : item.withdrawalType === 2 ? $setup.t("wallet.alipay") : $setup.t("wallet.bank_card")) + " (" + vue.toDisplayString(item.withdrawalAccount) + ") ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" }, class: "color-red" }, " ¥" + vue.toDisplayString($setup.fen2yuan(item.amount)) + " (" + vue.toDisplayString($setup.t("wallet.consumption_points") + $setup.points2point(item.withdrawConsumption)) + ") ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" } }, vue.toDisplayString(item.status ? item.status === 1 ? $setup.t("wallet.credited") : $setup.t("wallet.withdrawal_failed") : $setup.t("wallet.withdrawing")), 1 /* TEXT */ ) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无数据", paddingTop: "200", icon: "/static/data-empty.png" })), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: $setup.t("common.click_to_load_more") }, onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)), onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true)) }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["title"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesUserWalletWithdrawalLog = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-fa4881f2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/withdrawalLog.vue"]]); const _sfc_main$R = { __name: "scoreToMoney", setup(__props, { expose: __expose }) { __expose(); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ currentTab: 0, pagination: { list: 0, total: 0, pageSize: 6, pageNo: 1 }, loadStatus: "", date: [], today: "", showModel: false, showQueModel: false }); const close = () => { state.showModel = false; state.showQueModel = false; }; const tabMaps = [ { name: "全部", value: "all" }, { name: "收入", value: "true" }, { name: "支出", value: "false" } ]; const dateFilterText = vue.computed(() => { if (state.date[0] === state.date[1]) { return state.date[0]; } else { return state.date.join("~"); } }); async function getLogList() { state.loadStatus = "loading"; let { code: code2, data } = await PointApi.getPointRecordPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize, addStatus: state.currentTab > 0 ? tabMaps[state.currentTab].value : void 0, "createTime[0]": state.date[0] + " 00:00:00", "createTime[1]": state.date[1] + " 23:59:59" }); if (code2 !== 0) { return; } state.pagination.list = data.list; state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } onLoad(() => { state.today = dayjs().format("YYYY-MM-DD"); state.date = [state.today, state.today]; getLogList(); }); function onChange(e2) { state.currentTab = e2.index; resetPagination(state.pagination); getLogList(); } function onChangeTime(e2) { state.date[0] = e2[0]; state.date[1] = e2[e2.length - 1]; resetPagination(state.pagination); getLogList(); } function onLoadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); } onReachBottom(() => { onLoadMore(); }); const __returned__ = { statusBarHeight, userInfo: userInfo2, sys_navBar, state, close, tabMaps, dateFilterText, getLogList, onChange, onChangeTime, onLoadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: "佣金兑换", navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "score-box bg-white ss-flex-col ss-row-center" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "all-title ss-m-r-8", style: { "border": "4rpx solid var(--ui-BG-Main)", "width": "100%", "box-sizing": "border-box", "height": "120rpx", "text-indent": "20rpx", "border-radius": "20rpx", "line-height": "120rpx" } }, "到数字人民币钱包:钱包地址/未绑定---->") ]), vue.createElementVNode("view", { class: "ss-m-y-80" }, [ vue.createElementVNode("view", { class: "all-title ss-m-r-8 ss-m-b-10" }, "提现金额"), vue.createElementVNode("view", { class: "all-title ss-m-r-8 ss-m-y-30" }, [ vue.createElementVNode("input", { class: "uni-input", style: { "border": "4rpx solid var(--ui-BG-Main)", "width": "100%", "box-sizing": "border-box", "height": "100rpx", "text-indent": "20rpx", "border-radius": "20rpx" }, type: "number", placeholder: "请输入金额" }) ]), vue.createElementVNode("view", { class: "all-title ss-m-r-8 ss-m-b-10 text-center" }, "您当前可兑换金额:¥0") ]), vue.createElementVNode("view", { class: "ss-m-b-40 ss-flex ss-row-center" }, [ vue.createElementVNode("view", { class: "all-title ss-m-r-80", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.back("/pages/user/wallet/score")) }, [ vue.createElementVNode("button", { class: "btn ss-reset-button ui-Shadow-Main" }, " 取消 ") ]), vue.createElementVNode("view", { class: "all-title ss-m-r-8" }, [ vue.createElementVNode("button", { class: "btn ss-reset-button ui-Shadow-Main" }, " 确定 ") ]) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesUserWalletScoreToMoney = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-ece509b1"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/scoreToMoney.vue"]]); const _sfc_main$Q = { __name: "maxScoreLog", props: { isFreeze: { type: Boolean } }, setup(__props, { expose: __expose }) { __expose(); const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const props = __props; const state = vue.reactive({ currentTab: 0, pagination: { list: [], total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "", showModel: false, showQueModel: false }); const title = (item) => { let title2 = item.profitStatusName + ""; if (item.username) { title2 += "(" + item.username + ")"; } return title2; }; const changeValue = (item) => { let value = ""; if (item.freezeHighQuota > 0 || item.maxAvailablePointsAmount > 0) { value = "+"; } value += points2point(item.maxAvailablePointsAmount); return value; }; const balance = (item) => { let value = ""; value += t$6("wallet.balance") + ":"; value += points2point(item.afterMaxAvailablePointsAmount); return value; }; async function getLogList(isFreeze) { state.loadStatus = "loading"; let { code: code2, data } = await ScoreApi.getMaxScoreList({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } let list = _$1.concat(state.pagination.list, data.list); state.pagination.list = list; state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } onLoad(() => { getLogList(props.isFreeze); }); function onLoadMore(isFreeze) { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); } onReachBottom(() => { onLoadMore(); }); const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, props, state, title, changeValue, balance, getLogList, onLoadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get points2point() { return points2point; }, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; }, get ScoreApi() { return ScoreApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 佣金确权 "), vue.createVNode(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: "", navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode( "scroll-view", { class: "list-box", "scroll-y": "true", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => { }, ["stop"])) }, [ $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "padding": "20rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-item ss-flex ss-col-center ss-row-between", key: item.id, style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString($setup.title(item)) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" }, class: vue.normalizeClass(["color-red", { "color-green": item.maxAvailablePointsAmount < 0 || _ctx.freezeHighQuota < 0 }]) }, vue.toDisplayString($setup.changeValue(item)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%" } }, [ vue.createTextVNode( vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" } }, vue.toDisplayString($setup.balance(item)), 1 /* TEXT */ ) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无数据", paddingTop: "200", icon: "/static/data-empty.png" })), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: $setup.t("common.click_to_load_more") }, onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)), onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true)) }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesUserWalletMaxScoreLog = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-4bc02433"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/maxScoreLog.vue"]]); const _sfc_main$P = { __name: "team", setup(__props, { expose: __expose }) { __expose(); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ currentTab: 0, pagination: { list: 0, total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "", descendants: { total: 0, list: [] }, teamCount: 0, ancestor: {} }); const dateFilterText = vue.computed(() => { if (state.date[0] === state.date[1]) { return state.date[0]; } else { return state.date.join("~"); } }); async function getTeam() { state.loadStatus = "loading"; let { code: code2, data } = await TeamApi.getTeam({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } state.teamCount = data.teamCount; state.ancestor = data.ancestor; let descendantsList = _$1.concat(state.descendants.list, data.descendants.list); state.descendants.list = descendantsList; state.descendants.total = data.descendants.total; state.pagination.total = data.descendants.total; state.loadStatus = state.descendants.list.length < state.descendants.total ? "more" : "noMore"; } onLoad(() => { state.today = dayjs().format("YYYY-MM-DD"); state.date = [state.today, state.today]; getTeam(); }); function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getTeam(); } onReachBottom(() => { loadMore(); }); const __returned__ = { statusBarHeight, userInfo: userInfo2, sys_navBar, state, dateFilterText, getTeam, loadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get _() { return _$1; }, get dayjs() { return dayjs; }, get TeamApi() { return TeamApi; }, get resetPagination() { return resetPagination; }, get points2point() { return points2point; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: "", navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode("view", { class: "all-title ss-p-x-45 ss-p-t-30" }, [ vue.createElementVNode( "text", { style: { "float": "right" } }, vue.toDisplayString($setup.t("team.total_people", { count: $setup.state.teamCount })), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "list-box", style: { "width": "100%", "padding": "0", "height": "calc(100vh - 7.5rem)" } }, [ vue.createCommentVNode(" 推荐人 "), vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "list-item ss-flex ss-col-center ss-row-between", style: { "padding-top": "30rpx", "padding-bottom": "0" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%", "border-bottom": "1px solid #ededed", "padding-bottom": "30rpx" } }, [ vue.createElementVNode("view", null, "    "), vue.createCommentVNode(" 头像 "), vue.createElementVNode("view", { class: "avatar-box ss-m-x-20" }, [ vue.createElementVNode("image", { class: "avatar-img", src: $setup.state.ancestor.avatar, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "calc(100% - 5.5rem)" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createElementVNode( "text", { style: { "width": "50%", "display": "inline-block" } }, vue.toDisplayString($setup.state.ancestor.username || "昵称:" + $setup.state.ancestor.descNickName), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "time", style: { "float": "right", "color": "#666666" } }, vue.toDisplayString($setup.t("team.retain_performance")) + ":" + vue.toDisplayString($setup.points2point($setup.state.ancestor.residueSocial)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%", "color": "#999" } }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.state.ancestor.socialStatusLevel || "等级1"), 1 /* TEXT */ ), vue.createTextVNode(" / "), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("team.referrer")), 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" } }, vue.toDisplayString($setup.t("team.team_count", { count: $setup.state.ancestor.descendantsCount })), 1 /* TEXT */ ) ]) ]) ]) ]) ]), vue.createCommentVNode(" 直推人和后代 "), vue.createElementVNode("view", null, [ vue.createElementVNode( "scroll-view", { style: { "width": "100%" }, "scroll-y": "true", onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop"])) }, [ $setup.state.descendants.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.descendants.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-item ss-flex ss-col-center ss-row-between", key: item.id, style: { "padding-top": "30rpx", "padding-bottom": "0" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%", "border-bottom": "1px solid #ededed", "padding-bottom": "30rpx" } }, [ vue.createElementVNode( "view", null, vue.toDisplayString(item.sort), 1 /* TEXT */ ), vue.createCommentVNode(" 头像 "), vue.createElementVNode("view", { class: "avatar-box ss-m-x-20" }, [ vue.createElementVNode("image", { class: "avatar-img", src: item.avatar || $setup.sheep.$url.static("/static/images/default_avatar.png"), mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "calc(100% - 5.5rem)" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createElementVNode( "text", { style: { "width": "50%", "display": "inline-block" } }, vue.toDisplayString(item.username || "昵称:" + item.descNickName), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "time", style: { "float": "right", "color": "#666666" } }, vue.toDisplayString($setup.t("team.new_performance_value")) + ":" + vue.toDisplayString($setup.points2point(item.residueSocial)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%", "color": "#999" } }, [ vue.createTextVNode( vue.toDisplayString(item.socialStatusLevel) + " / ", 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString(item.depth == 1 ? $setup.t("team.direct_referral") : ""), 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "float": "right" } }, vue.toDisplayString($setup.t("team.team_count", { count: item.descendantsCount })), 1 /* TEXT */ ) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: $setup.t("team.no_team_members"), icon: "/static/data-empty.png" }, null, 8, ["text"])) ], 32 /* NEED_HYDRATION */ ) ]) ]) ]), $setup.state.descendants.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 0, status: $setup.state.loadStatus, "content-text": { contentdown: $setup.t("common.click_to_load_more") }, onClick: $setup.loadMore }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }); } const PagesUserWalletTeam = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__scopeId", "data-v-f08f8293"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/team.vue"]]); const _sfc_main$O = { __name: "commission-info", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "2ef4f675-headerBg": vue.unref(headerBg) })); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const headerBg = sheep$1.$url.css("/static/img/shop/commission/background.png"); const state = vue.reactive({ showMoney: false }); const __returned__ = { userInfo: userInfo2, headerBg, state, get sheep() { return sheep$1; }, computed: vue.computed, reactive: vue.reactive }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 用户资料 "), vue.createElementVNode("view", { class: "user-card ss-flex ss-col-bottom" }, [ vue.createElementVNode("view", { class: "card-top ss-flex ss-row-between" }, [ vue.createElementVNode("view", { class: "ss-flex" }, [ vue.createElementVNode("view", { class: "head-img-box" }, [ vue.createElementVNode("image", { class: "head-img", src: $setup.sheep.$url.cdn($setup.userInfo.avatar), mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "ss-flex-col" }, [ vue.createElementVNode( "view", { class: "user-name" }, vue.toDisplayString($setup.userInfo.nickname), 1 /* TEXT */ ) ]) ]) ]) ]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const commissionInfo = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-2ef4f675"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-info.vue"]]); const _sfc_main$N = { __name: "account-info", setup(__props, { expose: __expose }) { __expose(); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const state = vue.reactive({ showMoney: false, summary: {} }); vue.onMounted(async () => { let { code: code2, data } = await BrokerageApi.getBrokerageUserSummary(); if (code2 === 0) { state.summary = data || {}; } }); const __returned__ = { userInfo: userInfo2, state, get sheep() { return sheep$1; }, computed: vue.computed, reactive: vue.reactive, onMounted: vue.onMounted, get BrokerageApi() { return BrokerageApi; }, get fen2yuan() { return fen2yuan; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); return vue.openBlock(), vue.createElementBlock("view", { class: "account-card" }, [ vue.createElementVNode("view", { class: "account-card-box" }, [ vue.createElementVNode("view", { class: "ss-flex ss-row-between card-box-header" }, [ vue.createElementVNode("view", { class: "ss-flex" }, [ vue.createElementVNode("view", { class: "header-title ss-m-r-16" }, "账户信息"), vue.createElementVNode("button", { class: "ss-reset-button look-btn ss-flex", onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showMoney = !$setup.state.showMoney) }, [ vue.createVNode(_component_uni_icons, { type: $setup.state.showMoney ? "eye-filled" : "eye-slash-filled", color: "#A57A55", size: "20" }, null, 8, ["type"]) ]) ]), vue.createElementVNode("view", { class: "ss-flex", onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/commission")) }, [ vue.createElementVNode("view", { class: "header-title ss-m-r-4" }, "查看明细"), vue.createElementVNode("text", { class: "cicon-play-arrow" }) ]) ]), vue.createCommentVNode(" 收益 "), vue.createElementVNode("view", { class: "card-content ss-flex" }, [ vue.createElementVNode("view", { class: "ss-flex-1 ss-flex-col ss-col-center" }, [ vue.createElementVNode("view", { class: "item-title" }, "当前佣金(元)"), vue.createElementVNode( "view", { class: "item-detail" }, vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.brokeragePrice || 0) : "***"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "ss-flex-1 ss-flex-col ss-col-center" }, [ vue.createElementVNode("view", { class: "item-title" }, "昨天的佣金(元)"), vue.createElementVNode( "view", { class: "item-detail" }, vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.yesterdayPrice || 0) : "***"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "ss-flex-1 ss-flex-col ss-col-center" }, [ vue.createElementVNode("view", { class: "item-title" }, "累计已提(元)"), vue.createElementVNode( "view", { class: "item-detail" }, vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.withdrawPrice || 0) : "***"), 1 /* TEXT */ ) ]) ]) ]) ]); } const accountInfo = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-12734ec3"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/account-info.vue"]]); const _sfc_main$M = { __name: "commission-log", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ loadStatus: "", pagination: { list: [], total: 0, pageNo: 1, pageSize: 1 } }); async function getLog() { state.loadStatus = "loading"; const { code: code2, data } = await BrokerageApi.getBrokerageRecordPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } getLog(); function loadmore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLog(); } const __returned__ = { state, getLog, loadmore, get sheep() { return sheep$1; }, reactive: vue.reactive, get _() { return _$1; }, get dayjs() { return dayjs; }, get BrokerageApi() { return BrokerageApi; }, get fen2yuan() { return fen2yuan; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); return vue.openBlock(), vue.createElementBlock("view", { class: "distribution-log-wrap" }, [ vue.createElementVNode("view", { class: "header-box" }, [ vue.createElementVNode("image", { class: "header-bg", src: $setup.sheep.$url.static("/static/images/title2.png") }, null, 8, ["src"]), vue.createElementVNode("view", { class: "ss-flex header-title" }, [ vue.createElementVNode("view", { class: "title" }, "实时动态"), vue.createElementVNode("text", { class: "cicon-forward" }) ]) ]), vue.createElementVNode( "scroll-view", { "scroll-y": "true", onScrolltolower: $setup.loadmore, class: "scroll-box log-scroll", "scroll-with-animation": "true" }, [ $setup.state.pagination.list ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "log-item-box ss-flex ss-row-between", key: item.id }, [ vue.createElementVNode("view", { class: "log-item-wrap" }, [ vue.createElementVNode("view", { class: "log-item ss-flex ss-ellipsis-1 ss-col-center" }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [ vue.createElementVNode("image", { class: "log-img", src: $setup.sheep.$url.static("/static/images/notice.png"), mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "log-text ss-ellipsis-1" }, vue.toDisplayString(item.title) + " " + vue.toDisplayString($setup.fen2yuan(item.price)) + " 元 ", 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "text", { class: "log-time" }, vue.toDisplayString($setup.dayjs(item.createTime).fromNow()), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 加载更多 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 1, status: $setup.state.loadStatus, color: "#333333", onClick: $setup.loadmore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]); } const commissionLog = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-8c54e688"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-log.vue"]]); const _sfc_main$L = { __name: "commission-menu", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ menuList: [ { img: "/static/images/commission_icon1.png", title: "我的团队", path: "/pages/commission/team" }, { img: "/static/images/commission_icon2.png", title: "佣金明细", path: "/pages/commission/wallet" }, { img: "/static/images/commission_icon3.png", title: "分销订单", path: "/pages/commission/order" }, { img: "/static/images/commission_icon4.png", title: "推广商品", path: "/pages/commission/goods" }, // { // img: '/static/images/commission_icon5.png', // title: '我的资料', // path: '/pages/commission/apply', // isAgentFrom: true, // }, // todo @非繁人:邀请海报需要登录后的个人数据 { img: "/static/images/commission_icon7.png", title: "邀请海报", path: "action:showShareModal" }, // TODO @非繁人:缺少 icon { // img: '/static/images/commission_icon7.png', title: "推广排行", path: "/pages/commission/promoter" }, { // img: '/static/images/commission_icon7.png', title: "佣金排行", path: "/pages/commission/commission-ranking" } ] }); const __returned__ = { state, get sheep() { return sheep$1; }, reactive: vue.reactive }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "menu-box ss-flex-col" }, [ vue.createElementVNode("view", { class: "header-box" }, [ vue.createElementVNode("image", { class: "header-bg", src: $setup.sheep.$url.static("/static/images/title1.png") }, null, 8, ["src"]), vue.createElementVNode("view", { class: "ss-flex header-title" }, [ vue.createElementVNode("view", { class: "title" }, "功能专区"), vue.createElementVNode("text", { class: "cicon-forward" }) ]) ]), vue.createElementVNode("view", { class: "menu-list ss-flex ss-flex-wrap" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.menuList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item-box ss-flex-col ss-col-center", onClick: ($event) => $setup.sheep.$router.go(item.path) }, [ vue.createElementVNode("image", { class: "menu-icon ss-m-b-10", src: $setup.sheep.$url.static(item.img), mode: "aspectFill" }, null, 8, ["src"]), vue.createElementVNode( "view", null, vue.toDisplayString(item.title), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]); } const commissionMenu = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-a53c0bfa"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-menu.vue"]]); const _sfc_main$K = { __name: "commission-auth", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ show: false }); onShow(async () => { const { code: code2, data } = await BrokerageApi.getBrokerageUser(); if (code2 === 0 && !(data == null ? void 0 : data.brokerageEnabled)) { state.show = true; } }); const __returned__ = { state, get onShow() { return onShow; }, get sheep() { return sheep$1; }, reactive: vue.reactive, get BrokerageApi() { return BrokerageApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createBlock(_component_su_popup, { show: $setup.state.show, type: "center", round: "10", onClose: _cache[2] || (_cache[2] = ($event) => $setup.state.show = false), isMaskClick: false, maskBackgroundColor: "rgba(0, 0, 0, 0.7)" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "notice-box" }, [ vue.createElementVNode("view", { class: "img-wrap" }, [ vue.createElementVNode("image", { class: "notice-img", src: $setup.sheep.$url.static("/static/images/forbidden.png"), mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "notice-title" }, " 抱歉!您没有分销权限 "), vue.createElementVNode("view", { class: "notice-detail" }, " 该功能暂不可用 "), vue.createElementVNode("button", { class: "ss-reset-button notice-btn ui-Shadow-Main ui-BG-Main-Gradient", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.back()) }, " 知道了 "), vue.createElementVNode("button", { class: "ss-reset-button back-btn", onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.back()) }, " 返回 ") ]) ]), _: 1 /* STABLE */ }, 8, ["show"]); } const commissionAuth = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__scopeId", "data-v-ec55d95e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-auth.vue"]]); const _sfc_main$J = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({}); const bgStyle = { color: "#F7D598" }; const __returned__ = { state, bgStyle, reactive: vue.reactive, commissionInfo, accountInfo, commissionLog, commissionMenu, commissionAuth }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { navbar: "inner", class: "index-wrap", title: "分销中心", bgStyle: $setup.bgStyle, onShareAppMessage: "" }, { default: vue.withCtx(() => [ vue.createCommentVNode(" 分销商信息 "), vue.createVNode($setup["commissionInfo"]), vue.createCommentVNode(" 账户信息 "), vue.createVNode($setup["accountInfo"]), vue.createCommentVNode(" 菜单栏 "), vue.createVNode($setup["commissionMenu"]), vue.createCommentVNode(" 分销记录 "), vue.createVNode($setup["commissionLog"]), vue.createCommentVNode(" 权限弹窗 "), vue.createVNode($setup["commissionAuth"]) ]), _: 1 /* STABLE */ }); } const PagesCommissionIndex = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-a5d04a00"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/index.vue"]]); const _sfc_main$I = { __name: "wallet", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "52afd294-headerBg": vue.unref(headerBg) })); const headerBg = sheep$1.$url.css("/static/img/shop/user/wallet_card_bg.png"); const state = vue.reactive({ showMoney: false, summary: {}, // 分销信息 today: "", date: [], currentTab: 0, pagination: { list: [], total: 0, pageNo: 1, pageSize: 1 }, loadStatus: "", price: void 0, showModal: false }); const tabMaps = [ { name: "分佣", value: "1" // BrokerageRecordBizTypeEnum.ORDER }, { name: "提现", value: "2" // BrokerageRecordBizTypeEnum.WITHDRAW } ]; const dateFilterText = vue.computed(() => { if (state.date[0] === state.date[1]) { return state.date[0]; } else { return state.date.join("~"); } }); async function getLogList() { state.loadStatus = "loading"; let { code: code2, data } = await BrokerageApi.getBrokerageRecordPage({ pageSize: state.pagination.pageSize, pageNo: state.pagination.pageNo, bizType: tabMaps[state.currentTab].value, "createTime[0]": state.date[0] + " 00:00:00", "createTime[1]": state.date[1] + " 23:59:59" }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } function onChangeTab(e2) { resetPagination(state.pagination); state.currentTab = e2.index; getLogList(); } function onChangeTime(e2) { state.date[0] = e2[0]; state.date[1] = e2[e2.length - 1]; resetPagination(state.pagination); getLogList(); } async function onConfirm() { if (state.price <= 0) { sheep$1.$helper.toast("请输入正确的金额"); return; } uni.showModal({ title: "提示", content: "确认把您的佣金转入到余额钱包中?", success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await BrokerageApi.createBrokerageWithdraw({ type: 1, // 钱包 price: state.price * 100 }); if (code2 === 0) { state.showModal = false; await getAgentInfo(); onChangeTab({ index: 1 }); } } }); } async function getAgentInfo() { const { code: code2, data } = await BrokerageApi.getBrokerageUserSummary(); if (code2 !== 0) { return; } state.summary = data; } onLoad(async (options2) => { state.today = dayjs().format("YYYY-MM-DD"); state.date = [state.today, state.today]; if (options2.type === 2) { state.currentTab = 1; } getLogList(); getAgentInfo(); }); onReachBottom(() => { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); }); const __returned__ = { headerBg, state, tabMaps, dateFilterText, getLogList, onChangeTab, onChangeTime, onConfirm, getAgentInfo, computed: vue.computed, reactive: vue.reactive, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, get sheep() { return sheep$1; }, get dayjs() { return dayjs; }, get _() { return _$1; }, get BrokerageApi() { return BrokerageApi; }, get fen2yuan() { return fen2yuan; }, get resetPagination() { return resetPagination; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$3); const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "wallet-wrap", title: "佣金" }, { default: vue.withCtx(() => [ vue.createCommentVNode(" 钱包卡片 "), vue.createElementVNode("view", { class: "header-box ss-flex ss-row-center ss-col-center" }, [ vue.createElementVNode("view", { class: "card-box ui-BG-Main ui-Shadow-Main" }, [ vue.createElementVNode("view", { class: "card-head ss-flex ss-col-center" }, [ vue.createElementVNode("view", { class: "card-title ss-m-r-10" }, "当前佣金(元)"), vue.createElementVNode( "view", { onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showMoney = !$setup.state.showMoney), class: vue.normalizeClass(["ss-eye-icon", $setup.state.showMoney ? "cicon-eye" : "cicon-eye-off"]) }, null, 2 /* CLASS */ ) ]), vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-col-center ss-m-t-30" }, [ vue.createElementVNode( "view", { class: "money-num" }, vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.withdrawPrice || 0) : "*****"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ss-flex" }, [ vue.createElementVNode("view", { class: "ss-m-r-20" }, [ vue.createElementVNode("button", { class: "ss-reset-button withdraw-btn", onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/commission/withdraw")) }, " 提现 ") ]), vue.createElementVNode("button", { class: "ss-reset-button balance-btn ss-m-l-20", onClick: _cache[2] || (_cache[2] = ($event) => $setup.state.showModal = true) }, " 转余额 ") ]) ]), vue.createElementVNode("view", { class: "ss-flex" }, [ vue.createElementVNode("view", { class: "loading-money" }, [ vue.createElementVNode("view", { class: "loading-money-title" }, "冻结佣金"), vue.createElementVNode( "view", { class: "loading-money-num" }, vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.frozenPrice || 0) : "*****"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "loading-money ss-m-l-100" }, [ vue.createElementVNode("view", { class: "loading-money-title" }, "可提现佣金"), vue.createElementVNode( "view", { class: "loading-money-num" }, vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.brokeragePrice || 0) : "*****"), 1 /* TEXT */ ) ]) ]) ]) ]), vue.createVNode(_component_su_sticky, null, { default: vue.withCtx(() => [ vue.createCommentVNode(" 统计 "), vue.createElementVNode("view", { class: "filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between" }, [ vue.createVNode(_component_uni_datetime_picker, { modelValue: $setup.state.date, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.date = $event), type: "daterange", onChange: $setup.onChangeTime, end: $setup.state.today }, { default: vue.withCtx(() => [ vue.createElementVNode("button", { class: "ss-reset-button date-btn" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.dateFilterText), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "cicon-drop-down ss-seldate-icon" }) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "end"]), vue.createElementVNode("view", { class: "total-box" }, [ vue.createCommentVNode(" TODO 非繁人:这里暂时不考虑做 "), vue.createCommentVNode(' 总收入¥{{ state.pagination.income.toFixed(2) }} '), vue.createCommentVNode(" 总支出¥{{ (-state.pagination.expense).toFixed(2) }} ") ]) ]), vue.createVNode(_component_su_tabs, { list: $setup.tabMaps, onChange: $setup.onChangeTab, scrollable: false, current: $setup.state.currentTab }, null, 8, ["current"]) ]), _: 1 /* STABLE */ }), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/data-empty.png", text: "暂无数据" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 转余额弹框 "), vue.createVNode(_component_su_popup, { show: $setup.state.showModal, type: "bottom", round: "20", onClose: _cache[5] || (_cache[5] = ($event) => $setup.state.showModal = false), showClose: "" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-p-x-20 ss-p-y-30" }, [ vue.createElementVNode("view", { class: "model-title ss-m-b-30 ss-m-l-20" }, "转余额"), vue.createElementVNode("view", { class: "model-subtitle ss-m-b-100 ss-m-l-20" }, "将您的佣金转到余额中继续消费"), vue.createElementVNode("view", { class: "input-box ss-flex ss-col-center border-bottom ss-m-b-70 ss-m-x-20" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createVNode(_component_uni_easyinput, { inputBorder: false, class: "ss-flex-1 ss-p-l-10", modelValue: $setup.state.price, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.price = $event), type: "number", placeholder: "请输入金额" }, null, 8, ["modelValue"]) ]), vue.createElementVNode("button", { class: "ss-reset-button model-btn ui-BG-Main-Gradient ui-Shadow-Main", onClick: $setup.onConfirm }, " 确定 ") ]) ]), _: 1 /* STABLE */ }, 8, ["show"]), vue.createCommentVNode(" 钱包记录 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "wallet-list ss-flex border-bottom", key: item.id }, [ vue.createElementVNode("view", { class: "list-content" }, [ vue.createElementVNode("view", { class: "title-box ss-flex ss-row-between ss-m-b-20" }, [ vue.createElementVNode( "text", { class: "title ss-line-1" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "money" }, [ item.price >= 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "add" }, "+" + vue.toDisplayString($setup.fen2yuan(item.price)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "minus" }, vue.toDisplayString($setup.fen2yuan(item.price)), 1 /* TEXT */ )) ]) ]), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" } }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }); } const PagesCommissionWallet = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-52afd294"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/wallet.vue"]]); const _sfc_main$H = { __name: "goods", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ pagination: { list: [], total: 0, pageNo: 1, pageSize: 1 }, loadStatus: "", shareInfo: {} }); function onShareGoods(goodsInfo) { state.shareInfo = $share.getShareInfo( { title: goodsInfo.title, image: sheep$1.$url.cdn(goodsInfo.image), desc: goodsInfo.subtitle, params: { page: "2", query: goodsInfo.id } }, { type: "goods", // 商品海报 title: goodsInfo.title, // 商品标题 image: sheep$1.$url.cdn(goodsInfo.image), // 商品主图 price: goodsInfo.price[0], // 商品价格 original_price: goodsInfo.original_price // 商品原价 } ); showShareModal(); } async function getGoodsList() { state.loadStatus = "loading"; let { code: code2, data } = await SpuApi.getSpuPage({ pageSize: state.pagination.pageSize, pageNo: state.pagination.pageNo }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; data.list.forEach((item) => { BrokerageApi.getProductBrokeragePrice(item.id).then((res) => { item.brokerageMinPrice = res.data.brokerageMinPrice; item.brokerageMaxPrice = res.data.brokerageMaxPrice; }); }); } onLoad(() => { getGoodsList(); }); function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getGoodsList(); } onReachBottom(() => { loadMore(); }); const __returned__ = { state, onShareGoods, getGoodsList, loadMore, get sheep() { return sheep$1; }, get $share() { return $share; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, reactive: vue.reactive, get _() { return _$1; }, get showShareModal() { return showShareModal; }, get SpuApi() { return SpuApi; }, get BrokerageApi() { return BrokerageApi; }, get fen2yuan() { return fen2yuan; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "推广商品", onShareAppMessage: $setup.state.shareInfo }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "goods-item ss-m-20", key: item.id }, [ vue.createVNode(_component_s_goods_item, { size: "lg", img: item.picUrl, title: item.name, subTitle: item.introduction, price: item.price, originPrice: item.marketPrice, priceColor: "#333", onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }) }, { rightBottom: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-flex ss-row-between" }, [ item.brokerageMinPrice === void 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "commission-num" }, "预计佣金:计算中")) : item.brokerageMinPrice === item.brokerageMaxPrice ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "commission-num" }, " 预计佣金:" + vue.toDisplayString($setup.fen2yuan(item.brokerageMinPrice)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "commission-num" }, " 预计佣金:" + vue.toDisplayString($setup.fen2yuan(item.brokerageMinPrice)) + " ~ " + vue.toDisplayString($setup.fen2yuan(item.brokerageMaxPrice)), 1 /* TEXT */ )), vue.createElementVNode("button", { class: "ss-reset-button share-btn ui-BG-Main-Gradient", onClick: vue.withModifiers(($event) => $setup.onShareGoods(item), ["stop"]) }, " 分享赚 ", 8, ["onClick"]) ]) ]), _: 2 /* DYNAMIC */ }, 1032, ["img", "title", "subTitle", "price", "originPrice", "onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/goods-empty.png", text: "暂无推广商品" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 加载更多 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 1, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["onShareAppMessage"]); } const PagesCommissionGoods = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-1b0a4b5d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/goods.vue"]]); const _sfc_main$G = { __name: "order", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "3971f30d-headerBg": vue.unref(headerBg) })); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png"); onPageScroll((e2) => { state.scrollTop = e2.scrollTop <= 100; }); const state = vue.reactive({ totals: 0, // 累计推广订单(单) scrollTop: false, currentTab: 0, loadStatus: "", pagination: { list: [], total: 0, pageNo: 1, pageSize: 1 } }); const tabMaps = [ { name: "全部", value: "all" }, { name: "待结算", value: "0" // 待结算 }, { name: "已结算", value: "1" // 已结算 } ]; function onTabsChange(e2) { resetPagination(state.pagination); state.currentTab = e2.index; getOrderList(); } async function getOrderList() { state.loadStatus = "loading"; let { code: code2, data } = await BrokerageApi.getBrokerageRecordPage({ pageSize: state.pagination.pageSize, pageNo: state.pagination.pageSize, bizType: 1, // 获得推广佣金 status: state.currentTab > 0 ? state.currentTab : void 0 }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; if (state.currentTab === 0) { state.totals = data.total; } } onLoad(() => { getOrderList(); }); function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getOrderList(); } onReachBottom(() => { loadMore(); }); const __returned__ = { statusBarHeight, headerBg, state, tabMaps, onTabsChange, getOrderList, loadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, reactive: vue.reactive, get _() { return _$1; }, get onPageScroll() { return onPageScroll; }, get resetPagination() { return resetPagination; }, get BrokerageApi() { return BrokerageApi; }, get fen2yuan() { return fen2yuan; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "分销订单", class: vue.normalizeClass($setup.state.scrollTop ? "order-warp" : ""), navbar: "inner" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "header-box", style: vue.normalizeStyle([ { marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx", paddingTop: Number($setup.statusBarHeight + 108) + "rpx" } ]) }, [ vue.createCommentVNode(" 团队数据总览 "), vue.createElementVNode("view", { class: "team-data-box ss-flex ss-col-center ss-row-between", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "data-card", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "total-item", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "item-title", style: { "text-align": "center" } }, "累计推广订单(单)"), vue.createElementVNode( "view", { class: "total-num", style: { "text-align": "center" } }, vue.toDisplayString($setup.state.totals), 1 /* TEXT */ ) ]) ]) ]) ], 4 /* STYLE */ ), vue.createCommentVNode(" tab "), vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_tabs, { list: $setup.tabMaps, scrollable: false, current: $setup.state.currentTab, onChange: $setup.onTabsChange }, null, 8, ["current"]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 订单 "), vue.createElementVNode("view", { class: "order-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "order-item", key: item }, [ vue.createElementVNode("view", { class: "order-header" }, [ vue.createElementVNode("view", { class: "no-box ss-flex ss-col-center ss-row-between" }, [ vue.createElementVNode( "text", { class: "order-code" }, "订单编号:" + vue.toDisplayString(item.bizId), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "order-state" }, vue.toDisplayString(item.status === 0 ? "待结算" : item.status === 1 ? "已结算" : "已取消") + " ( 佣金 " + vue.toDisplayString($setup.fen2yuan(item.price)) + " 元 ) ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "order-from ss-flex ss-col-center ss-row-between" }, [ vue.createElementVNode("view", { class: "from-user ss-flex ss-col-center" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item.title), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "order-time" }, vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 数据为空 "), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/order-empty.png", text: "暂无订单" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 加载更多 "), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 1, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["class"]); } const PagesCommissionOrder = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-3971f30d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/order.vue"]]); const _imports_0$3 = "/static/images/search.png"; const _imports_1$1 = "/static/images/sort1.png"; const _imports_2 = "/static/images/sort3.png"; const _imports_3 = "/static/images/sort2.png"; const _sfc_main$F = { __name: "team", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "42603af6-headerBg": vue.unref(headerBg) })); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png"); onPageScroll((e2) => { state.scrollTop = e2.scrollTop <= 100; }); let sort = vue.ref(); const state = vue.reactive({ summary: {}, pagination: { pageNo: 1, pageSize: 8, list: [], total: 0 }, loadStatus: "", // ↓ 新 ui 逻辑 level: 1, nickname: vue.ref(""), sortKey: "", isAsc: "" }); function filterUserNum(num) { if (_$1.isNil(num)) { return ""; } return `下级团队${num}人`; } function submitForm() { state.pagination.list = []; getTeamList(); } async function getTeamList() { state.loadStatus = "loading"; let { code: code2, data } = await BrokerageApi.getBrokerageUserChildSummaryPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize, level: state.level, "sortingField.order": state.isAsc, "sortingField.field": state.sortKey, nickname: state.nickname }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } function setType(e2) { state.pagination.list = []; state.level = e2 + ""; getTeamList(); } function setSort(sortKey, isAsc) { state.pagination.list = []; sort = sortKey + isAsc.toUpperCase(); state.isAsc = isAsc; state.sortKey = sortKey; getTeamList(); } onLoad(async () => { await getTeamList(); let { data } = await BrokerageApi.getBrokerageUserSummary(); state.summary = data; }); function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getTeamList(); } onReachBottom(() => { loadMore(); }); const __returned__ = { statusBarHeight, userInfo: userInfo2, headerBg, get sort() { return sort; }, set sort(v2) { sort = v2; }, state, filterUserNum, submitForm, getTeamList, setType, setSort, loadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, get _() { return _$1; }, get onPageScroll() { return onPageScroll; }, get BrokerageApi() { return BrokerageApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "我的团队", class: vue.normalizeClass($setup.state.scrollTop ? "team-wrap" : ""), navbar: "inner" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "promoter-list" }, [ vue.createElementVNode("view", { class: "promoterHeader bg-color", style: { "backgroundcolor": "#e93323 !important", "height": "218rpx", "color": "#fff" } }, [ vue.createElementVNode("view", { class: "headerCon acea-row row-between", style: { "padding": "28px 29px 0 29px" } }, [ vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "name", style: { "color": "#fff" } }, "推广人数"), vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "num", style: { "color": "#fff" } }, vue.toDisplayString($setup.state.summary.firstBrokerageUserCount + $setup.state.summary.secondBrokerageUserCount || 0), 1 /* TEXT */ ), vue.createTextVNode(" 人 ") ]) ]), vue.createElementVNode("view", { class: "iconfont icon-tuandui" }) ]) ]), vue.createElementVNode("view", { style: { "padding": "0 30rpx" } }, [ vue.createElementVNode("view", { class: "nav acea-row row-around l1" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($setup.state.level == 1 ? "item on" : "item"), onClick: _cache[0] || (_cache[0] = ($event) => $setup.setType(1)) }, " 一级(" + vue.toDisplayString($setup.state.summary.firstBrokerageUserCount || 0) + ") ", 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($setup.state.level == 2 ? "item on" : "item"), onClick: _cache[1] || (_cache[1] = ($event) => $setup.setType(2)) }, " 二级(" + vue.toDisplayString($setup.state.summary.secondBrokerageUserCount || 0) + ") ", 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "search acea-row row-between-wrapper", style: { "display": "flex", "height": "100rpx", "align-items": "center" } }, [ vue.createElementVNode("view", { class: "input" }, [ vue.withDirectives(vue.createElementVNode( "input", { placeholder: "点击搜索会员名称", "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.nickname = $event), "confirm-type": "search", name: "search", onConfirm: $setup.submitForm }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $setup.state.nickname] ]) ]), vue.createElementVNode("image", { src: _imports_0$3, mode: "", style: { "width": "60rpx", "height": "64rpx" }, onClick: $setup.submitForm }) ]), vue.createElementVNode("view", { class: "list" }, [ vue.createElementVNode("view", { class: "sortNav acea-row row-middle", style: { "display": "flex", "align-items": "center" } }, [ $setup.sort === "userCountDESC" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sortItem", onClick: _cache[3] || (_cache[3] = ($event) => $setup.setSort("userCount", "asc")) }, [ vue.createTextVNode(" 团队排序 "), vue.createCommentVNode(" TODO 非繁人:看看怎么从项目里拿出去 "), vue.createElementVNode("image", { src: _imports_1$1 }) ])) : $setup.sort === "userCountASC" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "sortItem", onClick: _cache[4] || (_cache[4] = ($event) => $setup.setSort("userCount", "desc")) }, [ vue.createTextVNode(" 团队排序 "), vue.createElementVNode("image", { src: _imports_2 }) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "sortItem", onClick: _cache[5] || (_cache[5] = ($event) => $setup.setSort("userCount", "desc")) }, [ vue.createTextVNode(" 团队排序 "), vue.createElementVNode("image", { src: _imports_3 }) ])), $setup.sort === "priceDESC" ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "sortItem", onClick: _cache[6] || (_cache[6] = ($event) => $setup.setSort("price", "asc")) }, [ vue.createTextVNode(" 金额排序 "), vue.createElementVNode("image", { src: _imports_1$1 }) ])) : $setup.sort === "priceASC" ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "sortItem", onClick: _cache[7] || (_cache[7] = ($event) => $setup.setSort("price", "desc")) }, [ vue.createTextVNode(" 金额排序 "), vue.createElementVNode("image", { src: _imports_2 }) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "sortItem", onClick: _cache[8] || (_cache[8] = ($event) => $setup.setSort("price", "desc")) }, [ vue.createTextVNode(" 金额排序 "), vue.createElementVNode("image", { src: _imports_3 }) ])), $setup.sort === "orderCountDESC" ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "sortItem", onClick: _cache[9] || (_cache[9] = ($event) => $setup.setSort("orderCount", "asc")) }, [ vue.createTextVNode(" 订单排序 "), vue.createElementVNode("image", { src: _imports_1$1 }) ])) : $setup.sort === "orderCountASC" ? (vue.openBlock(), vue.createElementBlock("view", { key: 7, class: "sortItem", onClick: _cache[10] || (_cache[10] = ($event) => $setup.setSort("orderCount", "desc")) }, [ vue.createTextVNode(" 订单排序 "), vue.createElementVNode("image", { src: _imports_2 }) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 8, class: "sortItem", onClick: _cache[11] || (_cache[11] = ($event) => $setup.setSort("orderCount", "desc")) }, [ vue.createTextVNode(" 订单排序 "), vue.createElementVNode("image", { src: _imports_3 }) ])) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item acea-row row-between-wrapper", style: { "display": "flex" } }, [ vue.createElementVNode("view", { class: "picTxt acea-row row-between-wrapper", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: item.avatar }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "text" }, [ vue.createElementVNode( "view", { class: "name line1" }, vue.toDisplayString(item.nickname), 1 /* TEXT */ ), vue.createElementVNode( "view", null, " 加入时间: " + vue.toDisplayString($setup.sheep.$helper.timeFormat(item.brokerageTime, "yyyy-mm-dd hh:MM:ss")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right", style: { "justify-content": "center", "flex-direction": "column", "display": "flex", "margin-left": "auto" } }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "num font-color" }, vue.toDisplayString(item.brokerageUserCount || 0), 1 /* TEXT */ ), vue.createTextVNode("人 ") ]), vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(item.orderCount || 0), 1 /* TEXT */ ), vue.createTextVNode("单") ]), vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(item.brokeragePrice || 0), 1 /* TEXT */ ), vue.createTextVNode("元 ") ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), $setup.state.pagination.list.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "text-align": "center" } }, "暂无推广人数")) : vue.createCommentVNode("v-if", true) ]) ]) ]), vue.createCommentVNode(" "), vue.createCommentVNode(` 推荐人: {{ userInfo.parent_user.nickname }} 团队总人数(人) {{ (state.summary.firstBrokerageUserCount+ state.summary.secondBrokerageUserCount)|| 0 }} 一级成员 {{ state.summary.firstBrokerageUserCount || 0 }} 二级成员 {{ state.summary.secondBrokerageUserCount || 0 }} 团队分销商人数(人) {{ agentInfo?.child_agent_count_all || 0 }} 一级分销商 {{ agentInfo?.child_agent_count_1 || 0 }} 二级分销商 {{ agentInfo?.child_agent_count_2 || 0 }} {{ item.nickname }} {{ sheep.$helper.timeFormat(item.brokerageTime, 'yyyy-mm-dd hh:MM:ss') }} `) ]), _: 1 /* STABLE */ }, 8, ["class"]); } const PagesCommissionTeam = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-42603af6"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/team.vue"]]); const _sfc_main$E = { __name: "promoter", setup(__props, { expose: __expose }) { __expose(); const tabMaps = ["周排行", "月排行"]; const state = vue.reactive({ currentTab: 0, rankList: [], times: [], one: {}, // 排名第一 two: {}, // 排名第二 three: {} // 排名第三 }); function switchTap(index2) { if (state.currentTab === index2) { return; } state.currentTab = index2; calculateTimes(); getRankList(); } async function getRankList() { state.one = {}; state.two = {}; state.three = {}; state.rankList = []; const { code: code2, data } = await BrokerageApi.getBrokerageUserRankPageByUserCount({ pageNo: 1, pageSize: 10, "times[0]": state.times[0], "times[1]": state.times[1] }); if (code2 !== 0) { return; } state.rankList = data.list; state.one = state.rankList.shift() || {}; state.two = state.rankList.shift() || {}; state.trhee = state.rankList.shift() || {}; } function calculateTimes() { let times2; if (state.currentTab === 0) { times2 = getWeekTimes(); } else { times2 = getMonthTimes(); } state.times = [formatDate2(times2[0]), formatDate2(times2[1])]; } onLoad(function() { calculateTimes(); getRankList(); }); function formatDate2(date2) { return sheep$1.$helper.timeFormat(date2, "yyyy-mm-dd hh:MM:ss"); } function getWeekTimes() { const today = /* @__PURE__ */ new Date(); const dayOfWeek = today.getDay(); return [ new Date(today.getFullYear(), today.getMonth(), today.getDate() - dayOfWeek, 0, 0, 0), new Date(today.getFullYear(), today.getMonth(), today.getDate() + (6 - dayOfWeek), 23, 59, 59) ]; } function getMonthTimes() { const today = /* @__PURE__ */ new Date(); const year = today.getFullYear(); const month = today.getMonth(); const startDate = new Date(year, month, 1, 0, 0, 0); const nextMonth = new Date(year, month + 1, 1); const endDate = new Date(nextMonth.getTime() - 1); return [startDate, endDate]; } const __returned__ = { tabMaps, state, switchTap, getRankList, calculateTimes, formatDate: formatDate2, getWeekTimes, getMonthTimes, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, reactive: vue.reactive, get BrokerageApi() { return BrokerageApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "推广人排行榜" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "PromoterRank", style: { "backgroundColor": "red" } }, [ vue.createElementVNode("view", { class: "redBg bg-color" }, [ vue.createElementVNode("view", { class: "header" }, [ vue.createElementVNode("view", { class: "nav acea-row row-center-wrapper", style: { "display": "flex" } }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.tabMaps, (item, index2) => { return vue.createElementVNode("view", { class: vue.normalizeClass(["item", $setup.state.currentTab === index2 ? "font-color" : ""]), key: index2, onClick: ($event) => $setup.switchTap(index2) }, vue.toDisplayString(item), 11, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]), vue.createCommentVNode(" top3 排名 "), vue.createElementVNode("view", { class: "rank acea-row row-bottom row-around" }, [ vue.withDirectives(vue.createElementVNode( "view", { class: "item" }, [ vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: $setup.state.two.avatar }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "name line1" }, vue.toDisplayString($setup.state.two.nickname), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString($setup.state.two.brokerageUserCount) + "人", 1 /* TEXT */ ) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.two.id] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "item" }, [ vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: $setup.state.one.avatar }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "name line1" }, vue.toDisplayString($setup.state.one.nickname), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString($setup.state.one.brokerageUserCount) + "人", 1 /* TEXT */ ) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.one.id] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "item" }, [ vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: $setup.state.three.avatar }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "name line1" }, vue.toDisplayString($setup.state.three.nickname), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString($setup.state.three.brokerageUserCount) + "人", 1 /* TEXT */ ) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.three.id] ]) ]) ]) ]), vue.createCommentVNode(" 其它排名 "), $setup.state.rankList.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.rankList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item acea-row row-between-wrapper", key: index2 }, [ vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(index2 + 4), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "picTxt acea-row row-between-wrapper" }, [ vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: item.avatar }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "text line1" }, vue.toDisplayString(item.nickname), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "people font-color" }, vue.toDisplayString(item.brokerageUserCount) + "人", 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }); } const PagesCommissionPromoter = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-fe20a205"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/promoter.vue"]]); const _sfc_main$D = { __name: "commission-ranking", setup(__props, { expose: __expose }) { __expose(); const tabMaps = ["周排行", "月排行"]; const state = vue.reactive({ currentTab: 0, position: 0, // 排名 rankList: [] }); async function switchTap(index2) { state.currentTab = index2; state.rankList = []; calculateTimes(); getBrokerageRankList(); getBrokerageRankNumber(); } async function getBrokerageRankList() { const { code: code2, data } = await BrokerageApi.getBrokerageUserChildSummaryPageByPrice({ pageNo: 1, pageSize: 10, "times[0]": state.times[0], "times[1]": state.times[1] }); if (code2 !== 0) { return; } state.rankList = data.list; } async function getBrokerageRankNumber() { const { code: code2, data } = await BrokerageApi.getRankByPrice({ times: state.times }); if (code2 !== 0) { return; } state.position = data; } function formatDate2(date2) { return sheep$1.$helper.timeFormat(date2, "yyyy-mm-dd hh:MM:ss"); } function calculateTimes() { let times2; if (state.currentTab === 0) { times2 = getWeekTimes(); } else { times2 = getMonthTimes(); } state.times = [formatDate2(times2[0]), formatDate2(times2[1])]; } onLoad(function() { calculateTimes(); getBrokerageRankList(); getBrokerageRankNumber(); }); function getWeekTimes() { const today = /* @__PURE__ */ new Date(); const dayOfWeek = today.getDay(); return [ new Date(today.getFullYear(), today.getMonth(), today.getDate() - dayOfWeek, 0, 0, 0), new Date( today.getFullYear(), today.getMonth(), today.getDate() + (6 - dayOfWeek), 23, 59, 59 ) ]; } function getMonthTimes() { const today = /* @__PURE__ */ new Date(); const year = today.getFullYear(); const month = today.getMonth(); const startDate = new Date(year, month, 1, 0, 0, 0); const nextMonth = new Date(year, month + 1, 1); const endDate = new Date(nextMonth.getTime() - 1); return [startDate, endDate]; } const __returned__ = { tabMaps, state, switchTap, getBrokerageRankList, getBrokerageRankNumber, formatDate: formatDate2, calculateTimes, getWeekTimes, getMonthTimes, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, reactive: vue.reactive, get BrokerageApi() { return BrokerageApi; }, get fen2yuan() { return fen2yuan; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) { const _component_emptyPage = vue.resolveComponent("emptyPage"); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "佣金排行榜" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "CommissionRank" }, [ vue.createElementVNode("view", { class: "header" }, [ $setup.state.position ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "rank" }, [ vue.createTextVNode(" 您目前的排名 "), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($setup.state.position), 1 /* TEXT */ ), vue.createTextVNode(" 名 ") ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "rank" }, "您目前暂无排名")) ]), vue.createElementVNode("view", { class: "wrapper" }, [ vue.createElementVNode("view", { class: "nav acea-row row-around", style: { "justify-content": "space-around", "display": "flex" } }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.tabMaps, (item, index2) => { return vue.createElementVNode("view", { class: vue.normalizeClass(["item", $setup.state.currentTab === index2 ? "font-color" : ""]), key: index2, onClick: ($event) => $setup.switchTap(index2) }, vue.toDisplayString(item), 11, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.rankList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item acea-row row-between-wrapper", key: index2 }, [ index2 <= 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "num" }, [ vue.createElementVNode("image", { src: "/static/images/medal0" + (index2 + 1) + ".png" }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "num" }, vue.toDisplayString(index2 + 1), 1 /* TEXT */ )), vue.createElementVNode("view", { class: "picTxt acea-row row-between-wrapper" }, [ vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: item.avatar }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "text line1" }, vue.toDisplayString(item.nickname), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "people font-color" }, "¥" + vue.toDisplayString($setup.fen2yuan(item.brokeragePrice)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), $setup.state.rankList.length === 0 && ($setup.state.page !== 1 || $setup.state.active === 0) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "noCommodity" }, [ vue.createVNode(_component_emptyPage, { title: "暂无排行~" }) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesCommissionCommissionRanking = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-4b4e4229"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/commission-ranking.vue"]]); const _sfc_main$C = { __name: "account-type-select", props: { modelValue: { type: Object, default() { } }, show: { type: Boolean, default: false }, methods: { // 开启的提现方式 type: Array, default: [] } }, emits: ["update:modelValue", "change", "close"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emits = __emit; const state = vue.reactive({ currentValue: "" }); const typeList = [ { // icon: '/static/img/shop/pay/wechat.png', // TODO 非繁人:后续给个 icon title: "钱包余额", value: "1" }, { icon: "/static/img/shop/pay/wechat.png", title: "微信零钱", value: "2" }, { icon: "/static/img/shop/pay/alipay.png", title: "支付宝账户", value: "3" }, { icon: "/static/img/shop/pay/bank.png", title: "银行卡转账", value: "4" } ]; function onChange(e2) { state.currentValue = e2.detail.value; } const onConfirm = async () => { if (state.currentValue === "") { sheep$1.$helper.toast("请选择提现方式"); return; } emits("update:modelValue", { type: state.currentValue }); emits("close"); }; const hideModal = () => { emits("close"); }; const __returned__ = { props, emits, state, typeList, onChange, onConfirm, hideModal, reactive: vue.reactive, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createBlock(_component_su_popup, { show: $props.show, class: "ss-checkout-counter-wrap", onClose: $setup.hideModal }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-modal-box bg-white ss-flex-col" }, [ vue.createElementVNode("view", { class: "modal-header ss-flex-col ss-col-left" }, [ vue.createElementVNode("text", { class: "modal-title ss-m-b-20" }, "选择提现方式") ]), vue.createElementVNode("view", { class: "modal-content ss-flex-1 ss-p-b-100" }, [ vue.createElementVNode( "radio-group", { onChange: $setup.onChange }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.typeList, (item, index2) => { return vue.createElementVNode("label", { class: "container-list ss-p-l-34 ss-p-r-24 ss-flex ss-col-center ss-row-center", key: index2 }, [ vue.createElementVNode("view", { class: "container-icon ss-flex ss-m-r-20" }, [ vue.createElementVNode("image", { src: $setup.sheep.$url.static(item.icon) }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "ss-flex-1" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("radio", { value: item.value, color: "var(--ui-BG-Main)", checked: item.value === $setup.state.currentValue, disabled: !$props.methods.includes(parseInt(item.value)) }, null, 8, ["value", "checked", "disabled"]) ]); }), 64 /* STABLE_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]), vue.createElementVNode("view", { class: "modal-footer ss-flex ss-row-center ss-col-center" }, [ vue.createElementVNode("button", { class: "ss-reset-button save-btn", onClick: $setup.onConfirm }, "确定") ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]); } const accountTypeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-a5da3655"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/account-type-select.vue"]]); const _sfc_main$B = { __name: "withdraw", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "cf14c8af-headerBg": vue.unref(headerBg) })); const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png"); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userStore = sheep$1.$store("user"); const userInfo2 = vue.computed(() => userStore.userInfo); const state = vue.reactive({ accountInfo: { // 提现表单 type: void 0, accountNo: void 0, accountQrCodeUrl: void 0, name: void 0, bankName: void 0, bankAddress: void 0 }, accountSelect: false, brokerageInfo: {}, // 分销信息 frozenDays: 0, // 冻结天数 minPrice: 0, // 最低提现金额 withdrawTypes: [] // 提现方式 }); const onAccountSelect = (e2) => { state.accountSelect = e2; }; const onConfirm = async () => { debugger; if (!state.accountInfo.price || state.accountInfo.price > state.brokerageInfo.price || state.accountInfo.price <= 0) { sheep$1.$helper.toast("请输入正确的提现金额"); return; } if (!state.accountInfo.type) { sheep$1.$helper.toast("请选择提现方式"); return; } let { code: code2 } = await BrokerageApi.createBrokerageWithdraw({ ...state.accountInfo, price: state.accountInfo.price * 100 }); if (code2 !== 0) { return; } uni.showModal({ title: "操作成功", content: "您的提现申请已成功提交", cancelText: "继续提现", confirmText: "查看记录", success: (res) => { if (res.confirm) { sheep$1.$router.go("/pages/commission/wallet", { type: 2 }); return; } getBrokerageUser(); state.accountInfo = {}; } }); }; async function getWithdrawRules() { let { code: code2, data } = await TradeConfigApi.getTradeConfig(); if (code2 !== 0) { return; } if (data) { state.minPrice = data.brokerageWithdrawMinPrice || 0; state.frozenDays = data.brokerageFrozenDays || 0; state.withdrawTypes = data.brokerageWithdrawTypes; } } async function getBrokerageUser() { const { data, code: code2 } = await BrokerageApi.getBrokerageUser(); if (code2 === 0) { state.brokerageInfo = data; } } vue.onBeforeMount(() => { getWithdrawRules(); getBrokerageUser(); }); const __returned__ = { headerBg, statusBarHeight, userStore, userInfo: userInfo2, state, onAccountSelect, onConfirm, getWithdrawRules, getBrokerageUser, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get sheep() { return sheep$1; }, accountTypeSelect, get fen2yuan() { return fen2yuan; }, get TradeConfigApi() { return TradeConfigApi; }, get BrokerageApi() { return BrokerageApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "申请提现", class: "withdraw-wrap", navbar: "inner" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-bg" }), vue.createElementVNode( "view", { class: "wallet-num-box ss-flex ss-col-center ss-row-between", style: vue.normalizeStyle([ { marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx", paddingTop: Number($setup.statusBarHeight + 108) + "rpx" } ]) }, [ vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "num-title" }, "可提现金额(元)"), vue.createElementVNode( "view", { class: "wallet-num" }, vue.toDisplayString($setup.fen2yuan($setup.state.brokerageInfo.brokeragePrice)), 1 /* TEXT */ ) ]), vue.createElementVNode("button", { class: "ss-reset-button log-btn", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/commission/wallet", { type: 2 })) }, " 提现记录 ") ], 4 /* STYLE */ ), vue.createCommentVNode(" 提现输入卡片"), vue.createElementVNode("view", { class: "draw-card" }, [ vue.createElementVNode("view", { class: "bank-box ss-flex ss-col-center ss-row-between ss-m-b-30" }, [ vue.createElementVNode("view", { class: "name" }, "提现至"), vue.createElementVNode("view", { class: "bank-list ss-flex ss-col-center", onClick: _cache[1] || (_cache[1] = ($event) => $setup.onAccountSelect(true)) }, [ !$setup.state.accountInfo.type ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-text" }, "请选择提现方式")) : vue.createCommentVNode("v-if", true), $setup.state.accountInfo.type === "1" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-text" }, "钱包余额")) : vue.createCommentVNode("v-if", true), $setup.state.accountInfo.type === "2" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "empty-text" }, "微信零钱")) : vue.createCommentVNode("v-if", true), $setup.state.accountInfo.type === "3" ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "empty-text" }, "支付宝账户")) : vue.createCommentVNode("v-if", true), $setup.state.accountInfo.type === "4" ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "empty-text" }, "银行卡转账")) : vue.createCommentVNode("v-if", true), vue.createElementVNode("text", { class: "cicon-forward" }) ]) ]), vue.createCommentVNode(" 提现金额 "), vue.createElementVNode("view", { class: "card-title" }, "提现金额"), vue.createElementVNode("view", { class: "input-box ss-flex ss-col-center border-bottom" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createVNode(_component_uni_easyinput, { inputBorder: false, class: "ss-flex-1 ss-p-l-10", modelValue: $setup.state.accountInfo.price, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.accountInfo.price = $event), type: "number", placeholder: "请输入提现金额" }, null, 8, ["modelValue"]) ]), vue.createCommentVNode(" 提现账号 "), vue.withDirectives(vue.createElementVNode( "view", { class: "card-title" }, " 提现账号 ", 512 /* NEED_PATCH */ ), [ [vue.vShow, ["2", "3", "4"].includes($setup.state.accountInfo.type)] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "input-box ss-flex ss-col-center border-bottom" }, [ vue.createElementVNode("view", { class: "unit" }), vue.createVNode(_component_uni_easyinput, { inputBorder: false, class: "ss-flex-1 ss-p-l-10", modelValue: $setup.state.accountInfo.accountNo, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.accountInfo.accountNo = $event), placeholder: "请输入提现账号" }, null, 8, ["modelValue"]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, ["2", "3", "4"].includes($setup.state.accountInfo.type)] ]), vue.createCommentVNode(" 收款码 "), vue.withDirectives(vue.createElementVNode( "view", { class: "card-title" }, "收款码", 512 /* NEED_PATCH */ ), [ [vue.vShow, ["2", "3"].includes($setup.state.accountInfo.type)] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "input-box ss-flex ss-col-center" }, [ vue.createElementVNode("view", { class: "unit" }), vue.createElementVNode("view", { class: "upload-img" }, [ vue.createVNode(_component_s_uploader, { url: $setup.state.accountInfo.accountQrCodeUrl, "onUpdate:url": _cache[4] || (_cache[4] = ($event) => $setup.state.accountInfo.accountQrCodeUrl = $event), fileMediatype: "image", limit: "1", mode: "grid", imageStyles: { width: "168rpx", height: "168rpx" } }, null, 8, ["url"]) ]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, ["2", "3"].includes($setup.state.accountInfo.type)] ]), vue.createCommentVNode(" 持卡人姓名 "), vue.withDirectives(vue.createElementVNode( "view", { class: "card-title" }, "持卡人", 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.accountInfo.type === "4"] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "input-box ss-flex ss-col-center border-bottom" }, [ vue.createElementVNode("view", { class: "unit" }), vue.createVNode(_component_uni_easyinput, { inputBorder: false, class: "ss-flex-1 ss-p-l-10", modelValue: $setup.state.accountInfo.name, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.accountInfo.name = $event), placeholder: "请输入持卡人姓名" }, null, 8, ["modelValue"]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.accountInfo.type === "4"] ]), vue.createCommentVNode(" 提现银行 "), vue.withDirectives(vue.createElementVNode( "view", { class: "card-title" }, "提现银行", 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.accountInfo.type === "4"] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "input-box ss-flex ss-col-center border-bottom" }, [ vue.createElementVNode("view", { class: "unit" }), vue.createVNode(_component_uni_easyinput, { inputBorder: false, class: "ss-flex-1 ss-p-l-10", modelValue: $setup.state.accountInfo.bankName, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.accountInfo.bankName = $event), placeholder: "请输入提现银行" }, null, 8, ["modelValue"]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.accountInfo.type === "4"] ]), vue.createCommentVNode(" 开户地址 "), vue.withDirectives(vue.createElementVNode( "view", { class: "card-title" }, "开户地址", 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.accountInfo.type === "4"] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "input-box ss-flex ss-col-center border-bottom" }, [ vue.createElementVNode("view", { class: "unit" }), vue.createVNode(_component_uni_easyinput, { inputBorder: false, class: "ss-flex-1 ss-p-l-10", modelValue: $setup.state.accountInfo.bankAddress, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.accountInfo.bankAddress = $event), placeholder: "请输入开户地址" }, null, 8, ["modelValue"]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.state.accountInfo.type === "4"] ]), vue.createElementVNode("button", { class: "ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main", onClick: $setup.onConfirm }, " 确认提现 ") ]), vue.createCommentVNode(" 提现说明 "), vue.createElementVNode("view", { class: "draw-notice" }, [ vue.createElementVNode("view", { class: "title ss-m-b-30" }, "提现说明"), vue.createElementVNode( "view", { class: "draw-list" }, " 最低提现金额 " + vue.toDisplayString($setup.fen2yuan($setup.state.minPrice)) + " 元 ", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "draw-list" }, [ vue.createTextVNode(" 冻结佣金:"), vue.createElementVNode( "text", null, "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.brokerageInfo.frozenPrice)), 1 /* TEXT */ ), vue.createTextVNode( " (每笔佣金的冻结期为 " + vue.toDisplayString($setup.state.frozenDays) + " 天,到期后可提现) ", 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 选择提现账户 "), vue.createVNode($setup["accountTypeSelect"], { show: $setup.state.accountSelect, onClose: _cache[8] || (_cache[8] = ($event) => $setup.onAccountSelect(false)), round: "10", modelValue: $setup.state.accountInfo, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.state.accountInfo = $event), methods: $setup.state.withdrawTypes }, null, 8, ["show", "modelValue", "methods"]) ]), _: 1 /* STABLE */ }); } const PagesCommissionWithdraw = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-cf14c8af"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/withdraw.vue"]]); const _sfc_main$A = { __name: "sign", setup(__props, { expose: __expose }) { __expose(); vue.useCssVars((_ctx) => ({ "964858d2-headerBg": vue.unref(headerBg) })); const headerBg = sheep$1.$url.css("/static/images/sign.png"); const state = vue.reactive({ data: { days: [], //日历 rules: {} //规则 }, cur_year: 0, //当前选的年 cur_month: 0, //当前选的月 cur_day: 0, //当前选择的天 weeks_ch: [ { title: t$6("sign.sunday"), value: "0" }, { title: t$6("sign.monday"), value: "1" }, { title: t$6("sign.tuesday"), value: "2" }, { title: t$6("sign.wednesday"), value: "3" }, { title: t$6("sign.thursday"), value: "4" }, { title: t$6("sign.friday"), value: "5" }, { title: t$6("sign.saturday"), value: "6" } ], //星期 showModel: false, //签到弹框 continue_days: 0, //连续签到天数 signin: {}, // 签到 showRetroactive: false, //补签弹框 date: "", //补签选中日期 isSign: 0, //今天是否签到 loading: true }); async function onSign2() { const { code: code2, data } = await SignInApi.createSignInRecord(); if (code2 === 0) { state.showModel = true; state.signin = data; state.isSign = 1; uni.setStorageSync("isSign", true); } } function onShowRetroactive(e2) { state.showRetroactive = true; state.date = e2; } vue.watch(() => state.showModel, (newValue) => { if (newValue) { setTimeout(onConfirm, 3e3); } }); function onConfirm() { state.showModel = false; getData({ month: formatDate2(/* @__PURE__ */ new Date()).substring(0, 7) }); } function formatDate2(t2) { let date2 = new Date(t2); let year = date2.getFullYear(); let month = String(date2.getMonth() + 1).padStart(2, "0"); let day = String(date2.getDate()).padStart(2, "0"); let dateString = `${year}-${month}-${day}`; return dateString; } async function getData(mouth) { const { code: code2, data } = await SignInApi.getOwnSignInMoon(mouth); if (code2 === 0) { data.days.forEach((i2, index2) => { if (i2.week == "SUNDAY") { i2.week = 0; } else if (i2.week == "MONDAY") { i2.week = 1; } else if (i2.week == "TUESDAY") { i2.week = 2; } else if (i2.week == "WEDNESDAY") { i2.week = 3; } else if (i2.week == "THURSDAY") { i2.week = 4; } else if (i2.week == "FRIDAY") { i2.week = 5; } else if (i2.week == "SATURDAY") { i2.week = 6; } i2.date = formatDate2(i2.date); }); state.data = data; } else { state.data = null; } state.loading = false; if (state.data) { state.data.days.forEach((i2, index2) => { if (index2 < i2.week) { index2++; var obj = { day: null, isSign: false }; state.data.days.unshift(obj); } if (index2 == 1) { let arr = i2.date.split("-"); state.cur_year = arr[0]; state.cur_month = arr[1]; } }); if (state.data.days[0].day == null) { state.data.days.forEach((i2, index2) => { if (i2.current == "today") { state.isSign = i2.isSign; } }); } state.continue_days = data.continueDays; } } onReady(() => { getData({ month: formatDate2(/* @__PURE__ */ new Date()).substring(0, 7) }); }); const handleCalendar = (type) => { const cur_year = parseInt(state.cur_year); const cur_month = parseInt(state.cur_month); var newMonth; var newYear = cur_year; if (type === 0) { newMonth = cur_month - 1; if (newMonth < 1) { newYear = cur_year - 1; newMonth = 12; } else if (newMonth < 10) { newMonth = "0" + newMonth; } } else { newMonth = cur_month + 1; if (newMonth > 12) { newYear = cur_year + 1; newMonth = "01"; } else if (newMonth < 10) { newMonth = "0" + newMonth; } } getData({ month: newYear + "-" + newMonth }); }; const __returned__ = { headerBg, state, onSign: onSign2, onShowRetroactive, onConfirm, formatDate: formatDate2, getData, handleCalendar, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReady() { return onReady; }, computed: vue.computed, reactive: vue.reactive, watchEffect: vue.watchEffect, watch: vue.watch, onMounted: vue.onMounted, get SignInApi() { return SignInApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: $setup.t("sign.check_in_gift") }, { default: vue.withCtx(() => [ $setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 })) : $setup.state.data && !$setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "sign-wrap" }, [ vue.createCommentVNode(" 签到日历 "), vue.createElementVNode("view", { class: "content-box calendar" }, [ vue.createElementVNode("view", { class: "sign-everyday ss-flex ss-col-center ss-row-between ss-p-x-30" }, [ vue.createElementVNode( "text", { class: "sign-everyday-title" }, vue.toDisplayString($setup.t("sign.check_in")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "sign-num-box" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("sign.consecutive_check_ins")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "sign-num" }, vue.toDisplayString($setup.state.continue_days), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("sign.days")), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 切换年月 "), vue.createElementVNode("view", { class: "bar ss-flex ss-col-center ss-row-center" }, [ vue.createElementVNode("view", { class: "previous", onClick: _cache[0] || (_cache[0] = ($event) => $setup.handleCalendar(0)) }, [ vue.createElementVNode("text", { class: "cicon-back" }) ]), vue.createElementVNode( "view", { class: "date ss-m-x-20" }, vue.toDisplayString($setup.t("sign.month_year", { year: $setup.state.cur_year || "--", month: $setup.state.cur_month || "--" })), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "next", onClick: _cache[1] || (_cache[1] = ($event) => $setup.handleCalendar(1)) }, [ vue.createElementVNode("text", { class: "cicon-forward" }) ]) ]), vue.createCommentVNode(" 显示星期 "), vue.createElementVNode("view", { class: "week ss-flex" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.weeks_ch, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "week-item ss-flex ss-row-center", key: index2 }, vue.toDisplayString(item.title), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createCommentVNode(" 日历表 "), vue.createElementVNode("view", { class: "myDateTable" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.data.days, (item, j2) => { return vue.openBlock(), vue.createElementBlock("view", { key: j2, class: "dateCell ss-flex ss-row-center ss-col-center" }, [ vue.createCommentVNode(" 空格 "), vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center" }, [ vue.createElementVNode("text", { decode: true }, "  ") ]), vue.createElementVNode("view", null, [ vue.createCommentVNode(" 已签到日期 "), item.isSign ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "is-sign ss-flex ss-row-center" }, [ vue.createElementVNode( "view", { class: "is-sign-num" }, vue.toDisplayString(item.day < 10 ? "0" + item.day : item.day), 1 /* TEXT */ ), vue.createElementVNode("image", { class: "is-sign-image", src: $setup.sheep.$url.static("/static/images/correct.png") }, null, 8, ["src"]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 未签到日期 "), vue.createCommentVNode(' '), item.isReplenish == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "is-sign ss-flex ss-row-center" }, [ vue.createElementVNode( "view", { class: "cell-num" }, vue.toDisplayString(item.day < 10 ? "0" + item.day : item.day), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "cicon-title" }) ])) : vue.createCommentVNode("v-if", true), item.isReplenish == 0 && !item.isSign ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "is-sign ss-flex ss-row-center" }, [ vue.createElementVNode( "view", { class: "cell-num" }, vue.toDisplayString(item.day < 10 ? "0" + item.day : item.day), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 签到按钮 "), vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-row-center sign-box ss-m-y-40" }, [ $setup.state.isSign === 0 ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "ss-reset-button sign-btn", onClick: $setup.onSign }, vue.toDisplayString($setup.t("sign.check_in")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $setup.state.isSign === 1 ? (vue.openBlock(), vue.createElementBlock( "button", { key: 1, class: "ss-reset-button already-btn", disabled: "" }, vue.toDisplayString($setup.t("sign.already_checked_in")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]), vue.createElementVNode("view", { class: "bg-white ss-m-t-16 ss-p-t-30 ss-p-b-60 ss-p-x-40" }, [ vue.createElementVNode( "view", { class: "activity-title ss-m-b-30" }, vue.toDisplayString($setup.t("sign.check_in_description")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "activity-des" }, [ vue.createTextVNode( " 1." + vue.toDisplayString($setup.t("sign.daily_check_in_fixed", { social: $setup.state.data.signInSocialStatus })) + " ", 1 /* TEXT */ ), vue.createCommentVNode(` \r ,次日递增奖励 {{ state.data.rules.inc_num }} 身价,直到\r {{ state.data.rules.until_day }} 天之后不再增加\r `) ]), vue.createCommentVNode(' \r\n 2、\r\n 连续签到 {{ i.full }} 天,奖励 {{ i.value }} 身价;\r\n \r\n '), vue.createCommentVNode(` \r {{ state.data.rules.discounts?.length > 0 ? '3' : '2' }}、用户在\r {{ state.data.rules.replenish_limit }} 天内,可补签\r {{ state.data.rules.replenish_days }} 天,每次补签消耗\r {{ state.data.rules.replenish_num }}身价\r `) ]) ])) : !$setup.state.data && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 2, icon: "/static/data-empty.png", text: $setup.t("sign.check_in_not_started") }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_su_popup, { show: $setup.state.showModel, type: "center", round: "10", isMaskClick: false }, { default: vue.withCtx(() => { var _a2, _b2; return [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ vue.createElementVNode("view", { class: "ss-m-t-56 ss-flex-col ss-col-center" }, [ vue.createElementVNode("text", { class: "cicon-check-round" }), vue.createElementVNode( "view", { class: "score-title" }, vue.toDisplayString($setup.t("sign.congratulations_on_check_in")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "model-title ss-flex ss-col-center ss-m-t-22 ss-m-b-30" }, vue.toDisplayString($setup.t("sign.daily_check_in_reward", { social: $setup.state.signin.social })), 1 /* TEXT */ ), ((_a2 = $setup.state) == null ? void 0 : _a2.upgradeOrNot) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "model-title ss-flex ss-col-center ss-m-b-30" }, vue.toDisplayString($setup.t("sign.level_upgraded", { level: (_b2 = $setup.state) == null ? void 0 : _b2.socialStatusName })), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "model-bg ss-flex-col ss-col-center ss-row-right" }, [ vue.createCommentVNode(' 签到成功 '), vue.createElementVNode("view", { class: "ss-m-b-40" }, [ vue.createElementVNode( "button", { class: "ss-reset-button confirm-btn", onClick: _cache[2] || (_cache[2] = ($event) => $setup.onConfirm()) }, vue.toDisplayString($setup.t("common.confirm")), 1 /* TEXT */ ) ]) ]) ]) ]; }), _: 1 /* STABLE */ }, 8, ["show"]), vue.createCommentVNode('\r\n \r\n \r\n \r\n 消耗{{ state.data?.rules.replenish_num }}身价\r\n \r\n 已连续打卡{{ state.continue_days }}天\r\n \r\n \r\n \r\n 确认补签\r\n \r\n \r\n \r\n \r\n \r\n \r\n ') ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesAppSign = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-964858d2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/app/sign.vue"]]); const _sfc_main$z = { __name: "index", setup(__props, { expose: __expose }) { __expose(); uni.hideTabBar(); const template = vue.ref({}); const shopName = vue.ref(""); const state = vue.reactive({ shopName: "", merchantId: 0, shopId: 0 }); const tabbar = vue.ref({ "theme": "red", "style": { "bgType": "color", "bgColor": "#323b4e", "color": "#e6e6e5", "activeColor": "#1fa380" }, "items": [ { "text": t$6("common.shop_index"), "url": "/pages/shop/index", "iconUrl": sheep$1.$url.static("/static/firstIndex/index.svg"), "activeIconUrl": sheep$1.$url.static("/static/firstIndex/index-active.svg") }, { "text": t$6("common.shop_category"), "url": "/pages/shop/category", "iconUrl": sheep$1.$url.static("/static/firstIndex/activity.svg"), "activeIconUrl": sheep$1.$url.static("/static/firstIndex/activity-active.svg") }, { "text": t$6("common.all_product"), "url": "/pages/shop/allproduct", "iconUrl": sheep$1.$url.static("/static/firstIndex/video.svg"), "activeIconUrl": sheep$1.$url.static("/static/firstIndex/video-active.svg") } ] }); onLoad(async (options2) => { if (options2.templateId) { sheep$1.$store("app").init(options2.templateId); } if (options2.spm) { $share.decryptSpm(options2.spm); } if (options2.page) { sheep$1.$router.go(decodeURIComponent(options2.page)); } state.merchantId = options2.merchantId; state.shopId = options2.shopId; state.shopName = options2.shopName; tabbar.value.items = tabbar.value.items.map((item) => { item.url = `${item.url}?shopId=${state.shopId}&shopName=${encodeURIComponent(state.shopName)}&merchantId=${state.merchantId}`; return item; }); const { code: code2, data } = await PageApi.getPage({ shopId: options2.shopId, merchantId: options2.merchantId }); template.value = data.property; }); onPageScroll(() => { }); const __returned__ = { template, shopName, state, tabbar, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, get onLoad() { return onLoad; }, get onPageScroll() { return onPageScroll; }, get onPullDownRefresh() { return onPullDownRefresh; }, get sheep() { return sheep$1; }, get $share() { return $share; }, get PageApi() { return PageApi; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_navbar = resolveEasycom(vue.resolveDynamicComponent("su-navbar"), __easycom_0$o); const _component_s_block_item = resolveEasycom(vue.resolveDynamicComponent("s-block-item"), __easycom_1$3); const _component_s_block = resolveEasycom(vue.resolveDynamicComponent("s-block"), __easycom_2$3); const _component_s_tabbar = resolveEasycom(vue.resolveDynamicComponent("s-tabbar"), __easycom_3$7); return $setup.template ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_su_navbar, { title: $setup.state.shopName, statusBar: "", color: _ctx.color, tools: _ctx.tools, opacityBgUi: _ctx.opacityBgUi, onSearch: _cache[0] || (_cache[0] = (e2) => _ctx.emits("search", e2)), defaultSearch: _ctx.defaultSearch }, null, 8, ["title", "color", "tools", "opacityBgUi", "defaultSearch"]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.template.components, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_s_block, { key: index2, styles: item.property.style }, { default: vue.withCtx(() => [ vue.createVNode(_component_s_block_item, { type: item.id, data: item.property, styles: item.property.style }, null, 8, ["type", "data", "styles"]) ]), _: 2 /* DYNAMIC */ }, 1032, ["styles"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createVNode(_component_s_tabbar, { path: "/pages/shop/index", tabbar: $setup.tabbar }, null, 8, ["tabbar"]) ])) : vue.createCommentVNode("v-if", true); } const PagesShopIndex = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/shop/index.vue"]]); const _sfc_main$y = { __name: "category", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ style: "second_one", // first_one(一级 - 样式一), first_two(二级 - 样式二), second_one(二级) categoryList: [], // 商品分类树 activeMenu: 0, // 选中的一级菜单,在 categoryList 的下标 pagination: { // 商品分页 list: [], // 商品列表 total: [], // 商品总数 pageNo: 1, pageSize: 6 }, loadStatus: "" }); const { safeArea } = sheep$1.$platform.device; const pageHeight = vue.computed(() => safeArea.height - 44 - 50); async function getList() { const { code: code2, data } = await CategoryApi.getCategoryList(); if (code2 !== 0) { return; } state.categoryList = handleTree(data); } const onMenu = (val) => { state.activeMenu = val; if (state.style === "first_one" || state.style === "first_two") { state.pagination.pageNo = 1; state.pagination.list = []; state.pagination.total = 0; getGoodsList(); } }; async function getGoodsList() { state.loadStatus = "loading"; const res = await SpuApi.getSpuPage({ categoryId: state.categoryList[state.activeMenu].id, pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (res.code !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, res.data.list); state.pagination.total = res.data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getGoodsList(); } onLoad(async () => { await getList(); if (state.style === "first_one" || state.style === "first_two") { onMenu(0); } }); onReachBottom(() => { loadMore(); }); const __returned__ = { state, safeArea, pageHeight, getList, onMenu, getGoodsList, loadMore, get sheep() { return sheep$1; }, get CategoryApi() { return CategoryApi; }, get SpuApi() { return SpuApi; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get _() { return _$1; }, get handleTree() { return handleTree; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) { const _component_first_one = vue.resolveComponent("first-one"); const _component_first_two = vue.resolveComponent("first-two"); const _component_second_one = vue.resolveComponent("second-one"); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: _ctx.$t("common.category"), tabbar: "/pages/index/category", bgStyle: { color: "#fff" } }, { default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", { class: "s-category" }, [ vue.createElementVNode( "view", { class: "three-level-wrap ss-flex ss-col-top", style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }]) }, [ vue.createCommentVNode(" 商品分类(左) "), vue.createElementVNode( "scroll-view", { class: "side-menu-wrap", "scroll-y": "", style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.categoryList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["menu-item ss-flex", [{ "menu-item-active": index2 === $setup.state.activeMenu }]]), key: item.id, onClick: ($event) => $setup.onMenu(index2) }, [ vue.createElementVNode( "view", { class: "menu-title ss-line-1" }, vue.toDisplayString(item.name), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ), vue.createCommentVNode(" 商品分类(右) "), ((_a2 = $setup.state.categoryList) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock( "scroll-view", { key: 0, class: "goods-list-box", "scroll-y": "", style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }]) }, [ $setup.state.categoryList[$setup.state.activeMenu].picUrl ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "banner-img", src: $setup.sheep.$url.cdn($setup.state.categoryList[$setup.state.activeMenu].picUrl), mode: "widthFix" }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true), $setup.state.style === "first_one" ? (vue.openBlock(), vue.createBlock(_component_first_one, { key: 1, pagination: $setup.state.pagination }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true), $setup.state.style === "first_two" ? (vue.openBlock(), vue.createBlock(_component_first_two, { key: 2, pagination: $setup.state.pagination }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true), $setup.state.style === "second_one" ? (vue.openBlock(), vue.createBlock(_component_second_one, { key: 3, data: $setup.state.categoryList, activeMenu: $setup.state.activeMenu }, null, 8, ["data", "activeMenu"])) : vue.createCommentVNode("v-if", true), ($setup.state.style === "first_one" || $setup.state.style === "first_two") && $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 4, status: $setup.state.loadStatus, "content-text": { contentdown: "点击查看更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]) ]; }), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesShopCategory = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-cb6343c4"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/shop/category.vue"]]); const _sfc_main$x = { __name: "allproduct", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ style: "second_one", // first_one(一级 - 样式一), first_two(二级 - 样式二), second_one(二级) categoryList: [], // 商品分类树 activeMenu: 0, // 选中的一级菜单,在 categoryList 的下标 pagination: { // 商品分页 list: [], // 商品列表 total: [], // 商品总数 pageNo: 1, pageSize: 6 }, loadStatus: "" }); const { safeArea } = sheep$1.$platform.device; const pageHeight = vue.computed(() => safeArea.height - 44 - 50); async function getList() { const { code: code2, data } = await CategoryApi.getCategoryList(); if (code2 !== 0) { return; } state.categoryList = handleTree(data); } const onMenu = (val) => { state.activeMenu = val; if (state.style === "first_one" || state.style === "first_two") { state.pagination.pageNo = 1; state.pagination.list = []; state.pagination.total = 0; getGoodsList(); } }; async function getGoodsList() { state.loadStatus = "loading"; const res = await SpuApi.getSpuPage({ categoryId: state.categoryList[state.activeMenu].id, pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (res.code !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, res.data.list); state.pagination.total = res.data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getGoodsList(); } onLoad(async () => { await getList(); if (state.style === "first_one" || state.style === "first_two") { onMenu(0); } }); onReachBottom(() => { loadMore(); }); const __returned__ = { state, safeArea, pageHeight, getList, onMenu, getGoodsList, loadMore, get sheep() { return sheep$1; }, get CategoryApi() { return CategoryApi; }, get SpuApi() { return SpuApi; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get _() { return _$1; }, get handleTree() { return handleTree; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) { const _component_first_one = vue.resolveComponent("first-one"); const _component_first_two = vue.resolveComponent("first-two"); const _component_second_one = vue.resolveComponent("second-one"); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: _ctx.$t("common.category"), tabbar: "/pages/index/category", bgStyle: { color: "#fff" } }, { default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", { class: "s-category" }, [ vue.createElementVNode( "view", { class: "three-level-wrap ss-flex ss-col-top", style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }]) }, [ vue.createCommentVNode(" 商品分类(左) "), vue.createElementVNode( "scroll-view", { class: "side-menu-wrap", "scroll-y": "", style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.categoryList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["menu-item ss-flex", [{ "menu-item-active": index2 === $setup.state.activeMenu }]]), key: item.id, onClick: ($event) => $setup.onMenu(index2) }, [ vue.createElementVNode( "view", { class: "menu-title ss-line-1" }, vue.toDisplayString(item.name), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ), vue.createCommentVNode(" 商品分类(右) "), ((_a2 = $setup.state.categoryList) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock( "scroll-view", { key: 0, class: "goods-list-box", "scroll-y": "", style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }]) }, [ $setup.state.categoryList[$setup.state.activeMenu].picUrl ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "banner-img", src: $setup.sheep.$url.cdn($setup.state.categoryList[$setup.state.activeMenu].picUrl), mode: "widthFix" }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true), $setup.state.style === "first_one" ? (vue.openBlock(), vue.createBlock(_component_first_one, { key: 1, pagination: $setup.state.pagination }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true), $setup.state.style === "first_two" ? (vue.openBlock(), vue.createBlock(_component_first_two, { key: 2, pagination: $setup.state.pagination }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true), $setup.state.style === "second_one" ? (vue.openBlock(), vue.createBlock(_component_second_one, { key: 3, data: $setup.state.categoryList, activeMenu: $setup.state.activeMenu }, null, 8, ["data", "activeMenu"])) : vue.createCommentVNode("v-if", true), ($setup.state.style === "first_one" || $setup.state.style === "first_two") && $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 4, status: $setup.state.loadStatus, "content-text": { contentdown: "点击查看更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]) ]; }), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesShopAllproduct = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-d2ae9314"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/shop/allproduct.vue"]]); const _imports_0$2 = "/static/zxlogo.png"; const _sfc_main$w = { __name: "setting", setup(__props, { expose: __expose }) { __expose(); const appInfo = vue.computed(() => sheep$1.$store("app").info); const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); const storageSize = uni.getStorageInfoSync().currentSize + "Kb"; const state = vue.reactive({ showModal: false }); function onCheckUpdate() { sheep$1.$platform.checkUpdate(); } function onLogoff() { uni.showModal({ title: t$6("setting.prompt"), content: t$6("common.confirm_logout"), success: async function(res) { if (!res.confirm) { return; } const { code: code2 } = await AuthUtil.logout(); if (code2 !== 0) { return; } sheep$1.$store("user").logout(); sheep$1.$router.go("/pages/index/user"); } }); } const __returned__ = { appInfo, isLogin, storageSize, state, onCheckUpdate, onLogoff, get sheep() { return sheep$1; }, computed: vue.computed, reactive: vue.reactive, get AuthUtil() { return AuthUtil; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_list_item = resolveEasycom(vue.resolveDynamicComponent("uni-list-item"), __easycom_0$i); const _component_uni_list = resolveEasycom(vue.resolveDynamicComponent("uni-list"), __easycom_1$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "set-wrap", title: $setup.t("common.system"), bgStyle: { color: "#fff" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "header-box ss-flex-col ss-row-center ss-col-center" }, [ vue.createElementVNode("image", { class: "logo-img ss-m-b-46", src: _imports_0$2, mode: "aspectFit" }), vue.createElementVNode( "view", { class: "name ss-m-b-24" }, vue.toDisplayString($setup.appInfo.name), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "container-list" }, [ vue.createVNode(_component_uni_list, { border: false }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_list_item, { title: $setup.t("common.current_version"), rightText: $setup.appInfo.version, showArrow: "", clickable: "", border: false, class: "list-border", onClick: $setup.onCheckUpdate }, null, 8, ["title", "rightText"]), vue.createVNode(_component_uni_list_item, { title: $setup.t("common.local_cache"), rightText: $setup.storageSize, showArrow: "", border: false, class: "list-border" }, null, 8, ["title"]), vue.createVNode(_component_uni_list_item, { title: $setup.t("common.about_us"), showArrow: "", clickable: "", border: false, class: "list-border", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/public/richtext", { title: "关于我们" })) }, null, 8, ["title"]), vue.createCommentVNode(" 为了过审 只有 iOS-App 有注销账号功能 "), $setup.isLogin && $setup.sheep.$platform.os === "ios" && $setup.sheep.$platform.name === "App" ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, { key: 0, title: $setup.t("common.logout_account"), rightText: "", showArrow: "", clickable: "", border: false, class: "list-border", onClick: $setup.onLogoff }, null, 8, ["title"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode("view", { class: "set-footer ss-flex-col ss-row-center ss-col-center" }, [ vue.createElementVNode("view", { class: "agreement-box ss-flex ss-col-center ss-m-b-40" }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-m-b-10" }, [ vue.createElementVNode( "view", { class: "tcp-text", onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/public/richtext", { title: "用户协议" })) }, vue.toDisplayString($setup.t("account.user_agreement")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "agreement-text" }, "  " + vue.toDisplayString($setup.t("account.and")) + "  ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "tcp-text", onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/public/richtext", { title: "隐私协议" })) }, vue.toDisplayString($setup.t("account.privacy_policy")), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(' {{ appInfo.copyright }} '), vue.createCommentVNode(' {{ appInfo.copytime }} ') ]), vue.createCommentVNode(' \r\n \r\n \r\n \r\n ') ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesPublicSetting = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-5fed78fb"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/setting.vue"]]); const _sfc_main$v = { name: "uniCollapseItem", props: { // 列表标题 title: { type: String, default: "" }, name: { type: [Number, String], default: "" }, // 是否禁用 disabled: { type: Boolean, default: false }, // 是否显示动画,app 端默认不开启动画,卡顿严重 showAnimation: { type: Boolean, default: false }, // 是否展开 open: { type: Boolean, default: false }, // 缩略图 thumb: { type: String, default: "" }, // 标题分隔线显示类型 titleBorder: { type: String, default: "auto" }, border: { type: Boolean, default: true }, showArrow: { type: Boolean, default: true } }, data() { const elId = `Uni_${Math.ceil(Math.random() * 1e6).toString(36)}`; return { isOpen: false, isheight: null, height: 0, elId, nameSync: 0 }; }, watch: { open(val) { this.isOpen = val; this.onClick(val, "init"); } }, updated(e2) { this.$nextTick(() => { this.init(true); }); }, created() { this.collapse = this.getCollapse(); this.oldHeight = 0; this.onClick(this.open, "init"); }, // TODO vue3 unmounted() { this.__isUnmounted = true; this.uninstall(); }, mounted() { if (!this.collapse) return; if (this.name !== "") { this.nameSync = this.name; } else { this.nameSync = this.collapse.childrens.length + ""; } if (this.collapse.names.indexOf(this.nameSync) === -1) { this.collapse.names.push(this.nameSync); } else { formatAppLog("warn", "at uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue:154", `name 值 ${this.nameSync} 重复`); } if (this.collapse.childrens.indexOf(this) === -1) { this.collapse.childrens.push(this); } this.init(); }, methods: { init(type) { this.getCollapseHeight(type); }, uninstall() { if (this.collapse) { this.collapse.childrens.forEach((item, index2) => { if (item === this) { this.collapse.childrens.splice(index2, 1); } }); this.collapse.names.forEach((item, index2) => { if (item === this.nameSync) { this.collapse.names.splice(index2, 1); } }); } }, onClick(isOpen, type) { if (this.disabled) return; this.isOpen = isOpen; if (this.isOpen && this.collapse) { this.collapse.setAccordion(this); } if (type !== "init") { this.collapse.onChange(isOpen, this); } }, getCollapseHeight(type, index2 = 0) { const views = uni.createSelectorQuery().in(this); views.select(`#${this.elId}`).fields({ size: true }, (data) => { if (index2 >= 10) return; if (!data) { index2++; this.getCollapseHeight(false, index2); return; } this.height = data.height; this.isheight = true; if (type) return; this.onClick(this.isOpen, "init"); }).exec(); }, getNvueHwight(type) { dom.getComponentRect(this.$refs["collapse--hook"], (option) => { if (option && option.result && option.size) { this.height = option.size.height; this.isheight = true; if (type) return; this.onClick(this.open, "init"); } }); }, /** * 获取父元素实例 */ getCollapse(name2 = "uniCollapse") { let parent2 = this.$parent; let parentName = parent2.$options.name; while (parentName !== name2) { parent2 = parent2.$parent; if (!parent2) return false; parentName = parent2.$options.name; } return parent2; } } }; function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-collapse-item" }, [ vue.createCommentVNode(" onClick(!isOpen) "), vue.createElementVNode( "view", { onClick: _cache[0] || (_cache[0] = ($event) => $options.onClick(!$data.isOpen)), class: vue.normalizeClass(["uni-collapse-item__title", { "is-open": $data.isOpen && $props.titleBorder === "auto", "uni-collapse-item-border": $props.titleBorder !== "none" }]) }, [ vue.createElementVNode("view", { class: "uni-collapse-item__title-wrap" }, [ vue.renderSlot(_ctx.$slots, "title", {}, () => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-collapse-item__title-box", { "is-disabled": $props.disabled }]) }, [ $props.thumb ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: $props.thumb, class: "uni-collapse-item__title-img" }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "uni-collapse-item__title-text" }, vue.toDisplayString($props.title), 1 /* TEXT */ ) ], 2 /* CLASS */ ) ], true) ]), $props.showArrow ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass([{ "uni-collapse-item__title-arrow-active": $data.isOpen, "uni-collapse-item--animation": $props.showAnimation === true }, "uni-collapse-item__title-arrow"]) }, [ vue.createVNode(_component_uni_icons, { color: $props.disabled ? "#ddd" : "#bbb", size: "14", type: "bottom" }, null, 8, ["color"]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-collapse-item__wrap", { "is--transition": $props.showAnimation }]), style: vue.normalizeStyle({ height: ($data.isOpen ? $data.height : 0) + "px" }) }, [ vue.createElementVNode("view", { id: $data.elId, ref: "collapse--hook", class: vue.normalizeClass(["uni-collapse-item__wrap-content", { open: $data.isheight, "uni-collapse-item--border": $props.border && $data.isOpen }]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 10, ["id"]) ], 6 /* CLASS, STYLE */ ) ]); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-3d2dde9f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue"]]); const _sfc_main$u = { name: "uniCollapse", emits: ["change", "activeItem", "input", "update:modelValue"], props: { value: { type: [String, Array], default: "" }, modelValue: { type: [String, Array], default: "" }, accordion: { // 是否开启手风琴效果 type: [Boolean, String], default: false } }, data() { return {}; }, computed: { // TODO 兼容 vue2 和 vue3 dataValue() { let value = typeof this.value === "string" && this.value === "" || Array.isArray(this.value) && this.value.length === 0; let modelValue = typeof this.modelValue === "string" && this.modelValue === "" || Array.isArray(this.modelValue) && this.modelValue.length === 0; if (value) { return this.modelValue; } if (modelValue) { return this.value; } return this.value; } }, watch: { dataValue(val) { this.setOpen(val); } }, created() { this.childrens = []; this.names = []; }, mounted() { this.$nextTick(() => { this.setOpen(this.dataValue); }); }, methods: { setOpen(val) { let str = typeof val === "string"; let arr = Array.isArray(val); this.childrens.forEach((vm, index2) => { if (str) { if (val === vm.nameSync) { if (!this.accordion) { formatAppLog("warn", "at uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue:75", "accordion 属性为 false ,v-model 类型应该为 array"); return; } vm.isOpen = true; } } if (arr) { val.forEach((v2) => { if (v2 === vm.nameSync) { if (this.accordion) { formatAppLog("warn", "at uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue:85", "accordion 属性为 true ,v-model 类型应该为 string"); return; } vm.isOpen = true; } }); } }); this.emit(val); }, setAccordion(self2) { if (!this.accordion) return; this.childrens.forEach((vm, index2) => { if (self2 !== vm) { vm.isOpen = false; } }); }, resize() { this.childrens.forEach((vm, index2) => { vm.getCollapseHeight(); }); }, onChange(isOpen, self2) { let activeItem = []; if (this.accordion) { activeItem = isOpen ? self2.nameSync : ""; } else { this.childrens.forEach((vm, index2) => { if (vm.isOpen) { activeItem.push(vm.nameSync); } }); } this.$emit("change", activeItem); this.emit(activeItem); }, emit(val) { this.$emit("input", val); this.$emit("update:modelValue", val); } } }; function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-collapse" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]); } const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-3f050360"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue"]]); const _sfc_main$t = { __name: "faq", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ list: [], loading: true }); async function getFaqList() { const { error: error2, data } = await sheep$1.$api.data.faq(); if (error2 === 0) { state.list = data; state.loading = false; } } onLoad(() => { { sheep$1.$router.go("/pages/public/richtext", { title: "常见问题" }); return; } }); const __returned__ = { state, getFaqList, get onLoad() { return onLoad; }, reactive: vue.reactive, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_collapse_item = resolveEasycom(vue.resolveDynamicComponent("uni-collapse-item"), __easycom_0$2); const _component_uni_collapse = resolveEasycom(vue.resolveDynamicComponent("uni-collapse"), __easycom_1); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "set-wrap", title: "常见问题", bgStyle: { color: "#FFF" } }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_collapse, null, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.list, (item, index2) => { return vue.openBlock(), vue.createBlock( _component_uni_collapse_item, { key: item }, { title: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ss-flex ss-col-center header" }, [ vue.createElementVNode("view", { class: "ss-m-l-20 ss-m-r-20 icon" }, [ vue.createElementVNode("view", { class: "rectangle" }, [ vue.createElementVNode( "view", { class: "num ss-flex ss-row-center ss-col-center" }, vue.toDisplayString(index2 + 1 < 10 ? "0" + (index2 + 1) : index2 + 1), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "triangle" }) ]), vue.createElementVNode( "view", { class: "title ss-m-t-36 ss-m-b-36" }, vue.toDisplayString(item.title), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "content ss-p-l-78 ss-p-r-40 ss-p-b-50 ss-p-t-20" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(item.content), 1 /* TEXT */ ) ]) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }), $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, text: "暂无常见问题", icon: "/static/collect-empty.png" })) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }); } const PagesPublicFaq = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-b3a79332"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/faq.vue"]]); const _sfc_main$s = { __name: "error", setup(__props, { expose: __expose }) { __expose(); const errCode = vue.ref(""); const errMsg = vue.ref(""); onLoad((options2) => { errCode.value = options2.errCode; errMsg.value = options2.errMsg; }); async function onReconnect() { uni.reLaunch({ url: "/pages/index/index" }); await ShoproInit(); } const __returned__ = { errCode, errMsg, onReconnect, get onLoad() { return onLoad; }, ref: vue.ref, get ShoproInit() { return ShoproInit; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); return vue.openBlock(), vue.createElementBlock("view", { class: "error-page" }, [ $setup.errCode === "NetworkError" ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/internet-empty.png", text: "网络连接失败", showAction: "", actionText: "重新连接", onClickAction: $setup.onReconnect, buttonColor: "#132b85" })) : $setup.errCode === "TemplateError" ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, icon: "/static/internet-empty.png", text: "未找到模板", showAction: "", actionText: "重新加载", onClickAction: $setup.onReconnect, buttonColor: "#132b85" })) : $setup.errCode !== "" ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 2, icon: "/static/internet-empty.png", text: $setup.errMsg, showAction: "", actionText: "重新加载", onClickAction: $setup.onReconnect, buttonColor: "#132b85" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]); } const PagesPublicError = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-8e014bcf"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/error.vue"]]); const _sfc_main$r = { __name: "webview", setup(__props, { expose: __expose }) { __expose(); const url2 = vue.ref(""); onLoad((options2) => { url2.value = decodeURIComponent(options2.url); }); const __returned__ = { url: url2, get onLoad() { return onLoad; }, ref: vue.ref }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("web-view", { src: $setup.url }, null, 8, ["src"]) ]); } const PagesPublicWebview = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/webview.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: 20 }, 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; }, postField() { let fields = [this.field]; if (this.parentField) { fields.push(`${this.parentField} as parent_value`); } return fields.join(","); }, 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 = []; }, getCommand(options2 = {}) { let db = Ys.database(this.spaceInfo); const action = options2.action || this.action; if (action) { db = db.action(action); } const collection = options2.collection || this.collection; db = db.collection(collection); const where = options2.where || this.where; if (!(!where || !Object.keys(where).length)) { db = db.where(where); } const field = options2.field || this.field; if (field) { db = db.field(field); } const orderby = options2.orderby || this.orderby; if (orderby) { db = db.orderBy(orderby); } const current = options2.pageCurrent !== void 0 ? options2.pageCurrent : this.page.current; const size = options2.pageSize !== void 0 ? options2.pageSize : this.page.size; const getCount = options2.getcount !== void 0 ? options2.getcount : this.getcount; const getTree = options2.gettree !== void 0 ? options2.gettree : this.gettree; const getOptions = { getCount, getTree }; if (options2.getTreePath) { getOptions.getTreePath = options2.getTreePath; } db = db.skip(size * (current - 1)).limit(size).get(getOptions); return db; }, getNodeData(callback) { if (this.loading) { return; } this.loading = true; this.getCommand({ field: this.postField, where: this._pathWhere() }).then((res) => { this.loading = false; this.selected = res.result.data; callback && callback(); }).catch((err) => { this.loading = false; this.errorMessage = err; }); }, getTreePath(callback) { if (this.loading) { return; } this.loading = true; this.getCommand({ field: this.postField, getTreePath: { startWith: `${this.selfField}=='${this.dataValue}'` } }).then((res) => { this.loading = false; let treePath = []; this._extractTreePath(res.result.data, treePath); this.selected = treePath; callback && callback(); }).catch((err) => { this.loading = false; this.errorMessage = err; }); }, loadData() { if (this.isLocaldata) { this._processLocalData(); return; } if (this.dataValue != null) { this._loadNodeData((data) => { this._treeData = data; this._updateBindData(); this._updateSelected(); }); return; } if (this.stepSearh) { this._loadNodeData((data) => { this._treeData = data; this._updateBindData(); }); } else { this._loadAllData((data) => { this._treeData = []; this._extractTree(data, this._treeData, null); this._updateBindData(); }); } }, _loadAllData(callback) { if (this.loading) { return; } this.loading = true; this.getCommand({ field: this.postField, gettree: true, startwith: `${this.selfField}=='${this.dataValue}'` }).then((res) => { this.loading = false; callback(res.result.data); this.onDataChange(); }).catch((err) => { this.loading = false; this.errorMessage = err; }); }, _loadNodeData(callback, pw) { if (this.loading) { return; } this.loading = true; this.getCommand({ field: this.postField, where: pw || this._postWhere(), pageSize: 500 }).then((res) => { this.loading = false; callback(res.result.data); this.onDataChange(); }).catch((err) => { this.loading = false; this.errorMessage = err; }); }, _pathWhere() { let result2 = []; let where_field = this._getParentNameByField(); if (where_field) { result2.push(`${where_field} == '${this.dataValue}'`); } if (this.where) { return `(${this.where}) && (${result2.join(" || ")})`; } return result2.join(" || "); }, _postWhere() { let result2 = []; let selected = this.selected; let parentField = this.parentField; if (parentField) { result2.push(`${parentField} == null || ${parentField} == ""`); } if (selected.length) { for (var i2 = 0; i2 < selected.length - 1; i2++) { result2.push(`${parentField} == '${selected[i2].value}'`); } } let where = []; if (this.where) { where.push(`(${this.where})`); } if (result2.length) { where.push(`(${result2.join(" || ")})`); } return where.join(" && "); }, _nodeWhere() { let result2 = []; let selected = this.selected; if (selected.length) { result2.push(`${this.parentField} == '${selected[selected.length - 1].value}'`); } if (this.where) { return `(${this.where}) && (${result2.join(" || ")})`; } return result2.join(" || "); }, _getParentNameByField() { const fields = this.field.split(","); let where_field = 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") { where_field = items[0].trim(); break; } } return where_field; }, _isTreeView() { return this.parentField && this.selfField; }, _updateSelected() { var dl = this.dataList; var sl = this.selected; let textField = this.map.text; let valueField = this.map.value; for (var i2 = 0; i2 < sl.length; i2++) { var value = sl[i2].value; var dl2 = dl[i2]; for (var j2 = 0; j2 < dl2.length; j2++) { var item2 = dl2[j2]; if (item2[valueField] === value) { sl[i2].text = item2[textField]; break; } } } }, _updateBindData(node2) { const { dataList, hasNodes } = this._filterData(this._treeData, this.selected); let isleaf = this._stepSearh === false && !hasNodes; if (node2) { node2.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 }; }, _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++) { var value = paths[i2].value; var nodes = data.filter((item) => { return item.parent_value === value; }); if (nodes.length) { dataList.push(nodes); } else { hasNodes = false; } } return { dataList, hasNodes }; }, _extractTree(nodes, result2, parent_value) { let valueField = this.map.value; for (let i2 = 0; i2 < nodes.length; i2++) { let node2 = nodes[i2]; let child = {}; for (let key in node2) { if (key !== "children") { child[key] = node2[key]; } } if (parent_value !== null && parent_value !== void 0 && parent_value !== "") { child.parent_value = parent_value; } result2.push(child); let children = node2.children; if (children) { this._extractTree(children, result2, node2[valueField]); } } }, _extractTreePath(nodes, result2) { for (let i2 = 0; i2 < nodes.length; i2++) { let node2 = nodes[i2]; let child = {}; for (let key in node2) { if (key !== "children") { child[key] = node2[key]; } } result2.push(child); let children = node2.children; if (children) { this._extractTreePath(children, result2); } } }, _findNodePath(key, nodes, path = []) { let textField = this.map.text; let valueField = this.map.value; for (let i2 = 0; i2 < nodes.length; i2++) { let node2 = nodes[i2]; let children = node2.children; let text = node2[textField]; let value = node2[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 []; }, _processLocalData() { this._treeData = []; this._extractTree(this.localdata, this._treeData); var 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); } } }; const _sfc_main$q = { name: "UniDataPickerView", emits: ["nodeclick", "change", "datachange", "update:modelValue"], mixins: [dataPicker], props: { managedMode: { type: Boolean, default: false }, ellipsis: { type: Boolean, default: true } }, data() { return {}; }, created() { if (this.managedMode) { return; } this.$nextTick(() => { this.load(); }); }, methods: { onPropsChange() { this._treeData = []; this.selectedIndex = 0; this.load(); }, load() { if (this.isLocaldata) { this.loadData(); } else if (this.dataValue.length) { this.getTreePath((res) => { this.loadData(); }); } }, handleSelect(index2) { this.selectedIndex = index2; }, handleNodeClick(item, i2, j2) { if (item.disable) { return; } const node2 = this.dataList[i2][j2]; const text = node2[this.map.text]; const value = node2[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 (node2.isleaf) { this.onSelectedChange(node2, node2.isleaf); return; } const { isleaf, hasNodes } = this._updateBindData(); if (!this._isTreeView() && !hasNodes) { this.onSelectedChange(node2, true); return; } if (this.isLocaldata && (!hasNodes || isleaf)) { this.onSelectedChange(node2, true); return; } if (!isleaf && !hasNodes) { this._loadNodeData((data) => { if (!data.length) { node2.isleaf = true; } else { this._treeData.push(...data); this._updateBindData(node2); } this.onSelectedChange(node2, node2.isleaf); }, this._nodeWhere()); return; } this.onSelectedChange(node2, false); }, updateData(data) { this._treeData = data.treeData; this.selected = data.selected; if (!this._treeData.length) { this.loadData(); } else { this._updateBindData(); } }, onDataChange() { this.$emit("datachange"); }, onSelectedChange(node2, isleaf) { if (isleaf) { this._dispatchEvent(); } if (node2) { this.$emit("nodeclick", node2); } }, _dispatchEvent() { this.$emit("change", this.selected.slice(0)); } } }; function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-data-pickerview" }, [ vue.createElementVNode("scroll-view", { class: "selected-area", "scroll-x": "true", "scroll-y": "false", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "selected-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.selected, (item, index2) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ item.text ? (vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["selected-item", { "selected-item-active": index2 == _ctx.selectedIndex, "selected-item-text-overflow": $props.ellipsis }]), key: index2, onClick: ($event) => $options.handleSelect(index2) }, [ vue.createElementVNode( "text", { class: "" }, vue.toDisplayString(item.text), 1 /* TEXT */ ) ], 10, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ ); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "tab-c" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.dataList, (child, i2) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ i2 == _ctx.selectedIndex ? (vue.openBlock(), vue.createElementBlock("scroll-view", { class: "list", key: i2, "scroll-y": true }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(child, (item, j2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["item", { "is-disabled": !!item.disable }]), key: j2, onClick: ($event) => $options.handleNodeClick(item, i2, j2) }, [ vue.createElementVNode( "text", { class: "item-text item-text-overflow" }, vue.toDisplayString(item[_ctx.map.text]), 1 /* TEXT */ ), _ctx.selected.length > i2 && item[_ctx.map.value] == _ctx.selected[i2].value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "check" })) : vue.createCommentVNode("v-if", true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ ); }), 256 /* UNKEYED_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$q, [["render", _sfc_render$p], ["__scopeId", "data-v-91ec6a82"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue"]]); const _sfc_main$p = { name: "UniDataPicker", emits: ["popupopened", "popupclosed", "nodeclick", "input", "change", "update:modelValue"], 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.form = this.getForm("uniForms"); this.formItem = this.getForm("uniFormsItem"); if (this.formItem) { if (this.formItem.name) { this.rename = this.formItem.name; this.form.inputChildrens.push(this); } } this.$nextTick(() => { this.load(); }); }, methods: { clear() { this.inputSelected.splice(0); 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.parentField && !this.selfField && this.hasValue) { this.getNodeData(() => { this.inputSelected = this.selected.slice(0); }); } else if (this.hasValue) { this.getTreePath(() => { this.inputSelected = this.selected.slice(0); }); } }, getForm(name2 = "uniForms") { let parent2 = this.$parent; let parentName = parent2.$options.name; while (parentName !== name2) { parent2 = parent2.$parent; if (!parent2) return false; parentName = parent2.$options.name; } return parent2; }, 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) { 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.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 result2 = []; for (let i2 = 0; i2 < value.length; i2++) { var val = value[i2]; var item = dataList.find((v2) => { return v2.value == val; }); if (item) { result2.push(item); } } if (result2.length) { this.inputSelected = result2; } }, _filterForArray(data, valueArray) { var result2 = []; for (let i2 = 0; i2 < valueArray.length; i2++) { var value = valueArray[i2]; var found = data.find((item) => { return item.value == value; }); if (found) { result2.push(found); } } return result2; }, _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$o(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b); 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, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "selected-item", key: index2 }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item.text), 1 /* TEXT */ ), index2 < $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: "#e1e1e1", size: "14" }) ])) : 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_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-2653531e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue"]]); const placeholderStyle = "color:#BBBBBB;font-size:28rpx;line-height:normal"; const _sfc_main$o = { __name: "merchant", setup(__props, { expose: __expose }) { __expose(); const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const state = vue.reactive({ canUse: true, //用户是否可以打开页面true 可以,false不行 userApplyStatus: false, //用户是否已经申请过false未无 true为有 formStatus: false, // 当前表单是否可以修改 changeIng: false, //当前是否在修改 model: { checkStatus: void 0, id: void 0, name: void 0, status: void 0, description: void 0, contact: void 0, address: void 0, contactNumber: void 0, website: void 0, createTime: void 0, complaintsHotline: void 0, customerServiceHotline: void 0, email: void 0, businessLicensePicture: void 0, expireTime: void 0, areaId: void 0, accountName: void 0, accountNumber: void 0, bankName: void 0, logoUrl: void 0, brandLicensing: void 0, otherCertificate: [], legalPerson: void 0, legalPersonNumber: void 0, identityCardFront: void 0, identityCardReverseSide: void 0 }, areaIdError: "", businessLicensePictureError: "", brandLicensingError: "", identityCardFrontError: "", identityCardReverseSideError: "", rules: { name: { rules: [{ required: true, errorMessage: t$6("merchant.merchant_name_required") }] }, // description: { // rules: [{ // required: true, // errorMessage: t('merchant.introduction_required'), // }, ], // }, contact: { rules: [{ required: true, errorMessage: t$6("merchant.contact_required") }] }, contactNumber: { rules: [{ required: true, errorMessage: t$6("merchant.contact_phone_required") }] }, // customerServiceHotline: { // rules: [{ // required: true, // errorMessage: t('merchant.customer_service_phone_required'), // }, ], // }, // email, // legalPerson: { // rules: [{ // required: true, // errorMessage: t('merchant.legal_person_required'), // }, ], // }, // legalPersonNumber: { // rules: [{ // required: true, // errorMessage: t('merchant.legal_person_phone_required'), // }, ], // }, accountName: { rules: [{ required: true, errorMessage: t$6("merchant.account_name_required") }] }, accountNumber: { rules: [{ required: true, errorMessage: t$6("merchant.account_number_required") }] }, bankName: { rules: [{ required: true, errorMessage: t$6("merchant.bank_required") }] } } }); const statusName = vue.computed(() => { const status = state.model.checkStatus; if (status === 0) { return t$6("merchant.under_review"); } else if (status === 1) { return t$6("merchant.approved"); } else if (status === 2) { return t$6("merchant.rejected"); } else { return ""; } }); const downloadTemplate = () => { const fileUrl = "https://zxgz.newfeifan.cn/static/file/%E9%9D%9E%E7%8B%AC%E5%AE%B6%E5%93%81%E7%89%8C%E6%8E%88%E6%9D%83%E4%B9%A6.docx"; const a2 = document.createElement("a"); a2.href = fileUrl; a2.download = t$6("merchant.non_exclusive_authorization") + ".docx"; document.body.appendChild(a2); a2.click(); document.body.removeChild(a2); }; const checkNumber = () => { SaleApi.checkContactNumber({ mobile: state.model.contactNumber }); }; const merchantFormRef = vue.ref(null); const onSubmit = async () => { const validate = await vue.unref(merchantFormRef).validate().catch((error2) => { formatAppLog("log", "at pages/public/merchant.vue:341", "error: ", error2); }); if (!validate) { return; } if (!state.model.businessLicensePicture) { state.businessLicensePictureError = t$6("merchant.upload_business_license"); return; } if (!state.model.brandLicensing) { state.brandLicensingError = t$6("merchant.upload_brand_authorization"); return; } const { data, code: code2 } = await SaleApi.createMerchant(state.model); if (code2 === 0) { await getInfo2(); } }; const onChange = () => { state.formStatus = false; state.changeIng = true; }; const onCancel = () => { state.formStatus = true; state.changeIng = false; }; const openList = () => { sheep$1.$router.go("/pages/public/merchantApplyList", { merchantApplyId: state.model.id }); }; const onSave = async () => { const validate = await vue.unref(merchantFormRef).validate().catch((error2) => { formatAppLog("log", "at pages/public/merchant.vue:398", "error: ", error2); }); if (!validate) { return; } const { data, code: code2 } = await SaleApi.updateMerchant(state.model); if (code2 === 0) { state.formStatus = true; state.changeIng = false; await getInfo2(); } }; const areaTree = vue.ref([]); function format2(data) { return data.map((item) => ({ text: item.name, // 显示的文本 value: item.id, // 值 children: item.children.length ? format2(item.children) : null // 子项 })); } const getInfo2 = async () => { const { data, code: code2 } = await SaleApi.getMerchant(); if (code2 === 0 && data) { state.model = data; state.userApplyStatus = true; state.formStatus = true; } else { state.userApplyStatus = false; state.formStatus = false; } }; const isLogin = vue.computed(() => sheep$1.$store("user").isLogin); vue.watch( () => isLogin.value, (newVal) => { if (newVal) { window.location.reload(); } }, { deep: true // 深度监听 } ); onLoad(async (options2) => { if (!isLogin.value) { showAuthModal(); } else { await SaleApi.checkSystemUser().then((res) => { formatAppLog("log", "at pages/public/merchant.vue:463", !res.data); state.canUse = !res.data; }); await AreaApi.getAreaTree().then((res) => { areaTree.value = format2(res.data); }); await getInfo2(); } }); const __returned__ = { userInfo: userInfo2, state, placeholderStyle, statusName, downloadTemplate, checkNumber, merchantFormRef, onSubmit, onChange, onCancel, openList, onSave, areaTree, format: format2, getInfo: getInfo2, isLogin, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, unref: vue.unref, watch: vue.watch, get sheep() { return sheep$1; }, get clone() { return lodashExports.clone; }, get onLoad() { return onLoad; }, get SaleApi() { return SaleApi; }, get AreaApi() { return AreaApi; }, get email() { return email; }, get showAuthModal() { return showAuthModal; }, get t() { return t$6; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l); const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9); const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4); const _component_uni_data_picker = resolveEasycom(vue.resolveDynamicComponent("uni-data-picker"), __easycom_3$1); const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7); const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { class: "set-wrap", title: $setup.t("merchant.merchant_registration"), bgStyle: { color: "#FFF" } }, { default: vue.withCtx(() => [ $setup.state.canUse ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createVNode(_component_uni_forms, { model: $setup.state.model, rules: $setup.state.rules, validateTrigger: "bind", labelPosition: "left", border: "", class: "form-box", labelWidth: "200", ref: "merchantFormRef" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [ vue.createVNode(_component_uni_forms_item, { name: "name", label: $setup.t("merchant.merchant_name"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.name, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.name = $event), type: "name", ":placeholder": $setup.t("merchant.merchant_name"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", ":placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "contact", label: $setup.t("merchant.contact_person"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.contact, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.contact = $event), type: "contact", placeholder: $setup.t("merchant.enter_contact_person"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "contactNumber", label: $setup.t("merchant.contact_phone"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.contactNumber, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.contactNumber = $event), type: "contactNumber", placeholder: $setup.t("merchant.enter_contact_phone"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "legalPerson", label: $setup.t("merchant.legal_person"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.legalPerson, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.legalPerson = $event), type: "legalPerson", placeholder: $setup.t("merchant.enter_legal_person"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "legalPersonNumber", label: $setup.t("merchant.legal_person_phone"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.legalPersonNumber, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.legalPersonNumber = $event), type: "legalPersonNumber", placeholder: $setup.t("merchant.enter_legal_person_phone"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "identityCardFront", label: $setup.t("merchant.legal_person_id_front"), required: !$setup.state.formStatus, errorMessage: $setup.state.identityCardFrontError }, { default: vue.withCtx(() => [ vue.createVNode(_component_s_uploader, { url: $setup.state.model.identityCardFront, "onUpdate:url": _cache[5] || (_cache[5] = ($event) => $setup.state.model.identityCardFront = $event), fileMediatype: "image", limit: "1", mode: "grid", imageStyles: { width: "299rpx", height: "168rpx" }, readonly: $setup.state.formStatus }, null, 8, ["url", "readonly"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required", "errorMessage"]), vue.createVNode(_component_uni_forms_item, { name: "identityCardReverseSide", label: $setup.t("merchant.legal_person_id_back"), required: !$setup.state.formStatus, errorMessage: _ctx.identityCardReverseSideError }, { default: vue.withCtx(() => [ vue.createVNode(_component_s_uploader, { url: $setup.state.model.identityCardReverseSide, "onUpdate:url": _cache[6] || (_cache[6] = ($event) => $setup.state.model.identityCardReverseSide = $event), fileMediatype: "image", limit: "1", mode: "grid", imageStyles: { width: "299rpx", height: "168rpx" }, readonly: $setup.state.formStatus }, null, 8, ["url", "readonly"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required", "errorMessage"]), vue.createVNode(_component_uni_forms_item, { name: "areaId", label: $setup.t("merchant.location"), required: !$setup.state.formStatus, errorMessage: $setup.state.areaIdError }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_data_picker, { modelValue: $setup.state.model.areaId, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.model.areaId = $event), localdata: $setup.areaTree, readonly: $setup.state.formStatus }, null, 8, ["modelValue", "localdata", "readonly"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required", "errorMessage"]), vue.createVNode(_component_uni_forms_item, { name: "email", label: $setup.t("merchant.email"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.email, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.state.model.email = $event), type: "email", placeholder: $setup.t("merchant.enter_email"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "address", label: $setup.t("merchant.office_address") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.address, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.state.model.address = $event), type: "address", placeholder: $setup.t("merchant.office_address"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "complaintsHotline", label: $setup.t("merchant.rights_phone") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.complaintsHotline, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.state.model.complaintsHotline = $event), type: "complaintsHotline", placeholder: $setup.t("merchant.enter_rights_phone"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "customerServiceHotline", label: $setup.t("merchant.customer_service_phone"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.customerServiceHotline, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $setup.state.model.customerServiceHotline = $event), type: "customerServiceHotline", placeholder: $setup.t("merchant.enter_customer_service_phone"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "website", label: $setup.t("merchant.website") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.website, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.state.model.website = $event), type: "website", placeholder: $setup.t("merchant.enter_website"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "bankName", label: $setup.t("merchant.bank"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.bankName, "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $setup.state.model.bankName = $event), type: "bankName", placeholder: $setup.t("merchant.enter_bank"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "accountName", label: $setup.t("merchant.account_name"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.accountName, "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $setup.state.model.accountName = $event), type: "accountName", placeholder: $setup.t("merchant.enter_account_name"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "accountNumber", label: $setup.t("merchant.account_number"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.accountNumber, "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $setup.state.model.accountNumber = $event), type: "number", placeholder: $setup.t("merchant.enter_account_number"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), vue.createVNode(_component_uni_forms_item, { name: "logoUrl", label: "Logo" }, { default: vue.withCtx(() => [ vue.createVNode(_component_s_uploader, { url: $setup.state.model.logoUrl, "onUpdate:url": _cache[16] || (_cache[16] = ($event) => $setup.state.model.logoUrl = $event), fileMediatype: "image", limit: "1", mode: "grid", imageStyles: { width: "299rpx", height: "168rpx" }, readonly: $setup.state.formStatus }, null, 8, ["url", "readonly"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_forms_item, { name: "businessLicensePicture", label: $setup.t("merchant.business_license"), required: !$setup.state.formStatus, errorMessage: $setup.state.businessLicensePictureError }, { default: vue.withCtx(() => [ vue.createVNode(_component_s_uploader, { url: $setup.state.model.businessLicensePicture, "onUpdate:url": _cache[17] || (_cache[17] = ($event) => $setup.state.model.businessLicensePicture = $event), fileMediatype: "image", limit: "1", mode: "grid", imageStyles: { width: "299rpx", height: "168rpx" }, readonly: $setup.state.formStatus }, null, 8, ["url", "readonly"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required", "errorMessage"]), vue.createVNode(_component_uni_forms_item, { name: "brandLicensing", label: $setup.t("merchant.brand_authorization"), required: !$setup.state.formStatus, errorMessage: $setup.state.brandLicensingError }, { default: vue.withCtx(() => [ vue.createVNode(_component_s_uploader, { url: $setup.state.model.brandLicensing, "onUpdate:url": _cache[18] || (_cache[18] = ($event) => $setup.state.model.brandLicensing = $event), fileMediatype: "image", limit: "1", mode: "grid", imageStyles: { width: "299rpx", height: "168rpx" }, readonly: $setup.state.formStatus }, null, 8, ["url", "readonly"]), !$setup.state.model.brandLicensing ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "ss-m-t-20", style: { "color": "var(--ui-BG-Main)" }, onClick: $setup.downloadTemplate }, vue.toDisplayString($setup.t("merchant.download_template")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["label", "required", "errorMessage"]), vue.createVNode(_component_uni_forms_item, { name: "otherCertificate", label: $setup.t("merchant.other_certificates") }, { default: vue.withCtx(() => [ vue.createVNode(_component_s_uploader, { url: $setup.state.model.otherCertificate, "onUpdate:url": _cache[19] || (_cache[19] = ($event) => $setup.state.model.otherCertificate = $event), fileMediatype: "image", limit: "9", mode: "grid", imageStyles: { width: "299rpx", height: "168rpx" }, readonly: $setup.state.formStatus }, null, 8, ["url", "readonly"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_uni_forms_item, { name: "description", label: $setup.t("merchant.introduction"), required: !$setup.state.formStatus }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.state.model.description, "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $setup.state.model.description = $event), type: "description", placeholder: $setup.t("merchant.enter_introduction"), inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: $setup.state.formStatus }, null, 8, ["modelValue", "placeholder", "disabled"]) ]), _: 1 /* STABLE */ }, 8, ["label", "required"]), $setup.state.userApplyStatus ? (vue.openBlock(), vue.createBlock(_component_uni_forms_item, { key: 0, name: "description", label: $setup.t("merchant.status") }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_easyinput, { modelValue: $setup.statusName, "onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => $setup.statusName = $event), type: "description", inputBorder: false, placeholderStyle: $setup.placeholderStyle, clearable: false, disabled: true }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["label"])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createVNode(_component_su_fixed, { bottom: "", placeholder: "", bg: "none" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "footer-box ss-p-20 ss-flex" }, [ vue.createCommentVNode(" 审核中不允许改 "), vue.createCommentVNode(" 通过后 变动 "), vue.createCommentVNode(' {{"用户是否申请过:"+state.userApplyStatus}}\n {{"当前状态"+state.model.checkStatus}}\n {{"当前状态是否能改动:" + !state.formStatus}} '), !$setup.state.userApplyStatus ? (vue.openBlock(), vue.createElementBlock( "button", { key: 0, class: "ss-rest-button btn", onClick: $setup.onSubmit }, vue.toDisplayString($setup.t("common.submit")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), [0].includes($setup.state.model.checkStatus) ? (vue.openBlock(), vue.createElementBlock( "button", { key: 1, class: "ss-rest-button btn" }, vue.toDisplayString($setup.t("merchant.review_in_progress")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), [1, 2].includes($setup.state.model.checkStatus) ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ !$setup.state.changeIng ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "button", { class: "ss-rest-button btn-two", onClick: $setup.openList }, vue.toDisplayString($setup.t("merchant.review_records")), 1 /* TEXT */ ), vue.createElementVNode( "button", { class: "ss-rest-button btn-two", onClick: $setup.onChange }, vue.toDisplayString($setup.t("merchant.changes")), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode( "button", { class: "ss-rest-button btn-two", onClick: $setup.onCancel }, vue.toDisplayString($setup.t("common.cancel")), 1 /* TEXT */ ), vue.createElementVNode( "button", { class: "ss-rest-button btn-two", onClick: $setup.onSave }, vue.toDisplayString($setup.t("merchant.save_and_submit")), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), !$setup.state.canUse ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, style: { "position": "fixed", "top": "50%", "left": "50%", "transform": "translate(-50%,-50%)", "text-align": "center" } }, vue.toDisplayString($setup.t("merchant.existing_merchant_alert", { user: $setup.userInfo.mobile })), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["title"]); } const PagesPublicMerchant = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-72155725"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/merchant.vue"]]); const _sfc_main$n = { __name: "merchantApplyList", props: { merchantApplyId: { type: Number, default: "" } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const userWallet = vue.computed(() => sheep$1.$store("user").userWallet); const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2; const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo); const sys_navBar = sheep$1.$platform.navbar; const state = vue.reactive({ currentTab: 0, pagination: { list: [], total: 0, pageSize: 10, pageNo: 1 }, loadStatus: "" }); async function getLogList() { state.loadStatus = "loading"; let { code: code2, data } = await SaleApi.getMerchantPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize, merchantApplyId: props.merchantApplyId }); if (code2 !== 0) { return; } let list = _$1.concat(state.pagination.list, data.list); state.pagination.list = list; state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } onLoad(() => { getLogList(); }); function onLoadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getLogList(); } onReachBottom(() => { onLoadMore(); }); const __returned__ = { props, userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, onLoadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, computed: vue.computed, reactive: vue.reactive, get points2point() { return points2point; }, get _() { return _$1; }, get dayjs() { return dayjs; }, get PointApi() { return PointApi; }, get resetPagination() { return resetPagination; }, get SaleApi() { return SaleApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) { const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" 商家申请审核记录 "), vue.createVNode(_component_s_layout, { class: "wallet-wrap", bgStyle: { "backgroundColor": "#ffffff" }, title: "审核记录", navbar: "normal" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [ $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "padding": "0 20rpx" } }, [ vue.createElementVNode("view", { class: "list-item ss-flex ss-col-center ss-row-between", style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" } }, [ vue.createElementVNode("view", { class: "name", style: { "width": "100%" } }, [ vue.createTextVNode(" 商户登陆地址: "), vue.createElementVNode("text", { class: "color-red", onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$helper.copyText("https://sh.letcgo.com")) }, "https://sh.letcgo.com") ]), vue.createElementVNode("view", { class: "time", style: { "width": "100%" } }, " 默认管理员账号: 联络人手机号 "), vue.createElementVNode("view", { class: "time", style: { "width": "100%" } }, " 默认管理员密码: zxpt@联络人手机号 ") ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "scroll-view", { class: "list-box", "scroll-y": "true", onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers(() => { }, ["stop"])) }, [ $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "padding": "20rpx", "padding-top": "0" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "list-item ss-flex ss-col-center ss-row-between", key: item.id, style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-col-center", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "ss-flex ss-m-t-10", style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" } }, [ vue.createElementVNode( "view", { class: "name", style: { "width": "100%" } }, vue.toDisplayString(item.status === 1 ? "通过" : "拒绝"), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time", style: { "width": "100%" } }, " 审核时间:" + vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time", style: { "width": "100%" } }, " 描述:" + vue.toDisplayString(item.checkComment), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 1, text: "暂无数据", paddingTop: "200", icon: "/static/data-empty.png" })), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 2, status: $setup.state.loadStatus, "content-text": { contentdown: "点击加载更多" }, onClick: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true)), onScrolltolower: _cache[2] || (_cache[2] = ($event) => $setup.onLoadMore(true)) }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const PagesPublicMerchantApplyList = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-3c232040"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/merchantApplyList.vue"]]); const _sfc_main$m = { __name: "s-coupon-list", props: { data: { type: Object, default: {} }, disabled: { type: Boolean, default: false }, type: { type: String, default: "coupon" // coupon 优惠劵模版;user 用户优惠劵 } }, setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({}); const isDisable = vue.computed(() => { if (props.type === "coupon") { return false; } return props.data.status !== 1; }); const props = __props; const __returned__ = { state, isDisable, props, computed: vue.computed, reactive: vue.reactive, get fen2yuan() { return fen2yuan; }, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "ss-m-20", style: vue.normalizeStyle({ opacity: $props.disabled ? "0.5" : "1" }) }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["tag ss-flex ss-row-center", $setup.isDisable ? "disabled-bg-color" : "info-bg-color"]) }, vue.toDisplayString($props.data.discountType === 1 ? "满减券" : "折扣券"), 3 /* TEXT, CLASS */ ), vue.createElementVNode("view", { class: "title ss-m-x-30 ss-p-t-18" }, [ vue.createElementVNode("view", { class: "ss-flex ss-row-between" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["value-text ss-flex-1 ss-m-r-10", $setup.isDisable ? "disabled-color" : "info-color"]) }, vue.toDisplayString($props.data.name), 3 /* TEXT, CLASS */ ), vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ss-flex ss-col-bottom", $setup.isDisable ? "disabled-color" : "price-text"]) }, [ $props.data.discountType === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "value-reduce ss-m-b-10" }, "¥")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "value-price" }, vue.toDisplayString($props.data.discountType === 1 ? $setup.fen2yuan($props.data.discountPrice) : $props.data.discountPercent / 10), 1 /* TEXT */ ), $props.data.discountType === 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "value-discount ss-m-b-10 ss-m-l-4" }, "折")) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ) ]) ]), vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-t-16" }, [ $props.data.validityType === 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["sellby-text", $setup.isDisable ? "disabled-color" : "subtitle-color"]) }, " 有效期:领取后 " + vue.toDisplayString($props.data.fixedEndTerm) + " 天内可用 ", 3 /* TEXT, CLASS */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["sellby-text", $setup.isDisable ? "disabled-color" : "subtitle-color"]) }, " 有效期: " + vue.toDisplayString($setup.sheep.$helper.timeFormat($props.data.validStartTime, "yyyy-mm-dd")) + " 至 " + vue.toDisplayString($setup.sheep.$helper.timeFormat($props.data.validEndTime, "yyyy-mm-dd")), 3 /* TEXT, CLASS */ )), vue.createElementVNode( "view", { class: vue.normalizeClass(["value-enough", $setup.isDisable ? "disabled-color" : "subtitle-color"]) }, " 满 " + vue.toDisplayString($setup.fen2yuan($props.data.usePrice)) + " 可用 ", 3 /* TEXT, CLASS */ ) ]) ]) ]), vue.createCommentVNode(" TODO 非繁人:可优化,增加优惠劵的描述 "), vue.createElementVNode("view", { class: "desc ss-flex ss-row-between" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "desc-title" }, vue.toDisplayString($props.data.description), 1 /* TEXT */ ), vue.createElementVNode("view", null, [ vue.renderSlot(_ctx.$slots, "reason", {}, void 0, true) ]) ]), vue.createElementVNode("view", null, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ]) ], 4 /* STYLE */ ); } const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-81b7b3dc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-coupon-list/s-coupon-list.vue"]]); const _sfc_main$l = { __name: "list", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ currentTab: 0, // 当前 tab type: "1", pagination: { list: [], total: 0, pageNo: 1, pageSize: 5 }, loadStatus: "" }); const tabMaps = [ { name: "领券中心", value: "all" }, { name: "已领取", value: "1" }, { name: "已使用", value: "2" }, { name: "已失效", value: "3" } ]; function onTabsChange(e2) { state.currentTab = e2.index; state.type = e2.value; resetPagination(state.pagination); if (state.currentTab === 0) { getData(); } else { getCoupon(); } } async function getData() { state.loadStatus = "loading"; const { data, code: code2 } = await CouponApi.getCouponTemplatePage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } async function getCoupon() { state.loadStatus = "loading"; const { data, code: code2 } = await CouponApi.getCouponPage({ pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize, status: state.type }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } async function getBuy(id) { const { code: code2 } = await CouponApi.takeCoupon(id); if (code2 !== 0) { return; } uni.showToast({ title: "领取成功" }); setTimeout(() => { resetPagination(state.pagination); getData(); }, 1e3); } function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; if (state.currentTab === 0) { getData(); } else { getCoupon(); } } onLoad((Option) => { if (Option.type === "all" || !Option.type) { getData(); } else { Option.type === "geted" ? state.currentTab = 1 : Option.type === "used" ? state.currentTab = 2 : state.currentTab = 3; state.type = state.currentTab; getCoupon(); } }); onReachBottom(() => { loadMore(); }); const __returned__ = { state, tabMaps, onTabsChange, getData, getCoupon, getBuy, loadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, reactive: vue.reactive, get _() { return _$1; }, get resetPagination() { return resetPagination; }, get CouponApi() { return CouponApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_coupon_list = resolveEasycom(vue.resolveDynamicComponent("s-coupon-list"), __easycom_3); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "优惠券", bgStyle: { color: "#f2f2f2" } }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, { default: vue.withCtx(() => [ vue.createVNode(_component_su_tabs, { list: $setup.tabMaps, scrollable: false, onChange: $setup.onTabsChange, current: $setup.state.currentTab }, null, 8, ["current"]) ]), _: 1 /* STABLE */ }), $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 0, icon: "/static/coupon-empty.png", text: "暂无优惠券" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 情况一:领劵中心 "), $setup.state.currentTab === 0 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id }, [ vue.createVNode(_component_s_coupon_list, { data: item, onClick: ($event) => $setup.sheep.$router.go("/pages/coupon/detail", { id: item.id }) }, { default: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button card-btn ss-flex ss-row-center ss-col-center", !item.canTake ? "border-btn" : ""]), onClick: vue.withModifiers(($event) => $setup.getBuy(item.id), ["stop"]), disabled: !item.canTake }, vue.toDisplayString(item.canTake ? "立即领取" : "已领取"), 11, ["onClick", "disabled"]) ]), _: 2 /* DYNAMIC */ }, 1032, ["data", "onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createCommentVNode(" 情况二:我的优惠劵 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id }, [ vue.createVNode(_component_s_coupon_list, { data: item, type: "user", onClick: ($event) => $setup.sheep.$router.go("/pages/coupon/detail", { couponId: item.id }) }, { default: vue.withCtx(() => [ vue.createElementVNode("button", { class: vue.normalizeClass(["ss-reset-button card-btn ss-flex ss-row-center ss-col-center", item.status !== 1 ? "disabled-btn" : ""]), disabled: item.status !== 1, onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/coupon/detail", { couponId: item.id }), ["stop"]) }, vue.toDisplayString(item.status === 1 ? "立即使用" : item.status === 2 ? "已使用" : "已过期"), 11, ["disabled", "onClick"]) ]), _: 2 /* DYNAMIC */ }, 1032, ["data", "onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )), $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 3, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }); } const PagesCouponList = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-019d569f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/coupon/list.vue"]]); const _sfc_main$k = { __name: "detail", setup(__props, { expose: __expose }) { __expose(); const state = vue.reactive({ id: 0, // 优惠劵模版编号 templateId couponId: 0, // 用户优惠劵编号 couponId coupon: {}, // 优惠劵信息 pagination: { list: [], total: 0, pageNo: 1, pageSize: 1 }, categoryId: 0, // 选中的商品分类编号 tabMaps: [], // 指定分类时,每个分类构成一个 tab currentTab: 0, // 选中的 tabMaps 下标 loadStatus: "" }); function onTabsChange(e2) { resetPagination(state.pagination); state.currentTab = e2.index; state.categoryId = e2.value; getGoodsListByCategory(); } async function getGoodsListByCategory() { state.loadStatus = "loading"; const { code: code2, data } = await SpuApi.getSpuPage({ categoryId: state.categoryId, pageNo: state.pagination.pageNo, pageSize: state.pagination.pageSize }); if (code2 !== 0) { return; } state.pagination.list = _$1.concat(state.pagination.list, data.list); state.pagination.total = data.total; state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore"; } async function getGoodsListById() { const { data, code: code2 } = await SpuApi.getSpuListByIds(state.coupon.productScopeValues.join(",")); if (code2 !== 0) { return; } state.pagination.list = data; } async function getCategoryList() { const { data, code: code2 } = await CategoryApi.getCategoryListByIds(state.coupon.productScopeValues.join(",")); if (code2 !== 0) { return; } state.tabMaps = data.map((category) => ({ name: category.name, value: category.id })); if (state.tabMaps.length > 0) { state.categoryId = state.tabMaps[0].value; await getGoodsListByCategory(); } } async function getCoupon() { const { code: code2 } = await CouponApi.takeCoupon(state.id); if (code2 !== 0) { return; } uni.showToast({ title: "领取成功" }); setTimeout(() => { getCouponContent(); }, 1e3); } async function getCouponContent() { const { code: code2, data } = state.id > 0 ? await CouponApi.getCouponTemplate(state.id) : await CouponApi.getCoupon(state.couponId); if (code2 !== 0) { return; } state.coupon = data; if (state.coupon.productScope === 2) { await getGoodsListById(); } else if (state.coupon.productScope === 3) { await getCategoryList(); } } function loadMore() { if (state.loadStatus === "noMore") { return; } state.pagination.pageNo++; getGoodsListByCategory(); } onLoad((options2) => { state.id = options2.id; state.couponId = options2.couponId; getCouponContent(state.id, state.couponId); }); onReachBottom(() => { loadMore(); }); const __returned__ = { state, onTabsChange, getGoodsListByCategory, getGoodsListById, getCategoryList, getCoupon, getCouponContent, loadMore, get sheep() { return sheep$1; }, get onLoad() { return onLoad; }, get onReachBottom() { return onReachBottom; }, reactive: vue.reactive, get _() { return _$1; }, get CouponApi() { return CouponApi; }, get fen2yuan() { return fen2yuan; }, get SpuApi() { return SpuApi; }, get CategoryApi() { return CategoryApi; }, get resetPagination() { return resetPagination; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_collapse_item = resolveEasycom(vue.resolveDynamicComponent("uni-collapse-item"), __easycom_0$2); const _component_uni_collapse = resolveEasycom(vue.resolveDynamicComponent("uni-collapse"), __easycom_1); const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a); const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9); const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4); const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6); const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8); return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "优惠券详情" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bg-white" }, [ vue.createCommentVNode(" 详情卡片 "), vue.createElementVNode("view", { class: "detail-wrap ss-p-20" }, [ vue.createElementVNode("view", { class: "detail-box" }, [ vue.createElementVNode("view", { class: "tag-box ss-flex ss-col-center ss-row-center" }, [ vue.createElementVNode("image", { class: "tag-image", src: $setup.sheep.$url.static("/static/images/coupon_icon.png"), mode: "aspectFit" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "top ss-flex-col ss-col-center" }, [ vue.createElementVNode( "view", { class: "title ss-m-t-50 ss-m-b-20 ss-m-x-20" }, vue.toDisplayString($setup.state.coupon.name), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "subtitle ss-m-b-50" }, " 满 " + vue.toDisplayString($setup.fen2yuan($setup.state.coupon.usePrice)) + " 元, " + vue.toDisplayString($setup.state.coupon.discountType === 1 ? "减 " + $setup.fen2yuan($setup.state.coupon.discountPrice) + " 元" : "打 " + $setup.state.coupon.discountPercent / 10 + " 折"), 1 /* TEXT */ ), vue.createElementVNode("button", { class: vue.normalizeClass([ "ss-reset-button ss-m-b-30", $setup.state.coupon.canTake || $setup.state.coupon.status === 1 ? "use-btn" : "disable-btn" ]), disabled: !$setup.state.coupon.canTake, onClick: $setup.getCoupon }, [ $setup.state.id > 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString($setup.state.coupon.canTake ? "立即领取" : "已领取"), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1 }, vue.toDisplayString($setup.state.coupon.status === 1 ? "立即使用" : $setup.state.coupon.status === 2 ? "已使用" : "已过期"), 1 /* TEXT */ )) ], 10, ["disabled"]), $setup.state.coupon.validityType === 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time ss-m-y-30" }, " 有效期:领取后 " + vue.toDisplayString($setup.state.coupon.fixedEndTerm) + " 天内可用 ", 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time ss-m-y-30" }, " 有效期: " + vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.coupon.validStartTime, "yyyy-mm-dd")) + " 至 " + vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.coupon.validEndTime, "yyyy-mm-dd")), 1 /* TEXT */ )), vue.createElementVNode("view", { class: "coupon-line ss-m-t-14" }) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode("view", { class: "type ss-flex ss-col-center ss-row-between ss-p-x-30" }, [ vue.createElementVNode("view", null, "优惠券类型"), vue.createElementVNode( "view", null, vue.toDisplayString($setup.state.coupon.discountType === 1 ? "满减券" : "折扣券"), 1 /* TEXT */ ) ]), vue.createCommentVNode(" TODO 非繁人:可优化,增加优惠劵的描述 "), vue.createVNode(_component_uni_collapse, null, { default: vue.withCtx(() => [ $setup.state.coupon.description ? (vue.openBlock(), vue.createBlock(_component_uni_collapse_item, { key: 0, title: "优惠券说明" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "content ss-p-b-20" }, [ vue.createElementVNode( "text", { class: "des ss-p-l-30" }, vue.toDisplayString($setup.state.coupon.description), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ })) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }) ]) ]) ]), vue.createCommentVNode(" 适用商品 "), $setup.state.coupon.productScope === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "all-user ss-flex ss-row-center ss-col-center" }, " 全场通用 ")) : (vue.openBlock(), vue.createBlock(_component_su_sticky, { key: 1, bgColor: "#fff" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "goods-title ss-p-20" }, vue.toDisplayString($setup.state.coupon.productScope === 2 ? "指定商品可用" : "指定分类可用"), 1 /* TEXT */ ), $setup.state.coupon.productScope === 3 ? (vue.openBlock(), vue.createBlock(_component_su_tabs, { key: 0, scrollable: true, list: $setup.state.tabMaps, onChange: $setup.onTabsChange, current: $setup.state.currentTab }, null, 8, ["list", "current"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ })), vue.createCommentVNode(" 指定商品 "), $setup.state.coupon.productScope === 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createVNode(_component_s_goods_column, { class: "ss-m-20", size: "lg", data: item, onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }), goodsFields: { title: { show: true }, subtitle: { show: true }, price: { show: true }, original_price: { show: true }, sales: { show: true }, stock: { show: false } } }, null, 8, ["data", "onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 指定分类 "), $setup.state.coupon.productScope === 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createVNode(_component_s_goods_column, { class: "ss-m-20", size: "lg", data: item, onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }), goodsFields: { title: { show: true }, subtitle: { show: true }, price: { show: true }, original_price: { show: true }, sales: { show: true }, stock: { show: false } } }, null, 8, ["data", "onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $setup.state.pagination.total > 0 && $setup.state.coupon.productScope === 3 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, { key: 4, status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" }, onClick: $setup.loadMore }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true), $setup.state.coupon.productScope === 3 && $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, { key: 5, paddingTop: "0", icon: "/static/soldout-empty.png", text: "暂无商品" })) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }); } const PagesCouponDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-2d1fcfdf"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/coupon/detail.vue"]]); const emojiList = [ { name: "[笑掉牙]", file: "xiaodiaoya.png" }, { name: "[可爱]", file: "keai.png" }, { name: "[冷酷]", file: "lengku.png" }, { name: "[闭嘴]", file: "bizui.png" }, { name: "[生气]", file: "shengqi.png" }, { name: "[惊恐]", file: "jingkong.png" }, { name: "[瞌睡]", file: "keshui.png" }, { name: "[大笑]", file: "daxiao.png" }, { name: "[爱心]", file: "aixin.png" }, { name: "[坏笑]", file: "huaixiao.png" }, { name: "[飞吻]", file: "feiwen.png" }, { name: "[疑问]", file: "yiwen.png" }, { name: "[开心]", file: "kaixin.png" }, { name: "[发呆]", file: "fadai.png" }, { name: "[流泪]", file: "liulei.png" }, { name: "[汗颜]", file: "hanyan.png" }, { name: "[惊悚]", file: "jingshu.png" }, { name: "[困~]", file: "kun.png" }, { name: "[心碎]", file: "xinsui.png" }, { name: "[天使]", file: "tianshi.png" }, { name: "[晕]", file: "yun.png" }, { name: "[啊]", file: "a.png" }, { name: "[愤怒]", file: "fennu.png" }, { name: "[睡着]", file: "shuizhuo.png" }, { name: "[面无表情]", file: "mianwubiaoqing.png" }, { name: "[难过]", file: "nanguo.png" }, { name: "[犯困]", file: "fankun.png" }, { name: "[好吃]", file: "haochi.png" }, { name: "[呕吐]", file: "outu.png" }, { name: "[龇牙]", file: "ziya.png" }, { name: "[懵比]", file: "mengbi.png" }, { name: "[白眼]", file: "baiyan.png" }, { name: "[饿死]", file: "esi.png" }, { name: "[凶]", file: "xiong.png" }, { name: "[感冒]", file: "ganmao.png" }, { name: "[流汗]", file: "liuhan.png" }, { name: "[笑哭]", file: "xiaoku.png" }, { name: "[流口水]", file: "liukoushui.png" }, { name: "[尴尬]", file: "ganga.png" }, { name: "[惊讶]", file: "jingya.png" }, { name: "[大惊]", file: "dajing.png" }, { name: "[不好意思]", file: "buhaoyisi.png" }, { name: "[大闹]", file: "danao.png" }, { name: "[不可思议]", file: "bukesiyi.png" }, { name: "[爱你]", file: "aini.png" }, { name: "[红心]", file: "hongxin.png" }, { name: "[点赞]", file: "dianzan.png" }, { name: "[恶魔]", file: "emo.png" } ]; let emojiPage = {}; emojiList.forEach((item, index2) => { if (!emojiPage[Math.floor(index2 / 30) + 1]) { emojiPage[Math.floor(index2 / 30) + 1] = []; } emojiPage[Math.floor(index2 / 30) + 1].push(item); }); const _sfc_main$j = { __name: "goods", props: { goodsData: { type: Object, default: {} } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const __returned__ = { props, get sheep() { return sheep$1; }, get isArray() { return lodashExports.isArray; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "goods ss-flex" }, [ vue.createElementVNode("image", { class: "image", src: $setup.sheep.$url.cdn($props.goodsData.image), mode: "aspectFill" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "ss-flex-1" }, [ vue.createElementVNode( "view", { class: "title ss-line-2" }, vue.toDisplayString($props.goodsData.title), 1 /* TEXT */ ), $props.goodsData.subtitle ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "subtitle ss-line-1" }, vue.toDisplayString($props.goodsData.subtitle), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "price ss-m-t-8" }, " ¥" + vue.toDisplayString($setup.isArray($props.goodsData.price) ? $props.goodsData.price[0] : $props.goodsData.price), 1 /* TEXT */ ) ]) ]); } const GoodsItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-820d22a6"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/components/goods.vue"]]); const _sfc_main$i = { __name: "order", props: { from: String, orderData: { type: Object, default: {} } }, setup(__props, { expose: __expose }) { __expose(); const props = __props; const __returned__ = { props, get sheep() { return sheep$1; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "order" }, [ vue.createElementVNode("view", { class: "top ss-flex ss-row-between" }, [ vue.createElementVNode( "span", null, vue.toDisplayString($props.orderData.order_sn), 1 /* TEXT */ ), vue.createElementVNode( "span", null, vue.toDisplayString($props.orderData.create_time.split(" ")[1]), 1 /* TEXT */ ) ]), $props.from != "msg" ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($props.orderData.items, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bottom ss-flex", key: item }, [ vue.createElementVNode("image", { class: "image", src: $setup.sheep.$url.cdn(item.goods_image), mode: "aspectFill" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "ss-flex-1" }, [ vue.createElementVNode( "view", { class: "title ss-line-2" }, vue.toDisplayString(item.goods_title), 1 /* TEXT */ ), item.goods_num ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "num ss-m-b-10" }, " 数量:" + vue.toDisplayString(item.goods_num), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-t-8" }, [ vue.createElementVNode( "span", { class: "price" }, "¥" + vue.toDisplayString(item.goods_price), 1 /* TEXT */ ), vue.createElementVNode( "span", { class: "status" }, vue.toDisplayString($props.orderData.status_text), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList([$props.orderData.items[0]], (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bottom ss-flex", key: item }, [ vue.createElementVNode("image", { class: "image", src: $setup.sheep.$url.cdn(item.goods_image), mode: "aspectFill" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "ss-flex-1" }, [ vue.createElementVNode( "view", { class: "title title-1 ss-line-1" }, vue.toDisplayString(item.goods_title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "order-total ss-flex ss-row-between ss-m-t-8" }, [ vue.createElementVNode( "span", null, "共" + vue.toDisplayString($props.orderData.items.length) + "件商品", 1 /* TEXT */ ), vue.createElementVNode( "span", null, "合计 ¥" + vue.toDisplayString($props.orderData.pay_fee), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "ss-flex ss-row-right ss-m-t-8" }, [ vue.createElementVNode( "span", { class: "status" }, vue.toDisplayString($props.orderData.status_text), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]); } const OrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-a458419c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/components/order.vue"]]); const _sfc_main$h = { __name: "select-popup", props: { mode: { type: String, default: "goods" }, show: { type: Boolean, default: false } }, emits: ["select", "close"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const emits = __emit; const props = __props; vue.watch( () => props.mode, () => { state.pagination.data = []; if (props.mode) { getList(state.pagination.page); } } ); const state = vue.reactive({ loadStatus: "", pagination: { data: [], current_page: 1, total: 1, last_page: 1 } }); async function getList(page2, list_rows = 5) { state.loadStatus = "loading"; const res = props.mode == "goods" ? await SpuHistoryApi.getBrowseHistoryPage({ page: page2, list_rows }) : await OrderApi.getOrderPage({ page: page2, list_rows }); let orderList = _$1.concat(state.pagination.data, res.data.data); state.pagination = { ...res.data, data: orderList }; if (state.pagination.current_page < state.pagination.last_page) { state.loadStatus = "more"; } else { state.loadStatus = "noMore"; } } function loadmore() { if (state.loadStatus !== "noMore") { getList(state.pagination.current_page + 1); } } const __returned__ = { emits, props, state, getList, loadmore, reactive: vue.reactive, watch: vue.watch, get sheep() { return sheep$1; }, get _() { return _$1; }, GoodsItem, OrderItem, get OrderApi() { return OrderApi; }, get SpuHistoryApi() { return SpuHistoryApi; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5); const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3); return vue.openBlock(), vue.createBlock(_component_su_popup, { show: $props.show, showClose: "", round: "10", backgroundColor: "#eee", onClose: _cache[0] || (_cache[0] = ($event) => $setup.emits("close")) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "select-popup" }, [ vue.createElementVNode("view", { class: "title" }, [ vue.createElementVNode( "span", null, vue.toDisplayString($props.mode == "goods" ? "我的浏览" : "我的订单"), 1 /* TEXT */ ) ]), vue.createElementVNode( "scroll-view", { class: "scroll-box", "scroll-y": "true", "scroll-with-animation": true, "show-scrollbar": false, onScrolltolower: $setup.loadmore }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.state.pagination.data, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: item, onClick: ($event) => $setup.emits("select", { type: $props.mode, data: item }) }, [ $props.mode == "goods" ? (vue.openBlock(), vue.createBlock($setup["GoodsItem"], { key: 0, goodsData: item.goods }, null, 8, ["goodsData"])) : vue.createCommentVNode("v-if", true), $props.mode == "order" ? (vue.openBlock(), vue.createBlock($setup["OrderItem"], { key: 1, orderData: item }, null, 8, ["orderData"])) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createVNode(_component_uni_load_more, { status: $setup.state.loadStatus, "content-text": { contentdown: "上拉加载更多" } }, null, 8, ["status"]) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]); } const SelectPopup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-878522b0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/components/select-popup.vue"]]); var uniSocket_io = { exports: {} }; (function(module, exports) { !function(t2, e2) { module.exports = e2(); }(window, function() { return function(t2) { var e2 = {}; function r2(n2) { if (e2[n2]) return e2[n2].exports; var o2 = e2[n2] = { i: n2, l: false, exports: {} }; return t2[n2].call(o2.exports, o2, o2.exports, r2), o2.l = true, o2.exports; } return r2.m = t2, r2.c = e2, r2.d = function(t3, e3, n2) { r2.o(t3, e3) || Object.defineProperty(t3, e3, { enumerable: true, get: n2 }); }, r2.r = function(t3) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t3, "__esModule", { value: true }); }, r2.t = function(t3, e3) { if (1 & e3 && (t3 = r2(t3)), 8 & e3) return t3; if (4 & e3 && "object" == typeof t3 && t3 && t3.__esModule) return t3; var n2 = /* @__PURE__ */ Object.create(null); if (r2.r(n2), Object.defineProperty(n2, "default", { enumerable: true, value: t3 }), 2 & e3 && "string" != typeof t3) for (var o2 in t3) r2.d(n2, o2, (function(e4) { return t3[e4]; }).bind(null, o2)); return n2; }, r2.n = function(t3) { var e3 = t3 && t3.__esModule ? function() { return t3.default; } : function() { return t3; }; return r2.d(e3, "a", e3), e3; }, r2.o = function(t3, e3) { return Object.prototype.hasOwnProperty.call(t3, e3); }, r2.p = "", r2(r2.s = 22); }([function(t2, e2) { t2.exports = function() { return function() { }; }; }, function(t2, e2, r2) { function n2(t3) { if (t3) return function(t4) { for (var e3 in n2.prototype) t4[e3] = n2.prototype[e3]; return t4; }(t3); } t2.exports = n2, n2.prototype.on = n2.prototype.addEventListener = function(t3, e3) { return this._callbacks = this._callbacks || {}, (this._callbacks["$" + t3] = this._callbacks["$" + t3] || []).push(e3), this; }, n2.prototype.once = function(t3, e3) { function r3() { this.off(t3, r3), e3.apply(this, arguments); } return r3.fn = e3, this.on(t3, r3), this; }, n2.prototype.off = n2.prototype.removeListener = n2.prototype.removeAllListeners = n2.prototype.removeEventListener = function(t3, e3) { if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this; var r3, n3 = this._callbacks["$" + t3]; if (!n3) return this; if (1 == arguments.length) return delete this._callbacks["$" + t3], this; for (var o2 = 0; o2 < n3.length; o2++) if ((r3 = n3[o2]) === e3 || r3.fn === e3) { n3.splice(o2, 1); break; } return this; }, n2.prototype.emit = function(t3) { this._callbacks = this._callbacks || {}; var e3 = [].slice.call(arguments, 1), r3 = this._callbacks["$" + t3]; if (r3) for (var n3 = 0, o2 = (r3 = r3.slice(0)).length; n3 < o2; ++n3) r3[n3].apply(this, e3); return this; }, n2.prototype.listeners = function(t3) { return this._callbacks = this._callbacks || {}, this._callbacks["$" + t3] || []; }, n2.prototype.hasListeners = function(t3) { return !!this.listeners(t3).length; }; }, function(t2, e2, r2) { var n2, o2 = r2(33), i2 = r2(16), s2 = r2(35), a2 = r2(36), c2 = r2(37); "undefined" != typeof ArrayBuffer && (n2 = r2(38)); var h2 = "undefined" != typeof navigator && /Android/i.test(navigator.userAgent), u2 = "undefined" != typeof navigator && /PhantomJS/i.test(navigator.userAgent), f2 = h2 || u2; e2.protocol = 3; var p2 = e2.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, l2 = o2(p2), d2 = { type: "error", data: "parser error" }, y2 = r2(39); function g2(t3, e3, r3) { for (var n3 = new Array(t3.length), o3 = a2(t3.length, r3), i3 = function(t4, r4, o4) { e3(r4, function(e4, r5) { n3[t4] = r5, o4(e4, n3); }); }, s3 = 0; s3 < t3.length; s3++) i3(s3, t3[s3], o3); } e2.encodePacket = function(t3, r3, n3, o3) { "function" == typeof r3 && (o3 = r3, r3 = false), "function" == typeof n3 && (o3 = n3, n3 = null); var i3 = void 0 === t3.data ? void 0 : t3.data.buffer || t3.data; if ("undefined" != typeof ArrayBuffer && i3 instanceof ArrayBuffer) return function(t4, r4, n4) { if (!r4) return e2.encodeBase64Packet(t4, n4); var o4 = t4.data, i4 = new Uint8Array(o4), s4 = new Uint8Array(1 + o4.byteLength); s4[0] = p2[t4.type]; for (var a3 = 0; a3 < i4.length; a3++) s4[a3 + 1] = i4[a3]; return n4(s4.buffer); }(t3, r3, o3); if (void 0 !== y2 && i3 instanceof y2) return function(t4, r4, n4) { if (!r4) return e2.encodeBase64Packet(t4, n4); if (f2) return function(t5, r5, n5) { if (!r5) return e2.encodeBase64Packet(t5, n5); var o5 = new FileReader(); return o5.onload = function() { e2.encodePacket({ type: t5.type, data: o5.result }, r5, true, n5); }, o5.readAsArrayBuffer(t5.data); }(t4, r4, n4); var o4 = new Uint8Array(1); o4[0] = p2[t4.type]; var i4 = new y2([o4.buffer, t4.data]); return n4(i4); }(t3, r3, o3); if (i3 && i3.base64) return function(t4, r4) { var n4 = "b" + e2.packets[t4.type] + t4.data.data; return r4(n4); }(t3, o3); var s3 = p2[t3.type]; return void 0 !== t3.data && (s3 += n3 ? c2.encode(String(t3.data), { strict: false }) : String(t3.data)), o3("" + s3); }, e2.encodeBase64Packet = function(t3, r3) { var n3, o3 = "b" + e2.packets[t3.type]; if (void 0 !== y2 && t3.data instanceof y2) { var i3 = new FileReader(); return i3.onload = function() { var t4 = i3.result.split(",")[1]; r3(o3 + t4); }, i3.readAsDataURL(t3.data); } try { n3 = String.fromCharCode.apply(null, new Uint8Array(t3.data)); } catch (e3) { for (var s3 = new Uint8Array(t3.data), a3 = new Array(s3.length), c3 = 0; c3 < s3.length; c3++) a3[c3] = s3[c3]; n3 = String.fromCharCode.apply(null, a3); } return o3 += btoa(n3), r3(o3); }, e2.decodePacket = function(t3, r3, n3) { if (void 0 === t3) return d2; if ("string" == typeof t3) { if ("b" === t3.charAt(0)) return e2.decodeBase64Packet(t3.substr(1), r3); if (n3 && false === (t3 = function(t4) { try { t4 = c2.decode(t4, { strict: false }); } catch (t5) { return false; } return t4; }(t3))) return d2; var o3 = t3.charAt(0); return Number(o3) == o3 && l2[o3] ? t3.length > 1 ? { type: l2[o3], data: t3.substring(1) } : { type: l2[o3] } : d2; } o3 = new Uint8Array(t3)[0]; var i3 = s2(t3, 1); return y2 && "blob" === r3 && (i3 = new y2([i3])), { type: l2[o3], data: i3 }; }, e2.decodeBase64Packet = function(t3, e3) { var r3 = l2[t3.charAt(0)]; if (!n2) return { type: r3, data: { base64: true, data: t3.substr(1) } }; var o3 = n2.decode(t3.substr(1)); return "blob" === e3 && y2 && (o3 = new y2([o3])), { type: r3, data: o3 }; }, e2.encodePayload = function(t3, r3, n3) { "function" == typeof r3 && (n3 = r3, r3 = null); var o3 = i2(t3); if (r3 && o3) return y2 && !f2 ? e2.encodePayloadAsBlob(t3, n3) : e2.encodePayloadAsArrayBuffer(t3, n3); if (!t3.length) return n3("0:"); g2(t3, function(t4, n4) { e2.encodePacket(t4, !!o3 && r3, false, function(t5) { n4(null, function(t6) { return t6.length + ":" + t6; }(t5)); }); }, function(t4, e3) { return n3(e3.join("")); }); }, e2.decodePayload = function(t3, r3, n3) { if ("string" != typeof t3) return e2.decodePayloadAsBinary(t3, r3, n3); var o3; if ("function" == typeof r3 && (n3 = r3, r3 = null), "" === t3) return n3(d2, 0, 1); for (var i3, s3, a3 = "", c3 = 0, h3 = t3.length; c3 < h3; c3++) { var u3 = t3.charAt(c3); if (":" === u3) { if ("" === a3 || a3 != (i3 = Number(a3))) return n3(d2, 0, 1); if (a3 != (s3 = t3.substr(c3 + 1, i3)).length) return n3(d2, 0, 1); if (s3.length) { if (o3 = e2.decodePacket(s3, r3, false), d2.type === o3.type && d2.data === o3.data) return n3(d2, 0, 1); if (false === n3(o3, c3 + i3, h3)) return; } c3 += i3, a3 = ""; } else a3 += u3; } return "" !== a3 ? n3(d2, 0, 1) : void 0; }, e2.encodePayloadAsArrayBuffer = function(t3, r3) { if (!t3.length) return r3(new ArrayBuffer(0)); g2(t3, function(t4, r4) { e2.encodePacket(t4, true, true, function(t5) { return r4(null, t5); }); }, function(t4, e3) { var n3 = e3.reduce(function(t5, e4) { var r4; return t5 + (r4 = "string" == typeof e4 ? e4.length : e4.byteLength).toString().length + r4 + 2; }, 0), o3 = new Uint8Array(n3), i3 = 0; return e3.forEach(function(t5) { var e4 = "string" == typeof t5, r4 = t5; if (e4) { for (var n4 = new Uint8Array(t5.length), s3 = 0; s3 < t5.length; s3++) n4[s3] = t5.charCodeAt(s3); r4 = n4.buffer; } o3[i3++] = e4 ? 0 : 1; var a3 = r4.byteLength.toString(); for (s3 = 0; s3 < a3.length; s3++) o3[i3++] = parseInt(a3[s3]); o3[i3++] = 255; for (n4 = new Uint8Array(r4), s3 = 0; s3 < n4.length; s3++) o3[i3++] = n4[s3]; }), r3(o3.buffer); }); }, e2.encodePayloadAsBlob = function(t3, r3) { g2(t3, function(t4, r4) { e2.encodePacket(t4, true, true, function(t5) { var e3 = new Uint8Array(1); if (e3[0] = 1, "string" == typeof t5) { for (var n3 = new Uint8Array(t5.length), o3 = 0; o3 < t5.length; o3++) n3[o3] = t5.charCodeAt(o3); t5 = n3.buffer, e3[0] = 0; } var i3 = (t5 instanceof ArrayBuffer ? t5.byteLength : t5.size).toString(), s3 = new Uint8Array(i3.length + 1); for (o3 = 0; o3 < i3.length; o3++) s3[o3] = parseInt(i3[o3]); if (s3[i3.length] = 255, y2) { var a3 = new y2([e3.buffer, s3.buffer, t5]); r4(null, a3); } }); }, function(t4, e3) { return r3(new y2(e3)); }); }, e2.decodePayloadAsBinary = function(t3, r3, n3) { "function" == typeof r3 && (n3 = r3, r3 = null); for (var o3 = t3, i3 = []; o3.byteLength > 0; ) { for (var a3 = new Uint8Array(o3), c3 = 0 === a3[0], h3 = "", u3 = 1; 255 !== a3[u3]; u3++) { if (h3.length > 310) return n3(d2, 0, 1); h3 += a3[u3]; } o3 = s2(o3, 2 + h3.length), h3 = parseInt(h3); var f3 = s2(o3, 0, h3); if (c3) try { f3 = String.fromCharCode.apply(null, new Uint8Array(f3)); } catch (t4) { var p3 = new Uint8Array(f3); f3 = ""; for (u3 = 0; u3 < p3.length; u3++) f3 += String.fromCharCode(p3[u3]); } i3.push(f3), o3 = s2(o3, h3); } var l3 = i3.length; i3.forEach(function(t4, o4) { n3(e2.decodePacket(t4, r3, true), o4, l3); }); }; }, function(t2, e2) { e2.encode = function(t3) { var e3 = ""; for (var r2 in t3) t3.hasOwnProperty(r2) && (e3.length && (e3 += "&"), e3 += encodeURIComponent(r2) + "=" + encodeURIComponent(t3[r2])); return e3; }, e2.decode = function(t3) { for (var e3 = {}, r2 = t3.split("&"), n2 = 0, o2 = r2.length; n2 < o2; n2++) { var i2 = r2[n2].split("="); e3[decodeURIComponent(i2[0])] = decodeURIComponent(i2[1]); } return e3; }; }, function(t2, e2) { t2.exports = function(t3, e3) { var r2 = function() { }; r2.prototype = e3.prototype, t3.prototype = new r2(), t3.prototype.constructor = t3; }; }, function(t2, e2, r2) { var n2 = r2(0)("socket.io-parser"), o2 = r2(1), i2 = r2(25), s2 = r2(10), a2 = r2(11); function c2() { } e2.protocol = 4, e2.types = ["CONNECT", "DISCONNECT", "EVENT", "ACK", "ERROR", "BINARY_EVENT", "BINARY_ACK"], e2.CONNECT = 0, e2.DISCONNECT = 1, e2.EVENT = 2, e2.ACK = 3, e2.ERROR = 4, e2.BINARY_EVENT = 5, e2.BINARY_ACK = 6, e2.Encoder = c2, e2.Decoder = f2; var h2 = e2.ERROR + '"encode error"'; function u2(t3) { var r3 = "" + t3.type; if (e2.BINARY_EVENT !== t3.type && e2.BINARY_ACK !== t3.type || (r3 += t3.attachments + "-"), t3.nsp && "/" !== t3.nsp && (r3 += t3.nsp + ","), null != t3.id && (r3 += t3.id), null != t3.data) { var o3 = function(t4) { try { return JSON.stringify(t4); } catch (t5) { return false; } }(t3.data); if (false === o3) return h2; r3 += o3; } return n2("encoded %j as %s", t3, r3), r3; } function f2() { this.reconstructor = null; } function p2(t3) { this.reconPack = t3, this.buffers = []; } function l2(t3) { return { type: e2.ERROR, data: "parser error: " + t3 }; } c2.prototype.encode = function(t3, r3) { (n2("encoding packet %j", t3), e2.BINARY_EVENT === t3.type || e2.BINARY_ACK === t3.type) ? function(t4, e3) { i2.removeBlobs(t4, function(t5) { var r4 = i2.deconstructPacket(t5), n3 = u2(r4.packet), o3 = r4.buffers; o3.unshift(n3), e3(o3); }); }(t3, r3) : r3([u2(t3)]); }, o2(f2.prototype), f2.prototype.add = function(t3) { var r3; if ("string" == typeof t3) r3 = function(t4) { var r4 = 0, o3 = { type: Number(t4.charAt(0)) }; if (null == e2.types[o3.type]) return l2("unknown packet type " + o3.type); if (e2.BINARY_EVENT === o3.type || e2.BINARY_ACK === o3.type) { for (var i3 = ""; "-" !== t4.charAt(++r4) && (i3 += t4.charAt(r4), r4 != t4.length); ) ; if (i3 != Number(i3) || "-" !== t4.charAt(r4)) throw new Error("Illegal attachments"); o3.attachments = Number(i3); } if ("/" === t4.charAt(r4 + 1)) for (o3.nsp = ""; ++r4; ) { if ("," === (c3 = t4.charAt(r4))) break; if (o3.nsp += c3, r4 === t4.length) break; } else o3.nsp = "/"; var a3 = t4.charAt(r4 + 1); if ("" !== a3 && Number(a3) == a3) { for (o3.id = ""; ++r4; ) { var c3; if (null == (c3 = t4.charAt(r4)) || Number(c3) != c3) { --r4; break; } if (o3.id += t4.charAt(r4), r4 === t4.length) break; } o3.id = Number(o3.id); } if (t4.charAt(++r4)) { var h3 = function(t5) { try { return JSON.parse(t5); } catch (t6) { return false; } }(t4.substr(r4)); if (!(false !== h3 && (o3.type === e2.ERROR || s2(h3)))) return l2("invalid payload"); o3.data = h3; } return n2("decoded %s as %j", t4, o3), o3; }(t3), e2.BINARY_EVENT === r3.type || e2.BINARY_ACK === r3.type ? (this.reconstructor = new p2(r3), 0 === this.reconstructor.reconPack.attachments && this.emit("decoded", r3)) : this.emit("decoded", r3); else { if (!a2(t3) && !t3.base64) throw new Error("Unknown type: " + t3); if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet"); (r3 = this.reconstructor.takeBinaryData(t3)) && (this.reconstructor = null, this.emit("decoded", r3)); } }, f2.prototype.destroy = function() { this.reconstructor && this.reconstructor.finishedReconstruction(); }, p2.prototype.takeBinaryData = function(t3) { if (this.buffers.push(t3), this.buffers.length === this.reconPack.attachments) { var e3 = i2.reconstructPacket(this.reconPack, this.buffers); return this.finishedReconstruction(), e3; } return null; }, p2.prototype.finishedReconstruction = function() { this.reconPack = null, this.buffers = []; }; }, function(t2, e2, r2) { (function(t3) { /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n2 = r2(26), o2 = r2(27), i2 = r2(28); function s2() { return c2.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823; } function a2(t4, e3) { if (s2() < e3) throw new RangeError("Invalid typed array length"); return c2.TYPED_ARRAY_SUPPORT ? (t4 = new Uint8Array(e3)).__proto__ = c2.prototype : (null === t4 && (t4 = new c2(e3)), t4.length = e3), t4; } function c2(t4, e3, r3) { if (!(c2.TYPED_ARRAY_SUPPORT || this instanceof c2)) return new c2(t4, e3, r3); if ("number" == typeof t4) { if ("string" == typeof e3) throw new Error("If encoding is specified then the first argument must be a string"); return f2(this, t4); } return h2(this, t4, e3, r3); } function h2(t4, e3, r3, n3) { if ("number" == typeof e3) throw new TypeError('"value" argument must not be a number'); return "undefined" != typeof ArrayBuffer && e3 instanceof ArrayBuffer ? function(t5, e4, r4, n4) { if (e4.byteLength, r4 < 0 || e4.byteLength < r4) throw new RangeError("'offset' is out of bounds"); if (e4.byteLength < r4 + (n4 || 0)) throw new RangeError("'length' is out of bounds"); e4 = void 0 === r4 && void 0 === n4 ? new Uint8Array(e4) : void 0 === n4 ? new Uint8Array(e4, r4) : new Uint8Array(e4, r4, n4); c2.TYPED_ARRAY_SUPPORT ? (t5 = e4).__proto__ = c2.prototype : t5 = p2(t5, e4); return t5; }(t4, e3, r3, n3) : "string" == typeof e3 ? function(t5, e4, r4) { "string" == typeof r4 && "" !== r4 || (r4 = "utf8"); if (!c2.isEncoding(r4)) throw new TypeError('"encoding" must be a valid string encoding'); var n4 = 0 | d2(e4, r4), o3 = (t5 = a2(t5, n4)).write(e4, r4); o3 !== n4 && (t5 = t5.slice(0, o3)); return t5; }(t4, e3, r3) : function(t5, e4) { if (c2.isBuffer(e4)) { var r4 = 0 | l2(e4.length); return 0 === (t5 = a2(t5, r4)).length || e4.copy(t5, 0, 0, r4), t5; } if (e4) { if ("undefined" != typeof ArrayBuffer && e4.buffer instanceof ArrayBuffer || "length" in e4) return "number" != typeof e4.length || (n4 = e4.length) != n4 ? a2(t5, 0) : p2(t5, e4); if ("Buffer" === e4.type && i2(e4.data)) return p2(t5, e4.data); } var n4; throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object."); }(t4, e3); } function u2(t4) { if ("number" != typeof t4) throw new TypeError('"size" argument must be a number'); if (t4 < 0) throw new RangeError('"size" argument must not be negative'); } function f2(t4, e3) { if (u2(e3), t4 = a2(t4, e3 < 0 ? 0 : 0 | l2(e3)), !c2.TYPED_ARRAY_SUPPORT) for (var r3 = 0; r3 < e3; ++r3) t4[r3] = 0; return t4; } function p2(t4, e3) { var r3 = e3.length < 0 ? 0 : 0 | l2(e3.length); t4 = a2(t4, r3); for (var n3 = 0; n3 < r3; n3 += 1) t4[n3] = 255 & e3[n3]; return t4; } function l2(t4) { if (t4 >= s2()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s2().toString(16) + " bytes"); return 0 | t4; } function d2(t4, e3) { if (c2.isBuffer(t4)) return t4.length; if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(t4) || t4 instanceof ArrayBuffer)) return t4.byteLength; "string" != typeof t4 && (t4 = "" + t4); var r3 = t4.length; if (0 === r3) return 0; for (var n3 = false; ; ) switch (e3) { case "ascii": case "latin1": case "binary": return r3; case "utf8": case "utf-8": case void 0: return q2(t4).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return 2 * r3; case "hex": return r3 >>> 1; case "base64": return Y2(t4).length; default: if (n3) return q2(t4).length; e3 = ("" + e3).toLowerCase(), n3 = true; } } function y2(t4, e3, r3) { var n3 = false; if ((void 0 === e3 || e3 < 0) && (e3 = 0), e3 > this.length) return ""; if ((void 0 === r3 || r3 > this.length) && (r3 = this.length), r3 <= 0) return ""; if ((r3 >>>= 0) <= (e3 >>>= 0)) return ""; for (t4 || (t4 = "utf8"); ; ) switch (t4) { case "hex": return C2(this, e3, r3); case "utf8": case "utf-8": return x(this, e3, r3); case "ascii": return R2(this, e3, r3); case "latin1": case "binary": return S2(this, e3, r3); case "base64": return _2(this, e3, r3); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return P2(this, e3, r3); default: if (n3) throw new TypeError("Unknown encoding: " + t4); t4 = (t4 + "").toLowerCase(), n3 = true; } } function g2(t4, e3, r3) { var n3 = t4[e3]; t4[e3] = t4[r3], t4[r3] = n3; } function v2(t4, e3, r3, n3, o3) { if (0 === t4.length) return -1; if ("string" == typeof r3 ? (n3 = r3, r3 = 0) : r3 > 2147483647 ? r3 = 2147483647 : r3 < -2147483648 && (r3 = -2147483648), r3 = +r3, isNaN(r3) && (r3 = o3 ? 0 : t4.length - 1), r3 < 0 && (r3 = t4.length + r3), r3 >= t4.length) { if (o3) return -1; r3 = t4.length - 1; } else if (r3 < 0) { if (!o3) return -1; r3 = 0; } if ("string" == typeof e3 && (e3 = c2.from(e3, n3)), c2.isBuffer(e3)) return 0 === e3.length ? -1 : m2(t4, e3, r3, n3, o3); if ("number" == typeof e3) return e3 &= 255, c2.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? o3 ? Uint8Array.prototype.indexOf.call(t4, e3, r3) : Uint8Array.prototype.lastIndexOf.call(t4, e3, r3) : m2(t4, [e3], r3, n3, o3); throw new TypeError("val must be string, number or Buffer"); } function m2(t4, e3, r3, n3, o3) { var i3, s3 = 1, a3 = t4.length, c3 = e3.length; if (void 0 !== n3 && ("ucs2" === (n3 = String(n3).toLowerCase()) || "ucs-2" === n3 || "utf16le" === n3 || "utf-16le" === n3)) { if (t4.length < 2 || e3.length < 2) return -1; s3 = 2, a3 /= 2, c3 /= 2, r3 /= 2; } function h3(t5, e4) { return 1 === s3 ? t5[e4] : t5.readUInt16BE(e4 * s3); } if (o3) { var u3 = -1; for (i3 = r3; i3 < a3; i3++) if (h3(t4, i3) === h3(e3, -1 === u3 ? 0 : i3 - u3)) { if (-1 === u3 && (u3 = i3), i3 - u3 + 1 === c3) return u3 * s3; } else -1 !== u3 && (i3 -= i3 - u3), u3 = -1; } else for (r3 + c3 > a3 && (r3 = a3 - c3), i3 = r3; i3 >= 0; i3--) { for (var f3 = true, p3 = 0; p3 < c3; p3++) if (h3(t4, i3 + p3) !== h3(e3, p3)) { f3 = false; break; } if (f3) return i3; } return -1; } function b2(t4, e3, r3, n3) { r3 = Number(r3) || 0; var o3 = t4.length - r3; n3 ? (n3 = Number(n3)) > o3 && (n3 = o3) : n3 = o3; var i3 = e3.length; if (i3 % 2 != 0) throw new TypeError("Invalid hex string"); n3 > i3 / 2 && (n3 = i3 / 2); for (var s3 = 0; s3 < n3; ++s3) { var a3 = parseInt(e3.substr(2 * s3, 2), 16); if (isNaN(a3)) return s3; t4[r3 + s3] = a3; } return s3; } function w2(t4, e3, r3, n3) { return H2(q2(e3, t4.length - r3), t4, r3, n3); } function A2(t4, e3, r3, n3) { return H2(function(t5) { for (var e4 = [], r4 = 0; r4 < t5.length; ++r4) e4.push(255 & t5.charCodeAt(r4)); return e4; }(e3), t4, r3, n3); } function k(t4, e3, r3, n3) { return A2(t4, e3, r3, n3); } function E2(t4, e3, r3, n3) { return H2(Y2(e3), t4, r3, n3); } function B2(t4, e3, r3, n3) { return H2(function(t5, e4) { for (var r4, n4, o3, i3 = [], s3 = 0; s3 < t5.length && !((e4 -= 2) < 0); ++s3) r4 = t5.charCodeAt(s3), n4 = r4 >> 8, o3 = r4 % 256, i3.push(o3), i3.push(n4); return i3; }(e3, t4.length - r3), t4, r3, n3); } function _2(t4, e3, r3) { return 0 === e3 && r3 === t4.length ? n2.fromByteArray(t4) : n2.fromByteArray(t4.slice(e3, r3)); } function x(t4, e3, r3) { r3 = Math.min(t4.length, r3); for (var n3 = [], o3 = e3; o3 < r3; ) { var i3, s3, a3, c3, h3 = t4[o3], u3 = null, f3 = h3 > 239 ? 4 : h3 > 223 ? 3 : h3 > 191 ? 2 : 1; if (o3 + f3 <= r3) switch (f3) { case 1: h3 < 128 && (u3 = h3); break; case 2: 128 == (192 & (i3 = t4[o3 + 1])) && (c3 = (31 & h3) << 6 | 63 & i3) > 127 && (u3 = c3); break; case 3: i3 = t4[o3 + 1], s3 = t4[o3 + 2], 128 == (192 & i3) && 128 == (192 & s3) && (c3 = (15 & h3) << 12 | (63 & i3) << 6 | 63 & s3) > 2047 && (c3 < 55296 || c3 > 57343) && (u3 = c3); break; case 4: i3 = t4[o3 + 1], s3 = t4[o3 + 2], a3 = t4[o3 + 3], 128 == (192 & i3) && 128 == (192 & s3) && 128 == (192 & a3) && (c3 = (15 & h3) << 18 | (63 & i3) << 12 | (63 & s3) << 6 | 63 & a3) > 65535 && c3 < 1114112 && (u3 = c3); } null === u3 ? (u3 = 65533, f3 = 1) : u3 > 65535 && (u3 -= 65536, n3.push(u3 >>> 10 & 1023 | 55296), u3 = 56320 | 1023 & u3), n3.push(u3), o3 += f3; } return function(t5) { var e4 = t5.length; if (e4 <= 4096) return String.fromCharCode.apply(String, t5); var r4 = "", n4 = 0; for (; n4 < e4; ) r4 += String.fromCharCode.apply(String, t5.slice(n4, n4 += 4096)); return r4; }(n3); } e2.Buffer = c2, e2.SlowBuffer = function(t4) { +t4 != t4 && (t4 = 0); return c2.alloc(+t4); }, e2.INSPECT_MAX_BYTES = 50, c2.TYPED_ARRAY_SUPPORT = void 0 !== t3.TYPED_ARRAY_SUPPORT ? t3.TYPED_ARRAY_SUPPORT : function() { try { var t4 = new Uint8Array(1); return t4.__proto__ = { __proto__: Uint8Array.prototype, foo: function() { return 42; } }, 42 === t4.foo() && "function" == typeof t4.subarray && 0 === t4.subarray(1, 1).byteLength; } catch (t5) { return false; } }(), e2.kMaxLength = s2(), c2.poolSize = 8192, c2._augment = function(t4) { return t4.__proto__ = c2.prototype, t4; }, c2.from = function(t4, e3, r3) { return h2(null, t4, e3, r3); }, c2.TYPED_ARRAY_SUPPORT && (c2.prototype.__proto__ = Uint8Array.prototype, c2.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && c2[Symbol.species] === c2 && Object.defineProperty(c2, Symbol.species, { value: null, configurable: true })), c2.alloc = function(t4, e3, r3) { return function(t5, e4, r4, n3) { return u2(e4), e4 <= 0 ? a2(t5, e4) : void 0 !== r4 ? "string" == typeof n3 ? a2(t5, e4).fill(r4, n3) : a2(t5, e4).fill(r4) : a2(t5, e4); }(null, t4, e3, r3); }, c2.allocUnsafe = function(t4) { return f2(null, t4); }, c2.allocUnsafeSlow = function(t4) { return f2(null, t4); }, c2.isBuffer = function(t4) { return !(null == t4 || !t4._isBuffer); }, c2.compare = function(t4, e3) { if (!c2.isBuffer(t4) || !c2.isBuffer(e3)) throw new TypeError("Arguments must be Buffers"); if (t4 === e3) return 0; for (var r3 = t4.length, n3 = e3.length, o3 = 0, i3 = Math.min(r3, n3); o3 < i3; ++o3) if (t4[o3] !== e3[o3]) { r3 = t4[o3], n3 = e3[o3]; break; } return r3 < n3 ? -1 : n3 < r3 ? 1 : 0; }, c2.isEncoding = function(t4) { switch (String(t4).toLowerCase()) { case "hex": case "utf8": case "utf-8": case "ascii": case "latin1": case "binary": case "base64": case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return true; default: return false; } }, c2.concat = function(t4, e3) { if (!i2(t4)) throw new TypeError('"list" argument must be an Array of Buffers'); if (0 === t4.length) return c2.alloc(0); var r3; if (void 0 === e3) for (e3 = 0, r3 = 0; r3 < t4.length; ++r3) e3 += t4[r3].length; var n3 = c2.allocUnsafe(e3), o3 = 0; for (r3 = 0; r3 < t4.length; ++r3) { var s3 = t4[r3]; if (!c2.isBuffer(s3)) throw new TypeError('"list" argument must be an Array of Buffers'); s3.copy(n3, o3), o3 += s3.length; } return n3; }, c2.byteLength = d2, c2.prototype._isBuffer = true, c2.prototype.swap16 = function() { var t4 = this.length; if (t4 % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); for (var e3 = 0; e3 < t4; e3 += 2) g2(this, e3, e3 + 1); return this; }, c2.prototype.swap32 = function() { var t4 = this.length; if (t4 % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); for (var e3 = 0; e3 < t4; e3 += 4) g2(this, e3, e3 + 3), g2(this, e3 + 1, e3 + 2); return this; }, c2.prototype.swap64 = function() { var t4 = this.length; if (t4 % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); for (var e3 = 0; e3 < t4; e3 += 8) g2(this, e3, e3 + 7), g2(this, e3 + 1, e3 + 6), g2(this, e3 + 2, e3 + 5), g2(this, e3 + 3, e3 + 4); return this; }, c2.prototype.toString = function() { var t4 = 0 | this.length; return 0 === t4 ? "" : 0 === arguments.length ? x(this, 0, t4) : y2.apply(this, arguments); }, c2.prototype.equals = function(t4) { if (!c2.isBuffer(t4)) throw new TypeError("Argument must be a Buffer"); return this === t4 || 0 === c2.compare(this, t4); }, c2.prototype.inspect = function() { var t4 = "", r3 = e2.INSPECT_MAX_BYTES; return this.length > 0 && (t4 = this.toString("hex", 0, r3).match(/.{2}/g).join(" "), this.length > r3 && (t4 += " ... ")), ""; }, c2.prototype.compare = function(t4, e3, r3, n3, o3) { if (!c2.isBuffer(t4)) throw new TypeError("Argument must be a Buffer"); if (void 0 === e3 && (e3 = 0), void 0 === r3 && (r3 = t4 ? t4.length : 0), void 0 === n3 && (n3 = 0), void 0 === o3 && (o3 = this.length), e3 < 0 || r3 > t4.length || n3 < 0 || o3 > this.length) throw new RangeError("out of range index"); if (n3 >= o3 && e3 >= r3) return 0; if (n3 >= o3) return -1; if (e3 >= r3) return 1; if (this === t4) return 0; for (var i3 = (o3 >>>= 0) - (n3 >>>= 0), s3 = (r3 >>>= 0) - (e3 >>>= 0), a3 = Math.min(i3, s3), h3 = this.slice(n3, o3), u3 = t4.slice(e3, r3), f3 = 0; f3 < a3; ++f3) if (h3[f3] !== u3[f3]) { i3 = h3[f3], s3 = u3[f3]; break; } return i3 < s3 ? -1 : s3 < i3 ? 1 : 0; }, c2.prototype.includes = function(t4, e3, r3) { return -1 !== this.indexOf(t4, e3, r3); }, c2.prototype.indexOf = function(t4, e3, r3) { return v2(this, t4, e3, r3, true); }, c2.prototype.lastIndexOf = function(t4, e3, r3) { return v2(this, t4, e3, r3, false); }, c2.prototype.write = function(t4, e3, r3, n3) { if (void 0 === e3) n3 = "utf8", r3 = this.length, e3 = 0; else if (void 0 === r3 && "string" == typeof e3) n3 = e3, r3 = this.length, e3 = 0; else { if (!isFinite(e3)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); e3 |= 0, isFinite(r3) ? (r3 |= 0, void 0 === n3 && (n3 = "utf8")) : (n3 = r3, r3 = void 0); } var o3 = this.length - e3; if ((void 0 === r3 || r3 > o3) && (r3 = o3), t4.length > 0 && (r3 < 0 || e3 < 0) || e3 > this.length) throw new RangeError("Attempt to write outside buffer bounds"); n3 || (n3 = "utf8"); for (var i3 = false; ; ) switch (n3) { case "hex": return b2(this, t4, e3, r3); case "utf8": case "utf-8": return w2(this, t4, e3, r3); case "ascii": return A2(this, t4, e3, r3); case "latin1": case "binary": return k(this, t4, e3, r3); case "base64": return E2(this, t4, e3, r3); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return B2(this, t4, e3, r3); default: if (i3) throw new TypeError("Unknown encoding: " + n3); n3 = ("" + n3).toLowerCase(), i3 = true; } }, c2.prototype.toJSON = function() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; }; function R2(t4, e3, r3) { var n3 = ""; r3 = Math.min(t4.length, r3); for (var o3 = e3; o3 < r3; ++o3) n3 += String.fromCharCode(127 & t4[o3]); return n3; } function S2(t4, e3, r3) { var n3 = ""; r3 = Math.min(t4.length, r3); for (var o3 = e3; o3 < r3; ++o3) n3 += String.fromCharCode(t4[o3]); return n3; } function C2(t4, e3, r3) { var n3 = t4.length; (!e3 || e3 < 0) && (e3 = 0), (!r3 || r3 < 0 || r3 > n3) && (r3 = n3); for (var o3 = "", i3 = e3; i3 < r3; ++i3) o3 += M2(t4[i3]); return o3; } function P2(t4, e3, r3) { for (var n3 = t4.slice(e3, r3), o3 = "", i3 = 0; i3 < n3.length; i3 += 2) o3 += String.fromCharCode(n3[i3] + 256 * n3[i3 + 1]); return o3; } function T2(t4, e3, r3) { if (t4 % 1 != 0 || t4 < 0) throw new RangeError("offset is not uint"); if (t4 + e3 > r3) throw new RangeError("Trying to access beyond buffer length"); } function O2(t4, e3, r3, n3, o3, i3) { if (!c2.isBuffer(t4)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (e3 > o3 || e3 < i3) throw new RangeError('"value" argument is out of bounds'); if (r3 + n3 > t4.length) throw new RangeError("Index out of range"); } function N2(t4, e3, r3, n3) { e3 < 0 && (e3 = 65535 + e3 + 1); for (var o3 = 0, i3 = Math.min(t4.length - r3, 2); o3 < i3; ++o3) t4[r3 + o3] = (e3 & 255 << 8 * (n3 ? o3 : 1 - o3)) >>> 8 * (n3 ? o3 : 1 - o3); } function L2(t4, e3, r3, n3) { e3 < 0 && (e3 = 4294967295 + e3 + 1); for (var o3 = 0, i3 = Math.min(t4.length - r3, 4); o3 < i3; ++o3) t4[r3 + o3] = e3 >>> 8 * (n3 ? o3 : 3 - o3) & 255; } function U2(t4, e3, r3, n3, o3, i3) { if (r3 + n3 > t4.length) throw new RangeError("Index out of range"); if (r3 < 0) throw new RangeError("Index out of range"); } function I2(t4, e3, r3, n3, i3) { return i3 || U2(t4, 0, r3, 4), o2.write(t4, e3, r3, n3, 23, 4), r3 + 4; } function j2(t4, e3, r3, n3, i3) { return i3 || U2(t4, 0, r3, 8), o2.write(t4, e3, r3, n3, 52, 8), r3 + 8; } c2.prototype.slice = function(t4, e3) { var r3, n3 = this.length; if ((t4 = ~~t4) < 0 ? (t4 += n3) < 0 && (t4 = 0) : t4 > n3 && (t4 = n3), (e3 = void 0 === e3 ? n3 : ~~e3) < 0 ? (e3 += n3) < 0 && (e3 = 0) : e3 > n3 && (e3 = n3), e3 < t4 && (e3 = t4), c2.TYPED_ARRAY_SUPPORT) (r3 = this.subarray(t4, e3)).__proto__ = c2.prototype; else { var o3 = e3 - t4; r3 = new c2(o3, void 0); for (var i3 = 0; i3 < o3; ++i3) r3[i3] = this[i3 + t4]; } return r3; }, c2.prototype.readUIntLE = function(t4, e3, r3) { t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length); for (var n3 = this[t4], o3 = 1, i3 = 0; ++i3 < e3 && (o3 *= 256); ) n3 += this[t4 + i3] * o3; return n3; }, c2.prototype.readUIntBE = function(t4, e3, r3) { t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length); for (var n3 = this[t4 + --e3], o3 = 1; e3 > 0 && (o3 *= 256); ) n3 += this[t4 + --e3] * o3; return n3; }, c2.prototype.readUInt8 = function(t4, e3) { return e3 || T2(t4, 1, this.length), this[t4]; }, c2.prototype.readUInt16LE = function(t4, e3) { return e3 || T2(t4, 2, this.length), this[t4] | this[t4 + 1] << 8; }, c2.prototype.readUInt16BE = function(t4, e3) { return e3 || T2(t4, 2, this.length), this[t4] << 8 | this[t4 + 1]; }, c2.prototype.readUInt32LE = function(t4, e3) { return e3 || T2(t4, 4, this.length), (this[t4] | this[t4 + 1] << 8 | this[t4 + 2] << 16) + 16777216 * this[t4 + 3]; }, c2.prototype.readUInt32BE = function(t4, e3) { return e3 || T2(t4, 4, this.length), 16777216 * this[t4] + (this[t4 + 1] << 16 | this[t4 + 2] << 8 | this[t4 + 3]); }, c2.prototype.readIntLE = function(t4, e3, r3) { t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length); for (var n3 = this[t4], o3 = 1, i3 = 0; ++i3 < e3 && (o3 *= 256); ) n3 += this[t4 + i3] * o3; return n3 >= (o3 *= 128) && (n3 -= Math.pow(2, 8 * e3)), n3; }, c2.prototype.readIntBE = function(t4, e3, r3) { t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length); for (var n3 = e3, o3 = 1, i3 = this[t4 + --n3]; n3 > 0 && (o3 *= 256); ) i3 += this[t4 + --n3] * o3; return i3 >= (o3 *= 128) && (i3 -= Math.pow(2, 8 * e3)), i3; }, c2.prototype.readInt8 = function(t4, e3) { return e3 || T2(t4, 1, this.length), 128 & this[t4] ? -1 * (255 - this[t4] + 1) : this[t4]; }, c2.prototype.readInt16LE = function(t4, e3) { e3 || T2(t4, 2, this.length); var r3 = this[t4] | this[t4 + 1] << 8; return 32768 & r3 ? 4294901760 | r3 : r3; }, c2.prototype.readInt16BE = function(t4, e3) { e3 || T2(t4, 2, this.length); var r3 = this[t4 + 1] | this[t4] << 8; return 32768 & r3 ? 4294901760 | r3 : r3; }, c2.prototype.readInt32LE = function(t4, e3) { return e3 || T2(t4, 4, this.length), this[t4] | this[t4 + 1] << 8 | this[t4 + 2] << 16 | this[t4 + 3] << 24; }, c2.prototype.readInt32BE = function(t4, e3) { return e3 || T2(t4, 4, this.length), this[t4] << 24 | this[t4 + 1] << 16 | this[t4 + 2] << 8 | this[t4 + 3]; }, c2.prototype.readFloatLE = function(t4, e3) { return e3 || T2(t4, 4, this.length), o2.read(this, t4, true, 23, 4); }, c2.prototype.readFloatBE = function(t4, e3) { return e3 || T2(t4, 4, this.length), o2.read(this, t4, false, 23, 4); }, c2.prototype.readDoubleLE = function(t4, e3) { return e3 || T2(t4, 8, this.length), o2.read(this, t4, true, 52, 8); }, c2.prototype.readDoubleBE = function(t4, e3) { return e3 || T2(t4, 8, this.length), o2.read(this, t4, false, 52, 8); }, c2.prototype.writeUIntLE = function(t4, e3, r3, n3) { (t4 = +t4, e3 |= 0, r3 |= 0, n3) || O2(this, t4, e3, r3, Math.pow(2, 8 * r3) - 1, 0); var o3 = 1, i3 = 0; for (this[e3] = 255 & t4; ++i3 < r3 && (o3 *= 256); ) this[e3 + i3] = t4 / o3 & 255; return e3 + r3; }, c2.prototype.writeUIntBE = function(t4, e3, r3, n3) { (t4 = +t4, e3 |= 0, r3 |= 0, n3) || O2(this, t4, e3, r3, Math.pow(2, 8 * r3) - 1, 0); var o3 = r3 - 1, i3 = 1; for (this[e3 + o3] = 255 & t4; --o3 >= 0 && (i3 *= 256); ) this[e3 + o3] = t4 / i3 & 255; return e3 + r3; }, c2.prototype.writeUInt8 = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 1, 255, 0), c2.TYPED_ARRAY_SUPPORT || (t4 = Math.floor(t4)), this[e3] = 255 & t4, e3 + 1; }, c2.prototype.writeUInt16LE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 65535, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = 255 & t4, this[e3 + 1] = t4 >>> 8) : N2(this, t4, e3, true), e3 + 2; }, c2.prototype.writeUInt16BE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 65535, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 8, this[e3 + 1] = 255 & t4) : N2(this, t4, e3, false), e3 + 2; }, c2.prototype.writeUInt32LE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 4294967295, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3 + 3] = t4 >>> 24, this[e3 + 2] = t4 >>> 16, this[e3 + 1] = t4 >>> 8, this[e3] = 255 & t4) : L2(this, t4, e3, true), e3 + 4; }, c2.prototype.writeUInt32BE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 4294967295, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 24, this[e3 + 1] = t4 >>> 16, this[e3 + 2] = t4 >>> 8, this[e3 + 3] = 255 & t4) : L2(this, t4, e3, false), e3 + 4; }, c2.prototype.writeIntLE = function(t4, e3, r3, n3) { if (t4 = +t4, e3 |= 0, !n3) { var o3 = Math.pow(2, 8 * r3 - 1); O2(this, t4, e3, r3, o3 - 1, -o3); } var i3 = 0, s3 = 1, a3 = 0; for (this[e3] = 255 & t4; ++i3 < r3 && (s3 *= 256); ) t4 < 0 && 0 === a3 && 0 !== this[e3 + i3 - 1] && (a3 = 1), this[e3 + i3] = (t4 / s3 >> 0) - a3 & 255; return e3 + r3; }, c2.prototype.writeIntBE = function(t4, e3, r3, n3) { if (t4 = +t4, e3 |= 0, !n3) { var o3 = Math.pow(2, 8 * r3 - 1); O2(this, t4, e3, r3, o3 - 1, -o3); } var i3 = r3 - 1, s3 = 1, a3 = 0; for (this[e3 + i3] = 255 & t4; --i3 >= 0 && (s3 *= 256); ) t4 < 0 && 0 === a3 && 0 !== this[e3 + i3 + 1] && (a3 = 1), this[e3 + i3] = (t4 / s3 >> 0) - a3 & 255; return e3 + r3; }, c2.prototype.writeInt8 = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 1, 127, -128), c2.TYPED_ARRAY_SUPPORT || (t4 = Math.floor(t4)), t4 < 0 && (t4 = 255 + t4 + 1), this[e3] = 255 & t4, e3 + 1; }, c2.prototype.writeInt16LE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 32767, -32768), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = 255 & t4, this[e3 + 1] = t4 >>> 8) : N2(this, t4, e3, true), e3 + 2; }, c2.prototype.writeInt16BE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 32767, -32768), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 8, this[e3 + 1] = 255 & t4) : N2(this, t4, e3, false), e3 + 2; }, c2.prototype.writeInt32LE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 2147483647, -2147483648), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = 255 & t4, this[e3 + 1] = t4 >>> 8, this[e3 + 2] = t4 >>> 16, this[e3 + 3] = t4 >>> 24) : L2(this, t4, e3, true), e3 + 4; }, c2.prototype.writeInt32BE = function(t4, e3, r3) { return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 2147483647, -2147483648), t4 < 0 && (t4 = 4294967295 + t4 + 1), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 24, this[e3 + 1] = t4 >>> 16, this[e3 + 2] = t4 >>> 8, this[e3 + 3] = 255 & t4) : L2(this, t4, e3, false), e3 + 4; }, c2.prototype.writeFloatLE = function(t4, e3, r3) { return I2(this, t4, e3, true, r3); }, c2.prototype.writeFloatBE = function(t4, e3, r3) { return I2(this, t4, e3, false, r3); }, c2.prototype.writeDoubleLE = function(t4, e3, r3) { return j2(this, t4, e3, true, r3); }, c2.prototype.writeDoubleBE = function(t4, e3, r3) { return j2(this, t4, e3, false, r3); }, c2.prototype.copy = function(t4, e3, r3, n3) { if (r3 || (r3 = 0), n3 || 0 === n3 || (n3 = this.length), e3 >= t4.length && (e3 = t4.length), e3 || (e3 = 0), n3 > 0 && n3 < r3 && (n3 = r3), n3 === r3) return 0; if (0 === t4.length || 0 === this.length) return 0; if (e3 < 0) throw new RangeError("targetStart out of bounds"); if (r3 < 0 || r3 >= this.length) throw new RangeError("sourceStart out of bounds"); if (n3 < 0) throw new RangeError("sourceEnd out of bounds"); n3 > this.length && (n3 = this.length), t4.length - e3 < n3 - r3 && (n3 = t4.length - e3 + r3); var o3, i3 = n3 - r3; if (this === t4 && r3 < e3 && e3 < n3) for (o3 = i3 - 1; o3 >= 0; --o3) t4[o3 + e3] = this[o3 + r3]; else if (i3 < 1e3 || !c2.TYPED_ARRAY_SUPPORT) for (o3 = 0; o3 < i3; ++o3) t4[o3 + e3] = this[o3 + r3]; else Uint8Array.prototype.set.call(t4, this.subarray(r3, r3 + i3), e3); return i3; }, c2.prototype.fill = function(t4, e3, r3, n3) { if ("string" == typeof t4) { if ("string" == typeof e3 ? (n3 = e3, e3 = 0, r3 = this.length) : "string" == typeof r3 && (n3 = r3, r3 = this.length), 1 === t4.length) { var o3 = t4.charCodeAt(0); o3 < 256 && (t4 = o3); } if (void 0 !== n3 && "string" != typeof n3) throw new TypeError("encoding must be a string"); if ("string" == typeof n3 && !c2.isEncoding(n3)) throw new TypeError("Unknown encoding: " + n3); } else "number" == typeof t4 && (t4 &= 255); if (e3 < 0 || this.length < e3 || this.length < r3) throw new RangeError("Out of range index"); if (r3 <= e3) return this; var i3; if (e3 >>>= 0, r3 = void 0 === r3 ? this.length : r3 >>> 0, t4 || (t4 = 0), "number" == typeof t4) for (i3 = e3; i3 < r3; ++i3) this[i3] = t4; else { var s3 = c2.isBuffer(t4) ? t4 : q2(new c2(t4, n3).toString()), a3 = s3.length; for (i3 = 0; i3 < r3 - e3; ++i3) this[i3 + e3] = s3[i3 % a3]; } return this; }; var D2 = /[^+\/0-9A-Za-z-_]/g; function M2(t4) { return t4 < 16 ? "0" + t4.toString(16) : t4.toString(16); } function q2(t4, e3) { var r3; e3 = e3 || 1 / 0; for (var n3 = t4.length, o3 = null, i3 = [], s3 = 0; s3 < n3; ++s3) { if ((r3 = t4.charCodeAt(s3)) > 55295 && r3 < 57344) { if (!o3) { if (r3 > 56319) { (e3 -= 3) > -1 && i3.push(239, 191, 189); continue; } if (s3 + 1 === n3) { (e3 -= 3) > -1 && i3.push(239, 191, 189); continue; } o3 = r3; continue; } if (r3 < 56320) { (e3 -= 3) > -1 && i3.push(239, 191, 189), o3 = r3; continue; } r3 = 65536 + (o3 - 55296 << 10 | r3 - 56320); } else o3 && (e3 -= 3) > -1 && i3.push(239, 191, 189); if (o3 = null, r3 < 128) { if ((e3 -= 1) < 0) break; i3.push(r3); } else if (r3 < 2048) { if ((e3 -= 2) < 0) break; i3.push(r3 >> 6 | 192, 63 & r3 | 128); } else if (r3 < 65536) { if ((e3 -= 3) < 0) break; i3.push(r3 >> 12 | 224, r3 >> 6 & 63 | 128, 63 & r3 | 128); } else { if (!(r3 < 1114112)) throw new Error("Invalid code point"); if ((e3 -= 4) < 0) break; i3.push(r3 >> 18 | 240, r3 >> 12 & 63 | 128, r3 >> 6 & 63 | 128, 63 & r3 | 128); } } return i3; } function Y2(t4) { return n2.toByteArray(function(t5) { if ((t5 = function(t6) { return t6.trim ? t6.trim() : t6.replace(/^\s+|\s+$/g, ""); }(t5).replace(D2, "")).length < 2) return ""; for (; t5.length % 4 != 0; ) t5 += "="; return t5; }(t4)); } function H2(t4, e3, r3, n3) { for (var o3 = 0; o3 < n3 && !(o3 + r3 >= e3.length || o3 >= t4.length); ++o3) e3[o3 + r3] = t4[o3]; return o3; } }).call(this, r2(12)); }, function(t2, e2, r2) { var n2 = r2(31); t2.exports = function(t3) { var e3 = t3.xdomain, r3 = t3.xscheme, o2 = t3.enablesXDR; try { if ("undefined" != typeof XMLHttpRequest && (!e3 || n2)) return new XMLHttpRequest(); } catch (t4) { } try { if ("undefined" != typeof XDomainRequest && !r3 && o2) return new XDomainRequest(); } catch (t4) { } if (!e3) try { return new self[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP"); } catch (t4) { } }; }, function(t2, e2, r2) { var n2 = r2(2), o2 = r2(1); function i2(t3) { this.path = t3.path, this.hostname = t3.hostname, this.port = t3.port, this.secure = t3.secure, this.query = t3.query, this.timestampParam = t3.timestampParam, this.timestampRequests = t3.timestampRequests, this.readyState = "", this.agent = t3.agent || false, this.socket = t3.socket, this.enablesXDR = t3.enablesXDR, this.withCredentials = t3.withCredentials, this.pfx = t3.pfx, this.key = t3.key, this.passphrase = t3.passphrase, this.cert = t3.cert, this.ca = t3.ca, this.ciphers = t3.ciphers, this.rejectUnauthorized = t3.rejectUnauthorized, this.forceNode = t3.forceNode, this.isReactNative = t3.isReactNative, this.extraHeaders = t3.extraHeaders, this.localAddress = t3.localAddress; } t2.exports = i2, o2(i2.prototype), i2.prototype.onError = function(t3, e3) { var r3 = new Error(t3); return r3.type = "TransportError", r3.description = e3, this.emit("error", r3), this; }, i2.prototype.open = function() { return "closed" !== this.readyState && "" !== this.readyState || (this.readyState = "opening", this.doOpen()), this; }, i2.prototype.close = function() { return "opening" !== this.readyState && "open" !== this.readyState || (this.doClose(), this.onClose()), this; }, i2.prototype.send = function(t3) { if ("open" !== this.readyState) throw new Error("Transport not open"); this.write(t3); }, i2.prototype.onOpen = function() { this.readyState = "open", this.writable = true, this.emit("open"); }, i2.prototype.onData = function(t3) { var e3 = n2.decodePacket(t3, this.socket.binaryType); this.onPacket(e3); }, i2.prototype.onPacket = function(t3) { this.emit("packet", t3); }, i2.prototype.onClose = function() { this.readyState = "closed", this.emit("close"); }; }, function(t2, e2) { var r2 = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, n2 = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"]; t2.exports = function(t3) { var e3 = t3, o2 = t3.indexOf("["), i2 = t3.indexOf("]"); -1 != o2 && -1 != i2 && (t3 = t3.substring(0, o2) + t3.substring(o2, i2).replace(/:/g, ";") + t3.substring(i2, t3.length)); for (var s2 = r2.exec(t3 || ""), a2 = {}, c2 = 14; c2--; ) a2[n2[c2]] = s2[c2] || ""; return -1 != o2 && -1 != i2 && (a2.source = e3, a2.host = a2.host.substring(1, a2.host.length - 1).replace(/;/g, ":"), a2.authority = a2.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), a2.ipv6uri = true), a2; }; }, function(t2, e2) { var r2 = {}.toString; t2.exports = Array.isArray || function(t3) { return "[object Array]" == r2.call(t3); }; }, function(t2, e2, r2) { (function(e3) { t2.exports = function(t3) { return r3 && e3.isBuffer(t3) || n2 && (t3 instanceof ArrayBuffer || function(t4) { return "function" == typeof ArrayBuffer.isView ? ArrayBuffer.isView(t4) : t4.buffer instanceof ArrayBuffer; }(t3)); }; var r3 = "function" == typeof e3 && "function" == typeof e3.isBuffer, n2 = "function" == typeof ArrayBuffer; }).call(this, r2(6).Buffer); }, function(t2, e2) { var r2; r2 = /* @__PURE__ */ function() { return this; }(); try { r2 = r2 || new Function("return this")(); } catch (t3) { "object" == typeof window && (r2 = window); } t2.exports = r2; }, function(t2, e2, r2) { var n2 = r2(29), o2 = r2(19), i2 = r2(1), s2 = r2(5), a2 = r2(20), c2 = r2(21), h2 = r2(0)("socket.io-client:manager"), u2 = r2(18), f2 = r2(46), p2 = Object.prototype.hasOwnProperty; function l2(t3, e3) { if (!(this instanceof l2)) return new l2(t3, e3); t3 && "object" == typeof t3 && (e3 = t3, t3 = void 0), (e3 = e3 || {}).path = e3.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = e3, this.reconnection(false !== e3.reconnection), this.reconnectionAttempts(e3.reconnectionAttempts || 1 / 0), this.reconnectionDelay(e3.reconnectionDelay || 1e3), this.reconnectionDelayMax(e3.reconnectionDelayMax || 5e3), this.randomizationFactor(e3.randomizationFactor || 0.5), this.backoff = new f2({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() }), this.timeout(null == e3.timeout ? 2e4 : e3.timeout), this.readyState = "closed", this.uri = t3, this.connecting = [], this.lastPing = null, this.encoding = false, this.packetBuffer = []; var r3 = e3.parser || s2; this.encoder = new r3.Encoder(), this.decoder = new r3.Decoder(), this.autoConnect = false !== e3.autoConnect, this.autoConnect && this.open(); } t2.exports = l2, l2.prototype.emitAll = function() { for (var t3 in this.emit.apply(this, arguments), this.nsps) p2.call(this.nsps, t3) && this.nsps[t3].emit.apply(this.nsps[t3], arguments); }, l2.prototype.updateSocketIds = function() { for (var t3 in this.nsps) p2.call(this.nsps, t3) && (this.nsps[t3].id = this.generateId(t3)); }, l2.prototype.generateId = function(t3) { return ("/" === t3 ? "" : t3 + "#") + this.engine.id; }, i2(l2.prototype), l2.prototype.reconnection = function(t3) { return arguments.length ? (this._reconnection = !!t3, this) : this._reconnection; }, l2.prototype.reconnectionAttempts = function(t3) { return arguments.length ? (this._reconnectionAttempts = t3, this) : this._reconnectionAttempts; }, l2.prototype.reconnectionDelay = function(t3) { return arguments.length ? (this._reconnectionDelay = t3, this.backoff && this.backoff.setMin(t3), this) : this._reconnectionDelay; }, l2.prototype.randomizationFactor = function(t3) { return arguments.length ? (this._randomizationFactor = t3, this.backoff && this.backoff.setJitter(t3), this) : this._randomizationFactor; }, l2.prototype.reconnectionDelayMax = function(t3) { return arguments.length ? (this._reconnectionDelayMax = t3, this.backoff && this.backoff.setMax(t3), this) : this._reconnectionDelayMax; }, l2.prototype.timeout = function(t3) { return arguments.length ? (this._timeout = t3, this) : this._timeout; }, l2.prototype.maybeReconnectOnOpen = function() { !this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect(); }, l2.prototype.open = l2.prototype.connect = function(t3, e3) { if (h2("readyState %s", this.readyState), ~this.readyState.indexOf("open")) return this; h2("opening %s", this.uri), this.engine = n2(this.uri, this.opts); var r3 = this.engine, o3 = this; this.readyState = "opening", this.skipReconnect = false; var i3 = a2(r3, "open", function() { o3.onopen(), t3 && t3(); }), s3 = a2(r3, "error", function(e4) { if (h2("connect_error"), o3.cleanup(), o3.readyState = "closed", o3.emitAll("connect_error", e4), t3) { var r4 = new Error("Connection error"); r4.data = e4, t3(r4); } else o3.maybeReconnectOnOpen(); }); if (false !== this._timeout) { var c3 = this._timeout; h2("connect attempt will timeout after %d", c3); var u3 = setTimeout(function() { h2("connect attempt timed out after %d", c3), i3.destroy(), r3.close(), r3.emit("error", "timeout"), o3.emitAll("connect_timeout", c3); }, c3); this.subs.push({ destroy: function() { clearTimeout(u3); } }); } return this.subs.push(i3), this.subs.push(s3), this; }, l2.prototype.onopen = function() { h2("open"), this.cleanup(), this.readyState = "open", this.emit("open"); var t3 = this.engine; this.subs.push(a2(t3, "data", c2(this, "ondata"))), this.subs.push(a2(t3, "ping", c2(this, "onping"))), this.subs.push(a2(t3, "pong", c2(this, "onpong"))), this.subs.push(a2(t3, "error", c2(this, "onerror"))), this.subs.push(a2(t3, "close", c2(this, "onclose"))), this.subs.push(a2(this.decoder, "decoded", c2(this, "ondecoded"))); }, l2.prototype.onping = function() { this.lastPing = /* @__PURE__ */ new Date(), this.emitAll("ping"); }, l2.prototype.onpong = function() { this.emitAll("pong", /* @__PURE__ */ new Date() - this.lastPing); }, l2.prototype.ondata = function(t3) { this.decoder.add(t3); }, l2.prototype.ondecoded = function(t3) { this.emit("packet", t3); }, l2.prototype.onerror = function(t3) { h2("error", t3), this.emitAll("error", t3); }, l2.prototype.socket = function(t3, e3) { var r3 = this.nsps[t3]; if (!r3) { r3 = new o2(this, t3, e3), this.nsps[t3] = r3; var n3 = this; r3.on("connecting", i3), r3.on("connect", function() { r3.id = n3.generateId(t3); }), this.autoConnect && i3(); } function i3() { ~u2(n3.connecting, r3) || n3.connecting.push(r3); } return r3; }, l2.prototype.destroy = function(t3) { var e3 = u2(this.connecting, t3); ~e3 && this.connecting.splice(e3, 1), this.connecting.length || this.close(); }, l2.prototype.packet = function(t3) { h2("writing packet %j", t3); var e3 = this; t3.query && 0 === t3.type && (t3.nsp += "?" + t3.query), e3.encoding ? e3.packetBuffer.push(t3) : (e3.encoding = true, this.encoder.encode(t3, function(r3) { for (var n3 = 0; n3 < r3.length; n3++) e3.engine.write(r3[n3], t3.options); e3.encoding = false, e3.processPacketQueue(); })); }, l2.prototype.processPacketQueue = function() { if (this.packetBuffer.length > 0 && !this.encoding) { var t3 = this.packetBuffer.shift(); this.packet(t3); } }, l2.prototype.cleanup = function() { h2("cleanup"); for (var t3 = this.subs.length, e3 = 0; e3 < t3; e3++) { this.subs.shift().destroy(); } this.packetBuffer = [], this.encoding = false, this.lastPing = null, this.decoder.destroy(); }, l2.prototype.close = l2.prototype.disconnect = function() { h2("disconnect"), this.skipReconnect = true, this.reconnecting = false, "opening" === this.readyState && this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.engine && this.engine.close(); }, l2.prototype.onclose = function(t3) { h2("onclose"), this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close", t3), this._reconnection && !this.skipReconnect && this.reconnect(); }, l2.prototype.reconnect = function() { if (this.reconnecting || this.skipReconnect) return this; var t3 = this; if (this.backoff.attempts >= this._reconnectionAttempts) h2("reconnect failed"), this.backoff.reset(), this.emitAll("reconnect_failed"), this.reconnecting = false; else { var e3 = this.backoff.duration(); h2("will wait %dms before reconnect attempt", e3), this.reconnecting = true; var r3 = setTimeout(function() { t3.skipReconnect || (h2("attempting reconnect"), t3.emitAll("reconnect_attempt", t3.backoff.attempts), t3.emitAll("reconnecting", t3.backoff.attempts), t3.skipReconnect || t3.open(function(e4) { e4 ? (h2("reconnect attempt error"), t3.reconnecting = false, t3.reconnect(), t3.emitAll("reconnect_error", e4.data)) : (h2("reconnect success"), t3.onreconnect()); })); }, e3); this.subs.push({ destroy: function() { clearTimeout(r3); } }); } }, l2.prototype.onreconnect = function() { var t3 = this.backoff.attempts; this.reconnecting = false, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", t3); }; }, function(t2, e2, r2) { var n2 = r2(7), o2 = r2(32), i2 = r2(40), s2 = r2(41); e2.polling = function(t3) { var e3 = false, r3 = false, s3 = false !== t3.jsonp; if ("undefined" != typeof location) { var a2 = "https:" === location.protocol, c2 = location.port; c2 || (c2 = a2 ? 443 : 80), e3 = t3.hostname !== location.hostname || c2 !== t3.port, r3 = t3.secure !== a2; } if (t3.xdomain = e3, t3.xscheme = r3, "open" in new n2(t3) && !t3.forceJSONP) return new o2(t3); if (!s3) throw new Error("JSONP disabled"); return new i2(t3); }, e2.websocket = s2; }, function(t2, e2, r2) { var n2 = r2(8), o2 = r2(3), i2 = r2(2), s2 = r2(4), a2 = r2(17), c2 = r2(0)("engine.io-client:polling"); t2.exports = u2; var h2 = null != new (r2(7))({ xdomain: false }).responseType; function u2(t3) { var e3 = t3 && t3.forceBase64; h2 && !e3 || (this.supportsBinary = false), n2.call(this, t3); } s2(u2, n2), u2.prototype.name = "polling", u2.prototype.doOpen = function() { this.poll(); }, u2.prototype.pause = function(t3) { var e3 = this; function r3() { c2("paused"), e3.readyState = "paused", t3(); } if (this.readyState = "pausing", this.polling || !this.writable) { var n3 = 0; this.polling && (c2("we are currently polling - waiting to pause"), n3++, this.once("pollComplete", function() { c2("pre-pause polling complete"), --n3 || r3(); })), this.writable || (c2("we are currently writing - waiting to pause"), n3++, this.once("drain", function() { c2("pre-pause writing complete"), --n3 || r3(); })); } else r3(); }, u2.prototype.poll = function() { c2("polling"), this.polling = true, this.doPoll(), this.emit("poll"); }, u2.prototype.onData = function(t3) { var e3 = this; c2("polling got data %s", t3); i2.decodePayload(t3, this.socket.binaryType, function(t4, r3, n3) { if ("opening" === e3.readyState && e3.onOpen(), "close" === t4.type) return e3.onClose(), false; e3.onPacket(t4); }), "closed" !== this.readyState && (this.polling = false, this.emit("pollComplete"), "open" === this.readyState ? this.poll() : c2('ignoring poll - transport state "%s"', this.readyState)); }, u2.prototype.doClose = function() { var t3 = this; function e3() { c2("writing close packet"), t3.write([{ type: "close" }]); } "open" === this.readyState ? (c2("transport open - closing"), e3()) : (c2("transport not open - deferring close"), this.once("open", e3)); }, u2.prototype.write = function(t3) { var e3 = this; this.writable = false; var r3 = function() { e3.writable = true, e3.emit("drain"); }; i2.encodePayload(t3, this.supportsBinary, function(t4) { e3.doWrite(t4, r3); }); }, u2.prototype.uri = function() { var t3 = this.query || {}, e3 = this.secure ? "https" : "http", r3 = ""; return false !== this.timestampRequests && (t3[this.timestampParam] = a2()), this.supportsBinary || t3.sid || (t3.b64 = 1), t3 = o2.encode(t3), this.port && ("https" === e3 && 443 !== Number(this.port) || "http" === e3 && 80 !== Number(this.port)) && (r3 = ":" + this.port), t3.length && (t3 = "?" + t3), e3 + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + r3 + this.path + t3; }; }, function(t2, e2, r2) { (function(e3) { var n2 = r2(34), o2 = Object.prototype.toString, i2 = "function" == typeof Blob || "undefined" != typeof Blob && "[object BlobConstructor]" === o2.call(Blob), s2 = "function" == typeof File || "undefined" != typeof File && "[object FileConstructor]" === o2.call(File); t2.exports = function t3(r3) { if (!r3 || "object" != typeof r3) return false; if (n2(r3)) { for (var o3 = 0, a2 = r3.length; o3 < a2; o3++) if (t3(r3[o3])) return true; return false; } if ("function" == typeof e3 && e3.isBuffer && e3.isBuffer(r3) || "function" == typeof ArrayBuffer && r3 instanceof ArrayBuffer || i2 && r3 instanceof Blob || s2 && r3 instanceof File) return true; if (r3.toJSON && "function" == typeof r3.toJSON && 1 === arguments.length) return t3(r3.toJSON(), true); for (var c2 in r3) if (Object.prototype.hasOwnProperty.call(r3, c2) && t3(r3[c2])) return true; return false; }; }).call(this, r2(6).Buffer); }, function(t2, e2, r2) { var n2, o2 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), i2 = {}, s2 = 0, a2 = 0; function c2(t3) { var e3 = ""; do { e3 = o2[t3 % 64] + e3, t3 = Math.floor(t3 / 64); } while (t3 > 0); return e3; } function h2() { var t3 = c2(+/* @__PURE__ */ new Date()); return t3 !== n2 ? (s2 = 0, n2 = t3) : t3 + "." + c2(s2++); } for (; a2 < 64; a2++) i2[o2[a2]] = a2; h2.encode = c2, h2.decode = function(t3) { var e3 = 0; for (a2 = 0; a2 < t3.length; a2++) e3 = 64 * e3 + i2[t3.charAt(a2)]; return e3; }, t2.exports = h2; }, function(t2, e2) { var r2 = [].indexOf; t2.exports = function(t3, e3) { if (r2) return t3.indexOf(e3); for (var n2 = 0; n2 < t3.length; ++n2) if (t3[n2] === e3) return n2; return -1; }; }, function(t2, e2, r2) { var n2 = r2(5), o2 = r2(1), i2 = r2(45), s2 = r2(20), a2 = r2(21), c2 = r2(0)("socket.io-client:socket"), h2 = r2(3), u2 = r2(16); t2.exports = l2; var f2 = { connect: 1, connect_error: 1, connect_timeout: 1, connecting: 1, disconnect: 1, error: 1, reconnect: 1, reconnect_attempt: 1, reconnect_failed: 1, reconnect_error: 1, reconnecting: 1, ping: 1, pong: 1 }, p2 = o2.prototype.emit; function l2(t3, e3, r3) { this.io = t3, this.nsp = e3, this.json = this, this.ids = 0, this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], this.connected = false, this.disconnected = true, this.flags = {}, r3 && r3.query && (this.query = r3.query), this.io.autoConnect && this.open(); } o2(l2.prototype), l2.prototype.subEvents = function() { if (!this.subs) { var t3 = this.io; this.subs = [s2(t3, "open", a2(this, "onopen")), s2(t3, "packet", a2(this, "onpacket")), s2(t3, "close", a2(this, "onclose"))]; } }, l2.prototype.open = l2.prototype.connect = function() { return this.connected || (this.subEvents(), this.io.open(), "open" === this.io.readyState && this.onopen(), this.emit("connecting")), this; }, l2.prototype.send = function() { var t3 = i2(arguments); return t3.unshift("message"), this.emit.apply(this, t3), this; }, l2.prototype.emit = function(t3) { if (f2.hasOwnProperty(t3)) return p2.apply(this, arguments), this; var e3 = i2(arguments), r3 = { type: (void 0 !== this.flags.binary ? this.flags.binary : u2(e3)) ? n2.BINARY_EVENT : n2.EVENT, data: e3, options: {} }; return r3.options.compress = !this.flags || false !== this.flags.compress, "function" == typeof e3[e3.length - 1] && (c2("emitting packet with ack id %d", this.ids), this.acks[this.ids] = e3.pop(), r3.id = this.ids++), this.connected ? this.packet(r3) : this.sendBuffer.push(r3), this.flags = {}, this; }, l2.prototype.packet = function(t3) { t3.nsp = this.nsp, this.io.packet(t3); }, l2.prototype.onopen = function() { if (c2("transport is open - connecting"), "/" !== this.nsp) if (this.query) { var t3 = "object" == typeof this.query ? h2.encode(this.query) : this.query; c2("sending connect packet with query %s", t3), this.packet({ type: n2.CONNECT, query: t3 }); } else this.packet({ type: n2.CONNECT }); }, l2.prototype.onclose = function(t3) { c2("close (%s)", t3), this.connected = false, this.disconnected = true, delete this.id, this.emit("disconnect", t3); }, l2.prototype.onpacket = function(t3) { var e3 = t3.nsp === this.nsp, r3 = t3.type === n2.ERROR && "/" === t3.nsp; if (e3 || r3) switch (t3.type) { case n2.CONNECT: this.onconnect(); break; case n2.EVENT: case n2.BINARY_EVENT: this.onevent(t3); break; case n2.ACK: case n2.BINARY_ACK: this.onack(t3); break; case n2.DISCONNECT: this.ondisconnect(); break; case n2.ERROR: this.emit("error", t3.data); } }, l2.prototype.onevent = function(t3) { var e3 = t3.data || []; c2("emitting event %j", e3), null != t3.id && (c2("attaching ack callback to event"), e3.push(this.ack(t3.id))), this.connected ? p2.apply(this, e3) : this.receiveBuffer.push(e3); }, l2.prototype.ack = function(t3) { var e3 = this, r3 = false; return function() { if (!r3) { r3 = true; var o3 = i2(arguments); c2("sending ack %j", o3), e3.packet({ type: u2(o3) ? n2.BINARY_ACK : n2.ACK, id: t3, data: o3 }); } }; }, l2.prototype.onack = function(t3) { var e3 = this.acks[t3.id]; "function" == typeof e3 ? (c2("calling ack %s with %j", t3.id, t3.data), e3.apply(this, t3.data), delete this.acks[t3.id]) : c2("bad ack %s", t3.id); }, l2.prototype.onconnect = function() { this.connected = true, this.disconnected = false, this.emit("connect"), this.emitBuffered(); }, l2.prototype.emitBuffered = function() { var t3; for (t3 = 0; t3 < this.receiveBuffer.length; t3++) p2.apply(this, this.receiveBuffer[t3]); for (this.receiveBuffer = [], t3 = 0; t3 < this.sendBuffer.length; t3++) this.packet(this.sendBuffer[t3]); this.sendBuffer = []; }, l2.prototype.ondisconnect = function() { c2("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect"); }, l2.prototype.destroy = function() { if (this.subs) { for (var t3 = 0; t3 < this.subs.length; t3++) this.subs[t3].destroy(); this.subs = null; } this.io.destroy(this); }, l2.prototype.close = l2.prototype.disconnect = function() { return this.connected && (c2("performing disconnect (%s)", this.nsp), this.packet({ type: n2.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this; }, l2.prototype.compress = function(t3) { return this.flags.compress = t3, this; }, l2.prototype.binary = function(t3) { return this.flags.binary = t3, this; }; }, function(t2, e2) { t2.exports = function(t3, e3, r2) { return t3.on(e3, r2), { destroy: function() { t3.removeListener(e3, r2); } }; }; }, function(t2, e2) { var r2 = [].slice; t2.exports = function(t3, e3) { if ("string" == typeof e3 && (e3 = t3[e3]), "function" != typeof e3) throw new Error("bind() requires a function"); var n2 = r2.call(arguments, 2); return function() { return e3.apply(t3, n2.concat(r2.call(arguments))); }; }; }, function(t2, e2, r2) { t2.exports = r2(23); }, function(t2, e2, r2) { var n2 = r2(24), o2 = r2(5), i2 = r2(13), s2 = r2(0)("socket.io-client"); t2.exports = e2 = c2; var a2 = e2.managers = {}; function c2(t3, e3) { "object" == typeof t3 && (e3 = t3, t3 = void 0), e3 = e3 || {}; var r3, o3 = n2(t3), c3 = o3.source, h2 = o3.id, u2 = o3.path, f2 = a2[h2] && u2 in a2[h2].nsps; return e3.forceNew || e3["force new connection"] || false === e3.multiplex || f2 ? (s2("ignoring socket cache for %s", c3), r3 = i2(c3, e3)) : (a2[h2] || (s2("new io instance for %s", c3), a2[h2] = i2(c3, e3)), r3 = a2[h2]), o3.query && !e3.query && (e3.query = o3.query), r3.socket(o3.path, e3); } e2.protocol = o2.protocol, e2.connect = c2, e2.Manager = r2(13), e2.Socket = r2(19); }, function(t2, e2, r2) { var n2 = r2(9), o2 = r2(0)("socket.io-client:url"); t2.exports = function(t3, e3) { var r3 = t3; e3 = e3 || "undefined" != typeof location && location, null == t3 && (t3 = e3.protocol + "//" + e3.host); "string" == typeof t3 && ("/" === t3.charAt(0) && (t3 = "/" === t3.charAt(1) ? e3.protocol + t3 : e3.host + t3), /^(https?|wss?):\/\//.test(t3) || (o2("protocol-less url %s", t3), t3 = void 0 !== e3 ? e3.protocol + "//" + t3 : "https://" + t3), o2("parse %s", t3), r3 = n2(t3)); r3.port || (/^(http|ws)$/.test(r3.protocol) ? r3.port = "80" : /^(http|ws)s$/.test(r3.protocol) && (r3.port = "443")); r3.path = r3.path || "/"; var i2 = -1 !== r3.host.indexOf(":") ? "[" + r3.host + "]" : r3.host; return r3.id = r3.protocol + "://" + i2 + ":" + r3.port, r3.href = r3.protocol + "://" + i2 + (e3 && e3.port === r3.port ? "" : ":" + r3.port), r3; }; }, function(t2, e2, r2) { var n2 = r2(10), o2 = r2(11), i2 = Object.prototype.toString, s2 = "function" == typeof Blob || "undefined" != typeof Blob && "[object BlobConstructor]" === i2.call(Blob), a2 = "function" == typeof File || "undefined" != typeof File && "[object FileConstructor]" === i2.call(File); e2.deconstructPacket = function(t3) { var e3 = [], r3 = t3.data, i3 = t3; return i3.data = function t4(e4, r4) { if (!e4) return e4; if (o2(e4)) { var i4 = { _placeholder: true, num: r4.length }; return r4.push(e4), i4; } if (n2(e4)) { for (var s3 = new Array(e4.length), a3 = 0; a3 < e4.length; a3++) s3[a3] = t4(e4[a3], r4); return s3; } if ("object" == typeof e4 && !(e4 instanceof Date)) { s3 = {}; for (var c2 in e4) s3[c2] = t4(e4[c2], r4); return s3; } return e4; }(r3, e3), i3.attachments = e3.length, { packet: i3, buffers: e3 }; }, e2.reconstructPacket = function(t3, e3) { return t3.data = function t4(e4, r3) { if (!e4) return e4; if (e4 && e4._placeholder) return r3[e4.num]; if (n2(e4)) for (var o3 = 0; o3 < e4.length; o3++) e4[o3] = t4(e4[o3], r3); else if ("object" == typeof e4) for (var i3 in e4) e4[i3] = t4(e4[i3], r3); return e4; }(t3.data, e3), t3.attachments = void 0, t3; }, e2.removeBlobs = function(t3, e3) { var r3 = 0, i3 = t3; !function t4(c2, h2, u2) { if (!c2) return c2; if (s2 && c2 instanceof Blob || a2 && c2 instanceof File) { r3++; var f2 = new FileReader(); f2.onload = function() { u2 ? u2[h2] = this.result : i3 = this.result, --r3 || e3(i3); }, f2.readAsArrayBuffer(c2); } else if (n2(c2)) for (var p2 = 0; p2 < c2.length; p2++) t4(c2[p2], p2, c2); else if ("object" == typeof c2 && !o2(c2)) for (var l2 in c2) t4(c2[l2], l2, c2); }(i3), r3 || e3(i3); }; }, function(t2, e2, r2) { e2.byteLength = function(t3) { var e3 = h2(t3), r3 = e3[0], n3 = e3[1]; return 3 * (r3 + n3) / 4 - n3; }, e2.toByteArray = function(t3) { var e3, r3, n3 = h2(t3), s3 = n3[0], a3 = n3[1], c3 = new i2(function(t4, e4, r4) { return 3 * (e4 + r4) / 4 - r4; }(0, s3, a3)), u3 = 0, f2 = a3 > 0 ? s3 - 4 : s3; for (r3 = 0; r3 < f2; r3 += 4) e3 = o2[t3.charCodeAt(r3)] << 18 | o2[t3.charCodeAt(r3 + 1)] << 12 | o2[t3.charCodeAt(r3 + 2)] << 6 | o2[t3.charCodeAt(r3 + 3)], c3[u3++] = e3 >> 16 & 255, c3[u3++] = e3 >> 8 & 255, c3[u3++] = 255 & e3; 2 === a3 && (e3 = o2[t3.charCodeAt(r3)] << 2 | o2[t3.charCodeAt(r3 + 1)] >> 4, c3[u3++] = 255 & e3); 1 === a3 && (e3 = o2[t3.charCodeAt(r3)] << 10 | o2[t3.charCodeAt(r3 + 1)] << 4 | o2[t3.charCodeAt(r3 + 2)] >> 2, c3[u3++] = e3 >> 8 & 255, c3[u3++] = 255 & e3); return c3; }, e2.fromByteArray = function(t3) { for (var e3, r3 = t3.length, o3 = r3 % 3, i3 = [], s3 = 0, a3 = r3 - o3; s3 < a3; s3 += 16383) i3.push(u2(t3, s3, s3 + 16383 > a3 ? a3 : s3 + 16383)); 1 === o3 ? (e3 = t3[r3 - 1], i3.push(n2[e3 >> 2] + n2[e3 << 4 & 63] + "==")) : 2 === o3 && (e3 = (t3[r3 - 2] << 8) + t3[r3 - 1], i3.push(n2[e3 >> 10] + n2[e3 >> 4 & 63] + n2[e3 << 2 & 63] + "=")); return i3.join(""); }; for (var n2 = [], o2 = [], i2 = "undefined" != typeof Uint8Array ? Uint8Array : Array, s2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a2 = 0, c2 = s2.length; a2 < c2; ++a2) n2[a2] = s2[a2], o2[s2.charCodeAt(a2)] = a2; function h2(t3) { var e3 = t3.length; if (e3 % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); var r3 = t3.indexOf("="); return -1 === r3 && (r3 = e3), [r3, r3 === e3 ? 0 : 4 - r3 % 4]; } function u2(t3, e3, r3) { for (var o3, i3, s3 = [], a3 = e3; a3 < r3; a3 += 3) o3 = (t3[a3] << 16 & 16711680) + (t3[a3 + 1] << 8 & 65280) + (255 & t3[a3 + 2]), s3.push(n2[(i3 = o3) >> 18 & 63] + n2[i3 >> 12 & 63] + n2[i3 >> 6 & 63] + n2[63 & i3]); return s3.join(""); } o2["-".charCodeAt(0)] = 62, o2["_".charCodeAt(0)] = 63; }, function(t2, e2) { e2.read = function(t3, e3, r2, n2, o2) { var i2, s2, a2 = 8 * o2 - n2 - 1, c2 = (1 << a2) - 1, h2 = c2 >> 1, u2 = -7, f2 = r2 ? o2 - 1 : 0, p2 = r2 ? -1 : 1, l2 = t3[e3 + f2]; for (f2 += p2, i2 = l2 & (1 << -u2) - 1, l2 >>= -u2, u2 += a2; u2 > 0; i2 = 256 * i2 + t3[e3 + f2], f2 += p2, u2 -= 8) ; for (s2 = i2 & (1 << -u2) - 1, i2 >>= -u2, u2 += n2; u2 > 0; s2 = 256 * s2 + t3[e3 + f2], f2 += p2, u2 -= 8) ; if (0 === i2) i2 = 1 - h2; else { if (i2 === c2) return s2 ? NaN : 1 / 0 * (l2 ? -1 : 1); s2 += Math.pow(2, n2), i2 -= h2; } return (l2 ? -1 : 1) * s2 * Math.pow(2, i2 - n2); }, e2.write = function(t3, e3, r2, n2, o2, i2) { var s2, a2, c2, h2 = 8 * i2 - o2 - 1, u2 = (1 << h2) - 1, f2 = u2 >> 1, p2 = 23 === o2 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, l2 = n2 ? 0 : i2 - 1, d2 = n2 ? 1 : -1, y2 = e3 < 0 || 0 === e3 && 1 / e3 < 0 ? 1 : 0; for (e3 = Math.abs(e3), isNaN(e3) || e3 === 1 / 0 ? (a2 = isNaN(e3) ? 1 : 0, s2 = u2) : (s2 = Math.floor(Math.log(e3) / Math.LN2), e3 * (c2 = Math.pow(2, -s2)) < 1 && (s2--, c2 *= 2), (e3 += s2 + f2 >= 1 ? p2 / c2 : p2 * Math.pow(2, 1 - f2)) * c2 >= 2 && (s2++, c2 /= 2), s2 + f2 >= u2 ? (a2 = 0, s2 = u2) : s2 + f2 >= 1 ? (a2 = (e3 * c2 - 1) * Math.pow(2, o2), s2 += f2) : (a2 = e3 * Math.pow(2, f2 - 1) * Math.pow(2, o2), s2 = 0)); o2 >= 8; t3[r2 + l2] = 255 & a2, l2 += d2, a2 /= 256, o2 -= 8) ; for (s2 = s2 << o2 | a2, h2 += o2; h2 > 0; t3[r2 + l2] = 255 & s2, l2 += d2, s2 /= 256, h2 -= 8) ; t3[r2 + l2 - d2] |= 128 * y2; }; }, function(t2, e2) { var r2 = {}.toString; t2.exports = Array.isArray || function(t3) { return "[object Array]" == r2.call(t3); }; }, function(t2, e2, r2) { t2.exports = r2(30), t2.exports.parser = r2(2); }, function(t2, e2, r2) { var n2 = r2(14), o2 = r2(1), i2 = r2(0)("engine.io-client:socket"), s2 = r2(18), a2 = r2(2), c2 = r2(9), h2 = r2(3); function u2(t3, e3) { if (!(this instanceof u2)) return new u2(t3, e3); e3 = e3 || {}, t3 && "object" == typeof t3 && (e3 = t3, t3 = null), t3 ? (t3 = c2(t3), e3.hostname = t3.host, e3.secure = "https" === t3.protocol || "wss" === t3.protocol, e3.port = t3.port, t3.query && (e3.query = t3.query)) : e3.host && (e3.hostname = c2(e3.host).host), this.secure = null != e3.secure ? e3.secure : "undefined" != typeof location && "https:" === location.protocol, e3.hostname && !e3.port && (e3.port = this.secure ? "443" : "80"), this.agent = e3.agent || false, this.hostname = e3.hostname || ("undefined" != typeof location ? location.hostname : "localhost"), this.port = e3.port || ("undefined" != typeof location && location.port ? location.port : this.secure ? 443 : 80), this.query = e3.query || {}, "string" == typeof this.query && (this.query = h2.decode(this.query)), this.upgrade = false !== e3.upgrade, this.path = (e3.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!e3.forceJSONP, this.jsonp = false !== e3.jsonp, this.forceBase64 = !!e3.forceBase64, this.enablesXDR = !!e3.enablesXDR, this.withCredentials = false !== e3.withCredentials, this.timestampParam = e3.timestampParam || "t", this.timestampRequests = e3.timestampRequests, this.transports = e3.transports || ["polling", "websocket"], this.transportOptions = e3.transportOptions || {}, this.readyState = "", this.writeBuffer = [], this.prevBufferLen = 0, this.policyPort = e3.policyPort || 843, this.rememberUpgrade = e3.rememberUpgrade || false, this.binaryType = null, this.onlyBinaryUpgrades = e3.onlyBinaryUpgrades, this.perMessageDeflate = false !== e3.perMessageDeflate && (e3.perMessageDeflate || {}), true === this.perMessageDeflate && (this.perMessageDeflate = {}), this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 1024), this.pfx = e3.pfx || null, this.key = e3.key || null, this.passphrase = e3.passphrase || null, this.cert = e3.cert || null, this.ca = e3.ca || null, this.ciphers = e3.ciphers || null, this.rejectUnauthorized = void 0 === e3.rejectUnauthorized || e3.rejectUnauthorized, this.forceNode = !!e3.forceNode, this.isReactNative = "undefined" != typeof navigator && "string" == typeof navigator.product && "reactnative" === navigator.product.toLowerCase(), ("undefined" == typeof self || this.isReactNative) && (e3.extraHeaders && Object.keys(e3.extraHeaders).length > 0 && (this.extraHeaders = e3.extraHeaders), e3.localAddress && (this.localAddress = e3.localAddress)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingIntervalTimer = null, this.pingTimeoutTimer = null, this.open(); } t2.exports = u2, u2.priorWebsocketSuccess = false, o2(u2.prototype), u2.protocol = a2.protocol, u2.Socket = u2, u2.Transport = r2(8), u2.transports = r2(14), u2.parser = r2(2), u2.prototype.createTransport = function(t3) { i2('creating transport "%s"', t3); var e3 = function(t4) { var e4 = {}; for (var r4 in t4) t4.hasOwnProperty(r4) && (e4[r4] = t4[r4]); return e4; }(this.query); e3.EIO = a2.protocol, e3.transport = t3; var r3 = this.transportOptions[t3] || {}; return this.id && (e3.sid = this.id), new n2[t3]({ query: e3, socket: this, agent: r3.agent || this.agent, hostname: r3.hostname || this.hostname, port: r3.port || this.port, secure: r3.secure || this.secure, path: r3.path || this.path, forceJSONP: r3.forceJSONP || this.forceJSONP, jsonp: r3.jsonp || this.jsonp, forceBase64: r3.forceBase64 || this.forceBase64, enablesXDR: r3.enablesXDR || this.enablesXDR, withCredentials: r3.withCredentials || this.withCredentials, timestampRequests: r3.timestampRequests || this.timestampRequests, timestampParam: r3.timestampParam || this.timestampParam, policyPort: r3.policyPort || this.policyPort, pfx: r3.pfx || this.pfx, key: r3.key || this.key, passphrase: r3.passphrase || this.passphrase, cert: r3.cert || this.cert, ca: r3.ca || this.ca, ciphers: r3.ciphers || this.ciphers, rejectUnauthorized: r3.rejectUnauthorized || this.rejectUnauthorized, perMessageDeflate: r3.perMessageDeflate || this.perMessageDeflate, extraHeaders: r3.extraHeaders || this.extraHeaders, forceNode: r3.forceNode || this.forceNode, localAddress: r3.localAddress || this.localAddress, requestTimeout: r3.requestTimeout || this.requestTimeout, protocols: r3.protocols || void 0, isReactNative: this.isReactNative }); }, u2.prototype.open = function() { var t3; if (this.rememberUpgrade && u2.priorWebsocketSuccess && -1 !== this.transports.indexOf("websocket")) t3 = "websocket"; else { if (0 === this.transports.length) { var e3 = this; return void setTimeout(function() { e3.emit("error", "No transports available"); }, 0); } t3 = this.transports[0]; } this.readyState = "opening"; try { t3 = this.createTransport(t3); } catch (t4) { return this.transports.shift(), void this.open(); } t3.open(), this.setTransport(t3); }, u2.prototype.setTransport = function(t3) { i2("setting transport %s", t3.name); var e3 = this; this.transport && (i2("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = t3, t3.on("drain", function() { e3.onDrain(); }).on("packet", function(t4) { e3.onPacket(t4); }).on("error", function(t4) { e3.onError(t4); }).on("close", function() { e3.onClose("transport close"); }); }, u2.prototype.probe = function(t3) { i2('probing transport "%s"', t3); var e3 = this.createTransport(t3, { probe: 1 }), r3 = false, n3 = this; function o3() { if (n3.onlyBinaryUpgrades) { var o4 = !this.supportsBinary && n3.transport.supportsBinary; r3 = r3 || o4; } r3 || (i2('probe transport "%s" opened', t3), e3.send([{ type: "ping", data: "probe" }]), e3.once("packet", function(o5) { if (!r3) if ("pong" === o5.type && "probe" === o5.data) { if (i2('probe transport "%s" pong', t3), n3.upgrading = true, n3.emit("upgrading", e3), !e3) return; u2.priorWebsocketSuccess = "websocket" === e3.name, i2('pausing current transport "%s"', n3.transport.name), n3.transport.pause(function() { r3 || "closed" !== n3.readyState && (i2("changing transport and sending upgrade packet"), p2(), n3.setTransport(e3), e3.send([{ type: "upgrade" }]), n3.emit("upgrade", e3), e3 = null, n3.upgrading = false, n3.flush()); }); } else { i2('probe transport "%s" failed', t3); var s4 = new Error("probe error"); s4.transport = e3.name, n3.emit("upgradeError", s4); } })); } function s3() { r3 || (r3 = true, p2(), e3.close(), e3 = null); } function a3(r4) { var o4 = new Error("probe error: " + r4); o4.transport = e3.name, s3(), i2('probe transport "%s" failed because of error: %s', t3, r4), n3.emit("upgradeError", o4); } function c3() { a3("transport closed"); } function h3() { a3("socket closed"); } function f2(t4) { e3 && t4.name !== e3.name && (i2('"%s" works - aborting "%s"', t4.name, e3.name), s3()); } function p2() { e3.removeListener("open", o3), e3.removeListener("error", a3), e3.removeListener("close", c3), n3.removeListener("close", h3), n3.removeListener("upgrading", f2); } u2.priorWebsocketSuccess = false, e3.once("open", o3), e3.once("error", a3), e3.once("close", c3), this.once("close", h3), this.once("upgrading", f2), e3.open(); }, u2.prototype.onOpen = function() { if (i2("socket open"), this.readyState = "open", u2.priorWebsocketSuccess = "websocket" === this.transport.name, this.emit("open"), this.flush(), "open" === this.readyState && this.upgrade && this.transport.pause) { i2("starting upgrade probes"); for (var t3 = 0, e3 = this.upgrades.length; t3 < e3; t3++) this.probe(this.upgrades[t3]); } }, u2.prototype.onPacket = function(t3) { if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) switch (i2('socket receive: type "%s", data "%s"', t3.type, t3.data), this.emit("packet", t3), this.emit("heartbeat"), t3.type) { case "open": this.onHandshake(JSON.parse(t3.data)); break; case "pong": this.setPing(), this.emit("pong"); break; case "error": var e3 = new Error("server error"); e3.code = t3.data, this.onError(e3); break; case "message": this.emit("data", t3.data), this.emit("message", t3.data); } else i2('packet received with socket readyState "%s"', this.readyState); }, u2.prototype.onHandshake = function(t3) { this.emit("handshake", t3), this.id = t3.sid, this.transport.query.sid = t3.sid, this.upgrades = this.filterUpgrades(t3.upgrades), this.pingInterval = t3.pingInterval, this.pingTimeout = t3.pingTimeout, this.onOpen(), "closed" !== this.readyState && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat)); }, u2.prototype.onHeartbeat = function(t3) { clearTimeout(this.pingTimeoutTimer); var e3 = this; e3.pingTimeoutTimer = setTimeout(function() { "closed" !== e3.readyState && e3.onClose("ping timeout"); }, t3 || e3.pingInterval + e3.pingTimeout); }, u2.prototype.setPing = function() { var t3 = this; clearTimeout(t3.pingIntervalTimer), t3.pingIntervalTimer = setTimeout(function() { i2("writing ping packet - expecting pong within %sms", t3.pingTimeout), t3.ping(), t3.onHeartbeat(t3.pingTimeout); }, t3.pingInterval); }, u2.prototype.ping = function() { var t3 = this; this.sendPacket("ping", function() { t3.emit("ping"); }); }, u2.prototype.onDrain = function() { this.writeBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, 0 === this.writeBuffer.length ? this.emit("drain") : this.flush(); }, u2.prototype.flush = function() { "closed" !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length && (i2("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush")); }, u2.prototype.write = u2.prototype.send = function(t3, e3, r3) { return this.sendPacket("message", t3, e3, r3), this; }, u2.prototype.sendPacket = function(t3, e3, r3, n3) { if ("function" == typeof e3 && (n3 = e3, e3 = void 0), "function" == typeof r3 && (n3 = r3, r3 = null), "closing" !== this.readyState && "closed" !== this.readyState) { (r3 = r3 || {}).compress = false !== r3.compress; var o3 = { type: t3, data: e3, options: r3 }; this.emit("packetCreate", o3), this.writeBuffer.push(o3), n3 && this.once("flush", n3), this.flush(); } }, u2.prototype.close = function() { if ("opening" === this.readyState || "open" === this.readyState) { this.readyState = "closing"; var t3 = this; this.writeBuffer.length ? this.once("drain", function() { this.upgrading ? n3() : e3(); }) : this.upgrading ? n3() : e3(); } function e3() { t3.onClose("forced close"), i2("socket closing - telling transport to close"), t3.transport.close(); } function r3() { t3.removeListener("upgrade", r3), t3.removeListener("upgradeError", r3), e3(); } function n3() { t3.once("upgrade", r3), t3.once("upgradeError", r3); } return this; }, u2.prototype.onError = function(t3) { i2("socket error %j", t3), u2.priorWebsocketSuccess = false, this.emit("error", t3), this.onClose("transport error", t3); }, u2.prototype.onClose = function(t3, e3) { if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) { i2('socket close with reason: "%s"', t3); clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", t3, e3), this.writeBuffer = [], this.prevBufferLen = 0; } }, u2.prototype.filterUpgrades = function(t3) { for (var e3 = [], r3 = 0, n3 = t3.length; r3 < n3; r3++) ~s2(this.transports, t3[r3]) && e3.push(t3[r3]); return e3; }; }, function(t2, e2) { try { t2.exports = "undefined" != typeof XMLHttpRequest && "withCredentials" in new XMLHttpRequest(); } catch (e3) { t2.exports = false; } }, function(t2, e2, r2) { var n2 = r2(7), o2 = r2(15), i2 = r2(1), s2 = r2(4), a2 = r2(0)("engine.io-client:polling-xhr"); function c2() { } function h2(t3) { if (o2.call(this, t3), this.requestTimeout = t3.requestTimeout, this.extraHeaders = t3.extraHeaders, "undefined" != typeof location) { var e3 = "https:" === location.protocol, r3 = location.port; r3 || (r3 = e3 ? 443 : 80), this.xd = "undefined" != typeof location && t3.hostname !== location.hostname || r3 !== t3.port, this.xs = t3.secure !== e3; } } function u2(t3) { this.method = t3.method || "GET", this.uri = t3.uri, this.xd = !!t3.xd, this.xs = !!t3.xs, this.async = false !== t3.async, this.data = void 0 !== t3.data ? t3.data : null, this.agent = t3.agent, this.isBinary = t3.isBinary, this.supportsBinary = t3.supportsBinary, this.enablesXDR = t3.enablesXDR, this.withCredentials = t3.withCredentials, this.requestTimeout = t3.requestTimeout, this.pfx = t3.pfx, this.key = t3.key, this.passphrase = t3.passphrase, this.cert = t3.cert, this.ca = t3.ca, this.ciphers = t3.ciphers, this.rejectUnauthorized = t3.rejectUnauthorized, this.extraHeaders = t3.extraHeaders, this.create(); } if (t2.exports = h2, t2.exports.Request = u2, s2(h2, o2), h2.prototype.supportsBinary = true, h2.prototype.request = function(t3) { return (t3 = t3 || {}).uri = this.uri(), t3.xd = this.xd, t3.xs = this.xs, t3.agent = this.agent || false, t3.supportsBinary = this.supportsBinary, t3.enablesXDR = this.enablesXDR, t3.withCredentials = this.withCredentials, t3.pfx = this.pfx, t3.key = this.key, t3.passphrase = this.passphrase, t3.cert = this.cert, t3.ca = this.ca, t3.ciphers = this.ciphers, t3.rejectUnauthorized = this.rejectUnauthorized, t3.requestTimeout = this.requestTimeout, t3.extraHeaders = this.extraHeaders, new u2(t3); }, h2.prototype.doWrite = function(t3, e3) { var r3 = "string" != typeof t3 && void 0 !== t3, n3 = this.request({ method: "POST", data: t3, isBinary: r3 }), o3 = this; n3.on("success", e3), n3.on("error", function(t4) { o3.onError("xhr post error", t4); }), this.sendXhr = n3; }, h2.prototype.doPoll = function() { a2("xhr poll"); var t3 = this.request(), e3 = this; t3.on("data", function(t4) { e3.onData(t4); }), t3.on("error", function(t4) { e3.onError("xhr poll error", t4); }), this.pollXhr = t3; }, i2(u2.prototype), u2.prototype.create = function() { var t3 = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR }; t3.pfx = this.pfx, t3.key = this.key, t3.passphrase = this.passphrase, t3.cert = this.cert, t3.ca = this.ca, t3.ciphers = this.ciphers, t3.rejectUnauthorized = this.rejectUnauthorized; var e3 = this.xhr = new n2(t3), r3 = this; try { a2("xhr open %s: %s", this.method, this.uri), e3.open(this.method, this.uri, this.async); try { if (this.extraHeaders) for (var o3 in e3.setDisableHeaderCheck && e3.setDisableHeaderCheck(true), this.extraHeaders) this.extraHeaders.hasOwnProperty(o3) && e3.setRequestHeader(o3, this.extraHeaders[o3]); } catch (t4) { } if ("POST" === this.method) try { this.isBinary ? e3.setRequestHeader("Content-type", "application/octet-stream") : e3.setRequestHeader("Content-type", "text/plain;charset=UTF-8"); } catch (t4) { } try { e3.setRequestHeader("Accept", "*/*"); } catch (t4) { } "withCredentials" in e3 && (e3.withCredentials = this.withCredentials), this.requestTimeout && (e3.timeout = this.requestTimeout), this.hasXDR() ? (e3.onload = function() { r3.onLoad(); }, e3.onerror = function() { r3.onError(e3.responseText); }) : e3.onreadystatechange = function() { if (2 === e3.readyState) try { var t4 = e3.getResponseHeader("Content-Type"); (r3.supportsBinary && "application/octet-stream" === t4 || "application/octet-stream; charset=UTF-8" === t4) && (e3.responseType = "arraybuffer"); } catch (t5) { } 4 === e3.readyState && (200 === e3.status || 1223 === e3.status ? r3.onLoad() : setTimeout(function() { r3.onError("number" == typeof e3.status ? e3.status : 0); }, 0)); }, a2("xhr data %s", this.data), e3.send(this.data); } catch (t4) { return void setTimeout(function() { r3.onError(t4); }, 0); } "undefined" != typeof document && (this.index = u2.requestsCount++, u2.requests[this.index] = this); }, u2.prototype.onSuccess = function() { this.emit("success"), this.cleanup(); }, u2.prototype.onData = function(t3) { this.emit("data", t3), this.onSuccess(); }, u2.prototype.onError = function(t3) { this.emit("error", t3), this.cleanup(true); }, u2.prototype.cleanup = function(t3) { if (void 0 !== this.xhr && null !== this.xhr) { if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = c2 : this.xhr.onreadystatechange = c2, t3) try { this.xhr.abort(); } catch (t4) { } "undefined" != typeof document && delete u2.requests[this.index], this.xhr = null; } }, u2.prototype.onLoad = function() { var t3; try { var e3; try { e3 = this.xhr.getResponseHeader("Content-Type"); } catch (t4) { } t3 = ("application/octet-stream" === e3 || "application/octet-stream; charset=UTF-8" === e3) && this.xhr.response || this.xhr.responseText; } catch (t4) { this.onError(t4); } null != t3 && this.onData(t3); }, u2.prototype.hasXDR = function() { return "undefined" != typeof XDomainRequest && !this.xs && this.enablesXDR; }, u2.prototype.abort = function() { this.cleanup(); }, u2.requestsCount = 0, u2.requests = {}, "undefined" != typeof document) { if ("function" == typeof attachEvent) attachEvent("onunload", p2); else if ("function" == typeof addEventListener) { var f2 = "onpagehide" in self ? "pagehide" : "unload"; addEventListener(f2, p2, false); } } function p2() { for (var t3 in u2.requests) u2.requests.hasOwnProperty(t3) && u2.requests[t3].abort(); } }, function(t2, e2) { t2.exports = Object.keys || function(t3) { var e3 = [], r2 = Object.prototype.hasOwnProperty; for (var n2 in t3) r2.call(t3, n2) && e3.push(n2); return e3; }; }, function(t2, e2) { var r2 = {}.toString; t2.exports = Array.isArray || function(t3) { return "[object Array]" == r2.call(t3); }; }, function(t2, e2) { t2.exports = function(t3, e3, r2) { var n2 = t3.byteLength; if (e3 = e3 || 0, r2 = r2 || n2, t3.slice) return t3.slice(e3, r2); if (e3 < 0 && (e3 += n2), r2 < 0 && (r2 += n2), r2 > n2 && (r2 = n2), e3 >= n2 || e3 >= r2 || 0 === n2) return new ArrayBuffer(0); for (var o2 = new Uint8Array(t3), i2 = new Uint8Array(r2 - e3), s2 = e3, a2 = 0; s2 < r2; s2++, a2++) i2[a2] = o2[s2]; return i2.buffer; }; }, function(t2, e2) { function r2() { } t2.exports = function(t3, e3, n2) { var o2 = false; return n2 = n2 || r2, i2.count = t3, 0 === t3 ? e3() : i2; function i2(t4, r3) { if (i2.count <= 0) throw new Error("after called too many times"); --i2.count, t4 ? (o2 = true, e3(t4), e3 = n2) : 0 !== i2.count || o2 || e3(null, r3); } }; }, function(t2, e2) { /*! https://mths.be/utf8js v2.1.2 by @mathias */ var r2, n2, o2, i2 = String.fromCharCode; function s2(t3) { for (var e3, r3, n3 = [], o3 = 0, i3 = t3.length; o3 < i3; ) (e3 = t3.charCodeAt(o3++)) >= 55296 && e3 <= 56319 && o3 < i3 ? 56320 == (64512 & (r3 = t3.charCodeAt(o3++))) ? n3.push(((1023 & e3) << 10) + (1023 & r3) + 65536) : (n3.push(e3), o3--) : n3.push(e3); return n3; } function a2(t3, e3) { if (t3 >= 55296 && t3 <= 57343) { if (e3) throw Error("Lone surrogate U+" + t3.toString(16).toUpperCase() + " is not a scalar value"); return false; } return true; } function c2(t3, e3) { return i2(t3 >> e3 & 63 | 128); } function h2(t3, e3) { if (0 == (4294967168 & t3)) return i2(t3); var r3 = ""; return 0 == (4294965248 & t3) ? r3 = i2(t3 >> 6 & 31 | 192) : 0 == (4294901760 & t3) ? (a2(t3, e3) || (t3 = 65533), r3 = i2(t3 >> 12 & 15 | 224), r3 += c2(t3, 6)) : 0 == (4292870144 & t3) && (r3 = i2(t3 >> 18 & 7 | 240), r3 += c2(t3, 12), r3 += c2(t3, 6)), r3 += i2(63 & t3 | 128); } function u2() { if (o2 >= n2) throw Error("Invalid byte index"); var t3 = 255 & r2[o2]; if (o2++, 128 == (192 & t3)) return 63 & t3; throw Error("Invalid continuation byte"); } function f2(t3) { var e3, i3; if (o2 > n2) throw Error("Invalid byte index"); if (o2 == n2) return false; if (e3 = 255 & r2[o2], o2++, 0 == (128 & e3)) return e3; if (192 == (224 & e3)) { if ((i3 = (31 & e3) << 6 | u2()) >= 128) return i3; throw Error("Invalid continuation byte"); } if (224 == (240 & e3)) { if ((i3 = (15 & e3) << 12 | u2() << 6 | u2()) >= 2048) return a2(i3, t3) ? i3 : 65533; throw Error("Invalid continuation byte"); } if (240 == (248 & e3) && (i3 = (7 & e3) << 18 | u2() << 12 | u2() << 6 | u2()) >= 65536 && i3 <= 1114111) return i3; throw Error("Invalid UTF-8 detected"); } t2.exports = { version: "2.1.2", encode: function(t3, e3) { for (var r3 = false !== (e3 = e3 || {}).strict, n3 = s2(t3), o3 = n3.length, i3 = -1, a3 = ""; ++i3 < o3; ) a3 += h2(n3[i3], r3); return a3; }, decode: function(t3, e3) { var a3 = false !== (e3 = e3 || {}).strict; r2 = s2(t3), n2 = r2.length, o2 = 0; for (var c3, h3 = []; false !== (c3 = f2(a3)); ) h3.push(c3); return function(t4) { for (var e4, r3 = t4.length, n3 = -1, o3 = ""; ++n3 < r3; ) (e4 = t4[n3]) > 65535 && (o3 += i2((e4 -= 65536) >>> 10 & 1023 | 55296), e4 = 56320 | 1023 & e4), o3 += i2(e4); return o3; }(h3); } }; }, function(t2, e2) { !function() { for (var t3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r2 = new Uint8Array(256), n2 = 0; n2 < t3.length; n2++) r2[t3.charCodeAt(n2)] = n2; e2.encode = function(e3) { var r3, n3 = new Uint8Array(e3), o2 = n3.length, i2 = ""; for (r3 = 0; r3 < o2; r3 += 3) i2 += t3[n3[r3] >> 2], i2 += t3[(3 & n3[r3]) << 4 | n3[r3 + 1] >> 4], i2 += t3[(15 & n3[r3 + 1]) << 2 | n3[r3 + 2] >> 6], i2 += t3[63 & n3[r3 + 2]]; return o2 % 3 == 2 ? i2 = i2.substring(0, i2.length - 1) + "=" : o2 % 3 == 1 && (i2 = i2.substring(0, i2.length - 2) + "=="), i2; }, e2.decode = function(t4) { var e3, n3, o2, i2, s2, a2 = 0.75 * t4.length, c2 = t4.length, h2 = 0; "=" === t4[t4.length - 1] && (a2--, "=" === t4[t4.length - 2] && a2--); var u2 = new ArrayBuffer(a2), f2 = new Uint8Array(u2); for (e3 = 0; e3 < c2; e3 += 4) n3 = r2[t4.charCodeAt(e3)], o2 = r2[t4.charCodeAt(e3 + 1)], i2 = r2[t4.charCodeAt(e3 + 2)], s2 = r2[t4.charCodeAt(e3 + 3)], f2[h2++] = n3 << 2 | o2 >> 4, f2[h2++] = (15 & o2) << 4 | i2 >> 2, f2[h2++] = (3 & i2) << 6 | 63 & s2; return u2; }; }(); }, function(t2, e2) { var r2 = void 0 !== r2 ? r2 : "undefined" != typeof WebKitBlobBuilder ? WebKitBlobBuilder : "undefined" != typeof MSBlobBuilder ? MSBlobBuilder : "undefined" != typeof MozBlobBuilder && MozBlobBuilder, n2 = function() { try { return 2 === new Blob(["hi"]).size; } catch (t3) { return false; } }(), o2 = n2 && function() { try { return 2 === new Blob([new Uint8Array([1, 2])]).size; } catch (t3) { return false; } }(), i2 = r2 && r2.prototype.append && r2.prototype.getBlob; function s2(t3) { return t3.map(function(t4) { if (t4.buffer instanceof ArrayBuffer) { var e3 = t4.buffer; if (t4.byteLength !== e3.byteLength) { var r3 = new Uint8Array(t4.byteLength); r3.set(new Uint8Array(e3, t4.byteOffset, t4.byteLength)), e3 = r3.buffer; } return e3; } return t4; }); } function a2(t3, e3) { e3 = e3 || {}; var n3 = new r2(); return s2(t3).forEach(function(t4) { n3.append(t4); }), e3.type ? n3.getBlob(e3.type) : n3.getBlob(); } function c2(t3, e3) { return new Blob(s2(t3), e3 || {}); } "undefined" != typeof Blob && (a2.prototype = Blob.prototype, c2.prototype = Blob.prototype), t2.exports = n2 ? o2 ? Blob : c2 : i2 ? a2 : void 0; }, function(t2, e2, r2) { (function(e3) { var n2 = r2(15), o2 = r2(4); t2.exports = u2; var i2, s2 = /\n/g, a2 = /\\n/g; function c2() { } function h2() { return "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== e3 ? e3 : {}; } function u2(t3) { if (n2.call(this, t3), this.query = this.query || {}, !i2) { var e4 = h2(); i2 = e4.___eio = e4.___eio || []; } this.index = i2.length; var r3 = this; i2.push(function(t4) { r3.onData(t4); }), this.query.j = this.index, "function" == typeof addEventListener && addEventListener("beforeunload", function() { r3.script && (r3.script.onerror = c2); }, false); } o2(u2, n2), u2.prototype.supportsBinary = false, u2.prototype.doClose = function() { this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), n2.prototype.doClose.call(this); }, u2.prototype.doPoll = function() { var t3 = this, e4 = document.createElement("script"); this.script && (this.script.parentNode.removeChild(this.script), this.script = null), e4.async = true, e4.src = this.uri(), e4.onerror = function(e5) { t3.onError("jsonp poll error", e5); }; var r3 = document.getElementsByTagName("script")[0]; r3 ? r3.parentNode.insertBefore(e4, r3) : (document.head || document.body).appendChild(e4), this.script = e4, "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent) && setTimeout(function() { var t4 = document.createElement("iframe"); document.body.appendChild(t4), document.body.removeChild(t4); }, 100); }, u2.prototype.doWrite = function(t3, e4) { var r3 = this; if (!this.form) { var n3, o3 = document.createElement("form"), i3 = document.createElement("textarea"), c3 = this.iframeId = "eio_iframe_" + this.index; o3.className = "socketio", o3.style.position = "absolute", o3.style.top = "-1000px", o3.style.left = "-1000px", o3.target = c3, o3.method = "POST", o3.setAttribute("accept-charset", "utf-8"), i3.name = "d", o3.appendChild(i3), document.body.appendChild(o3), this.form = o3, this.area = i3; } function h3() { u3(), e4(); } function u3() { if (r3.iframe) try { r3.form.removeChild(r3.iframe); } catch (t5) { r3.onError("jsonp polling iframe removal error", t5); } try { var t4 = '