123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874 |
- import {
- require_lodash
- } from "/node_modules/.vite/deps/chunk-UFOLZL4F.js?v=9548b9c3";
- import {
- computed,
- defineComponent,
- inject,
- isProxy,
- markRaw,
- onUnmounted,
- provide,
- reactive,
- watch
- } from "/node_modules/.vite/deps/chunk-LJEY6MVM.js?v=9548b9c3";
- import {
- __commonJS,
- __export,
- __publicField,
- __toESM
- } from "/node_modules/.vite/deps/chunk-WQG2LZMB.js?v=9548b9c3";
- // node_modules/queenjs/node_modules/axios/lib/helpers/bind.js
- var require_bind = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/bind.js"(exports, module) {
- "use strict";
- module.exports = function bind(fn, thisArg) {
- return function wrap() {
- var args = new Array(arguments.length);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i];
- }
- return fn.apply(thisArg, args);
- };
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/utils.js
- var require_utils = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/utils.js"(exports, module) {
- "use strict";
- var bind = require_bind();
- var toString = Object.prototype.toString;
- var kindOf = function(cache) {
- return function(thing) {
- var str = toString.call(thing);
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
- };
- }(/* @__PURE__ */ Object.create(null));
- function kindOfTest(type) {
- type = type.toLowerCase();
- return function isKindOf(thing) {
- return kindOf(thing) === type;
- };
- }
- function isArray(val) {
- return Array.isArray(val);
- }
- function isUndefined(val) {
- return typeof val === "undefined";
- }
- function isBuffer(val) {
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
- }
- var isArrayBuffer = kindOfTest("ArrayBuffer");
- function isArrayBufferView(val) {
- var result;
- if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
- result = ArrayBuffer.isView(val);
- } else {
- result = val && val.buffer && isArrayBuffer(val.buffer);
- }
- return result;
- }
- function isString(val) {
- return typeof val === "string";
- }
- function isNumber(val) {
- return typeof val === "number";
- }
- function isObject(val) {
- return val !== null && typeof val === "object";
- }
- function isPlainObject(val) {
- if (kindOf(val) !== "object") {
- return false;
- }
- var prototype = Object.getPrototypeOf(val);
- return prototype === null || prototype === Object.prototype;
- }
- var isDate = kindOfTest("Date");
- var isFile = kindOfTest("File");
- var isBlob = kindOfTest("Blob");
- var isFileList = kindOfTest("FileList");
- function isFunction(val) {
- return toString.call(val) === "[object Function]";
- }
- function isStream(val) {
- return isObject(val) && isFunction(val.pipe);
- }
- function isFormData(thing) {
- var pattern = "[object FormData]";
- return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
- }
- var isURLSearchParams = kindOfTest("URLSearchParams");
- function trim(str) {
- return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
- }
- function isStandardBrowserEnv() {
- if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
- return false;
- }
- return typeof window !== "undefined" && typeof document !== "undefined";
- }
- function forEach(obj, fn) {
- if (obj === null || typeof obj === "undefined") {
- return;
- }
- if (typeof obj !== "object") {
- obj = [obj];
- }
- if (isArray(obj)) {
- for (var i = 0, l = obj.length; i < l; i++) {
- fn.call(null, obj[i], i, obj);
- }
- } else {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- fn.call(null, obj[key], key, obj);
- }
- }
- }
- }
- function merge() {
- var result = {};
- function assignValue(val, key) {
- if (isPlainObject(result[key]) && isPlainObject(val)) {
- result[key] = merge(result[key], val);
- } else if (isPlainObject(val)) {
- result[key] = merge({}, val);
- } else if (isArray(val)) {
- result[key] = val.slice();
- } else {
- result[key] = val;
- }
- }
- for (var i = 0, l = arguments.length; i < l; i++) {
- forEach(arguments[i], assignValue);
- }
- return result;
- }
- function extend(a, b, thisArg) {
- forEach(b, function assignValue(val, key) {
- if (thisArg && typeof val === "function") {
- a[key] = bind(val, thisArg);
- } else {
- a[key] = val;
- }
- });
- return a;
- }
- function stripBOM(content) {
- if (content.charCodeAt(0) === 65279) {
- content = content.slice(1);
- }
- return content;
- }
- function inherits(constructor, superConstructor, props, descriptors) {
- constructor.prototype = Object.create(superConstructor.prototype, descriptors);
- constructor.prototype.constructor = constructor;
- props && Object.assign(constructor.prototype, props);
- }
- function toFlatObject(sourceObj, destObj, filter) {
- var props;
- var i;
- var prop;
- var merged = {};
- destObj = destObj || {};
- do {
- props = Object.getOwnPropertyNames(sourceObj);
- i = props.length;
- while (i-- > 0) {
- prop = props[i];
- if (!merged[prop]) {
- destObj[prop] = sourceObj[prop];
- merged[prop] = true;
- }
- }
- sourceObj = Object.getPrototypeOf(sourceObj);
- } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
- return destObj;
- }
- function endsWith(str, searchString, position) {
- str = String(str);
- if (position === void 0 || position > str.length) {
- position = str.length;
- }
- position -= searchString.length;
- var lastIndex = str.indexOf(searchString, position);
- return lastIndex !== -1 && lastIndex === position;
- }
- function toArray(thing) {
- if (!thing)
- return null;
- var i = thing.length;
- if (isUndefined(i))
- return null;
- var arr = new Array(i);
- while (i-- > 0) {
- arr[i] = thing[i];
- }
- return arr;
- }
- var isTypedArray = function(TypedArray) {
- return function(thing) {
- return TypedArray && thing instanceof TypedArray;
- };
- }(typeof Uint8Array !== "undefined" && Object.getPrototypeOf(Uint8Array));
- module.exports = {
- isArray,
- isArrayBuffer,
- isBuffer,
- isFormData,
- isArrayBufferView,
- isString,
- isNumber,
- isObject,
- isPlainObject,
- isUndefined,
- isDate,
- isFile,
- isBlob,
- isFunction,
- isStream,
- isURLSearchParams,
- isStandardBrowserEnv,
- forEach,
- merge,
- extend,
- trim,
- stripBOM,
- inherits,
- toFlatObject,
- kindOf,
- kindOfTest,
- endsWith,
- toArray,
- isTypedArray,
- isFileList
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/buildURL.js
- var require_buildURL = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/buildURL.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- function encode(val) {
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- module.exports = function buildURL(url, params, paramsSerializer) {
- if (!params) {
- return url;
- }
- var serializedParams;
- if (paramsSerializer) {
- serializedParams = paramsSerializer(params);
- } else if (utils.isURLSearchParams(params)) {
- serializedParams = params.toString();
- } else {
- var parts = [];
- utils.forEach(params, function serialize(val, key) {
- if (val === null || typeof val === "undefined") {
- return;
- }
- if (utils.isArray(val)) {
- key = key + "[]";
- } else {
- val = [val];
- }
- utils.forEach(val, function parseValue(v) {
- if (utils.isDate(v)) {
- v = v.toISOString();
- } else if (utils.isObject(v)) {
- v = JSON.stringify(v);
- }
- parts.push(encode(key) + "=" + encode(v));
- });
- });
- serializedParams = parts.join("&");
- }
- if (serializedParams) {
- var hashmarkIndex = url.indexOf("#");
- if (hashmarkIndex !== -1) {
- url = url.slice(0, hashmarkIndex);
- }
- url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
- }
- return url;
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/InterceptorManager.js
- var require_InterceptorManager = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/InterceptorManager.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- function InterceptorManager() {
- this.handlers = [];
- }
- InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
- this.handlers.push({
- fulfilled,
- rejected,
- synchronous: options ? options.synchronous : false,
- runWhen: options ? options.runWhen : null
- });
- return this.handlers.length - 1;
- };
- InterceptorManager.prototype.eject = function eject(id) {
- if (this.handlers[id]) {
- this.handlers[id] = null;
- }
- };
- InterceptorManager.prototype.forEach = function forEach(fn) {
- utils.forEach(this.handlers, function forEachHandler(h) {
- if (h !== null) {
- fn(h);
- }
- });
- };
- module.exports = InterceptorManager;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/normalizeHeaderName.js
- var require_normalizeHeaderName = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/normalizeHeaderName.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- module.exports = function normalizeHeaderName(headers, normalizedName) {
- utils.forEach(headers, function processHeader(value, name) {
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
- headers[normalizedName] = value;
- delete headers[name];
- }
- });
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/AxiosError.js
- var require_AxiosError = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/AxiosError.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- function AxiosError(message, code, config, request, response) {
- Error.call(this);
- this.message = message;
- this.name = "AxiosError";
- code && (this.code = code);
- config && (this.config = config);
- request && (this.request = request);
- response && (this.response = response);
- }
- utils.inherits(AxiosError, Error, {
- toJSON: function toJSON() {
- return {
- // Standard
- message: this.message,
- name: this.name,
- // Microsoft
- description: this.description,
- number: this.number,
- // Mozilla
- fileName: this.fileName,
- lineNumber: this.lineNumber,
- columnNumber: this.columnNumber,
- stack: this.stack,
- // Axios
- config: this.config,
- code: this.code,
- status: this.response && this.response.status ? this.response.status : null
- };
- }
- });
- var prototype = AxiosError.prototype;
- var descriptors = {};
- [
- "ERR_BAD_OPTION_VALUE",
- "ERR_BAD_OPTION",
- "ECONNABORTED",
- "ETIMEDOUT",
- "ERR_NETWORK",
- "ERR_FR_TOO_MANY_REDIRECTS",
- "ERR_DEPRECATED",
- "ERR_BAD_RESPONSE",
- "ERR_BAD_REQUEST",
- "ERR_CANCELED"
- // eslint-disable-next-line func-names
- ].forEach(function(code) {
- descriptors[code] = { value: code };
- });
- Object.defineProperties(AxiosError, descriptors);
- Object.defineProperty(prototype, "isAxiosError", { value: true });
- AxiosError.from = function(error, code, config, request, response, customProps) {
- var axiosError = Object.create(prototype);
- utils.toFlatObject(error, axiosError, function filter(obj) {
- return obj !== Error.prototype;
- });
- AxiosError.call(axiosError, error.message, code, config, request, response);
- axiosError.name = error.name;
- customProps && Object.assign(axiosError, customProps);
- return axiosError;
- };
- module.exports = AxiosError;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/defaults/transitional.js
- var require_transitional = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/defaults/transitional.js"(exports, module) {
- "use strict";
- module.exports = {
- silentJSONParsing: true,
- forcedJSONParsing: true,
- clarifyTimeoutError: false
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/toFormData.js
- var require_toFormData = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/toFormData.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- function toFormData(obj, formData) {
- formData = formData || new FormData();
- var stack = [];
- function convertValue(value) {
- if (value === null)
- return "";
- if (utils.isDate(value)) {
- return value.toISOString();
- }
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
- return typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
- }
- return value;
- }
- function build(data, parentKey) {
- if (utils.isPlainObject(data) || utils.isArray(data)) {
- if (stack.indexOf(data) !== -1) {
- throw Error("Circular reference detected in " + parentKey);
- }
- stack.push(data);
- utils.forEach(data, function each(value, key) {
- if (utils.isUndefined(value))
- return;
- var fullKey = parentKey ? parentKey + "." + key : key;
- var arr;
- if (value && !parentKey && typeof value === "object") {
- if (utils.endsWith(key, "{}")) {
- value = JSON.stringify(value);
- } else if (utils.endsWith(key, "[]") && (arr = utils.toArray(value))) {
- arr.forEach(function(el) {
- !utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
- });
- return;
- }
- }
- build(value, fullKey);
- });
- stack.pop();
- } else {
- formData.append(parentKey, convertValue(data));
- }
- }
- build(obj);
- return formData;
- }
- module.exports = toFormData;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/settle.js
- var require_settle = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/settle.js"(exports, module) {
- "use strict";
- var AxiosError = require_AxiosError();
- module.exports = function settle(resolve, reject, response) {
- var validateStatus = response.config.validateStatus;
- if (!response.status || !validateStatus || validateStatus(response.status)) {
- resolve(response);
- } else {
- reject(new AxiosError(
- "Request failed with status code " + response.status,
- [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
- response.config,
- response.request,
- response
- ));
- }
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/cookies.js
- var require_cookies = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/cookies.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- module.exports = utils.isStandardBrowserEnv() ? (
- // Standard browser envs support document.cookie
- function standardBrowserEnv() {
- return {
- write: function write(name, value, expires, path, domain, secure) {
- var cookie = [];
- cookie.push(name + "=" + encodeURIComponent(value));
- if (utils.isNumber(expires)) {
- cookie.push("expires=" + new Date(expires).toGMTString());
- }
- if (utils.isString(path)) {
- cookie.push("path=" + path);
- }
- if (utils.isString(domain)) {
- cookie.push("domain=" + domain);
- }
- if (secure === true) {
- cookie.push("secure");
- }
- document.cookie = cookie.join("; ");
- },
- read: function read(name) {
- var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
- return match ? decodeURIComponent(match[3]) : null;
- },
- remove: function remove(name) {
- this.write(name, "", Date.now() - 864e5);
- }
- };
- }()
- ) : (
- // Non standard browser env (web workers, react-native) lack needed support.
- function nonStandardBrowserEnv() {
- return {
- write: function write() {
- },
- read: function read() {
- return null;
- },
- remove: function remove() {
- }
- };
- }()
- );
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/isAbsoluteURL.js
- var require_isAbsoluteURL = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports, module) {
- "use strict";
- module.exports = function isAbsoluteURL(url) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/combineURLs.js
- var require_combineURLs = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/combineURLs.js"(exports, module) {
- "use strict";
- module.exports = function combineURLs(baseURL, relativeURL) {
- return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/buildFullPath.js
- var require_buildFullPath = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/buildFullPath.js"(exports, module) {
- "use strict";
- var isAbsoluteURL = require_isAbsoluteURL();
- var combineURLs = require_combineURLs();
- module.exports = function buildFullPath(baseURL, requestedURL) {
- if (baseURL && !isAbsoluteURL(requestedURL)) {
- return combineURLs(baseURL, requestedURL);
- }
- return requestedURL;
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/parseHeaders.js
- var require_parseHeaders = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/parseHeaders.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var ignoreDuplicateOf = [
- "age",
- "authorization",
- "content-length",
- "content-type",
- "etag",
- "expires",
- "from",
- "host",
- "if-modified-since",
- "if-unmodified-since",
- "last-modified",
- "location",
- "max-forwards",
- "proxy-authorization",
- "referer",
- "retry-after",
- "user-agent"
- ];
- module.exports = function parseHeaders(headers) {
- var parsed = {};
- var key;
- var val;
- var i;
- if (!headers) {
- return parsed;
- }
- utils.forEach(headers.split("\n"), function parser(line) {
- i = line.indexOf(":");
- key = utils.trim(line.substr(0, i)).toLowerCase();
- val = utils.trim(line.substr(i + 1));
- if (key) {
- if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
- return;
- }
- if (key === "set-cookie") {
- parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
- } else {
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
- }
- }
- });
- return parsed;
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/isURLSameOrigin.js
- var require_isURLSameOrigin = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/isURLSameOrigin.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- module.exports = utils.isStandardBrowserEnv() ? (
- // Standard browser envs have full support of the APIs needed to test
- // whether the request URL is of the same origin as current location.
- function standardBrowserEnv() {
- var msie = /(msie|trident)/i.test(navigator.userAgent);
- var urlParsingNode = document.createElement("a");
- var originURL;
- function resolveURL(url) {
- var href = url;
- if (msie) {
- urlParsingNode.setAttribute("href", href);
- href = urlParsingNode.href;
- }
- urlParsingNode.setAttribute("href", href);
- return {
- href: urlParsingNode.href,
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
- host: urlParsingNode.host,
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
- hostname: urlParsingNode.hostname,
- port: urlParsingNode.port,
- pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
- };
- }
- originURL = resolveURL(window.location.href);
- return function isURLSameOrigin(requestURL) {
- var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
- return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
- };
- }()
- ) : (
- // Non standard browser envs (web workers, react-native) lack needed support.
- function nonStandardBrowserEnv() {
- return function isURLSameOrigin() {
- return true;
- };
- }()
- );
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/cancel/CanceledError.js
- var require_CanceledError = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/cancel/CanceledError.js"(exports, module) {
- "use strict";
- var AxiosError = require_AxiosError();
- var utils = require_utils();
- function CanceledError(message) {
- AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED);
- this.name = "CanceledError";
- }
- utils.inherits(CanceledError, AxiosError, {
- __CANCEL__: true
- });
- module.exports = CanceledError;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/parseProtocol.js
- var require_parseProtocol = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/parseProtocol.js"(exports, module) {
- "use strict";
- module.exports = function parseProtocol(url) {
- var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
- return match && match[1] || "";
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/adapters/xhr.js
- var require_xhr = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/adapters/xhr.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var settle = require_settle();
- var cookies = require_cookies();
- var buildURL = require_buildURL();
- var buildFullPath = require_buildFullPath();
- var parseHeaders = require_parseHeaders();
- var isURLSameOrigin = require_isURLSameOrigin();
- var transitionalDefaults = require_transitional();
- var AxiosError = require_AxiosError();
- var CanceledError = require_CanceledError();
- var parseProtocol = require_parseProtocol();
- module.exports = function xhrAdapter(config) {
- return new Promise(function dispatchXhrRequest(resolve, reject) {
- var requestData = config.data;
- var requestHeaders = config.headers;
- var responseType = config.responseType;
- var onCanceled;
- function done() {
- if (config.cancelToken) {
- config.cancelToken.unsubscribe(onCanceled);
- }
- if (config.signal) {
- config.signal.removeEventListener("abort", onCanceled);
- }
- }
- if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
- delete requestHeaders["Content-Type"];
- }
- var request = new XMLHttpRequest();
- if (config.auth) {
- var username = config.auth.username || "";
- var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
- requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
- }
- var fullPath = buildFullPath(config.baseURL, config.url);
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
- request.timeout = config.timeout;
- function onloadend() {
- if (!request) {
- return;
- }
- var responseHeaders = "getAllResponseHeaders" in request ? parseHeaders(request.getAllResponseHeaders()) : null;
- var responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
- var response = {
- data: responseData,
- status: request.status,
- statusText: request.statusText,
- headers: responseHeaders,
- config,
- request
- };
- settle(function _resolve(value) {
- resolve(value);
- done();
- }, function _reject(err) {
- reject(err);
- done();
- }, response);
- request = null;
- }
- if ("onloadend" in request) {
- request.onloadend = onloadend;
- } else {
- request.onreadystatechange = function handleLoad() {
- if (!request || request.readyState !== 4) {
- return;
- }
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
- return;
- }
- setTimeout(onloadend);
- };
- }
- request.onabort = function handleAbort() {
- if (!request) {
- return;
- }
- reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
- request = null;
- };
- request.onerror = function handleError() {
- reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, request));
- request = null;
- };
- request.ontimeout = function handleTimeout() {
- var timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
- var transitional = config.transitional || transitionalDefaults;
- if (config.timeoutErrorMessage) {
- timeoutErrorMessage = config.timeoutErrorMessage;
- }
- reject(new AxiosError(
- timeoutErrorMessage,
- transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
- config,
- request
- ));
- request = null;
- };
- if (utils.isStandardBrowserEnv()) {
- var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : void 0;
- if (xsrfValue) {
- requestHeaders[config.xsrfHeaderName] = xsrfValue;
- }
- }
- if ("setRequestHeader" in request) {
- utils.forEach(requestHeaders, function setRequestHeader(val, key) {
- if (typeof requestData === "undefined" && key.toLowerCase() === "content-type") {
- delete requestHeaders[key];
- } else {
- request.setRequestHeader(key, val);
- }
- });
- }
- if (!utils.isUndefined(config.withCredentials)) {
- request.withCredentials = !!config.withCredentials;
- }
- if (responseType && responseType !== "json") {
- request.responseType = config.responseType;
- }
- if (typeof config.onDownloadProgress === "function") {
- request.addEventListener("progress", config.onDownloadProgress);
- }
- if (typeof config.onUploadProgress === "function" && request.upload) {
- request.upload.addEventListener("progress", config.onUploadProgress);
- }
- if (config.cancelToken || config.signal) {
- onCanceled = function(cancel) {
- if (!request) {
- return;
- }
- reject(!cancel || cancel && cancel.type ? new CanceledError() : cancel);
- request.abort();
- request = null;
- };
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
- if (config.signal) {
- config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
- }
- }
- if (!requestData) {
- requestData = null;
- }
- var protocol = parseProtocol(fullPath);
- if (protocol && ["http", "https", "file"].indexOf(protocol) === -1) {
- reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
- return;
- }
- request.send(requestData);
- });
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/null.js
- var require_null = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/null.js"(exports, module) {
- module.exports = null;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/defaults/index.js
- var require_defaults = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/defaults/index.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var normalizeHeaderName = require_normalizeHeaderName();
- var AxiosError = require_AxiosError();
- var transitionalDefaults = require_transitional();
- var toFormData = require_toFormData();
- var DEFAULT_CONTENT_TYPE = {
- "Content-Type": "application/x-www-form-urlencoded"
- };
- function setContentTypeIfUnset(headers, value) {
- if (!utils.isUndefined(headers) && utils.isUndefined(headers["Content-Type"])) {
- headers["Content-Type"] = value;
- }
- }
- function getDefaultAdapter() {
- var adapter;
- if (typeof XMLHttpRequest !== "undefined") {
- adapter = require_xhr();
- } else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
- adapter = require_xhr();
- }
- return adapter;
- }
- function stringifySafely(rawValue, parser, encoder) {
- if (utils.isString(rawValue)) {
- try {
- (parser || JSON.parse)(rawValue);
- return utils.trim(rawValue);
- } catch (e) {
- if (e.name !== "SyntaxError") {
- throw e;
- }
- }
- }
- return (encoder || JSON.stringify)(rawValue);
- }
- var defaults = {
- transitional: transitionalDefaults,
- adapter: getDefaultAdapter(),
- transformRequest: [function transformRequest(data, headers) {
- normalizeHeaderName(headers, "Accept");
- normalizeHeaderName(headers, "Content-Type");
- if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
- return data;
- }
- if (utils.isArrayBufferView(data)) {
- return data.buffer;
- }
- if (utils.isURLSearchParams(data)) {
- setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
- return data.toString();
- }
- var isObjectPayload = utils.isObject(data);
- var contentType = headers && headers["Content-Type"];
- var isFileList;
- if ((isFileList = utils.isFileList(data)) || isObjectPayload && contentType === "multipart/form-data") {
- var _FormData = this.env && this.env.FormData;
- return toFormData(isFileList ? { "files[]": data } : data, _FormData && new _FormData());
- } else if (isObjectPayload || contentType === "application/json") {
- setContentTypeIfUnset(headers, "application/json");
- return stringifySafely(data);
- }
- return data;
- }],
- transformResponse: [function transformResponse(data) {
- var transitional = this.transitional || defaults.transitional;
- var silentJSONParsing = transitional && transitional.silentJSONParsing;
- var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
- var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
- if (strictJSONParsing || forcedJSONParsing && utils.isString(data) && data.length) {
- try {
- return JSON.parse(data);
- } catch (e) {
- if (strictJSONParsing) {
- if (e.name === "SyntaxError") {
- throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
- }
- throw e;
- }
- }
- }
- return data;
- }],
- /**
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
- * timeout is not created.
- */
- timeout: 0,
- xsrfCookieName: "XSRF-TOKEN",
- xsrfHeaderName: "X-XSRF-TOKEN",
- maxContentLength: -1,
- maxBodyLength: -1,
- env: {
- FormData: require_null()
- },
- validateStatus: function validateStatus(status) {
- return status >= 200 && status < 300;
- },
- headers: {
- common: {
- "Accept": "application/json, text/plain, */*"
- }
- }
- };
- utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
- defaults.headers[method] = {};
- });
- utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
- });
- module.exports = defaults;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/transformData.js
- var require_transformData = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/transformData.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var defaults = require_defaults();
- module.exports = function transformData(data, headers, fns) {
- var context = this || defaults;
- utils.forEach(fns, function transform(fn) {
- data = fn.call(context, data, headers);
- });
- return data;
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/cancel/isCancel.js
- var require_isCancel = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/cancel/isCancel.js"(exports, module) {
- "use strict";
- module.exports = function isCancel(value) {
- return !!(value && value.__CANCEL__);
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/dispatchRequest.js
- var require_dispatchRequest = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/dispatchRequest.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var transformData = require_transformData();
- var isCancel = require_isCancel();
- var defaults = require_defaults();
- var CanceledError = require_CanceledError();
- function throwIfCancellationRequested(config) {
- if (config.cancelToken) {
- config.cancelToken.throwIfRequested();
- }
- if (config.signal && config.signal.aborted) {
- throw new CanceledError();
- }
- }
- module.exports = function dispatchRequest(config) {
- throwIfCancellationRequested(config);
- config.headers = config.headers || {};
- config.data = transformData.call(
- config,
- config.data,
- config.headers,
- config.transformRequest
- );
- config.headers = utils.merge(
- config.headers.common || {},
- config.headers[config.method] || {},
- config.headers
- );
- utils.forEach(
- ["delete", "get", "head", "post", "put", "patch", "common"],
- function cleanHeaderConfig(method) {
- delete config.headers[method];
- }
- );
- var adapter = config.adapter || defaults.adapter;
- return adapter(config).then(function onAdapterResolution(response) {
- throwIfCancellationRequested(config);
- response.data = transformData.call(
- config,
- response.data,
- response.headers,
- config.transformResponse
- );
- return response;
- }, function onAdapterRejection(reason) {
- if (!isCancel(reason)) {
- throwIfCancellationRequested(config);
- if (reason && reason.response) {
- reason.response.data = transformData.call(
- config,
- reason.response.data,
- reason.response.headers,
- config.transformResponse
- );
- }
- }
- return Promise.reject(reason);
- });
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/mergeConfig.js
- var require_mergeConfig = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/mergeConfig.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- module.exports = function mergeConfig(config1, config2) {
- config2 = config2 || {};
- var config = {};
- function getMergedValue(target, source) {
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
- return utils.merge(target, source);
- } else if (utils.isPlainObject(source)) {
- return utils.merge({}, source);
- } else if (utils.isArray(source)) {
- return source.slice();
- }
- return source;
- }
- function mergeDeepProperties(prop) {
- if (!utils.isUndefined(config2[prop])) {
- return getMergedValue(config1[prop], config2[prop]);
- } else if (!utils.isUndefined(config1[prop])) {
- return getMergedValue(void 0, config1[prop]);
- }
- }
- function valueFromConfig2(prop) {
- if (!utils.isUndefined(config2[prop])) {
- return getMergedValue(void 0, config2[prop]);
- }
- }
- function defaultToConfig2(prop) {
- if (!utils.isUndefined(config2[prop])) {
- return getMergedValue(void 0, config2[prop]);
- } else if (!utils.isUndefined(config1[prop])) {
- return getMergedValue(void 0, config1[prop]);
- }
- }
- function mergeDirectKeys(prop) {
- if (prop in config2) {
- return getMergedValue(config1[prop], config2[prop]);
- } else if (prop in config1) {
- return getMergedValue(void 0, config1[prop]);
- }
- }
- var mergeMap = {
- "url": valueFromConfig2,
- "method": valueFromConfig2,
- "data": valueFromConfig2,
- "baseURL": defaultToConfig2,
- "transformRequest": defaultToConfig2,
- "transformResponse": defaultToConfig2,
- "paramsSerializer": defaultToConfig2,
- "timeout": defaultToConfig2,
- "timeoutMessage": defaultToConfig2,
- "withCredentials": defaultToConfig2,
- "adapter": defaultToConfig2,
- "responseType": defaultToConfig2,
- "xsrfCookieName": defaultToConfig2,
- "xsrfHeaderName": defaultToConfig2,
- "onUploadProgress": defaultToConfig2,
- "onDownloadProgress": defaultToConfig2,
- "decompress": defaultToConfig2,
- "maxContentLength": defaultToConfig2,
- "maxBodyLength": defaultToConfig2,
- "beforeRedirect": defaultToConfig2,
- "transport": defaultToConfig2,
- "httpAgent": defaultToConfig2,
- "httpsAgent": defaultToConfig2,
- "cancelToken": defaultToConfig2,
- "socketPath": defaultToConfig2,
- "responseEncoding": defaultToConfig2,
- "validateStatus": mergeDirectKeys
- };
- utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
- var merge = mergeMap[prop] || mergeDeepProperties;
- var configValue = merge(prop);
- utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
- });
- return config;
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/env/data.js
- var require_data = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/env/data.js"(exports, module) {
- module.exports = {
- "version": "0.27.2"
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/validator.js
- var require_validator = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/validator.js"(exports, module) {
- "use strict";
- var VERSION = require_data().version;
- var AxiosError = require_AxiosError();
- var validators = {};
- ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
- validators[type] = function validator(thing) {
- return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
- };
- });
- var deprecatedWarnings = {};
- validators.transitional = function transitional(validator, version, message) {
- function formatMessage(opt, desc) {
- return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
- }
- return function(value, opt, opts) {
- if (validator === false) {
- throw new AxiosError(
- formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
- AxiosError.ERR_DEPRECATED
- );
- }
- if (version && !deprecatedWarnings[opt]) {
- deprecatedWarnings[opt] = true;
- console.warn(
- formatMessage(
- opt,
- " has been deprecated since v" + version + " and will be removed in the near future"
- )
- );
- }
- return validator ? validator(value, opt, opts) : true;
- };
- };
- function assertOptions(options, schema, allowUnknown) {
- if (typeof options !== "object") {
- throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
- }
- var keys = Object.keys(options);
- var i = keys.length;
- while (i-- > 0) {
- var opt = keys[i];
- var validator = schema[opt];
- if (validator) {
- var value = options[opt];
- var result = value === void 0 || validator(value, opt, options);
- if (result !== true) {
- throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
- }
- continue;
- }
- if (allowUnknown !== true) {
- throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
- }
- }
- }
- module.exports = {
- assertOptions,
- validators
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/core/Axios.js
- var require_Axios = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/core/Axios.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var buildURL = require_buildURL();
- var InterceptorManager = require_InterceptorManager();
- var dispatchRequest = require_dispatchRequest();
- var mergeConfig = require_mergeConfig();
- var buildFullPath = require_buildFullPath();
- var validator = require_validator();
- var validators = validator.validators;
- function Axios(instanceConfig) {
- this.defaults = instanceConfig;
- this.interceptors = {
- request: new InterceptorManager(),
- response: new InterceptorManager()
- };
- }
- Axios.prototype.request = function request(configOrUrl, config) {
- if (typeof configOrUrl === "string") {
- config = config || {};
- config.url = configOrUrl;
- } else {
- config = configOrUrl || {};
- }
- config = mergeConfig(this.defaults, config);
- if (config.method) {
- config.method = config.method.toLowerCase();
- } else if (this.defaults.method) {
- config.method = this.defaults.method.toLowerCase();
- } else {
- config.method = "get";
- }
- var transitional = config.transitional;
- if (transitional !== void 0) {
- validator.assertOptions(transitional, {
- silentJSONParsing: validators.transitional(validators.boolean),
- forcedJSONParsing: validators.transitional(validators.boolean),
- clarifyTimeoutError: validators.transitional(validators.boolean)
- }, false);
- }
- var requestInterceptorChain = [];
- var synchronousRequestInterceptors = true;
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
- if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
- return;
- }
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
- });
- var responseInterceptorChain = [];
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
- });
- var promise;
- if (!synchronousRequestInterceptors) {
- var chain = [dispatchRequest, void 0];
- Array.prototype.unshift.apply(chain, requestInterceptorChain);
- chain = chain.concat(responseInterceptorChain);
- promise = Promise.resolve(config);
- while (chain.length) {
- promise = promise.then(chain.shift(), chain.shift());
- }
- return promise;
- }
- var newConfig = config;
- while (requestInterceptorChain.length) {
- var onFulfilled = requestInterceptorChain.shift();
- var onRejected = requestInterceptorChain.shift();
- try {
- newConfig = onFulfilled(newConfig);
- } catch (error) {
- onRejected(error);
- break;
- }
- }
- try {
- promise = dispatchRequest(newConfig);
- } catch (error) {
- return Promise.reject(error);
- }
- while (responseInterceptorChain.length) {
- promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
- }
- return promise;
- };
- Axios.prototype.getUri = function getUri(config) {
- config = mergeConfig(this.defaults, config);
- var fullPath = buildFullPath(config.baseURL, config.url);
- return buildURL(fullPath, config.params, config.paramsSerializer);
- };
- utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
- Axios.prototype[method] = function(url, config) {
- return this.request(mergeConfig(config || {}, {
- method,
- url,
- data: (config || {}).data
- }));
- };
- });
- utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
- function generateHTTPMethod(isForm) {
- return function httpMethod(url, data, config) {
- return this.request(mergeConfig(config || {}, {
- method,
- headers: isForm ? {
- "Content-Type": "multipart/form-data"
- } : {},
- url,
- data
- }));
- };
- }
- Axios.prototype[method] = generateHTTPMethod();
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
- });
- module.exports = Axios;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/cancel/CancelToken.js
- var require_CancelToken = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/cancel/CancelToken.js"(exports, module) {
- "use strict";
- var CanceledError = require_CanceledError();
- function CancelToken(executor) {
- if (typeof executor !== "function") {
- throw new TypeError("executor must be a function.");
- }
- var resolvePromise;
- this.promise = new Promise(function promiseExecutor(resolve) {
- resolvePromise = resolve;
- });
- var token = this;
- this.promise.then(function(cancel) {
- if (!token._listeners)
- return;
- var i;
- var l = token._listeners.length;
- for (i = 0; i < l; i++) {
- token._listeners[i](cancel);
- }
- token._listeners = null;
- });
- this.promise.then = function(onfulfilled) {
- var _resolve;
- var promise = new Promise(function(resolve) {
- token.subscribe(resolve);
- _resolve = resolve;
- }).then(onfulfilled);
- promise.cancel = function reject() {
- token.unsubscribe(_resolve);
- };
- return promise;
- };
- executor(function cancel(message) {
- if (token.reason) {
- return;
- }
- token.reason = new CanceledError(message);
- resolvePromise(token.reason);
- });
- }
- CancelToken.prototype.throwIfRequested = function throwIfRequested() {
- if (this.reason) {
- throw this.reason;
- }
- };
- CancelToken.prototype.subscribe = function subscribe(listener) {
- if (this.reason) {
- listener(this.reason);
- return;
- }
- if (this._listeners) {
- this._listeners.push(listener);
- } else {
- this._listeners = [listener];
- }
- };
- CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
- if (!this._listeners) {
- return;
- }
- var index = this._listeners.indexOf(listener);
- if (index !== -1) {
- this._listeners.splice(index, 1);
- }
- };
- CancelToken.source = function source() {
- var cancel;
- var token = new CancelToken(function executor(c) {
- cancel = c;
- });
- return {
- token,
- cancel
- };
- };
- module.exports = CancelToken;
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/spread.js
- var require_spread = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/spread.js"(exports, module) {
- "use strict";
- module.exports = function spread(callback) {
- return function wrap(arr) {
- return callback.apply(null, arr);
- };
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/helpers/isAxiosError.js
- var require_isAxiosError = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/helpers/isAxiosError.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- module.exports = function isAxiosError(payload) {
- return utils.isObject(payload) && payload.isAxiosError === true;
- };
- }
- });
- // node_modules/queenjs/node_modules/axios/lib/axios.js
- var require_axios = __commonJS({
- "node_modules/queenjs/node_modules/axios/lib/axios.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var bind = require_bind();
- var Axios = require_Axios();
- var mergeConfig = require_mergeConfig();
- var defaults = require_defaults();
- function createInstance2(defaultConfig) {
- var context = new Axios(defaultConfig);
- var instance = bind(Axios.prototype.request, context);
- utils.extend(instance, Axios.prototype, context);
- utils.extend(instance, context);
- instance.create = function create(instanceConfig) {
- return createInstance2(mergeConfig(defaultConfig, instanceConfig));
- };
- return instance;
- }
- var axios2 = createInstance2(defaults);
- axios2.Axios = Axios;
- axios2.CanceledError = require_CanceledError();
- axios2.CancelToken = require_CancelToken();
- axios2.isCancel = require_isCancel();
- axios2.VERSION = require_data().version;
- axios2.toFormData = require_toFormData();
- axios2.AxiosError = require_AxiosError();
- axios2.Cancel = axios2.CanceledError;
- axios2.all = function all(promises) {
- return Promise.all(promises);
- };
- axios2.spread = require_spread();
- axios2.isAxiosError = require_isAxiosError();
- module.exports = axios2;
- module.exports.default = axios2;
- }
- });
- // node_modules/queenjs/node_modules/axios/index.js
- var require_axios2 = __commonJS({
- "node_modules/queenjs/node_modules/axios/index.js"(exports, module) {
- module.exports = require_axios();
- }
- });
- // node_modules/eventemitter3/index.js
- var require_eventemitter3 = __commonJS({
- "node_modules/eventemitter3/index.js"(exports, module) {
- "use strict";
- var has = Object.prototype.hasOwnProperty;
- var prefix = "~";
- function Events2() {
- }
- if (Object.create) {
- Events2.prototype = /* @__PURE__ */ Object.create(null);
- if (!new Events2().__proto__)
- prefix = false;
- }
- function EE(fn, context, once) {
- this.fn = fn;
- this.context = context;
- this.once = once || false;
- }
- function addListener(emitter, event, fn, context, once) {
- if (typeof fn !== "function") {
- throw new TypeError("The listener must be a function");
- }
- var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
- if (!emitter._events[evt])
- emitter._events[evt] = listener, emitter._eventsCount++;
- else if (!emitter._events[evt].fn)
- emitter._events[evt].push(listener);
- else
- emitter._events[evt] = [emitter._events[evt], listener];
- return emitter;
- }
- function clearEvent(emitter, evt) {
- if (--emitter._eventsCount === 0)
- emitter._events = new Events2();
- else
- delete emitter._events[evt];
- }
- function EventEmitter() {
- this._events = new Events2();
- this._eventsCount = 0;
- }
- EventEmitter.prototype.eventNames = function eventNames() {
- var names = [], events, name;
- if (this._eventsCount === 0)
- return names;
- for (name in events = this._events) {
- if (has.call(events, name))
- names.push(prefix ? name.slice(1) : name);
- }
- if (Object.getOwnPropertySymbols) {
- return names.concat(Object.getOwnPropertySymbols(events));
- }
- return names;
- };
- EventEmitter.prototype.listeners = function listeners(event) {
- var evt = prefix ? prefix + event : event, handlers = this._events[evt];
- if (!handlers)
- return [];
- if (handlers.fn)
- return [handlers.fn];
- for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
- ee[i] = handlers[i].fn;
- }
- return ee;
- };
- EventEmitter.prototype.listenerCount = function listenerCount(event) {
- var evt = prefix ? prefix + event : event, listeners = this._events[evt];
- if (!listeners)
- return 0;
- if (listeners.fn)
- return 1;
- return listeners.length;
- };
- EventEmitter.prototype.emit = function emit2(event, a1, a2, a3, a4, a5) {
- var evt = prefix ? prefix + event : event;
- if (!this._events[evt])
- return false;
- var listeners = this._events[evt], len = arguments.length, args, i;
- if (listeners.fn) {
- if (listeners.once)
- this.removeListener(event, listeners.fn, void 0, true);
- switch (len) {
- case 1:
- return listeners.fn.call(listeners.context), true;
- case 2:
- return listeners.fn.call(listeners.context, a1), true;
- case 3:
- return listeners.fn.call(listeners.context, a1, a2), true;
- case 4:
- return listeners.fn.call(listeners.context, a1, a2, a3), true;
- case 5:
- return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
- case 6:
- return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
- }
- for (i = 1, args = new Array(len - 1); i < len; i++) {
- args[i - 1] = arguments[i];
- }
- listeners.fn.apply(listeners.context, args);
- } else {
- var length = listeners.length, j;
- for (i = 0; i < length; i++) {
- if (listeners[i].once)
- this.removeListener(event, listeners[i].fn, void 0, true);
- switch (len) {
- case 1:
- listeners[i].fn.call(listeners[i].context);
- break;
- case 2:
- listeners[i].fn.call(listeners[i].context, a1);
- break;
- case 3:
- listeners[i].fn.call(listeners[i].context, a1, a2);
- break;
- case 4:
- listeners[i].fn.call(listeners[i].context, a1, a2, a3);
- break;
- default:
- if (!args)
- for (j = 1, args = new Array(len - 1); j < len; j++) {
- args[j - 1] = arguments[j];
- }
- listeners[i].fn.apply(listeners[i].context, args);
- }
- }
- }
- return true;
- };
- EventEmitter.prototype.on = function on(event, fn, context) {
- return addListener(this, event, fn, context, false);
- };
- EventEmitter.prototype.once = function once(event, fn, context) {
- return addListener(this, event, fn, context, true);
- };
- EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
- var evt = prefix ? prefix + event : event;
- if (!this._events[evt])
- return this;
- if (!fn) {
- clearEvent(this, evt);
- return this;
- }
- var listeners = this._events[evt];
- if (listeners.fn) {
- if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
- clearEvent(this, evt);
- }
- } else {
- for (var i = 0, events = [], length = listeners.length; i < length; i++) {
- if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
- events.push(listeners[i]);
- }
- }
- if (events.length)
- this._events[evt] = events.length === 1 ? events[0] : events;
- else
- clearEvent(this, evt);
- }
- return this;
- };
- EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
- var evt;
- if (event) {
- evt = prefix ? prefix + event : event;
- if (this._events[evt])
- clearEvent(this, evt);
- } else {
- this._events = new Events2();
- this._eventsCount = 0;
- }
- return this;
- };
- EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
- EventEmitter.prototype.addListener = EventEmitter.prototype.on;
- EventEmitter.prefixed = prefix;
- EventEmitter.EventEmitter = EventEmitter;
- if ("undefined" !== typeof module) {
- module.exports = EventEmitter;
- }
- }
- });
- // node_modules/queenjs/src/core/comm/bus.ts
- var Bus = class {
- constructor() {
- this._hooks = {};
- }
- method(name, fn) {
- if (this._hooks[name] !== void 0) {
- throw new Error("can't override hook: " + name);
- }
- this._hooks[name] = fn;
- }
- methodRemove(name) {
- delete this._hooks[name];
- }
- call(name, ...args) {
- if (this._hooks[name]) {
- try {
- return this._hooks[name].apply(null, args);
- } catch (ex) {
- console.info(
- "%c%s %c(editor.method error)",
- "color: #06f",
- name,
- "color: #f00"
- );
- console.error(ex);
- }
- } else {
- }
- return null;
- }
- };
- // node_modules/queenjs/src/core/comm/event.ts
- var EventHandle = class {
- constructor(owner, name, fn) {
- this.owner = owner;
- this.name = name;
- this.fn = fn;
- }
- unbind() {
- if (!this.owner)
- return;
- this.owner.unbind(this.name, this.fn);
- this.owner = null;
- this.name = null;
- this.fn = null;
- }
- call() {
- if (!this.fn)
- return;
- this.fn.call(
- this.owner,
- arguments[0],
- arguments[1],
- arguments[2],
- arguments[3],
- arguments[4],
- arguments[5],
- arguments[6],
- arguments[7]
- );
- }
- on(name, fn) {
- return this.owner.on(name, fn);
- }
- };
- var Events = class {
- constructor() {
- this._events = {};
- this._suspendEvents = false;
- }
- get suspendEvents() {
- return this._suspendEvents;
- }
- set suspendEvents(value) {
- this._suspendEvents = !!value;
- }
- nextTick(name, fn) {
- this.on(
- name,
- function() {
- let timer = null;
- return function(...args) {
- if (timer)
- clearTimeout(timer);
- timer = setTimeout(fn.bind(null, ...args));
- };
- }()
- );
- }
- on(name, fn) {
- const events = this._events[name];
- if (events === void 0) {
- this._events[name] = [fn];
- } else {
- if (events.indexOf(fn) == -1)
- events.push(fn);
- }
- return new EventHandle(this, name, fn);
- }
- once(name, fn) {
- const self = this;
- const evt = this.on(name, function(...args) {
- fn.call(self, ...args);
- evt.unbind();
- });
- return evt;
- }
- emit(name, ...args) {
- if (this._suspendEvents)
- return;
- let events = this._events[name];
- if (!events)
- return;
- events = events.slice(0);
- for (let i = 0; i < events.length; i++) {
- if (!events[i])
- continue;
- try {
- events[i].call(this, ...args);
- } catch (ex) {
- console.info(
- "%c%s %c(event error)",
- "color: #06f",
- name,
- "color: #f00"
- );
- console.error(ex);
- }
- }
- }
- unbind(name, fn) {
- if (name) {
- const events = this._events[name];
- if (!events)
- return this;
- if (fn) {
- const i = events.indexOf(fn);
- if (i !== -1) {
- if (events.length === 1) {
- delete this._events[name];
- } else {
- events.splice(i, 1);
- }
- }
- } else {
- delete this._events[name];
- }
- } else {
- this._events = {};
- }
- return this;
- }
- };
- // node_modules/queenjs/src/core/defineUI/index.tsx
- var defineUI = function(options) {
- delete options.slotOptions;
- const { slots = {}, ...componentOptions } = options;
- const UI = defineComponent(componentOptions);
- const originComp = function(props) {
- const { slots: slots2, ...uiProps } = props;
- return React.createElement(UI, { ...uiProps }, buildSlots(this, slots2));
- };
- const Component = originComp.bind(() => Component);
- Object.setPrototypeOf(Component, originComp);
- Object.keys(slots).forEach((key) => {
- Component[key] = slots[key];
- });
- Component.slots = function(config) {
- return config;
- };
- return Component;
- };
- function buildSlots(getComp, customSlots = {}) {
- const Component = getComp();
- const slotKeys = Object.keys(Component);
- slotKeys.forEach((key) => {
- customSlots[key] = buildSlot(customSlots, key, Component[key]);
- });
- return customSlots;
- }
- function buildSlot(conf, slotName, SlotUI) {
- const originSlot = conf[slotName];
- if (!originSlot) {
- return (props) => React.createElement(SlotUI, { ...props });
- } else {
- return (props = {}, option = {}) => {
- const slotImpl = originSlot(props, option);
- if (!slotImpl) {
- return;
- }
- if (slotImpl != props) {
- return slotImpl;
- }
- return React.createElement(SlotUI, { ...slotImpl });
- };
- }
- }
- // node_modules/queenjs/src/core/defineUI/DefaultUI.tsx
- var NullDefineUI = defineUI({
- setup() {
- return () => null;
- }
- });
- var Null = () => null;
- var DefaultUI = {
- Null
- };
- // node_modules/queenjs/src/core/dict/index.ts
- function createDictMap(data, methods) {
- const dictMap = new DictMap();
- Object.entries(data).forEach(([key, item]) => {
- methods && Object.setPrototypeOf(item, methods);
- dictMap.set(key, item);
- });
- return dictMap;
- }
- function createDictArr(data, methods) {
- let dictArr = new DictArr();
- if (methods) {
- dictArr = new Proxy(dictArr, {
- set: (target, key, value, receiver) => {
- Object.setPrototypeOf(value, methods);
- return Reflect.set(target, key, value, receiver);
- }
- });
- }
- data.forEach((item) => {
- dictArr.push(item);
- });
- return dictArr;
- }
- function createDictStorage(data, type) {
- const storage = type === "localStorage" ? localStorage : sessionStorage;
- Object.entries(data || {}).map(([key, value]) => {
- if (!storage.getItem(key)) {
- storage.setItem(key, JSON.stringify(value));
- }
- });
- return {
- get(key) {
- try {
- return JSON.parse(storage.getItem(key));
- } catch (error) {
- console.error(
- `调用JSON.parse(${type}.getItem("${key}"))失败`
- );
- return data[key];
- }
- },
- set(key, value) {
- storage.setItem(key, JSON.stringify(value));
- }
- };
- }
- var DictMap = class extends Map {
- arrayWith(keys) {
- const list = new DictArr();
- keys.forEach((key) => {
- const item = this.get(key);
- item && list.push(item);
- });
- return list;
- }
- find(cb) {
- return [...this.values()].find(cb);
- }
- };
- var DictArr = class extends Array {
- filterWith(key, values, sort = "sort:value") {
- const filterList = this.filter((item) => {
- return values.includes(item[key]);
- });
- if (sort === "sort:value") {
- const sortBy = values.join(",") + ",";
- return filterList.sort((a, b) => {
- return sortBy.indexOf(a[key] + ",") - sortBy.indexOf(b[key] + ",");
- });
- } else {
- return filterList;
- }
- }
- delete(cb) {
- for (let i = this.length - 1; i >= 0; i--) {
- if (cb(this[i])) {
- this.splice(i, 1);
- }
- }
- }
- };
- // node_modules/queenjs/src/core/effect/index.ts
- var import_lodash = __toESM(require_lodash());
- var Effect = class {
- constructor(type, observer) {
- this.type = type;
- this.observer = observer;
- this.pauseStatus = false;
- this.watchs = [];
- this.listHandlers = {};
- }
- static array(ob) {
- return new Effect("array", ob);
- }
- static object(ob) {
- return new Effect("object", ob);
- }
- static value(ob) {
- return new Effect("value", ob);
- }
- list(handlers) {
- if (!(this.observer() instanceof Array)) {
- console.error("observer不是数组类型");
- }
- if (handlers)
- this.listHandlers = handlers;
- return this;
- }
- item(itemObserver, handler) {
- this.watchs.push([itemObserver, handler, null]);
- return this;
- }
- run() {
- this.stop();
- this.pauseStatus = false;
- if (this.type === "array") {
- if (!this.watchs.length)
- this.watchs.push([() => null, () => null, null]);
- this.listHandlers.stop = watchList.call(
- this,
- this.observer,
- this.listHandlers,
- this.watchs
- );
- } else {
- watchObject.call(this, this.observer, this.watchs);
- }
- return this;
- }
- stop() {
- var _a, _b;
- for (const [, , watchStop] of this.watchs) {
- if (watchStop instanceof Function) {
- watchStop();
- } else if (watchStop instanceof Map) {
- for (const stop of watchStop.values()) {
- stop();
- }
- }
- }
- (_b = (_a = this.listHandlers).stop) == null ? void 0 : _b.call(_a);
- return this;
- }
- pause() {
- this.pauseStatus = true;
- }
- async play() {
- this.pauseStatus = await Promise.resolve(false);
- }
- };
- var getItemByCompare = function(currItem, oldItem) {
- if (!(currItem instanceof Array))
- return currItem === oldItem ? oldItem : currItem;
- if (currItem.length !== (oldItem == null ? void 0 : oldItem.length))
- return currItem;
- for (let i = 0; i < currItem.length; i++) {
- if (currItem[i] !== (oldItem == null ? void 0 : oldItem[i]))
- return currItem;
- }
- return oldItem;
- };
- function watchList(list, listHandlers, watchs) {
- const listObserver = [() => [...list() || []]];
- watchs.forEach((w) => w[2] = /* @__PURE__ */ new Map());
- watchItemHandler.call(this);
- return watch(listObserver, () => {
- var _a, _b;
- if (this.pauseStatus)
- return;
- const updateMap = (0, import_lodash.clone)(watchs[0][2]);
- watchItemHandler.call(this, updateMap);
- const added = [];
- const removed = [];
- for (const [item, stop] of updateMap.entries()) {
- if (stop) {
- watchs.forEach(([, , itemMap]) => {
- var _a2;
- (_a2 = itemMap.get(item)) == null ? void 0 : _a2();
- itemMap.delete(item);
- });
- }
- !stop ? added.push(item) : removed.push(item);
- (_a = listHandlers[stop ? "remove" : "add"]) == null ? void 0 : _a.call(listHandlers, item);
- }
- if (updateMap.size > 0) {
- (_b = listHandlers["change"]) == null ? void 0 : _b.call(listHandlers, added, removed);
- }
- });
- function watchItemHandler(updateMap) {
- list().forEach((item) => {
- watchs.forEach(([observer, handler, itemMap], i) => {
- if (i === 0 && updateMap) {
- if (!itemMap.has(item)) {
- updateMap.set(item, null);
- } else {
- updateMap.delete(item);
- }
- }
- if (!itemMap.has(item)) {
- let oldItem;
- itemMap.set(
- item,
- watch(
- () => oldItem = getItemByCompare(observer(item), oldItem),
- () => {
- if (this.pauseStatus)
- return;
- handler(item, oldItem);
- }
- )
- );
- }
- });
- });
- }
- }
- function watchObject(observer, watchs) {
- const handler = (item) => {
- if (this.pauseStatus)
- return;
- watchs.forEach((watchItem) => {
- var _a;
- const [itemObserver, itemHandler] = watchItem;
- let oldItem;
- (_a = watchItem[2]) == null ? void 0 : _a.call(watchItem);
- watchItem[2] = watch(
- () => oldItem = getItemByCompare(itemObserver(item), oldItem),
- () => {
- if (this.pauseStatus)
- return;
- itemHandler(observer(), oldItem);
- }
- );
- });
- };
- handler(observer());
- watch(observer, handler);
- }
- // node_modules/queenjs/src/api/feedback.ts
- var feedback_exports = {};
- __export(feedback_exports, {
- dialog: () => dialog,
- hideLoading: () => hideLoading,
- messageError: () => messageError,
- messageInfo: () => messageInfo,
- messageSuccess: () => messageSuccess,
- messageWarn: () => messageWarn,
- showConfirm: () => showConfirm,
- showInput: () => showInput,
- showLoading: () => showLoading,
- useDialog: () => useDialog
- });
- // node_modules/queenjs/src/api/bus.ts
- var queenBus = new Bus();
- // node_modules/queenjs/src/api/feedback.ts
- function showLoading(tip) {
- queenBus.call("ui:showLoading", tip);
- }
- function hideLoading() {
- queenBus.call("ui:hideLoading");
- }
- function messageSuccess(msg) {
- queenBus.call("ui:message:success", msg);
- }
- function messageInfo(msg) {
- queenBus.call("ui:message:info", msg);
- }
- function messageWarn(msg) {
- queenBus.call("ui:message:warn", msg);
- return msg;
- }
- function messageError(msg) {
- queenBus.call("ui:message:error", msg);
- return msg;
- }
- function showInput(params) {
- return queenBus.call("ui:dialog:input", params);
- }
- function showConfirm(params) {
- return queenBus.call("ui:dialog:confirm", params);
- }
- function dialog(component, params, context) {
- return queenBus.call(
- "ui:dialog:custom",
- component,
- params,
- context
- );
- }
- function useDialog() {
- return queenBus.call("ui:dialog:use");
- }
- // node_modules/queenjs/src/api/file.ts
- var file_exports = {};
- __export(file_exports, {
- selectFile: () => selectFile
- });
- function selectFile(opts) {
- return new Promise((resolve, reject) => {
- const fileInput = document.createElement("input");
- fileInput.type = "file";
- fileInput.accept = (opts == null ? void 0 : opts.accept) || "images/*";
- fileInput.multiple = (opts == null ? void 0 : opts.multiple) || false;
- fileInput.onchange = function() {
- resolve([...this.files]);
- };
- window.addEventListener(
- "mousedown",
- () => {
- reject(Exception.cancel("select file cancel"));
- },
- { once: true }
- );
- fileInput.click();
- });
- }
- // node_modules/queenjs/src/api/url.ts
- var url_exports = {};
- __export(url_exports, {
- blobURLMaps: () => blobURLMaps,
- getBlobURLExt: () => getBlobURLExt,
- getBlobURLName: () => getBlobURLName,
- isBlobURL: () => isBlobURL
- });
- var createObjectURL = URL.createObjectURL;
- var revokeObjectURL = URL.revokeObjectURL;
- URL.createObjectURL = function(obj) {
- const url = createObjectURL(obj);
- blobURLMaps.set(url, obj);
- return url;
- };
- URL.revokeObjectURL = function(url) {
- revokeObjectURL(url);
- blobURLMaps.delete(url);
- };
- var blobURLMaps = /* @__PURE__ */ new Map();
- function getBlobURLName(url) {
- var _a;
- return (_a = blobURLMaps.get(url)) == null ? void 0 : _a.name;
- }
- function getBlobURLExt(url) {
- const blob = blobURLMaps.get(url);
- let ext = "unkown";
- if (blob) {
- const exp = /^.+\.(.+)$/;
- if (blob.name && exp.test(blob.name)) {
- ext = exp.exec(blob.name)[1];
- } else if (blob.type) {
- ext = blob.type.split("/").pop();
- }
- return ext.toLowerCase();
- } else {
- return ext;
- }
- }
- function isBlobURL(url) {
- return /^blob:/.test(url);
- }
- // node_modules/queenjs/src/api/index.ts
- var queenApi = {
- router: {},
- ...feedback_exports,
- ...url_exports,
- ...file_exports
- };
- var useModal = useDialog;
- // node_modules/queenjs/src/core/exception/index.ts
- var Exception_Types = {
- Cancel: {
- label: "取消",
- silence: true
- },
- Warn: {
- label: "警告",
- silence: false
- },
- Error: {
- label: "错误",
- silence: false
- }
- };
- var Exception = class {
- constructor(type, options) {
- this.type = type;
- this.msg = Exception_Types[type].label;
- this.silence = Exception_Types[type].silence;
- if (options) {
- Object.assign(
- this,
- typeof options === "string" ? { msg: options } : options
- );
- }
- if (this.silence)
- return;
- switch (this.type) {
- case "Cancel":
- case "Warn":
- queenApi.messageWarn(this.msg);
- break;
- case "Error":
- queenApi.messageError(this.msg);
- break;
- }
- }
- static cancel(options) {
- return new Exception("Cancel", options);
- }
- static warn(options) {
- return new Exception("Warn", options);
- }
- static error(options) {
- return new Exception("Error", options);
- }
- };
- // node_modules/queenjs/src/core/http/index.ts
- var import_axios = __toESM(require_axios2());
- var import_lodash2 = __toESM(require_lodash());
- function createRequest(defReqConfig) {
- var _a;
- const { interceptors, ...httpConfig } = defReqConfig;
- const http = import_axios.default.create(httpConfig);
- (_a = Object.values(interceptors || {})) == null ? void 0 : _a.forEach((item) => {
- item.request && http.interceptors.request.use(item.request);
- item.response && http.interceptors.response.use(item.response);
- });
- return async function(url, config) {
- const { originBody, prefix, silence, ...thisConfig } = Object.assign(
- {},
- config,
- { url }
- );
- if (prefix) {
- thisConfig.url = prefix + thisConfig.url;
- }
- try {
- let response = (await http(thisConfig)).data;
- if (originBody) {
- response = {
- errorNo: 200,
- errorDesc: "",
- result: response
- };
- }
- if (response.errorNo !== 200) {
- const silence2 = config.silence ?? config.method === "GET";
- throw Exception.error({
- msg: response.errorDesc,
- silence: silence2,
- result: response
- });
- }
- return response;
- } catch (error) {
- if (error instanceof Exception)
- throw error;
- throw Exception.error({ msg: `${error}`, silence, result: error });
- }
- };
- }
- var Http = class {
- static setConfig(config) {
- Object.assign(this.config, config);
- }
- static defaultConfig(config) {
- (0, import_lodash2.defaultsDeep)(this.config, config);
- }
- static create(config) {
- return createRequest(Object.assign({}, this.config, config));
- }
- static interceptor(interceptor) {
- return interceptor;
- }
- };
- Http.config = {
- timeout: 1e4,
- headers: { "Content-Type": "application/json; charset=utf-8" }
- };
- // node_modules/queenjs/src/core/module/index.ts
- var import_eventemitter3 = __toESM(require_eventemitter3());
- // node_modules/moduse/es/module.js
- var import_lodash3 = __toESM(require_lodash());
- var ModuleRoot = class {
- constructor(options) {
- __publicField(this, "options");
- __publicField(this, "use", createUse());
- this.options = options;
- }
- };
- __publicField(ModuleRoot, "create", createInstance());
- __publicField(ModuleRoot, "define", createDefine());
- function createDefine(options) {
- return function(define) {
- var _a;
- return ((_a = options == null ? void 0 : options.transform) == null ? void 0 : _a.call(options, define)) || define;
- };
- }
- function createInstance() {
- return function(options) {
- const ModuleClass = this;
- return new ModuleClass(options);
- };
- }
- function createUse(name, useOptions) {
- return function(defines, options) {
- const { optionsKey = name, transform = (useOptions == null ? void 0 : useOptions.transform) || useTransformDefault, ...ohterOptions } = options || {};
- const defs = (0, import_lodash3.defaultsDeep)({}, optionsKey ? (0, import_lodash3.get)(this.options, optionsKey) : void 0, ...defines instanceof Array ? defines.reverse() : [defines]);
- return transform.call(this, defs, ohterOptions);
- };
- }
- var useTransformDefault = function(defines) {
- Object.entries(defines).forEach(([key, value]) => {
- if (value instanceof Function) {
- defines[key] = value.bind(this);
- }
- });
- return defines;
- };
- // node_modules/queenjs/src/core/module/actions.ts
- var defineAction = function(...args) {
- let [options, actions] = args;
- if (!actions) {
- actions = options;
- options = void 0;
- }
- if (options) {
- let funcOpts = {};
- if (typeof options === "string") {
- funcOpts[options] = true;
- } else if (options instanceof Array) {
- options.forEach((key) => funcOpts[key] = true);
- } else {
- funcOpts = options;
- }
- Object.values(actions).forEach((func) => {
- Object.assign(func, funcOpts);
- });
- }
- return actions;
- };
- var createUseActions = function() {
- return createUse("actions", {
- transform: (actions) => {
- Object.entries(actions).forEach(([key, func]) => {
- this._actions[key] = {};
- Object.keys(func).forEach((optionKey) => {
- this._actions[key][optionKey] = func[optionKey];
- });
- actions[key] = async (...args) => {
- const _action = this._actions[key];
- if (_action.once && _action.result !== void 0) {
- throw Exception.error(`${key}方法在模块生命周期内只能调用一次!`);
- }
- let funcResult;
- try {
- if (false) {
- console.log(key, "start");
- }
- this._bus.emit(key, ...args);
- funcResult = func.call(this, ...args) || Promise.resolve();
- } catch (error) {
- funcResult = Promise.reject(error);
- }
- _action.result = _action.keepActive ? funcResult : null;
- funcResult.then((res) => {
- if (true) {
- console.log(`${key}:success`, res);
- }
- this._bus.emit(`${key}:success`, res);
- }).catch((err) => {
- if (true) {
- console.log(`${key}:fail`, err);
- }
- this._bus.emit(`${key}:fail`, err);
- });
- return funcResult;
- };
- });
- actions.on = (name, fn) => {
- const [key, status] = name.split(":");
- const _action = this._actions[key];
- if (status && _action.keepActive && _action.result) {
- _action.result.then(fn).catch(fn).finally(() => {
- this._bus.on(name, fn);
- });
- } else {
- this._bus.on(name, fn);
- }
- onUnmounted(() => {
- this._bus.removeListener(name, fn);
- });
- };
- return actions;
- }
- });
- };
- // node_modules/vue-moduse/es/hook.js
- var import_lodash4 = __toESM(require_lodash());
- function createHook(ModuleClass, moduleName) {
- const moduleOptionsKey = `${moduleName}_Options`;
- let isSetted = false;
- function setModule(options) {
- const defineOptions = isSetted && inject(moduleOptionsKey) || {};
- isSetted = true;
- provide(moduleOptionsKey, (0, import_lodash4.defaultsDeep)(options, defineOptions));
- }
- function initModule(options) {
- const defineOptions = isSetted && inject(moduleOptionsKey) || {};
- const currOptions = (0, import_lodash4.defaultsDeep)(options, defineOptions);
- const module = ModuleClass.create(currOptions);
- provide(moduleName, module);
- return module;
- }
- function useModule() {
- return inject(moduleName);
- }
- return {
- [`use${moduleName}`]: useModule,
- [`init${moduleName}`]: initModule,
- [`set${moduleName}`]: setModule
- };
- }
- // node_modules/queenjs/src/core/module/hook.ts
- function defineHook(name) {
- const initName = `init${name}`;
- const hooks = createHook(this, name);
- const initModule = hooks[initName];
- hooks[initName] = function(options) {
- const instance = initModule(options);
- instance.moduleName = name;
- instance.onReady();
- onUnmounted(() => {
- instance.destroy();
- });
- if (instance.components) {
- Object.entries(instance.components).forEach(([key, value]) => {
- instance.components[key] = value ? markRaw(value) : value;
- });
- }
- return instance;
- };
- return hooks;
- }
- // node_modules/queenjs/src/core/module/https.ts
- var defineHttp = createDefine();
- function createUseHttps() {
- return createUse("https", {
- transform: (https, options) => {
- var _a, _b, _c;
- Object.entries(https).forEach(([key, func]) => {
- https[key] = func.bind(https);
- });
- https.request = Http.create(
- options.httpConfig || ((_a = this.config) == null ? void 0 : _a.httpConfig) || ((_c = (_b = this.options) == null ? void 0 : _b.config) == null ? void 0 : _c.httpConfig)
- );
- Object.setPrototypeOf(https, this);
- return https;
- }
- });
- }
- // node_modules/queenjs/src/core/module/store.ts
- var defineStore = function(store) {
- return store;
- };
- function createStore(store, options) {
- const data = {}, actions = {};
- const stores = store instanceof Array ? store : [store];
- stores.forEach((store2) => {
- Object.assign(data, store2.state());
- if (store2.getters) {
- Object.entries(store2.getters).forEach(([key, value]) => {
- data[key] = computed(() => value.call(this, state));
- });
- }
- if (store2.actions) {
- Object.entries(store2.actions).forEach(([key, value]) => {
- actions[key] = value.bind(this);
- });
- }
- });
- const state = reactive((options == null ? void 0 : options.transform) ? options.transform(data) : data);
- Object.setPrototypeOf(state, actions);
- return state;
- }
- // node_modules/queenjs/src/core/module/subModule.ts
- function useSubModules(mods) {
- var _a;
- const modules = {};
- for (const key in mods) {
- modules[key] = ((_a = this.options.modules) == null ? void 0 : _a[key]) || mods[key]();
- }
- return modules;
- }
- // node_modules/queenjs/src/core/module/index.ts
- var QueenModuleRoot = class extends ModuleRoot {
- constructor() {
- super(...arguments);
- this.components = {};
- this.modules = {};
- this.moduleName = "";
- this._bus = new import_eventemitter3.default();
- this._actions = {};
- this.setConfig = createUse("config");
- this.useComponents = createUse("components", {
- transform(comps) {
- return comps;
- }
- });
- this.useModules = useSubModules;
- this.createHelper = createUse("helper");
- this.createStore = createStore;
- this.createActions = createUseActions.call(this);
- this.createHttps = createUseHttps.call(this);
- this.showModal = (...args) => {
- const [component, params, context = {}] = args;
- const modules = {};
- Object.values(context).forEach((value) => {
- if (value.moduleName) {
- modules[value.moduleName] = value;
- }
- });
- modules[this.moduleName] = this;
- return queenApi.dialog(component, params, modules);
- };
- }
- onReady() {
- }
- // 在上下文销毁时调用
- destroy() {
- if (this.controls) {
- Object.values(this.controls).forEach((control) => {
- var _a;
- (_a = control.destroy) == null ? void 0 : _a.call(control);
- });
- }
- }
- initComponents(config) {
- Object.entries(config).forEach(([key, compConf]) => {
- this.components[key] = initCompsDeep(this.components[key], compConf);
- });
- function initCompsDeep(comp, compConf) {
- if (comp.compType === "overwrite")
- return comp;
- if (!compConf)
- return () => null;
- if (compConf instanceof Function) {
- Object.keys(comp).forEach((key) => {
- if (key === "name" || key === "compType")
- return;
- compConf[key] = compConf[key] || comp[key];
- });
- return compConf;
- } else {
- const customComp = compConf.default || Object.getPrototypeOf(comp).bind(() => customComp);
- if (compConf.default) {
- customComp.compType = "overwrite";
- } else {
- Object.setPrototypeOf(customComp, Object.getPrototypeOf(comp));
- }
- Object.keys(comp).forEach((key) => {
- if (key === "name" || key === "compType")
- return;
- customComp[key] = customComp[key] || (compConf[key] ? initCompsDeep(comp[key], compConf[key]) : comp[key]);
- });
- return customComp;
- }
- }
- }
- };
- // createInstance中可声明的泛型字段在模块中也需要声明
- QueenModuleRoot.create = createInstance();
- QueenModuleRoot.hook = defineHook;
- QueenModuleRoot.helper = createDefine();
- QueenModuleRoot.action = defineAction;
- QueenModuleRoot.http = defineHttp;
- QueenModuleRoot.store = defineStore;
- // node_modules/queenjs/src/core/module/control.ts
- var ModuleControl = class {
- constructor(module) {
- this.module = module;
- }
- get store() {
- return this.module.store;
- }
- get https() {
- return this.module.https;
- }
- get actions() {
- return this.module.actions;
- }
- get helper() {
- return this.module.helper;
- }
- get controls() {
- return this.module.controls;
- }
- destroy() {
- }
- };
- // node_modules/queenjs/src/core/state/index.ts
- var stateWatchers = /* @__PURE__ */ new WeakMap();
- var StateRoot = class {
- constructor() {
- this.isProxy = false;
- this.reactive = () => {
- return createReactive(this);
- };
- }
- computed(fn) {
- return fn;
- }
- };
- function createReactive(obj) {
- const data = {};
- for (const name in obj) {
- if (name === "reactive" || name === "computed" || name === "proxy")
- continue;
- const objItem = obj[name];
- if (objItem instanceof Function) {
- data[name] = computed(() => objItem(state));
- } else {
- data[name] = objItem;
- }
- }
- const state = reactive(data);
- return state;
- }
- function createProxy(target, paths, getRoot) {
- if (typeof target === "object" && !isProxy(target) && !(target instanceof Function) && target !== null) {
- for (const key in target) {
- const proxy = createProxy(target[key], [...paths, key], getRoot);
- target[key] = proxy;
- }
- return new Proxy(target, {
- get: (target2, key, receiver) => {
- if (key == "isProxy") {
- return true;
- }
- return Reflect.get(target2, key, receiver);
- },
- ...target instanceof Array ? arrayHandler(paths, getRoot) : objectHandler(paths, getRoot)
- });
- } else {
- return target;
- }
- }
- function arrayHandler(paths, getRoot) {
- let removeIndex = null;
- let removeOld = null;
- return {
- set: (target, key, value, receiver) => {
- if (key === "length") {
- removeIndex = null;
- removeOld = null;
- } else if (!removeIndex) {
- if (!value.isProxy) {
- const pathArr = [...paths, key];
- if (+key == target.length) {
- emit("add", pathArr, value, null, getRoot);
- } else {
- emit("set", pathArr, value, target[+key], getRoot);
- }
- value = createProxy(value, pathArr, getRoot);
- } else {
- removeIndex = key;
- removeOld = target[+key];
- }
- }
- return Reflect.set(target, key, value, receiver);
- },
- deleteProperty: (target, key) => {
- if (!removeIndex) {
- removeIndex = key;
- removeOld = target[+key];
- }
- emit("remove", [...paths, removeIndex], null, removeOld, getRoot);
- return Reflect.deleteProperty(target, key);
- }
- };
- }
- function objectHandler(paths, getRoot) {
- return {
- set: (target, key, value, receiver) => {
- const actionType = target.hasOwnProperty(key) ? "set" : "add";
- emit(actionType, [...paths, key], value, target[key], getRoot);
- return Reflect.set(
- target,
- key,
- createProxy(value, [...paths, key], getRoot),
- receiver
- );
- },
- deleteProperty: (target, key) => {
- emit("remove", [...paths, key], null, target[key], getRoot);
- return Reflect.deleteProperty(target, key);
- }
- };
- }
- function emit(type, paths, val, old, getRoot) {
- const handlers = stateWatchers.get(getRoot());
- handlers == null ? void 0 : handlers.forEach((handle) => handle(type, paths, val, old));
- }
- function createProxyEffect(target, handler) {
- const handlers = stateWatchers.get(target);
- if (handlers) {
- handlers.add(handler);
- } else {
- stateWatchers.set(target, /* @__PURE__ */ new Set([handler]));
- }
- return {
- stop() {
- const handlers2 = stateWatchers.get(target);
- handlers2 == null ? void 0 : handlers2.delete(handler);
- }
- };
- }
- export {
- Bus,
- DefaultUI,
- Effect,
- EventHandle,
- Events,
- Exception,
- Http,
- ModuleControl,
- QueenModuleRoot as ModuleRoot,
- StateRoot,
- createDictArr,
- createDictMap,
- createDictStorage,
- createProxy,
- createProxyEffect,
- defineUI,
- queenApi,
- useModal
- };
- //# sourceMappingURL=queenjs.js.map
|