@cloudbase/js-sdk 3.3.4 → 3.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/miniprogram_dist/app.js +1 -1
- package/miniprogram_dist/index.js +1 -1
- package/miniprogram_dist/model.js +1 -1
- package/miniprogram_dist/mysql.js +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cloudbase_model",[],t):"object"==typeof exports?exports.cloudbase_model=t():e.cloudbase_model=t()}("undefined"!=typeof window?window:this,(()=>(()=>{var e={530:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(679),t)},276:function(e,t){!function(e){"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))((function(t,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function i(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,i)}c((r=r.apply(e,[])).next())}))}function o(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var a=function(e){function n(t,n){var r=e.call(this,t)||this;return r.name="WxCloudSDKError",r.code=null==n?void 0:n.code,r.requestId=null==n?void 0:n.requestId,r.originError=null==n?void 0:n.originError,r}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(Error);function i(){return"undefined"!=typeof window&&window||"undefined"!=typeof globalThis&&globalThis}function c(){try{var e=i();if(!e)return;return"undefined"==typeof wx?i().location.href:e.__wxRoute}catch(e){}}var s=function(e){var t=e.dataSourceName,n=e.methodName,s=e.params,u=e.realMethodName,l=e.callFunction,d=e.envType,f=void 0===d?"prod":d,p=e.mode;return r(void 0,0,void 0,(function(){var e,r,d,h,y,v;return o(this,(function(o){switch(o.label){case 0:e={data:{},requestId:""},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l({name:"lowcode-datasource",data:{dataSourceName:t,methodName:n,params:s,userAgent:(b=i(),(null==b?void 0:b.navigator)?b.navigator.userAgent:"undefined"!=typeof wx&&wx.getSystemInfo?(wx.getSystemInfo({success:function(e){e&&(m=["brand","model","version","system","platform","SDKVersion","language"].map((function(t){return"".concat(t,": ").concat(e[t])})).join(", "))}}),m):void 0),referrer:c(),"x-sdk-version":"1.5.0",envType:f,mode:p}})];case 2:if(r=o.sent(),d=(null===(y=null==r?void 0:r.result)||void 0===y?void 0:y.requestId)||(null==r?void 0:r.requestId)||(null==r?void 0:r.requestID),null==r?void 0:r.result.code)throw new a("【错误】".concat(null==r?void 0:r.result.message,"\n【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(u,"\n【错误码】").concat(null==r?void 0:r.result.code,"\n【请求ID】").concat(d||"N/A"),{code:null==r?void 0:r.result.code,requestId:d});return e.data=(null===(v=null==r?void 0:r.result)||void 0===v?void 0:v.data)||{},e.requestId=d,[3,4];case 3:throw"WxCloudSDKError"===(h=o.sent()).name?h:(console.log(h),new a("【错误】".concat(h.message,"\n 【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(u,"\n 【请求ID】N/A"),{code:"UnknownError",originError:h}));case 4:return[2,e]}var m,b}))}))},u=function(e){var t=e.sql,n=e.params,a=e.config,i=e.callFunction,c=e.unsafe,u=void 0!==c&&c;return r(void 0,0,void 0,(function(){return o(this,(function(e){return[2,s({realMethodName:"$runSQL",methodName:"callWedaApi",params:{action:"RunMysqlCommand",data:{sqlTemplate:t,config:a,parameter:u?"":Object.entries(n||{}).reduce((function(e,t){var n=t[0],r=t[1];if(void 0!==r){var o="OBJECT";switch(typeof r){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(r)?"ARRAY":"OBJECT"}e.push({key:n,type:o,value:"STRING"===o?r:JSON.stringify(r)})}return e}),[])||[]}},callFunction:i,mode:"sdk"})]}))}))},l=function(e){return{$runSQL:function(t,a,i){return r(this,0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,u({sql:t,params:a,config:n(n({},i),{preparedStatements:!0}),callFunction:e})];case 1:return[2,r.sent()]}}))}))},$runSQLRaw:function(t,a){return r(this,0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,u({sql:t,params:[],config:n(n({},a),{preparedStatements:!1}),callFunction:e})];case 1:return[2,r.sent()]}}))}))}}},d={create:{methodName:"wedaCreateV2"},createMany:{methodName:"wedaBatchCreateV2"},update:{methodName:"wedaUpdateV2"},upsert:{methodName:"wedaUpsertV2"},updateMany:{methodName:"wedaBatchUpdateV2"},delete:{methodName:"wedaDeleteV2"},deleteMany:{methodName:"wedaBatchDeleteV2"},get:{methodName:"wedaGetItemV2",defaultParams:{filter:{where:{}},select:{$master:!0}}},list:{methodName:"wedaGetRecordsV2",defaultParams:{filter:{where:{}},select:{$master:!0}}}},f=function(e){var t=l(e);return new Proxy({},{get:function(i,c){if("string"==typeof c)return Object.prototype.hasOwnProperty.call(t,c)?t[c]:function(e,t){return new Proxy({},{get:function(i,c){var u=d[c];if(!u){var l=new Error("不支持的操作: ".concat(c));throw new a(l.message||"Unknown error occurred",{originError:l,code:"NotSupported",requestId:"N/A"})}return function(a){return r(void 0,0,void 0,(function(){var r,i,l,d,f;return o(this,(function(o){switch(o.label){case 0:return r=n(n({},u.defaultParams||{}),a||{}),[4,s({callFunction:t,dataSourceName:e,methodName:u.methodName,realMethodName:c,params:r,envType:null==a?void 0:a.envType})];case 1:return i=o.sent(),l={data:{}},d=u.responseKey,l.data=d?null===(f=null==i?void 0:i.data)||void 0===f?void 0:f[d]:null==i?void 0:i.data,[2,l]}}))}))}}})}(c,e)}})},p={filter:{where:{}},select:{$master:!0}};function h(e){return{getUrl:function(t){return"".concat(t,"/").concat(e)},method:"post"}}var y={get:n(n({},h("get")),{defaultParams:n({},p)}),list:n(n({},h("list")),{defaultParams:n({},p)}),create:h("create"),createMany:h("createMany"),update:n(n({},h("update")),{method:"put"}),updateMany:n(n({},h("updateMany")),{method:"put"}),upsert:h("upsert"),delete:h("delete"),deleteMany:h("deleteMany")},v="Unknown error occurred",m="NotSupported",b=function(e,t,n,r){var o=l(e);return new Proxy({},{get:function(e,a){if("string"==typeof a)return Object.prototype.hasOwnProperty.call(o,a)?o[a]:g(n,a,t,r)}})},w=function(e,t,n,r,o){return new a("【错误】".concat(e,"\n【操作】调用 models.").concat(t,".").concat(n,"\n【错误码】").concat(r,"\n【请求ID】").concat(o),{code:r,requestId:o})},g=function(e,t,i,c){return new Proxy({},{get:function(s,u){if("runSQLTemplate"!==u){var l=y[u];if(!l){var d=new Error("不支持的操作: ".concat(u));throw new a(d.message||v,{originError:d,code:m,requestId:"N/A"})}return function(n){return void 0===n&&(n={}),r(void 0,0,void 0,(function(){var r,c,s,d,f,p,h,y,m,b;return o(this,(function(o){switch(o.label){case 0:r=l.getUrl,c=l.method,s=l.defaultParams,d=void 0===s?{}:s,f=Object.assign({},d,n),p="pre"===f.envType?"pre":"prod",h=[e,p,r(t)].join("/"),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i({url:h,body:JSON.stringify(f),method:c})];case 2:if((y=o.sent()).code)throw w(null==y?void 0:y.message,t,u,null==y?void 0:y.code,null==y?void 0:y.requestId);return"get"===u&&Object.assign(y,{data:null!==(b=y.data.record)&&void 0!==b?b:y.data}),[2,y];case 3:throw m=o.sent(),new a((null==m?void 0:m.message)||v,{originError:m});case 4:return[2]}}))}))}}if(!(null==c?void 0:c.sqlBaseUrl))throw d=new Error("不支持的操作: ".concat(u)),new a(d.message||v,{originError:d,code:m,requestId:"N/A"});return function(e){return r(void 0,0,void 0,(function(){var r,s,l,d,f,p,h,y,m,b,g,O,S,_,E,j;return o(this,(function(o){switch(o.label){case 0:r=e.params,s=e.templateName,l=e.envType,d="pre"===l?"pre":"prod",f=[c.sqlBaseUrl,d,s,"run"].join("/"),p=Object.entries(r||{}).reduce((function(e,t){var n=t[0],r=t[1];if(void 0!==r){var o="OBJECT";switch(typeof r){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(r)?"ARRAY":"OBJECT"}e.push({key:n,type:o,value:"STRING"===o?r:JSON.stringify(r)})}return e}),[]),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i({url:f,body:JSON.stringify({parameter:p}),method:"POST"})];case 2:if(h=o.sent(),null===(m=null==h?void 0:h.Response)||void 0===m?void 0:m.Error)throw w(null===(g=null===(b=null==h?void 0:h.Response)||void 0===b?void 0:b.Error)||void 0===g?void 0:g.Message,t,u,null===(S=null===(O=null==h?void 0:h.Response)||void 0===O?void 0:O.Error)||void 0===S?void 0:S.Code,null===(_=null==h?void 0:h.Response)||void 0===_?void 0:_.RequestId);return[2,n(n({},null!==(E=null==h?void 0:h.Response)&&void 0!==E?E:{}),{data:null===(j=null==h?void 0:h.Response)||void 0===j?void 0:j.Data})];case 3:throw y=o.sent(),new a((null==y?void 0:y.message)||v,{originError:y});case 4:return[2]}}))}))}}})};function O(e){if(!e)throw new Error("cloud is required");if(!e.callFunction)throw new Error("cloud.callFunction is required");var t=f(e.callFunction.bind(e));return e.models=t,e}var S={init:O,generateHTTPClient:b};e.default=S,e.generateHTTPClient=b,e.init=O,Object.defineProperty(e,"__esModule",{value:!0})}(t)},679:(e,t,n)=>{"use strict";n.r(t),n.d(t,{lazyGetEntity:()=>f,registerModel:()=>v});var r=n(276),o=n(142),a={};for(const e in r)["default","lazyGetEntity","registerModel"].indexOf(e)<0&&(a[e]=()=>r[e]);n.d(t,a);var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},u=o.U3.yE,l="models",d=new WeakMap;function f(e){return new Proxy({},{get:function(t,n){var o=e.getEndPointWithKey("GATEWAY"),a=o.BASE_URL,u=o.PROTOCOL,l=i(i({},e),{BASE_URL:a,PROTOCOL:u}),f=d.get(l);return f||(f=function(e){var t=this,n=e.callFunction.bind(e),o=e.request.fetch.bind(e.request),a=e.getEndPointWithKey("GATEWAY"),u=a.BASE_URL,l=a.PROTOCOL,d="".concat(l).concat(u,"/model"),f="".concat(l).concat(u,"/sql"),p=(0,r.generateHTTPClient)(n,(function(e){return c(t,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,o(i(i({},e),{headers:i({"Content-Type":"application/json"},e.headers)}))];case 1:return[4,t.sent().data];case 2:return[2,t.sent()]}}))}))}),d,{sqlBaseUrl:f});return p}(e),d.set(l,f)),f[n]}})}var p="cloudbase_init",h=new u;h.on(p,(function(e){var t=e.data;Object.assign(t,{models:f(t)})}));var y={name:l,namespace:l,entity:new Proxy({},{get:function(e,t){console.warn("【deprecated】Accessing Cloudbase.prototype.models.".concat(t,"."))}}),injectEvents:{bus:h,events:[p]}};try{cloudbase.registerComponent(y)}catch(e){}function v(e){try{e.registerComponent(y)}catch(e){console.warn(e)}}try{window.registerModel=v}catch(e){}},142:(e,t,n)=>{"use strict";n.d(t,{U3:()=>r});var r={};n.r(r),n.d(r,{yE:()=>_});var o="@cloudbase/js-sdk";function a(){return o}var i,c="INVALID_OPERATION",s="OPERATION_FAIL";!function(e){e.local="local",e.none="none",e.session="session"}(i||(i={}));function u(e,t){console.warn("[".concat(a(),"][").concat(e,"]:").concat(t))}var l,d,f=(l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},l(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},h=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}s((r=r.apply(e,t||[])).next())}))},y=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};!function(e){function t(t){var n=e.call(this)||this,r=t.timeout,o=t.timeoutMsg,a=t.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=a||["get","post","upload","download"],n}f(t,e),t.prototype.get=function(e){return this.request(p(p({},e),{method:"get"}),this.restrictedMethods.includes("get"))},t.prototype.post=function(e){return this.request(p(p({},e),{method:"post"}),this.restrictedMethods.includes("post"))},t.prototype.put=function(e){return this.request(p(p({},e),{method:"put"}))},t.prototype.upload=function(e){var t=e.data,n=e.file,r=e.name,o=e.method,a=e.headers,i=void 0===a?{}:a,c={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",s=new FormData;return"post"===c?(Object.keys(t).forEach((function(e){s.append(e,t[e])})),s.append("key",r),s.append("file",n),this.request(p(p({},e),{data:s,method:c}),this.restrictedMethods.includes("upload"))):this.request(p(p({},e),{method:"put",headers:i,body:n}),this.restrictedMethods.includes("upload"))},t.prototype.download=function(e){return h(this,void 0,void 0,(function(){var t,n,r,o;return y(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(p(p({},e),{headers:{},responseType:"blob"}))];case 1:return t=a.sent().data,n=window.URL.createObjectURL(new Blob([t])),r=decodeURIComponent(new URL(e.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise((function(t){t({statusCode:200,tempFilePath:e.url})}))]}}))}))},t.prototype.fetch=function(e){var t;return h(this,void 0,void 0,(function(){var n,r,o,a,i,c,s,u,l,d,f,v,m,b=this;return y(this,(function(w){switch(w.label){case 0:return n=new AbortController,r=e.url,o=e.enableAbort,a=void 0!==o&&o,i=e.stream,c=void 0!==i&&i,s=e.signal,u=e.timeout,l=e.shouldThrowOnError,d=void 0===l||l,f=null!=u?u:this.timeout,s&&(s.aborted&&n.abort(),s.addEventListener("abort",(function(){return n.abort()}))),v=null,a&&f&&(v=setTimeout((function(){console.warn(b.timeoutMsg),n.abort(new Error(b.timeoutMsg))}),f)),[4,fetch(r,p(p({},e),{signal:n.signal})).then((function(e){return h(b,void 0,void 0,(function(){var t,n,r;return y(this,(function(o){switch(o.label){case 0:return clearTimeout(v),d?e.ok?(t=e,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,e.json()];case 2:t=r.apply(n,[o.sent()]),o.label=3;case 3:return[2,t];case 4:return[2,e]}}))}))})).catch((function(e){if(clearTimeout(v),d)return Promise.reject(e)}))];case 1:return m=w.sent(),[2,{data:c?m.body:(null===(t=m.headers.get("content-type"))||void 0===t?void 0:t.includes("application/json"))?m.json():m.text(),statusCode:m.status,header:m.headers}]}}))}))},t.prototype.request=function(e,t){var n=this;void 0===t&&(t=!1);var r=String(e.method).toLowerCase()||"get";return new Promise((function(o){var a,i,c,s=e.url,u=e.headers,l=void 0===u?{}:u,d=e.data,f=e.responseType,p=e.withCredentials,h=e.body,y=e.onUploadProgress,v=function(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),o="";return Object.keys(n).forEach((function(e){""===o?!r&&(t+="?"):o+="&",o+="".concat(e,"=").concat(encodeURIComponent(n[e]))})),/^http(s)?:\/\//.test(t+=o)?t:"".concat(e).concat(t)}("https:",s,"get"===r?d:{}),m=new XMLHttpRequest;m.open(r,v),f&&(m.responseType=f),Object.keys(l).forEach((function(e){m.setRequestHeader(e,l[e])})),y&&m.upload.addEventListener("progress",y),m.onreadystatechange=function(){var e={};if(4===m.readyState){var t=m.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};t.forEach((function(e){var t=e.split(": "),r=t.shift().toLowerCase(),o=t.join(": ");n[r]=o})),e.header=n,e.statusCode=m.status;try{e.data="blob"===f?m.response:JSON.parse(m.responseText)}catch(t){e.data="blob"===f?m.response:m.responseText}clearTimeout(a),o(e)}},t&&n.timeout&&(a=setTimeout((function(){console.warn(n.timeoutMsg),m.abort()}),n.timeout)),c=d,i="[object FormData]"===Object.prototype.toString.call(c)?d:"application/x-www-form-urlencoded"===l["content-type"]?function(e){void 0===e&&(e={});var t=[];return Object.keys(e).forEach((function(n){t.push("".concat(n,"=").concat(encodeURIComponent(e[n])))})),t.join("&")}(d):h||(d?JSON.stringify(d):void 0),p&&(m.withCredentials=!0),m.send(i)}))}}((function(){})),function(e){e.WEB="web",e.WX_MP="wx_mp"}(d||(d={}));var v=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}s((r=r.apply(e,t||[])).next())}))},b=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},w=function(e){function t(t){var n=e.call(this)||this;return n.root=t,t.tcbCacheObject||(t.tcbCacheObject={}),n}return v(t,e),t.prototype.setItem=function(e,t){this.root.tcbCacheObject[e]=t},t.prototype.getItem=function(e){return this.root.tcbCacheObject[e]},t.prototype.removeItem=function(e){delete this.root.tcbCacheObject[e]},t.prototype.clear=function(){delete this.root.tcbCacheObject},t}((function(){}));!function(){function e(e){this.keys={};var t=e.persistence,n=e.platformInfo,r=void 0===n?{}:n,o=e.keys,a=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||t,this.storage=function(e,t){switch(e){case"local":default:return t.localStorage?t.localStorage:(u("INVALID_PARAMS","localStorage is not supported on current platform"),new w(t.root));case"none":return new w(t.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=a)}Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(e,t,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:t};this.storage.setItem(e,JSON.stringify(r))}catch(e){throw new Error(JSON.stringify({code:s,msg:"[".concat(a(),"][").concat(s,"]setStore failed"),info:e}))}}else u(c,"current platform's storage is asynchronous, please use setStoreAsync insteed")},e.prototype.setStoreAsync=function(e,t,n){return m(this,void 0,void 0,(function(){var r;return b(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:t},[4,this.storage.setItem(e,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},e.prototype.getStore=function(e,t){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===n?void 0:n.tcb_token))return{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return""}catch(e){return""}t=t||"localCachev1";var r=this.storage.getItem(e);return r&&r.indexOf(t)>=0?JSON.parse(r).content:""}u(c,"current platform's storage is asynchronous, please use getStoreAsync insteed")},e.prototype.getStoreAsync=function(e,t){var n;return m(this,void 0,void 0,(function(){var r;return b(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===n?void 0:n.tcb_token))return[2,{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,""]}catch(e){return[2,""]}return t=t||"localCachev1",[4,this.storage.getItem(e)];case 1:return(r=o.sent())&&r.indexOf(t)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},e.prototype.removeStore=function(e){"async"!==this.mode?this.storage.removeItem(e):u(c,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},e.prototype.removeStoreAsync=function(e){return m(this,void 0,void 0,(function(){return b(this,(function(t){switch(t.label){case 0:return[4,this.storage.removeItem(e)];case 1:return t.sent(),[2]}}))}))}}();var g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),O=function(e,t){this.data=t||null,this.name=e},S=function(e){function t(t,n){var r=e.call(this,"error",{error:t,data:n})||this;return r.error=t,r}return g(t,e),t}(O),_=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this.listeners),this},e.prototype.off=function(e,t){return function(e,t,n){if(null==n?void 0:n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}(e,t,this.listeners),this},e.prototype.fire=function(e,t){if(e instanceof S)return console.error(e.error),this;var n="string"==typeof e?new O(e,t||{}):e,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,a=this.listeners[r]?function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],this.listeners[r],!0):[];o<a.length;o++)a[o].call(this,n)}return this},e.prototype.listens=function(e){return this.listeners[e]&&this.listeners[e].length>0},e}();function E(e){this.message=e}function j(e){this.message=e}new _,new _,"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Firefox"),E.prototype=new Error,E.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),j.prototype=new Error,j.prototype.name="InvalidTokenError"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(530)})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase_model",[],e):"object"==typeof exports?exports.cloudbase_model=e():t.cloudbase_model=e()}("undefined"!=typeof window?window:this,(()=>(()=>{var t={530:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(679),e)},679:(t,e,r)=>{"use strict";r.r(e),r.d(e,{lazyGetEntity:()=>f,registerModel:()=>y});var n=r(233),o=r(142),i={};for(const t in n)["default","lazyGetEntity","registerModel"].indexOf(t)<0&&(i[t]=()=>n[t]);r.d(e,i);var a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)},s=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function s(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},c=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},u=o.U3.yE,l="models",h=new WeakMap;function f(t){return new Proxy({},{get:function(e,r){var o=t.getEndPointWithKey("GATEWAY"),i=o.BASE_URL,u=o.PROTOCOL,l=a(a({},t),{BASE_URL:i,PROTOCOL:u}),f=h.get(l);return f||(f=function(t){var e=this,r=t.callFunction.bind(t),o=t.request.fetch.bind(t.request),i=t.getEndPointWithKey("GATEWAY"),u=i.BASE_URL,l=i.PROTOCOL,h="".concat(l).concat(u,"/model"),f="".concat(l).concat(u,"/sql"),p=(0,n.generateHTTPClient)(r,(function(t){return s(e,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return[4,o(a(a({},t),{headers:a({"Content-Type":"application/json"},t.headers)}))];case 1:return[4,e.sent().data];case 2:return[2,e.sent()]}}))}))}),h,{sqlBaseUrl:f});return p}(t),h.set(l,f)),f[r]}})}var p="cloudbase_init",d=new u;d.on(p,(function(t){var e=t.data;Object.assign(e,{models:f(e)})}));var v={name:l,namespace:l,entity:new Proxy({},{get:function(t,e){console.warn("【deprecated】Accessing Cloudbase.prototype.models.".concat(e,"."))}}),injectEvents:{bus:d,events:[p]}};try{cloudbase.registerComponent(v)}catch(t){}function y(t){try{t.registerComponent(v)}catch(t){console.warn(t)}}try{window.registerModel=y}catch(t){}},233:function(t,e,r){!function(t){"use strict";var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},e(t,r)};function n(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)};function i(t,e,r,n){return new(r||(r=Promise))((function(e,o){function i(t){try{s(n.next(t))}catch(t){o(t)}}function a(t){try{s(n.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(t){t(n)}))).then(i,a)}s((n=n.apply(t,[])).next())}))}function a(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var s=function(t){function e(e,r){var n=t.call(this,e)||this;return n.name="WxCloudSDKError",n.code=null==r?void 0:r.code,n.requestId=null==r?void 0:r.requestId,n.originError=null==r?void 0:r.originError,n}return n(e,t),e}(Error);function c(){return"undefined"!=typeof window&&window||"undefined"!=typeof globalThis&&globalThis}function u(){try{var t=c();if(!t)return;return"undefined"==typeof wx?c().location.href:t.__wxRoute}catch(t){}}var l=function(t){var e=t.dataSourceName,r=t.methodName,n=t.params,o=t.realMethodName,l=t.callFunction,h=t.envType,f=void 0===h?"prod":h,p=t.mode;return t.cloud,i(void 0,0,void 0,(function(){var t,i,h,d,v,y;return a(this,(function(a){switch(a.label){case 0:t={data:{},requestId:""},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,l({name:"lowcode-datasource",data:{dataSourceName:e,methodName:r,params:n,userAgent:(g=c(),(null==g?void 0:g.navigator)?g.navigator.userAgent:"undefined"!=typeof wx&&wx.getSystemInfo?(wx.getSystemInfo({success:function(t){t&&(m=["brand","model","version","system","platform","SDKVersion","language"].map((function(e){return"".concat(e,": ").concat(t[e])})).join(", "))}}),m):void 0),referrer:u(),"x-sdk-version":"1.8.8",envType:f,mode:p}})];case 2:if(i=a.sent(),h=(null===(v=null==i?void 0:i.result)||void 0===v?void 0:v.requestId)||(null==i?void 0:i.requestId)||(null==i?void 0:i.requestID),null==i?void 0:i.result.code)throw new s("【错误】".concat(null==i?void 0:i.result.message,"\n【操作】调用 models.").concat(e?"".concat(e,"."):"").concat(o,"\n【错误码】").concat(null==i?void 0:i.result.code,"\n【请求ID】").concat(h||"N/A"),{code:null==i?void 0:i.result.code,requestId:h});return t.data=(null===(y=null==i?void 0:i.result)||void 0===y?void 0:y.data)||{},t.requestId=h,[3,4];case 3:throw"WxCloudSDKError"===(d=a.sent()).name?d:(console.log(d),new s("【错误】".concat(d.message,"\n 【操作】调用 models.").concat(e?"".concat(e,"."):"").concat(o,"\n 【请求ID】N/A"),{code:"UnknownError",originError:d}));case 4:return[2,t]}var m,g}))}))},h=function(t){var e=t.sql,r=t.params,n=t.config,o=t.callFunction,s=t.unsafe,c=void 0!==s&&s,u=t.cloud;return i(void 0,0,void 0,(function(){return a(this,(function(t){return[2,l({realMethodName:"$runSQL",methodName:"callWedaApi",params:{action:"RunMysqlCommand",data:{sqlTemplate:e,config:n,parameter:c?"":Object.entries(r||{}).reduce((function(t,e){var r=e[0],n=e[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}t.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return t}),[])||[]}},callFunction:o,mode:"sdk",cloud:u})]}))}))},f=function(t,e){return{$runSQL:function(r,n,s){return i(this,0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,h({sql:r,params:n,config:o(o({},s),{preparedStatements:!0}),callFunction:t,cloud:e})];case 1:return[2,i.sent()]}}))}))},$runSQLRaw:function(r,n){return i(this,0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,h({sql:r,params:[],config:o(o({},n),{preparedStatements:!1}),callFunction:t,cloud:e})];case 1:return[2,i.sent()]}}))}))}}},p={filter:{where:{}},select:{$master:!0}};function d(t){return{getUrl:function(e){return"".concat(e,"/").concat(t)},method:"post"}}var v={get:o(o({},d("get")),{defaultParams:o({},p)}),list:o(o({},d("list")),{defaultParams:o({},p)}),create:d("create"),createMany:d("createMany"),update:o(o({},d("update")),{method:"put"}),updateMany:o(o({},d("updateMany")),{method:"put"}),upsert:d("upsert"),delete:d("delete"),deleteMany:d("deleteMany")},y="Unknown error occurred",m="NotSupported",g=function(t,e,r,n){var o=f(t,null==n?void 0:n.cloud);return new Proxy({},{get:function(t,i){if("string"==typeof i)return Object.prototype.hasOwnProperty.call(o,i)?o[i]:w(r,i,e,n)}})},b=function(t,e,r,n,o){return new s("【错误】".concat(t,"\n【操作】调用 models.").concat(e,".").concat(r,"\n【错误码】").concat(n,"\n【请求ID】").concat(o),{code:n,requestId:o})},w=function(t,e,r,n){var c=new Proxy({},{get:function(c,u){if("runSQLTemplate"!==u){var l=v[u];if(!l){var h=new Error("不支持的操作: ".concat(u));throw new s(h.message||y,{originError:h,code:m,requestId:"N/A"})}return function(n){return void 0===n&&(n={}),i(void 0,0,void 0,(function(){var o,i,c,h,f,p,d,v,m,g;return a(this,(function(a){switch(a.label){case 0:o=l.getUrl,i=l.method,c=l.defaultParams,h=void 0===c?{}:c,f=Object.assign({},h,n),p="pre"===f.envType?"pre":"prod",d=[t,p,o(e)].join("/"),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:d,body:JSON.stringify(f),method:i})];case 2:if((v=a.sent()).code)throw b(null==v?void 0:v.message,e,u,null==v?void 0:v.code,null==v?void 0:v.requestId);return"get"===u&&Object.assign(v,{data:null!==(g=v.data.record)&&void 0!==g?g:v.data}),[2,v];case 3:throw m=a.sent(),new s((null==m?void 0:m.message)||y,{originError:m});case 4:return[2]}}))}))}}if(!(null==n?void 0:n.sqlBaseUrl))throw h=new Error("不支持的操作: ".concat(u)),new s(h.message||y,{originError:h,code:m,requestId:"N/A"});return function(t){return i(void 0,0,void 0,(function(){var i,c,l,h,f,p,d,v,m,g,w,P,O,S,j,E;return a(this,(function(a){switch(a.label){case 0:i=t.params,c=t.templateName,l=t.envType,h="pre"===l?"pre":"prod",f=[n.sqlBaseUrl,h,c,"run"].join("/"),p=Object.entries(i||{}).reduce((function(t,e){var r=e[0],n=e[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}t.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return t}),[]),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:f,body:JSON.stringify({parameter:p}),method:"POST"})];case 2:if(d=a.sent(),null===(m=null==d?void 0:d.Response)||void 0===m?void 0:m.Error)throw b(null===(w=null===(g=null==d?void 0:d.Response)||void 0===g?void 0:g.Error)||void 0===w?void 0:w.Message,e,u,null===(O=null===(P=null==d?void 0:d.Response)||void 0===P?void 0:P.Error)||void 0===O?void 0:O.Code,null===(S=null==d?void 0:d.Response)||void 0===S?void 0:S.RequestId);return[2,o(o({},null!==(j=null==d?void 0:d.Response)&&void 0!==j?j:{}),{data:null===(E=null==d?void 0:d.Response)||void 0===E?void 0:E.Data})];case 3:throw v=a.sent(),new s((null==v?void 0:v.message)||y,{originError:v});case 4:return[2]}}))}))}}});return c},P={create:{methodName:"wedaCreateV2"},createMany:{methodName:"wedaBatchCreateV2"},update:{methodName:"wedaUpdateV2"},upsert:{methodName:"wedaUpsertV2"},updateMany:{methodName:"wedaBatchUpdateV2"},delete:{methodName:"wedaDeleteV2"},deleteMany:{methodName:"wedaBatchDeleteV2"},get:{methodName:"wedaGetItemV2",defaultParams:{filter:{where:{}},select:{$master:!0}}},list:{methodName:"wedaGetRecordsV2",defaultParams:{filter:{where:{}},select:{$master:!0}}}},O=function(t,e){var r=f(t,e);return new Proxy({},{get:function(n,c){if("string"==typeof c)return Object.prototype.hasOwnProperty.call(r,c)?r[c]:function(t,e,r){return new Proxy({},{get:function(n,c){var u=P[c];if(!u){var h=new Error("不支持的操作: ".concat(c));throw new s(h.message||"Unknown error occurred",{originError:h,code:"NotSupported",requestId:"N/A"})}return function(n){return i(void 0,0,void 0,(function(){var i,s,h,f,p;return a(this,(function(a){switch(a.label){case 0:return i=o(o({},u.defaultParams||{}),n||{}),[4,l({callFunction:e,dataSourceName:t,methodName:u.methodName,realMethodName:c,params:i,envType:null==n?void 0:n.envType,cloud:r})];case 1:return s=a.sent(),h={data:{}},f=u.responseKey,h.data=f?null===(p=null==s?void 0:s.data)||void 0===p?void 0:p[f]:null==s?void 0:s.data,[2,h]}}))}))}}})}(c,t,e)}})},S=function(){function t(t){var e=this;this.map=new Map,t&&(t instanceof Headers?t.forEach((function(t,r){e.append(r,t)})):Array.isArray(t)?t.forEach((function(t){var r=t[0],n=t[1];e.append(r,n)})):"object"==typeof t&&Object.keys(t).forEach((function(r){e.append(r,t[r])})))}return t.prototype.append=function(t,e){var r=t.toLowerCase(),n=this.map.get(r);n?this.map.set(r,"".concat(n,", ").concat(e)):this.map.set(r,String(e))},t.prototype.delete=function(t){this.map.delete(t.toLowerCase())},t.prototype.forEach=function(t,e){var r=this;this.map.forEach((function(n,o){t.call(e,n,o,r)}))},t.prototype.get=function(t){return this.map.get(t.toLowerCase())||null},t.prototype.has=function(t){return this.map.has(t.toLowerCase())},t.prototype.set=function(t,e){this.map.set(t.toLowerCase(),String(e))},t.prototype.entries=function(){return this.map.entries()},t.prototype.keys=function(){return this.map.keys()},t.prototype.values=function(){return this.map.values()},t.prototype.getSetCookie=function(){var t=[];return this.map.forEach((function(e,r){"set-cookie"===r&&t.push(e)})),t},t.prototype.toJSON=function(){var t={};return this.map.forEach((function(e,r){t[r]=e})),t},t.prototype[Symbol.iterator]=function(){return this.entries()},t}();"object"!=typeof globalThis||globalThis.Headers||(globalThis.Headers=S);var j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};var E,A,k=function(t){try{return!!t()}catch(t){return!0}},T=!k((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),R=T,I=Function.prototype,x=I.call,C=R&&I.bind.bind(x,x),U=R?C:function(t){return function(){return x.apply(t,arguments)}},L=U,_=L({}.toString),q=L("".slice),N=function(t){return q(_(t),8,-1)},M=k,B=N,F=Object,H=U("".split),D=M((function(){return!F("z").propertyIsEnumerable(0)}))?function(t){return"String"===B(t)?H(t,""):F(t)}:F,G=function(t){return null==t},z=G,J=TypeError,W=function(t){if(z(t))throw new J("Can't call method on "+t);return t},V=D,$=W,K=function(t){return V($(t))},Q={},Y=function(t){return t&&t.Math===Math&&t},X=Y("object"==typeof globalThis&&globalThis)||Y("object"==typeof window&&window)||Y("object"==typeof self&&self)||Y("object"==typeof j&&j)||Y("object"==typeof j&&j)||function(){return this}()||Function("return this")(),Z="object"==typeof document&&document.all,tt=void 0===Z&&void 0!==Z?function(t){return"function"==typeof t||t===Z}:function(t){return"function"==typeof t},et=tt,rt=X.WeakMap,nt=et(rt)&&/native code/.test(String(rt)),ot=tt,it=function(t){return"object"==typeof t?null!==t:ot(t)},at=!k((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),st={},ct=it,ut=X.document,lt=ct(ut)&&ct(ut.createElement),ht=function(t){return lt?ut.createElement(t):{}},ft=ht,pt=!at&&!k((function(){return 7!==Object.defineProperty(ft("div"),"a",{get:function(){return 7}}).a})),dt=at&&k((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),vt=it,yt=String,mt=TypeError,gt=function(t){if(vt(t))return t;throw new mt(yt(t)+" is not an object")},bt=T,wt=Function.prototype.call,Pt=bt?wt.bind(wt):function(){return wt.apply(wt,arguments)},Ot={},St=Ot,jt=X,Et=tt,At=function(t){return Et(t)?t:void 0},kt=function(t,e){return arguments.length<2?At(St[t])||At(jt[t]):St[t]&&St[t][e]||jt[t]&&jt[t][e]},Tt=U({}.isPrototypeOf),Rt=X.navigator,It=Rt&&Rt.userAgent,xt=X,Ct=It?String(It):"",Ut=xt.process,Lt=xt.Deno,_t=Ut&&Ut.versions||Lt&&Lt.version,qt=_t&&_t.v8;qt&&(A=(E=qt.split("."))[0]>0&&E[0]<4?1:+(E[0]+E[1])),!A&&Ct&&(!(E=Ct.match(/Edge\/(\d+)/))||E[1]>=74)&&(E=Ct.match(/Chrome\/(\d+)/))&&(A=+E[1]);var Nt=A,Mt=k,Bt=X.String,Ft=!!Object.getOwnPropertySymbols&&!Mt((function(){var t=Symbol("symbol detection");return!Bt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Nt&&Nt<41})),Ht=Ft&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Dt=kt,Gt=tt,zt=Tt,Jt=Object,Wt=Ht?function(t){return"symbol"==typeof t}:function(t){var e=Dt("Symbol");return Gt(e)&&zt(e.prototype,Jt(t))},Vt=String,$t=function(t){try{return Vt(t)}catch(t){return"Object"}},Kt=tt,Qt=$t,Yt=TypeError,Xt=function(t){if(Kt(t))return t;throw new Yt(Qt(t)+" is not a function")},Zt=Xt,te=G,ee=function(t,e){var r=t[e];return te(r)?void 0:Zt(r)},re=Pt,ne=tt,oe=it,ie=TypeError,ae={exports:{}},se=X,ce=Object.defineProperty,ue=X,le="__core-js_shared__",he=ae.exports=ue[le]||function(t,e){try{ce(se,t,{value:e,configurable:!0,writable:!0})}catch(r){se[t]=e}return e}(le,{});(he.versions||(he.versions=[])).push({version:"3.45.0",mode:"pure",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"});var fe=ae.exports,pe=fe,de=function(t,e){return pe[t]||(pe[t]=e||{})},ve=W,ye=Object,me=function(t){return ye(ve(t))},ge=me,be=U({}.hasOwnProperty),we=Object.hasOwn||function(t,e){return be(ge(t),e)},Pe=U,Oe=0,Se=Math.random(),je=Pe(1.1.toString),Ee=function(t){return"Symbol("+(void 0===t?"":t)+")_"+je(++Oe+Se,36)},Ae=de,ke=we,Te=Ee,Re=Ft,Ie=Ht,xe=X.Symbol,Ce=Ae("wks"),Ue=Ie?xe.for||xe:xe&&xe.withoutSetter||Te,Le=function(t){return ke(Ce,t)||(Ce[t]=Re&&ke(xe,t)?xe[t]:Ue("Symbol."+t)),Ce[t]},_e=Pt,qe=it,Ne=Wt,Me=ee,Be=TypeError,Fe=Le("toPrimitive"),He=function(t,e){if(!qe(t)||Ne(t))return t;var r,n=Me(t,Fe);if(n){if(void 0===e&&(e="default"),r=_e(n,t,e),!qe(r)||Ne(r))return r;throw new Be("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&ne(r=t.toString)&&!oe(n=re(r,t)))return n;if(ne(r=t.valueOf)&&!oe(n=re(r,t)))return n;if("string"!==e&&ne(r=t.toString)&&!oe(n=re(r,t)))return n;throw new ie("Can't convert object to primitive value")}(t,e)},De=Wt,Ge=function(t){var e=He(t,"string");return De(e)?e:e+""},ze=at,Je=pt,We=dt,Ve=gt,$e=Ge,Ke=TypeError,Qe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Xe="enumerable",Ze="configurable",tr="writable";st.f=ze?We?function(t,e,r){if(Ve(t),e=$e(e),Ve(r),"function"==typeof t&&"prototype"===e&&"value"in r&&tr in r&&!r[tr]){var n=Ye(t,e);n&&n[tr]&&(t[e]=r.value,r={configurable:Ze in r?r[Ze]:n[Ze],enumerable:Xe in r?r[Xe]:n[Xe],writable:!1})}return Qe(t,e,r)}:Qe:function(t,e,r){if(Ve(t),e=$e(e),Ve(r),Je)try{return Qe(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new Ke("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var er,rr,nr,or=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},ir=st,ar=or,sr=at?function(t,e,r){return ir.f(t,e,ar(1,r))}:function(t,e,r){return t[e]=r,t},cr=Ee,ur=de("keys"),lr=function(t){return ur[t]||(ur[t]=cr(t))},hr={},fr=nt,pr=X,dr=it,vr=sr,yr=we,mr=fe,gr=lr,br=hr,wr="Object already initialized",Pr=pr.TypeError,Or=pr.WeakMap;if(fr||mr.state){var Sr=mr.state||(mr.state=new Or);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,er=function(t,e){if(Sr.has(t))throw new Pr(wr);return e.facade=t,Sr.set(t,e),e},rr=function(t){return Sr.get(t)||{}},nr=function(t){return Sr.has(t)}}else{var jr=gr("state");br[jr]=!0,er=function(t,e){if(yr(t,jr))throw new Pr(wr);return e.facade=t,vr(t,jr,e),e},rr=function(t){return yr(t,jr)?t[jr]:{}},nr=function(t){return yr(t,jr)}}var Er={set:er,get:rr,has:nr,enforce:function(t){return nr(t)?rr(t):er(t,{})},getterFor:function(t){return function(e){var r;if(!dr(e)||(r=rr(e)).type!==t)throw new Pr("Incompatible receiver, "+t+" required");return r}}},Ar=T,kr=Function.prototype,Tr=kr.apply,Rr=kr.call,Ir="object"==typeof Reflect&&Reflect.apply||(Ar?Rr.bind(Tr):function(){return Rr.apply(Tr,arguments)}),xr=N,Cr=U,Ur=function(t){if("Function"===xr(t))return Cr(t)},Lr={},_r={},qr={}.propertyIsEnumerable,Nr=Object.getOwnPropertyDescriptor,Mr=Nr&&!qr.call({1:2},1);_r.f=Mr?function(t){var e=Nr(this,t);return!!e&&e.enumerable}:qr;var Br=at,Fr=Pt,Hr=_r,Dr=or,Gr=K,zr=Ge,Jr=we,Wr=pt,Vr=Object.getOwnPropertyDescriptor;Lr.f=Br?Vr:function(t,e){if(t=Gr(t),e=zr(e),Wr)try{return Vr(t,e)}catch(t){}if(Jr(t,e))return Dr(!Fr(Hr.f,t,e),t[e])};var $r=k,Kr=tt,Qr=/#|\.prototype\./,Yr=function(t,e){var r=Zr[Xr(t)];return r===en||r!==tn&&(Kr(e)?$r(e):!!e)},Xr=Yr.normalize=function(t){return String(t).replace(Qr,".").toLowerCase()},Zr=Yr.data={},tn=Yr.NATIVE="N",en=Yr.POLYFILL="P",rn=Yr,nn=Xt,on=T,an=Ur(Ur.bind),sn=function(t,e){return nn(t),void 0===e?t:on?an(t,e):function(){return t.apply(e,arguments)}},cn=X,un=Ir,ln=Ur,hn=tt,fn=Lr.f,pn=rn,dn=Ot,vn=sn,yn=sr,mn=we,gn=function(t){var e=function(r,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,o)}return un(t,this,arguments)};return e.prototype=t.prototype,e},bn=function(t,e){var r,n,o,i,a,s,c,u,l,h=t.target,f=t.global,p=t.stat,d=t.proto,v=f?cn:p?cn[h]:cn[h]&&cn[h].prototype,y=f?dn:dn[h]||yn(dn,h,{})[h],m=y.prototype;for(i in e)n=!(r=pn(f?i:h+(p?".":"#")+i,t.forced))&&v&&mn(v,i),s=y[i],n&&(c=t.dontCallGetSet?(l=fn(v,i))&&l.value:v[i]),a=n&&c?c:e[i],(r||d||typeof s!=typeof a)&&(u=t.bind&&n?vn(a,cn):t.wrap&&n?gn(a):d&&hn(a)?ln(a):a,(t.sham||a&&a.sham||s&&s.sham)&&yn(u,"sham",!0),yn(y,i,u),d&&(mn(dn,o=h+"Prototype")||yn(dn,o,{}),yn(dn[o],i,a),t.real&&m&&(r||!m[i])&&yn(m,i,a)))},wn=at,Pn=we,On=Function.prototype,Sn=wn&&Object.getOwnPropertyDescriptor,jn=Pn(On,"name"),En={EXISTS:jn,PROPER:jn&&"something"===function(){}.name,CONFIGURABLE:jn&&(!wn||wn&&Sn(On,"name").configurable)},An={},kn=Math.ceil,Tn=Math.floor,Rn=Math.trunc||function(t){var e=+t;return(e>0?Tn:kn)(e)},In=function(t){var e=+t;return e!=e||0===e?0:Rn(e)},xn=In,Cn=Math.max,Un=Math.min,Ln=function(t,e){var r=xn(t);return r<0?Cn(r+e,0):Un(r,e)},_n=In,qn=Math.min,Nn=function(t){return function(t){var e=_n(t);return e>0?qn(e,9007199254740991):0}(t.length)},Mn=K,Bn=Ln,Fn=Nn,Hn=function(t){return function(e,r,n){var o=Mn(e),i=Fn(o);if(0===i)return!t&&-1;var a,s=Bn(n,i);if(t&&r!=r){for(;i>s;)if((a=o[s++])!=a)return!0}else for(;i>s;s++)if((t||s in o)&&o[s]===r)return t||s||0;return!t&&-1}},Dn={includes:Hn(!0),indexOf:Hn(!1)},Gn=we,zn=K,Jn=Dn.indexOf,Wn=hr,Vn=U([].push),$n=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Kn=$n,Qn=Object.keys||function(t){return function(t,e){var r,n=zn(t),o=0,i=[];for(r in n)!Gn(Wn,r)&&Gn(n,r)&&Vn(i,r);for(;e.length>o;)Gn(n,r=e[o++])&&(~Jn(i,r)||Vn(i,r));return i}(t,Kn)},Yn=at,Xn=dt,Zn=st,to=gt,eo=K,ro=Qn;An.f=Yn&&!Xn?Object.defineProperties:function(t,e){to(t);for(var r,n=eo(e),o=ro(e),i=o.length,a=0;i>a;)Zn.f(t,r=o[a++],n[r]);return t};var no,oo=kt("document","documentElement"),io=gt,ao=An,so=$n,co=hr,uo=oo,lo=ht,ho="prototype",fo="script",po=lr("IE_PROTO"),vo=function(){},yo=function(t){return"<"+fo+">"+t+"</"+fo+">"},mo=function(t){t.write(yo("")),t.close();var e=t.parentWindow.Object;return t=null,e},go=function(){try{no=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;go="undefined"!=typeof document?document.domain&&no?mo(no):(e=lo("iframe"),r="java"+fo+":",e.style.display="none",uo.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(yo("document.F=Object")),t.close(),t.F):mo(no);for(var n=so.length;n--;)delete go[ho][so[n]];return go()};co[po]=!0;var bo,wo,Po,Oo=Object.create||function(t,e){var r;return null!==t?(vo[ho]=io(t),r=new vo,vo[ho]=null,r[po]=t):r=go(),void 0===e?r:ao.f(r,e)},So=!k((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),jo=we,Eo=tt,Ao=me,ko=So,To=lr("IE_PROTO"),Ro=Object,Io=Ro.prototype,xo=ko?Ro.getPrototypeOf:function(t){var e=Ao(t);if(jo(e,To))return e[To];var r=e.constructor;return Eo(r)&&e instanceof r?r.prototype:e instanceof Ro?Io:null},Co=sr,Uo=function(t,e,r,n){return n&&n.enumerable?t[e]=r:Co(t,e,r),t},Lo=k,_o=tt,qo=it,No=Oo,Mo=xo,Bo=Uo,Fo=Le("iterator"),Ho=!1;[].keys&&("next"in(Po=[].keys())?(wo=Mo(Mo(Po)))!==Object.prototype&&(bo=wo):Ho=!0);var Do=!qo(bo)||Lo((function(){var t={};return bo[Fo].call(t)!==t}));_o((bo=Do?{}:No(bo))[Fo])||Bo(bo,Fo,(function(){return this}));var Go={IteratorPrototype:bo,BUGGY_SAFARI_ITERATORS:Ho},zo={};zo[Le("toStringTag")]="z";var Jo="[object z]"===String(zo),Wo=Jo,Vo=tt,$o=N,Ko=Le("toStringTag"),Qo=Object,Yo="Arguments"===$o(function(){return arguments}()),Xo=Wo?$o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Qo(t),Ko))?r:Yo?$o(e):"Object"===(n=$o(e))&&Vo(e.callee)?"Arguments":n},Zo=Xo,ti=Jo?{}.toString:function(){return"[object "+Zo(this)+"]"},ei=Jo,ri=st.f,ni=sr,oi=we,ii=ti,ai=Le("toStringTag"),si=function(t,e,r,n){var o=r?t:t&&t.prototype;o&&(oi(o,ai)||ri(o,ai,{configurable:!0,value:e}),n&&!ei&&ni(o,"toString",ii))},ci=Go.IteratorPrototype,ui=Oo,li=or,hi=si,fi=Q,pi=function(){return this},di=function(t,e,r,n){var o=e+" Iterator";return t.prototype=ui(ci,{next:li(+!n,r)}),hi(t,o,!1,!0),fi[o]=pi,t},vi=bn,yi=Pt,mi=di,gi=xo,bi=si,wi=Uo,Pi=Q,Oi=En.PROPER,Si=Go.BUGGY_SAFARI_ITERATORS,ji=Le("iterator"),Ei="keys",Ai="values",ki="entries",Ti=function(){return this},Ri=function(t,e,r,n,o,i,a){mi(r,e,n);var s,c,u,l=function(t){if(t===o&&v)return v;if(!Si&&t&&t in p)return p[t];switch(t){case Ei:case Ai:case ki:return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",f=!1,p=t.prototype,d=p[ji]||p["@@iterator"]||o&&p[o],v=!Si&&d||l(o),y="Array"===e&&p.entries||d;if(y&&(s=gi(y.call(new t)))!==Object.prototype&&s.next&&(bi(s,h,!0,!0),Pi[h]=Ti),Oi&&o===Ai&&d&&d.name!==Ai&&(f=!0,v=function(){return yi(d,this)}),o)if(c={values:l(Ai),keys:i?v:l(Ei),entries:l(ki)},a)for(u in c)(Si||f||!(u in p))&&wi(p,u,c[u]);else vi({target:e,proto:!0,forced:Si||f},c);return a&&p[ji]!==v&&wi(p,ji,v,{name:o}),Pi[e]=v,c},Ii=function(t,e){return{value:t,done:e}},xi=K,Ci=Q,Ui=Er;st.f;var Li=Ri,_i=Ii,qi="Array Iterator",Ni=Ui.set,Mi=Ui.getterFor(qi);Li(Array,"Array",(function(t,e){Ni(this,{type:qi,target:xi(t),index:0,kind:e})}),(function(){var t=Mi(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,_i(void 0,!0);switch(t.kind){case"keys":return _i(r,!1);case"values":return _i(e[r],!1)}return _i([r,e[r]],!1)}),"values"),Ci.Arguments=Ci.Array;var Bi=bn,Fi=U,Hi=Ln,Di=RangeError,Gi=String.fromCharCode,zi=String.fromCodePoint,Ji=Fi([].join);Bi({target:"String",stat:!0,arity:1,forced:!!zi&&1!==zi.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,o=0;n>o;){if(e=+arguments[o++],Hi(e,1114111)!==e)throw new Di(e+" is not a valid code point");r[o]=e<65536?Gi(e):Gi(55296+((e-=65536)>>10),e%1024+56320)}return Ji(r,"")}});var Wi=X,Vi=at,$i=Object.getOwnPropertyDescriptor,Ki=k,Qi=Le("iterator"),Yi=!Ki((function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),r.delete("a",2),r.delete("b",void 0),!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b")||!e.size&&true||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Qi]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})),Xi=st,Zi=function(t,e,r){return Xi.f(t,e,r)},ta=Uo,ea=Tt,ra=TypeError,na=function(t,e){if(ea(e,t))return t;throw new ra("Incorrect invocation")},oa=Xo,ia=String,aa=function(t){if("Symbol"===oa(t))throw new TypeError("Cannot convert a Symbol value to a string");return ia(t)},sa=Xo,ca=ee,ua=G,la=Q,ha=Le("iterator"),fa=function(t){if(!ua(t))return ca(t,ha)||ca(t,"@@iterator")||la[sa(t)]},pa=Pt,da=Xt,va=gt,ya=$t,ma=fa,ga=TypeError,ba=function(t,e){var r=arguments.length<2?ma(t):e;if(da(r))return va(pa(r,t));throw new ga(ya(t)+" is not iterable")},wa=TypeError,Pa=function(t,e){if(t<e)throw new wa("Not enough arguments");return t},Oa=U([].slice),Sa=Oa,ja=Math.floor,Ea=function(t,e){var r=t.length;if(r<8)for(var n,o,i=1;i<r;){for(o=i,n=t[i];o&&e(t[o-1],n)>0;)t[o]=t[--o];o!==i++&&(t[o]=n)}else for(var a=ja(r/2),s=Ea(Sa(t,0,a),e),c=Ea(Sa(t,a),e),u=s.length,l=c.length,h=0,f=0;h<u||f<l;)t[h+f]=h<u&&f<l?e(s[h],c[f])<=0?s[h++]:c[f++]:h<u?s[h++]:c[f++];return t},Aa=bn,ka=X,Ta=function(t){if(!Vi)return Wi[t];var e=$i(Wi,t);return e&&e.value},Ra=kt,Ia=Pt,xa=U,Ca=at,Ua=Yi,La=Uo,_a=Zi,qa=si,Na=di,Ma=Er,Ba=na,Fa=tt,Ha=we,Da=sn,Ga=Xo,za=gt,Ja=it,Wa=aa,Va=Oo,$a=or,Ka=ba,Qa=fa,Ya=Ii,Xa=Pa,Za=Ea,ts=Le("iterator"),es="URLSearchParams",rs=es+"Iterator",ns=Ma.set,os=Ma.getterFor(es),is=Ma.getterFor(rs),as=Ta("fetch"),ss=Ta("Request"),cs=Ta("Headers"),us=ss&&ss.prototype,ls=cs&&cs.prototype,hs=ka.TypeError,fs=ka.encodeURIComponent,ps=String.fromCharCode,ds=Ra("String","fromCodePoint"),vs=parseInt,ys=xa("".charAt),ms=xa([].join),gs=xa([].push),bs=xa("".replace),ws=xa([].shift),Ps=xa([].splice),Os=xa("".split),Ss=xa("".slice),js=xa(/./.exec),Es=/\+/g,As=/^[0-9a-f]+$/i,ks=function(t,e){var r=Ss(t,e,e+2);return js(As,r)?vs(r,16):NaN},Ts=function(t){for(var e=0,r=128;r>0&&t&r;r>>=1)e++;return e},Rs=function(t){var e=null;switch(t.length){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return e>1114111?null:e},Is=function(t){for(var e=(t=bs(t,Es," ")).length,r="",n=0;n<e;){var o=ys(t,n);if("%"===o){if("%"===ys(t,n+1)||n+3>e){r+="%",n++;continue}var i=ks(t,n+1);if(i!=i){r+=o,n++;continue}n+=2;var a=Ts(i);if(0===a)o=ps(i);else{if(1===a||a>4){r+="�",n++;continue}for(var s=[i],c=1;c<a&&!(3+ ++n>e||"%"!==ys(t,n));){var u=ks(t,n+1);if(u!=u){n+=3;break}if(u>191||u<128)break;gs(s,u),n+=2,c++}if(s.length!==a){r+="�";continue}var l=Rs(s);null===l?r+="�":o=ds(l)}}r+=o,n++}return r},xs=/[!'()~]|%20/g,Cs={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Us=function(t){return Cs[t]},Ls=function(t){return bs(fs(t),xs,Us)},_s=Na((function(t,e){ns(this,{type:rs,target:os(t).entries,index:0,kind:e})}),es,(function(){var t=is(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Ya(void 0,!0);var n=e[r];switch(t.kind){case"keys":return Ya(n.key,!1);case"values":return Ya(n.value,!1)}return Ya([n.key,n.value],!1)}),!0),qs=function(t){this.entries=[],this.url=null,void 0!==t&&(Ja(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===ys(t,0)?Ss(t,1):t:Wa(t)))};qs.prototype={type:es,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,a,s,c=this.entries,u=Qa(t);if(u)for(r=(e=Ka(t,u)).next;!(n=Ia(r,e)).done;){if(i=(o=Ka(za(n.value))).next,(a=Ia(i,o)).done||(s=Ia(i,o)).done||!Ia(i,o).done)throw new hs("Expected sequence with length 2");gs(c,{key:Wa(a.value),value:Wa(s.value)})}else for(var l in t)Ha(t,l)&&gs(c,{key:l,value:Wa(t[l])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,o=Os(t,"&"),i=0;i<o.length;)(e=o[i++]).length&&(r=Os(e,"="),gs(n,{key:Is(ws(r)),value:Is(ms(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],gs(r,Ls(t.key)+"="+Ls(t.value));return ms(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ns=function(){Ba(this,Ms);var t=ns(this,new qs(arguments.length>0?arguments[0]:void 0));Ca||(this.size=t.entries.length)},Ms=Ns.prototype;if(function(t,e,r){for(var n in e)r&&r.unsafe&&t[n]?t[n]=e[n]:ta(t,n,e[n],r)}(Ms,{append:function(t,e){var r=os(this);Xa(arguments.length,2),gs(r.entries,{key:Wa(t),value:Wa(e)}),Ca||this.length++,r.updateURL()},delete:function(t){for(var e=os(this),r=Xa(arguments.length,1),n=e.entries,o=Wa(t),i=r<2?void 0:arguments[1],a=void 0===i?i:Wa(i),s=0;s<n.length;){var c=n[s];if(c.key!==o||void 0!==a&&c.value!==a)s++;else if(Ps(n,s,1),void 0!==a)break}Ca||(this.size=n.length),e.updateURL()},get:function(t){var e=os(this).entries;Xa(arguments.length,1);for(var r=Wa(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){var e=os(this).entries;Xa(arguments.length,1);for(var r=Wa(t),n=[],o=0;o<e.length;o++)e[o].key===r&&gs(n,e[o].value);return n},has:function(t){for(var e=os(this).entries,r=Xa(arguments.length,1),n=Wa(t),o=r<2?void 0:arguments[1],i=void 0===o?o:Wa(o),a=0;a<e.length;){var s=e[a++];if(s.key===n&&(void 0===i||s.value===i))return!0}return!1},set:function(t,e){var r=os(this);Xa(arguments.length,1);for(var n,o=r.entries,i=!1,a=Wa(t),s=Wa(e),c=0;c<o.length;c++)(n=o[c]).key===a&&(i?Ps(o,c--,1):(i=!0,n.value=s));i||gs(o,{key:a,value:s}),Ca||(this.size=o.length),r.updateURL()},sort:function(){var t=os(this);Za(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=os(this).entries,n=Da(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new _s(this,"keys")},values:function(){return new _s(this,"values")},entries:function(){return new _s(this,"entries")}},{enumerable:!0}),La(Ms,ts,Ms.entries,{name:"entries"}),La(Ms,"toString",(function(){return os(this).serialize()}),{enumerable:!0}),Ca&&_a(Ms,"size",{get:function(){return os(this).entries.length},configurable:!0,enumerable:!0}),qa(Ns,es),Aa({global:!0,constructor:!0,forced:!Ua},{URLSearchParams:Ns}),!Ua&&Fa(cs)){var Bs=xa(ls.has),Fs=xa(ls.set),Hs=function(t){if(Ja(t)){var e,r=t.body;if(Ga(r)===es)return e=t.headers?new cs(t.headers):new cs,Bs(e,"content-type")||Fs(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Va(t,{body:$a(0,Wa(r)),headers:$a(0,e)})}return t};if(Fa(as)&&Aa({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return as(t,arguments.length>1?Hs(arguments[1]):{})}}),Fa(ss)){var Ds=function(t){return Ba(this,us),new ss(t,arguments.length>1?Hs(arguments[1]):{})};us.constructor=Ds,Ds.prototype=us,Aa({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ds})}}var Gs={URLSearchParams:Ns,getState:os},zs=U,Js=In,Ws=aa,Vs=W,$s=zs("".charAt),Ks=zs("".charCodeAt),Qs=zs("".slice),Ys=function(t){return function(e,r){var n,o,i=Ws(Vs(e)),a=Js(r),s=i.length;return a<0||a>=s?t?"":void 0:(n=Ks(i,a))<55296||n>56319||a+1===s||(o=Ks(i,a+1))<56320||o>57343?t?$s(i,a):n:t?Qs(i,a,a+2):o-56320+(n-55296<<10)+65536}},Xs={codeAt:Ys(!1),charAt:Ys(!0)},Zs=Xs.charAt,tc=aa,ec=Er,rc=Ri,nc=Ii,oc="String Iterator",ic=ec.set,ac=ec.getterFor(oc);rc(String,"String",(function(t){ic(this,{type:oc,string:tc(t),index:0})}),(function(){var t,e=ac(this),r=e.string,n=e.index;return n>=r.length?nc(void 0,!0):(t=Zs(r,n),e.index+=t.length,nc(t,!1))}));var sc={};sc.f=Object.getOwnPropertySymbols;var cc=at,uc=U,lc=Pt,hc=k,fc=Qn,pc=sc,dc=_r,vc=me,yc=D,mc=Object.assign,gc=Object.defineProperty,bc=uc([].concat),wc=!mc||hc((function(){if(cc&&1!==mc({b:1},mc(gc({},"a",{enumerable:!0,get:function(){gc(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!==mc({},t)[r]||fc(mc({},e)).join("")!==n}))?function(t,e){for(var r=vc(t),n=arguments.length,o=1,i=pc.f,a=dc.f;n>o;)for(var s,c=yc(arguments[o++]),u=i?bc(fc(c),i(c)):fc(c),l=u.length,h=0;l>h;)s=u[h++],cc&&!lc(a,c,s)||(r[s]=c[s]);return r}:mc,Pc=Pt,Oc=gt,Sc=ee,jc=gt,Ec=Q,Ac=Le("iterator"),kc=Array.prototype,Tc=tt,Rc=fe,Ic=U(Function.toString);Tc(Rc.inspectSource)||(Rc.inspectSource=function(t){return Ic(t)});var xc=Rc.inspectSource,Cc=U,Uc=k,Lc=tt,_c=Xo,qc=xc,Nc=function(){},Mc=kt("Reflect","construct"),Bc=/^\s*(?:class|function)\b/,Fc=Cc(Bc.exec),Hc=!Bc.test(Nc),Dc=function(t){if(!Lc(t))return!1;try{return Mc(Nc,[],t),!0}catch(t){return!1}},Gc=function(t){if(!Lc(t))return!1;switch(_c(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Hc||!!Fc(Bc,qc(t))}catch(t){return!0}};Gc.sham=!0;var zc,Jc=!Mc||Uc((function(){var t;return Dc(Dc.call)||!Dc(Object)||!Dc((function(){t=!0}))||t}))?Gc:Dc,Wc=at,Vc=st,$c=or,Kc=sn,Qc=Pt,Yc=me,Xc=function(t,e,r,n){try{return n?e(jc(r)[0],r[1]):e(r)}catch(e){!function(t,e,r){var n,o;Oc(t);try{if(!(n=Sc(t,"return"))){if("throw"===e)throw r;return r}n=Pc(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;Oc(n)}(t,"throw",e)}},Zc=Jc,tu=Nn,eu=function(t,e,r){Wc?Vc.f(t,e,$c(0,r)):t[e]=r},ru=ba,nu=fa,ou=Array,iu=U,au=2147483647,su=/[^\0-\u007E]/,cu=/[.\u3002\uFF0E\uFF61]/g,uu="Overflow: input needs wider integers to process",lu=RangeError,hu=iu(cu.exec),fu=Math.floor,pu=String.fromCharCode,du=iu("".charCodeAt),vu=iu([].join),yu=iu([].push),mu=iu("".replace),gu=iu("".split),bu=iu("".toLowerCase),wu=function(t){return t+22+75*(t<26)},Pu=function(t,e,r){var n=0;for(t=r?fu(t/700):t>>1,t+=fu(t/e);t>455;)t=fu(t/35),n+=36;return fu(n+36*t/(t+38))},Ou=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=du(t,r++);if(o>=55296&&o<=56319&&r<n){var i=du(t,r++);56320==(64512&i)?yu(e,((1023&o)<<10)+(1023&i)+65536):(yu(e,o),r--)}else yu(e,o)}return e}(t);var r,n,o=t.length,i=128,a=0,s=72;for(r=0;r<t.length;r++)(n=t[r])<128&&yu(e,pu(n));var c=e.length,u=c;for(c&&yu(e,"-");u<o;){var l=au;for(r=0;r<t.length;r++)(n=t[r])>=i&&n<l&&(l=n);var h=u+1;if(l-i>fu((au-a)/h))throw new lu(uu);for(a+=(l-i)*h,i=l,r=0;r<t.length;r++){if((n=t[r])<i&&++a>au)throw new lu(uu);if(n===i){for(var f=a,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(f<d)break;var v=f-d,y=36-d;yu(e,pu(wu(d+v%y))),f=fu(v/y),p+=36}yu(e,pu(wu(f))),s=Pu(a,h,u===c),a=0,u++}}a++,i++}return vu(e,"")},Su=bn,ju=at,Eu=Yi,Au=X,ku=sn,Tu=U,Ru=Uo,Iu=Zi,xu=na,Cu=we,Uu=wc,Lu=function(t){var e=Yc(t),r=Zc(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Kc(o,n>2?arguments[2]:void 0));var a,s,c,u,l,h,f=nu(e),p=0;if(!f||this===ou&&function(t){return void 0!==t&&(Ec.Array===t||kc[Ac]===t)}(f))for(a=tu(e),s=r?new this(a):ou(a);a>p;p++)h=i?o(e[p],p):e[p],eu(s,p,h);else for(s=r?new this:[],l=(u=ru(e,f)).next;!(c=Qc(l,u)).done;p++)h=i?Xc(u,o,[c.value,p],!0):c.value,eu(s,p,h);return s.length=p,s},_u=Oa,qu=Xs.codeAt,Nu=aa,Mu=si,Bu=Pa,Fu=Gs,Hu=Er,Du=Hu.set,Gu=Hu.getterFor("URL"),zu=Fu.URLSearchParams,Ju=Fu.getState,Wu=Au.URL,Vu=Au.TypeError,$u=Au.parseInt,Ku=Math.floor,Qu=Math.pow,Yu=Tu("".charAt),Xu=Tu(/./.exec),Zu=Tu([].join),tl=Tu(1.1.toString),el=Tu([].pop),rl=Tu([].push),nl=Tu("".replace),ol=Tu([].shift),il=Tu("".split),al=Tu("".slice),sl=Tu("".toLowerCase),cl=Tu([].unshift),ul="Invalid scheme",ll="Invalid host",hl="Invalid port",fl=/[a-z]/i,pl=/[\d+-.a-z]/i,dl=/\d/,vl=/^0x/i,yl=/^[0-7]+$/,ml=/^\d+$/,gl=/^[\da-f]+$/i,bl=/[\0\t\n\r #%/:<>?@[\\\]^|]/,wl=/[\0\t\n\r #/:<>?@[\\\]^|]/,Pl=/^[\u0000-\u0020]+/,Ol=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Sl=/[\t\n\r]/g,jl=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)cl(e,t%256),t=Ku(t/256);return Zu(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=tl(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},El={},Al=Uu({},El,{" ":1,'"':1,"<":1,">":1,"`":1}),kl=Uu({},Al,{"#":1,"?":1,"{":1,"}":1}),Tl=Uu({},kl,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Rl=function(t,e){var r=qu(t,0);return r>32&&r<127&&!Cu(e,t)?t:encodeURIComponent(t)},Il={ftp:21,file:null,http:80,https:443,ws:80,wss:443},xl=function(t,e){var r;return 2===t.length&&Xu(fl,Yu(t,0))&&(":"===(r=Yu(t,1))||!e&&"|"===r)},Cl=function(t){var e;return t.length>1&&xl(al(t,0,2))&&(2===t.length||"/"===(e=Yu(t,2))||"\\"===e||"?"===e||"#"===e)},Ul=function(t){return"."===t||"%2e"===sl(t)},Ll=function(t){return".."===(t=sl(t))||"%2e."===t||".%2e"===t||"%2e%2e"===t},_l={},ql={},Nl={},Ml={},Bl={},Fl={},Hl={},Dl={},Gl={},zl={},Jl={},Wl={},Vl={},$l={},Kl={},Ql={},Yl={},Xl={},Zl={},th={},eh={},rh=function(t,e,r){var n,o,i,a=Nu(t);if(e){if(o=this.parse(a))throw new Vu(o);this.searchParams=null}else{if(void 0!==r&&(n=new rh(r,!0)),o=this.parse(a,null,n))throw new Vu(o);(i=Ju(new zu)).bindURL(this),this.searchParams=i}};rh.prototype={type:"URL",parse:function(t,e,r){var n,o,i,a,s=this,c=e||_l,u=0,l="",h=!1,f=!1,p=!1;for(t=Nu(t),e||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,t=nl(t,Pl,""),t=nl(t,Ol,"$1")),t=nl(t,Sl,""),n=Lu(t);u<=n.length;){switch(o=n[u],c){case _l:if(!o||!Xu(fl,o)){if(e)return ul;c=Nl;continue}l+=sl(o),c=ql;break;case ql:if(o&&(Xu(pl,o)||"+"===o||"-"===o||"."===o))l+=sl(o);else{if(":"!==o){if(e)return ul;l="",c=Nl,u=0;continue}if(e&&(s.isSpecial()!==Cu(Il,l)||"file"===l&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&!s.host))return;if(s.scheme=l,e)return void(s.isSpecial()&&Il[s.scheme]===s.port&&(s.port=null));l="","file"===s.scheme?c=$l:s.isSpecial()&&r&&r.scheme===s.scheme?c=Ml:s.isSpecial()?c=Dl:"/"===n[u+1]?(c=Bl,u++):(s.cannotBeABaseURL=!0,rl(s.path,""),c=Zl)}break;case Nl:if(!r||r.cannotBeABaseURL&&"#"!==o)return ul;if(r.cannotBeABaseURL&&"#"===o){s.scheme=r.scheme,s.path=_u(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=eh;break}c="file"===r.scheme?$l:Fl;continue;case Ml:if("/"!==o||"/"!==n[u+1]){c=Fl;continue}c=Gl,u++;break;case Bl:if("/"===o){c=zl;break}c=Xl;continue;case Fl:if(s.scheme=r.scheme,o===zc)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=_u(r.path),s.query=r.query;else if("/"===o||"\\"===o&&s.isSpecial())c=Hl;else if("?"===o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=_u(r.path),s.query="",c=th;else{if("#"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=_u(r.path),s.path.length--,c=Xl;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=_u(r.path),s.query=r.query,s.fragment="",c=eh}break;case Hl:if(!s.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=Xl;continue}c=zl}else c=Gl;break;case Dl:if(c=Gl,"/"!==o||"/"!==Yu(l,u+1))continue;u++;break;case Gl:if("/"!==o&&"\\"!==o){c=zl;continue}break;case zl:if("@"===o){h&&(l="%40"+l),h=!0,i=Lu(l);for(var d=0;d<i.length;d++){var v=i[d];if(":"!==v||p){var y=Rl(v,Tl);p?s.password+=y:s.username+=y}else p=!0}l=""}else if(o===zc||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(h&&""===l)return"Invalid authority";u-=Lu(l).length+1,l="",c=Jl}else l+=o;break;case Jl:case Wl:if(e&&"file"===s.scheme){c=Ql;continue}if(":"!==o||f){if(o===zc||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(s.isSpecial()&&""===l)return ll;if(e&&""===l&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(l))return a;if(l="",c=Yl,e)return;continue}"["===o?f=!0:"]"===o&&(f=!1),l+=o}else{if(""===l)return ll;if(a=s.parseHost(l))return a;if(l="",c=Vl,e===Wl)return}break;case Vl:if(!Xu(dl,o)){if(o===zc||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()||e){if(""!==l){var m=$u(l,10);if(m>65535)return hl;s.port=s.isSpecial()&&m===Il[s.scheme]?null:m,l=""}if(e)return;c=Yl;continue}return hl}l+=o;break;case $l:if(s.scheme="file","/"===o||"\\"===o)c=Kl;else{if(!r||"file"!==r.scheme){c=Xl;continue}switch(o){case zc:s.host=r.host,s.path=_u(r.path),s.query=r.query;break;case"?":s.host=r.host,s.path=_u(r.path),s.query="",c=th;break;case"#":s.host=r.host,s.path=_u(r.path),s.query=r.query,s.fragment="",c=eh;break;default:Cl(Zu(_u(n,u),""))||(s.host=r.host,s.path=_u(r.path),s.shortenPath()),c=Xl;continue}}break;case Kl:if("/"===o||"\\"===o){c=Ql;break}r&&"file"===r.scheme&&!Cl(Zu(_u(n,u),""))&&(xl(r.path[0],!0)?rl(s.path,r.path[0]):s.host=r.host),c=Xl;continue;case Ql:if(o===zc||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&xl(l))c=Xl;else if(""===l){if(s.host="",e)return;c=Yl}else{if(a=s.parseHost(l))return a;if("localhost"===s.host&&(s.host=""),e)return;l="",c=Yl}continue}l+=o;break;case Yl:if(s.isSpecial()){if(c=Xl,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==zc&&(c=Xl,"/"!==o))continue}else s.fragment="",c=eh;else s.query="",c=th;break;case Xl:if(o===zc||"/"===o||"\\"===o&&s.isSpecial()||!e&&("?"===o||"#"===o)){if(Ll(l)?(s.shortenPath(),"/"===o||"\\"===o&&s.isSpecial()||rl(s.path,"")):Ul(l)?"/"===o||"\\"===o&&s.isSpecial()||rl(s.path,""):("file"===s.scheme&&!s.path.length&&xl(l)&&(s.host&&(s.host=""),l=Yu(l,0)+":"),rl(s.path,l)),l="","file"===s.scheme&&(o===zc||"?"===o||"#"===o))for(;s.path.length>1&&""===s.path[0];)ol(s.path);"?"===o?(s.query="",c=th):"#"===o&&(s.fragment="",c=eh)}else l+=Rl(o,kl);break;case Zl:"?"===o?(s.query="",c=th):"#"===o?(s.fragment="",c=eh):o!==zc&&(s.path[0]+=Rl(o,El));break;case th:e||"#"!==o?o!==zc&&("'"===o&&s.isSpecial()?s.query+="%27":s.query+="#"===o?"%23":Rl(o,El)):(s.fragment="",c=eh);break;case eh:o!==zc&&(s.fragment+=Rl(o,Al))}u++}},parseHost:function(t){var e,r,n;if("["===Yu(t,0)){if("]"!==Yu(t,t.length-1))return ll;if(e=function(t){var e,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,h=0,f=function(){return Yu(t,h)};if(":"===f()){if(":"!==Yu(t,1))return;h+=2,l=++u}for(;f();){if(8===u)return;if(":"!==f()){for(e=r=0;r<4&&Xu(gl,f());)e=16*e+$u(f(),16),h++,r++;if("."===f()){if(0===r)return;if(h-=r,u>6)return;for(n=0;f();){if(o=null,n>0){if(!("."===f()&&n<4))return;h++}if(!Xu(dl,f()))return;for(;Xu(dl,f());){if(i=$u(f(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;h++}c[u]=256*c[u]+o,2!=++n&&4!==n||u++}if(4!==n)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;c[u++]=e}else{if(null!==l)return;h++,l=++u}}if(null!==l)for(a=u-l,u=7;0!==u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!==u)return;return c}(al(t,1,-1)),!e)return ll;this.host=e}else if(this.isSpecial()){if(t=function(t){var e,r,n=[],o=gu(mu(bu(t),cu,"."),".");for(e=0;e<o.length;e++)r=o[e],yu(n,hu(su,r)?"xn--"+Ou(r):r);return vu(n,".")}(t),Xu(bl,t))return ll;if(e=function(t){var e,r,n,o,i,a,s,c=il(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""===(o=c[n]))return t;if(i=10,o.length>1&&"0"===Yu(o,0)&&(i=Xu(vl,o)?16:8,o=al(o,8===i?1:2)),""===o)a=0;else{if(!Xu(10===i?ml:8===i?yl:gl,o))return t;a=$u(o,i)}rl(r,a)}for(n=0;n<e;n++)if(a=r[n],n===e-1){if(a>=Qu(256,5-e))return null}else if(a>255)return null;for(s=el(r),n=0;n<r.length;n++)s+=r[n]*Qu(256,3-n);return s}(t),null===e)return ll;this.host=e}else{if(Xu(wl,t))return ll;for(e="",r=Lu(t),n=0;n<r.length;n++)e+=Rl(r[n],El);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return Cu(Il,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"===this.scheme&&1===e&&xl(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,s=t.query,c=t.fragment,u=e+":";return null!==o?(u+="//",t.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=jl(o),null!==i&&(u+=":"+i)):"file"===e&&(u+="//"),u+=t.cannotBeABaseURL?a[0]:a.length?"/"+Zu(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw new Vu(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"===t)try{return new nh(t.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+jl(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(Nu(t)+":",_l)},getUsername:function(){return this.username},setUsername:function(t){var e=Lu(Nu(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=Rl(e[r],Tl)}},getPassword:function(){return this.password},setPassword:function(t){var e=Lu(Nu(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=Rl(e[r],Tl)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?jl(t):jl(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Jl)},getHostname:function(){var t=this.host;return null===t?"":jl(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Wl)},getPort:function(){var t=this.port;return null===t?"":Nu(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=Nu(t))?this.port=null:this.parse(t,Vl))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+Zu(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Yl))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""===(t=Nu(t))?this.query=null:("?"===Yu(t,0)&&(t=al(t,1)),this.query="",this.parse(t,th)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!==(t=Nu(t))?("#"===Yu(t,0)&&(t=al(t,1)),this.fragment="",this.parse(t,eh)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nh=function(t){var e=xu(this,oh),r=Bu(arguments.length,1)>1?arguments[1]:void 0,n=Du(e,new rh(t,!1,r));ju||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},oh=nh.prototype,ih=function(t,e){return{get:function(){return Gu(this)[t]()},set:e&&function(t){return Gu(this)[e](t)},configurable:!0,enumerable:!0}};if(ju&&(Iu(oh,"href",ih("serialize","setHref")),Iu(oh,"origin",ih("getOrigin")),Iu(oh,"protocol",ih("getProtocol","setProtocol")),Iu(oh,"username",ih("getUsername","setUsername")),Iu(oh,"password",ih("getPassword","setPassword")),Iu(oh,"host",ih("getHost","setHost")),Iu(oh,"hostname",ih("getHostname","setHostname")),Iu(oh,"port",ih("getPort","setPort")),Iu(oh,"pathname",ih("getPathname","setPathname")),Iu(oh,"search",ih("getSearch","setSearch")),Iu(oh,"searchParams",ih("getSearchParams")),Iu(oh,"hash",ih("getHash","setHash"))),Ru(oh,"toJSON",(function(){return Gu(this).serialize()}),{enumerable:!0}),Ru(oh,"toString",(function(){return Gu(this).serialize()}),{enumerable:!0}),Wu){var ah=Wu.createObjectURL,sh=Wu.revokeObjectURL;ah&&Ru(nh,"createObjectURL",ku(ah,Wu)),sh&&Ru(nh,"revokeObjectURL",ku(sh,Wu))}Mu(nh,"URL"),Su({global:!0,constructor:!0,forced:!Eu,sham:!ju},{URL:nh});var ch=bn,uh=k,lh=Pa,hh=aa,fh=Yi,ph=kt("URL"),dh=fh&&uh((function(){ph.canParse()})),vh=uh((function(){return 1!==ph.canParse.length}));ch({target:"URL",stat:!0,forced:!dh||vh},{canParse:function(t){var e=lh(arguments.length,1),r=hh(t),n=e<2||void 0===arguments[1]?void 0:hh(arguments[1]);try{return!!new ph(r,n)}catch(t){return!1}}});var yh=bn,mh=Pa,gh=aa,bh=Yi,wh=kt("URL");yh({target:"URL",stat:!0,forced:!bh},{parse:function(t){var e=mh(arguments.length,1),r=gh(t),n=e<2||void 0===arguments[1]?void 0:gh(arguments[1]);try{return new wh(r,n)}catch(t){return null}}});var Ph=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(Ot.URL),Oh=function(t){function e(e){var r=t.call(this,e.message)||this;return r.name="PostgrestError",r.details=e.details,r.hint=e.hint,r.code=e.code,r}return n(e,t),e}(Error),Sh=function(){function t(t){var e,r;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=null!==(e=t.shouldThrowOnError)&&void 0!==e&&e,this.signal=t.signal,this.isMaybeSingle=null!==(r=t.isMaybeSingle)&&void 0!==r&&r,t.fetch?this.fetch=t.fetch:this.fetch=fetch}return t.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},t.prototype.setHeader=function(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this},t.prototype.then=function(t,e){var r=this;void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json");var n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then((function(t){return i(r,0,void 0,(function(){var e,r,n,o,i,s,c,u,l,h,f,p;return a(this,(function(a){switch(a.label){case 0:return e=null,r=null,n=null,o=t.status,i=t.statusText,t.ok?"HEAD"===this.method?[3,2]:[4,t.text()]:[3,3];case 1:""===(u=a.sent())||(r="text/csv"===this.headers.get("Accept")||this.headers.get("Accept")&&(null===(l=this.headers.get("Accept"))||void 0===l?void 0:l.includes("application/vnd.pgrst.plan+text"))?u:JSON.parse(u)),a.label=2;case 2:return s=null===(h=this.headers.get("Prefer"))||void 0===h?void 0:h.match(/count=(exact|planned|estimated)/),c=null===(f=t.headers.get("content-range"))||void 0===f?void 0:f.split("/"),s&&c&&c.length>1&&(n=parseInt(c[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(r)&&(r.length>1?(e={code:"PGRST116",details:"Results contain ".concat(r.length," rows, application/vnd.pgrst.object+json requires 1 row"),hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,n=null,o=406,i="Not Acceptable"):r=1===r.length?r[0]:null),[3,5];case 3:return[4,t.text()];case 4:u=a.sent();try{e=JSON.parse(u),Array.isArray(e)&&404===t.status&&(r=[],e=null,o=200,i="OK")}catch(r){404===t.status&&""===u?(o=204,i="No Content"):e={message:u}}if(e&&this.isMaybeSingle&&(null===(p=null==e?void 0:e.details)||void 0===p?void 0:p.includes("0 rows"))&&(e=null,o=200,i="OK"),e&&this.shouldThrowOnError)throw new Oh(e);a.label=5;case 5:return[2,{error:e,data:r,count:n,status:o,statusText:i}]}}))}))}));return this.shouldThrowOnError||(n=n.catch((function(t){var e,r,n;return{error:{message:"".concat(null!==(e=null==t?void 0:t.name)&&void 0!==e?e:"FetchError",": ").concat(null==t?void 0:t.message),details:"".concat(null!==(r=null==t?void 0:t.stack)&&void 0!==r?r:""),hint:"",code:"".concat(null!==(n=null==t?void 0:t.code)&&void 0!==n?n:"")},data:null,count:null,status:0,statusText:""}}))),n.then(t,e)},t.prototype.returns=function(){return this},t.prototype.overrideTypes=function(){return this},t}(),jh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.select=function(t){var e=!1,r=(null!=t?t:"*").split("").map((function(t){return/\s/.test(t)&&!e?"":('"'===t&&(e=!e),t)})).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this},e.prototype.order=function(t,e){var r=void 0===e?{}:e,n=r.ascending,o=void 0===n||n,i=r.nullsFirst,a=r.foreignTable,s=r.referencedTable,c=void 0===s?a:s,u=c?"".concat(c,".order"):"order",l=this.url.searchParams.get(u);return this.url.searchParams.set(u,"".concat(l?"".concat(l,","):"").concat(t,".").concat(o?"asc":"desc").concat(void 0===i?"":i?".nullsfirst":".nullslast")),this},e.prototype.limit=function(t,e){var r=void 0===e?{}:e,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=void 0===i?"limit":"".concat(i,".limit");return this.url.searchParams.set(a,"".concat(t)),this},e.prototype.range=function(t,e,r){var n=void 0===r?{}:r,o=n.foreignTable,i=n.referencedTable,a=void 0===i?o:i,s=void 0===a?"offset":"".concat(a,".offset"),c=void 0===a?"limit":"".concat(a,".limit");return this.url.searchParams.set(s,"".concat(t)),this.url.searchParams.set(c,"".concat(e-t+1)),this},e.prototype.abortSignal=function(t){return this.signal=t,this},e.prototype.single=function(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this},e.prototype.maybeSingle=function(){return"GET"===this.method?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this},e.prototype.csv=function(){return this.headers.set("Accept","text/csv"),this},e.prototype.geojson=function(){return this.headers.set("Accept","application/geo+json"),this},e.prototype.explain=function(t){var e,r=void 0===t?{}:t,n=r.analyze,o=void 0!==n&&n,i=r.verbose,a=void 0!==i&&i,s=r.settings,c=void 0!==s&&s,u=r.buffers,l=void 0!==u&&u,h=r.wal,f=void 0!==h&&h,p=r.format,d=void 0===p?"text":p,v=[o?"analyze":null,a?"verbose":null,c?"settings":null,l?"buffers":null,f?"wal":null].filter(Boolean).join("|"),y=null!==(e=this.headers.get("Accept"))&&void 0!==e?e:"application/json";return this.headers.set("Accept","application/vnd.pgrst.plan+".concat(d,'; for="').concat(y,'"; options=').concat(v,";")),this},e.prototype.rollback=function(){return this.headers.append("Prefer","tx=rollback"),this},e.prototype.returns=function(){return this},e.prototype.maxAffected=function(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer","max-affected=".concat(t)),this},e}(Sh),Eh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.eq=function(t,e){return this.url.searchParams.append(t,"eq.".concat(e)),this},e.prototype.neq=function(t,e){return this.url.searchParams.append(t,"neq.".concat(e)),this},e.prototype.gt=function(t,e){return this.url.searchParams.append(t,"gt.".concat(e)),this},e.prototype.gte=function(t,e){return this.url.searchParams.append(t,"gte.".concat(e)),this},e.prototype.lt=function(t,e){return this.url.searchParams.append(t,"lt.".concat(e)),this},e.prototype.lte=function(t,e){return this.url.searchParams.append(t,"lte.".concat(e)),this},e.prototype.like=function(t,e){return this.url.searchParams.append(t,"like.".concat(e)),this},e.prototype.likeAllOf=function(t,e){return this.url.searchParams.append(t,"like(all).{".concat(e.join(","),"}")),this},e.prototype.likeAnyOf=function(t,e){return this.url.searchParams.append(t,"like(any).{".concat(e.join(","),"}")),this},e.prototype.ilike=function(t,e){return this.url.searchParams.append(t,"ilike.".concat(e)),this},e.prototype.ilikeAllOf=function(t,e){return this.url.searchParams.append(t,"ilike(all).{".concat(e.join(","),"}")),this},e.prototype.ilikeAnyOf=function(t,e){return this.url.searchParams.append(t,"ilike(any).{".concat(e.join(","),"}")),this},e.prototype.is=function(t,e){return this.url.searchParams.append(t,"is.".concat(e)),this},e.prototype.in=function(t,e){var r=Array.from(new Set(e)).map((function(t){return"string"==typeof t&&new RegExp("[,()]").test(t)?'"'.concat(t,'"'):"".concat(t)})).join(",");return this.url.searchParams.append(t,"in.(".concat(r,")")),this},e.prototype.contains=function(t,e){return"string"==typeof e?this.url.searchParams.append(t,"cs.".concat(e)):Array.isArray(e)?this.url.searchParams.append(t,"cs.{".concat(e.join(","),"}")):this.url.searchParams.append(t,"cs.".concat(JSON.stringify(e))),this},e.prototype.containedBy=function(t,e){return"string"==typeof e?this.url.searchParams.append(t,"cd.".concat(e)):Array.isArray(e)?this.url.searchParams.append(t,"cd.{".concat(e.join(","),"}")):this.url.searchParams.append(t,"cd.".concat(JSON.stringify(e))),this},e.prototype.rangeGt=function(t,e){return this.url.searchParams.append(t,"sr.".concat(e)),this},e.prototype.rangeGte=function(t,e){return this.url.searchParams.append(t,"nxl.".concat(e)),this},e.prototype.rangeLt=function(t,e){return this.url.searchParams.append(t,"sl.".concat(e)),this},e.prototype.rangeLte=function(t,e){return this.url.searchParams.append(t,"nxr.".concat(e)),this},e.prototype.rangeAdjacent=function(t,e){return this.url.searchParams.append(t,"adj.".concat(e)),this},e.prototype.overlaps=function(t,e){return"string"==typeof e?this.url.searchParams.append(t,"ov.".concat(e)):this.url.searchParams.append(t,"ov.{".concat(e.join(","),"}")),this},e.prototype.textSearch=function(t,e,r){var n=void 0===r?{}:r,o=n.config,i=n.type,a="";"plain"===i?a="pl":"phrase"===i?a="ph":"websearch"===i&&(a="w");var s=void 0===o?"":"(".concat(o,")");return this.url.searchParams.append(t,"".concat(a,"fts").concat(s,".").concat(e)),this},e.prototype.match=function(t){var e=this;return Object.entries(t).forEach((function(t){var r=t[0],n=t[1];e.url.searchParams.append(r,"eq.".concat(n))})),this},e.prototype.not=function(t,e,r){return this.url.searchParams.append(t,"not.".concat(e,".").concat(r)),this},e.prototype.or=function(t,e){var r=void 0===e?{}:e,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=i?"".concat(i,".or"):"or";return this.url.searchParams.append(a,"(".concat(t,")")),this},e.prototype.filter=function(t,e,r){return this.url.searchParams.append(t,"".concat(e,".").concat(r)),this},e}(jh),Ah=function(){function t(t,e){var r=e.headers,n=void 0===r?{}:r,o=e.schema,i=e.fetch;this.url=t,this.headers=new Headers(n),this.schema=o,this.fetch=i}return t.prototype.select=function(t,e){var r=void 0===e?{}:e,n=r.head,o=void 0!==n&&n,i=r.count,a=o?"HEAD":"GET",s=!1,c=(null!=t?t:"*").split("").map((function(t){return/\s/.test(t)&&!s?"":('"'===t&&(s=!s),t)})).join("");return this.url.searchParams.set("select",c),i&&this.headers.append("Prefer","count=".concat(i)),new Eh({method:a,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})},t.prototype.insert=function(t,e){var r,n=void 0===e?{}:e,o=n.count,i=n.defaultToNull,a=void 0===i||i;if(o&&this.headers.append("Prefer","count=".concat(o)),a||this.headers.append("Prefer","missing=default"),Array.isArray(t)){var s=t.reduce((function(t,e){return t.concat(Object.keys(e))}),[]);if(s.length>0){var c=Array.from(new Set(s)).map((function(t){return'"'.concat(t,'"')}));this.url.searchParams.set("columns",c.join(","))}}return new Eh({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},t.prototype.upsert=function(t,e){var r,n=void 0===e?{}:e,o=n.onConflict,i=n.ignoreDuplicates,a=void 0!==i&&i,s=n.count,c=n.defaultToNull,u=void 0===c||c;if(this.headers.append("Prefer","resolution=".concat(a?"ignore":"merge","-duplicates")),void 0!==o&&this.url.searchParams.set("on_conflict",o),s&&this.headers.append("Prefer","count=".concat(s)),u||this.headers.append("Prefer","missing=default"),Array.isArray(t)){var l=t.reduce((function(t,e){return t.concat(Object.keys(e))}),[]);if(l.length>0){var h=Array.from(new Set(l)).map((function(t){return'"'.concat(t,'"')}));this.url.searchParams.set("columns",h.join(","))}}return new Eh({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},t.prototype.update=function(t,e){var r,n=(void 0===e?{}:e).count;return n&&this.headers.append("Prefer","count=".concat(n)),new Eh({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},t.prototype.delete=function(t){var e,r=(void 0===t?{}:t).count;return r&&this.headers.append("Prefer","count=".concat(r)),new Eh({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:null!==(e=this.fetch)&&void 0!==e?e:fetch})},t}(),kh=function(){function t(t,e){var r=void 0===e?{}:e,n=r.headers,o=void 0===n?{}:n,i=r.schema,a=r.fetch;this.url=t,this.headers=new Headers(o),this.schemaName=i,this.fetch=a}return t.prototype.from=function(t){var e=new URL("".concat(this.url,"/").concat(t));return new Ah(e,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})},t.prototype.schema=function(e){return new t(this.url,{headers:this.headers,schema:e,fetch:this.fetch})},t.prototype.rpc=function(t,e,r){var n;void 0===e&&(e={});var o,i,a=void 0===r?{}:r,s=a.head,c=void 0!==s&&s,u=a.get,l=void 0!==u&&u,h=a.count,f=new URL("".concat(this.url,"/rpc/").concat(t));c||l?(o=c?"HEAD":"GET",Object.entries(e).filter((function(t){return t[0],void 0!==t[1]})).map((function(t){var e=t[0],r=t[1];return[e,Array.isArray(r)?"{".concat(r.join(","),"}"):"".concat(r)]})).forEach((function(t){var e=t[0],r=t[1];f.searchParams.append(e,r)}))):(o="POST",i=e);var p=new Headers(this.headers);return h&&p.set("Prefer","count=".concat(h)),new Eh({method:o,url:f,headers:p,schema:this.schemaName,body:i,fetch:null!==(n=this.fetch)&&void 0!==n?n:fetch})},t}(),Th=function(t){function e(e,r){var n=r.headers,o=void 0===n?{}:n,i=r.fetch;return t.call(this,e,{headers:o,schema:void 0,fetch:i})||this}return n(e,t),e}(Ah),Rh=function(){function t(t,e){var r=void 0===e?{}:e,n=r.headers,o=void 0===n?{}:n,i=r.fetch;this.url=t,this.headers=new Headers(o),this.fetch=i}return t.prototype.from=function(t){var e=new Ph("".concat(this.url,"/").concat(t));return new Th(e,{headers:this.headers,fetch:this.fetch})},t}();function Ih(t,e){if(!t)throw new Error("cloud is required");if(!t.callFunction)throw new Error("cloud.callFunction is required");var r=t.callFunction.bind(t);return t.models=O(r,t),t.mysql=Ch(t,{envId:null==e?void 0:e.envId}),t.rdb=Uh(t,{envId:null==e?void 0:e.envId}),t}function xh(t,e,r){var n=this;return function(e){if(r)return r;var s=null==e?void 0:e.instance,c=null==e?void 0:e.database;return function(e,r){return i(n,0,void 0,(function(){var n;return a(this,(function(i){return n={},(null==r?void 0:r.headers)instanceof Headers?r.headers.forEach((function(t,e){n[e]=t})):n=(null==r?void 0:r.headers)||{},[2,t.callFunction({name:"httpOverCallFunction",data:{url:e.toString(),method:(null==r?void 0:r.method)||"GET",headers:o(o({"Content-Type":"application/json"},n||{}),{"X-Db-Instance":s||(null==n?void 0:n["X-Db-Instance"]),"Accept-Profile":c||(null==n?void 0:n["Accept-Profile"]),"Content-Profile":c||(null==n?void 0:n["Content-Profile"])}),body:null==r?void 0:r.body}}).then((function(t){var e=null==t?void 0:t.result;return{ok:(null==e?void 0:e.statusCode)>=200&&(null==e?void 0:e.statusCode)<300,status:(null==e?void 0:e.statusCode)||200,statusText:(null==e?void 0:e.statusMessage)||"OK",json:function(){return Promise.resolve((null==e?void 0:e.body)||{})},text:function(){return Promise.resolve("string"==typeof(null==e?void 0:e.body)?e.body:JSON.stringify((null==e?void 0:e.body)||{}))},headers:new Headers((null==e?void 0:e.headers)||{})}}))]}))}))}}}function Ch(t,e){var r=(null==e?void 0:e.mysqlBaseUrl)||Lh(t,null==e?void 0:e.envId).mysql,n=xh(t,null==e||e.envId,null==e?void 0:e.fetch);return function(t){return new Rh(r,{fetch:n(t)})}}function Uh(t,e){var r=(null==e?void 0:e.pgBaseUrl)||Lh(t,null==e?void 0:e.envId).rdb,n=xh(t,null==e||e.envId,null==e?void 0:e.fetch);return function(t){return new kh(r,{fetch:n(t),schema:(null==t?void 0:t.schema)||(null==t?void 0:t.database)})}}function Lh(t,e){var r=function(t,e){var r,n,o,i,a=e||(null===(n=null===(r=null==t?void 0:t.extend)||void 0===r?void 0:r.AI)||void 0===n?void 0:n.env);return"string"==typeof a&&a.trim()||(a=null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.env),"string"==typeof a&&a.trim()||(a=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.envName),"string"==typeof a&&a.trim()?a.trim():""}(t,e);if(!r)throw new Error("Generating default gateway base url failed: env not found");return{model:"https://".concat(r,".api.tcloudbasegateway.com/v1/model"),sql:"https://".concat(r,".api.tcloudbasegateway.com/v1/sql"),mysql:"https://".concat(r,".api.tcloudbasegateway.com/v1/rdb/rest"),rdb:"https://".concat(r,".api.tcloudbasegateway.com/v1/rdb/rest")}}var _h={init:Ih,generateHTTPClient:g,generateMySQLClient:Ch,generatePGClient:Uh};t.default=_h,t.generateHTTPClient=g,t.generateMySQLClient=Ch,t.generatePGClient=Uh,t.init=Ih,t.initHTTPOverCallFunction=function(t,e){var r=this;if(!t)throw new Error("cloud is required");if(!t.callFunction)throw new Error("cloud.callFunction is required");var n,s=t.callFunction.bind(t);try{var c=(null==e?void 0:e.baseUrl)||Lh(t,null==e?void 0:e.envId).model,u=(null==e?void 0:e.sqlBaseUrl)||Lh(t,null==e?void 0:e.envId).sql;n=g(s,(function(t){var e=t.url,n=t.body,c=t.method,u=t.headers;return i(r,0,void 0,(function(){var t,r;return a(this,(function(i){switch(i.label){case 0:return[4,s({name:"httpOverCallFunction",data:{url:e,method:null==c?void 0:c.toUpperCase(),headers:o(o({},u||{}),{"Content-Type":"application/json"}),body:n}})];case 1:return t=i.sent(),[2,null===(r=null==t?void 0:t.result)||void 0===r?void 0:r.body]}}))}))}),c,{sqlBaseUrl:u,cloud:t})}catch(t){console.error("init http orm client failed, try call function orm",t),n=O(s)}return t.models=n,t.mysql=Ch(t,{envId:null==e?void 0:e.envId,mysqlBaseUrl:null==e?void 0:e.mysqlBaseUrl}),t},Object.defineProperty(t,"__esModule",{value:!0})}(e)},142:(t,e,r)=>{"use strict";r.d(e,{U3:()=>n});var n={};r.r(n),r.d(n,{yE:()=>S});var o="@cloudbase/js-sdk";function i(){return o}var a,s="INVALID_OPERATION",c="OPERATION_FAIL";!function(t){t.local="local",t.none="none",t.session="session"}(a||(a={}));function u(t,e){console.warn("[".concat(i(),"][").concat(t,"]:").concat(e))}var l,h,f=(l=function(t,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},l(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),p=function(){return p=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},p.apply(this,arguments)},d=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function s(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},v=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(t){function e(e){var r=t.call(this)||this,n=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return r.timeout=n||0,r.timeoutMsg=o||"请求超时",r.restrictedMethods=i||["get","post","upload","download"],r}f(e,t),e.prototype.get=function(t){return this.request(p(p({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(p(p({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(p(p({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,r=t.file,n=t.name,o=t.method,i=t.headers,a=void 0===i?{}:i,s={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",c=new FormData;return"post"===s?(Object.keys(e).forEach((function(t){c.append(t,e[t])})),c.append("key",n),c.append("file",r),this.request(p(p({},t),{data:c,method:s}),this.restrictedMethods.includes("upload"))):this.request(p(p({},t),{method:"put",headers:a,body:r}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return d(this,void 0,void 0,(function(){var e,r,n,o;return v(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(p(p({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,r=window.URL.createObjectURL(new Blob([e])),n=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=r,o.setAttribute("download",n),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(r),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return d(this,void 0,void 0,(function(){var r,n,o,i,a,s,c,u,l,h,f,y,m,g=this;return v(this,(function(b){switch(b.label){case 0:return r=new AbortController,n=t.url,o=t.enableAbort,i=void 0!==o&&o,a=t.stream,s=void 0!==a&&a,c=t.signal,u=t.timeout,l=t.shouldThrowOnError,h=void 0===l||l,f=null!=u?u:this.timeout,c&&(c.aborted&&r.abort(),c.addEventListener("abort",(function(){return r.abort()}))),y=null,i&&f&&(y=setTimeout((function(){console.warn(g.timeoutMsg),r.abort(new Error(g.timeoutMsg))}),f)),[4,fetch(n,p(p({},t),{signal:r.signal})).then((function(t){return d(g,void 0,void 0,(function(){var e,r,n;return v(this,(function(o){switch(o.label){case 0:return clearTimeout(y),h?t.ok?(e=t,[3,3]):[3,1]:[3,4];case 1:return n=(r=Promise).reject,[4,t.json()];case 2:e=n.apply(r,[o.sent()]),o.label=3;case 3:return[2,e];case 4:return[2,t]}}))}))})).catch((function(t){if(clearTimeout(y),h)return Promise.reject(t)}))];case 1:return m=b.sent(),[2,{data:s?m.body:(null===(e=m.headers.get("content-type"))||void 0===e?void 0:e.includes("application/json"))?m.json():m.text(),statusCode:m.status,header:m.headers}]}}))}))},e.prototype.request=function(t,e){var r=this;void 0===e&&(e=!1);var n=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,a,s,c=t.url,u=t.headers,l=void 0===u?{}:u,h=t.data,f=t.responseType,p=t.withCredentials,d=t.body,v=t.onUploadProgress,y=function(t,e,r){void 0===r&&(r={});var n=/\?/.test(e),o="";return Object.keys(r).forEach((function(t){""===o?!n&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(r[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)}("https:",c,"get"===n?h:{}),m=new XMLHttpRequest;m.open(n,y),f&&(m.responseType=f),Object.keys(l).forEach((function(t){m.setRequestHeader(t,l[t])})),v&&m.upload.addEventListener("progress",v),m.onreadystatechange=function(){var t={};if(4===m.readyState){var e=m.getAllResponseHeaders().trim().split(/[\r\n]+/),r={};e.forEach((function(t){var e=t.split(": "),n=e.shift().toLowerCase(),o=e.join(": ");r[n]=o})),t.header=r,t.statusCode=m.status;try{t.data="blob"===f?m.response:JSON.parse(m.responseText)}catch(e){t.data="blob"===f?m.response:m.responseText}clearTimeout(i),o(t)}},e&&r.timeout&&(i=setTimeout((function(){console.warn(r.timeoutMsg),m.abort()}),r.timeout)),s=h,a="[object FormData]"===Object.prototype.toString.call(s)?h:"application/x-www-form-urlencoded"===l["content-type"]?function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(r){e.push("".concat(r,"=").concat(encodeURIComponent(t[r])))})),e.join("&")}(h):d||(h?JSON.stringify(h):void 0),p&&(m.withCredentials=!0),m.send(a)}))}}((function(){})),function(t){t.WEB="web",t.WX_MP="wx_mp"}(h||(h={}));var y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function s(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},g=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},b=function(t){function e(e){var r=t.call(this)||this;return r.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),r}return y(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}((function(){}));!function(){function t(t){this.keys={};var e=t.persistence,r=t.platformInfo,n=void 0===r?{}:r,o=t.keys,i=void 0===o?{}:o;this.platformInfo=n,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:(u("INVALID_PARAMS","localStorage is not supported on current platform"),new b(e.root));case"none":return new b(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,r){if("async"!==this.mode){if(this.storage)try{var n={version:r||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(n))}catch(t){throw new Error(JSON.stringify({code:c,msg:"[".concat(i(),"][").concat(c,"]setStore failed"),info:t}))}}else u(s,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,r){return m(this,void 0,void 0,(function(){var n;return g(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),n={version:r||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(n))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var r;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(r={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===r?void 0:r.tcb_token))return{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var n=this.storage.getItem(t);return n&&n.indexOf(e)>=0?JSON.parse(n).content:""}u(s,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var r;return m(this,void 0,void 0,(function(){var n;return g(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(r={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===r?void 0:r.tcb_token))return[2,{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(n=o.sent())&&n.indexOf(e)>=0?[2,JSON.parse(n).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):u(s,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return m(this,void 0,void 0,(function(){return g(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))}}();var w=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),P=function(t,e){this.data=e||null,this.name=t},O=function(t){function e(e,r){var n=t.call(this,"error",{error:e,data:r})||this;return n.error=e,n}return w(e,t),e}(P),S=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,r){r[t]=r[t]||[],r[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,r){if(null==r?void 0:r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(t instanceof O)return console.error(t.error),this;var r="string"==typeof t?new P(t,e||{}):t,n=r.name;if(this.listens(n)){r.target=this;for(var o=0,i=this.listeners[n]?function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}([],this.listeners[n],!0):[];o<i.length;o++)i[o].call(this,r)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}();function j(t){this.message=t}function E(t){this.message=t}new S,new S,"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Firefox"),j.prototype=new Error,j.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),E.prototype=new Error,E.prototype.name="InvalidTokenError"}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}return r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(530)})()));
|