@seamly/web-ui 22.0.0-beta.1 → 22.0.1
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/build/dist/lib/components.js +174 -145
- package/build/dist/lib/components.js.map +1 -1
- package/build/dist/lib/components.min.js +1 -1
- package/build/dist/lib/components.min.js.LICENSE.txt +2 -2
- package/build/dist/lib/components.min.js.map +1 -1
- package/build/dist/lib/deprecated-view.css +1 -1
- package/build/dist/lib/deprecated-view.js +1 -1
- package/build/dist/lib/hooks.js +147 -137
- package/build/dist/lib/hooks.js.map +1 -1
- package/build/dist/lib/hooks.min.js +1 -1
- package/build/dist/lib/hooks.min.js.map +1 -1
- package/build/dist/lib/index.debug.js +74 -60
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +13 -9
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +176 -147
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.LICENSE.txt +2 -2
- package/build/dist/lib/index.min.js.map +1 -1
- package/build/dist/lib/standalone.js +398 -175
- package/build/dist/lib/standalone.js.map +1 -1
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.LICENSE.txt +1 -1
- package/build/dist/lib/standalone.min.js.map +1 -1
- package/build/dist/lib/storage.js +17 -17
- package/build/dist/lib/storage.js.map +1 -1
- package/build/dist/lib/storage.min.js +1 -1
- package/build/dist/lib/storage.min.js.LICENSE.txt +1 -1
- package/build/dist/lib/storage.min.js.map +1 -1
- package/build/dist/lib/style-guide.js +201 -139
- package/build/dist/lib/style-guide.js.map +1 -1
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/style-guide.min.js.LICENSE.txt +2 -2
- package/build/dist/lib/style-guide.min.js.map +1 -1
- package/build/dist/lib/styles-default-implementation.js +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/build/dist/lib/styles.js +1 -1
- package/build/dist/lib/utils.js +212 -192
- package/build/dist/lib/utils.js.map +1 -1
- package/build/dist/lib/utils.min.js +1 -1
- package/build/dist/lib/utils.min.js.LICENSE.txt +1 -1
- package/build/dist/lib/utils.min.js.map +1 -1
- package/package.json +30 -27
- package/src/javascripts/api/conversation-connector.ts +6 -4
- package/src/javascripts/domains/forms/provider.tsx +1 -1
- package/src/javascripts/domains/store/slice.ts +6 -0
- package/src/javascripts/domains/store/store.types.ts +6 -1
- package/src/javascripts/style-guide/states.js +44 -0
- package/src/javascripts/ui/components/conversation/conversation.tsx +3 -1
- package/src/javascripts/ui/components/core/seamly-event-subscriber.ts +38 -49
- package/src/javascripts/ui/components/core/seamly-live-region.js +1 -1
- package/src/javascripts/ui/hooks/{seamly-api-hooks.js → seamly-api-hooks.ts} +1 -1
- package/src/javascripts/ui/hooks/use-debounce.ts +18 -0
- package/src/javascripts/ui/hooks/use-seamly-chat.ts +3 -42
- package/src/.DS_Store +0 -0
|
@@ -83,7 +83,7 @@ function appStore() {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
;// CONCATENATED MODULE: ./node_modules/js-cookie/dist/js.cookie.mjs
|
|
86
|
-
/*! js-cookie v3.0.
|
|
86
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
87
87
|
/* eslint-disable no-var */
|
|
88
88
|
function js_cookie_assign (target) {
|
|
89
89
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -116,7 +116,7 @@ var defaultConverter = {
|
|
|
116
116
|
/* eslint-disable no-var */
|
|
117
117
|
|
|
118
118
|
function init (converter, defaultAttributes) {
|
|
119
|
-
function set (
|
|
119
|
+
function set (name, value, attributes) {
|
|
120
120
|
if (typeof document === 'undefined') {
|
|
121
121
|
return
|
|
122
122
|
}
|
|
@@ -130,7 +130,7 @@ function init (converter, defaultAttributes) {
|
|
|
130
130
|
attributes.expires = attributes.expires.toUTCString();
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
name = encodeURIComponent(name)
|
|
134
134
|
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
135
135
|
.replace(/[()]/g, escape);
|
|
136
136
|
|
|
@@ -157,11 +157,11 @@ function init (converter, defaultAttributes) {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
return (document.cookie =
|
|
160
|
-
|
|
160
|
+
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
function get (
|
|
164
|
-
if (typeof document === 'undefined' || (arguments.length && !
|
|
163
|
+
function get (name) {
|
|
164
|
+
if (typeof document === 'undefined' || (arguments.length && !name)) {
|
|
165
165
|
return
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -174,25 +174,25 @@ function init (converter, defaultAttributes) {
|
|
|
174
174
|
var value = parts.slice(1).join('=');
|
|
175
175
|
|
|
176
176
|
try {
|
|
177
|
-
var
|
|
178
|
-
jar[
|
|
177
|
+
var found = decodeURIComponent(parts[0]);
|
|
178
|
+
jar[found] = converter.read(value, found);
|
|
179
179
|
|
|
180
|
-
if (
|
|
180
|
+
if (name === found) {
|
|
181
181
|
break
|
|
182
182
|
}
|
|
183
183
|
} catch (e) {}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
return
|
|
186
|
+
return name ? jar[name] : jar
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
return Object.create(
|
|
190
190
|
{
|
|
191
|
-
set
|
|
192
|
-
get
|
|
193
|
-
remove: function (
|
|
191
|
+
set,
|
|
192
|
+
get,
|
|
193
|
+
remove: function (name, attributes) {
|
|
194
194
|
set(
|
|
195
|
-
|
|
195
|
+
name,
|
|
196
196
|
'',
|
|
197
197
|
js_cookie_assign({}, attributes, {
|
|
198
198
|
expires: -1
|
|
@@ -216,7 +216,7 @@ function init (converter, defaultAttributes) {
|
|
|
216
216
|
var api = init(defaultConverter, { path: '/' });
|
|
217
217
|
/* eslint-enable no-var */
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
|
|
220
220
|
|
|
221
221
|
;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/cookie-storage.js
|
|
222
222
|
|
|
@@ -225,14 +225,14 @@ function cookieStore(attributes = {}) {
|
|
|
225
225
|
const KEY = `cvco.${key}`;
|
|
226
226
|
return {
|
|
227
227
|
get() {
|
|
228
|
-
const jsonStr =
|
|
228
|
+
const jsonStr = api.get(KEY);
|
|
229
229
|
return jsonStr ? JSON.parse(jsonStr) : null;
|
|
230
230
|
},
|
|
231
231
|
set(value) {
|
|
232
232
|
if (!value) {
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
|
-
|
|
235
|
+
api.set(KEY, JSON.stringify(value), attributes);
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
238
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;ACNe,SAASA,QAAQA,CAAA,EAAG;EACjC,OAAO;IACLC,GAAG,EAAEA,CAAA,KAAM;MACT;MACA;MACA,IAAIC,MAAM,CAACC,cAAc,CAAC,cAAc,CAAC,EAAE;QACzC,IAAI;UACF;UACA,OAAOC,IAAI,CAACC,KAAK,CAACC,YAAY,CAACC,OAAO,EAAE,CAAC;QAC3C,CAAC,CAAC,OAAOC,CAAC,EAAE;UACVC,OAAO,CAACC,KAAK,CAAC,oDAAoD,EAAEF,CAAC,CAAC;UACtE;UACA;UACA,OAAO,CAAC,CAAC;QACX;MACF;MACA,OAAON,MAAM,CAACS,gBAAgB;IAChC,CAAC;IACDC,GAAG,EAAGC,OAAO,IAAK;MAChB;MACA,IACEX,MAAM,CAACY,MAAM,IACbZ,MAAM,CAACY,MAAM,CAACC,eAAe,IAC7Bb,MAAM,CAACY,MAAM,CAACC,eAAe,CAACC,YAAY,EAC1C;QACAd,MAAM,CAACY,MAAM,CAACC,eAAe,CAACC,YAAY,CAACC,WAAW,CACpDb,IAAI,CAACc,SAAS,CAACL,OAAO,CAAC,CACxB;MACH;;MAEA;MACA,IAAIX,MAAM,CAACC,cAAc,CAAC,cAAc,CAAC,EAAE;QACzC;QACAG,YAAY,CAACa,OAAO,CAACf,IAAI,CAACc,SAAS,CAACL,OAAO,CAAC,CAAC;MAC/C;;MAEA;MACA,IAAIX,MAAM,CAACkB,kBAAkB,EAAE;QAC7BlB,MAAM,CAACkB,kBAAkB,CAACH,WAAW,CAACb,IAAI,CAACc,SAAS,CAACL,OAAO,CAAC,CAAC;MAChE;IACF;EACF,CAAC;AACH;;AC1CA;AACA;AACA,SAAS,gBAAM;AACf,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,EAAE;AACtC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,gBAAM,GAAG;;AAE1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;;AAElC;AACA;AACA;;AAEA;AACA;AACA,qEAAqE;AACrE;AACA;AACA,0CAA0C;AAC1C;AACA,uEAAuE;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,6DAA6D;AAC7D;AACA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAM,GAAG;AACnB;AACA,WAAW;AACX;AACA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AG,CAAC;IACxB,CAAC;IAEDrB,GAAGA,CAACe,KAAK,EAAE;MACT,IAAI,CAACA,KAAK,EAAE;QACV;MACF;MACAO,cAAc,CAACG,OAAO,CAACZ,GAAG,EAAErB,IAAI,CAACc,SAAS,CAACS,KAAK,CAAC,CAAC;IACpD;EACF,CAAC;AACH;;ACpBkF;AACM","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/javascripts/lib/store/providers/app-storage.js","webpack:///./node_modules/js-cookie/dist/js.cookie.mjs","webpack:///./src/javascripts/lib/store/providers/cookie-storage.js","webpack:///./src/javascripts/lib/store/providers/session-storage.js","webpack:///./src/javascripts/package/storage.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function appStore() {\n return {\n get: () => {\n // For Android we can retrieve data directly over the bridge\n // iOS and ReactNative will write the data on the window.seamlyBridgeData object on init\n if (window.hasOwnProperty('SeamlyBridge')) {\n try {\n // eslint-disable-next-line no-undef\n return JSON.parse(SeamlyBridge.getData())\n } catch (e) {\n console.error('Unexpected or malformed data retrieved from bridge', e)\n // Android should always return unchanged JSON data.\n // If something went wrong parsing the response, it's best to start from scratch\n return {}\n }\n }\n return window.seamlyBridgeData\n },\n set: (newData) => {\n // iOS\n if (\n window.webkit &&\n window.webkit.messageHandlers &&\n window.webkit.messageHandlers.seamlyBridge\n ) {\n window.webkit.messageHandlers.seamlyBridge.postMessage(\n JSON.stringify(newData),\n )\n }\n\n // Android\n if (window.hasOwnProperty('SeamlyBridge')) {\n // eslint-disable-next-line no-undef\n SeamlyBridge.setData(JSON.stringify(newData))\n }\n\n // React Native\n if (window.ReactNativeWebView) {\n window.ReactNativeWebView.postMessage(JSON.stringify(newData))\n }\n },\n }\n}\n","/*! js-cookie v3.0.1 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (key, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n key = encodeURIComponent(key)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n key + '=' + converter.write(value, key) + stringifiedAttributes)\n }\n\n function get (key) {\n if (typeof document === 'undefined' || (arguments.length && !key)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n\n if (key === foundKey) {\n break\n }\n } catch (e) {}\n }\n\n return key ? jar[key] : jar\n }\n\n return Object.create(\n {\n set: set,\n get: get,\n remove: function (key, attributes) {\n set(\n key,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport default api;\n","import cookies from 'js-cookie'\n\nexport default function cookieStore(attributes = {}) {\n return function (key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const jsonStr = cookies.get(KEY)\n return jsonStr ? JSON.parse(jsonStr) : null\n },\n\n set(value) {\n if (!value) {\n return\n }\n cookies.set(KEY, JSON.stringify(value), attributes)\n },\n }\n }\n}\n","export default function store(key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')]\n let val\n do {\n val = sessionStorage.getItem(candidates[0])\n } while (candidates.shift() && !val)\n return JSON.parse(val)\n },\n\n set(value) {\n if (!value) {\n return\n }\n sessionStorage.setItem(KEY, JSON.stringify(value))\n },\n }\n}\n","export { default as appStorageProvider } from '../lib/store/providers/app-storage'\nexport { default as cookieStorageProvider } from '../lib/store/providers/cookie-storage'\nexport { default as sessionStorageProvider } from '../lib/store/providers/session-storage'\n"],"names":["appStore","get","window","hasOwnProperty","JSON","parse","SeamlyBridge","getData","e","console","error","seamlyBridgeData","set","newData","webkit","messageHandlers","seamlyBridge","postMessage","stringify","setData","ReactNativeWebView","cookies","cookieStore","attributes","key","KEY","jsonStr","value","store","candidates","split","slice","join","val","sessionStorage","getItem","shift","setItem","default","appStorageProvider","cookieStorageProvider","sessionStorageProvider"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"storage.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;ACNe,SAASA,QAAQA,CAAA,EAAG;EACjC,OAAO;IACLC,GAAG,EAAEA,CAAA,KAAM;MACT;MACA;MACA,IAAIC,MAAM,CAACC,cAAc,CAAC,cAAc,CAAC,EAAE;QACzC,IAAI;UACF;UACA,OAAOC,IAAI,CAACC,KAAK,CAACC,YAAY,CAACC,OAAO,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,OAAOC,CAAC,EAAE;UACVC,OAAO,CAACC,KAAK,CAAC,oDAAoD,EAAEF,CAAC,CAAC;UACtE;UACA;UACA,OAAO,CAAC,CAAC;QACX;MACF;MACA,OAAON,MAAM,CAACS,gBAAgB;IAChC,CAAC;IACDC,GAAG,EAAGC,OAAO,IAAK;MAChB;MACA,IACEX,MAAM,CAACY,MAAM,IACbZ,MAAM,CAACY,MAAM,CAACC,eAAe,IAC7Bb,MAAM,CAACY,MAAM,CAACC,eAAe,CAACC,YAAY,EAC1C;QACAd,MAAM,CAACY,MAAM,CAACC,eAAe,CAACC,YAAY,CAACC,WAAW,CACpDb,IAAI,CAACc,SAAS,CAACL,OAAO,CACxB,CAAC;MACH;;MAEA;MACA,IAAIX,MAAM,CAACC,cAAc,CAAC,cAAc,CAAC,EAAE;QACzC;QACAG,YAAY,CAACa,OAAO,CAACf,IAAI,CAACc,SAAS,CAACL,OAAO,CAAC,CAAC;MAC/C;;MAEA;MACA,IAAIX,MAAM,CAACkB,kBAAkB,EAAE;QAC7BlB,MAAM,CAACkB,kBAAkB,CAACH,WAAW,CAACb,IAAI,CAACc,SAAS,CAACL,OAAO,CAAC,CAAC;MAChE;IACF;EACF,CAAC;AACH;;AC1CA;AACA;AACA,SAAS,gBAAM;AACf,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,EAAE;AACtC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,gBAAM,GAAG;;AAE1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;;AAElC;AACA;AACA;;AAEA;AACA;AACA,qEAAqE;AACrE;AACA;AACA,0CAA0C;AAC1C;AACA,uEAAuE;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,6DAA6D;AAC7D;AACA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAM,GAAG;AACnB;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA,oCAAoC,gBAAM,GAAG;AAC7C,OAAO;AACP;AACA,oBAAoB,gBAAM,GAAG;AAC7B;AACA,KAAK;AACL;AACA,oBAAoB,yCAAyC;AAC7D,mBAAmB;AACnB;AACA;AACA;;AAEA,mCAAmC,WAAW;AAC9C;;AAE0B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BkF;AACM","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/javascripts/lib/store/providers/app-storage.js","webpack:///./node_modules/js-cookie/dist/js.cookie.mjs","webpack:///./src/javascripts/lib/store/providers/cookie-storage.js","webpack:///./src/javascripts/lib/store/providers/session-storage.js","webpack:///./src/javascripts/package/storage.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function appStore() {\n return {\n get: () => {\n // For Android we can retrieve data directly over the bridge\n // iOS and ReactNative will write the data on the window.seamlyBridgeData object on init\n if (window.hasOwnProperty('SeamlyBridge')) {\n try {\n // eslint-disable-next-line no-undef\n return JSON.parse(SeamlyBridge.getData())\n } catch (e) {\n console.error('Unexpected or malformed data retrieved from bridge', e)\n // Android should always return unchanged JSON data.\n // If something went wrong parsing the response, it's best to start from scratch\n return {}\n }\n }\n return window.seamlyBridgeData\n },\n set: (newData) => {\n // iOS\n if (\n window.webkit &&\n window.webkit.messageHandlers &&\n window.webkit.messageHandlers.seamlyBridge\n ) {\n window.webkit.messageHandlers.seamlyBridge.postMessage(\n JSON.stringify(newData),\n )\n }\n\n // Android\n if (window.hasOwnProperty('SeamlyBridge')) {\n // eslint-disable-next-line no-undef\n SeamlyBridge.setData(JSON.stringify(newData))\n }\n\n // React Native\n if (window.ReactNativeWebView) {\n window.ReactNativeWebView.postMessage(JSON.stringify(newData))\n }\n },\n }\n}\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import cookies from 'js-cookie'\n\nexport default function cookieStore(attributes = {}) {\n return function (key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const jsonStr = cookies.get(KEY)\n return jsonStr ? JSON.parse(jsonStr) : null\n },\n\n set(value) {\n if (!value) {\n return\n }\n cookies.set(KEY, JSON.stringify(value), attributes)\n },\n }\n }\n}\n","export default function store(key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')]\n let val\n do {\n val = sessionStorage.getItem(candidates[0])\n } while (candidates.shift() && !val)\n return JSON.parse(val)\n },\n\n set(value) {\n if (!value) {\n return\n }\n sessionStorage.setItem(KEY, JSON.stringify(value))\n },\n }\n}\n","export { default as appStorageProvider } from '../lib/store/providers/app-storage'\nexport { default as cookieStorageProvider } from '../lib/store/providers/cookie-storage'\nexport { default as sessionStorageProvider } from '../lib/store/providers/session-storage'\n"],"names":["appStore","get","window","hasOwnProperty","JSON","parse","SeamlyBridge","getData","e","console","error","seamlyBridgeData","set","newData","webkit","messageHandlers","seamlyBridge","postMessage","stringify","setData","ReactNativeWebView","cookies","cookieStore","attributes","key","KEY","jsonStr","value","store","candidates","split","slice","join","val","sessionStorage","getItem","shift","setItem","default","appStorageProvider","cookieStorageProvider","sessionStorageProvider"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see storage.min.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(){return{get:()=>{if(window.hasOwnProperty("SeamlyBridge"))try{return JSON.parse(SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),window.hasOwnProperty("SeamlyBridge")&&SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}e.r(t),e.d(t,{appStorageProvider:()=>r,cookieStorageProvider:()=>i,sessionStorageProvider:()=>s});
|
|
2
|
+
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(){return{get:()=>{if(window.hasOwnProperty("SeamlyBridge"))try{return JSON.parse(SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),window.hasOwnProperty("SeamlyBridge")&&SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}e.r(t),e.d(t,{appStorageProvider:()=>r,cookieStorageProvider:()=>i,sessionStorageProvider:()=>s});var o=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(n[a]=t.read(s,a),e===a)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function i(e={}){return function(t){const r=`cvco.${t}`;return{get(){const e=o.get(r);return e?JSON.parse(e):null},set(t){t&&o.set(r,JSON.stringify(t),e)}}}}function s(e){const t=`cvco.${e}`;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let r;do{r=sessionStorage.getItem(e[0])}while(e.shift()&&!r);return JSON.parse(r)},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}module.exports=t})();
|
|
3
3
|
//# sourceMappingURL=~/storage.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! js-cookie v3.0.
|
|
1
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.min.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,QCL/C,SAASC,IACtB,MAAO,CACLT,IAAKA,KAGH,GAAIU,OAAON,eAAe,gBACxB,IAEE,OAAOO,KAAKC,MAAMC,aAAaC,UACjC,CAAE,MAAOC,GAIP,OAHAC,QAAQC,MAAM,qDAAsDF,GAG7D,CAAC,CACV,CAEF,OAAOL,OAAOQ,gBAAgB,EAEhCC,IAAMC,IAGFV,OAAOW,QACPX,OAAOW,OAAOC,iBACdZ,OAAOW,OAAOC,gBAAgBC,cAE9Bb,OAAOW,OAAOC,gBAAgBC,aAAaC,YACzCb,KAAKc,UAAU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EpB,MAAO,CACLK,MACE,MAAMqE,EAAa,CAACH,EAAKA,EAAIlB,MAAM,KAAKO,MAAM,GAAI,GAAGC,KAAK,MAC1D,IAAIc,EACJ,GACEA,EAAMC,eAAeC,QAAQH,EAAW,UACjCA,EAAWI,UAAYH,GAChC,OAAO3D,KAAKC,MAAM0D,EACpB,EAEAnD,IAAIX,GACGA,GAGL+D,eAAeG,QAAQR,EAAKvD,KAAKc,UAAUjB,GAC7C,EAEJ","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/javascripts/lib/store/providers/app-storage.js","webpack:///./node_modules/js-cookie/dist/js.cookie.mjs","webpack:///./src/javascripts/lib/store/providers/cookie-storage.js","webpack:///./src/javascripts/lib/store/providers/session-storage.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function appStore() {\n return {\n get: () => {\n // For Android we can retrieve data directly over the bridge\n // iOS and ReactNative will write the data on the window.seamlyBridgeData object on init\n if (window.hasOwnProperty('SeamlyBridge')) {\n try {\n // eslint-disable-next-line no-undef\n return JSON.parse(SeamlyBridge.getData())\n } catch (e) {\n console.error('Unexpected or malformed data retrieved from bridge', e)\n // Android should always return unchanged JSON data.\n // If something went wrong parsing the response, it's best to start from scratch\n return {}\n }\n }\n return window.seamlyBridgeData\n },\n set: (newData) => {\n // iOS\n if (\n window.webkit &&\n window.webkit.messageHandlers &&\n window.webkit.messageHandlers.seamlyBridge\n ) {\n window.webkit.messageHandlers.seamlyBridge.postMessage(\n JSON.stringify(newData),\n )\n }\n\n // Android\n if (window.hasOwnProperty('SeamlyBridge')) {\n // eslint-disable-next-line no-undef\n SeamlyBridge.setData(JSON.stringify(newData))\n }\n\n // React Native\n if (window.ReactNativeWebView) {\n window.ReactNativeWebView.postMessage(JSON.stringify(newData))\n }\n },\n }\n}\n","/*! js-cookie v3.0.1 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (key, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n key = encodeURIComponent(key)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n key + '=' + converter.write(value, key) + stringifiedAttributes)\n }\n\n function get (key) {\n if (typeof document === 'undefined' || (arguments.length && !key)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n\n if (key === foundKey) {\n break\n }\n } catch (e) {}\n }\n\n return key ? jar[key] : jar\n }\n\n return Object.create(\n {\n set: set,\n get: get,\n remove: function (key, attributes) {\n set(\n key,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport default api;\n","import cookies from 'js-cookie'\n\nexport default function cookieStore(attributes = {}) {\n return function (key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const jsonStr = cookies.get(KEY)\n return jsonStr ? JSON.parse(jsonStr) : null\n },\n\n set(value) {\n if (!value) {\n return\n }\n cookies.set(KEY, JSON.stringify(value), attributes)\n },\n }\n }\n}\n","export default function store(key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')]\n let val\n do {\n val = sessionStorage.getItem(candidates[0])\n } while (candidates.shift() && !val)\n return JSON.parse(val)\n },\n\n set(value) {\n if (!value) {\n return\n }\n sessionStorage.setItem(KEY, JSON.stringify(value))\n },\n }\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","appStore","window","JSON","parse","SeamlyBridge","getData","e","console","error","seamlyBridgeData","set","newData","webkit","messageHandlers","seamlyBridge","postMessage","stringify","setData","ReactNativeWebView","target","i","arguments","length","source","init","converter","defaultAttributes","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","create","cookies","jar","parts","slice","join","foundKey","read","remove","withAttributes","this","withConverter","freeze","path","cookieStore","KEY","jsonStr","store","candidates","val","sessionStorage","getItem","shift","setItem"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"storage.min.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,QCL/C,SAASC,IACtB,MAAO,CACLT,IAAKA,KAGH,GAAIU,OAAON,eAAe,gBACxB,IAEE,OAAOO,KAAKC,MAAMC,aAAaC,UACjC,CAAE,MAAOC,GAIP,OAHAC,QAAQC,MAAM,qDAAsDF,GAG7D,CAAC,CACV,CAEF,OAAOL,OAAOQ,gBAAgB,EAEhCC,IAAMC,IAGFV,OAAOW,QACPX,OAAOW,OAAOC,iBACdZ,OAAOW,OAAOC,gBAAgBC,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CpBe,SAASgC,EAAM3E,GAC5B,MAAMyE,EAAO,QAAOzE,IAEpB,MAAO,CACLK,MACE,MAAMuE,EAAa,CAACH,EAAKA,EAAIlB,MAAM,KAAKO,MAAM,GAAI,GAAGC,KAAK,MAC1D,IAAIc,EACJ,GACEA,EAAMC,eAAeC,QAAQH,EAAW,UACjCA,EAAWI,UAAYH,GAChC,OAAO7D,KAAKC,MAAM4D,EACpB,EAEArD,IAAIX,GACGA,GAGLiE,eAAeG,QAAQR,EAAKzD,KAAKc,UAAUjB,GAC7C,EAEJ","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/javascripts/lib/store/providers/app-storage.js","webpack:///./node_modules/js-cookie/dist/js.cookie.mjs","webpack:///./src/javascripts/lib/store/providers/cookie-storage.js","webpack:///./src/javascripts/lib/store/providers/session-storage.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function appStore() {\n return {\n get: () => {\n // For Android we can retrieve data directly over the bridge\n // iOS and ReactNative will write the data on the window.seamlyBridgeData object on init\n if (window.hasOwnProperty('SeamlyBridge')) {\n try {\n // eslint-disable-next-line no-undef\n return JSON.parse(SeamlyBridge.getData())\n } catch (e) {\n console.error('Unexpected or malformed data retrieved from bridge', e)\n // Android should always return unchanged JSON data.\n // If something went wrong parsing the response, it's best to start from scratch\n return {}\n }\n }\n return window.seamlyBridgeData\n },\n set: (newData) => {\n // iOS\n if (\n window.webkit &&\n window.webkit.messageHandlers &&\n window.webkit.messageHandlers.seamlyBridge\n ) {\n window.webkit.messageHandlers.seamlyBridge.postMessage(\n JSON.stringify(newData),\n )\n }\n\n // Android\n if (window.hasOwnProperty('SeamlyBridge')) {\n // eslint-disable-next-line no-undef\n SeamlyBridge.setData(JSON.stringify(newData))\n }\n\n // React Native\n if (window.ReactNativeWebView) {\n window.ReactNativeWebView.postMessage(JSON.stringify(newData))\n }\n },\n }\n}\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import cookies from 'js-cookie'\n\nexport default function cookieStore(attributes = {}) {\n return function (key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const jsonStr = cookies.get(KEY)\n return jsonStr ? JSON.parse(jsonStr) : null\n },\n\n set(value) {\n if (!value) {\n return\n }\n cookies.set(KEY, JSON.stringify(value), attributes)\n },\n }\n }\n}\n","export default function store(key) {\n const KEY = `cvco.${key}`\n\n return {\n get() {\n const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')]\n let val\n do {\n val = sessionStorage.getItem(candidates[0])\n } while (candidates.shift() && !val)\n return JSON.parse(val)\n },\n\n set(value) {\n if (!value) {\n return\n }\n sessionStorage.setItem(KEY, JSON.stringify(value))\n },\n }\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","appStore","window","JSON","parse","SeamlyBridge","getData","e","console","error","seamlyBridgeData","set","newData","webkit","messageHandlers","seamlyBridge","postMessage","stringify","setData","ReactNativeWebView","target","i","arguments","length","source","api","init","converter","defaultAttributes","name","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","create","cookies","jar","parts","slice","join","found","read","remove","withAttributes","this","withConverter","freeze","path","cookieStore","KEY","jsonStr","store","candidates","val","sessionStorage","getItem","shift","setItem"],"sourceRoot":""}
|