From 331cfaa576b9cb9ace91b1b3cc3463c7200671a6 Mon Sep 17 00:00:00 2001 From: JoseZapata3 <87088700+JoseZapata3@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:59:47 -0500 Subject: [PATCH 1/3] docs: Update README (#146) --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ed68432..b0214e2 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,7 @@ [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/6469/badge)](https://bestpractices.coreinfrastructure.org/projects/6469) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/kommitters/editorjs-inline-image/badge)](https://api.securityscorecards.dev/projects/github.com/kommitters/editorjs-inline-image) - -Image tool for [Editor.js](https://editorjs.io). - -Embed images from [Unsplash](https://unsplash.com/), blob or URLs. - +Image tool for [Editor.js](https://editorjs.io) that enables you to embed images from [Unsplash](https://unsplash.com/), blobs, or URLs directly into your content. ![](assets/demo.gif) ## Notes @@ -23,6 +19,8 @@ Extends the functionality of [simple-image](https://github.com/editor-js/simple- ## Installation +You can install the tool via npm or load it from a CDN. + ### Install via NPM Get the package ```shell @@ -75,7 +73,7 @@ const editor = EditorJS({ | Field | Type | Description | | -------------- | --------- | ------------------------------- | | embed | `{display: boolean}` | You could display or not the embed tab, If you don't fill the embed config by default the value is set on `true`. | -| unsplash | `{appName: string, apiUrl: string, maxResults: string}` | Config for **Unsplash API**. Contains 3 fields:

**appName**: Unsplash `Application Name`.

**apiUrl**: URL of the Proxy for Unsplash API.

**maxResults**: Max number of images per search (default 30). | +| unsplash | `{appName: string, apiUrl: string, maxResults: Number}` | Config for **Unsplash API**. Contains 3 fields:

**appName**: Unsplash `Application Name`.

**apiUrl**: URL of the Proxy for Unsplash API.

**maxResults**: Max number of images per search (default 30). | ## Tool's tunes From 46b3650dfc94dbb11af33245aa0898e8f00e59c9 Mon Sep 17 00:00:00 2001 From: JoseZapata3 <87088700+JoseZapata3@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:48:27 -0500 Subject: [PATCH 2/3] feat: add support for selected image quality parameters (#147) --- dist/bundle.js | 2 +- src/controlPanel.js | 2 +- src/unsplashClient.js | 17 +++++++++++++++++ test/fixtures/unsplashClient.js | 5 +++++ test/unsplashClient.test.js | 22 ++++++++++++++++++++++ 5 files changed, 46 insertions(+), 2 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 65b7aa7..42b7cc4 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.InlineImage=t():e.InlineImage=t()}(self,(()=>(()=>{var e={523:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(601),i=n.n(r),o=n(314),s=n.n(o)()(i());s.push([e.id,'.cdx-loader {\n border: none;\n margin: auto;\n}\n\n.inline-image .cdx-loader {\n min-height: 200px;\n}\n\n.inline-image .cdx-input {\n margin-top: 10px;\n}\n\n.inline-image img {\n max-width: 100%;\n vertical-align: bottom;\n}\n\n.inline-image__caption[contentEditable="true"][data-placeholder]:empty::before {\n position: absolute;\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n opacity: 0;\n}\n\n.inline-image__caption[contentEditable="true"][data-placeholder]:empty::before {\n opacity: 1;\n}\n\n.inline-image__caption[contentEditable="true"][data-placeholder]:empty:focus::before {\n opacity: 0;\n}\n\n.inline-image__picture--withBackground {\n background: #eff2f5;\n padding: 10px;\n text-align: center;\n}\n\n.inline-image__picture--withBackground img {\n max-width: 60%;\n margin: 0 auto;\n}\n\n.inline-image__picture--withBorder {\n border: 1px solid #e8e8eb;\n padding: 1px;\n}\n\n.inline-image__picture--stretched img {\n max-width: none;\n width: 100%;\n}\n\n.inline-image__tab-wrapper {\n display: flex;\n margin-bottom: 5px;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n border-bottom-color: lightgray;\n}\n\n.inline-image__tab {\n padding: 5px;\n cursor: pointer;\n}\n\n.inline-image__tab:hover {\n background: #eff2f5;\n}\n\n.inline-image__tab.active {\n border-width: 0 0 3px 0;\n border-style: solid;\n border-color: #388ae5;\n}\n\n.inline-image__embed-button {\n width: 50%;\n background-color: #388ae5;\n color: white;\n text-align: center;\n margin: auto;\n cursor: pointer;\n}\n\n.inline-image__embed-button:hover {\n opacity: 0.9;\n}\n\n.inline-image__control-panel {\n padding: 10px;\n border-radius: 4px;\n box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px,\n rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;\n}\n\n.inline-image__image-gallery {\n max-height: 400px;\n display: flex;\n flex-wrap: wrap;\n align-content: flex-start;\n background: white;\n margin: 5px;\n}\n\n.inline-image__img-wrapper {\n width: 25%;\n}\n\n.inline-image__thumb {\n display: block;\n object-fit: cover;\n border-radius: 10px;\n width: 90%;\n height: 105px;\n padding: 5px;\n object-position: center 0%;\n cursor: pointer;\n}\n\n.inline-image__image-credits {\n font-size: 12px;\n text-align: center;\n margin-bottom: 5px;\n color: gray;\n}\n\n.inline-image__image-credits a {\n color: gray;\n}\n\n.inline-image__search {\n margin: 10px;\n width: 96%;\n}\n\n.inline-image__no-results {\n width: 100%;\n text-align: center;\n margin: 20px;\n}\n\n.inline-image__orientation-wrapper {\n margin: 10px;\n}\n\n.inline-image__orientation-button {\n margin-right: 5px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: #f0f0f0;\n background-color: transparent;\n cursor: pointer;\n}\n\n.inline-image__orientation-button.active {\n background-color: #388ae5;\n color: white;\n border-color: #388ae5;\n}\n\n.inline-image__orientation-button.active:hover {\n background-color: #388ae5;\n color: white;\n}\n\n.inline-image__orientation-button:hover {\n background-color: #f0f0f0;\n}\n\n.landscape-img {\n height: auto;\n aspect-ratio: 3/2;\n}\n\n.portrait-img {\n height: auto;\n aspect-ratio: 4/5;\n}\n\n.squarish-img {\n height: auto;\n aspect-ratio: 1/1;\n}\n\n.panel-hidden {\n display: none;\n}\n\n.panel-scroll {\n overflow-y: scroll;\n}\n\n.modal {\n z-index: 1;\n position: fixed;\n display: none;\n inset: 0;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.8);\n}\n\n.modal-content {\n position: relative;\n margin: 0;\n}\n\n.modal-img {\n object-fit: cover;\n max-width: 100%;\n max-height: 100%;\n}\n\n.close {\n color: #aaaaaa;\n font-size: 28px;\n font-weight: bold;\n position: absolute;\n right: 10px;\n}\n\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n}\n',""]);const a=s},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},601:e=>{"use strict";e.exports=function(e){return e[1]}},72:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},355:e=>{e.exports=''},333:e=>{e.exports=''},62:e=>{e.exports=''}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}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.nc=void 0;var r={};return(()=>{"use strict";n.d(r,{default:()=>Wt});var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>Ee,hasStandardBrowserEnv:()=>Ce,hasStandardBrowserWebWorkerEnv:()=>_e});var t=n(72),i=n.n(t),o=n(825),s=n.n(o),a=n(659),c=n.n(a),l=n(56),u=n.n(l),d=n(540),p=n.n(d),h=n(113),f=n.n(h),m=n(523),g={};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(e);return Array.isArray(r)?(t=o.classList).add.apply(t,function(e){if(Array.isArray(e))return y(e)}(n=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):r&&o.classList.add(r),Object.keys(i).forEach((function(e){o[e]=i[e]})),o},v=function(e){var t=e.appName,n=e.author,r=e.profileLink,i=b("div","inline-image__image-credits"),o=b("div",null,{innerHTML:"by ",style:"display: inline;"}),s=b("a","",{href:"".concat(r,"?utm_source=").concat(t,"&utm_medium=referral"),innerHTML:n,target:"_blank"}),a=b("div",null,{innerHTML:" on ",style:"display: inline;"}),c=b("a","",{href:"https://unsplash.com/?utm_source=".concat(t,"&utm_medium=referral"),innerHTML:"Unsplash",target:"_blank"});return i.appendChild(o),i.appendChild(s),i.appendChild(a),i.appendChild(c),i};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,t){for(var n=0;n{const t=T.call(e);return k[t]||(k[t]=t.slice(8,-1).toLowerCase())});var k;const j=e=>(e=e.toLowerCase(),t=>x(t)===e),P=e=>t=>typeof t===e,{isArray:A}=Array,L=P("undefined"),R=j("ArrayBuffer"),B=P("string"),I=P("function"),N=P("number"),U=e=>null!==e&&"object"==typeof e,D=e=>{if("object"!==x(e))return!1;const t=_(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},H=j("Date"),F=j("File"),M=j("Blob"),q=j("FileList"),z=j("URLSearchParams");function W(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),A(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,G=e=>!L(e)&&e!==J,K=($="undefined"!=typeof Uint8Array&&_(Uint8Array),e=>$&&e instanceof $);var $;const Z=j("HTMLFormElement"),X=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q=j("RegExp"),Y=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};W(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},ee="abcdefghijklmnopqrstuvwxyz",te="0123456789",ne={DIGIT:te,ALPHA:ee,ALPHA_DIGIT:ee+ee.toUpperCase()+te},re=j("AsyncFunction"),ie={isArray:A,isArrayBuffer:R,isBuffer:function(e){return null!==e&&!L(e)&&null!==e.constructor&&!L(e.constructor)&&I(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||I(e.append)&&("formdata"===(t=x(e))||"object"===t&&I(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&R(e.buffer),t},isString:B,isNumber:N,isBoolean:e=>!0===e||!1===e,isObject:U,isPlainObject:D,isUndefined:L,isDate:H,isFile:F,isBlob:M,isRegExp:Q,isFunction:I,isStream:e=>U(e)&&I(e.pipe),isURLSearchParams:z,isTypedArray:K,isFileList:q,forEach:W,merge:function e(){const{caseless:t}=G(this)&&this||{},n={},r=(r,i)=>{const o=t&&V(n,i)||i;D(n[o])&&D(r)?n[o]=e(n[o],r):D(r)?n[o]=e({},r):A(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(W(t,((t,r)=>{n&&I(t)?e[r]=C(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:x,kindOfTest:j,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(A(e))return e;let t=e.length;if(!N(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Z,hasOwnProperty:X,hasOwnProp:X,reduceDescriptors:Y,freezeMethods:e=>{Y(e,((t,n)=>{if(I(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];I(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return A(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:V,global:J,isContextDefined:G,ALPHABET:ne,generateString:(e=16,t=ne.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&I(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(U(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=A(e)?[]:{};return W(e,((e,t)=>{const o=n(e,r+1);!L(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:re,isThenable:e=>e&&(U(e)||I(e))&&I(e.then)&&I(e.catch)};function oe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}ie.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const se=oe.prototype,ae={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ae[e]={value:e}})),Object.defineProperties(oe,ae),Object.defineProperty(se,"isAxiosError",{value:!0}),oe.from=(e,t,n,r,i,o)=>{const s=Object.create(se);return ie.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const ce=oe;function le(e){return ie.isPlainObject(e)||ie.isArray(e)}function ue(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function de(e,t,n){return e?e.concat(t).map((function(e,t){return e=ue(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const pe=ie.toFlatObject(ie,{},null,(function(e){return/^is[A-Z]/.test(e)})),he=function(e,t,n){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ie.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ie.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ie.isDate(e))return e.toISOString();if(!a&&ie.isBlob(e))throw new ce("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(e)||ie.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(ie.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ie.isArray(e)&&function(e){return ie.isArray(e)&&!e.some(le)}(e)||(ie.isFileList(e)||ie.endsWith(n,"[]"))&&(a=ie.toArray(e)))return n=ue(n),a.forEach((function(e,r){!ie.isUndefined(e)&&null!==e&&t.append(!0===s?de([n],r,o):null===s?n:n+"[]",c(e))})),!1;return!!le(e)||(t.append(de(i,n,o),c(e)),!1)}const u=[],d=Object.assign(pe,{defaultVisitor:l,convertValue:c,isVisitable:le});if(!ie.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ie.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),ie.forEach(n,(function(n,o){!0===(!(ie.isUndefined(n)||null===n)&&i.call(t,n,ie.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function me(e,t){this._pairs=[],e&&he(e,this,t)}const ge=me.prototype;ge.append=function(e,t){this._pairs.push([e,t])},ge.toString=function(e){const t=e?function(t){return e.call(this,t,fe)}:fe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ye=me;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,n){if(!t)return e;const r=n&&n.encode||be,i=n&&n.serialize;let o;if(o=i?i(t,n):ie.isURLSearchParams(t)?t.toString():new ye(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const we=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ie.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ye,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ee="undefined"!=typeof window&&"undefined"!=typeof document,Ce=(Te="undefined"!=typeof navigator&&navigator.product,Ee&&["ReactNative","NativeScript","NS"].indexOf(Te)<0);var Te;const _e="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,xe={...e,...Se},ke=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;return o=!o&&ie.isArray(r)?r.length:o,a?(ie.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s):(r[o]&&ie.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&ie.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},je={transitional:Oe,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=ie.isObject(e);if(i&&ie.isHTMLForm(e)&&(e=new FormData(e)),ie.isFormData(e))return r?JSON.stringify(ke(e)):e;if(ie.isArrayBuffer(e)||ie.isBuffer(e)||ie.isStream(e)||ie.isFile(e)||ie.isBlob(e))return e;if(ie.isArrayBufferView(e))return e.buffer;if(ie.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return he(e,new xe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return xe.isNode&&ie.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=ie.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return he(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(ie.isString(e))try{return(0,JSON.parse)(e),ie.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||je.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&ie.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw ce.from(e,ce.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xe.classes.FormData,Blob:xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],(e=>{je.headers[e]={}}));const Pe=je,Ae=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Le=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Be(e){return!1===e||null==e?e:ie.isArray(e)?e.map(Be):String(e)}function Ie(e,t,n,r,i){return ie.isFunction(r)?r.call(this,t,n):(i&&(t=n),ie.isString(t)?ie.isString(r)?-1!==t.indexOf(r):ie.isRegExp(r)?r.test(t):void 0:void 0)}class Ne{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Re(t);if(!i)throw new Error("header name must be a non-empty string");const o=ie.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Be(e))}const o=(e,t)=>ie.forEach(e,((e,n)=>i(e,n,t)));return ie.isPlainObject(e)||e instanceof this.constructor?o(e,t):ie.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ae[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=Re(e)){const n=ie.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ie.isFunction(t))return t.call(this,e,n);if(ie.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Re(e)){const n=ie.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ie(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Re(e)){const i=ie.findKey(n,e);!i||t&&!Ie(0,n[i],i,t)||(delete n[i],r=!0)}}return ie.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Ie(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return ie.forEach(this,((r,i)=>{const o=ie.findKey(n,i);if(o)return t[o]=Be(r),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete t[i],t[s]=Be(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ie.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ie.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Le]=this[Le]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Re(e);t[r]||(function(e,t){const n=ie.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return ie.isArray(e)?e.forEach(r):r(e),this}}Ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ie.reduceDescriptors(Ne.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),ie.freezeMethods(Ne);const Ue=Ne;function De(e,t){const n=this||Pe,r=t||n,i=Ue.from(r.headers);let o=r.data;return ie.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function He(e){return!(!e||!e.__CANCEL__)}function Fe(e,t,n){ce.call(this,null==e?"canceled":e,ce.ERR_CANCELED,t,n),this.name="CanceledError"}ie.inherits(Fe,ce,{__CANCEL__:!0});const Me=Fe,qe=xe.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];ie.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ie.isString(r)&&s.push("path="+r),ie.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ze(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const We=xe.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=ie.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Ve(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];i||(i=c),n[o]=a,r[o]=c;let u=s,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,c=r(a);n=o;const l={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const Je={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const i=Ue.from(e.headers).normalize();let o,s,{responseType:a,withXSRFToken:c}=e;function l(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(ie.isFormData(r))if(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const d=ze(e.baseURL,e.url);function p(){if(!u)return;const r=Ue.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),l()}),(function(e){n(e),l()}),{data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),ve(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(p)},u.onabort=function(){u&&(n(new ce("Request aborted",ce.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new ce("Network Error",ce.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Oe;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new ce(t,r.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,u)),u=null},xe.hasStandardBrowserEnv&&(c&&ie.isFunction(c)&&(c=c(e)),c||!1!==c&&We(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&qe.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in u&&ie.forEach(i.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),ie.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",Ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{u&&(n(!t||t.type?new Me(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);h&&-1===xe.protocols.indexOf(h)?n(new ce("Unsupported protocol "+h+":",ce.ERR_BAD_REQUEST,e)):u.send(r||null)}))}};ie.forEach(Je,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ge=e=>`- ${e}`,Ke=e=>ie.isFunction(e)||null===e||!1===e,$e=e=>{e=ie.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ge).join("\n"):" "+Ge(e[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function Xe(e){return Ze(e),e.headers=Ue.from(e.headers),e.data=De.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$e(e.adapter||Pe.adapter)(e).then((function(t){return Ze(e),t.data=De.call(e,e.transformResponse,t),t.headers=Ue.from(t.headers),t}),(function(t){return He(t)||(Ze(e),t&&t.response&&(t.response.data=De.call(e,e.transformResponse,t.response),t.response.headers=Ue.from(t.response.headers))),Promise.reject(t)}))}const Qe=e=>e instanceof Ue?{...e}:e;function Ye(e,t){t=t||{};const n={};function r(e,t,n){return ie.isPlainObject(e)&&ie.isPlainObject(t)?ie.merge.call({caseless:n},e,t):ie.isPlainObject(t)?ie.merge({},t):ie.isArray(t)?t.slice():t}function i(e,t,n){return ie.isUndefined(t)?ie.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!ie.isUndefined(t))return r(void 0,t)}function s(e,t){return ie.isUndefined(t)?ie.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(Qe(e),Qe(t),!0)};return ie.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=c[r]||i,s=o(e[r],t[r],r);ie.isUndefined(s)&&o!==a||(n[r]=s)})),n}const et={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{et[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const tt={};et.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new ce(r(i," has been removed"+(t?" in "+t:"")),ce.ERR_DEPRECATED);return t&&!tt[i]&&(tt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const nt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new ce("option "+o+" must be "+n,ce.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ce("Unknown option "+o,ce.ERR_BAD_OPTION)}},validators:et},rt=nt.validators;class it{constructor(e){this.defaults=e,this.interceptors={request:new we,response:new we}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ye(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&nt.assertOptions(n,{silentJSONParsing:rt.transitional(rt.boolean),forcedJSONParsing:rt.transitional(rt.boolean),clarifyTimeoutError:rt.transitional(rt.boolean)},!1),null!=r&&(ie.isFunction(r)?t.paramsSerializer={serialize:r}:nt.assertOptions(r,{encode:rt.function,serialize:rt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&ie.merge(i.common,i[t.method]);i&&ie.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Ue.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[Xe.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Me(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new st((function(t){e=t})),cancel:e}}}const at=st,ct={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ct).forEach((([e,t])=>{ct[t]=e}));const lt=ct,ut=function e(t){const n=new ot(t),r=C(ot.prototype.request,n);return ie.extend(r,ot.prototype,n,{allOwnKeys:!0}),ie.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ye(t,n))},r}(Pe);ut.Axios=ot,ut.CanceledError=Me,ut.CancelToken=at,ut.isCancel=He,ut.VERSION="1.6.8",ut.toFormData=he,ut.AxiosError=ce,ut.Cancel=ut.CanceledError,ut.all=function(e){return Promise.all(e)},ut.spread=function(e){return function(t){return e.apply(null,t)}},ut.isAxiosError=function(e){return ie.isObject(e)&&!0===e.isAxiosError},ut.mergeConfig=Ye,ut.AxiosHeaders=Ue,ut.formToJSON=e=>ke(ie.isHTMLForm(e)?new FormData(e):e),ut.getAdapter=$e,ut.HttpStatusCode=lt,ut.default=ut;const dt=ut;function pt(e){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(e)}function ht(e,t){for(var n=0;n(i=(r={width:c,height:l}).width)/(o=r.height)?{width:i,height:i/s}:{width:o*s,height:o},d=u.width,p=u.height;a.style.maxHeight="".concat(p,"px"),a.style.maxWidth="".concat(d,"px")}},{key:"close",value:function(){document.getElementById("inline-image__modal").style.display="none"}},{key:"closeOutside",value:function(){var e=this;document.addEventListener("click",(function(t){"inline-image__modal"===t.target.id&&e.close()}))}}])&&jt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Lt(e){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lt(e)}function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t(()=>{var e={523:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(601),i=n.n(r),o=n(314),s=n.n(o)()(i());s.push([e.id,'.cdx-loader {\n border: none;\n margin: auto;\n}\n\n.inline-image .cdx-loader {\n min-height: 200px;\n}\n\n.inline-image .cdx-input {\n margin-top: 10px;\n}\n\n.inline-image img {\n max-width: 100%;\n vertical-align: bottom;\n}\n\n.inline-image__caption[contentEditable="true"][data-placeholder]:empty::before {\n position: absolute;\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n opacity: 0;\n}\n\n.inline-image__caption[contentEditable="true"][data-placeholder]:empty::before {\n opacity: 1;\n}\n\n.inline-image__caption[contentEditable="true"][data-placeholder]:empty:focus::before {\n opacity: 0;\n}\n\n.inline-image__picture--withBackground {\n background: #eff2f5;\n padding: 10px;\n text-align: center;\n}\n\n.inline-image__picture--withBackground img {\n max-width: 60%;\n margin: 0 auto;\n}\n\n.inline-image__picture--withBorder {\n border: 1px solid #e8e8eb;\n padding: 1px;\n}\n\n.inline-image__picture--stretched img {\n max-width: none;\n width: 100%;\n}\n\n.inline-image__tab-wrapper {\n display: flex;\n margin-bottom: 5px;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n border-bottom-color: lightgray;\n}\n\n.inline-image__tab {\n padding: 5px;\n cursor: pointer;\n}\n\n.inline-image__tab:hover {\n background: #eff2f5;\n}\n\n.inline-image__tab.active {\n border-width: 0 0 3px 0;\n border-style: solid;\n border-color: #388ae5;\n}\n\n.inline-image__embed-button {\n width: 50%;\n background-color: #388ae5;\n color: white;\n text-align: center;\n margin: auto;\n cursor: pointer;\n}\n\n.inline-image__embed-button:hover {\n opacity: 0.9;\n}\n\n.inline-image__control-panel {\n padding: 10px;\n border-radius: 4px;\n box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px,\n rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;\n}\n\n.inline-image__image-gallery {\n max-height: 400px;\n display: flex;\n flex-wrap: wrap;\n align-content: flex-start;\n background: white;\n margin: 5px;\n}\n\n.inline-image__img-wrapper {\n width: 25%;\n}\n\n.inline-image__thumb {\n display: block;\n object-fit: cover;\n border-radius: 10px;\n width: 90%;\n height: 105px;\n padding: 5px;\n object-position: center 0%;\n cursor: pointer;\n}\n\n.inline-image__image-credits {\n font-size: 12px;\n text-align: center;\n margin-bottom: 5px;\n color: gray;\n}\n\n.inline-image__image-credits a {\n color: gray;\n}\n\n.inline-image__search {\n margin: 10px;\n width: 96%;\n}\n\n.inline-image__no-results {\n width: 100%;\n text-align: center;\n margin: 20px;\n}\n\n.inline-image__orientation-wrapper {\n margin: 10px;\n}\n\n.inline-image__orientation-button {\n margin-right: 5px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: #f0f0f0;\n background-color: transparent;\n cursor: pointer;\n}\n\n.inline-image__orientation-button.active {\n background-color: #388ae5;\n color: white;\n border-color: #388ae5;\n}\n\n.inline-image__orientation-button.active:hover {\n background-color: #388ae5;\n color: white;\n}\n\n.inline-image__orientation-button:hover {\n background-color: #f0f0f0;\n}\n\n.landscape-img {\n height: auto;\n aspect-ratio: 3/2;\n}\n\n.portrait-img {\n height: auto;\n aspect-ratio: 4/5;\n}\n\n.squarish-img {\n height: auto;\n aspect-ratio: 1/1;\n}\n\n.panel-hidden {\n display: none;\n}\n\n.panel-scroll {\n overflow-y: scroll;\n}\n\n.modal {\n z-index: 1;\n position: fixed;\n display: none;\n inset: 0;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.8);\n}\n\n.modal-content {\n position: relative;\n margin: 0;\n}\n\n.modal-img {\n object-fit: cover;\n max-width: 100%;\n max-height: 100%;\n}\n\n.close {\n color: #aaaaaa;\n font-size: 28px;\n font-weight: bold;\n position: absolute;\n right: 10px;\n}\n\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n}\n',""]);const a=s},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},601:e=>{"use strict";e.exports=function(e){return e[1]}},72:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},355:e=>{e.exports=''},333:e=>{e.exports=''},62:e=>{e.exports=''}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}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.nc=void 0;var r={};return(()=>{"use strict";n.d(r,{default:()=>Jt});var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>Ee,hasStandardBrowserEnv:()=>Ce,hasStandardBrowserWebWorkerEnv:()=>_e});var t=n(72),i=n.n(t),o=n(825),s=n.n(o),a=n(659),l=n.n(a),c=n(56),u=n.n(c),d=n(540),p=n.n(d),h=n(113),f=n.n(h),m=n(523),g={};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(e);return Array.isArray(r)?(t=o.classList).add.apply(t,function(e){if(Array.isArray(e))return y(e)}(n=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):r&&o.classList.add(r),Object.keys(i).forEach((function(e){o[e]=i[e]})),o},v=function(e){var t=e.appName,n=e.author,r=e.profileLink,i=b("div","inline-image__image-credits"),o=b("div",null,{innerHTML:"by ",style:"display: inline;"}),s=b("a","",{href:"".concat(r,"?utm_source=").concat(t,"&utm_medium=referral"),innerHTML:n,target:"_blank"}),a=b("div",null,{innerHTML:" on ",style:"display: inline;"}),l=b("a","",{href:"https://unsplash.com/?utm_source=".concat(t,"&utm_medium=referral"),innerHTML:"Unsplash",target:"_blank"});return i.appendChild(o),i.appendChild(s),i.appendChild(a),i.appendChild(l),i};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,t){for(var n=0;n{const t=T.call(e);return j[t]||(j[t]=t.slice(8,-1).toLowerCase())});var j;const P=e=>(e=e.toLowerCase(),t=>x(t)===e),k=e=>t=>typeof t===e,{isArray:A}=Array,R=k("undefined"),L=P("ArrayBuffer"),B=k("string"),I=k("function"),U=k("number"),N=e=>null!==e&&"object"==typeof e,D=e=>{if("object"!==x(e))return!1;const t=_(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},H=P("Date"),F=P("File"),M=P("Blob"),q=P("FileList"),z=P("URLSearchParams");function W(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),A(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,G=e=>!R(e)&&e!==J,K=($="undefined"!=typeof Uint8Array&&_(Uint8Array),e=>$&&e instanceof $);var $;const Z=P("HTMLFormElement"),X=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q=P("RegExp"),Y=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};W(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},ee="abcdefghijklmnopqrstuvwxyz",te="0123456789",ne={DIGIT:te,ALPHA:ee,ALPHA_DIGIT:ee+ee.toUpperCase()+te},re=P("AsyncFunction"),ie={isArray:A,isArrayBuffer:L,isBuffer:function(e){return null!==e&&!R(e)&&null!==e.constructor&&!R(e.constructor)&&I(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||I(e.append)&&("formdata"===(t=x(e))||"object"===t&&I(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&L(e.buffer),t},isString:B,isNumber:U,isBoolean:e=>!0===e||!1===e,isObject:N,isPlainObject:D,isUndefined:R,isDate:H,isFile:F,isBlob:M,isRegExp:Q,isFunction:I,isStream:e=>N(e)&&I(e.pipe),isURLSearchParams:z,isTypedArray:K,isFileList:q,forEach:W,merge:function e(){const{caseless:t}=G(this)&&this||{},n={},r=(r,i)=>{const o=t&&V(n,i)||i;D(n[o])&&D(r)?n[o]=e(n[o],r):D(r)?n[o]=e({},r):A(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(W(t,((t,r)=>{n&&I(t)?e[r]=C(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:x,kindOfTest:P,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(A(e))return e;let t=e.length;if(!U(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Z,hasOwnProperty:X,hasOwnProp:X,reduceDescriptors:Y,freezeMethods:e=>{Y(e,((t,n)=>{if(I(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];I(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return A(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:V,global:J,isContextDefined:G,ALPHABET:ne,generateString:(e=16,t=ne.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&I(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(N(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=A(e)?[]:{};return W(e,((e,t)=>{const o=n(e,r+1);!R(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:re,isThenable:e=>e&&(N(e)||I(e))&&I(e.then)&&I(e.catch)};function oe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}ie.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const se=oe.prototype,ae={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ae[e]={value:e}})),Object.defineProperties(oe,ae),Object.defineProperty(se,"isAxiosError",{value:!0}),oe.from=(e,t,n,r,i,o)=>{const s=Object.create(se);return ie.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const le=oe;function ce(e){return ie.isPlainObject(e)||ie.isArray(e)}function ue(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function de(e,t,n){return e?e.concat(t).map((function(e,t){return e=ue(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const pe=ie.toFlatObject(ie,{},null,(function(e){return/^is[A-Z]/.test(e)})),he=function(e,t,n){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ie.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ie.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(ie.isDate(e))return e.toISOString();if(!a&&ie.isBlob(e))throw new le("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(e)||ie.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(ie.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ie.isArray(e)&&function(e){return ie.isArray(e)&&!e.some(ce)}(e)||(ie.isFileList(e)||ie.endsWith(n,"[]"))&&(a=ie.toArray(e)))return n=ue(n),a.forEach((function(e,r){!ie.isUndefined(e)&&null!==e&&t.append(!0===s?de([n],r,o):null===s?n:n+"[]",l(e))})),!1;return!!ce(e)||(t.append(de(i,n,o),l(e)),!1)}const u=[],d=Object.assign(pe,{defaultVisitor:c,convertValue:l,isVisitable:ce});if(!ie.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ie.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),ie.forEach(n,(function(n,o){!0===(!(ie.isUndefined(n)||null===n)&&i.call(t,n,ie.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function me(e,t){this._pairs=[],e&&he(e,this,t)}const ge=me.prototype;ge.append=function(e,t){this._pairs.push([e,t])},ge.toString=function(e){const t=e?function(t){return e.call(this,t,fe)}:fe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ye=me;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,n){if(!t)return e;const r=n&&n.encode||be,i=n&&n.serialize;let o;if(o=i?i(t,n):ie.isURLSearchParams(t)?t.toString():new ye(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const we=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ie.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ye,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ee="undefined"!=typeof window&&"undefined"!=typeof document,Ce=(Te="undefined"!=typeof navigator&&navigator.product,Ee&&["ReactNative","NativeScript","NS"].indexOf(Te)<0);var Te;const _e="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,xe={...e,...Se},je=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;return o=!o&&ie.isArray(r)?r.length:o,a?(ie.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s):(r[o]&&ie.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&ie.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},Pe={transitional:Oe,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=ie.isObject(e);if(i&&ie.isHTMLForm(e)&&(e=new FormData(e)),ie.isFormData(e))return r?JSON.stringify(je(e)):e;if(ie.isArrayBuffer(e)||ie.isBuffer(e)||ie.isStream(e)||ie.isFile(e)||ie.isBlob(e))return e;if(ie.isArrayBufferView(e))return e.buffer;if(ie.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return he(e,new xe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return xe.isNode&&ie.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=ie.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return he(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(ie.isString(e))try{return(0,JSON.parse)(e),ie.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Pe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&ie.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw le.from(e,le.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xe.classes.FormData,Blob:xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],(e=>{Pe.headers[e]={}}));const ke=Pe,Ae=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Re=Symbol("internals");function Le(e){return e&&String(e).trim().toLowerCase()}function Be(e){return!1===e||null==e?e:ie.isArray(e)?e.map(Be):String(e)}function Ie(e,t,n,r,i){return ie.isFunction(r)?r.call(this,t,n):(i&&(t=n),ie.isString(t)?ie.isString(r)?-1!==t.indexOf(r):ie.isRegExp(r)?r.test(t):void 0:void 0)}class Ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Le(t);if(!i)throw new Error("header name must be a non-empty string");const o=ie.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Be(e))}const o=(e,t)=>ie.forEach(e,((e,n)=>i(e,n,t)));return ie.isPlainObject(e)||e instanceof this.constructor?o(e,t):ie.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ae[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=Le(e)){const n=ie.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ie.isFunction(t))return t.call(this,e,n);if(ie.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Le(e)){const n=ie.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ie(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Le(e)){const i=ie.findKey(n,e);!i||t&&!Ie(0,n[i],i,t)||(delete n[i],r=!0)}}return ie.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Ie(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return ie.forEach(this,((r,i)=>{const o=ie.findKey(n,i);if(o)return t[o]=Be(r),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete t[i],t[s]=Be(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ie.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ie.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Re]=this[Re]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Le(e);t[r]||(function(e,t){const n=ie.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return ie.isArray(e)?e.forEach(r):r(e),this}}Ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ie.reduceDescriptors(Ue.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),ie.freezeMethods(Ue);const Ne=Ue;function De(e,t){const n=this||ke,r=t||n,i=Ne.from(r.headers);let o=r.data;return ie.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function He(e){return!(!e||!e.__CANCEL__)}function Fe(e,t,n){le.call(this,null==e?"canceled":e,le.ERR_CANCELED,t,n),this.name="CanceledError"}ie.inherits(Fe,le,{__CANCEL__:!0});const Me=Fe,qe=xe.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];ie.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ie.isString(r)&&s.push("path="+r),ie.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ze(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const We=xe.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=ie.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Ve(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[s];i||(i=l),n[o]=a,r[o]=l;let u=s,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a);n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Je={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const i=Ne.from(e.headers).normalize();let o,s,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(ie.isFormData(r))if(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const d=ze(e.baseURL,e.url);function p(){if(!u)return;const r=Ne.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new le("Request failed with status code "+n.status,[le.ERR_BAD_REQUEST,le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),ve(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(p)},u.onabort=function(){u&&(n(new le("Request aborted",le.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new le("Network Error",le.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Oe;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new le(t,r.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,e,u)),u=null},xe.hasStandardBrowserEnv&&(l&&ie.isFunction(l)&&(l=l(e)),l||!1!==l&&We(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&qe.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in u&&ie.forEach(i.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),ie.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",Ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{u&&(n(!t||t.type?new Me(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);h&&-1===xe.protocols.indexOf(h)?n(new le("Unsupported protocol "+h+":",le.ERR_BAD_REQUEST,e)):u.send(r||null)}))}};ie.forEach(Je,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ge=e=>`- ${e}`,Ke=e=>ie.isFunction(e)||null===e||!1===e,$e=e=>{e=ie.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ge).join("\n"):" "+Ge(e[0]):"as no adapter specified";throw new le("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function Xe(e){return Ze(e),e.headers=Ne.from(e.headers),e.data=De.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$e(e.adapter||ke.adapter)(e).then((function(t){return Ze(e),t.data=De.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t}),(function(t){return He(t)||(Ze(e),t&&t.response&&(t.response.data=De.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)}))}const Qe=e=>e instanceof Ne?{...e}:e;function Ye(e,t){t=t||{};const n={};function r(e,t,n){return ie.isPlainObject(e)&&ie.isPlainObject(t)?ie.merge.call({caseless:n},e,t):ie.isPlainObject(t)?ie.merge({},t):ie.isArray(t)?t.slice():t}function i(e,t,n){return ie.isUndefined(t)?ie.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!ie.isUndefined(t))return r(void 0,t)}function s(e,t){return ie.isUndefined(t)?ie.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(Qe(e),Qe(t),!0)};return ie.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||i,s=o(e[r],t[r],r);ie.isUndefined(s)&&o!==a||(n[r]=s)})),n}const et={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{et[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const tt={};et.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new le(r(i," has been removed"+(t?" in "+t:"")),le.ERR_DEPRECATED);return t&&!tt[i]&&(tt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const nt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new le("options must be an object",le.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new le("option "+o+" must be "+n,le.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new le("Unknown option "+o,le.ERR_BAD_OPTION)}},validators:et},rt=nt.validators;class it{constructor(e){this.defaults=e,this.interceptors={request:new we,response:new we}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ye(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&nt.assertOptions(n,{silentJSONParsing:rt.transitional(rt.boolean),forcedJSONParsing:rt.transitional(rt.boolean),clarifyTimeoutError:rt.transitional(rt.boolean)},!1),null!=r&&(ie.isFunction(r)?t.paramsSerializer={serialize:r}:nt.assertOptions(r,{encode:rt.function,serialize:rt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&ie.merge(i.common,i[t.method]);i&&ie.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Ne.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[Xe.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Me(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new st((function(t){e=t})),cancel:e}}}const at=st,lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lt).forEach((([e,t])=>{lt[t]=e}));const ct=lt,ut=function e(t){const n=new ot(t),r=C(ot.prototype.request,n);return ie.extend(r,ot.prototype,n,{allOwnKeys:!0}),ie.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ye(t,n))},r}(ke);ut.Axios=ot,ut.CanceledError=Me,ut.CancelToken=at,ut.isCancel=He,ut.VERSION="1.6.8",ut.toFormData=he,ut.AxiosError=le,ut.Cancel=ut.CanceledError,ut.all=function(e){return Promise.all(e)},ut.spread=function(e){return function(t){return e.apply(null,t)}},ut.isAxiosError=function(e){return ie.isObject(e)&&!0===e.isAxiosError},ut.mergeConfig=Ye,ut.AxiosHeaders=Ne,ut.formToJSON=e=>je(ie.isHTMLForm(e)?new FormData(e):e),ut.getAdapter=$e,ut.HttpStatusCode=ct,ut.default=ut;const dt=ut;function pt(e){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(e)}function ht(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n(i=(r={width:l,height:c}).width)/(o=r.height)?{width:i,height:i/s}:{width:o*s,height:o},d=u.width,p=u.height;a.style.maxHeight="".concat(p,"px"),a.style.maxWidth="".concat(d,"px")}},{key:"close",value:function(){document.getElementById("inline-image__modal").style.display="none"}},{key:"closeOutside",value:function(){var e=this;document.addEventListener("click",(function(t){"inline-image__modal"===t.target.id&&e.close()}))}}])&&At(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Bt(e){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t { + existingParams.set(key, value); + }); + return `${urlBase}?${existingParams.toString()}`; + } + /** * Download image from Unsplash * Required by Unsplash API Guideline for tracking purposes diff --git a/test/fixtures/unsplashClient.js b/test/fixtures/unsplashClient.js index 1a9d885..eb55a2e 100644 --- a/test/fixtures/unsplashClient.js +++ b/test/fixtures/unsplashClient.js @@ -4,6 +4,11 @@ const unsplashConfig = { apiUrl: 'http://localhost', appName: 'DemoApp', maxResults: 30, + imageParams: { + q: 90, + w: 1500, + fit: 'max', + }, }; /** diff --git a/test/unsplashClient.test.js b/test/unsplashClient.test.js index b0c61e7..b15b14d 100644 --- a/test/unsplashClient.test.js +++ b/test/unsplashClient.test.js @@ -64,4 +64,26 @@ describe('UnsplashClient', () => { }); }); }); + describe('modification of parameters of the selected image', () => { + beforeEach(() => { + unsplashClient = createUnsplashClient(); + }); + it('add new parameters to URL without existing parameters', () => { + const inputUrl = 'https://example.com/image.jpg?ixid=M3w2NTA0MjJ8MHwxfHNlYXJjaHwxfHxjYXR8ZW58MHx8fHwxNzI1NTQzOTQ2fDA&ixlib=rb-4.0.3'; + const result = unsplashClient.dynamicImageResizing(inputUrl); + expect(result).toBe(`${inputUrl}&q=90&w=1500&fit=max`); + }); + + it('modify existing parameters in URL', () => { + const inputUrl = 'https://example.com/image.jpg?ixid=M3w2NTA0MjJ8MHwxfHNlYXJjaHwxfHxjYXR8ZW58MHx8fHwxNzI1NTQzOTQ2fDA&ixlib=rb-4.0.3&q=60&w=100&fit=min'; + const result = unsplashClient.dynamicImageResizing(inputUrl); + expect(result).toBe('https://example.com/image.jpg?ixid=M3w2NTA0MjJ8MHwxfHNlYXJjaHwxfHxjYXR8ZW58MHx8fHwxNzI1NTQzOTQ2fDA&ixlib=rb-4.0.3&q=90&w=1500&fit=max'); + }); + + it('modify the existing and new parameters in the URL', () => { + const inputUrl = 'https://example.com/image.jpg?ixid=M3w2NTA0MjJ8MHwxfHNlYXJjaHwxfHxjYXR8ZW58MHx8fHwxNzI1NTQzOTQ2fDA&ixlib=rb-4.0.3&w=100'; + const result = unsplashClient.dynamicImageResizing(inputUrl); + expect(result).toBe('https://example.com/image.jpg?ixid=M3w2NTA0MjJ8MHwxfHNlYXJjaHwxfHxjYXR8ZW58MHx8fHwxNzI1NTQzOTQ2fDA&ixlib=rb-4.0.3&w=1500&q=90&fit=max'); + }); + }); }); From 8436b1daea8939e848baa595e085730a005c5bbd Mon Sep 17 00:00:00 2001 From: JoseZapata3 <87088700+JoseZapata3@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:31:31 -0500 Subject: [PATCH 3/3] pre release v2.2.0 (#148) --- CHANGELOG.md | 3 +++ README.md | 6 +++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43e79d4..ba79a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 2.2.0 (06.09.2024) +* Add the ability to modify the quality and dimensions of selected images by adding parameters to the image URL in the Unsplash element configuration, in accordance with the Unsplash API. See [PR #147](https://github.com/kommitters/editorjs-inline-image/pull/147) + ## 2.1.1 (25.04.2024) * Add stale issues policy. See [PR #140](https://github.com/kommitters/editorjs-inline-image/pull/140) diff --git a/README.md b/README.md index b0214e2..b1ec184 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,10 @@ const editor = EditorJS({ appName: 'your_app_name', apiUrl: 'https://your-proxy-api-url.com', maxResults: 30, + imageParams: { + q:85, + w:1500, + } } } } @@ -73,7 +77,7 @@ const editor = EditorJS({ | Field | Type | Description | | -------------- | --------- | ------------------------------- | | embed | `{display: boolean}` | You could display or not the embed tab, If you don't fill the embed config by default the value is set on `true`. | -| unsplash | `{appName: string, apiUrl: string, maxResults: Number}` | Config for **Unsplash API**. Contains 3 fields:

**appName**: Unsplash `Application Name`.

**apiUrl**: URL of the Proxy for Unsplash API.

**maxResults**: Max number of images per search (default 30). | +| unsplash | `{appName: string, apiUrl: string, maxResults: Number, imageParams: Object}` | Config for **Unsplash API**. Contains 3 fields:

**appName**: Unsplash `Application Name`.

**apiUrl**: URL of the Proxy for Unsplash API.

**maxResults**: Max number of images per search (default 30).

**imageParams**: Additional configuration parameters for image quality and dimensions. See [Dynamically resizable images](https://unsplash.com/documentation#dynamically-resizable-images) for more information. | ## Tool's tunes diff --git a/package.json b/package.json index 2976aaf..fec85eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "editorjs-inline-image", - "version": "2.1.1", + "version": "2.2.0", "keywords": [ "tool", "image",