@e-llm-studio/citation 0.0.73 → 0.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/BookCitation/BookCitation.js +1 -1
- package/dist/features/BookCitation/BookCitation.js +1 -1
- package/dist/types/src/features/BookCitation/BookCitation.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/_virtual/browser.js +0 -2
- package/dist/_virtual/browser.js.map +0 -1
- package/dist/_virtual/form_data.js +0 -2
- package/dist/_virtual/form_data.js.map +0 -1
- package/dist/_virtual/index14.js +0 -2
- package/dist/_virtual/index14.js.map +0 -1
- package/dist/_virtual/index15.js +0 -2
- package/dist/_virtual/index15.js.map +0 -1
- package/dist/_virtual/index16.js +0 -2
- package/dist/_virtual/index16.js.map +0 -1
- package/dist/_virtual/index17.js +0 -2
- package/dist/_virtual/index17.js.map +0 -1
- package/dist/_virtual/index18.js +0 -2
- package/dist/_virtual/index18.js.map +0 -1
- package/dist/_virtual/index19.js +0 -2
- package/dist/_virtual/index19.js.map +0 -1
- package/dist/_virtual/node.js +0 -2
- package/dist/_virtual/node.js.map +0 -1
- package/dist/_virtual/serialOrdered.js +0 -2
- package/dist/_virtual/serialOrdered.js.map +0 -1
- package/dist/cjs/_virtual/browser.js +0 -2
- package/dist/cjs/_virtual/browser.js.map +0 -1
- package/dist/cjs/_virtual/form_data.js +0 -2
- package/dist/cjs/_virtual/form_data.js.map +0 -1
- package/dist/cjs/_virtual/index14.js +0 -2
- package/dist/cjs/_virtual/index14.js.map +0 -1
- package/dist/cjs/_virtual/index15.js +0 -2
- package/dist/cjs/_virtual/index15.js.map +0 -1
- package/dist/cjs/_virtual/index16.js +0 -2
- package/dist/cjs/_virtual/index16.js.map +0 -1
- package/dist/cjs/_virtual/index17.js +0 -2
- package/dist/cjs/_virtual/index17.js.map +0 -1
- package/dist/cjs/_virtual/index18.js +0 -2
- package/dist/cjs/_virtual/index18.js.map +0 -1
- package/dist/cjs/_virtual/index19.js +0 -2
- package/dist/cjs/_virtual/index19.js.map +0 -1
- package/dist/cjs/_virtual/node.js +0 -2
- package/dist/cjs/_virtual/node.js.map +0 -1
- package/dist/cjs/_virtual/serialOrdered.js +0 -2
- package/dist/cjs/_virtual/serialOrdered.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/index.js +0 -2
- package/dist/cjs/node_modules/asynckit/index.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/abort.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/abort.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/async.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/async.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/defer.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/defer.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/iterate.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/iterate.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/state.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/state.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/terminator.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/terminator.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/parallel.js +0 -2
- package/dist/cjs/node_modules/asynckit/parallel.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/serial.js +0 -2
- package/dist/cjs/node_modules/asynckit/serial.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/serialOrdered.js +0 -2
- package/dist/cjs/node_modules/asynckit/serialOrdered.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/adapters/http.js +0 -2
- package/dist/cjs/node_modules/axios/lib/adapters/http.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/platform/node/index.js +0 -2
- package/dist/cjs/node_modules/axios/lib/platform/node/index.js.map +0 -1
- package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js +0 -2
- package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/browser.js +0 -2
- package/dist/cjs/node_modules/debug/src/browser.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/common.js +0 -2
- package/dist/cjs/node_modules/debug/src/common.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/index.js +0 -2
- package/dist/cjs/node_modules/debug/src/index.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/node.js +0 -2
- package/dist/cjs/node_modules/debug/src/node.js.map +0 -1
- package/dist/cjs/node_modules/decode-named-character-reference/index.js +0 -2
- package/dist/cjs/node_modules/decode-named-character-reference/index.js.map +0 -1
- package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
- package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
- package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
- package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
- package/dist/cjs/node_modules/follow-redirects/debug.js +0 -2
- package/dist/cjs/node_modules/follow-redirects/debug.js.map +0 -1
- package/dist/cjs/node_modules/follow-redirects/index.js +0 -2
- package/dist/cjs/node_modules/follow-redirects/index.js.map +0 -1
- package/dist/cjs/node_modules/form-data/lib/form_data.js +0 -2
- package/dist/cjs/node_modules/form-data/lib/form_data.js.map +0 -1
- package/dist/cjs/node_modules/form-data/lib/populate.js +0 -2
- package/dist/cjs/node_modules/form-data/lib/populate.js.map +0 -1
- package/dist/cjs/node_modules/has-flag/index.js +0 -2
- package/dist/cjs/node_modules/has-flag/index.js.map +0 -1
- package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/cjs/node_modules/mime-db/db.json.js +0 -2
- package/dist/cjs/node_modules/mime-db/db.json.js.map +0 -1
- package/dist/cjs/node_modules/mime-db/index.js +0 -8
- package/dist/cjs/node_modules/mime-db/index.js.map +0 -1
- package/dist/cjs/node_modules/mime-types/index.js +0 -8
- package/dist/cjs/node_modules/mime-types/index.js.map +0 -1
- package/dist/cjs/node_modules/ms/index.js +0 -2
- package/dist/cjs/node_modules/ms/index.js.map +0 -1
- package/dist/cjs/node_modules/proxy-from-env/index.js +0 -2
- package/dist/cjs/node_modules/proxy-from-env/index.js.map +0 -1
- package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
- package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
- package/dist/cjs/node_modules/supports-color/index.js +0 -2
- package/dist/cjs/node_modules/supports-color/index.js.map +0 -1
- package/dist/node_modules/asynckit/index.js +0 -2
- package/dist/node_modules/asynckit/index.js.map +0 -1
- package/dist/node_modules/asynckit/lib/abort.js +0 -2
- package/dist/node_modules/asynckit/lib/abort.js.map +0 -1
- package/dist/node_modules/asynckit/lib/async.js +0 -2
- package/dist/node_modules/asynckit/lib/async.js.map +0 -1
- package/dist/node_modules/asynckit/lib/defer.js +0 -2
- package/dist/node_modules/asynckit/lib/defer.js.map +0 -1
- package/dist/node_modules/asynckit/lib/iterate.js +0 -2
- package/dist/node_modules/asynckit/lib/iterate.js.map +0 -1
- package/dist/node_modules/asynckit/lib/state.js +0 -2
- package/dist/node_modules/asynckit/lib/state.js.map +0 -1
- package/dist/node_modules/asynckit/lib/terminator.js +0 -2
- package/dist/node_modules/asynckit/lib/terminator.js.map +0 -1
- package/dist/node_modules/asynckit/parallel.js +0 -2
- package/dist/node_modules/asynckit/parallel.js.map +0 -1
- package/dist/node_modules/asynckit/serial.js +0 -2
- package/dist/node_modules/asynckit/serial.js.map +0 -1
- package/dist/node_modules/asynckit/serialOrdered.js +0 -2
- package/dist/node_modules/asynckit/serialOrdered.js.map +0 -1
- package/dist/node_modules/axios/lib/adapters/http.js +0 -2
- package/dist/node_modules/axios/lib/adapters/http.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
- package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
- package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/callbackify.js +0 -2
- package/dist/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
- package/dist/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
- package/dist/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/readBlob.js +0 -2
- package/dist/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
- package/dist/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
- package/dist/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
- package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
- package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
- package/dist/node_modules/axios/lib/platform/node/index.js +0 -2
- package/dist/node_modules/axios/lib/platform/node/index.js.map +0 -1
- package/dist/node_modules/combined-stream/lib/combined_stream.js +0 -2
- package/dist/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
- package/dist/node_modules/debug/src/browser.js +0 -2
- package/dist/node_modules/debug/src/browser.js.map +0 -1
- package/dist/node_modules/debug/src/common.js +0 -2
- package/dist/node_modules/debug/src/common.js.map +0 -1
- package/dist/node_modules/debug/src/index.js +0 -2
- package/dist/node_modules/debug/src/index.js.map +0 -1
- package/dist/node_modules/debug/src/node.js +0 -2
- package/dist/node_modules/debug/src/node.js.map +0 -1
- package/dist/node_modules/decode-named-character-reference/index.js +0 -2
- package/dist/node_modules/decode-named-character-reference/index.js.map +0 -1
- package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
- package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
- package/dist/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
- package/dist/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
- package/dist/node_modules/follow-redirects/debug.js +0 -2
- package/dist/node_modules/follow-redirects/debug.js.map +0 -1
- package/dist/node_modules/follow-redirects/index.js +0 -2
- package/dist/node_modules/follow-redirects/index.js.map +0 -1
- package/dist/node_modules/form-data/lib/form_data.js +0 -2
- package/dist/node_modules/form-data/lib/form_data.js.map +0 -1
- package/dist/node_modules/form-data/lib/populate.js +0 -2
- package/dist/node_modules/form-data/lib/populate.js.map +0 -1
- package/dist/node_modules/has-flag/index.js +0 -2
- package/dist/node_modules/has-flag/index.js.map +0 -1
- package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/node_modules/mime-db/db.json.js +0 -2
- package/dist/node_modules/mime-db/db.json.js.map +0 -1
- package/dist/node_modules/mime-db/index.js +0 -8
- package/dist/node_modules/mime-db/index.js.map +0 -1
- package/dist/node_modules/mime-types/index.js +0 -8
- package/dist/node_modules/mime-types/index.js.map +0 -1
- package/dist/node_modules/ms/index.js +0 -2
- package/dist/node_modules/ms/index.js.map +0 -1
- package/dist/node_modules/proxy-from-env/index.js +0 -2
- package/dist/node_modules/proxy-from-env/index.js.map +0 -1
- package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
- package/dist/node_modules/supports-color/index.js +0 -2
- package/dist/node_modules/supports-color/index.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),n=require("react/jsx-runtime"),a=require("react"),t=require("./BookCitation.module.css.js"),s=require("./text-cleaner.js");exports.default=function(i){var o=i.title,l=i.author,r=i.paragraphs,c=i.chevronUpComponent,d=i.chevronDownComponent,u=i.externalLinkComponent,p=i.textToHighlight,v=i.pageNumber,f=i.totalPageNumber,g=void 0===f?null:f,m=i.citationTitle,h=i.customStyle,x=void 0===h?{}:h,_=i.handleExternalLinkClick,b=i.bookCoverImage,y=i.partialMatch,j=void 0!==y&&y,k=i.citationNumber,N=void 0===k?1:k,C=i.defaultState,q=void 0!==C&&C;i.isNonHighlightedBlur,i.toggleBlur;var A=a.useState(q),L=A[0],T=A[1],w=["address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","table","tfoot","ul","video"];a.useEffect((function(){if(L){var e=document.getElementById("quotes-citations-".concat(null!=N?N:""));e&&e.scrollIntoView({behavior:"smooth",block:"center"})}}),[L,p,N]);var B=function(e){void 0===e&&(e="");var n=document.createElement("div");n.innerHTML=e;var a=n.textContent||n.innerText||"";return(a=(a=a.replace(/<\/?[^>]+(>|$)/g,"")).replace(/\s+/g," ")).trim()};function E(n,a,t,s,i,o){var l;void 0===i&&(i=[]),void 0===o&&(o=!1);var r,c,d=e.__assign(e.__assign({},x.highlightedText),{backgroundColor:(null===(l=x.highlightedText)||void 0===l?void 0:l.backgroundColor)||"#eaea79",display:o?"inline":"block",padding:o?"":"2px 4px"}),u=(void 0===(r=d)&&(r={}),Object.entries(r).map((function(e){var n=e[0],a=e[1];return"".concat(n.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})),":").concat(a)})).join(";")),p=a,v=(c=document.createElement("textarea"),function(e){return c.innerHTML=e,c.value});if(i.length>0){if(o){return i.forEach((function(e){e&&(p=function(e,n,a){for(var t='<span id="'.concat(a,'" style="').concat(u,'">'),s="</span>",i=e,o=0,l=new RegExp("(<(?:".concat(w.join("|"),")[^>]*>.*?)(?=<(?:").concat(w.join("|"),")|$)"),"gi"),r=(n.match(l)||[n]).map((function(e){var n=e.match(/^<([a-zA-Z0-9]+)([^>]*)>/);if(n&&w.includes(n[1].toLowerCase())){var a=n[0].length;return n[0]+t+e.slice(a)+s}return t+e+s})).join("");;){var c=i.indexOf(n,o);if(-1===c)break;i=i.slice(0,c)+r+i.slice(c+n.length),o=c+r.length}return i.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi,(function(e,n,a){return w.some((function(e){return new RegExp("<".concat(e,"\\b[^>]*>"),"i").test(a)}))&&(/style\s*=/.test(n)?/display\s*:\s*inline\b/.test(n)?n=n.replace(/display\s*:\s*inline\b/,"display:inline-block"):/display\s*:\s*inline-block\b/.test(n)||(n=n.replace(/style\s*=\s*(['"])(.*?)\1/,(function(e,n,a){return"style=".concat(n).concat(a.trim()," display:inline-block;").concat(n)}))):n+=' style="display:inline-block;"'),"<span".concat(n,">").concat(a,"</span>")}))}(p,e,"Annotation"===t?"quotes-annotations-".concat(null!=s?s:""):"quotes-citations-".concat(null!=s?s:"")))})),p}return i.forEach((function(e){var n=v(e).trim();n&&v(a).trim().toLowerCase()===n.toLowerCase()&&(p='<span id="'.concat("Annotation"===t?"quotes-annotations-".concat(null!=s?s:""):"quotes-citations-".concat(null!=s?s:""),'" style="').concat(u,'">').concat(a,"</span>"))})),p}if(!n||!a)return"Annotation"===t?a:'<span id="quotes-citations" style="'.concat(u,'">').concat(a,"</span>");var f=Array.from(n.matchAll(/`([^`]+)`/g));if(0===f.length)return"Annotation"===t?a:'<span id="quotes-citations" style="'.concat(u,'">').concat(a,"</span>");p=a;var g=!1;return f.forEach((function(e){var n=v(e[1]).trim();if(n){var a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp("(".concat(a,")"),"gi");p.match(s)&&(g=!0,p=p.replace(s,'<span id="'.concat("Annotation"===t?"quotes-annotations":"quotes-citations",'" style="').concat(u,'">$1</span>')))}})),g?p:"Annotation"===t?a:'<span id="quotes-citations" style="'.concat(u,'">').concat(a,"</span>")}return n.jsx(n.Fragment,{children:n.jsxs("span",e.__assign({className:t.default.relativeWrapper,style:null==x?void 0:x.relativeWrapper},{children:[!q&&n.jsx("div",e.__assign({className:t.default.citationButtonWrapper,style:x.citationButtonWrapper},{children:n.jsxs("div",e.__assign({onClick:function(){return T((function(e){return!e}))},className:t.default.citationButton,style:x.citationButton},{children:[n.jsx("span",e.__assign({className:t.default.citationText},{children:m})),L?c:d]}))})),L&&n.jsx("div",e.__assign({className:t.default.expandedWrapper,style:null==x?void 0:x.expandedWrapper},{children:n.jsx("div",e.__assign({className:t.default.expandableContainer,style:null==x?void 0:x.expandableContainer},{children:n.jsx("div",e.__assign({className:t.default.expandableContent,style:null==x?void 0:x.expandableContent},{children:n.jsxs("div",e.__assign({className:t.default.bookBodyContent,style:null==x?void 0:x.bookBodyContent},{children:[!q&&n.jsx("div",e.__assign({className:t.default.header},{children:n.jsxs("div",e.__assign({className:t.default.bookInfo},{children:[b&&n.jsx("div",e.__assign({className:t.default.bookImageWrapper},{children:n.jsx("img",{src:b,alt:o||"Book cover",className:t.default.bookImage})})),n.jsxs("div",e.__assign({className:t.default.bookTextInfo},{children:[n.jsx("h1",e.__assign({className:t.default.bookTitle,style:null==x?void 0:x.bookHeader},{children:o})),l||Array.isArray(l)&&n.jsxs("p",e.__assign({className:t.default.bookAuthor,style:null==x?void 0:x.bookHeader},{children:["by"," ",Array.isArray(l)?l.join(", "):l||""]}))]})),n.jsx("div",e.__assign({onClick:_,className:t.default.externalLink},{children:u}))]}))})),n.jsx("div",e.__assign({className:"relative",style:x.relative},{children:n.jsx("div",e.__assign({className:t.default.container},{children:n.jsxs("div",e.__assign({className:"".concat(t.default.contentWrapper," ").concat(t.default.customScrollbarClass),style:x.customScrollbarClass},{children:[n.jsx("div",{className:t.default.gradientOverlayLeft}),n.jsx("div",{className:t.default.gradientOverlayRight}),n.jsxs("div",e.__assign({className:t.default.contentWrapper},{children:[r.map((function(e,a){s.cleanScannedText(e);var i=!1;return i=j?e.includes(p[0]):p.some((function(n){return B(e).toLowerCase()===B(n).toLowerCase()})),n.jsx("div",{className:"".concat(t.default.paragraph," ").concat(0!==a?t.default.textIndent:""),dangerouslySetInnerHTML:{__html:i?E(r.join("\n"),e,"Citation",N,p,j):e}},a)})),v&&n.jsx("div",e.__assign({className:t.default.pageIndex},{children:n.jsxs("div",e.__assign({className:t.default.pageLabel},{children:[v," ",g&&"of ".concat(g)]}))}))]}))]}))}))}))]}))}))}))}))]}))})};
|
|
2
2
|
//# sourceMappingURL=BookCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as n,Fragment as t,jsxs as a}from"react/jsx-runtime";import{useState as o,useEffect as i}from"react";import r from"./BookCitation.module.css.js";import{cleanScannedText as c}from"./text-cleaner.js";var l=function(l){var s=l.title,d=l.author,u=l.paragraphs,p=l.chevronUpComponent,
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as n,Fragment as t,jsxs as a}from"react/jsx-runtime";import{useState as o,useEffect as i}from"react";import r from"./BookCitation.module.css.js";import{cleanScannedText as c}from"./text-cleaner.js";var l=function(l){var s=l.title,d=l.author,u=l.paragraphs,p=l.chevronUpComponent,m=l.chevronDownComponent,v=l.externalLinkComponent,h=l.textToHighlight,f=l.pageNumber,g=l.totalPageNumber,b=void 0===g?null:g,y=l.citationTitle,k=l.customStyle,N=void 0===k?{}:k,x=l.handleExternalLinkClick,C=l.bookCoverImage,A=l.partialMatch,L=void 0!==A&&A,j=l.citationNumber,q=void 0===j?1:j,w=l.defaultState,B=void 0!==w&&w;l.isNonHighlightedBlur,l.toggleBlur;var T=o(B),E=T[0],I=T[1],W=["address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","table","tfoot","ul","video"];i((function(){if(E){var e=document.getElementById("quotes-citations-".concat(null!=q?q:""));e&&e.scrollIntoView({behavior:"smooth",block:"center"})}}),[E,h,q]);var H=function(e){void 0===e&&(e="");var n=document.createElement("div");n.innerHTML=e;var t=n.textContent||n.innerText||"";return(t=(t=t.replace(/<\/?[^>]+(>|$)/g,"")).replace(/\s+/g," ")).trim()};function S(n,t,a,o,i,r){var c;void 0===i&&(i=[]),void 0===r&&(r=!1);var l,s,d=e(e({},N.highlightedText),{backgroundColor:(null===(c=N.highlightedText)||void 0===c?void 0:c.backgroundColor)||"#eaea79",display:r?"inline":"block",padding:r?"":"2px 4px"}),u=(void 0===(l=d)&&(l={}),Object.entries(l).map((function(e){var n=e[0],t=e[1];return"".concat(n.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})),":").concat(t)})).join(";")),p=t,m=(s=document.createElement("textarea"),function(e){return s.innerHTML=e,s.value});if(i.length>0){if(r){return i.forEach((function(e){e&&(p=function(e,n,t){for(var a='<span id="'.concat(t,'" style="').concat(u,'">'),o="</span>",i=e,r=0,c=new RegExp("(<(?:".concat(W.join("|"),")[^>]*>.*?)(?=<(?:").concat(W.join("|"),")|$)"),"gi"),l=(n.match(c)||[n]).map((function(e){var n=e.match(/^<([a-zA-Z0-9]+)([^>]*)>/);if(n&&W.includes(n[1].toLowerCase())){var t=n[0].length;return n[0]+a+e.slice(t)+o}return a+e+o})).join("");;){var s=i.indexOf(n,r);if(-1===s)break;i=i.slice(0,s)+l+i.slice(s+n.length),r=s+l.length}return i.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi,(function(e,n,t){return W.some((function(e){return new RegExp("<".concat(e,"\\b[^>]*>"),"i").test(t)}))&&(/style\s*=/.test(n)?/display\s*:\s*inline\b/.test(n)?n=n.replace(/display\s*:\s*inline\b/,"display:inline-block"):/display\s*:\s*inline-block\b/.test(n)||(n=n.replace(/style\s*=\s*(['"])(.*?)\1/,(function(e,n,t){return"style=".concat(n).concat(t.trim()," display:inline-block;").concat(n)}))):n+=' style="display:inline-block;"'),"<span".concat(n,">").concat(t,"</span>")}))}(p,e,"Annotation"===a?"quotes-annotations-".concat(null!=o?o:""):"quotes-citations-".concat(null!=o?o:"")))})),p}return i.forEach((function(e){var n=m(e).trim();n&&m(t).trim().toLowerCase()===n.toLowerCase()&&(p='<span id="'.concat("Annotation"===a?"quotes-annotations-".concat(null!=o?o:""):"quotes-citations-".concat(null!=o?o:""),'" style="').concat(u,'">').concat(t,"</span>"))})),p}if(!n||!t)return"Annotation"===a?t:'<span id="quotes-citations" style="'.concat(u,'">').concat(t,"</span>");var v=Array.from(n.matchAll(/`([^`]+)`/g));if(0===v.length)return"Annotation"===a?t:'<span id="quotes-citations" style="'.concat(u,'">').concat(t,"</span>");p=t;var h=!1;return v.forEach((function(e){var n=m(e[1]).trim();if(n){var t=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp("(".concat(t,")"),"gi");p.match(o)&&(h=!0,p=p.replace(o,'<span id="'.concat("Annotation"===a?"quotes-annotations":"quotes-citations",'" style="').concat(u,'">$1</span>')))}})),h?p:"Annotation"===a?t:'<span id="quotes-citations" style="'.concat(u,'">').concat(t,"</span>")}return n(t,{children:a("span",e({className:r.relativeWrapper,style:null==N?void 0:N.relativeWrapper},{children:[!B&&n("div",e({className:r.citationButtonWrapper,style:N.citationButtonWrapper},{children:a("div",e({onClick:function(){return I((function(e){return!e}))},className:r.citationButton,style:N.citationButton},{children:[n("span",e({className:r.citationText},{children:y})),E?p:m]}))})),E&&n("div",e({className:r.expandedWrapper,style:null==N?void 0:N.expandedWrapper},{children:n("div",e({className:r.expandableContainer,style:null==N?void 0:N.expandableContainer},{children:n("div",e({className:r.expandableContent,style:null==N?void 0:N.expandableContent},{children:a("div",e({className:r.bookBodyContent,style:null==N?void 0:N.bookBodyContent},{children:[!B&&n("div",e({className:r.header},{children:a("div",e({className:r.bookInfo},{children:[C&&n("div",e({className:r.bookImageWrapper},{children:n("img",{src:C,alt:s||"Book cover",className:r.bookImage})})),a("div",e({className:r.bookTextInfo},{children:[n("h1",e({className:r.bookTitle,style:null==N?void 0:N.bookHeader},{children:s})),d||Array.isArray(d)&&a("p",e({className:r.bookAuthor,style:null==N?void 0:N.bookHeader},{children:["by"," ",Array.isArray(d)?d.join(", "):d||""]}))]})),n("div",e({onClick:x,className:r.externalLink},{children:v}))]}))})),n("div",e({className:"relative",style:N.relative},{children:n("div",e({className:r.container},{children:a("div",e({className:"".concat(r.contentWrapper," ").concat(r.customScrollbarClass),style:N.customScrollbarClass},{children:[n("div",{className:r.gradientOverlayLeft}),n("div",{className:r.gradientOverlayRight}),a("div",e({className:r.contentWrapper},{children:[u.map((function(e,t){c(e);var a=!1;return a=L?e.includes(h[0]):h.some((function(n){return H(e).toLowerCase()===H(n).toLowerCase()})),n("div",{className:"".concat(r.paragraph," ").concat(0!==t?r.textIndent:""),dangerouslySetInnerHTML:{__html:a?S(u.join("\n"),e,"Citation",q,h,L):e}},t)})),f&&n("div",e({className:r.pageIndex},{children:a("div",e({className:r.pageLabel},{children:[f," ",b&&"of ".concat(b)]}))}))]}))]}))}))}))]}))}))}))}))]}))})};export{l as default};
|
|
2
2
|
//# sourceMappingURL=BookCitation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/BookCitation/BookCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAI1E,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACZ,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,cAAc,CAAC,EAAE,aAAa,CAAC;QAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;QACpC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;KACjC,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,UAAU,CAAC,EAAG,OAAO,CAAA;CACtB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"BookCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/BookCitation/BookCitation.tsx"],"names":[],"mappings":"AAAA,OAAO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AA;IAC9B,UAAU,CAAC,EAAG,OAAO,CAAA;CACtB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwf7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
package/dist/_virtual/browser.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form_data.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/index14.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index14.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/index15.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index15.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/index16.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index16.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/index17.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index17.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/index18.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index18.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/index19.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index19.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/node.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serialOrdered.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form_data.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index14.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index15.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index16.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index17.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index18.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index19.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serialOrdered.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,i=require("./parallel.js"),l=require("./serial.js"),s=require("./serialOrdered.js");exports.__require=function(){return r?e:(r=1,e={parallel:i.__require(),serial:l.__require(),serialOrdered:s.__require()})};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/asynckit/index.js"],"sourcesContent":["module.exports =\n{\n parallel : require('./parallel.js'),\n serial : require('./serial.js'),\n serialOrdered : require('./serialOrdered.js')\n};\n"],"names":["asynckit","parallel","require$$0","serial","require$$1","serialOrdered","require$$2"],"mappings":"6MAAcA,EACd,CACEC,SAAgBC,EAAAA,YAChBC,OAAgBC,EAAAA,YAChBC,cAAgBC,EAAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.__require=function(){if(t)return e;function o(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}return t=1,e=function(e){Object.keys(e.jobs).forEach(o.bind(e)),e.jobs={}}};
|
|
2
|
-
//# sourceMappingURL=abort.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abort.js","sources":["../../../../../node_modules/asynckit/lib/abort.js"],"sourcesContent":["// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n Object.keys(state.jobs).forEach(clean.bind(state));\n\n // reset leftover jobs\n state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n if (typeof this.jobs[key] == 'function')\n {\n this.jobs[key]();\n }\n}\n"],"names":["clean","key","this","jobs","abort_1","state","Object","keys","forEach","bind"],"mappings":"uHAsBA,SAASA,EAAMC,GAEgB,mBAAlBC,KAAKC,KAAKF,IAEnBC,KAAKC,KAAKF,IAEd,YA3BAG,EAOA,SAAeC,GAEbC,OAAOC,KAAKF,EAAMF,MAAMK,QAAQR,EAAMS,KAAKJ,IAG3CA,EAAMF,KAAO,EACf"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,n=require("./defer.js");exports.__require=function(){if(r)return e;r=1;var t=n.__require();return e=function(e){var r=!1;return t((function(){r=!0})),function(n,u){r?e(n,u):t((function(){e(n,u)}))}}};
|
|
2
|
-
//# sourceMappingURL=async.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sources":["../../../../../node_modules/asynckit/lib/async.js"],"sourcesContent":["var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n var isAsync = false;\n\n // check if async happened\n defer(function() { isAsync = true; });\n\n return function async_callback(err, result)\n {\n if (isAsync)\n {\n callback(err, result);\n }\n else\n {\n defer(function nextTick_callback()\n {\n callback(err, result);\n });\n }\n };\n}\n"],"names":["defer","require$$0","async_1","callback","isAsync","err","result"],"mappings":"mJAAA,IAAIA,EAAQC,EAAAA,mBAGZC,EASA,SAAeC,GAEb,IAAIC,GAAU,EAKd,OAFAJ,GAAM,WAAaI,GAAU,CAAO,IAE7B,SAAwBC,EAAKC,GAE9BF,EAEFD,EAASE,EAAKC,GAIdN,GAAM,WAEJG,EAASE,EAAKC,EACtB,IAGA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.__require=function(){return t?e:(t=1,e=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)})};
|
|
2
|
-
//# sourceMappingURL=defer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defer.js","sources":["../../../../../node_modules/asynckit/lib/defer.js"],"sourcesContent":["module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n var nextTick = typeof setImmediate == 'function'\n ? setImmediate\n : (\n typeof process == 'object' && typeof process.nextTick == 'function'\n ? process.nextTick\n : null\n );\n\n if (nextTick)\n {\n nextTick(fn);\n }\n else\n {\n setTimeout(fn, 0);\n }\n}\n"],"names":["defer_1","fn","nextTick","setImmediate","process","setTimeout"],"mappings":"yHAAAA,EAOA,SAAeC,GAEb,IAAIC,EAAkC,mBAAhBC,aAClBA,aAEkB,iBAAXC,SAAkD,mBAApBA,QAAQF,SAC3CE,QAAQF,SACR,KAGFA,EAEFA,EAASD,GAITI,WAAWJ,EAAI,EAEnB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,t=require("./async.js"),i=require("./abort.js");exports.__require=function(){if(r)return e;r=1;var n=t.__require(),s=i.__require();return e=function(e,r,t,i){var u=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[u]=function(e,r,t,i){var s;s=2==e.length?e(t,n(i)):e(t,r,n(i));return s}(r,u,e[u],(function(e,r){u in t.jobs&&(delete t.jobs[u],e?s(t):t.results[u]=r,i(e,t.results))}))}};
|
|
2
|
-
//# sourceMappingURL=iterate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterate.js","sources":["../../../../../node_modules/asynckit/lib/iterate.js"],"sourcesContent":["var async = require('./async.js')\n , abort = require('./abort.js')\n ;\n\n// API\nmodule.exports = iterate;\n\n/**\n * Iterates over each job object\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {object} state - current job status\n * @param {function} callback - invoked when all elements processed\n */\nfunction iterate(list, iterator, state, callback)\n{\n // store current index\n var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;\n\n state.jobs[key] = runJob(iterator, key, list[key], function(error, output)\n {\n // don't repeat yourself\n // skip secondary callbacks\n if (!(key in state.jobs))\n {\n return;\n }\n\n // clean up jobs\n delete state.jobs[key];\n\n if (error)\n {\n // don't process rest of the results\n // stop still active jobs\n // and reset the list\n abort(state);\n }\n else\n {\n state.results[key] = output;\n }\n\n // return salvaged results\n callback(error, state.results);\n });\n}\n\n/**\n * Runs iterator over provided job element\n *\n * @param {function} iterator - iterator to invoke\n * @param {string|number} key - key/index of the element in the list of jobs\n * @param {mixed} item - job description\n * @param {function} callback - invoked after iterator is done with the job\n * @returns {function|mixed} - job abort function or something else\n */\nfunction runJob(iterator, key, item, callback)\n{\n var aborter;\n\n // allow shortcut if iterator expects only two arguments\n if (iterator.length == 2)\n {\n aborter = iterator(item, async(callback));\n }\n // otherwise go with full three arguments\n else\n {\n aborter = iterator(item, key, async(callback));\n }\n\n return aborter;\n}\n"],"names":["async","require$$0","abort","require$$1","iterate_1","list","iterator","state","callback","key","index","jobs","item","aborter","length","runJob","error","output","results"],"mappings":"2KAAA,IAAIA,EAAQC,EAAAA,YACRC,EAAQC,EAAAA,mBAIZC,EAUA,SAAiBC,EAAMC,EAAUC,EAAOC,GAGtC,IAAIC,EAAMF,EAAiB,UAAIA,EAAiB,UAAEA,EAAMG,OAASH,EAAMG,MAEvEH,EAAMI,KAAKF,GAsCb,SAAgBH,EAAUG,EAAKG,EAAMJ,GAEnC,IAAIK,EAKFA,EAFqB,GAAnBP,EAASQ,OAEDR,EAASM,EAAMZ,EAAMQ,IAKrBF,EAASM,EAAMH,EAAKT,EAAMQ,IAGtC,OAAOK,CACT,CAtDoBE,CAAOT,EAAUG,EAAKJ,EAAKI,IAAM,SAASO,EAAOC,GAI3DR,KAAOF,EAAMI,cAMZJ,EAAMI,KAAKF,GAEdO,EAKFd,EAAMK,GAINA,EAAMW,QAAQT,GAAOQ,EAIvBT,EAASQ,EAAOT,EAAMW,SAC1B,GACA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e,r;Object.defineProperty(exports,"__esModule",{value:!0}),exports.__require=function(){return r?e:(r=1,e=function(e,r){var t=!Array.isArray(e),s={index:0,keyedList:t||r?Object.keys(e):null,jobs:{},results:t?{}:[],size:t?Object.keys(e).length:e.length};r&&s.keyedList.sort(t?r:function(t,s){return r(e[t],e[s])});return s})};
|
|
2
|
-
//# sourceMappingURL=state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sources":["../../../../../node_modules/asynckit/lib/state.js"],"sourcesContent":["// API\nmodule.exports = state;\n\n/**\n * Creates initial state object\n * for iteration over list\n *\n * @param {array|object} list - list to iterate over\n * @param {function|null} sortMethod - function to use for keys sort,\n * or `null` to keep them as is\n * @returns {object} - initial state object\n */\nfunction state(list, sortMethod)\n{\n var isNamedList = !Array.isArray(list)\n , initState =\n {\n index : 0,\n keyedList: isNamedList || sortMethod ? Object.keys(list) : null,\n jobs : {},\n results : isNamedList ? {} : [],\n size : isNamedList ? Object.keys(list).length : list.length\n }\n ;\n\n if (sortMethod)\n {\n // sort array keys based on it's values\n // sort object's keys just on own merit\n initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)\n {\n return sortMethod(list[a], list[b]);\n });\n }\n\n return initState;\n}\n"],"names":["state_1","list","sortMethod","isNamedList","Array","isArray","initState","index","keyedList","Object","keys","jobs","results","size","length","sort","a","b"],"mappings":"yHACAA,EAWA,SAAeC,EAAMC,GAEnB,IAAIC,GAAeC,MAAMC,QAAQJ,GAC7BK,EACF,CACEC,MAAW,EACXC,UAAWL,GAAeD,EAAaO,OAAOC,KAAKT,GAAQ,KAC3DU,KAAW,CAAE,EACbC,QAAWT,EAAc,CAAA,EAAK,GAC9BU,KAAWV,EAAcM,OAAOC,KAAKT,GAAMa,OAASb,EAAKa,QAIzDZ,GAIFI,EAAUE,UAAUO,KAAKZ,EAAcD,EAAa,SAASc,EAAGC,GAE9D,OAAOf,EAAWD,EAAKe,GAAIf,EAAKgB,GACtC,GAGE,OAAOX,CACT"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,t=require("./abort.js"),i=require("./async.js");exports.__require=function(){if(r)return e;r=1;var s=t.__require(),u=i.__require();return e=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,s(this),u(e)(null,this.results)}};
|
|
2
|
-
//# sourceMappingURL=terminator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminator.js","sources":["../../../../../node_modules/asynckit/lib/terminator.js"],"sourcesContent":["var abort = require('./abort.js')\n , async = require('./async.js')\n ;\n\n// API\nmodule.exports = terminator;\n\n/**\n * Terminates jobs in the attached state context\n *\n * @this AsyncKitState#\n * @param {function} callback - final callback to invoke after termination\n */\nfunction terminator(callback)\n{\n if (!Object.keys(this.jobs).length)\n {\n return;\n }\n\n // fast forward iteration index\n this.index = this.size;\n\n // abort jobs\n abort(this);\n\n // send back results we have so far\n async(callback)(null, this.results);\n}\n"],"names":["abort","require$$0","async","require$$1","terminator_1","callback","Object","keys","this","jobs","length","index","size","results"],"mappings":"2KAAA,IAAIA,EAAQC,EAAAA,YACRC,EAAQC,EAAAA,mBAIZC,EAQA,SAAoBC,GAElB,IAAKC,OAAOC,KAAKC,KAAKC,MAAMC,OAE1B,OAIFF,KAAKG,MAAQH,KAAKI,KAGlBZ,EAAMQ,MAGNN,EAAMG,EAANH,CAAgB,KAAMM,KAAKK,QAC7B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,t=require("./lib/iterate.js"),i=require("./lib/state.js"),u=require("./lib/terminator.js");exports.__require=function(){if(r)return e;r=1;var n=t.__require(),s=i.__require(),l=u.__require();return e=function(e,r,t){var i=s(e);for(;i.index<(i.keyedList||e).length;)n(e,r,i,(function(e,r){e?t(e,r):0!==Object.keys(i.jobs).length||t(null,i.results)})),i.index++;return l.bind(i,t)},e};
|
|
2
|
-
//# sourceMappingURL=parallel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parallel.js","sources":["../../../../node_modules/asynckit/parallel.js"],"sourcesContent":["var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = parallel;\n\n/**\n * Runs iterator over provided array elements in parallel\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction parallel(list, iterator, callback)\n{\n var state = initState(list);\n\n while (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, function(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n // looks like it's the last one\n if (Object.keys(state.jobs).length === 0)\n {\n callback(null, state.results);\n return;\n }\n });\n\n state.index++;\n }\n\n return terminator.bind(state, callback);\n}\n"],"names":["iterate","require$$0","initState","require$$1","terminator","require$$2","parallel_1","list","iterator","callback","state","index","length","error","result","Object","keys","jobs","results","bind"],"mappings":"sNAAA,IAAIA,EAAaC,EAAAA,YACbC,EAAaC,EAAAA,YACbC,EAAaC,EAAAA,mBAIjBC,EAUA,SAAkBC,EAAMC,EAAUC,GAEhC,IAAIC,EAAQR,EAAUK,GAEtB,KAAOG,EAAMC,OAASD,EAAiB,WAAKH,GAAMK,QAEhDZ,EAAQO,EAAMC,EAAUE,GAAO,SAASG,EAAOC,GAEzCD,EAEFJ,EAASI,EAAOC,GAKqB,IAAnCC,OAAOC,KAAKN,EAAMO,MAAML,QAE1BH,EAAS,KAAMC,EAAMQ,QAG7B,IAEIR,EAAMC,QAGR,OAAOP,EAAWe,KAAKT,EAAOD,EAChC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serial.js","sources":["../../../../node_modules/asynckit/serial.js"],"sourcesContent":["var serialOrdered = require('./serialOrdered.js');\n\n// Public API\nmodule.exports = serial;\n\n/**\n * Runs iterator over provided array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serial(list, iterator, callback)\n{\n return serialOrdered(list, iterator, null, callback);\n}\n"],"names":["serialOrdered","require$$0","serial_1","list","iterator","callback"],"mappings":"2JAAA,IAAIA,EAAgBC,EAAAA,mBAGpBC,EAUA,SAAgBC,EAAMC,EAAUC,GAE9B,OAAOL,EAAcG,EAAMC,EAAU,KAAMC,EAC7C"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("../../_virtual/serialOrdered.js"),t=require("./lib/iterate.js"),i=require("./lib/state.js"),u=require("./lib/terminator.js");exports.__require=function(){if(e)return r.__module.exports;e=1;var n=t.__require(),s=i.__require(),_=u.__require();function o(e,r){return e<r?-1:e>r?1:0}return r.__module.exports=function(e,r,t,i){var u=s(e,t);return n(e,r,u,(function t(s,_){s?i(s,_):(u.index++,u.index<(u.keyedList||e).length?n(e,r,u,t):i(null,u.results))})),_.bind(u,i)},r.__module.exports.ascending=o,r.__module.exports.descending=function(e,r){return-1*o(e,r)},r.__module.exports};
|
|
2
|
-
//# sourceMappingURL=serialOrdered.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serialOrdered.js","sources":["../../../../node_modules/asynckit/serialOrdered.js"],"sourcesContent":["var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = serialOrdered;\n// sorting helpers\nmodule.exports.ascending = ascending;\nmodule.exports.descending = descending;\n\n/**\n * Runs iterator over provided sorted array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} sortMethod - custom sort function\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serialOrdered(list, iterator, sortMethod, callback)\n{\n var state = initState(list, sortMethod);\n\n iterate(list, iterator, state, function iteratorHandler(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n state.index++;\n\n // are we there yet?\n if (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, iteratorHandler);\n return;\n }\n\n // done here\n callback(null, state.results);\n });\n\n return terminator.bind(state, callback);\n}\n\n/*\n * -- Sort methods\n */\n\n/**\n * sort helper to sort array elements in ascending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction ascending(a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * sort helper to sort array elements in descending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction descending(a, b)\n{\n return -1 * ascending(a, b);\n}\n"],"names":["iterate","require$$0","initState","require$$1","terminator","require$$2","ascending","a","b","serialOrderedModule","__module","exports","list","iterator","sortMethod","callback","state","iteratorHandler","error","result","index","length","results","bind","descending"],"mappings":"kRAAA,IAAIA,EAAaC,EAAAA,YACbC,EAAaC,EAAAA,YACbC,EAAaC,EAAAA,YAyDjB,SAASC,EAAUC,EAAGC,GAEpB,OAAOD,EAAIC,GAAK,EAAID,EAAIC,EAAI,EAAI,CAClC,QAxDAC,EAAAC,SAAAC,QAcA,SAAuBC,EAAMC,EAAUC,EAAYC,GAEjD,IAAIC,EAAQd,EAAUU,EAAME,GAuB5B,OArBAd,EAAQY,EAAMC,EAAUG,GAAO,SAASC,EAAgBC,EAAOC,GAEzDD,EAEFH,EAASG,EAAOC,IAIlBH,EAAMI,QAGFJ,EAAMI,OAASJ,EAAiB,WAAKJ,GAAMS,OAE7CrB,EAAQY,EAAMC,EAAUG,EAAOC,GAKjCF,EAAS,KAAMC,EAAMM,SACzB,IAESlB,EAAWmB,KAAKP,EAAOD,EAChC,EAtCAN,WAAAE,QAAAL,UAA4BA,EAC5BG,WAAAE,QAAAa,WA8DA,SAAoBjB,EAAGC,GAErB,OAAQ,EAAIF,EAAUC,EAAGC,EAC3B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils.js"),t=require("../core/settle.js"),r=require("../core/buildFullPath.js"),a=require("../helpers/buildURL.js"),o=require("../../../../_virtual/index9.js"),s=require("http"),n=require("https"),u=require("util"),i=require("../../../../_virtual/index10.js"),d=require("zlib"),l=require("../env/data.js"),f=require("../defaults/transitional.js"),c=require("../core/AxiosError.js"),p=require("../cancel/CanceledError.js"),h=require("../platform/index.js"),m=require("../helpers/fromDataURI.js"),g=require("stream"),b=require("../core/AxiosHeaders.js"),y=require("../helpers/AxiosTransformStream.js"),R=require("events"),E=require("../helpers/formDataToStream.js"),x=require("../helpers/readBlob.js"),B=require("../helpers/ZlibHeaderTransformStream.js"),T=require("../helpers/callbackify.js"),w=require("../helpers/progressEventReducer.js");function L(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var q=L(s),S=L(n),A=L(u),_=L(d),v=L(g);const O={flush:_.default.constants.Z_SYNC_FLUSH,finishFlush:_.default.constants.Z_SYNC_FLUSH},U={flush:_.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:_.default.constants.BROTLI_OPERATION_FLUSH},j=e.default.isFunction(_.default.createBrotliDecompress),{http:D,https:P}=i.default,C=/https:?/,N=h.default.protocols.map((e=>e+":")),F=(e,[t,r])=>(e.on("end",r).on("error",r),t);function k(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function z(e,t,r){let a=t;if(!a&&!1!==a){const e=o.default.getProxyForUrl(r);e&&(a=new URL(e))}if(a){if(a.username&&(a.auth=(a.username||"")+":"+(a.password||"")),a.auth){(a.auth.username||a.auth.password)&&(a.auth=(a.auth.username||"")+":"+(a.auth.password||""));const t=Buffer.from(a.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=a.hostname||a.host;e.hostname=t,e.host=t,e.port=a.port,e.path=r,a.protocol&&(e.protocol=a.protocol.includes(":")?a.protocol:`${a.protocol}:`)}e.beforeRedirects.proxy=function(e){z(e,t,e.href)}}const H="undefined"!=typeof process&&"process"===e.default.kindOf(process),I=(t,r)=>(({address:t,family:r})=>{if(!e.default.isString(t))throw TypeError("address must be a string");return{address:t,family:r||(t.indexOf(".")<0?6:4)}})(e.default.isObject(t)?t:{address:t,family:r});var M=H&&function(o){return s=async function(s,n,u){let{data:i,lookup:d,family:g}=o;const{responseType:L,responseEncoding:H}=o,M=o.method.toUpperCase();let Q,V,Z=!1;if(d){const t=T.default(d,(t=>e.default.isArray(t)?t:[t]));d=(r,a,o)=>{t(r,a,((t,r,s)=>{if(t)return o(t);const n=e.default.isArray(r)?r.map((e=>I(e))):[I(r,s)];a.all?o(t,n):o(t,n[0].address,n[0].family)}))}}const K=new R.EventEmitter,Y=()=>{o.cancelToken&&o.cancelToken.unsubscribe($),o.signal&&o.signal.removeEventListener("abort",$),K.removeAllListeners()};function $(e){K.emit("abort",!e||e.type?new p.default(null,o,V):e)}u(((e,t)=>{Q=!0,t&&(Z=!0,Y())})),K.once("abort",n),(o.cancelToken||o.signal)&&(o.cancelToken&&o.cancelToken.subscribe($),o.signal&&(o.signal.aborted?$():o.signal.addEventListener("abort",$)));const G=r.default(o.baseURL,o.url),J=new URL(G,h.default.hasBrowserEnv?h.default.origin:void 0),W=J.protocol||N[0];if("data:"===W){let r;if("GET"!==M)return t.default(s,n,{status:405,statusText:"method not allowed",headers:{},config:o});try{r=m.default(o.url,"blob"===L,{Blob:o.env&&o.env.Blob})}catch(e){throw c.default.from(e,c.default.ERR_BAD_REQUEST,o)}return"text"===L?(r=r.toString(H),H&&"utf8"!==H||(r=e.default.stripBOM(r))):"stream"===L&&(r=v.default.Readable.from(r)),t.default(s,n,{data:r,status:200,statusText:"OK",headers:new b.default,config:o})}if(-1===N.indexOf(W))return n(new c.default("Unsupported protocol "+W,c.default.ERR_BAD_REQUEST,o));const X=b.default.from(o.headers).normalize();X.set("User-Agent","axios/"+l.VERSION,!1);const{onUploadProgress:ee,onDownloadProgress:te}=o,re=o.maxRate;let ae,oe;if(e.default.isSpecCompliantForm(i)){const e=X.getContentType(/boundary=([-_\w\d]{10,70})/i);i=E.default(i,(e=>{X.set(e)}),{tag:`axios-${l.VERSION}-boundary`,boundary:e&&e[1]||void 0})}else if(e.default.isFormData(i)&&e.default.isFunction(i.getHeaders)){if(X.set(i.getHeaders()),!X.hasContentLength())try{const e=await A.default.promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&X.setContentLength(e)}catch(e){}}else if(e.default.isBlob(i)||e.default.isFile(i))i.size&&X.setContentType(i.type||"application/octet-stream"),X.setContentLength(i.size||0),i=v.default.Readable.from(x.default(i));else if(i&&!e.default.isStream(i)){if(Buffer.isBuffer(i));else if(e.default.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else{if(!e.default.isString(i))return n(new c.default("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",c.default.ERR_BAD_REQUEST,o));i=Buffer.from(i,"utf-8")}if(X.setContentLength(i.length,!1),o.maxBodyLength>-1&&i.length>o.maxBodyLength)return n(new c.default("Request body larger than maxBodyLength limit",c.default.ERR_BAD_REQUEST,o))}const se=e.default.toFiniteNumber(X.getContentLength());let ne,ue;e.default.isArray(re)?(ae=re[0],oe=re[1]):ae=oe=re,i&&(ee||ae)&&(e.default.isStream(i)||(i=v.default.Readable.from(i,{objectMode:!1})),i=v.default.pipeline([i,new y.default({maxRate:e.default.toFiniteNumber(ae)})],e.default.noop),ee&&i.on("progress",F(i,w.progressEventDecorator(se,w.progressEventReducer(w.asyncDecorator(ee),!1,3))))),o.auth&&(ne=(o.auth.username||"")+":"+(o.auth.password||"")),!ne&&J.username&&(ne=J.username+":"+J.password),ne&&X.delete("authorization");try{ue=a.default(J.pathname+J.search,o.params,o.paramsSerializer).replace(/^\?/,"")}catch(e){const t=new Error(e.message);return t.config=o,t.url=o.url,t.exists=!0,n(t)}X.set("Accept-Encoding","gzip, compress, deflate"+(j?", br":""),!1);const ie={path:ue,method:M,headers:X.toJSON(),agents:{http:o.httpAgent,https:o.httpsAgent},auth:ne,protocol:W,family:g,beforeRedirect:k,beforeRedirects:{}};let de;!e.default.isUndefined(d)&&(ie.lookup=d),o.socketPath?ie.socketPath=o.socketPath:(ie.hostname=J.hostname.startsWith("[")?J.hostname.slice(1,-1):J.hostname,ie.port=J.port,z(ie,o.proxy,W+"//"+J.hostname+(J.port?":"+J.port:"")+ie.path));const le=C.test(ie.protocol);if(ie.agent=le?o.httpsAgent:o.httpAgent,o.transport?de=o.transport:0===o.maxRedirects?de=le?S.default:q.default:(o.maxRedirects&&(ie.maxRedirects=o.maxRedirects),o.beforeRedirect&&(ie.beforeRedirects.config=o.beforeRedirect),de=le?P:D),o.maxBodyLength>-1?ie.maxBodyLength=o.maxBodyLength:ie.maxBodyLength=1/0,o.insecureHTTPParser&&(ie.insecureHTTPParser=o.insecureHTTPParser),V=de.request(ie,(function(r){if(V.destroyed)return;const a=[r],u=+r.headers["content-length"];if(te||oe){const t=new y.default({maxRate:e.default.toFiniteNumber(oe)});te&&t.on("progress",F(t,w.progressEventDecorator(u,w.progressEventReducer(w.asyncDecorator(te),!0,3)))),a.push(t)}let i=r;const d=r.req||V;if(!1!==o.decompress&&r.headers["content-encoding"])switch("HEAD"!==M&&204!==r.statusCode||delete r.headers["content-encoding"],(r.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":a.push(_.default.createUnzip(O)),delete r.headers["content-encoding"];break;case"deflate":a.push(new B.default),a.push(_.default.createUnzip(O)),delete r.headers["content-encoding"];break;case"br":j&&(a.push(_.default.createBrotliDecompress(U)),delete r.headers["content-encoding"])}i=a.length>1?v.default.pipeline(a,e.default.noop):a[0];const l=v.default.finished(i,(()=>{l(),Y()})),f={status:r.statusCode,statusText:r.statusMessage,headers:new b.default(r.headers),config:o,request:d};if("stream"===L)f.data=i,t.default(s,n,f);else{const r=[];let a=0;i.on("data",(function(e){r.push(e),a+=e.length,o.maxContentLength>-1&&a>o.maxContentLength&&(Z=!0,i.destroy(),n(new c.default("maxContentLength size of "+o.maxContentLength+" exceeded",c.default.ERR_BAD_RESPONSE,o,d)))})),i.on("aborted",(function(){if(Z)return;const e=new c.default("stream has been aborted",c.default.ERR_BAD_RESPONSE,o,d);i.destroy(e),n(e)})),i.on("error",(function(e){V.destroyed||n(c.default.from(e,null,o,d))})),i.on("end",(function(){try{let t=1===r.length?r[0]:Buffer.concat(r);"arraybuffer"!==L&&(t=t.toString(H),H&&"utf8"!==H||(t=e.default.stripBOM(t))),f.data=t}catch(e){return n(c.default.from(e,null,o,f.request,f))}t.default(s,n,f)}))}K.once("abort",(e=>{i.destroyed||(i.emit("error",e),i.destroy())}))})),K.once("abort",(e=>{n(e),V.destroy(e)})),V.on("error",(function(e){n(c.default.from(e,null,o,V))})),V.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),o.timeout){const e=parseInt(o.timeout,10);if(Number.isNaN(e))return void n(new c.default("error trying to parse `config.timeout` to int",c.default.ERR_BAD_OPTION_VALUE,o,V));V.setTimeout(e,(function(){if(Q)return;let e=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const t=o.transitional||f.default;o.timeoutErrorMessage&&(e=o.timeoutErrorMessage),n(new c.default(e,t.clarifyTimeoutError?c.default.ETIMEDOUT:c.default.ECONNABORTED,o,V)),$()}))}if(e.default.isStream(i)){let e=!1,t=!1;i.on("end",(()=>{e=!0})),i.once("error",(e=>{t=!0,V.destroy(e)})),i.on("close",(()=>{e||t||$(new p.default("Request stream has been aborted",o,V))})),i.pipe(V)}else V.end(i)},new Promise(((e,t)=>{let r,a;const o=(e,t)=>{a||(a=!0,r&&r(e,t))},n=e=>{o(e,!0),t(e)};s((t=>{o(t),e(t)}),n,(e=>r=e)).catch(n)}));var s};exports.default=M;
|
|
2
|
-
//# sourceMappingURL=http.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sources":["../../../../../../node_modules/axios/lib/adapters/http.js"],"sourcesContent":["'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport buildURL from './../helpers/buildURL.js';\nimport proxyFromEnv from 'proxy-from-env';\nimport http from 'http';\nimport https from 'https';\nimport util from 'util';\nimport followRedirects from 'follow-redirects';\nimport zlib from 'zlib';\nimport {VERSION} from '../env/data.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport platform from '../platform/index.js';\nimport fromDataURI from '../helpers/fromDataURI.js';\nimport stream from 'stream';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport AxiosTransformStream from '../helpers/AxiosTransformStream.js';\nimport {EventEmitter} from 'events';\nimport formDataToStream from \"../helpers/formDataToStream.js\";\nimport readBlob from \"../helpers/readBlob.js\";\nimport ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';\nimport callbackify from \"../helpers/callbackify.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\n\nconst zlibOptions = {\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n};\n\nconst brotliOptions = {\n flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n}\n\nconst isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);\n\nconst {http: httpFollow, https: httpsFollow} = followRedirects;\n\nconst isHttps = /https:?/;\n\nconst supportedProtocols = platform.protocols.map(protocol => {\n return protocol + ':';\n});\n\nconst flushOnFinish = (stream, [throttled, flush]) => {\n stream\n .on('end', flush)\n .on('error', flush);\n\n return throttled;\n}\n\n/**\n * If the proxy or config beforeRedirects functions are defined, call them with the options\n * object.\n *\n * @param {Object<string, any>} options - The options object that was passed to the request.\n *\n * @returns {Object<string, any>}\n */\nfunction dispatchBeforeRedirect(options, responseDetails) {\n if (options.beforeRedirects.proxy) {\n options.beforeRedirects.proxy(options);\n }\n if (options.beforeRedirects.config) {\n options.beforeRedirects.config(options, responseDetails);\n }\n}\n\n/**\n * If the proxy or config afterRedirects functions are defined, call them with the options\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} configProxy configuration from Axios options object\n * @param {string} location\n *\n * @returns {http.ClientRequestArgs}\n */\nfunction setProxy(options, configProxy, location) {\n let proxy = configProxy;\n if (!proxy && proxy !== false) {\n const proxyUrl = proxyFromEnv.getProxyForUrl(location);\n if (proxyUrl) {\n proxy = new URL(proxyUrl);\n }\n }\n if (proxy) {\n // Basic proxy authorization\n if (proxy.username) {\n proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');\n }\n\n if (proxy.auth) {\n // Support proxy auth object form\n if (proxy.auth.username || proxy.auth.password) {\n proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');\n }\n const base64 = Buffer\n .from(proxy.auth, 'utf8')\n .toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n options.headers.host = options.hostname + (options.port ? ':' + options.port : '');\n const proxyHost = proxy.hostname || proxy.host;\n options.hostname = proxyHost;\n // Replace 'host' since options is not a URL object\n options.host = proxyHost;\n options.port = proxy.port;\n options.path = location;\n if (proxy.protocol) {\n options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;\n }\n }\n\n options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {\n // Configure proxy for redirected request, passing the original config proxy to apply\n // the exact same logic as if the redirected request was performed by axios directly.\n setProxy(redirectOptions, configProxy, redirectOptions.href);\n };\n}\n\nconst isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';\n\n// temporary hotfix\n\nconst wrapAsync = (asyncExecutor) => {\n return new Promise((resolve, reject) => {\n let onDone;\n let isDone;\n\n const done = (value, isRejected) => {\n if (isDone) return;\n isDone = true;\n onDone && onDone(value, isRejected);\n }\n\n const _resolve = (value) => {\n done(value);\n resolve(value);\n };\n\n const _reject = (reason) => {\n done(reason, true);\n reject(reason);\n }\n\n asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);\n })\n};\n\nconst resolveFamily = ({address, family}) => {\n if (!utils.isString(address)) {\n throw TypeError('address must be a string');\n }\n return ({\n address,\n family: family || (address.indexOf('.') < 0 ? 6 : 4)\n });\n}\n\nconst buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});\n\n/*eslint consistent-return:0*/\nexport default isHttpAdapterSupported && function httpAdapter(config) {\n return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {\n let {data, lookup, family} = config;\n const {responseType, responseEncoding} = config;\n const method = config.method.toUpperCase();\n let isDone;\n let rejected = false;\n let req;\n\n if (lookup) {\n const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);\n // hotfix to support opt.all option which is required for node 20.x\n lookup = (hostname, opt, cb) => {\n _lookup(hostname, opt, (err, arg0, arg1) => {\n if (err) {\n return cb(err);\n }\n\n const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];\n\n opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);\n });\n }\n }\n\n // temporary internal emitter until the AxiosRequest class will be implemented\n const emitter = new EventEmitter();\n\n const onFinished = () => {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(abort);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', abort);\n }\n\n emitter.removeAllListeners();\n }\n\n onDone((value, isRejected) => {\n isDone = true;\n if (isRejected) {\n rejected = true;\n onFinished();\n }\n });\n\n function abort(reason) {\n emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);\n }\n\n emitter.once('abort', reject);\n\n if (config.cancelToken || config.signal) {\n config.cancelToken && config.cancelToken.subscribe(abort);\n if (config.signal) {\n config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);\n }\n }\n\n // Parse url\n const fullPath = buildFullPath(config.baseURL, config.url);\n const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);\n const protocol = parsed.protocol || supportedProtocols[0];\n\n if (protocol === 'data:') {\n let convertedData;\n\n if (method !== 'GET') {\n return settle(resolve, reject, {\n status: 405,\n statusText: 'method not allowed',\n headers: {},\n config\n });\n }\n\n try {\n convertedData = fromDataURI(config.url, responseType === 'blob', {\n Blob: config.env && config.env.Blob\n });\n } catch (err) {\n throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);\n }\n\n if (responseType === 'text') {\n convertedData = convertedData.toString(responseEncoding);\n\n if (!responseEncoding || responseEncoding === 'utf8') {\n convertedData = utils.stripBOM(convertedData);\n }\n } else if (responseType === 'stream') {\n convertedData = stream.Readable.from(convertedData);\n }\n\n return settle(resolve, reject, {\n data: convertedData,\n status: 200,\n statusText: 'OK',\n headers: new AxiosHeaders(),\n config\n });\n }\n\n if (supportedProtocols.indexOf(protocol) === -1) {\n return reject(new AxiosError(\n 'Unsupported protocol ' + protocol,\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n const headers = AxiosHeaders.from(config.headers).normalize();\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n // User-Agent is specified; handle case where no UA header is desired\n // Only set header if it hasn't been set in config\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const {onUploadProgress, onDownloadProgress} = config;\n const maxRate = config.maxRate;\n let maxUploadRate = undefined;\n let maxDownloadRate = undefined;\n\n // support for spec compliant FormData objects\n if (utils.isSpecCompliantForm(data)) {\n const userBoundary = headers.getContentType(/boundary=([-_\\w\\d]{10,70})/i);\n\n data = formDataToStream(data, (formHeaders) => {\n headers.set(formHeaders);\n }, {\n tag: `axios-${VERSION}-boundary`,\n boundary: userBoundary && userBoundary[1] || undefined\n });\n // support for https://www.npmjs.com/package/form-data api\n } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {\n headers.set(data.getHeaders());\n\n if (!headers.hasContentLength()) {\n try {\n const knownLength = await util.promisify(data.getLength).call(data);\n Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);\n /*eslint no-empty:0*/\n } catch (e) {\n }\n }\n } else if (utils.isBlob(data) || utils.isFile(data)) {\n data.size && headers.setContentType(data.type || 'application/octet-stream');\n headers.setContentLength(data.size || 0);\n data = stream.Readable.from(readBlob(data));\n } else if (data && !utils.isStream(data)) {\n if (Buffer.isBuffer(data)) {\n // Nothing to do...\n } else if (utils.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(new AxiosError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers.setContentLength(data.length, false);\n\n if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {\n return reject(new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n }\n\n const contentLength = utils.toFiniteNumber(headers.getContentLength());\n\n if (utils.isArray(maxRate)) {\n maxUploadRate = maxRate[0];\n maxDownloadRate = maxRate[1];\n } else {\n maxUploadRate = maxDownloadRate = maxRate;\n }\n\n if (data && (onUploadProgress || maxUploadRate)) {\n if (!utils.isStream(data)) {\n data = stream.Readable.from(data, {objectMode: false});\n }\n\n data = stream.pipeline([data, new AxiosTransformStream({\n maxRate: utils.toFiniteNumber(maxUploadRate)\n })], utils.noop);\n\n onUploadProgress && data.on('progress', flushOnFinish(\n data,\n progressEventDecorator(\n contentLength,\n progressEventReducer(asyncDecorator(onUploadProgress), false, 3)\n )\n ));\n }\n\n // HTTP basic authentication\n let auth = undefined;\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n if (!auth && parsed.username) {\n const urlUsername = parsed.username;\n const urlPassword = parsed.password;\n auth = urlUsername + ':' + urlPassword;\n }\n\n auth && headers.delete('authorization');\n\n let path;\n\n try {\n path = buildURL(\n parsed.pathname + parsed.search,\n config.params,\n config.paramsSerializer\n ).replace(/^\\?/, '');\n } catch (err) {\n const customErr = new Error(err.message);\n customErr.config = config;\n customErr.url = config.url;\n customErr.exists = true;\n return reject(customErr);\n }\n\n headers.set(\n 'Accept-Encoding',\n 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false\n );\n\n const options = {\n path,\n method: method,\n headers: headers.toJSON(),\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth,\n protocol,\n family,\n beforeRedirect: dispatchBeforeRedirect,\n beforeRedirects: {}\n };\n\n // cacheable-lookup integration hotfix\n !utils.isUndefined(lookup) && (options.lookup = lookup);\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname.startsWith(\"[\") ? parsed.hostname.slice(1, -1) : parsed.hostname;\n options.port = parsed.port;\n setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n let transport;\n const isHttpsRequest = isHttps.test(options.protocol);\n options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsRequest ? https : http;\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n if (config.beforeRedirect) {\n options.beforeRedirects.config = config.beforeRedirect;\n }\n transport = isHttpsRequest ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n } else {\n // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited\n options.maxBodyLength = Infinity;\n }\n\n if (config.insecureHTTPParser) {\n options.insecureHTTPParser = config.insecureHTTPParser;\n }\n\n // Create the request\n req = transport.request(options, function handleResponse(res) {\n if (req.destroyed) return;\n\n const streams = [res];\n\n const responseLength = +res.headers['content-length'];\n\n if (onDownloadProgress || maxDownloadRate) {\n const transformStream = new AxiosTransformStream({\n maxRate: utils.toFiniteNumber(maxDownloadRate)\n });\n\n onDownloadProgress && transformStream.on('progress', flushOnFinish(\n transformStream,\n progressEventDecorator(\n responseLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)\n )\n ));\n\n streams.push(transformStream);\n }\n\n // decompress the response body transparently if required\n let responseStream = res;\n\n // return the last request in case of redirects\n const lastRequest = res.req || req;\n\n // if decompress disabled we should not decompress\n if (config.decompress !== false && res.headers['content-encoding']) {\n // if no content, but headers still say that it is encoded,\n // remove the header not confuse downstream operations\n if (method === 'HEAD' || res.statusCode === 204) {\n delete res.headers['content-encoding'];\n }\n\n switch ((res.headers['content-encoding'] || '').toLowerCase()) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'x-gzip':\n case 'compress':\n case 'x-compress':\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'deflate':\n streams.push(new ZlibHeaderTransformStream());\n\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'br':\n if (isBrotliSupported) {\n streams.push(zlib.createBrotliDecompress(brotliOptions));\n delete res.headers['content-encoding'];\n }\n }\n }\n\n responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];\n\n const offListeners = stream.finished(responseStream, () => {\n offListeners();\n onFinished();\n });\n\n const response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: new AxiosHeaders(res.headers),\n config,\n request: lastRequest\n };\n\n if (responseType === 'stream') {\n response.data = responseStream;\n settle(resolve, reject, response);\n } else {\n const responseBuffer = [];\n let totalResponseBytes = 0;\n\n responseStream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n // stream.destroy() emit aborted event before calling reject() on Node.js v16\n rejected = true;\n responseStream.destroy();\n reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE, config, lastRequest));\n }\n });\n\n responseStream.on('aborted', function handlerStreamAborted() {\n if (rejected) {\n return;\n }\n\n const err = new AxiosError(\n 'stream has been aborted',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n lastRequest\n );\n responseStream.destroy(err);\n reject(err);\n });\n\n responseStream.on('error', function handleStreamError(err) {\n if (req.destroyed) return;\n reject(AxiosError.from(err, null, config, lastRequest));\n });\n\n responseStream.on('end', function handleStreamEnd() {\n try {\n let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);\n if (responseType !== 'arraybuffer') {\n responseData = responseData.toString(responseEncoding);\n if (!responseEncoding || responseEncoding === 'utf8') {\n responseData = utils.stripBOM(responseData);\n }\n }\n response.data = responseData;\n } catch (err) {\n return reject(AxiosError.from(err, null, config, response.request, response));\n }\n settle(resolve, reject, response);\n });\n }\n\n emitter.once('abort', err => {\n if (!responseStream.destroyed) {\n responseStream.emit('error', err);\n responseStream.destroy();\n }\n });\n });\n\n emitter.once('abort', err => {\n reject(err);\n req.destroy(err);\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n // @todo remove\n // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;\n reject(AxiosError.from(err, null, config, req));\n });\n\n // set tcp keep alive to prevent drop connection by peer\n req.on('socket', function handleRequestSocket(socket) {\n // default interval of sending ack packet is 1 minute\n socket.setKeepAlive(true, 1000 * 60);\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n const timeout = parseInt(config.timeout, 10);\n\n if (Number.isNaN(timeout)) {\n reject(new AxiosError(\n 'error trying to parse `config.timeout` to int',\n AxiosError.ERR_BAD_OPTION_VALUE,\n config,\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devouring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n if (isDone) return;\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n req\n ));\n abort();\n });\n }\n\n\n // Send the request\n if (utils.isStream(data)) {\n let ended = false;\n let errored = false;\n\n data.on('end', () => {\n ended = true;\n });\n\n data.once('error', err => {\n errored = true;\n req.destroy(err);\n });\n\n data.on('close', () => {\n if (!ended && !errored) {\n abort(new CanceledError('Request stream has been aborted', config, req));\n }\n });\n\n data.pipe(req);\n } else {\n req.end(data);\n }\n });\n}\n\nexport const __setProxy = setProxy;\n"],"names":["zlibOptions","flush","zlib","constants","Z_SYNC_FLUSH","finishFlush","brotliOptions","BROTLI_OPERATION_FLUSH","isBrotliSupported","utils","isFunction","createBrotliDecompress","http","httpFollow","https","httpsFollow","followRedirects","isHttps","supportedProtocols","platform","protocols","map","protocol","flushOnFinish","stream","throttled","on","dispatchBeforeRedirect","options","responseDetails","beforeRedirects","proxy","config","setProxy","configProxy","location","proxyUrl","proxyFromEnv","getProxyForUrl","URL","username","auth","password","base64","Buffer","from","toString","headers","host","hostname","port","proxyHost","path","includes","redirectOptions","href","isHttpAdapterSupported","process","kindOf","buildAddressEntry","address","family","isString","TypeError","indexOf","resolveFamily","isObject","httpAdapter","asyncExecutor","async","resolve","reject","onDone","data","lookup","responseType","responseEncoding","method","toUpperCase","isDone","req","rejected","_lookup","callbackify","value","isArray","opt","cb","err","arg0","arg1","addresses","addr","all","emitter","EventEmitter","onFinished","cancelToken","unsubscribe","abort","signal","removeEventListener","removeAllListeners","reason","emit","type","CanceledError","isRejected","once","subscribe","aborted","addEventListener","fullPath","buildFullPath","baseURL","url","parsed","hasBrowserEnv","origin","undefined","convertedData","settle","status","statusText","fromDataURI","Blob","env","AxiosError","ERR_BAD_REQUEST","stripBOM","Readable","AxiosHeaders","normalize","set","VERSION","onUploadProgress","onDownloadProgress","maxRate","maxUploadRate","maxDownloadRate","isSpecCompliantForm","userBoundary","getContentType","formDataToStream","formHeaders","tag","boundary","isFormData","getHeaders","hasContentLength","knownLength","util","promisify","getLength","call","Number","isFinite","setContentLength","e","isBlob","isFile","size","setContentType","readBlob","isStream","isBuffer","isArrayBuffer","Uint8Array","length","maxBodyLength","contentLength","toFiniteNumber","getContentLength","objectMode","pipeline","AxiosTransformStream","noop","progressEventDecorator","progressEventReducer","asyncDecorator","delete","buildURL","pathname","search","params","paramsSerializer","replace","customErr","Error","message","exists","toJSON","agents","httpAgent","httpsAgent","beforeRedirect","transport","isUndefined","socketPath","startsWith","slice","isHttpsRequest","test","agent","maxRedirects","Infinity","insecureHTTPParser","request","res","destroyed","streams","responseLength","transformStream","push","responseStream","lastRequest","decompress","statusCode","toLowerCase","createUnzip","ZlibHeaderTransformStream","offListeners","finished","response","statusMessage","responseBuffer","totalResponseBytes","chunk","maxContentLength","destroy","ERR_BAD_RESPONSE","responseData","concat","socket","setKeepAlive","timeout","parseInt","isNaN","ERR_BAD_OPTION_VALUE","setTimeout","timeoutErrorMessage","transitional","transitionalDefaults","clarifyTimeoutError","ETIMEDOUT","ECONNABORTED","ended","errored","pipe","end","Promise","done","_reject","onDoneHandler","catch"],"mappings":"6gCA4BA,MAAMA,EAAc,CAClBC,MAAOC,EAAAA,QAAKC,UAAUC,aACtBC,YAAaH,EAAAA,QAAKC,UAAUC,cAGxBE,EAAgB,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ASpB,IACjB+J,GAAU,EACVvK,EAAIqJ,QAAQ7I,EAAI,IAGlBf,EAAK/C,GAAG,SAAS,KACV4N,GAAUC,GACbpJ,EAAM,IAAIO,EAAAA,QAAc,kCAAmC1E,EAAQgD,GACpE,IAGHP,EAAK+K,KAAKxK,EAChB,MACMA,EAAIyK,IAAIhL,EAEd,EAhjBS,IAAIiL,SAAQ,CAACpL,EAASC,KAC3B,IAAIC,EACAO,EAEJ,MAAM4K,EAAO,CAACvK,EAAOuB,KACf5B,IACJA,GAAS,EACTP,GAAUA,EAAOY,EAAOuB,GAAW,EAQ/BiJ,EAAWrJ,IACfoJ,EAAKpJ,GAAQ,GACbhC,EAAOgC,EAAO,EAGhBnC,GAVkBgB,IAChBuK,EAAKvK,GACLd,EAAQc,EAAM,GAQQwK,GAAUC,GAAmBrL,EAASqL,IAAgBC,MAAMF,EAAQ,IArB9E,IAACxL,CAkjBnB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("stream"),t=require("../utils.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(e);const a=Symbol("internals");class i extends s.default.Transform{constructor(e){super({readableHighWaterMark:(e=t.default.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,n)=>!t.default.isUndefined(n[e])))).chunkSize});const n=this[a]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(e=>{"progress"===e&&(n.isCaptured||(n.isCaptured=!0))}))}_read(e){const t=this[a];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const s=this[a],i=s.maxRate,r=this.readableHighWaterMark,u=s.timeWindow,o=i/(1e3/u),l=!1!==s.minChunkSize?Math.max(s.minChunkSize,.01*o):0,c=(e,t)=>{const n=Buffer.byteLength(e);s.bytesSeen+=n,s.bytes+=n,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(e)?process.nextTick(t):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(t)}},d=(e,t)=>{const n=Buffer.byteLength(e);let a,d=null,b=r,f=0;if(i){const e=Date.now();(!s.ts||(f=e-s.ts)>=u)&&(s.ts=e,a=o-s.bytes,s.bytes=a<0?-a:0,f=0),a=o-s.bytes}if(i){if(a<=0)return setTimeout((()=>{t(null,e)}),u-f);a<b&&(b=a)}b&&n>b&&n-b>l&&(d=e.subarray(b),e=e.subarray(0,b)),c(e,d?()=>{process.nextTick(t,null,d)}:t)};d(e,(function e(t,s){if(t)return n(t);s?d(s,e):n(null)}))}}exports.default=i;
|
|
2
|
-
//# sourceMappingURL=AxiosTransformStream.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AxiosTransformStream.js","sources":["../../../../../../node_modules/axios/lib/helpers/AxiosTransformStream.js"],"sourcesContent":["'use strict';\n\nimport stream from 'stream';\nimport utils from '../utils.js';\n\nconst kInternals = Symbol('internals');\n\nclass AxiosTransformStream extends stream.Transform{\n constructor(options) {\n options = utils.toFlatObject(options, {\n maxRate: 0,\n chunkSize: 64 * 1024,\n minChunkSize: 100,\n timeWindow: 500,\n ticksRate: 2,\n samplesCount: 15\n }, null, (prop, source) => {\n return !utils.isUndefined(source[prop]);\n });\n\n super({\n readableHighWaterMark: options.chunkSize\n });\n\n const internals = this[kInternals] = {\n timeWindow: options.timeWindow,\n chunkSize: options.chunkSize,\n maxRate: options.maxRate,\n minChunkSize: options.minChunkSize,\n bytesSeen: 0,\n isCaptured: false,\n notifiedBytesLoaded: 0,\n ts: Date.now(),\n bytes: 0,\n onReadCallback: null\n };\n\n this.on('newListener', event => {\n if (event === 'progress') {\n if (!internals.isCaptured) {\n internals.isCaptured = true;\n }\n }\n });\n }\n\n _read(size) {\n const internals = this[kInternals];\n\n if (internals.onReadCallback) {\n internals.onReadCallback();\n }\n\n return super._read(size);\n }\n\n _transform(chunk, encoding, callback) {\n const internals = this[kInternals];\n const maxRate = internals.maxRate;\n\n const readableHighWaterMark = this.readableHighWaterMark;\n\n const timeWindow = internals.timeWindow;\n\n const divider = 1000 / timeWindow;\n const bytesThreshold = (maxRate / divider);\n const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;\n\n const pushChunk = (_chunk, _callback) => {\n const bytes = Buffer.byteLength(_chunk);\n internals.bytesSeen += bytes;\n internals.bytes += bytes;\n\n internals.isCaptured && this.emit('progress', internals.bytesSeen);\n\n if (this.push(_chunk)) {\n process.nextTick(_callback);\n } else {\n internals.onReadCallback = () => {\n internals.onReadCallback = null;\n process.nextTick(_callback);\n };\n }\n }\n\n const transformChunk = (_chunk, _callback) => {\n const chunkSize = Buffer.byteLength(_chunk);\n let chunkRemainder = null;\n let maxChunkSize = readableHighWaterMark;\n let bytesLeft;\n let passed = 0;\n\n if (maxRate) {\n const now = Date.now();\n\n if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {\n internals.ts = now;\n bytesLeft = bytesThreshold - internals.bytes;\n internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;\n passed = 0;\n }\n\n bytesLeft = bytesThreshold - internals.bytes;\n }\n\n if (maxRate) {\n if (bytesLeft <= 0) {\n // next time window\n return setTimeout(() => {\n _callback(null, _chunk);\n }, timeWindow - passed);\n }\n\n if (bytesLeft < maxChunkSize) {\n maxChunkSize = bytesLeft;\n }\n }\n\n if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {\n chunkRemainder = _chunk.subarray(maxChunkSize);\n _chunk = _chunk.subarray(0, maxChunkSize);\n }\n\n pushChunk(_chunk, chunkRemainder ? () => {\n process.nextTick(_callback, null, chunkRemainder);\n } : _callback);\n };\n\n transformChunk(chunk, function transformNextChunk(err, _chunk) {\n if (err) {\n return callback(err);\n }\n\n if (_chunk) {\n transformChunk(_chunk, transformNextChunk);\n } else {\n callback(null);\n }\n });\n }\n}\n\nexport default AxiosTransformStream;\n"],"names":["kInternals","Symbol","AxiosTransformStream","stream","Transform","constructor","options","super","readableHighWaterMark","utils","toFlatObject","maxRate","chunkSize","minChunkSize","timeWindow","ticksRate","samplesCount","prop","source","isUndefined","internals","this","bytesSeen","isCaptured","notifiedBytesLoaded","ts","Date","now","bytes","onReadCallback","on","event","_read","size","_transform","chunk","encoding","callback","bytesThreshold","Math","max","pushChunk","_chunk","_callback","Buffer","byteLength","emit","push","process","nextTick","transformChunk","bytesLeft","chunkRemainder","maxChunkSize","passed","setTimeout","subarray","transformNextChunk","err"],"mappings":"wMAKA,MAAMA,EAAaC,OAAO,aAE1B,MAAMC,UAA6BC,EAAM,QAACC,UACxC,WAAAC,CAAYC,GAYVC,MAAM,CACJC,uBAZFF,EAAUG,EAAAA,QAAMC,aAAaJ,EAAS,CACpCK,QAAS,EACTC,UAAW,MACXC,aAAc,IACdC,WAAY,IACZC,UAAW,EACXC,aAAc,IACb,MAAM,CAACC,EAAMC,KACNT,EAAAA,QAAMU,YAAYD,EAAOD,OAIFL,YAGjC,MAAMQ,EAAYC,KAAKrB,GAAc,CACnCc,WAAYR,EAAQQ,WACpBF,UAAWN,EAAQM,UACnBD,QAASL,EAAQK,QACjBE,aAAcP,EAAQO,aACtBS,UAAW,EACXC,YAAY,EACZC,oBAAqB,EACrBC,GAAIC,KAAKC,MACTC,MAAO,EACPC,eAAgB,MAGlBR,KAAKS,GAAG,eAAeC,IACP,aAAVA,IACGX,EAAUG,aACbH,EAAUG,YAAa,GAE1B,GAEJ,CAED,KAAAS,CAAMC,GACJ,MAAMb,EAAYC,KAAKrB,GAMvB,OAJIoB,EAAUS,gBACZT,EAAUS,iBAGLtB,MAAMyB,MAAMC,EACpB,CAED,UAAAC,CAAWC,EAAOC,EAAUC,GAC1B,MAAMjB,EAAYC,KAAKrB,GACjBW,EAAUS,EA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ACF,OAAOrB,EAASqB,GAGdhB,EACFQ,EAAeR,EAAQe,GAEvBpB,EAAS,KAEjB,GACG"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("stream"));class r extends e.default.Transform{__transform(t,e,r){this.push(t),r()}_transform(t,e,r){if(0!==t.length&&(this._transform=this.__transform,120!==t[0])){const t=Buffer.alloc(2);t[0]=120,t[1]=156,this.push(t,e)}this.__transform(t,e,r)}}exports.default=r;
|
|
2
|
-
//# sourceMappingURL=ZlibHeaderTransformStream.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZlibHeaderTransformStream.js","sources":["../../../../../../node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js"],"sourcesContent":["\"use strict\";\n\nimport stream from \"stream\";\n\nclass ZlibHeaderTransformStream extends stream.Transform {\n __transform(chunk, encoding, callback) {\n this.push(chunk);\n callback();\n }\n\n _transform(chunk, encoding, callback) {\n if (chunk.length !== 0) {\n this._transform = this.__transform;\n\n // Add Default Compression headers if no zlib headers are present\n if (chunk[0] !== 120) { // Hex: 78\n const header = Buffer.alloc(2);\n header[0] = 120; // Hex: 78\n header[1] = 156; // Hex: 9C \n this.push(header, encoding);\n }\n }\n\n this.__transform(chunk, encoding, callback);\n }\n}\n\nexport default ZlibHeaderTransformStream;\n"],"names":["ZlibHeaderTransformStream","stream","Transform","__transform","chunk","encoding","callback","this","push","_transform","length","header","Buffer","alloc"],"mappings":"uKAIA,MAAMA,UAAkCC,EAAM,QAACC,UAC7C,WAAAC,CAAYC,EAAOC,EAAUC,GAC3BC,KAAKC,KAAKJ,GACVE,GACD,CAED,UAAAG,CAAWL,EAAOC,EAAUC,GAC1B,GAAqB,IAAjBF,EAAMM,SACRH,KAAKE,WAAaF,KAAKJ,YAGN,MAAbC,EAAM,IAAY,CACpB,MAAMO,EAASC,OAAOC,MAAM,GAC5BF,EAAO,GAAK,IACZA,EAAO,GAAK,IACZJ,KAAKC,KAAKG,EAAQN,EACnB,CAGHE,KAAKJ,YAAYC,EAAOC,EAAUC,EACnC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils.js");exports.default=(t,s)=>e.default.isAsyncFn(t)?function(...e){const l=e.pop();t.apply(this,e).then((e=>{try{s?l(null,...s(e)):l(null,e)}catch(e){l(e)}}),l)}:t;
|
|
2
|
-
//# sourceMappingURL=callbackify.js.map
|