8 lines
160 KiB
Text
8 lines
160 KiB
Text
|
{
|
||
|
"version": 3,
|
||
|
"sources": ["../node_modules/currency.js/dist/currency.min.js", "../lib/logger.js", "../lib/countries.js", "../lib/cache.js", "../lib/bookUrl.js", "../lib/extractPrice.js", "../node_modules/date-fns/toDate.mjs", "../node_modules/date-fns/constructFrom.mjs", "../node_modules/date-fns/constants.mjs", "../node_modules/date-fns/_lib/defaultOptions.mjs", "../node_modules/date-fns/startOfWeek.mjs", "../node_modules/date-fns/startOfISOWeek.mjs", "../node_modules/date-fns/getISOWeekYear.mjs", "../node_modules/date-fns/startOfDay.mjs", "../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs", "../node_modules/date-fns/differenceInCalendarDays.mjs", "../node_modules/date-fns/startOfISOWeekYear.mjs", "../node_modules/date-fns/constructNow.mjs", "../node_modules/date-fns/isSameDay.mjs", "../node_modules/date-fns/isDate.mjs", "../node_modules/date-fns/isValid.mjs", "../node_modules/date-fns/startOfYear.mjs", "../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs", "../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs", "../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs", "../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs", "../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs", "../node_modules/date-fns/locale/en-US/_lib/localize.mjs", "../node_modules/date-fns/locale/_lib/buildMatchFn.mjs", "../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs", "../node_modules/date-fns/locale/en-US/_lib/match.mjs", "../node_modules/date-fns/locale/en-US.mjs", "../node_modules/date-fns/getDayOfYear.mjs", "../node_modules/date-fns/getISOWeek.mjs", "../node_modules/date-fns/getWeekYear.mjs", "../node_modules/date-fns/startOfWeekYear.mjs", "../node_modules/date-fns/getWeek.mjs", "../node_modules/date-fns/_lib/addLeadingZeros.mjs", "../node_modules/date-fns/_lib/format/lightFormatters.mjs", "../node_modules/date-fns/_lib/format/formatters.mjs", "../node_modules/date-fns/_lib/format/longFormatters.mjs", "../node_modules/date-fns/_lib/protectedTokens.mjs", "../node_modules/date-fns/format.mjs", "../node_modules/date-fns/isToday.mjs", "../lib/rates.js", "../lib/convertPrice.js", "../lib/bookPriceFor.js", "../lib/index.js"],
|
||
|
"sourcesContent": ["/*\n currency.js - v2.0.4\n http://scurker.github.io/currency.js\n\n Copyright (c) 2021 Jason Wilson\n Released under MIT license\n*/\n(function(e,g){\"object\"===typeof exports&&\"undefined\"!==typeof module?module.exports=g():\"function\"===typeof define&&define.amd?define(g):(e=e||self,e.currency=g())})(this,function(){function e(b,a){if(!(this instanceof e))return new e(b,a);a=Object.assign({},m,a);var d=Math.pow(10,a.precision);this.intValue=b=g(b,a);this.value=b/d;a.increment=a.increment||1/d;a.groups=a.useVedic?n:p;this.s=a;this.p=d}function g(b,a){var d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:!0;var c=a.decimal;\nvar h=a.errorOnInvalid,k=a.fromCents,l=Math.pow(10,a.precision),f=b instanceof e;if(f&&k)return b.intValue;if(\"number\"===typeof b||f)c=f?b.value:b;else if(\"string\"===typeof b)h=new RegExp(\"[^-\\\\d\"+c+\"]\",\"g\"),c=new RegExp(\"\\\\\"+c,\"g\"),c=(c=b.replace(/\\((.*)\\)/,\"-$1\").replace(h,\"\").replace(c,\".\"))||0;else{if(h)throw Error(\"Invalid Input\");c=0}k||(c=(c*l).toFixed(4));return d?Math.round(c):c}var m={symbol:\"$\",separator:\",\",decimal:\".\",errorOnInvalid:!1,precision:2,pattern:\"!#\",negativePattern:\"-!#\",format:function(b,\na){var d=a.pattern,c=a.negativePattern,h=a.symbol,k=a.separator,l=a.decimal;a=a.groups;var f=(\"\"+b).replace(/^-/,\"\").split(\".\"),q=f[0];f=f[1];return(0<=b.value?d:c).replace(\"!\",h).replace(\"#\",q.replace(a,\"$1\"+k)+(f?l+f:\"\"))},fromCents:!1},p=/(\\d)(?=(\\d{3})+\\b)/g,n=/(\\d)(?=(\\d\\d)+\\d\\b)/g;e.prototype={add:function(b){var a=this.s,d=this.p;return e((this.intValue+g(b,a))/(a.fromCents?1:d),a)},subtract:function(b){var a=this.s,d=this.p;return e((this.intValue-g(b,a))/(a.fromCents?1:d),a)},multiply:function(b){var a=\nthis.s;return e(this.intValue*b/(a.fromCents?1:Math.pow(10,a.precision)),a)},divide:function(b){var a=this.s;return e(this.intValue/g(b,a,!1),a)},distribute:function(b){var a=this.intValue,d=this.p,c=this.s,h=[],k=Math[0<=a?\"floor\":\"ceil\"](a/b),l=Math.abs(a-k*b);for(d=c.fromCents?1:d;0!==b;b--){var f=e(k/d,c);0<l--&&(f=f[0<=a?\"add\":\"subtract\"](1/d));h.push(f)}return h},dollars:function(){return~~this.value},cents:function(){return~~(this.intValue%this.p)},format:function(b){var a=this.s;return\"function\"===\ntypeof b?b(this,a):a.format(this,Object.assign({},a,b))},toString:function(){var b=this.s,a=b.increment;return(Math.round(this.intValue/this.p/a)*a).toFixed(b.precision)},toJSON:function(){return this.value}};return e});\n", "globalThis.l = (...m) => console.log(\"KOBOPRICE\", ...m);\n", "export const COUNTRIES = [\n { countryCode: \"ww\", currencyCode: \"usd\" },\n { countryCode: \"ca\", currencyCode: \"cad\" },\n { countryCode: \"us\", currencyCode: \"usd\" },\n { countryCode: \"in\", currencyCode: \"inr\" },\n { countryCode: \"za\", currencyCode: \"zar\" },\n { countryCode: \"au\", currencyCode: \"aud\" },\n { countryCode: \"hk\", currencyCode: \"hkd\" },\n { countryCode: \"jp\", currencyCode: \"jpy\" },\n { countryCode: \"my\", currencyCode: \"myr\" },\n { countryCode: \"nz\", currencyCode: \"nzd\" },\n { countryCode: \"ph\", currencyCode: \"php\" },\n { countryCode: \"sg\", currencyCode: \"sgd\" },\n { countryCode: \"tw\", currencyCode: \"twd\" },\n { countryCode: \"th\", currencyCode: \"usd\" },\n { countryCode: \"at\", currencyCode: \"eur\" },\n { countryCode: \"be\", currencyCode: \"eur\" },\n { countryCode: \"cy\", currencyCode: \"eur\" },\n { countryCode: \"cz\", currencyCode: \"czk\" },\n { countryCode: \"dk\", currencyCode: \"dkk\" },\n { countryCode: \"ee\", currencyCode: \"eur\" },\n { countryCode: \"fi\", currencyCode: \"eur\" },\n { countryCode: \"fr\", currencyCode: \"eur\" },\n { countryCode: \"de\", currencyCode: \"eur\" },\n { countryCode: \"gr\", currencyCode: \"eur\" },\n { countryCode: \"ie\", currencyCode: \"eur\" },\n { countryCode: \"it\", currencyCode: \"eur\" },\n { countryCode: \"lt\", currencyCode: \"eur\" },\n { countryCode: \"lu\", currencyCode: \"eur\" },\n { countryCode: \"mt\", currencyCode: \"eur\" },\n { countr
|
||
|
"mappings": "i4BAAA,IAAAA,GAAAC,GAAA,CAAAC,EAAAC,IAAA,EAOC,SAAS,EAAEC,EAAE,CAAY,OAAOF,GAAlB,UAAyC,OAAOC,EAArB,IAA4BA,EAAO,QAAQC,EAAE,EAAe,OAAO,QAApB,YAA4B,OAAO,IAAI,OAAOA,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,SAASA,EAAE,EAAE,GAAGF,EAAK,UAAU,CAAC,SAAS,EAAEG,EAAEC,EAAE,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,IAAI,EAAED,EAAEC,CAAC,EAAEA,EAAE,OAAO,OAAO,CAAC,EAAEC,EAAED,CAAC,EAAE,IAAIE,EAAE,KAAK,IAAI,GAAGF,EAAE,SAAS,EAAE,KAAK,SAASD,EAAED,EAAEC,EAAEC,CAAC,EAAE,KAAK,MAAMD,EAAEG,EAAEF,EAAE,UAAUA,EAAE,WAAW,EAAEE,EAAEF,EAAE,OAAOA,EAAE,SAASG,EAAEC,EAAE,KAAK,EAAEJ,EAAE,KAAK,EAAEE,CAAC,CAAC,SAASJ,EAAEC,EAAEC,EAAE,CAAC,IAAIE,EAAE,EAAE,UAAU,QAAiB,UAAU,CAAC,IAApB,OAAsB,UAAU,CAAC,EAAE,GAAOG,EAAEL,EAAE,QACzeM,EAAEN,EAAE,eAAeO,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AM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACzC,CAAE,YAAa,KAAM,aAAc,KAAM,EACz
|
||
|
"names": ["require_currency_min", "__commonJSMin", "exports", "module", "g", "b", "a", "m", "d", "n", "p", "c", "h", "k", "l", "f", "q", "m", "COUNTRIES", "CACHE_PREFIX", "initCache", "setState", "getState", "s", "getRates", "cacheRates", "rates", "__spreadProps", "__spreadValues", "getBookPrice", "url", "cacheBookPrice", "price", "state", "bookUrl", "country", "urlPattern", "newPath", "url", "timeout", "duration", "r", "observePriceOnPage", "page", "res", "rej", "observer", "_a", "price", "extractPrice", "url", "iframe", "e", "toDate", "argument", "argStr", "constructFrom", "date", "value", "maxTime", "minTime", "millisecondsInWeek", "millisecondsInDay", "secondsInHour", "secondsInDay", "secondsInHour", "secondsInWeek", "secondsInYear", "secondsInMonth", "secondsInQuarter", "defaultOptions", "getDefaultOptions", "startOfWeek", "date", "options", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "_h", "defaultOptions", "getDefaultOptions", "weekStartsOn", "_date", "toDate", "day", "diff", "startOfISOWeek", "date", "startOfWeek", "getISOWeekYear", "date", "_date", "toDate", "year", "fourthOfJanuaryOfNextYear", "constructFrom", "startOfNextYear", "startOfISOWeek", "fourthOfJanuaryOfThisYear", "startOfThisYear", "startOfDay", "date", "_date", "toDate", "getTimezoneOffsetInMilliseconds", "date", "_date", "toDate", "utcDate", "differenceInCalendarDays", "dateLeft", "dateRight", "startOfDayLeft", "startOfDay", "startOfDayRight", "timestampLeft", "getTimezoneOffsetInMilliseconds", "timestampRight", "millisecondsInDay", "startOfISOWeekYear", "date", "year", "getISOWeekYear", "fourthOfJanuary", "constructFrom", "startOfISOWeek", "constructNow", "date", "constructFrom", "isSameDay", "dateLeft", "dateRight", "dateLeftStartOfDay", "startOfDay", "dateRightStartOfDay", "isDate", "value", "isValid", "date", "isDate", "_date", "toDate", "startOfYear", "date", "cleanDate", "toDate", "_date", "constructFrom", "formatDistanceLocale", "formatDistance", "token", "count", "options", "result", "tokenValue", "buildFormatLongFn", "args", "options", "width", "dateFormats", "timeFormats", "dateTimeFormats", "formatLong", "buildFormatLongFn", "formatRelativeLocale", "formatRelative", "token", "_date", "_baseDate", "_options", "buildLocalizeFn", "args", "value", "options", "context", "valuesArray", "defaultWidth", "width", "index", "eraValues", "quarterValues", "monthValues", "dayValues", "dayPeriodValues", "formattingDayPeriodValues", "ordinalNumber", "dirtyNumber", "_options", "number", "rem100", "localize", "buildLocalizeFn", "quarter", "buildMatchFn", "args", "string", "options", "width", "matchPattern", "matchResult", "matchedString", "parsePatterns", "key", "findIndex", "pattern", "findKey", "value", "rest", "object", "predicate", "array", "buildMatchPatternFn", "args", "string", "options", "matchResult", "matchedString", "parseResult", "value", "rest", "matchOrdinalNumberPattern", "parseOrdinalNumberPattern", "matchEraPatterns", "parseEraPatterns", "matchQuarterPatterns", "parseQuarterPatterns", "matchMonthPatterns", "parseMonthPatterns", "matchDayPatterns", "parseDayPatterns", "matchDayPeriodPatterns", "parseDayPeriodPatterns", "match", "buildMatchPatternFn", "value", "buildMatchFn", "index", "enUS", "formatDistance", "formatLong", "formatRelative", "localize", "match", "getDayOfYear", "date", "_date", "toDate", "differenceInCalendarDays", "startOfYear", "getISOWeek", "date", "_date", "toDate", "diff", "startOfISOWeek", "startOfISOWeekYear", "millisecondsInWeek", "getWeekYear", "date", "options", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "_h", "_date", "toDate", "year", "defaultOptions", "getDefaultOptions", "firstWeekContainsDate", "firstWeekOfNextYear", "constructFrom", "startOfNextYear", "startOfWeek", "firstWeekOfThisYear", "startOfThisYear", "startOfWeekYear", "date", "options", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "_h", "defaultOptions", "getDefaultOptions", "firstWeekContainsDate", "year", "getWeekYear", "firstWeek", "constructFrom", "startOfWeek", "getWeek", "date", "options", "_date", "toDate", "diff", "startOfWeek", "startOfWeekYea
|
||
|
}
|