microcms-js-sdk
Advanced tools
Comparing version 0.0.9 to 0.1.0
import Client from './microcmsClient'; | ||
export default Client; | ||
export { Client }; |
@@ -1,2 +0,2 @@ | ||
"use strict";var e=require("node-fetch"),t=require("qs");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e),o=r(t); | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node-fetch"),t=require("qs");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e),o=r(t); | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
function i(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}function a(e,t){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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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=a.trys,(o=o.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=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var u=function(e){return null!==e&&"string"==typeof e};module.exports=function(e){var t=e.serviceDomain,r=e.apiKey,c=e.globalDraftKey;if(!t||!r)throw new Error("parameter is required (check serviceDomain and apiKey)");if(!u(t)||!u(r))throw new Error("parameter is not string");var s="https://"+t+".microcms.io/api/v1",l=function(e){var t=e.endpoint,u=e.contentId,l=e.queries,f=void 0===l?{}:l;return i(void 0,void 0,void 0,(function(){var e,i,l,d,p;return a(this,(function(a){switch(a.label){case 0:e=function(e){if(null===(t=e)||"object"!=typeof t)throw new Error("queries is not object");var t;return o.default.stringify(e)}(f),i={headers:{"X-API-KEY":r}},c&&Object.assign(i.headers,{"X-GLOBAL-DRAFT-KEY":c}),l=s+"/"+t+(u?"/"+u:"")+(e?"?"+e:""),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.default(l,i)];case 2:return[2,a.sent().json()];case 3:if((d=a.sent()).data)throw d.data;if(null===(p=d.response)||void 0===p?void 0:p.data)throw d.response.data;throw d;case 4:return[2]}}))}))};return{get:function(e){var t=e.endpoint,r=e.contentId,n=e.queries,o=void 0===n?{}:n;return i(void 0,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return t?[4,l({endpoint:t,contentId:r,queries:o})]:[2,Promise.reject(new Error("endpoint is required"))];case 1:return[2,e.sent()]}}))}))}}}; | ||
function i(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}function a(e,t){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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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=a.trys,(o=o.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=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var u=function(e){return null!==e&&"string"==typeof e};exports.Client=function(e){var t=e.serviceDomain,r=e.apiKey,c=e.globalDraftKey;if(!t||!r)throw new Error("parameter is required (check serviceDomain and apiKey)");if(!u(t)||!u(r))throw new Error("parameter is not string");var s="https://"+t+".microcms.io/api/v1",l=function(e){var t=e.endpoint,u=e.contentId,l=e.queries,f=void 0===l?{}:l;return i(void 0,void 0,void 0,(function(){var e,i,l,d,p;return a(this,(function(a){switch(a.label){case 0:e=function(e){if(null===(t=e)||"object"!=typeof t)throw new Error("queries is not object");var t;return o.default.stringify(e)}(f),i={headers:{"X-API-KEY":r}},c&&Object.assign(i.headers,{"X-GLOBAL-DRAFT-KEY":c}),l=s+"/"+t+(u?"/"+u:"")+(e?"?"+e:""),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.default(l,i)];case 2:return[2,a.sent().json()];case 3:if((d=a.sent()).data)throw d.data;if(null===(p=d.response)||void 0===p?void 0:p.data)throw d.response.data;throw d;case 4:return[2]}}))}))};return{get:function(e){var t=e.endpoint,r=e.contentId,n=e.queries,o=void 0===n?{}:n;return i(void 0,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return t?[4,l({endpoint:t,contentId:r,queries:o})]:[2,Promise.reject(new Error("endpoint is required"))];case 1:return[2,e.sent()]}}))}))}}}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWljcm9jbXMtanMtc2RrLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OyJ9 |
import Client from './microcmsClient'; | ||
export default Client; | ||
export { Client }; |
@@ -15,3 +15,3 @@ import e from"node-fetch";import n from"qs"; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function r(e,n,r,t){return new(r||(r=Promise))((function(o,i){function a(e){try{c(t.next(e))}catch(e){i(e)}}function u(e){try{c(t.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,u)}c((t=t.apply(e,n||[])).next())}))}function t(e,n){var r,t,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,t&&(o=2&i[0]?t.return:i[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,i[1])).done)return o;switch(t=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++,t=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.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=n.call(e,a)}catch(e){i=[6,e],t=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var o=function(e){return null!==e&&"string"==typeof e};export default function(i){var a=i.serviceDomain,u=i.apiKey,c=i.globalDraftKey;if(!a||!u)throw new Error("parameter is required (check serviceDomain and apiKey)");if(!o(a)||!o(u))throw new Error("parameter is not string");var s="https://"+a+".microcms.io/api/v1",l=function(o){var i=o.endpoint,a=o.contentId,l=o.queries,f=void 0===l?{}:l;return r(void 0,void 0,void 0,(function(){var r,o,l,d,p;return t(this,(function(t){switch(t.label){case 0:r=function(e){if(null===(r=e)||"object"!=typeof r)throw new Error("queries is not object");var r;return n.stringify(e)}(f),o={headers:{"X-API-KEY":u}},c&&Object.assign(o.headers,{"X-GLOBAL-DRAFT-KEY":c}),l=s+"/"+i+(a?"/"+a:"")+(r?"?"+r:""),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,e(l,o)];case 2:return[2,t.sent().json()];case 3:if((d=t.sent()).data)throw d.data;if(null===(p=d.response)||void 0===p?void 0:p.data)throw d.response.data;throw d;case 4:return[2]}}))}))};return{get:function(e){var n=e.endpoint,o=e.contentId,i=e.queries,a=void 0===i?{}:i;return r(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return n?[4,l({endpoint:n,contentId:o,queries:a})]:[2,Promise.reject(new Error("endpoint is required"))];case 1:return[2,e.sent()]}}))}))}}} | ||
***************************************************************************** */function r(e,n,r,t){return new(r||(r=Promise))((function(o,i){function a(e){try{c(t.next(e))}catch(e){i(e)}}function u(e){try{c(t.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,u)}c((t=t.apply(e,n||[])).next())}))}function t(e,n){var r,t,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,t&&(o=2&i[0]?t.return:i[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,i[1])).done)return o;switch(t=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++,t=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.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=n.call(e,a)}catch(e){i=[6,e],t=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var o=function(e){return null!==e&&"string"==typeof e},i=function(i){var a=i.serviceDomain,u=i.apiKey,c=i.globalDraftKey;if(!a||!u)throw new Error("parameter is required (check serviceDomain and apiKey)");if(!o(a)||!o(u))throw new Error("parameter is not string");var s="https://"+a+".microcms.io/api/v1",l=function(o){var i=o.endpoint,a=o.contentId,l=o.queries,f=void 0===l?{}:l;return r(void 0,void 0,void 0,(function(){var r,o,l,p,d;return t(this,(function(t){switch(t.label){case 0:r=function(e){if(null===(r=e)||"object"!=typeof r)throw new Error("queries is not object");var r;return n.stringify(e)}(f),o={headers:{"X-API-KEY":u}},c&&Object.assign(o.headers,{"X-GLOBAL-DRAFT-KEY":c}),l=s+"/"+i+(a?"/"+a:"")+(r?"?"+r:""),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,e(l,o)];case 2:return[2,t.sent().json()];case 3:if((p=t.sent()).data)throw p.data;if(null===(d=p.response)||void 0===d?void 0:d.data)throw p.response.data;throw p;case 4:return[2]}}))}))};return{get:function(e){var n=e.endpoint,o=e.contentId,i=e.queries,a=void 0===i?{}:i;return r(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return n?[4,l({endpoint:n,contentId:o,queries:a})]:[2,Promise.reject(new Error("endpoint is required"))];case 1:return[2,e.sent()]}}))}))}}};export{i as Client}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWljcm9jbXMtanMtc2RrLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7In0= |
import Client from './microcmsClient'; | ||
export default Client; | ||
export { Client }; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("node-fetch"),require("qs")):"function"==typeof define&&define.amd?define(["node-fetch","qs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).microcms=t(e.fetch,e.qs)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e),o=n(t); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).microcms={})}(this,(function(e){"use strict"; | ||
/*! ***************************************************************************** | ||
@@ -15,4 +15,2 @@ Copyright (c) Microsoft Corporation. | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
function i(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function a(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=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++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var u=function(e){return null!==e&&"string"==typeof e};return function(e){var t=e.serviceDomain,n=e.apiKey,c=e.globalDraftKey;if(!t||!n)throw new Error("parameter is required (check serviceDomain and apiKey)");if(!u(t)||!u(n))throw new Error("parameter is not string");var s="https://"+t+".microcms.io/api/v1",f=function(e){var t=e.endpoint,u=e.contentId,f=e.queries,l=void 0===f?{}:f;return i(void 0,void 0,void 0,(function(){var e,i,f,d,p;return a(this,(function(a){switch(a.label){case 0:e=function(e){if(null===(t=e)||"object"!=typeof t)throw new Error("queries is not object");var t;return o.default.stringify(e)}(l),i={headers:{"X-API-KEY":n}},c&&Object.assign(i.headers,{"X-GLOBAL-DRAFT-KEY":c}),f=s+"/"+t+(u?"/"+u:"")+(e?"?"+e:""),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r.default(f,i)];case 2:return[2,a.sent().json()];case 3:if((d=a.sent()).data)throw d.data;if(null===(p=d.response)||void 0===p?void 0:p.data)throw d.response.data;throw d;case 4:return[2]}}))}))};return{get:function(e){var t=e.endpoint,n=e.contentId,r=e.queries,o=void 0===r?{}:r;return i(void 0,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return t?[4,f({endpoint:t,contentId:n,queries:o})]:[2,Promise.reject(new Error("endpoint is required"))];case 1:return[2,e.sent()]}}))}))}}}})); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWljcm9jbXMtanMtc2RrLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OyJ9 | ||
***************************************************************************** */function t(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{p(o.next(e))}catch(e){i(e)}}function c(e){try{p(o.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}p((o=o.apply(e,t||[])).next())}))}function r(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function o(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})})),t}var n={exports:{}};!function(e,t){var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r)return r;throw new Error("unable to locate global object")}();e.exports=t=r.fetch,r.fetch&&(t.default=r.fetch.bind(r)),t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response}(n,n.exports);var i,a=n.exports,c="undefined"!=typeof Symbol&&Symbol,p=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0},u="Function.prototype.bind called on incompatible ",f=Array.prototype.slice,l=Object.prototype.toString,y="[object Function]",s=function(e){var t=this;if("function"!=typeof t||l.call(t)!==y)throw new TypeError(u+t);for(var r,o=f.call(arguments,1),n=function(){if(this instanceof r){var n=t.apply(this,o.concat(f.call(arguments)));return Object(n)===n?n:this}return t.apply(e,o.concat(f.call(arguments)))},i=Math.max(0,t.length-o.length),a=[],c=0;c<i;c++)a.push("$"+c);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(n),t.prototype){var p=function(){};p.prototype=t.prototype,r.prototype=new p,p.prototype=null}return r},d=Function.prototype.bind||s,b=d.call(Function.call,Object.prototype.hasOwnProperty),h=SyntaxError,g=Function,m=TypeError,v=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(e){}},S=Object.getOwnPropertyDescriptor;if(S)try{S({},"")}catch(e){S=null}var j=function(){throw new m},w=S?function(){try{return j}catch(e){try{return S(arguments,"callee").get}catch(e){return j}}}():j,O="function"==typeof c&&"function"==typeof Symbol&&"symbol"==typeof c("foo")&&"symbol"==typeof Symbol("bar")&&p(),A=Object.getPrototypeOf||function(e){return e.__proto__},P={},x="undefined"==typeof Uint8Array?i:A(Uint8Array),E={"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":O?A([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":P,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O?A(A([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&O?A((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&O?A((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O?A(""[Symbol.iterator]()):i,"%Symbol%":O?Symbol:i,"%SyntaxError%":h,"%ThrowTypeError%":w,"%TypedArray%":x,"%TypeError%":m,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet},k=function e(t){var r;if("%AsyncFunction%"===t)r=v("async function () {}");else if("%GeneratorFunction%"===t)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=v("async function* () {}");else if("%AsyncGenerator%"===t){var o=e("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&(r=A(n.prototype))}return E[t]=r,r},F={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},I=d,R=b,N=I.call(Function.call,Array.prototype.concat),D=I.call(Function.apply,Array.prototype.splice),M=I.call(Function.call,String.prototype.replace),U=I.call(Function.call,String.prototype.slice),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,T=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new h("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new h("invalid intrinsic syntax, expected opening `%`");var o=[];return M(e,_,(function(e,t,r,n){o[o.length]=r?M(n,C,"$1"):t||e})),o},W=function(e,t){var r,o=e;if(R(F,o)&&(o="%"+(r=F[o])[0]+"%"),R(E,o)){var n=E[o];if(n===P&&(n=k(o)),void 0===n&&!t)throw new m("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:n}}throw new h("intrinsic "+e+" does not exist!")},B=function(e,t){if("string"!=typeof e||0===e.length)throw new m("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new m('"allowMissing" argument must be a boolean');var r=T(e),o=r.length>0?r[0]:"",n=W("%"+o+"%",t),i=n.name,a=n.value,c=!1,p=n.alias;p&&(o=p[0],D(r,N([0,1],p)));for(var u=1,f=!0;u<r.length;u+=1){var l=r[u],y=U(l,0,1),s=U(l,-1);if(('"'===y||"'"===y||"`"===y||'"'===s||"'"===s||"`"===s)&&y!==s)throw new h("property names with quotes must have matching quotes");if("constructor"!==l&&f||(c=!0),R(E,i="%"+(o+="."+l)+"%"))a=E[i];else if(null!=a){if(!(l in a)){if(!t)throw new m("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&u+1>=r.length){var d=S(a,l);a=(f=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:a[l]}else f=R(a,l),a=a[l];f&&!c&&(E[i]=a)}}return a},L={exports:{}};!function(e){var t=d,r=B,o=r("%Function.prototype.apply%"),n=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(n,o),a=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),p=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var r=i(t,n,arguments);if(a&&c){var o=a(r,"length");o.configurable&&c(r,"length",{value:1+p(0,e.length-(arguments.length-1))})}return r};var u=function(){return i(t,o,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u}(L);var q=B,G=L.exports,H=G(q("String.prototype.indexOf")),z=o(Object.freeze({__proto__:null,default:{}})),V="function"==typeof Map&&Map.prototype,Q=Object.getOwnPropertyDescriptor&&V?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,J=V&&Q&&"function"==typeof Q.get?Q.get:null,$=V&&Map.prototype.forEach,K="function"==typeof Set&&Set.prototype,X=Object.getOwnPropertyDescriptor&&K?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Y=K&&X&&"function"==typeof X.get?X.get:null,Z=K&&Set.prototype.forEach,ee="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,te="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,re="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,oe=Boolean.prototype.valueOf,ne=Object.prototype.toString,ie=Function.prototype.toString,ae=String.prototype.match,ce="function"==typeof BigInt?BigInt.prototype.valueOf:null,pe=Object.getOwnPropertySymbols,ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,fe=Object.prototype.propertyIsEnumerable,le=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),ye=z.custom,se=ye&&me(ye)?ye:null,de="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag?Symbol.toStringTag:null;function be(e,t,r){var o="double"===(r.quoteStyle||t)?'"':"'";return o+e+o}function he(e){return String(e).replace(/"/g,""")}function ge(e){return!("[object Array]"!==je(e)||de&&"object"==typeof e&&de in e)}function me(e){if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!ue)return!1;try{return ue.call(e),!0}catch(e){}return!1}var ve=Object.prototype.hasOwnProperty||function(e){return e in this};function Se(e,t){return ve.call(e,t)}function je(e){return ne.call(e)}function we(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,o=e.length;r<o;r++)if(e[r]===t)return r;return-1}function Oe(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return Oe(e.slice(0,t.maxStringLength),t)+o}return be(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,Ae),"single",t)}function Ae(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function Pe(e){return"Object("+e+")"}function xe(e){return e+" { ? }"}function Ee(e,t,r,o){return e+" ("+t+") {"+(o?ke(r,o):r.join(", "))+"}"}function ke(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function Fe(e,t){var r=ge(e),o=[];if(r){o.length=e.length;for(var n=0;n<e.length;n++)o[n]=Se(e,n)?t(e[n],e):""}for(var i in e)Se(e,i)&&(r&&String(Number(i))===i&&i<e.length||(/[^\w$]/.test(i)?o.push(t(i,e)+": "+t(e[i],e)):o.push(i+": "+t(e[i],e))));if("function"==typeof pe)for(var a=pe(e),c=0;c<a.length;c++)fe.call(e,a[c])&&o.push("["+t(a[c])+"]: "+t(e[a[c]],e));return o}var Ie=B,Re=function(e,t){var r=q(e,!!t);return"function"==typeof r&&H(e,".prototype.")>-1?G(r):r},Ne=function e(t,r,o,n){var i=r||{};if(Se(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Se(i,"customInspect")||i.customInspect;if("boolean"!=typeof a)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(Se(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Oe(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var c=void 0===i.depth?5:i.depth;if(void 0===o&&(o=0),o>=c&&c>0&&"object"==typeof t)return ge(t)?"[Array]":"[Object]";var p=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,o);if(void 0===n)n=[];else if(we(n,t)>=0)return"[Circular]";function u(t,r,a){if(r&&(n=n.slice()).push(r),a){var c={depth:i.depth};return Se(i,"quoteStyle")&&(c.quoteStyle=i.quoteStyle),e(t,c,o+1,n)}return e(t,i,o+1,n)}if("function"==typeof t){var f=function(e){if(e.name)return e.name;var t=ae.call(ie.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),l=Fe(t,u);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(l.length>0?" { "+l.join(", ")+" }":"")}if(me(t)){var y=ue.call(t);return"object"==typeof t?Pe(y):y}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var s="<"+String(t.nodeName).toLowerCase(),d=t.attributes||[],b=0;b<d.length;b++)s+=" "+d[b].name+"="+be(he(d[b].value),"double",i);return s+=">",t.childNodes&&t.childNodes.length&&(s+="..."),s+="</"+String(t.nodeName).toLowerCase()+">"}if(ge(t)){if(0===t.length)return"[]";var h=Fe(t,u);return p&&!function(e){for(var t=0;t<e.length;t++)if(we(e[t],"\n")>=0)return!1;return!0}(h)?"["+ke(h,p)+"]":"[ "+h.join(", ")+" ]"}if(function(e){return!("[object Error]"!==je(e)||de&&"object"==typeof e&&de in e)}(t)){var g=Fe(t,u);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&a){if(se&&"function"==typeof t[se])return t[se]();if("function"==typeof t.inspect)return t.inspect()}if(function(e){if(!J||!e||"object"!=typeof e)return!1;try{J.call(e);try{Y.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var m=[];return $.call(t,(function(e,r){m.push(u(r,t,!0)+" => "+u(e,t))})),Ee("Map",J.call(t),m,p)}if(function(e){if(!Y||!e||"object"!=typeof e)return!1;try{Y.call(e);try{J.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var v=[];return Z.call(t,(function(e){v.push(u(e,t))})),Ee("Set",Y.call(t),v,p)}if(function(e){if(!ee||!e||"object"!=typeof e)return!1;try{ee.call(e,ee);try{te.call(e,te)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return xe("WeakMap");if(function(e){if(!te||!e||"object"!=typeof e)return!1;try{te.call(e,te);try{ee.call(e,ee)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return xe("WeakSet");if(function(e){if(!re||!e||"object"!=typeof e)return!1;try{return re.call(e),!0}catch(e){}return!1}(t))return xe("WeakRef");if(function(e){return!("[object Number]"!==je(e)||de&&"object"==typeof e&&de in e)}(t))return Pe(u(Number(t)));if(function(e){if(!e||"object"!=typeof e||!ce)return!1;try{return ce.call(e),!0}catch(e){}return!1}(t))return Pe(u(ce.call(t)));if(function(e){return!("[object Boolean]"!==je(e)||de&&"object"==typeof e&&de in e)}(t))return Pe(oe.call(t));if(function(e){return!("[object String]"!==je(e)||de&&"object"==typeof e&&de in e)}(t))return Pe(u(String(t)));if(!function(e){return!("[object Date]"!==je(e)||de&&"object"==typeof e&&de in e)}(t)&&!function(e){return!("[object RegExp]"!==je(e)||de&&"object"==typeof e&&de in e)}(t)){var S=Fe(t,u),j=le?le(t)===Object.prototype:t instanceof Object||t.constructor===Object,w=t instanceof Object?"":"null prototype",O=!j&&de&&Object(t)===t&&de in t?je(t).slice(8,-1):w?"Object":"",A=(j||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(O||w?"["+[].concat(O||[],w||[]).join(": ")+"] ":"");return 0===S.length?A+"{}":p?A+"{"+ke(S,p)+"}":A+"{ "+S.join(", ")+" }"}return String(t)},De=Ie("%TypeError%"),Me=Ie("%WeakMap%",!0),Ue=Ie("%Map%",!0),_e=Re("WeakMap.prototype.get",!0),Ce=Re("WeakMap.prototype.set",!0),Te=Re("WeakMap.prototype.has",!0),We=Re("Map.prototype.get",!0),Be=Re("Map.prototype.set",!0),Le=Re("Map.prototype.has",!0),qe=function(e,t){for(var r,o=e;null!==(r=o.next);o=r)if(r.key===t)return o.next=r.next,r.next=e.next,e.next=r,r},Ge=String.prototype.replace,He=/%20/g,ze="RFC3986",Ve={default:ze,formatters:{RFC1738:function(e){return Ge.call(e,He,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:ze},Qe=Ve,Je=Object.prototype.hasOwnProperty,$e=Array.isArray,Ke=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Xe=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(r[o]=e[o]);return r},Ye={arrayToObject:Xe,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var n=t[o],i=n.obj[n.prop],a=Object.keys(i),c=0;c<a.length;++c){var p=a[c],u=i[p];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:i,prop:p}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if($e(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,r){var o=e.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(e){return o}},encode:function(e,t,r,o,n){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",c=0;c<i.length;++c){var p=i.charCodeAt(c);45===p||46===p||95===p||126===p||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||n===Qe.RFC1738&&(40===p||41===p)?a+=i.charAt(c):p<128?a+=Ke[p]:p<2048?a+=Ke[192|p>>6]+Ke[128|63&p]:p<55296||p>=57344?a+=Ke[224|p>>12]+Ke[128|p>>6&63]+Ke[128|63&p]:(c+=1,p=65536+((1023&p)<<10|1023&i.charCodeAt(c)),a+=Ke[240|p>>18]+Ke[128|p>>12&63]+Ke[128|p>>6&63]+Ke[128|63&p])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if($e(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(t(e[o]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if("object"!=typeof r){if($e(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!Je.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var n=t;return $e(t)&&!$e(r)&&(n=Xe(t,o)),$e(t)&&$e(r)?(r.forEach((function(r,n){if(Je.call(t,n)){var i=t[n];i&&"object"==typeof i&&r&&"object"==typeof r?t[n]=e(i,r,o):t.push(r)}else t[n]=r})),t):Object.keys(r).reduce((function(t,n){var i=r[n];return Je.call(t,n)?t[n]=e(t[n],i,o):t[n]=i,t}),n)}},Ze=function(){var e,t,r,o={assert:function(e){if(!o.has(e))throw new De("Side channel does not contain "+Ne(e))},get:function(o){if(Me&&o&&("object"==typeof o||"function"==typeof o)){if(e)return _e(e,o)}else if(Ue){if(t)return We(t,o)}else if(r)return function(e,t){var r=qe(e,t);return r&&r.value}(r,o)},has:function(o){if(Me&&o&&("object"==typeof o||"function"==typeof o)){if(e)return Te(e,o)}else if(Ue){if(t)return Le(t,o)}else if(r)return function(e,t){return!!qe(e,t)}(r,o);return!1},set:function(o,n){Me&&o&&("object"==typeof o||"function"==typeof o)?(e||(e=new Me),Ce(e,o,n)):Ue?(t||(t=new Ue),Be(t,o,n)):(r||(r={key:{},next:null}),function(e,t,r){var o=qe(e,t);o?o.value=r:e.next={key:t,next:e.next,value:r}}(r,o,n))}};return o},et=Ye,tt=Ve,rt=Object.prototype.hasOwnProperty,ot={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},nt=Array.isArray,it=Array.prototype.push,at=function(e,t){it.apply(e,nt(t)?t:[t])},ct=Date.prototype.toISOString,pt=tt.default,ut={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:et.encode,encodeValuesOnly:!1,format:pt,formatter:tt.formatters[pt],indices:!1,serializeDate:function(e){return ct.call(e)},skipNulls:!1,strictNullHandling:!1},ft=function e(t,r,o,n,i,a,c,p,u,f,l,y,s,d,b){var h,g=t;if(b.has(t))throw new RangeError("Cyclic object value");if("function"==typeof c?g=c(r,g):g instanceof Date?g=f(g):"comma"===o&&nt(g)&&(g=et.maybeMap(g,(function(e){return e instanceof Date?f(e):e}))),null===g){if(n)return a&&!s?a(r,ut.encoder,d,"key",l):r;g=""}if("string"==typeof(h=g)||"number"==typeof h||"boolean"==typeof h||"symbol"==typeof h||"bigint"==typeof h||et.isBuffer(g))return a?[y(s?r:a(r,ut.encoder,d,"key",l))+"="+y(a(g,ut.encoder,d,"value",l))]:[y(r)+"="+y(String(g))];var m,v=[];if(void 0===g)return v;if("comma"===o&&nt(g))m=[{value:g.length>0?g.join(",")||null:void 0}];else if(nt(c))m=c;else{var S=Object.keys(g);m=p?S.sort(p):S}for(var j=0;j<m.length;++j){var w=m[j],O="object"==typeof w&&void 0!==w.value?w.value:g[w];if(!i||null!==O){var A=nt(g)?"function"==typeof o?o(r,w):r:r+(u?"."+w:"["+w+"]");b.set(t,!0);var P=Ze();at(v,e(O,A,o,n,i,a,c,p,u,f,l,y,s,d,P))}}return v},lt=Ye,yt=Object.prototype.hasOwnProperty,st=Array.isArray,dt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:lt.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},bt=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},ht=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},gt=function(e,t,r,o){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(n),c=a?n.slice(0,a.index):n,p=[];if(c){if(!r.plainObjects&&yt.call(Object.prototype,c)&&!r.allowPrototypes)return;p.push(c)}for(var u=0;r.depth>0&&null!==(a=i.exec(n))&&u<r.depth;){if(u+=1,!r.plainObjects&&yt.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;p.push(a[1])}return a&&p.push("["+n.slice(a.index)+"]"),function(e,t,r,o){for(var n=o?t:ht(t,r),i=e.length-1;i>=0;--i){var a,c=e[i];if("[]"===c&&r.parseArrays)a=[].concat(n);else{a=r.plainObjects?Object.create(null):{};var p="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=parseInt(p,10);r.parseArrays||""!==p?!isNaN(u)&&c!==p&&String(u)===p&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=n:a[p]=n:a={0:n}}n=a}return n}(p,t,r,o)}},mt={formats:Ve,parse:function(e,t){var r=function(e){if(!e)return dt;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?dt.charset:e.charset;return{allowDots:void 0===e.allowDots?dt.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:dt.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:dt.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:dt.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:dt.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:dt.comma,decoder:"function"==typeof e.decoder?e.decoder:dt.decoder,delimiter:"string"==typeof e.delimiter||lt.isRegExp(e.delimiter)?e.delimiter:dt.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:dt.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:dt.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:dt.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:dt.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:dt.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var o="string"==typeof e?function(e,t){var r,o={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=n.split(t.delimiter,i),c=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?p="utf-8":"utf8=%26%2310003%3B"===a[r]&&(p="iso-8859-1"),c=r,r=a.length);for(r=0;r<a.length;++r)if(r!==c){var u,f,l=a[r],y=l.indexOf("]="),s=-1===y?l.indexOf("="):y+1;-1===s?(u=t.decoder(l,dt.decoder,p,"key"),f=t.strictNullHandling?null:""):(u=t.decoder(l.slice(0,s),dt.decoder,p,"key"),f=lt.maybeMap(ht(l.slice(s+1),t),(function(e){return t.decoder(e,dt.decoder,p,"value")}))),f&&t.interpretNumericEntities&&"iso-8859-1"===p&&(f=bt(f)),l.indexOf("[]=")>-1&&(f=st(f)?[f]:f),yt.call(o,u)?o[u]=lt.combine(o[u],f):o[u]=f}return o}(e,r):e,n=r.plainObjects?Object.create(null):{},i=Object.keys(o),a=0;a<i.length;++a){var c=i[a],p=gt(c,o[c],r,"string"==typeof e);n=lt.merge(n,p,r)}return!0===r.allowSparse?n:lt.compact(n)},stringify:function(e,t){var r,o=e,n=function(e){if(!e)return ut;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||ut.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=tt.default;if(void 0!==e.format){if(!rt.call(tt.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var o=tt.formatters[r],n=ut.filter;return("function"==typeof e.filter||nt(e.filter))&&(n=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:ut.addQueryPrefix,allowDots:void 0===e.allowDots?ut.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:ut.charsetSentinel,delimiter:void 0===e.delimiter?ut.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:ut.encode,encoder:"function"==typeof e.encoder?e.encoder:ut.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:ut.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:ut.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:ut.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:ut.strictNullHandling}}(t);"function"==typeof n.filter?o=(0,n.filter)("",o):nt(n.filter)&&(r=n.filter);var i,a=[];if("object"!=typeof o||null===o)return"";i=t&&t.arrayFormat in ot?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=ot[i];r||(r=Object.keys(o)),n.sort&&r.sort(n.sort);for(var p=Ze(),u=0;u<r.length;++u){var f=r[u];n.skipNulls&&null===o[f]||at(a,ft(o[f],f,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var l=a.join(n.delimiter),y=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&("iso-8859-1"===n.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),l.length>0?y+l:""}},vt=function(e){return null!==e&&"string"==typeof e};e.Client=function(e){var o=e.serviceDomain,n=e.apiKey,i=e.globalDraftKey;if(!o||!n)throw new Error("parameter is required (check serviceDomain and apiKey)");if(!vt(o)||!vt(n))throw new Error("parameter is not string");var c="https://"+o+".microcms.io/api/v1",p=function(e){var o=e.endpoint,p=e.contentId,u=e.queries,f=void 0===u?{}:u;return t(void 0,void 0,void 0,(function(){var e,t,u,l,y;return r(this,(function(r){switch(r.label){case 0:e=function(e){if(null===(t=e)||"object"!=typeof t)throw new Error("queries is not object");var t;return mt.stringify(e)}(f),t={headers:{"X-API-KEY":n}},i&&Object.assign(t.headers,{"X-GLOBAL-DRAFT-KEY":i}),u=c+"/"+o+(p?"/"+p:"")+(e?"?"+e:""),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,a(u,t)];case 2:return[2,r.sent().json()];case 3:if((l=r.sent()).data)throw l.data;if(null===(y=l.response)||void 0===y?void 0:y.data)throw l.response.data;throw l;case 4:return[2]}}))}))};return{get:function(e){var o=e.endpoint,n=e.contentId,i=e.queries,a=void 0===i?{}:i;return t(void 0,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return o?[4,p({endpoint:o,contentId:n,queries:a})]:[2,Promise.reject(new Error("endpoint is required"))];case 1:return[2,e.sent()]}}))}))}}},Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "microcms-js-sdk", | ||
"version": "0.0.9", | ||
"version": "0.1.0", | ||
"description": "JavaScript SDK Client for microCMS.", | ||
@@ -20,18 +20,10 @@ "main": "./dist/cjs/microcms-js-sdk.js", | ||
}, | ||
"engines": { | ||
"node": ">=10.0.0" | ||
}, | ||
"files": ["dist"], | ||
"dependencies": { | ||
"node-fetch": "^2.6.1", | ||
"qs": "^6.10.1", | ||
"query-string": "^7.0.0" | ||
"qs": "^6.10.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.13.16", | ||
"@babel/core": "^7.13.16", | ||
"@babel/plugin-proposal-export-default-from": "^7.12.13", | ||
"@babel/polyfill": "^7.12.1", | ||
"@babel/preset-env": "^7.13.15", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
@@ -45,5 +37,2 @@ "@rollup/plugin-node-resolve": "^13.0.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-loader": "^8.2.2", | ||
"babel-plugin-add-module-exports": "^1.0.4", | ||
"cross-fetch": "^3.1.4", | ||
"eslint": "^7.25.0", | ||
@@ -57,6 +46,2 @@ "eslint-config-prettier": "^8.3.0", | ||
"rollup": "^2.47.0", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-builtins": "^2.1.2", | ||
"rollup-plugin-node-globals": "^1.4.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
@@ -63,0 +48,0 @@ "rollup-plugin-typescript2": "^0.30.0", |
@@ -22,3 +22,3 @@ # microCMS JavaScript SDK | ||
``` | ||
https://unpkg.com/microcms-js-sdk@latest/dist/umd/microcms-js-sdk.js | ||
<script src="https://unpkg.com/microcms-js-sdk@latest/dist/umd/microcms-js-sdk.js"></script> | ||
``` | ||
@@ -31,4 +31,4 @@ | ||
```javascript | ||
const { Client } = require("microcms-js-sdk"); // CommonJS | ||
import { Client } from 'microcms-js-sdk'; //ES6 | ||
const Client = require("microcms-js-sdk"); // CommonJS | ||
import Client from 'microcms-js-sdk'; //ES6 | ||
@@ -35,0 +35,0 @@ // Initialize Client SDK. |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
59221
2
21
348
3
- Removedquery-string@^7.0.0
- Removeddecode-uri-component@0.2.2(transitive)
- Removedfilter-obj@1.1.0(transitive)
- Removedquery-string@7.1.3(transitive)
- Removedsplit-on-first@1.1.0(transitive)
- Removedstrict-uri-encode@2.0.0(transitive)