@imgix/js-core
Advanced tools
@@ -1,1 +0,1 @@ | ||
| !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ImgixClient=e()}(this,function(){"use strict";function i(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function c(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){var e,r;e=n,r=o[t=t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))})}return n}function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(t,e){return t(e={exports:{}},e.exports),e.exports}function A(t){return null!=t&&(p(t)||"function"==typeof(e=t).readFloatLE&&"function"==typeof e.slice&&p(e.slice(0,0))||!!t._isBuffer);var e}var x=b(function(t){var i,r;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];0<t;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var n=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?e.push(i.charAt(n>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,n=0;r<t.length;n=++r%4)0!=n&&e.push((i.indexOf(t.charAt(r-1))&Math.pow(2,-2*n+8)-1)<<2*n|i.indexOf(t.charAt(r))>>>6-2*n);return e}},t.exports=r}),g={utf8:{stringToBytes:function(t){return g.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(g.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}},P=g;function p(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var v=b(function(t){function g(l,f){l.constructor==String?l=(f&&"binary"===f.encoding?w:v).stringToBytes(l):m(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||(l=l.toString());for(var t=p.bytesToWords(l),f=8*l.length,e=1732584193,r=-271733879,n=-1732584194,o=271733878,i=0;i<t.length;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);t[f>>>5]|=128<<f%32,t[14+(64+f>>>9<<4)]=f;for(var a=g._ff,u=g._gg,s=g._hh,c=g._ii,i=0;i<t.length;i+=16){var d=e,h=r,y=n,b=o,e=a(e,r,n,o,t[i+0],7,-680876936),o=a(o,e,r,n,t[i+1],12,-389564586),n=a(n,o,e,r,t[i+2],17,606105819),r=a(r,n,o,e,t[i+3],22,-1044525330);e=a(e,r,n,o,t[i+4],7,-176418897),o=a(o,e,r,n,t[i+5],12,1200080426),n=a(n,o,e,r,t[i+6],17,-1473231341),r=a(r,n,o,e,t[i+7],22,-45705983),e=a(e,r,n,o,t[i+8],7,1770035416),o=a(o,e,r,n,t[i+9],12,-1958414417),n=a(n,o,e,r,t[i+10],17,-42063),r=a(r,n,o,e,t[i+11],22,-1990404162),e=a(e,r,n,o,t[i+12],7,1804603682),o=a(o,e,r,n,t[i+13],12,-40341101),n=a(n,o,e,r,t[i+14],17,-1502002290),e=u(e,r=a(r,n,o,e,t[i+15],22,1236535329),n,o,t[i+1],5,-165796510),o=u(o,e,r,n,t[i+6],9,-1069501632),n=u(n,o,e,r,t[i+11],14,643717713),r=u(r,n,o,e,t[i+0],20,-373897302),e=u(e,r,n,o,t[i+5],5,-701558691),o=u(o,e,r,n,t[i+10],9,38016083),n=u(n,o,e,r,t[i+15],14,-660478335),r=u(r,n,o,e,t[i+4],20,-405537848),e=u(e,r,n,o,t[i+9],5,568446438),o=u(o,e,r,n,t[i+14],9,-1019803690),n=u(n,o,e,r,t[i+3],14,-187363961),r=u(r,n,o,e,t[i+8],20,1163531501),e=u(e,r,n,o,t[i+13],5,-1444681467),o=u(o,e,r,n,t[i+2],9,-51403784),n=u(n,o,e,r,t[i+7],14,1735328473),e=s(e,r=u(r,n,o,e,t[i+12],20,-1926607734),n,o,t[i+5],4,-378558),o=s(o,e,r,n,t[i+8],11,-2022574463),n=s(n,o,e,r,t[i+11],16,1839030562),r=s(r,n,o,e,t[i+14],23,-35309556),e=s(e,r,n,o,t[i+1],4,-1530992060),o=s(o,e,r,n,t[i+4],11,1272893353),n=s(n,o,e,r,t[i+7],16,-155497632),r=s(r,n,o,e,t[i+10],23,-1094730640),e=s(e,r,n,o,t[i+13],4,681279174),o=s(o,e,r,n,t[i+0],11,-358537222),n=s(n,o,e,r,t[i+3],16,-722521979),r=s(r,n,o,e,t[i+6],23,76029189),e=s(e,r,n,o,t[i+9],4,-640364487),o=s(o,e,r,n,t[i+12],11,-421815835),n=s(n,o,e,r,t[i+15],16,530742520),e=c(e,r=s(r,n,o,e,t[i+2],23,-995338651),n,o,t[i+0],6,-198630844),o=c(o,e,r,n,t[i+7],10,1126891415),n=c(n,o,e,r,t[i+14],15,-1416354905),r=c(r,n,o,e,t[i+5],21,-57434055),e=c(e,r,n,o,t[i+12],6,1700485571),o=c(o,e,r,n,t[i+3],10,-1894986606),n=c(n,o,e,r,t[i+10],15,-1051523),r=c(r,n,o,e,t[i+1],21,-2054922799),e=c(e,r,n,o,t[i+8],6,1873313359),o=c(o,e,r,n,t[i+15],10,-30611744),n=c(n,o,e,r,t[i+6],15,-1560198380),r=c(r,n,o,e,t[i+13],21,1309151649),e=c(e,r,n,o,t[i+4],6,-145523070),o=c(o,e,r,n,t[i+11],10,-1120210379),n=c(n,o,e,r,t[i+2],15,718787259),r=c(r,n,o,e,t[i+9],21,-343485551),e=e+d>>>0,r=r+h>>>0,n=n+y>>>0,o=o+b>>>0}return p.endian([e,r,n,o])}var p,v,m,w;p=x,v=P.utf8,m=A,w=P.bin,g._ff=function(t,e,r,n,o,i,a){t=t+(e&r|~e&n)+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._gg=function(t,e,r,n,o,i,a){t=t+(e&n|r&~n)+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._hh=function(t,e,r,n,o,i,a){t=t+(e^r^n)+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._ii=function(t,e,r,n,o,i,a){t=t+(r^(e|~n))+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._blocksize=16,g._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);t=p.wordsToBytes(g(t,e));return e&&e.asBytes?t:e&&e.asString?w.bytesToString(t):p.bytesToHex(t)}}),m="3.7.2",w="function"==typeof atob,t="function"==typeof btoa,e="function"==typeof Buffer;const S="function"==typeof TextDecoder?new TextDecoder:void 0,T="function"==typeof TextEncoder?new TextEncoder:void 0;const u=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),a=(t=>{let r={};return t.forEach((t,e)=>r[t]=e),r})(u),B=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,s=String.fromCharCode.bind(String),C="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(t,e=t=>t)=>new Uint8Array(Array.prototype.slice.call(t,0).map(e)),j=t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_"),E=t=>t.replace(/[^A-Za-z0-9\+\/]/g,"");var U=e=>{let r,n,o,i,a="";var t=e.length%3;for(let t=0;t<e.length;){if(255<(n=e.charCodeAt(t++))||255<(o=e.charCodeAt(t++))||255<(i=e.charCodeAt(t++)))throw new TypeError("invalid character found");r=n<<16|o<<8|i,a+=u[r>>18&63]+u[r>>12&63]+u[r>>6&63]+u[63&r]}return t?a.slice(0,t-3)+"===".substring(t):a};const R=t?t=>btoa(t):e?t=>Buffer.from(t,"binary").toString("base64"):U,O=e?t=>Buffer.from(t).toString("base64"):r=>{let n=[];for(let t=0,e=r.length;t<e;t+=4096)n.push(s.apply(null,r.subarray(t,t+4096)));return R(n.join(""))},r=(t,e=!1)=>e?j(O(t)):O(t),I=t=>{var e;return t.length<2?(e=t.charCodeAt(0))<128?t:e<2048?s(192|e>>>6)+s(128|63&e):s(224|e>>>12&15)+s(128|e>>>6&63)+s(128|63&e):(e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320),s(240|e>>>18&7)+s(128|e>>>12&63)+s(128|e>>>6&63)+s(128|63&e))},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,F=t=>t.replace(_,I),k=e?t=>Buffer.from(t,"utf8").toString("base64"):T?t=>O(T.encode(t)):t=>R(F(t)),o=(t,e=!1)=>e?j(k(t)):k(t);t=t=>o(t,!0);const z=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,D=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return s(55296+(e>>>10))+s(56320+(1023&e));case 3:return s((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return s((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},L=t=>t.replace(z,D);var W=e=>{if(e=e.replace(/\s+/g,""),!B.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let r,n="",o,i;for(let t=0;t<e.length;)r=a[e.charAt(t++)]<<18|a[e.charAt(t++)]<<12|(o=a[e.charAt(t++)])<<6|(i=a[e.charAt(t++)]),n+=64===o?s(r>>16&255):64===i?s(r>>16&255,r>>8&255):s(r>>16&255,r>>8&255,255&r);return n};const M=w?t=>atob(E(t)):e?t=>Buffer.from(t,"base64").toString("binary"):W,Z=e?t=>C(Buffer.from(t,"base64")):t=>C(M(t),t=>t.charCodeAt(0)),N=t=>Z(q(t)),Q=e?t=>Buffer.from(t,"base64").toString("utf8"):S?t=>S.decode(Z(t)):t=>L(M(t)),q=t=>E(t.replace(/[-_]/g,t=>"-"==t?"+":"/")),H=t=>Q(q(t));function V(){var t=(t,e)=>Object.defineProperty(String.prototype,t,G(e));t("fromBase64",function(){return H(this)}),t("toBase64",function(t){return o(this,t)}),t("toBase64URI",function(){return o(this,!0)}),t("toBase64URL",function(){return o(this,!0)}),t("toUint8Array",function(){return N(this)})}function $(){var t=(t,e)=>Object.defineProperty(Uint8Array.prototype,t,G(e));t("toBase64",function(t){return r(this,t)}),t("toBase64URI",function(){return r(this,!0)}),t("toBase64URL",function(){return r(this,!0)})}const G=t=>({value:t,enumerable:!1,writable:!0,configurable:!0});const J={version:m,VERSION:"3.7.2",atob:M,atobPolyfill:W,btoa:R,btoaPolyfill:U,fromBase64:H,toBase64:o,encode:o,encodeURI:t,encodeURL:t,utob:F,btou:L,decode:H,isValid:t=>{if("string"!=typeof t)return!1;t=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:r,toUint8Array:N,extendString:V,extendUint8Array:$,extendBuiltins:()=>{V(),$()}};var K=/^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i,X={1:75,2:50,3:35,4:23,5:20},Y=[1,2,3,4,5],tt={domain:null,useHTTPS:!0,includeLibraryParam:!0,urlPrefix:"https://",secureURLToken:null};function et(t,e){if(!Number.isInteger(t)||!Number.isInteger(e)||t<=0||e<=0||e<t)throw new Error("The min and max srcset widths can only be passed positive Number values, and min must be less than max. Found min: ".concat(t," and max: ").concat(e,"."))}function rt(t){if("number"!=typeof t||t<.01)throw new Error("The srcset widthTolerance must be a number greater than or equal to 0.01")}return function(){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=this,r=s;if(!(e instanceof r))throw new TypeError("Cannot call a class as a function");if(this.settings=c(c({},tt),t),this.targetWidthsCache={},"string"!=typeof this.settings.domain)throw new Error("ImgixClient must be passed a valid string domain");if(null==K.exec(this.settings.domain))throw new Error('Domain must be passed in as fully-qualified domain name and should not include a protocol or any path element, i.e. "example.imgix.net".');this.settings.includeLibraryParam&&(this.settings.libraryParam="js-"+s.version()),this.settings.urlPrefix=this.settings.useHTTPS?"https://":"http://"}var t,e,r;return t=s,r=[{key:"version",value:function(){return"3.5.0"}},{key:"targetWidths",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:100,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:8192,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:.08,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=Math.floor(t),i=Math.floor(e),t=(et(t,e),rt(r),r+"/"+o+"/"+i);if(t in n)return n[t];if(o===i)return[o];for(var a=[],u=o;u<i;)a.push(Math.round(u)),u*=1+2*r;return a[a.length-1]<i&&a.push(i),n[t]=a}}],(e=[{key:"buildURL",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=this._sanitizePath(t,{encode:!(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).disablePathEncoding}),e=this._buildParams(e);return this.settings.secureURLToken&&(e=this._signParams(t,e)),this.settings.urlPrefix+this.settings.domain+t+e}},{key:"_buildParams",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=[].concat(l(this.settings.libraryParam?["ixlib=".concat(this.settings.libraryParam)]:[]),l(Object.entries(t).reduce(function(t,e){var e=h(e,2),r=e[0],e=e[1];if(null==e)return t;var n=encodeURIComponent(r),r="64"===r.substr(-2)?J.encodeURI(e):encodeURIComponent(e);return t.push("".concat(n,"=").concat(r)),t},[])));return"".concat(0<t.length?"?":"").concat(t.join("&"))}},{key:"_signParams",value:function(t,e){t=this.settings.secureURLToken+t+e,t=v(t);return 0<e.length?e+"&s="+t:"?s="+t}},{key:"_sanitizePath",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=t.replace(/^\//,"");return"/"+(t=!1!==e.encode?/^https?:\/\//.test(t)?encodeURIComponent(t):encodeURI(t).replace(/[#?:+]/g,encodeURIComponent):t)}},{key:"buildSrcSet",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=e.w,o=e.h;return n||o?this._buildDPRSrcSet(t,e,r):this._buildSrcSetPairs(t,e,r)}},{key:"_buildSrcSetPairs",value:function(e){var r=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};t=void 0!==(a=o).widthTolerance?(rt(a.widthTolerance),a.widthTolerance):.08,i=void 0===a.minWidth?100:a.minWidth,a=void 0===a.maxWidth?8192:a.maxWidth,100==i&&8192==a||et(i,a);var t=h([t,i,a],3),i=t[0],a=t[1],t=t[2];if(o.widths){var u=o.widths;if(!Array.isArray(u)||!u.length)throw new Error("The widths argument can only be passed a valid non-empty array of integers");if(!u.every(function(t){return Number.isInteger(t)&&0<t}))throw new Error("A custom widths argument can only contain positive integer values");u=l(o.widths)}else u=s.targetWidths(a,t,i,this.targetWidthsCache);return u.map(function(t){return"".concat(r.buildURL(e,c(c({},n),{},{w:t}),{disablePathEncoding:o.disablePathEncoding})," ").concat(t,"w")}).join(",\n")}},{key:"_buildDPRSrcSet",value:function(r){var n=this,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(i.devicePixelRatios){var t=i.devicePixelRatios;if(!Array.isArray(t)||!t.length)throw new Error("The devicePixelRatios argument can only be passed a valid non-empty array of integers");if(!t.every(function(t){return"number"==typeof t&&1<=t&&t<=5}))throw new Error("The devicePixelRatios argument can only contain positive integer values between 1 and 5")}var t=i.devicePixelRatios||Y,e=i.disableVariableQuality||!1;if(!e){var a=e;if("boolean"!=typeof a)throw new Error("The disableVariableQuality argument can only be passed a Boolean value")}if(i.variableQualities){a=i.variableQualities;if("object"!==f(a))throw new Error("The variableQualities argument can only be an object")}var u=c(c({},X),i.variableQualities);return(e?t.map(function(t){return"".concat(n.buildURL(r,c(c({},o),{},{dpr:t}),{disablePathEncoding:i.disablePathEncoding})," ").concat(t,"x")}):t.map(function(t){return e=o,t=t,"".concat(n.buildURL(r,c(c({},e),{},{dpr:t,q:e.q||u[t]||u[Math.floor(t)]}),{disablePathEncoding:i.disablePathEncoding})," ").concat(t,"x");var e})).join(",\n")}}])&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}()}); | ||
| !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ImgixClient=e()}(this,function(){"use strict";function i(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function c(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){var e,r;e=n,r=o[t=t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))})}return n}function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(t,e){return t(e={exports:{}},e.exports),e.exports}function A(t){return null!=t&&(p(t)||"function"==typeof(e=t).readFloatLE&&"function"==typeof e.slice&&p(e.slice(0,0))||!!t._isBuffer);var e}var x=b(function(t){var i,r;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];0<t;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var n=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?e.push(i.charAt(n>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,n=0;r<t.length;n=++r%4)0!=n&&e.push((i.indexOf(t.charAt(r-1))&Math.pow(2,-2*n+8)-1)<<2*n|i.indexOf(t.charAt(r))>>>6-2*n);return e}},t.exports=r}),g={utf8:{stringToBytes:function(t){return g.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(g.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}},P=g;function p(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var v=b(function(t){function g(l,f){l.constructor==String?l=(f&&"binary"===f.encoding?w:v).stringToBytes(l):m(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||(l=l.toString());for(var t=p.bytesToWords(l),f=8*l.length,e=1732584193,r=-271733879,n=-1732584194,o=271733878,i=0;i<t.length;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);t[f>>>5]|=128<<f%32,t[14+(64+f>>>9<<4)]=f;for(var a=g._ff,u=g._gg,s=g._hh,c=g._ii,i=0;i<t.length;i+=16){var d=e,h=r,y=n,b=o,e=a(e,r,n,o,t[i+0],7,-680876936),o=a(o,e,r,n,t[i+1],12,-389564586),n=a(n,o,e,r,t[i+2],17,606105819),r=a(r,n,o,e,t[i+3],22,-1044525330);e=a(e,r,n,o,t[i+4],7,-176418897),o=a(o,e,r,n,t[i+5],12,1200080426),n=a(n,o,e,r,t[i+6],17,-1473231341),r=a(r,n,o,e,t[i+7],22,-45705983),e=a(e,r,n,o,t[i+8],7,1770035416),o=a(o,e,r,n,t[i+9],12,-1958414417),n=a(n,o,e,r,t[i+10],17,-42063),r=a(r,n,o,e,t[i+11],22,-1990404162),e=a(e,r,n,o,t[i+12],7,1804603682),o=a(o,e,r,n,t[i+13],12,-40341101),n=a(n,o,e,r,t[i+14],17,-1502002290),e=u(e,r=a(r,n,o,e,t[i+15],22,1236535329),n,o,t[i+1],5,-165796510),o=u(o,e,r,n,t[i+6],9,-1069501632),n=u(n,o,e,r,t[i+11],14,643717713),r=u(r,n,o,e,t[i+0],20,-373897302),e=u(e,r,n,o,t[i+5],5,-701558691),o=u(o,e,r,n,t[i+10],9,38016083),n=u(n,o,e,r,t[i+15],14,-660478335),r=u(r,n,o,e,t[i+4],20,-405537848),e=u(e,r,n,o,t[i+9],5,568446438),o=u(o,e,r,n,t[i+14],9,-1019803690),n=u(n,o,e,r,t[i+3],14,-187363961),r=u(r,n,o,e,t[i+8],20,1163531501),e=u(e,r,n,o,t[i+13],5,-1444681467),o=u(o,e,r,n,t[i+2],9,-51403784),n=u(n,o,e,r,t[i+7],14,1735328473),e=s(e,r=u(r,n,o,e,t[i+12],20,-1926607734),n,o,t[i+5],4,-378558),o=s(o,e,r,n,t[i+8],11,-2022574463),n=s(n,o,e,r,t[i+11],16,1839030562),r=s(r,n,o,e,t[i+14],23,-35309556),e=s(e,r,n,o,t[i+1],4,-1530992060),o=s(o,e,r,n,t[i+4],11,1272893353),n=s(n,o,e,r,t[i+7],16,-155497632),r=s(r,n,o,e,t[i+10],23,-1094730640),e=s(e,r,n,o,t[i+13],4,681279174),o=s(o,e,r,n,t[i+0],11,-358537222),n=s(n,o,e,r,t[i+3],16,-722521979),r=s(r,n,o,e,t[i+6],23,76029189),e=s(e,r,n,o,t[i+9],4,-640364487),o=s(o,e,r,n,t[i+12],11,-421815835),n=s(n,o,e,r,t[i+15],16,530742520),e=c(e,r=s(r,n,o,e,t[i+2],23,-995338651),n,o,t[i+0],6,-198630844),o=c(o,e,r,n,t[i+7],10,1126891415),n=c(n,o,e,r,t[i+14],15,-1416354905),r=c(r,n,o,e,t[i+5],21,-57434055),e=c(e,r,n,o,t[i+12],6,1700485571),o=c(o,e,r,n,t[i+3],10,-1894986606),n=c(n,o,e,r,t[i+10],15,-1051523),r=c(r,n,o,e,t[i+1],21,-2054922799),e=c(e,r,n,o,t[i+8],6,1873313359),o=c(o,e,r,n,t[i+15],10,-30611744),n=c(n,o,e,r,t[i+6],15,-1560198380),r=c(r,n,o,e,t[i+13],21,1309151649),e=c(e,r,n,o,t[i+4],6,-145523070),o=c(o,e,r,n,t[i+11],10,-1120210379),n=c(n,o,e,r,t[i+2],15,718787259),r=c(r,n,o,e,t[i+9],21,-343485551),e=e+d>>>0,r=r+h>>>0,n=n+y>>>0,o=o+b>>>0}return p.endian([e,r,n,o])}var p,v,m,w;p=x,v=P.utf8,m=A,w=P.bin,g._ff=function(t,e,r,n,o,i,a){t=t+(e&r|~e&n)+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._gg=function(t,e,r,n,o,i,a){t=t+(e&n|r&~n)+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._hh=function(t,e,r,n,o,i,a){t=t+(e^r^n)+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._ii=function(t,e,r,n,o,i,a){t=t+(r^(e|~n))+(o>>>0)+a;return(t<<i|t>>>32-i)+e},g._blocksize=16,g._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);t=p.wordsToBytes(g(t,e));return e&&e.asBytes?t:e&&e.asString?w.bytesToString(t):p.bytesToHex(t)}}),m="3.7.2",w="function"==typeof atob,t="function"==typeof btoa,e="function"==typeof Buffer;const S="function"==typeof TextDecoder?new TextDecoder:void 0,T="function"==typeof TextEncoder?new TextEncoder:void 0;const u=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),a=(t=>{let r={};return t.forEach((t,e)=>r[t]=e),r})(u),B=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,s=String.fromCharCode.bind(String),C="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(t,e=t=>t)=>new Uint8Array(Array.prototype.slice.call(t,0).map(e)),j=t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_"),E=t=>t.replace(/[^A-Za-z0-9\+\/]/g,"");var U=e=>{let r,n,o,i,a="";var t=e.length%3;for(let t=0;t<e.length;){if(255<(n=e.charCodeAt(t++))||255<(o=e.charCodeAt(t++))||255<(i=e.charCodeAt(t++)))throw new TypeError("invalid character found");r=n<<16|o<<8|i,a+=u[r>>18&63]+u[r>>12&63]+u[r>>6&63]+u[63&r]}return t?a.slice(0,t-3)+"===".substring(t):a};const R=t?t=>btoa(t):e?t=>Buffer.from(t,"binary").toString("base64"):U,O=e?t=>Buffer.from(t).toString("base64"):r=>{let n=[];for(let t=0,e=r.length;t<e;t+=4096)n.push(s.apply(null,r.subarray(t,t+4096)));return R(n.join(""))},r=(t,e=!1)=>e?j(O(t)):O(t),I=t=>{var e;return t.length<2?(e=t.charCodeAt(0))<128?t:e<2048?s(192|e>>>6)+s(128|63&e):s(224|e>>>12&15)+s(128|e>>>6&63)+s(128|63&e):(e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320),s(240|e>>>18&7)+s(128|e>>>12&63)+s(128|e>>>6&63)+s(128|63&e))},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,F=t=>t.replace(_,I),k=e?t=>Buffer.from(t,"utf8").toString("base64"):T?t=>O(T.encode(t)):t=>R(F(t)),o=(t,e=!1)=>e?j(k(t)):k(t);t=t=>o(t,!0);const z=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,D=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return s(55296+(e>>>10))+s(56320+(1023&e));case 3:return s((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return s((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},L=t=>t.replace(z,D);var W=e=>{if(e=e.replace(/\s+/g,""),!B.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let r,n="",o,i;for(let t=0;t<e.length;)r=a[e.charAt(t++)]<<18|a[e.charAt(t++)]<<12|(o=a[e.charAt(t++)])<<6|(i=a[e.charAt(t++)]),n+=64===o?s(r>>16&255):64===i?s(r>>16&255,r>>8&255):s(r>>16&255,r>>8&255,255&r);return n};const M=w?t=>atob(E(t)):e?t=>Buffer.from(t,"base64").toString("binary"):W,Z=e?t=>C(Buffer.from(t,"base64")):t=>C(M(t),t=>t.charCodeAt(0)),N=t=>Z(q(t)),Q=e?t=>Buffer.from(t,"base64").toString("utf8"):S?t=>S.decode(Z(t)):t=>L(M(t)),q=t=>E(t.replace(/[-_]/g,t=>"-"==t?"+":"/")),H=t=>Q(q(t));function V(){var t=(t,e)=>Object.defineProperty(String.prototype,t,G(e));t("fromBase64",function(){return H(this)}),t("toBase64",function(t){return o(this,t)}),t("toBase64URI",function(){return o(this,!0)}),t("toBase64URL",function(){return o(this,!0)}),t("toUint8Array",function(){return N(this)})}function $(){var t=(t,e)=>Object.defineProperty(Uint8Array.prototype,t,G(e));t("toBase64",function(t){return r(this,t)}),t("toBase64URI",function(){return r(this,!0)}),t("toBase64URL",function(){return r(this,!0)})}const G=t=>({value:t,enumerable:!1,writable:!0,configurable:!0});const J={version:m,VERSION:"3.7.2",atob:M,atobPolyfill:W,btoa:R,btoaPolyfill:U,fromBase64:H,toBase64:o,encode:o,encodeURI:t,encodeURL:t,utob:F,btou:L,decode:H,isValid:t=>{if("string"!=typeof t)return!1;t=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:r,toUint8Array:N,extendString:V,extendUint8Array:$,extendBuiltins:()=>{V(),$()}};var K=/^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i,X={1:75,2:50,3:35,4:23,5:20},Y=[1,2,3,4,5],tt={domain:null,useHTTPS:!0,includeLibraryParam:!0,urlPrefix:"https://",secureURLToken:null};function et(t,e){if(!Number.isInteger(t)||!Number.isInteger(e)||t<=0||e<=0||e<t)throw new Error("The min and max srcset widths can only be passed positive Number values, and min must be less than max. Found min: ".concat(t," and max: ").concat(e,"."))}function rt(t){if("number"!=typeof t||t<.01)throw new Error("The srcset widthTolerance must be a number greater than or equal to 0.01")}return function(){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=this,r=s;if(!(e instanceof r))throw new TypeError("Cannot call a class as a function");if(this.settings=c(c({},tt),t),this.targetWidthsCache={},"string"!=typeof this.settings.domain)throw new Error("ImgixClient must be passed a valid string domain");if(null==K.exec(this.settings.domain))throw new Error('Domain must be passed in as fully-qualified domain name and should not include a protocol or any path element, i.e. "example.imgix.net".');this.settings.includeLibraryParam&&(this.settings.libraryParam="js-"+s.version()),this.settings.urlPrefix=this.settings.useHTTPS?"https://":"http://"}var t,e,r;return t=s,r=[{key:"version",value:function(){return"3.5.1"}},{key:"targetWidths",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:100,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:8192,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:.08,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=Math.floor(t),i=Math.floor(e),t=(et(t,e),rt(r),r+"/"+o+"/"+i);if(t in n)return n[t];if(o===i)return[o];for(var a=[],u=o;u<i;)a.push(Math.round(u)),u*=1+2*r;return a[a.length-1]<i&&a.push(i),n[t]=a}}],(e=[{key:"buildURL",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=this._sanitizePath(t,{encode:!(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).disablePathEncoding}),e=this._buildParams(e);return this.settings.secureURLToken&&(e=this._signParams(t,e)),this.settings.urlPrefix+this.settings.domain+t+e}},{key:"_buildParams",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=[].concat(l(this.settings.libraryParam?["ixlib=".concat(this.settings.libraryParam)]:[]),l(Object.entries(t).reduce(function(t,e){var e=h(e,2),r=e[0],e=e[1];if(null==e)return t;var n=encodeURIComponent(r),r="64"===r.substr(-2)?J.encodeURI(e):encodeURIComponent(e);return t.push("".concat(n,"=").concat(r)),t},[])));return"".concat(0<t.length?"?":"").concat(t.join("&"))}},{key:"_signParams",value:function(t,e){t=this.settings.secureURLToken+t+e,t=v(t);return 0<e.length?e+"&s="+t:"?s="+t}},{key:"_sanitizePath",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=t.replace(/^\//,"");return"/"+(t=!1!==e.encode?/^https?:\/\//.test(t)?encodeURIComponent(t):encodeURI(t).replace(/[#?:+]/g,encodeURIComponent):t)}},{key:"buildSrcSet",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=e.w,o=e.h;return n||o?this._buildDPRSrcSet(t,e,r):this._buildSrcSetPairs(t,e,r)}},{key:"_buildSrcSetPairs",value:function(e){var r=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};t=void 0!==(a=o).widthTolerance?(rt(a.widthTolerance),a.widthTolerance):.08,i=void 0===a.minWidth?100:a.minWidth,a=void 0===a.maxWidth?8192:a.maxWidth,100==i&&8192==a||et(i,a);var t=h([t,i,a],3),i=t[0],a=t[1],t=t[2];if(o.widths){var u=o.widths;if(!Array.isArray(u)||!u.length)throw new Error("The widths argument can only be passed a valid non-empty array of integers");if(!u.every(function(t){return Number.isInteger(t)&&0<t}))throw new Error("A custom widths argument can only contain positive integer values");u=l(o.widths)}else u=s.targetWidths(a,t,i,this.targetWidthsCache);return u.map(function(t){return"".concat(r.buildURL(e,c(c({},n),{},{w:t}),{disablePathEncoding:o.disablePathEncoding})," ").concat(t,"w")}).join(",\n")}},{key:"_buildDPRSrcSet",value:function(r){var n=this,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(i.devicePixelRatios){var t=i.devicePixelRatios;if(!Array.isArray(t)||!t.length)throw new Error("The devicePixelRatios argument can only be passed a valid non-empty array of integers");if(!t.every(function(t){return"number"==typeof t&&1<=t&&t<=5}))throw new Error("The devicePixelRatios argument can only contain positive integer values between 1 and 5")}var t=i.devicePixelRatios||Y,e=i.disableVariableQuality||!1;if(!e){var a=e;if("boolean"!=typeof a)throw new Error("The disableVariableQuality argument can only be passed a Boolean value")}if(i.variableQualities){a=i.variableQualities;if("object"!==f(a))throw new Error("The variableQualities argument can only be an object")}var u=c(c({},X),i.variableQualities);return(e?t.map(function(t){return"".concat(n.buildURL(r,c(c({},o),{},{dpr:t}),{disablePathEncoding:i.disablePathEncoding})," ").concat(t,"x")}):t.map(function(t){return e=o,t=t,"".concat(n.buildURL(r,c(c({},e),{},{dpr:t,q:e.q||u[t]||u[Math.floor(t)]}),{disablePathEncoding:i.disablePathEncoding})," ").concat(t,"x");var e})).join(",\n")}}])&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}()}); |
@@ -162,3 +162,3 @@ 'use strict'; | ||
| // package version used in the ix-lib parameter | ||
| var VERSION = '3.5.0'; // regex pattern used to determine if a domain is valid | ||
| var VERSION = '3.5.1'; // regex pattern used to determine if a domain is valid | ||
@@ -165,0 +165,0 @@ var DOMAIN_REGEX = /^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i; // minimum generated srcset width |
+1
-1
@@ -19,3 +19,3 @@ declare class ImgixClient { | ||
| ): string; | ||
| _sanitizePath(path: string): string; | ||
| _sanitizePath(path: string, options?: { encode?: boolean }): string; | ||
| _buildParams(params: {}): string; | ||
@@ -22,0 +22,0 @@ _signParams(path: string, queryParams?: {}): string; |
@@ -156,3 +156,3 @@ import md5 from 'md5'; | ||
| // package version used in the ix-lib parameter | ||
| var VERSION = '3.5.0'; // regex pattern used to determine if a domain is valid | ||
| var VERSION = '3.5.1'; // regex pattern used to determine if a domain is valid | ||
@@ -159,0 +159,0 @@ var DOMAIN_REGEX = /^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i; // minimum generated srcset width |
+1
-1
| { | ||
| "name": "@imgix/js-core", | ||
| "description": "A JavaScript client library for generating image URLs with imgix", | ||
| "version": "3.5.0", | ||
| "version": "3.5.1", | ||
| "repository": "https://github.com/imgix/js-core", | ||
@@ -6,0 +6,0 @@ "license": "BSD-2-Clause", |
+1
-1
| // package version used in the ix-lib parameter | ||
| export const VERSION = '3.5.0'; | ||
| export const VERSION = '3.5.1'; | ||
| // regex pattern used to determine if a domain is valid | ||
@@ -4,0 +4,0 @@ export const DOMAIN_REGEX = /^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i; |
88368
0.04%