whoami7 - Manager
:
/
home
/
dataiclx
/
vielorbe.com
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
surecart
/
Upload File:
files >> //home/dataiclx/vielorbe.com/wp-content/plugins/surecart/dist/components/surecart/p-401e165e.js.map
{"version":3,"names":["getQueryString","url","query","URL","search","substring","error","buildQueryString","data","string","stack","Object","entries","pair","shift","key","value","hasNestedData","Array","isArray","constructor","valuePairs","reverse","member","memberValue","unshift","undefined","map","encodeURIComponent","join","substr","safeDecodeURIComponent","uriComponent","decodeURIComponent","uriComponentError","setPath","object","path","length","lastIndex","i","toString","includes","toUpperCase","isNextKeyArrayIndex","isNaN","Number","getQueryArgs","replace","split","reduce","accumulator","keyValue","filter","Boolean","segments","create","addQueryArgs","args","keys","baseUrl","queryStringIndex","indexOf","assign"],"sources":["../../node_modules/@wordpress/url/build-module/get-query-string.js","../../node_modules/@wordpress/url/build-module/build-query-string.js","../../node_modules/@wordpress/url/build-module/safe-decode-uri-component.js","../../node_modules/@wordpress/url/build-module/get-query-args.js","../../node_modules/@wordpress/url/build-module/add-query-args.js"],"sourcesContent":["/**\n * Returns the query string part of the URL.\n *\n * @param {string} url The full URL.\n *\n * @example\n * ```js\n * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'\n * ```\n *\n * @return {string|void} The query string part of the URL.\n */\nexport function getQueryString(url) {\n let query;\n try {\n query = new URL(url, 'http://example.com').search.substring(1);\n } catch (error) {}\n if (query) {\n return query;\n }\n}\n//# sourceMappingURL=get-query-string.js.map","/**\n * Generates URL-encoded query string using input query data.\n *\n * It is intended to behave equivalent as PHP's `http_build_query`, configured\n * with encoding type PHP_QUERY_RFC3986 (spaces as `%20`).\n *\n * @example\n * ```js\n * const queryString = buildQueryString( {\n * simple: 'is ok',\n * arrays: [ 'are', 'fine', 'too' ],\n * objects: {\n * evenNested: {\n * ok: 'yes',\n * },\n * },\n * } );\n * // \"simple=is%20ok&arrays%5B0%5D=are&arrays%5B1%5D=fine&arrays%5B2%5D=too&objects%5BevenNested%5D%5Bok%5D=yes\"\n * ```\n *\n * @param {Record<string,*>} data Data to encode.\n *\n * @return {string} Query string.\n */\nexport function buildQueryString(data) {\n let string = '';\n const stack = Object.entries(data);\n let pair;\n while (pair = stack.shift()) {\n let [key, value] = pair;\n\n // Support building deeply nested data, from array or object values.\n const hasNestedData = Array.isArray(value) || value && value.constructor === Object;\n if (hasNestedData) {\n // Push array or object values onto the stack as composed of their\n // original key and nested index or key, retaining order by a\n // combination of Array#reverse and Array#unshift onto the stack.\n const valuePairs = Object.entries(value).reverse();\n for (const [member, memberValue] of valuePairs) {\n stack.unshift([`${key}[${member}]`, memberValue]);\n }\n } else if (value !== undefined) {\n // Null is treated as special case, equivalent to empty string.\n if (value === null) {\n value = '';\n }\n string += '&' + [key, value].map(encodeURIComponent).join('=');\n }\n }\n\n // Loop will concatenate with leading `&`, but it's only expected for all\n // but the first query parameter. This strips the leading `&`, while still\n // accounting for the case that the string may in-fact be empty.\n return string.substr(1);\n}\n//# sourceMappingURL=build-query-string.js.map","/**\n * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if\n * `decodeURIComponent` throws an error.\n *\n * @param {string} uriComponent URI component to decode.\n *\n * @return {string} Decoded URI component if possible.\n */\nexport function safeDecodeURIComponent(uriComponent) {\n try {\n return decodeURIComponent(uriComponent);\n } catch (uriComponentError) {\n return uriComponent;\n }\n}\n//# sourceMappingURL=safe-decode-uri-component.js.map","/**\n * Internal dependencies\n */\nimport { safeDecodeURIComponent } from './safe-decode-uri-component';\nimport { getQueryString } from './get-query-string';\n\n/** @typedef {import('./get-query-arg').QueryArgParsed} QueryArgParsed */\n\n/**\n * @typedef {Record<string,QueryArgParsed>} QueryArgs\n */\n\n/**\n * Sets a value in object deeply by a given array of path segments. Mutates the\n * object reference.\n *\n * @param {Record<string,*>} object Object in which to assign.\n * @param {string[]} path Path segment at which to set value.\n * @param {*} value Value to set.\n */\nfunction setPath(object, path, value) {\n const length = path.length;\n const lastIndex = length - 1;\n for (let i = 0; i < length; i++) {\n let key = path[i];\n if (!key && Array.isArray(object)) {\n // If key is empty string and next value is array, derive key from\n // the current length of the array.\n key = object.length.toString();\n }\n key = ['__proto__', 'constructor', 'prototype'].includes(key) ? key.toUpperCase() : key;\n\n // If the next key in the path is numeric (or empty string), it will be\n // created as an array. Otherwise, it will be created as an object.\n const isNextKeyArrayIndex = !isNaN(Number(path[i + 1]));\n object[key] = i === lastIndex ?\n // If at end of path, assign the intended value.\n value :\n // Otherwise, advance to the next object in the path, creating\n // it if it does not yet exist.\n object[key] || (isNextKeyArrayIndex ? [] : {});\n if (Array.isArray(object[key]) && !isNextKeyArrayIndex) {\n // If we current key is non-numeric, but the next value is an\n // array, coerce the value to an object.\n object[key] = {\n ...object[key]\n };\n }\n\n // Update working reference object to the next in the path.\n object = object[key];\n }\n}\n\n/**\n * Returns an object of query arguments of the given URL. If the given URL is\n * invalid or has no querystring, an empty object is returned.\n *\n * @param {string} url URL.\n *\n * @example\n * ```js\n * const foo = getQueryArgs( 'https://wordpress.org?foo=bar&bar=baz' );\n * // { \"foo\": \"bar\", \"bar\": \"baz\" }\n * ```\n *\n * @return {QueryArgs} Query args object.\n */\nexport function getQueryArgs(url) {\n return (getQueryString(url) || ''\n // Normalize space encoding, accounting for PHP URL encoding\n // corresponding to `application/x-www-form-urlencoded`.\n //\n // See: https://tools.ietf.org/html/rfc1866#section-8.2.1\n ).replace(/\\+/g, '%20').split('&').reduce((accumulator, keyValue) => {\n const [key, value = ''] = keyValue.split('=')\n // Filtering avoids decoding as `undefined` for value, where\n // default is restored in destructuring assignment.\n .filter(Boolean).map(safeDecodeURIComponent);\n if (key) {\n const segments = key.replace(/\\]/g, '').split('[');\n setPath(accumulator, segments, value);\n }\n return accumulator;\n }, Object.create(null));\n}\n//# sourceMappingURL=get-query-args.js.map","/**\n * Internal dependencies\n */\nimport { getQueryArgs } from './get-query-args';\nimport { buildQueryString } from './build-query-string';\n\n/**\n * Appends arguments as querystring to the provided URL. If the URL already\n * includes query arguments, the arguments are merged with (and take precedent\n * over) the existing set.\n *\n * @param {string} [url=''] URL to which arguments should be appended. If omitted,\n * only the resulting querystring is returned.\n * @param {Object} [args] Query arguments to apply to URL.\n *\n * @example\n * ```js\n * const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test\n * ```\n *\n * @return {string} URL with arguments applied.\n */\nexport function addQueryArgs(url = '', args) {\n // If no arguments are to be appended, return original URL.\n if (!args || !Object.keys(args).length) {\n return url;\n }\n let baseUrl = url;\n\n // Determine whether URL already had query arguments.\n const queryStringIndex = url.indexOf('?');\n if (queryStringIndex !== -1) {\n // Merge into existing query arguments.\n args = Object.assign(getQueryArgs(url), args);\n\n // Change working base URL to omit previous query arguments.\n baseUrl = baseUrl.substr(0, queryStringIndex);\n }\n return baseUrl + '?' + buildQueryString(args);\n}\n//# sourceMappingURL=add-query-args.js.map"],"mappings":"AAYO,SAASA,EAAeC,GAC7B,IAAIC,EACJ,IACEA,EAAQ,IAAIC,IAAIF,EAAK,sBAAsBG,OAAOC,UAAU,EAChE,CAAI,MAAOC,GAAO,CAChB,GAAIJ,EAAO,CACT,OAAOA,CACX,CACA,CCIO,SAASK,EAAiBC,GAC/B,IAAIC,EAAS,GACb,MAAMC,EAAQC,OAAOC,QAAQJ,GAC7B,IAAIK,EACJ,MAAOA,EAAOH,EAAMI,QAAS,CAC3B,IAAKC,EAAKC,GAASH,EAGnB,MAAMI,EAAgBC,MAAMC,QAAQH,IAAUA,GAASA,EAAMI,cAAgBT,OAC7E,GAAIM,EAAe,CAIjB,MAAMI,EAAaV,OAAOC,QAAQI,GAAOM,UACzC,IAAK,MAAOC,EAAQC,KAAgBH,EAAY,CAC9CX,EAAMe,QAAQ,CAAC,GAAGV,KAAOQ,KAAWC,GAC5C,CACA,MAAW,GAAIR,IAAUU,UAAW,CAE9B,GAAIV,IAAU,KAAM,CAClBA,EAAQ,EAChB,CACMP,GAAU,IAAM,CAACM,E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