<commit_before>!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("IFTmap")):"function"==typeof define&&define.amd?define(["IFTmap"],t):"object"==typeof exports?exports["iframe-transport"]=t(require("IFTmap")):e["iframe-transport"]=t(e.IFTmap)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=document.createElement("a");return t.href=e,e=t.host,m.hasOwnProperty(e)?m[e]:e}function i(e,t){var n=void 0;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){n=null,e.apply(r,o)},t)}}function a(e){g||(g=!0,y["default"].on("changes",function(t){if(b)console.log("wasme"),b=!1;else switch(console.log("change"),t.data.type){case"update":d({action:"broadcast",data:t.data.data},e);break;case"delete":p["default"].clear(function(t){console.log("Database is now empty.",t),d({action:"reset"},e)})}}))}function s(e,t){"object"===("undefined"==typeof e?"undefined":l(e))&&p["default"].setItem(o(t.origin),e,function(n,r){console.log("setItem"),w(e,t,n)})}function u(){b=!1,g=!1,y["default"].broadcast("changes",{type:"delete"})}function c(e){a(e),p["default"].getItem(o(e.origin),function(t,n){d({action:"get",data:{doc:n,err:t}},e)})}function f(e){var t=e.data;try{switch(t.action){case"get":c(e);break;case"reset":u();break;case"broadcast":s(t.data,e)}}catch(n){d({action:"error",error:n,req:t},e)}}function d(e,t){t&&t.hasOwnProperty("origin")?window.parent.postMessage(e,t.origin):window.parent.postMessage(e,"*")}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},v=n(2),p=r(v),h=n(1),y=r(h),m=n(5);p["default"].ready(function(){d({action:"loaded"})}),window.addEventListener||(window.addEventListener=function(e,t){window.attachEvent("on"+e,function(){return t(window.event)})});var b=!1,g=!1,w=i(function(e,t,n){console.log("debounce"),b=!0,n||y["default"].broadcast("changes",{type:"update",data:e})},600);window.addEventListener("message",function(e){f(e)},!1)},function(e,t,n){var r;(function(o){!function(o,i){r=function(e,t,n){"use strict";function r(){if(!C.supported){var e="crosstab not supported",t=[];throw A||t.push("localStorage not availabe"),o.addEventListener||t.push("addEventListener not available"),P&&t.push("mobile browser"),O&&t.push("frozen tab environment detected"),N||t.push("localStorage.setItem not allowed"),t.length>0&&(e+=": "+t.join(", ")),new Error(e)}}function i(e){if(e&&e.key in R.storageEventKeys){var t;try{t=e.newValue?JSON.parse(e.newValue):{}}catch(n){t={}}if(t&&t.id&&t.id!==C.id&&(e.newValue!==L||e.oldValue!==j))if(L=e.newValue,j=e.oldValue,e.key===R.keys.MESSAGE_KEY){var r=t.data;r.destination&&r.destination!==C.id||B.emit(r.event,r)}else e.key===R.keys.FROZEN_TAB_ENVIRONMENT?(O=t.data,C.supported=C.supported&&!t.data):e.key===R.keys.SUPPORTED_KEY&&(C.supported=C.supported&&t.data)}}function a(e,t){var n={id:C.id,data:t,timestamp:R.now()};A.setItem(e,JSON.stringify(n))}function s(e){var t=u(e);return t.data}function u(e){var t=A?A.getItem(e):null,n=t?JSON.parse(t):{};return n}function c(){C.stopKeepalive=!0;var e=0;R.forEach(R.tabs,function(t,n){n!==R.keys.MASTER_TAB&&e++}),1===e?(R.tabs={},S()):g(R.eventTypes.tabClosed,C.id)}function f(){C.stopKeepalive=!1,I()}function d(){o.removeEventListener("beforeunload",c,!1),o.addEventListener("unload",c,!1),f()}function l(){return R.tabs[R.keys.MASTER_TAB]}function v(e){R.tabs[R.keys.MASTER_TAB]=e}function p(){delete R.tabs[R.keys.MASTER_TAB]}function h(){var e=l();return e?e.id:0}function y(){return h()===C.id}function m(){var e=null;R.forEach(R.tabs,function(t){(!e||t.id<e)&&(e=t.id)}),e===C.id?g(R.eventTypes.tabPromoted,C.id):v({id:e,lastUpdated:R.now()})}function b(e,t,n){n=n||"0";var r=e.toString();return r.length>=t?r:new Array(t-r.length+1).join(n)+r}function g(e,t,n){C.supported||r();var o={id:R.generateId(),event:e,data:t,destination:n,origin:C.id,timestamp:R.now()};o.destination!==o.origin&&a(R.keys.MESSAGE_KEY,o),o.destination&&o.destination!==o.origin||B.emit(e,o)}function w(e,t){g(e,t,l().id)}function _(){C.supported=!1,O=!0,a(R.keys.FROZEN_TAB_ENVIRONMENT,!0),a(R.keys.SUPPORTED_KEY,!1)}function E(){var e=s(R.keys.TABS_KEY);return R.tabs=e||R.tabs||{},R.tabs}function S(){a(R.keys.TABS_KEY,R.tabs)}function k(){function e(e){return n-e.lastUpdated<W}function t(t,n){return n!==R.keys.MASTER_TAB&&!e(t)}var n=R.now(),r={id:C.id,lastUpdated:n};g(R.eventTypes.tabUpdated,r);var o=R.filter(R.tabs,t);if(R.forEach(o,function(e){g(R.eventTypes.tabClosed,e.id)}),!M){var i=l();if(i&&i.id!==r.id){var s,u;C.util.events.once("PONG",function(){M||(clearTimeout(s),a(R.keys.SUPPORTED_KEY,!0),a(R.keys.FROZEN_TAB_ENVIRONMENT,!1),R.events.emit("setupComplete"))}),u=R.now();var c=function(e){var t=R.now()-u;M||(0>=e&&t>V?(_(),R.events.emit("setupComplete")):s=setTimeout(function(){c(e-1)},5))},f=5;s=setTimeout(function(){c(5)},V-5*f),C.broadcastMaster("PING")}else i&&i.id===r.id&&R.events.emit("setupComplete")}}function I(){C.supported&&!C.stopKeepalive&&k()}var A,T=o.navigator&&(o.navigator.userAgent||o.navigator.vendor)||o.opera||"none",P=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(T)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(T.substr(0,4));try{A=o.localStorage,A=o["ie8-eventlistener/storage"]||o.localStorage}catch(x){}var N=!0;try{A.setItem("__crosstab",""),A.removeItem("__crosstab")}catch(x){N=!1}var O=!1,R={keys:{MESSAGE_KEY:"crosstab.MESSAGE_KEY",TABS_KEY:"crosstab.TABS_KEY",MASTER_TAB:"MASTER_TAB",SUPPORTED_KEY:"crosstab.SUPPORTED",FROZEN_TAB_ENVIRONMENT:"crosstab.FROZEN_TAB_ENVIRONMENT"}};R.isArray=Array.isArray||function(e){return e instanceof Array},R.isNumber=function(e){return"number"==typeof e},R.isFunction=function(e){return"function"==typeof e},R.forEachObj=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t.call(e,e[n],n,e)},R.forEachArr=function(e,t){for(var n=e.length,r=0;n>r;r++)t.call(e,e[r],r,e)},R.forEach=function(e,t){R.isArray(e)?R.forEachArr(e,t):R.forEachObj(e,t)},R.map=function(e,t){var n=[];return R.forEach(e,function(e,r,o){n.push(t(e,r,o))}),n},R.filter=function(e,t){var n=R.isArray(e),r=n?[]:{};return n?R.forEachArr(e,function(e,n){t(e,n)&&r.push(e)}):R.forEachObj(e,function(e,n){t(e,n)&&(r[n]=e)}),r},R.reduce=function(e,t,n){var r=arguments.length<3;return R.forEach(e,function(e,o,i){r?(n=e,r=!1):n=t(n,e,o,i)}),n},R.now=function(){return(new Date).getTime()},R.tabs=E(),R.eventTypes={becomeMaster:"becomeMaster",demoteFromMaster:"demotedFromMaster",tabUpdated:"tabUpdated",tabClosed:"tabClosed",tabPromoted:"tabPromoted"},R.storageEventKeys=R.reduce(R.keys,function(e,t){return e[t]=1,e},{}),R.createEventHandler=function(){var e={},t={},n=function(e,n){var r;return t[e]&&(r=t[e][n]),r},r=function(t,n){var r=-1,o=e[t];if(o&&n)for(var i=o.length||0,a=0;i>a;a++)if(o[a]===n){r=a;break}return r},o=function(e,o,i){var a,s=c(e),u=n(e,i);return void 0===u?(a=s.length,s[a]=o,t[e]||(t[e]={}),i&&(t[e][i]=o)):(a=r(e,u),s[a]=o),i||o},i=function(o,i){var a=R.isFunction(i)?i:n(o,i),s=r(o,a);return-1===s?!1:e[o]&&e[o][s]?(e[o].splice(s,1),delete t[o][i],!0):!1},a=function(n){var r=!1;return n?(e[n]&&(delete e[n],r=!0),t[n]&&(delete t[n],r=r&&!0)):(e={},t={},r=!0),r},s=function(e){var t=Array.prototype.slice.call(arguments,1),n=c(e);R.forEach(n,function(e){R.isFunction(e)&&e.apply(this,t)})},u=function(e,t,r){for(;!r||void 0!==n(e,r);)r=R.generateId();return o(e,function(){i(e,r);var n=Array.prototype.slice.call(arguments);t.apply(this,n)},r),r},c=function(t){var n=e[t]=e[t]||[];return n},f=function(){a()};return{addListener:o,destructor:f,on:o,off:function(e,t){var n=arguments.length;return n?1===n?a(e):i(e,t):a()},once:u,emit:s,listeners:c,removeListener:i,removeAllListeners:a}};var B=R.createEventHandler();R.events={addListener:B.addListener,on:B.on,off:B.off,once:B.once,emit:B.emit,listeners:B.listeners,removeListener:B.removeListener,removeAllListeners:B.removeAllListeners,destructor:B.destructor};var L,j;B.addListener(R.eventTypes.tabClosed,function(e){var t=e.data;t in R.tabs&&delete R.tabs[t];var n=l();n&&n.id!==t?n.id===C.id&&S():(n&&p(),m())}),B.addListener(R.eventTypes.tabUpdated,function(e){var t=e.data;R.tabs[t.id]=t,l()||m(),h()===t.id&&v(t),y()&&S()});var D;B.addListener(R.eventTypes.tabPromoted,function(e){var t=e.data,n=e.timestamp,r=h();return C.id<t?void(D||(D=setTimeout(function(){D=0,g(R.eventTypes.tabPromoted,C.id)},0))):(v({id:t,lastUpdated:n}),y()&&S(),void(y()&&r!==C.id?R.events.emit(R.eventTypes.becomeMaster):y()||r!==C.id||R.events.emit(R.eventTypes.demoteFromMaster)))}),R.generateId=function(){return R.now().toString()+b(2147483647*Math.random()|0,10)};var M=!1;R.events.once("setupComplete",function(){M=!0});var C=function(e){M?e():R.events.once("setupComplete",e)};C.id=R.generateId(),C.supported=!!A&&o.addEventListener&&!P&&N,C.util=R,C.broadcast=g,C.broadcastMaster=w,C.on=R.events.on,C.once=R.events.once,C.off=R.events.off;var F=6e5;if(!M&&C.supported){var z=u(R.keys.FROZEN_TAB_ENVIRONMENT);if(z.timestamp){var U=z.data;R.now()-z.timestamp>F?A.removeItem(R.keys.FROZEN_TAB_ENVIRONMENT):U===!0&&_()}var K=u(R.keys.SUPPORTED_KEY);if(K.timestamp){var q=K.data;R.now()-K.timestamp>F?A.removeItem(R.keys.SUPPORTED_KEY):q!==!1&&q!==!0||(C.supported=q,R.events.emit("setupComplete"))}}var Y=3e3,W=5e3,V=500;C.supported?(o.addEventListener("storage",i,!1),o.addEventListener("beforeunload",c,!1),o.addEventListener("DOMContentLoaded",d,!1),R.events.on("PING",function(e){e.destination&&e.destination===C.id&&R.now()-e.timestamp<V&&C.broadcast("PONG",null,e.origin)}),setInterval(I,Y),I()):C.broadcast=r,n.exports=C}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}("object"==typeof window?window:o,n(4))}).call(t,function(){return this}())},function(e,t,n){(function(t,n){/*!
	    localForage -- Offline Storage, Improved
	    Version 1.4.0
	    https://mozilla.github.io/localForage
	    (c) 2013-2015 Mozilla, Apache License 2.0
	*/
!function(){var e,r,o,i;!function(){var t={},n={};e=function(e,n,r){t[e]={deps:n,callback:r}},i=o=r=function(e){function o(t){if("."!==t.charAt(0))return t;for(var n=t.split("/"),r=e.split("/").slice(0,-1),o=0,i=n.length;i>o;o++){var a=n[o];if(".."===a)r.pop();else{if("."===a)continue;r.push(a)}}return r.join("/")}if(i._eak_seen=t,n[e])return n[e];if(n[e]={},!t[e])throw new Error("Could not find module "+e);for(var a,s=t[e],u=s.deps,c=s.callback,f=[],d=0,l=u.length;l>d;d++)"exports"===u[d]?f.push(a={}):f.push(r(o(u[d])));var v=c.apply(this,f);return n[e]=a||v}}(),e("promise/all",["./utils","exports"],function(e,t){"use strict";function n(e){var t=this;if(!r(e))throw new TypeError("You must pass an array to all.");return new t(function(t,n){function r(e){return function(t){i(e,t)}}function i(e,n){s[e]=n,0===--u&&t(s)}var a,s=[],u=e.length;0===u&&t([]);for(var c=0;c<e.length;c++)a=e[c],a&&o(a.then)?a.then(r(c),n):i(c,a)})}var r=e.isArray,o=e.isFunction;t.all=n}),e("promise/asap",["exports"],function(e){"use strict";function r(){return function(){n.nextTick(a)}}function o(){var e=0,t=new f(a),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function i(){return function(){d.setTimeout(a,1)}}function a(){for(var e=0;e<l.length;e++){var t=l[e],n=t[0],r=t[1];n(r)}l=[]}function s(e,t){var n=l.push([e,t]);1===n&&u()}var u,c="undefined"!=typeof window?window:{},f=c.MutationObserver||c.WebKitMutationObserver,d="undefined"!=typeof t?t:void 0===this?window:this,l=[];u="undefined"!=typeof n&&"[object process]"==={}.toString.call(n)?r():f?o():i(),e.asap=s}),e("promise/config",["exports"],function(e){"use strict";function t(e,t){return 2!==arguments.length?n[e]:void(n[e]=t)}var n={instrument:!1};e.config=n,e.configure=t}),e("promise/polyfill",["./promise","./utils","exports"],function(e,n,r){"use strict";function o(){var e;e="undefined"!=typeof t?t:"undefined"!=typeof window&&window.document?window:self;var n="Promise"in e&&"resolve"in e.Promise&&"reject"in e.Promise&&"all"in e.Promise&&"race"in e.Promise&&function(){var t;return new e.Promise(function(e){t=e}),a(t)}();n||(e.Promise=i)}var i=e.Promise,a=n.isFunction;r.polyfill=o}),e("promise/promise",["./config","./utils","./all","./race","./resolve","./reject","./asap","exports"],function(e,t,n,r,o,i,a,s){"use strict";function u(e){if(!_(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof u))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],c(e,this)}function c(e,t){function n(e){p(t,e)}function r(e){y(t,e)}try{e(n,r)}catch(o){r(o)}}function f(e,t,n,r){var o,i,a,s,u=_(n);if(u)try{o=n(r),a=!0}catch(c){s=!0,i=c}else o=r,a=!0;v(t,o)||(u&&a?p(t,o):s?y(t,i):e===x?p(t,o):e===N&&y(t,o))}function d(e,t,n,r){var o=e._subscribers,i=o.length;o[i]=t,o[i+x]=n,o[i+N]=r}function l(e,t){for(var n,r,o=e._subscribers,i=e._detail,a=0;a<o.length;a+=3)n=o[a],r=o[a+t],f(t,n,r,i);e._subscribers=null}function v(e,t){var n,r=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(w(t)&&(r=t.then,_(r)))return r.call(t,function(r){return n?!0:(n=!0,void(t!==r?p(e,r):h(e,r)))},function(t){return n?!0:(n=!0,void y(e,t))}),!0}catch(o){return n?!0:(y(e,o),!0)}return!1}function p(e,t){e===t?h(e,t):v(e,t)||h(e,t)}function h(e,t){e._state===T&&(e._state=P,e._detail=t,g.async(m,e))}function y(e,t){e._state===T&&(e._state=P,e._detail=t,g.async(b,e))}function m(e){l(e,e._state=x)}function b(e){l(e,e._state=N)}var g=e.config,w=(e.configure,t.objectOrFunction),_=t.isFunction,E=(t.now,n.all),S=r.race,k=o.resolve,I=i.reject,A=a.asap;g.async=A;var T=void 0,P=0,x=1,N=2;u.prototype={constructor:u,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(e,t){var n=this,r=new this.constructor(function(){});if(this._state){var o=arguments;g.async(function(){f(n._state,r,o[n._state-1],n._detail)})}else d(this,r,e,t);return r},"catch":function(e){return this.then(null,e)}},u.all=E,u.race=S,u.resolve=k,u.reject=I,s.Promise=u}),e("promise/race",["./utils","exports"],function(e,t){"use strict";function n(e){var t=this;if(!r(e))throw new TypeError("You must pass an array to race.");return new t(function(t,n){for(var r,o=0;o<e.length;o++)r=e[o],r&&"function"==typeof r.then?r.then(t,n):t(r)})}var r=e.isArray;t.race=n}),e("promise/reject",["exports"],function(e){"use strict";function t(e){var t=this;return new t(function(t,n){n(e)})}e.reject=t}),e("promise/resolve",["exports"],function(e){"use strict";function t(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=this;return new t(function(t){t(e)})}e.resolve=t}),e("promise/utils",["exports"],function(e){"use strict";function t(e){return n(e)||"object"==typeof e&&null!==e}function n(e){return"function"==typeof e}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}var o=Date.now||function(){return(new Date).getTime()};e.objectOrFunction=t,e.isFunction=n,e.isArray=r,e.now=o}),r("promise/polyfill").polyfill()}(),function(t,n){e.exports=n()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(e){function t(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function o(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(l(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}function i(e){for(var t in s)if(s.hasOwnProperty(t)&&s[t]===e)return!0;return!1}var a={},s={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},u=[s.INDEXEDDB,s.WEBSQL,s.LOCALSTORAGE],c=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],f={description:"",driver:u.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},d=function(e){var t={};return t[s.INDEXEDDB]=!!function(){try{var t=t||e.indexedDB||e.webkitIndexedDB||e.mozIndexedDB||e.OIndexedDB||e.msIndexedDB;return"undefined"!=typeof e.openDatabase&&e.navigator&&e.navigator.userAgent&&/Safari/.test(e.navigator.userAgent)&&!/Chrome/.test(e.navigator.userAgent)?!1:t&&"function"==typeof t.open&&"undefined"!=typeof e.IDBKeyRange}catch(n){return!1}}(),t[s.WEBSQL]=!!function(){try{return e.openDatabase}catch(t){return!1}}(),t[s.LOCALSTORAGE]=!!function(){try{return e.localStorage&&"setItem"in e.localStorage&&e.localStorage.setItem}catch(t){return!1}}(),t}(e),l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},v=function(){function e(t){r(this,e),this.INDEXEDDB=s.INDEXEDDB,this.LOCALSTORAGE=s.LOCALSTORAGE,this.WEBSQL=s.WEBSQL,this._defaultConfig=o({},f),this._config=o({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)}return e.prototype.config=function(e){if("object"==typeof e){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e)"storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),this._config[t]=e[t];return"driver"in e&&e.driver&&this.setDriver(this._config.driver),!0}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new Promise(function(t,n){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),s=new Error("Custom driver name already in use: "+e._driver);if(!e._driver)return void n(o);if(i(e._driver))return void n(s);for(var u=c.concat("_initStorage"),f=0;f<u.length;f++){var l=u[f];if(!l||!e[l]||"function"!=typeof e[l])return void n(o)}var v=Promise.resolve(!0);"_support"in e&&(v=e._support&&"function"==typeof e._support?e._support():Promise.resolve(!!e._support)),v.then(function(n){d[r]=n,a[r]=e,t()},n)}catch(p){n(p)}});return r.then(t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var o=this,s=function(){if(i(e))switch(e){case o.INDEXEDDB:return new Promise(function(e,t){e(n(1))});case o.LOCALSTORAGE:return new Promise(function(e,t){e(n(2))});case o.WEBSQL:return new Promise(function(e,t){e(n(4))})}else if(a[e])return Promise.resolve(a[e]);return Promise.reject(new Error("Driver not found."))}();return s.then(t,r),s},e.prototype.getSerializer=function(e){var t=new Promise(function(e,t){e(n(3))});return e&&"function"==typeof e&&t.then(function(t){e(t)}),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return n.then(e,e),n},e.prototype.setDriver=function(e,t,n){function r(){i._config.driver=i.driver()}function o(e){return function(){function t(){for(;n<e.length;){var o=e[n];return n++,i._dbInfo=null,i._ready=null,i.getDriver(o).then(function(e){return i._extend(e),r(),i._ready=i._initStorage(i._config),i._ready})["catch"](t)}r();var a=new Error("No available storage method found.");return i._driverSet=Promise.reject(a),i._driverSet}var n=0;return t()}}var i=this;l(e)||(e=[e]);var a=this._getSupportedDrivers(e),s=null!==this._driverSet?this._driverSet["catch"](function(){return Promise.resolve()}):Promise.resolve();return this._driverSet=s.then(function(){var e=a[0];return i._dbInfo=null,i._ready=null,i.getDriver(e).then(function(e){i._driver=e._driver,r(),i._wrapLibraryMethodsWithReady(),i._initDriver=o(a)})})["catch"](function(){r();var e=new Error("No available storage method found.");return i._driverSet=Promise.reject(e),i._driverSet}),this._driverSet.then(t,n),this._driverSet},e.prototype.supports=function(e){return!!d[e]},e.prototype._extend=function(e){o(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;r>n;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0;e<c.length;e++)t(this,c[e])},e.prototype.createInstance=function(t){return new e(t)},e}();return new v}("undefined"!=typeof window?window:self);t["default"]=o,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n=function(e){function t(t,n){t=t||[],n=n||{};try{return new Blob(t,n)}catch(r){if("TypeError"!==r.name)throw r;for(var o=e.BlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder||e.WebKitBlobBuilder,i=new o,a=0;a<t.length;a+=1)i.append(t[a]);return i.getBlob(n.type)}}function n(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;t>o;o++)r[o]=e.charCodeAt(o);return n}function r(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.open("GET",e),r.withCredentials=!0,r.responseType="arraybuffer",r.onreadystatechange=function(){return 4===r.readyState?200===r.status?t({response:r.response,type:r.getResponseHeader("Content-Type")}):void n({status:r.status,response:r.response}):void 0},r.send()})}function o(e){return new Promise(function(n,o){var i=t([""],{type:"image/png"}),a=e.transaction([x],"readwrite");a.objectStore(x).put(i,"key"),a.oncomplete=function(){var t=e.transaction([x],"readwrite"),i=t.objectStore(x).get("key");i.onerror=o,i.onsuccess=function(e){var t=e.target.result,o=URL.createObjectURL(t);r(o).then(function(e){n(!(!e||"image/png"!==e.type))},function(){n(!1)}).then(function(){URL.revokeObjectURL(o)})}},a.onerror=a.onabort=o})["catch"](function(){return!1})}function i(e){return"boolean"==typeof T?Promise.resolve(T):o(e).then(function(e){return T=e})}function a(e){return new Promise(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function s(e){var r=n(atob(e.data));return t([r],{type:e.type})}function u(e){return e&&e.__local_forage_encoded_blob}function c(e){var t=this,n=t._initReady().then(function(){var e=P[t._dbInfo.name];return e&&e.dbReady?e.dbReady:void 0});return n.then(e,e),n}function f(e){var t=P[e.name],n={};n.promise=new Promise(function(e){n.resolve=e}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function d(e){var t=P[e.name],n=t.deferredOperations.pop();n&&n.resolve()}function l(e){function t(){return Promise.resolve()}var n=this,r={db:null};if(e)for(var o in e)r[o]=e[o];P||(P={});var i=P[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},P[r.name]=i),i.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=c);for(var a=[],s=0;s<i.forages.length;s++){var u=i.forages[s];u!==n&&a.push(u._initReady()["catch"](t))}var f=i.forages.slice(0);return Promise.all(a).then(function(){return r.db=i.db,v(r)}).then(function(e){return r.db=e,y(r,n._defaultConfig.version)?p(r):e}).then(function(e){r.db=i.db=e,n._dbInfo=r;for(var t=0;t<f.length;t++){var o=f[t];o!==n&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}})}function v(e){return h(e,!1)}function p(e){return h(e,!0)}function h(t,n){return new Promise(function(r,o){if(t.db){if(!n)return r(t.db);f(t),t.db.close()}var i=[t.name];n&&i.push(t.version);var a=A.open.apply(A,i);n&&(a.onupgradeneeded=function(n){var r=a.result;try{r.createObjectStore(t.storeName),n.oldVersion<=1&&r.createObjectStore(x)}catch(o){if("ConstraintError"!==o.name)throw o;e.console.warn('The database "'+t.name+'" has been upgraded from version '+n.oldVersion+" to version "+n.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),a.onerror=function(){o(a.error)},a.onsuccess=function(){r(a.result),d(t)}})}function y(t,n){if(!t.db)return!0;var r=!t.db.objectStoreNames.contains(t.storeName),o=t.version<t.db.version,i=t.version>t.db.version;if(o&&(t.version!==n&&e.console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),i||r){if(r){var a=t.db.version+1;a>t.version&&(t.version=a)}return!0}return!1}function m(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo,i=o.db.transaction(o.storeName,"readonly").objectStore(o.storeName),a=i.get(t);a.onsuccess=function(){var t=a.result;void 0===t&&(t=null),u(t)&&(t=s(t)),e(t)},a.onerror=function(){n(a.error)}})["catch"](n)});return I(o,n),o}function b(e,t){var n=this,r=new Promise(function(t,r){n.ready().then(function(){var o=n._dbInfo,i=o.db.transaction(o.storeName,"readonly").objectStore(o.storeName),a=i.openCursor(),c=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;u(r)&&(r=s(r));var o=e(r,n.key,c++);void 0!==o?t(o):n["continue"]()}else t()},a.onerror=function(){r(a.error)}})["catch"](r)});return I(r,t),r}function g(t,n,r){var o=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var s=new Promise(function(e,r){var s;o.ready().then(function(){return s=o._dbInfo,n instanceof Blob?i(s.db).then(function(e){return e?n:a(n)}):n}).then(function(n){var o=s.db.transaction(s.storeName,"readwrite"),i=o.objectStore(s.storeName);null===n&&(n=void 0),o.oncomplete=function(){void 0===n&&(n=null),e(n)},o.onabort=o.onerror=function(){var e=a.error?a.error:a.transaction.error;r(e)};var a=i.put(n,t)})["catch"](r)});return I(s,r),s}function w(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo,i=o.db.transaction(o.storeName,"readwrite"),a=i.objectStore(o.storeName),s=a["delete"](t);i.oncomplete=function(){e()},i.onerror=function(){n(s.error)},i.onabort=function(){var e=s.error?s.error:s.transaction.error;n(e)}})["catch"](n)});return I(o,n),o}function _(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo,o=r.db.transaction(r.storeName,"readwrite"),i=o.objectStore(r.storeName),a=i.clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=a.error?a.error:a.transaction.error;n(e)}})["catch"](n)});return I(n,e),n}function E(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo,o=r.db.transaction(r.storeName,"readonly").objectStore(r.storeName),i=o.count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}})["catch"](n)});return I(n,e),n}function S(e,t){var n=this,r=new Promise(function(t,r){return 0>e?void t(null):void n.ready().then(function(){var o=n._dbInfo,i=o.db.transaction(o.storeName,"readonly").objectStore(o.storeName),a=!1,s=i.openCursor();s.onsuccess=function(){var n=s.result;return n?void(0===e?t(n.key):a?t(n.key):(a=!0,n.advance(e))):void t(null)},s.onerror=function(){r(s.error)}})["catch"](r)});return I(r,t),r}function k(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo,o=r.db.transaction(r.storeName,"readonly").objectStore(r.storeName),i=o.openCursor(),a=[];i.onsuccess=function(){var t=i.result;return t?(a.push(t.key),void t["continue"]()):void e(a)},i.onerror=function(){n(i.error)}})["catch"](n)});return I(n,e),n}function I(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}var A=A||e.indexedDB||e.webkitIndexedDB||e.mozIndexedDB||e.OIndexedDB||e.msIndexedDB;if(A){var T,P,x="local-forage-detect-blob-support",N={_driver:"asyncStorage",_initStorage:l,iterate:b,getItem:m,setItem:g,removeItem:w,clear:_,length:E,key:S,keys:k};return N}}("undefined"!=typeof window?window:self);t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){function t(e){var t=this,r={};if(e)for(var o in e)r[o]=e[o];return r.keyPrefix=r.name+"/",r.storeName!==t._defaultConfig.storeName&&(r.keyPrefix+=r.storeName+"/"),t._dbInfo=r,new Promise(function(e,t){e(n(3))}).then(function(e){return r.serializer=e,Promise.resolve()})}function r(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=l.length-1;n>=0;n--){var r=l.key(n);0===r.indexOf(e)&&l.removeItem(r)}});return d(n,e),n}function o(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=r.ready().then(function(){var e=r._dbInfo,n=l.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n});return d(o,n),o}function i(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=l.length,a=1,s=0;i>s;s++){var u=l.key(s);if(0===u.indexOf(r)){var c=l.getItem(u);if(c&&(c=t.serializer.deserialize(c)),c=e(c,u.substring(o),a++),void 0!==c)return c}}});return d(r,t),r}function a(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=l.key(e)}catch(o){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return d(r,t),r}function s(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=l.length,r=[],o=0;n>o;o++)0===l.key(o).indexOf(e.keyPrefix)&&r.push(l.key(o).substring(e.keyPrefix.length));return r});return d(n,e),n}function u(e){var t=this,n=t.keys().then(function(e){return e.length});return d(n,e),n}function c(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=r.ready().then(function(){var e=r._dbInfo;l.removeItem(e.keyPrefix+t)});return d(o,n),o}function f(t,n,r){var o=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var i=o.ready().then(function(){void 0===n&&(n=null);var e=n;return new Promise(function(r,i){var a=o._dbInfo;a.serializer.serialize(n,function(n,o){if(o)i(o);else try{l.setItem(a.keyPrefix+t,n),r(e)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||i(s),i(s)}})})});return d(i,r),i}function d(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}var l=null;try{if(!(e.localStorage&&"setItem"in e.localStorage))return;l=e.localStorage}catch(v){return}var p={_driver:"localStorageWrapper",_initStorage:t,iterate:i,getItem:o,setItem:f,removeItem:c,clear:r,length:u,key:a,keys:s};return p}("undefined"!=typeof window?window:self);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n=function(e){function t(t,n){t=t||[],n=n||{};try{return new Blob(t,n)}catch(r){if("TypeError"!==r.name)throw r;for(var o=e.BlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder||e.WebKitBlobBuilder,i=new o,a=0;a<t.length;a+=1)i.append(t[a]);return i.getBlob(n.type)}}function n(e,t){var n="";if(e&&(n=e.toString()),e&&("[object ArrayBuffer]"===e.toString()||e.buffer&&"[object ArrayBuffer]"===e.buffer.toString())){var r,o=c;e instanceof ArrayBuffer?(r=e,o+=d):(r=e.buffer,"[object Int8Array]"===n?o+=v:"[object Uint8Array]"===n?o+=p:"[object Uint8ClampedArray]"===n?o+=h:"[object Int16Array]"===n?o+=y:"[object Uint16Array]"===n?o+=b:"[object Int32Array]"===n?o+=m:"[object Uint32Array]"===n?o+=g:"[object Float32Array]"===n?o+=w:"[object Float64Array]"===n?o+=_:t(new Error("Failed to get type for BinaryArray"))),t(o+i(r))}else if("[object Blob]"===n){var a=new FileReader;a.onload=function(){var n=s+e.type+"~"+i(this.result);t(c+l+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(u){console.error("Couldn't convert value into a JSON string: ",e),t(null,u)}}function r(e){if(e.substring(0,f)!==c)return JSON.parse(e);var n,r=e.substring(E),i=e.substring(f,E);if(i===l&&u.test(r)){var a=r.match(u);n=a[1],r=r.substring(a[0].length)}var s=o(r);switch(i){case d:return s;case l:return t([s],{type:n});case v:return new Int8Array(s);case p:return new Uint8Array(s);case h:return new Uint8ClampedArray(s);case y:return new Int16Array(s);case b:return new Uint16Array(s);case m:return new Int32Array(s);case g:return new Uint32Array(s);case w:return new Float32Array(s);case _:return new Float64Array(s);default:throw new Error("Unkown type: "+i)}}function o(e){var t,n,r,o,i,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var f=new ArrayBuffer(s),d=new Uint8Array(f);for(t=0;u>t;t+=4)n=a.indexOf(e[t]),r=a.indexOf(e[t+1]),o=a.indexOf(e[t+2]),i=a.indexOf(e[t+3]),d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&i;return f}function i(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=a[n[t]>>2],r+=a[(3&n[t])<<4|n[t+1]>>4],r+=a[(15&n[t+1])<<2|n[t+2]>>6],r+=a[63&n[t+2]];return n.length%3===2?r=r.substring(0,r.length-1)+"=":n.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s="~~local_forage_type~",u=/^~~local_forage_type~([^~]+)~/,c="__lfsc__:",f=c.length,d="arbf",l="blob",v="si08",p="ui08",h="uic8",y="si16",m="si32",b="ur16",g="ui32",w="fl32",_="fl64",E=f+d.length,S={serialize:n,deserialize:r,stringToBuffer:o,bufferToString:i};return S}("undefined"!=typeof window?window:self);t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){function t(e){var t=this,r={db:null};if(e)for(var o in e)r[o]="string"!=typeof e[o]?e[o].toString():e[o];var i=new Promise(function(e,n){try{r.db=l(r.name,String(r.version),r.description,r.size)}catch(o){return n(o)}r.db.transaction(function(o){o.executeSql("CREATE TABLE IF NOT EXISTS "+r.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){t._dbInfo=r,e()},function(e,t){n(t)})})});return new Promise(function(e,t){e(n(3))}).then(function(e){return r.serializer=e,i})}function r(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){r.executeSql("SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[t],function(t,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),e(r)},function(e,t){n(t)})})})["catch"](n)});return d(o,n),o}function o(e,t){var n=this,r=new Promise(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,s=0;a>s;s++){var u=i.item(s),c=u.value;if(c&&(c=o.serializer.deserialize(c)),c=e(c,u.key,s+1),void 0!==c)return void t(c)}t()},function(e,t){r(t)})})})["catch"](r)});return d(r,t),r}function i(t,n,r){var o=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var i=new Promise(function(e,r){o.ready().then(function(){void 0===n&&(n=null);var i=n,a=o._dbInfo;a.serializer.serialize(n,function(n,o){o?r(o):a.db.transaction(function(o){o.executeSql("INSERT OR REPLACE INTO "+a.storeName+" (key, value) VALUES (?, ?)",[t,n],function(){e(i)},function(e,t){r(t)})},function(e){e.code===e.QUOTA_ERR&&r(e)})})})["catch"](r)});return d(i,r),i}function a(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){r.executeSql("DELETE FROM "+o.storeName+" WHERE key = ?",[t],function(){e()},function(e,t){n(t)})})})["catch"](n)});return d(o,n),o}function s(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})})["catch"](n)});return d(n,e),n}function u(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})})["catch"](n)});return d(n,e),n}function c(e,t){var n=this,r=new Promise(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})})["catch"](r)});return d(r,t),r}function f(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)},function(e,t){n(t)})})})["catch"](n)});return d(n,e),n}function d(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}var l=e.openDatabase;if(l){var v={_driver:"webSQLStorage",_initStorage:t,iterate:o,getItem:r,setItem:i,removeItem:a,clear:s,length:u,key:c,keys:f};return v}}("undefined"!=typeof window?window:self);t["default"]=r,e.exports=t["default"]}])})}).call(t,function(){return this}(),n(3))},function(e,t){function n(){c=!1,a.length?u=a.concat(u):f=-1,u.length&&r()}function r(){if(!c){var e=setTimeout(n);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var a,s=e.exports={},u=[],c=!1,f=-1;s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new o(e,t)),1!==u.length||c||setTimeout(r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=i,s.addListener=i,s.once=i,s.off=i,s.removeListener=i,s.removeAllListeners=i,s.emit=i,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(t,n){t.exports=e}])});<commit_msg>build with crosstab frozenTab overrides<commit_after>!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("IFTmap")):"function"==typeof define&&define.amd?define(["IFTmap"],t):"object"==typeof exports?exports["iframe-transport"]=t(require("IFTmap")):e["iframe-transport"]=t(e.IFTmap)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=document.createElement("a");return t.href=e,e=t.host,m.hasOwnProperty(e)?m[e]:e}function i(e,t){var n=void 0;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){n=null,e.apply(r,o)},t)}}function a(e){g||(g=!0,y["default"].on("changes",function(t){if(b)console.log("wasme"),b=!1;else switch(console.log("change"),t.data.type){case"update":d({action:"broadcast",data:t.data.data},e);break;case"delete":p["default"].clear(function(t){console.log("Database is now empty.",t),d({action:"reset"},e)})}}))}function s(e,t){"object"===("undefined"==typeof e?"undefined":l(e))&&p["default"].setItem(o(t.origin),e,function(n,r){console.log("setItem"),w(e,t,n)})}function u(){b=!1,g=!1,y["default"].broadcast("changes",{type:"delete"})}function c(e){a(e),p["default"].getItem(o(e.origin),function(t,n){d({action:"get",data:{doc:n,err:t}},e)})}function f(e){var t=e.data;try{switch(t.action){case"get":c(e);break;case"reset":u();break;case"broadcast":s(t.data,e)}}catch(n){d({action:"error",error:n,req:t},e)}}function d(e,t){t&&t.hasOwnProperty("origin")?window.parent.postMessage(e,t.origin):window.parent.postMessage(e,"*")}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},v=n(2),p=r(v),h=n(1),y=r(h),m=n(5);p["default"].ready(function(){d({action:"loaded"})}),window.addEventListener||(window.addEventListener=function(e,t){window.attachEvent("on"+e,function(){return t(window.event)})});var b=!1,g=!1,w=i(function(e,t,n){console.log("debounce"),b=!0,n||y["default"].broadcast("changes",{type:"update",data:e})},600);window.addEventListener("message",function(e){f(e)},!1)},function(e,t,n){var r;(function(o){!function(o,i){r=function(e,t,n){"use strict";function r(){if(!C.supported){var e="crosstab not supported",t=[];throw T||t.push("localStorage not availabe"),o.addEventListener||t.push("addEventListener not available"),P&&t.push("mobile browser"),O&&t.push("frozen tab environment detected"),N||t.push("localStorage.setItem not allowed"),t.length>0&&(e+=": "+t.join(", ")),new Error(e)}}function i(e){if(e&&e.key in R.storageEventKeys){var t;try{t=e.newValue?JSON.parse(e.newValue):{}}catch(n){t={}}if(t&&t.id&&t.id!==C.id&&(e.newValue!==L||e.oldValue!==j))if(L=e.newValue,j=e.oldValue,e.key===R.keys.MESSAGE_KEY){var r=t.data;r.destination&&r.destination!==C.id||B.emit(r.event,r)}else e.key===R.keys.FROZEN_TAB_ENVIRONMENT?(O=t.data,C.supported=C.supported&&!t.data):e.key===R.keys.SUPPORTED_KEY&&(C.supported=C.supported&&t.data)}}function a(e,t){var n={id:C.id,data:t,timestamp:R.now()};T.setItem(e,JSON.stringify(n))}function s(e){var t=u(e);return t.data}function u(e){var t=T?T.getItem(e):null,n=t?JSON.parse(t):{};return n}function c(){C.stopKeepalive=!0;var e=0;R.forEach(R.tabs,function(t,n){n!==R.keys.MASTER_TAB&&e++}),1===e?(R.tabs={},S()):g(R.eventTypes.tabClosed,C.id)}function f(){C.stopKeepalive=!1,I()}function d(){o.removeEventListener("beforeunload",c,!1),o.addEventListener("unload",c,!1),f()}function l(){return R.tabs[R.keys.MASTER_TAB]}function v(e){R.tabs[R.keys.MASTER_TAB]=e}function p(){delete R.tabs[R.keys.MASTER_TAB]}function h(){var e=l();return e?e.id:0}function y(){return h()===C.id}function m(){var e=null;R.forEach(R.tabs,function(t){(!e||t.id<e)&&(e=t.id)}),e===C.id?g(R.eventTypes.tabPromoted,C.id):v({id:e,lastUpdated:R.now()})}function b(e,t,n){n=n||"0";var r=e.toString();return r.length>=t?r:new Array(t-r.length+1).join(n)+r}function g(e,t,n){C.supported||r();var o={id:R.generateId(),event:e,data:t,destination:n,origin:C.id,timestamp:R.now()};o.destination!==o.origin&&a(R.keys.MESSAGE_KEY,o),o.destination&&o.destination!==o.origin||B.emit(e,o)}function w(e,t){g(e,t,l().id)}function _(){console.log("Custom IFT crosstab warning: frozenTabEnvironmentDetected but overridden"),C.supported=!0,O=!1,a(R.keys.FROZEN_TAB_ENVIRONMENT,!1),a(R.keys.SUPPORTED_KEY,!0)}function E(){var e=s(R.keys.TABS_KEY);return R.tabs=e||R.tabs||{},R.tabs}function S(){a(R.keys.TABS_KEY,R.tabs)}function k(){function e(e){return n-e.lastUpdated<W}function t(t,n){return n!==R.keys.MASTER_TAB&&!e(t)}var n=R.now(),r={id:C.id,lastUpdated:n};g(R.eventTypes.tabUpdated,r);var o=R.filter(R.tabs,t);if(R.forEach(o,function(e){g(R.eventTypes.tabClosed,e.id)}),!M){var i=l();if(i&&i.id!==r.id){var s,u;C.util.events.once("PONG",function(){M||(clearTimeout(s),a(R.keys.SUPPORTED_KEY,!0),a(R.keys.FROZEN_TAB_ENVIRONMENT,!1),R.events.emit("setupComplete"))}),u=R.now();var c=function(e){var t=R.now()-u;M||(0>=e&&t>V?(_(),R.events.emit("setupComplete")):s=setTimeout(function(){c(e-1)},5))},f=5;s=setTimeout(function(){c(5)},V-5*f),C.broadcastMaster("PING")}else i&&i.id===r.id&&R.events.emit("setupComplete")}}function I(){C.supported&&!C.stopKeepalive&&k()}var T,A=o.navigator&&(o.navigator.userAgent||o.navigator.vendor)||o.opera||"none",P=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(A)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(A.substr(0,4));try{T=o.localStorage,T=o["ie8-eventlistener/storage"]||o.localStorage}catch(x){}var N=!0;try{T.setItem("__crosstab",""),T.removeItem("__crosstab")}catch(x){N=!1}var O=!1,R={keys:{MESSAGE_KEY:"crosstab.MESSAGE_KEY",TABS_KEY:"crosstab.TABS_KEY",MASTER_TAB:"MASTER_TAB",SUPPORTED_KEY:"crosstab.SUPPORTED",FROZEN_TAB_ENVIRONMENT:"crosstab.FROZEN_TAB_ENVIRONMENT"}};R.isArray=Array.isArray||function(e){return e instanceof Array},R.isNumber=function(e){return"number"==typeof e},R.isFunction=function(e){return"function"==typeof e},R.forEachObj=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t.call(e,e[n],n,e)},R.forEachArr=function(e,t){for(var n=e.length,r=0;n>r;r++)t.call(e,e[r],r,e)},R.forEach=function(e,t){R.isArray(e)?R.forEachArr(e,t):R.forEachObj(e,t)},R.map=function(e,t){var n=[];return R.forEach(e,function(e,r,o){n.push(t(e,r,o))}),n},R.filter=function(e,t){var n=R.isArray(e),r=n?[]:{};return n?R.forEachArr(e,function(e,n){t(e,n)&&r.push(e)}):R.forEachObj(e,function(e,n){t(e,n)&&(r[n]=e)}),r},R.reduce=function(e,t,n){var r=arguments.length<3;return R.forEach(e,function(e,o,i){r?(n=e,r=!1):n=t(n,e,o,i)}),n},R.now=function(){return(new Date).getTime()},R.tabs=E(),R.eventTypes={becomeMaster:"becomeMaster",demoteFromMaster:"demotedFromMaster",tabUpdated:"tabUpdated",tabClosed:"tabClosed",tabPromoted:"tabPromoted"},R.storageEventKeys=R.reduce(R.keys,function(e,t){return e[t]=1,e},{}),R.createEventHandler=function(){var e={},t={},n=function(e,n){var r;return t[e]&&(r=t[e][n]),r},r=function(t,n){var r=-1,o=e[t];if(o&&n)for(var i=o.length||0,a=0;i>a;a++)if(o[a]===n){r=a;break}return r},o=function(e,o,i){var a,s=c(e),u=n(e,i);return void 0===u?(a=s.length,s[a]=o,t[e]||(t[e]={}),i&&(t[e][i]=o)):(a=r(e,u),s[a]=o),i||o},i=function(o,i){var a=R.isFunction(i)?i:n(o,i),s=r(o,a);return-1===s?!1:e[o]&&e[o][s]?(e[o].splice(s,1),delete t[o][i],!0):!1},a=function(n){var r=!1;return n?(e[n]&&(delete e[n],r=!0),t[n]&&(delete t[n],r=r&&!0)):(e={},t={},r=!0),r},s=function(e){var t=Array.prototype.slice.call(arguments,1),n=c(e);R.forEach(n,function(e){R.isFunction(e)&&e.apply(this,t)})},u=function(e,t,r){for(;!r||void 0!==n(e,r);)r=R.generateId();return o(e,function(){i(e,r);var n=Array.prototype.slice.call(arguments);t.apply(this,n)},r),r},c=function(t){var n=e[t]=e[t]||[];return n},f=function(){a()};return{addListener:o,destructor:f,on:o,off:function(e,t){var n=arguments.length;return n?1===n?a(e):i(e,t):a()},once:u,emit:s,listeners:c,removeListener:i,removeAllListeners:a}};var B=R.createEventHandler();R.events={addListener:B.addListener,on:B.on,off:B.off,once:B.once,emit:B.emit,listeners:B.listeners,removeListener:B.removeListener,removeAllListeners:B.removeAllListeners,destructor:B.destructor};var L,j;B.addListener(R.eventTypes.tabClosed,function(e){var t=e.data;t in R.tabs&&delete R.tabs[t];var n=l();n&&n.id!==t?n.id===C.id&&S():(n&&p(),m())}),B.addListener(R.eventTypes.tabUpdated,function(e){var t=e.data;R.tabs[t.id]=t,l()||m(),h()===t.id&&v(t),y()&&S()});var D;B.addListener(R.eventTypes.tabPromoted,function(e){var t=e.data,n=e.timestamp,r=h();return C.id<t?void(D||(D=setTimeout(function(){D=0,g(R.eventTypes.tabPromoted,C.id)},0))):(v({id:t,lastUpdated:n}),y()&&S(),void(y()&&r!==C.id?R.events.emit(R.eventTypes.becomeMaster):y()||r!==C.id||R.events.emit(R.eventTypes.demoteFromMaster)))}),R.generateId=function(){return R.now().toString()+b(2147483647*Math.random()|0,10)};var M=!1;R.events.once("setupComplete",function(){M=!0});var C=function(e){M?e():R.events.once("setupComplete",e)};C.id=R.generateId(),C.supported=!!T&&o.addEventListener&&!P&&N,C.util=R,C.broadcast=g,C.broadcastMaster=w,C.on=R.events.on,C.once=R.events.once,C.off=R.events.off;var F=6e5;if(!M&&C.supported){var z=u(R.keys.FROZEN_TAB_ENVIRONMENT);if(z.timestamp){var U=z.data;R.now()-z.timestamp>F?T.removeItem(R.keys.FROZEN_TAB_ENVIRONMENT):U===!0&&_()}var K=u(R.keys.SUPPORTED_KEY);if(K.timestamp){var q=K.data;R.now()-K.timestamp>F?T.removeItem(R.keys.SUPPORTED_KEY):q!==!1&&q!==!0||(C.supported=q,R.events.emit("setupComplete"))}}var Y=3e3,W=5e3,V=500;C.supported?(o.addEventListener("storage",i,!1),o.addEventListener("beforeunload",c,!1),o.addEventListener("DOMContentLoaded",d,!1),R.events.on("PING",function(e){e.destination&&e.destination===C.id&&R.now()-e.timestamp<V&&C.broadcast("PONG",null,e.origin)}),setInterval(I,Y),I()):C.broadcast=r,n.exports=C}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}("object"==typeof window?window:o,n(4))}).call(t,function(){return this}())},function(e,t,n){(function(t,n){/*!
	    localForage -- Offline Storage, Improved
	    Version 1.4.0
	    https://mozilla.github.io/localForage
	    (c) 2013-2015 Mozilla, Apache License 2.0
	*/
!function(){var e,r,o,i;!function(){var t={},n={};e=function(e,n,r){t[e]={deps:n,callback:r}},i=o=r=function(e){function o(t){if("."!==t.charAt(0))return t;for(var n=t.split("/"),r=e.split("/").slice(0,-1),o=0,i=n.length;i>o;o++){var a=n[o];if(".."===a)r.pop();else{if("."===a)continue;r.push(a)}}return r.join("/")}if(i._eak_seen=t,n[e])return n[e];if(n[e]={},!t[e])throw new Error("Could not find module "+e);for(var a,s=t[e],u=s.deps,c=s.callback,f=[],d=0,l=u.length;l>d;d++)"exports"===u[d]?f.push(a={}):f.push(r(o(u[d])));var v=c.apply(this,f);return n[e]=a||v}}(),e("promise/all",["./utils","exports"],function(e,t){"use strict";function n(e){var t=this;if(!r(e))throw new TypeError("You must pass an array to all.");return new t(function(t,n){function r(e){return function(t){i(e,t)}}function i(e,n){s[e]=n,0===--u&&t(s)}var a,s=[],u=e.length;0===u&&t([]);for(var c=0;c<e.length;c++)a=e[c],a&&o(a.then)?a.then(r(c),n):i(c,a)})}var r=e.isArray,o=e.isFunction;t.all=n}),e("promise/asap",["exports"],function(e){"use strict";function r(){return function(){n.nextTick(a)}}function o(){var e=0,t=new f(a),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function i(){return function(){d.setTimeout(a,1)}}function a(){for(var e=0;e<l.length;e++){var t=l[e],n=t[0],r=t[1];n(r)}l=[]}function s(e,t){var n=l.push([e,t]);1===n&&u()}var u,c="undefined"!=typeof window?window:{},f=c.MutationObserver||c.WebKitMutationObserver,d="undefined"!=typeof t?t:void 0===this?window:this,l=[];u="undefined"!=typeof n&&"[object process]"==={}.toString.call(n)?r():f?o():i(),e.asap=s}),e("promise/config",["exports"],function(e){"use strict";function t(e,t){return 2!==arguments.length?n[e]:void(n[e]=t)}var n={instrument:!1};e.config=n,e.configure=t}),e("promise/polyfill",["./promise","./utils","exports"],function(e,n,r){"use strict";function o(){var e;e="undefined"!=typeof t?t:"undefined"!=typeof window&&window.document?window:self;var n="Promise"in e&&"resolve"in e.Promise&&"reject"in e.Promise&&"all"in e.Promise&&"race"in e.Promise&&function(){var t;return new e.Promise(function(e){t=e}),a(t)}();n||(e.Promise=i)}var i=e.Promise,a=n.isFunction;r.polyfill=o}),e("promise/promise",["./config","./utils","./all","./race","./resolve","./reject","./asap","exports"],function(e,t,n,r,o,i,a,s){"use strict";function u(e){if(!_(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof u))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],c(e,this)}function c(e,t){function n(e){p(t,e)}function r(e){y(t,e)}try{e(n,r)}catch(o){r(o)}}function f(e,t,n,r){var o,i,a,s,u=_(n);if(u)try{o=n(r),a=!0}catch(c){s=!0,i=c}else o=r,a=!0;v(t,o)||(u&&a?p(t,o):s?y(t,i):e===x?p(t,o):e===N&&y(t,o))}function d(e,t,n,r){var o=e._subscribers,i=o.length;o[i]=t,o[i+x]=n,o[i+N]=r}function l(e,t){for(var n,r,o=e._subscribers,i=e._detail,a=0;a<o.length;a+=3)n=o[a],r=o[a+t],f(t,n,r,i);e._subscribers=null}function v(e,t){var n,r=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(w(t)&&(r=t.then,_(r)))return r.call(t,function(r){return n?!0:(n=!0,void(t!==r?p(e,r):h(e,r)))},function(t){return n?!0:(n=!0,void y(e,t))}),!0}catch(o){return n?!0:(y(e,o),!0)}return!1}function p(e,t){e===t?h(e,t):v(e,t)||h(e,t)}function h(e,t){e._state===A&&(e._state=P,e._detail=t,g.async(m,e))}function y(e,t){e._state===A&&(e._state=P,e._detail=t,g.async(b,e))}function m(e){l(e,e._state=x)}function b(e){l(e,e._state=N)}var g=e.config,w=(e.configure,t.objectOrFunction),_=t.isFunction,E=(t.now,n.all),S=r.race,k=o.resolve,I=i.reject,T=a.asap;g.async=T;var A=void 0,P=0,x=1,N=2;u.prototype={constructor:u,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(e,t){var n=this,r=new this.constructor(function(){});if(this._state){var o=arguments;g.async(function(){f(n._state,r,o[n._state-1],n._detail)})}else d(this,r,e,t);return r},"catch":function(e){return this.then(null,e)}},u.all=E,u.race=S,u.resolve=k,u.reject=I,s.Promise=u}),e("promise/race",["./utils","exports"],function(e,t){"use strict";function n(e){var t=this;if(!r(e))throw new TypeError("You must pass an array to race.");return new t(function(t,n){for(var r,o=0;o<e.length;o++)r=e[o],r&&"function"==typeof r.then?r.then(t,n):t(r)})}var r=e.isArray;t.race=n}),e("promise/reject",["exports"],function(e){"use strict";function t(e){var t=this;return new t(function(t,n){n(e)})}e.reject=t}),e("promise/resolve",["exports"],function(e){"use strict";function t(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=this;return new t(function(t){t(e)})}e.resolve=t}),e("promise/utils",["exports"],function(e){"use strict";function t(e){return n(e)||"object"==typeof e&&null!==e}function n(e){return"function"==typeof e}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}var o=Date.now||function(){return(new Date).getTime()};e.objectOrFunction=t,e.isFunction=n,e.isArray=r,e.now=o}),r("promise/polyfill").polyfill()}(),function(t,n){e.exports=n()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(e){function t(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function o(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(l(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}function i(e){for(var t in s)if(s.hasOwnProperty(t)&&s[t]===e)return!0;return!1}var a={},s={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},u=[s.INDEXEDDB,s.WEBSQL,s.LOCALSTORAGE],c=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],f={description:"",driver:u.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},d=function(e){var t={};return t[s.INDEXEDDB]=!!function(){try{var t=t||e.indexedDB||e.webkitIndexedDB||e.mozIndexedDB||e.OIndexedDB||e.msIndexedDB;return"undefined"!=typeof e.openDatabase&&e.navigator&&e.navigator.userAgent&&/Safari/.test(e.navigator.userAgent)&&!/Chrome/.test(e.navigator.userAgent)?!1:t&&"function"==typeof t.open&&"undefined"!=typeof e.IDBKeyRange}catch(n){return!1}}(),t[s.WEBSQL]=!!function(){try{return e.openDatabase}catch(t){return!1}}(),t[s.LOCALSTORAGE]=!!function(){try{return e.localStorage&&"setItem"in e.localStorage&&e.localStorage.setItem}catch(t){return!1}}(),t}(e),l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},v=function(){function e(t){r(this,e),this.INDEXEDDB=s.INDEXEDDB,this.LOCALSTORAGE=s.LOCALSTORAGE,this.WEBSQL=s.WEBSQL,this._defaultConfig=o({},f),this._config=o({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)}return e.prototype.config=function(e){if("object"==typeof e){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e)"storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),this._config[t]=e[t];return"driver"in e&&e.driver&&this.setDriver(this._config.driver),!0}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new Promise(function(t,n){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),s=new Error("Custom driver name already in use: "+e._driver);if(!e._driver)return void n(o);if(i(e._driver))return void n(s);for(var u=c.concat("_initStorage"),f=0;f<u.length;f++){var l=u[f];if(!l||!e[l]||"function"!=typeof e[l])return void n(o)}var v=Promise.resolve(!0);"_support"in e&&(v=e._support&&"function"==typeof e._support?e._support():Promise.resolve(!!e._support)),v.then(function(n){d[r]=n,a[r]=e,t()},n)}catch(p){n(p)}});return r.then(t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var o=this,s=function(){if(i(e))switch(e){case o.INDEXEDDB:return new Promise(function(e,t){e(n(1))});case o.LOCALSTORAGE:return new Promise(function(e,t){e(n(2))});case o.WEBSQL:return new Promise(function(e,t){e(n(4))})}else if(a[e])return Promise.resolve(a[e]);return Promise.reject(new Error("Driver not found."))}();return s.then(t,r),s},e.prototype.getSerializer=function(e){var t=new Promise(function(e,t){e(n(3))});return e&&"function"==typeof e&&t.then(function(t){e(t)}),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return n.then(e,e),n},e.prototype.setDriver=function(e,t,n){function r(){i._config.driver=i.driver()}function o(e){return function(){function t(){for(;n<e.length;){var o=e[n];return n++,i._dbInfo=null,i._ready=null,i.getDriver(o).then(function(e){return i._extend(e),r(),i._ready=i._initStorage(i._config),i._ready})["catch"](t)}r();var a=new Error("No available storage method found.");return i._driverSet=Promise.reject(a),i._driverSet}var n=0;return t()}}var i=this;l(e)||(e=[e]);var a=this._getSupportedDrivers(e),s=null!==this._driverSet?this._driverSet["catch"](function(){return Promise.resolve()}):Promise.resolve();return this._driverSet=s.then(function(){var e=a[0];return i._dbInfo=null,i._ready=null,i.getDriver(e).then(function(e){i._driver=e._driver,r(),i._wrapLibraryMethodsWithReady(),i._initDriver=o(a)})})["catch"](function(){r();var e=new Error("No available storage method found.");return i._driverSet=Promise.reject(e),i._driverSet}),this._driverSet.then(t,n),this._driverSet},e.prototype.supports=function(e){return!!d[e]},e.prototype._extend=function(e){o(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;r>n;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0;e<c.length;e++)t(this,c[e])},e.prototype.createInstance=function(t){return new e(t)},e}();return new v}("undefined"!=typeof window?window:self);t["default"]=o,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n=function(e){function t(t,n){t=t||[],n=n||{};try{return new Blob(t,n)}catch(r){if("TypeError"!==r.name)throw r;for(var o=e.BlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder||e.WebKitBlobBuilder,i=new o,a=0;a<t.length;a+=1)i.append(t[a]);return i.getBlob(n.type)}}function n(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;t>o;o++)r[o]=e.charCodeAt(o);return n}function r(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.open("GET",e),r.withCredentials=!0,r.responseType="arraybuffer",r.onreadystatechange=function(){return 4===r.readyState?200===r.status?t({response:r.response,type:r.getResponseHeader("Content-Type")}):void n({status:r.status,response:r.response}):void 0},r.send()})}function o(e){return new Promise(function(n,o){var i=t([""],{type:"image/png"}),a=e.transaction([x],"readwrite");a.objectStore(x).put(i,"key"),a.oncomplete=function(){var t=e.transaction([x],"readwrite"),i=t.objectStore(x).get("key");i.onerror=o,i.onsuccess=function(e){var t=e.target.result,o=URL.createObjectURL(t);r(o).then(function(e){n(!(!e||"image/png"!==e.type))},function(){n(!1)}).then(function(){URL.revokeObjectURL(o)})}},a.onerror=a.onabort=o})["catch"](function(){return!1})}function i(e){return"boolean"==typeof A?Promise.resolve(A):o(e).then(function(e){return A=e})}function a(e){return new Promise(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function s(e){var r=n(atob(e.data));return t([r],{type:e.type})}function u(e){return e&&e.__local_forage_encoded_blob}function c(e){var t=this,n=t._initReady().then(function(){var e=P[t._dbInfo.name];return e&&e.dbReady?e.dbReady:void 0});return n.then(e,e),n}function f(e){var t=P[e.name],n={};n.promise=new Promise(function(e){n.resolve=e}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function d(e){var t=P[e.name],n=t.deferredOperations.pop();n&&n.resolve()}function l(e){function t(){return Promise.resolve()}var n=this,r={db:null};if(e)for(var o in e)r[o]=e[o];P||(P={});var i=P[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},P[r.name]=i),i.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=c);for(var a=[],s=0;s<i.forages.length;s++){var u=i.forages[s];u!==n&&a.push(u._initReady()["catch"](t))}var f=i.forages.slice(0);return Promise.all(a).then(function(){return r.db=i.db,v(r)}).then(function(e){return r.db=e,y(r,n._defaultConfig.version)?p(r):e}).then(function(e){r.db=i.db=e,n._dbInfo=r;for(var t=0;t<f.length;t++){var o=f[t];o!==n&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}})}function v(e){return h(e,!1)}function p(e){return h(e,!0)}function h(t,n){return new Promise(function(r,o){if(t.db){if(!n)return r(t.db);f(t),t.db.close()}var i=[t.name];n&&i.push(t.version);var a=T.open.apply(T,i);n&&(a.onupgradeneeded=function(n){var r=a.result;try{r.createObjectStore(t.storeName),n.oldVersion<=1&&r.createObjectStore(x)}catch(o){if("ConstraintError"!==o.name)throw o;e.console.warn('The database "'+t.name+'" has been upgraded from version '+n.oldVersion+" to version "+n.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),a.onerror=function(){o(a.error)},a.onsuccess=function(){r(a.result),d(t)}})}function y(t,n){if(!t.db)return!0;var r=!t.db.objectStoreNames.contains(t.storeName),o=t.version<t.db.version,i=t.version>t.db.version;if(o&&(t.version!==n&&e.console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),i||r){if(r){var a=t.db.version+1;a>t.version&&(t.version=a)}return!0}return!1}function m(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo,i=o.db.transaction(o.storeName,"readonly").objectStore(o.storeName),a=i.get(t);a.onsuccess=function(){var t=a.result;void 0===t&&(t=null),u(t)&&(t=s(t)),e(t)},a.onerror=function(){n(a.error)}})["catch"](n)});return I(o,n),o}function b(e,t){var n=this,r=new Promise(function(t,r){n.ready().then(function(){var o=n._dbInfo,i=o.db.transaction(o.storeName,"readonly").objectStore(o.storeName),a=i.openCursor(),c=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;u(r)&&(r=s(r));var o=e(r,n.key,c++);void 0!==o?t(o):n["continue"]()}else t()},a.onerror=function(){r(a.error)}})["catch"](r)});return I(r,t),r}function g(t,n,r){var o=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var s=new Promise(function(e,r){var s;o.ready().then(function(){return s=o._dbInfo,n instanceof Blob?i(s.db).then(function(e){return e?n:a(n)}):n}).then(function(n){var o=s.db.transaction(s.storeName,"readwrite"),i=o.objectStore(s.storeName);null===n&&(n=void 0),o.oncomplete=function(){void 0===n&&(n=null),e(n)},o.onabort=o.onerror=function(){var e=a.error?a.error:a.transaction.error;r(e)};var a=i.put(n,t)})["catch"](r)});return I(s,r),s}function w(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo,i=o.db.transaction(o.storeName,"readwrite"),a=i.objectStore(o.storeName),s=a["delete"](t);i.oncomplete=function(){e()},i.onerror=function(){n(s.error)},i.onabort=function(){var e=s.error?s.error:s.transaction.error;n(e)}})["catch"](n)});return I(o,n),o}function _(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo,o=r.db.transaction(r.storeName,"readwrite"),i=o.objectStore(r.storeName),a=i.clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=a.error?a.error:a.transaction.error;n(e)}})["catch"](n)});return I(n,e),n}function E(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo,o=r.db.transaction(r.storeName,"readonly").objectStore(r.storeName),i=o.count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}})["catch"](n)});return I(n,e),n}function S(e,t){var n=this,r=new Promise(function(t,r){return 0>e?void t(null):void n.ready().then(function(){var o=n._dbInfo,i=o.db.transaction(o.storeName,"readonly").objectStore(o.storeName),a=!1,s=i.openCursor();s.onsuccess=function(){var n=s.result;return n?void(0===e?t(n.key):a?t(n.key):(a=!0,n.advance(e))):void t(null)},s.onerror=function(){r(s.error)}})["catch"](r)});return I(r,t),r}function k(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo,o=r.db.transaction(r.storeName,"readonly").objectStore(r.storeName),i=o.openCursor(),a=[];i.onsuccess=function(){var t=i.result;return t?(a.push(t.key),void t["continue"]()):void e(a)},i.onerror=function(){n(i.error)}})["catch"](n)});return I(n,e),n}function I(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}var T=T||e.indexedDB||e.webkitIndexedDB||e.mozIndexedDB||e.OIndexedDB||e.msIndexedDB;if(T){var A,P,x="local-forage-detect-blob-support",N={_driver:"asyncStorage",_initStorage:l,iterate:b,getItem:m,setItem:g,removeItem:w,clear:_,length:E,key:S,keys:k};return N}}("undefined"!=typeof window?window:self);t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){function t(e){var t=this,r={};if(e)for(var o in e)r[o]=e[o];return r.keyPrefix=r.name+"/",r.storeName!==t._defaultConfig.storeName&&(r.keyPrefix+=r.storeName+"/"),t._dbInfo=r,new Promise(function(e,t){e(n(3))}).then(function(e){return r.serializer=e,Promise.resolve()})}function r(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=l.length-1;n>=0;n--){var r=l.key(n);0===r.indexOf(e)&&l.removeItem(r)}});return d(n,e),n}function o(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=r.ready().then(function(){var e=r._dbInfo,n=l.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n});return d(o,n),o}function i(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=l.length,a=1,s=0;i>s;s++){var u=l.key(s);if(0===u.indexOf(r)){var c=l.getItem(u);if(c&&(c=t.serializer.deserialize(c)),c=e(c,u.substring(o),a++),void 0!==c)return c}}});return d(r,t),r}function a(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=l.key(e)}catch(o){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return d(r,t),r}function s(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=l.length,r=[],o=0;n>o;o++)0===l.key(o).indexOf(e.keyPrefix)&&r.push(l.key(o).substring(e.keyPrefix.length));return r});return d(n,e),n}function u(e){var t=this,n=t.keys().then(function(e){return e.length});return d(n,e),n}function c(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=r.ready().then(function(){var e=r._dbInfo;l.removeItem(e.keyPrefix+t)});return d(o,n),o}function f(t,n,r){var o=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var i=o.ready().then(function(){void 0===n&&(n=null);var e=n;return new Promise(function(r,i){var a=o._dbInfo;a.serializer.serialize(n,function(n,o){if(o)i(o);else try{l.setItem(a.keyPrefix+t,n),r(e)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||i(s),i(s)}})})});return d(i,r),i}function d(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}var l=null;try{if(!(e.localStorage&&"setItem"in e.localStorage))return;l=e.localStorage}catch(v){return}var p={_driver:"localStorageWrapper",_initStorage:t,iterate:i,getItem:o,setItem:f,removeItem:c,clear:r,length:u,key:a,keys:s};return p}("undefined"!=typeof window?window:self);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n=function(e){function t(t,n){t=t||[],n=n||{};try{return new Blob(t,n)}catch(r){if("TypeError"!==r.name)throw r;for(var o=e.BlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder||e.WebKitBlobBuilder,i=new o,a=0;a<t.length;a+=1)i.append(t[a]);return i.getBlob(n.type)}}function n(e,t){var n="";if(e&&(n=e.toString()),e&&("[object ArrayBuffer]"===e.toString()||e.buffer&&"[object ArrayBuffer]"===e.buffer.toString())){var r,o=c;e instanceof ArrayBuffer?(r=e,o+=d):(r=e.buffer,"[object Int8Array]"===n?o+=v:"[object Uint8Array]"===n?o+=p:"[object Uint8ClampedArray]"===n?o+=h:"[object Int16Array]"===n?o+=y:"[object Uint16Array]"===n?o+=b:"[object Int32Array]"===n?o+=m:"[object Uint32Array]"===n?o+=g:"[object Float32Array]"===n?o+=w:"[object Float64Array]"===n?o+=_:t(new Error("Failed to get type for BinaryArray"))),t(o+i(r))}else if("[object Blob]"===n){var a=new FileReader;a.onload=function(){var n=s+e.type+"~"+i(this.result);t(c+l+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(u){console.error("Couldn't convert value into a JSON string: ",e),t(null,u)}}function r(e){if(e.substring(0,f)!==c)return JSON.parse(e);var n,r=e.substring(E),i=e.substring(f,E);if(i===l&&u.test(r)){var a=r.match(u);n=a[1],r=r.substring(a[0].length)}var s=o(r);switch(i){case d:return s;case l:return t([s],{type:n});case v:return new Int8Array(s);case p:return new Uint8Array(s);case h:return new Uint8ClampedArray(s);case y:return new Int16Array(s);case b:return new Uint16Array(s);case m:return new Int32Array(s);case g:return new Uint32Array(s);case w:return new Float32Array(s);case _:return new Float64Array(s);default:throw new Error("Unkown type: "+i)}}function o(e){var t,n,r,o,i,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var f=new ArrayBuffer(s),d=new Uint8Array(f);for(t=0;u>t;t+=4)n=a.indexOf(e[t]),r=a.indexOf(e[t+1]),o=a.indexOf(e[t+2]),i=a.indexOf(e[t+3]),d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&i;return f}function i(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=a[n[t]>>2],r+=a[(3&n[t])<<4|n[t+1]>>4],r+=a[(15&n[t+1])<<2|n[t+2]>>6],r+=a[63&n[t+2]];return n.length%3===2?r=r.substring(0,r.length-1)+"=":n.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s="~~local_forage_type~",u=/^~~local_forage_type~([^~]+)~/,c="__lfsc__:",f=c.length,d="arbf",l="blob",v="si08",p="ui08",h="uic8",y="si16",m="si32",b="ur16",g="ui32",w="fl32",_="fl64",E=f+d.length,S={serialize:n,deserialize:r,stringToBuffer:o,bufferToString:i};return S}("undefined"!=typeof window?window:self);t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){function t(e){var t=this,r={db:null};if(e)for(var o in e)r[o]="string"!=typeof e[o]?e[o].toString():e[o];var i=new Promise(function(e,n){try{r.db=l(r.name,String(r.version),r.description,r.size)}catch(o){return n(o)}r.db.transaction(function(o){o.executeSql("CREATE TABLE IF NOT EXISTS "+r.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){t._dbInfo=r,e()},function(e,t){n(t)})})});return new Promise(function(e,t){e(n(3))}).then(function(e){return r.serializer=e,i})}function r(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){r.executeSql("SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[t],function(t,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),e(r)},function(e,t){n(t)})})})["catch"](n)});return d(o,n),o}function o(e,t){var n=this,r=new Promise(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,s=0;a>s;s++){var u=i.item(s),c=u.value;if(c&&(c=o.serializer.deserialize(c)),c=e(c,u.key,s+1),void 0!==c)return void t(c)}t()},function(e,t){r(t)})})})["catch"](r)});return d(r,t),r}function i(t,n,r){var o=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var i=new Promise(function(e,r){o.ready().then(function(){void 0===n&&(n=null);var i=n,a=o._dbInfo;a.serializer.serialize(n,function(n,o){o?r(o):a.db.transaction(function(o){o.executeSql("INSERT OR REPLACE INTO "+a.storeName+" (key, value) VALUES (?, ?)",[t,n],function(){e(i)},function(e,t){r(t)})},function(e){e.code===e.QUOTA_ERR&&r(e)})})})["catch"](r)});return d(i,r),i}function a(t,n){var r=this;"string"!=typeof t&&(e.console.warn(t+" used as a key, but it is not a string."),t=String(t));var o=new Promise(function(e,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){r.executeSql("DELETE FROM "+o.storeName+" WHERE key = ?",[t],function(){e()},function(e,t){n(t)})})})["catch"](n)});return d(o,n),o}function s(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})})["catch"](n)});return d(n,e),n}function u(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})})["catch"](n)});return d(n,e),n}function c(e,t){var n=this,r=new Promise(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})})["catch"](r)});return d(r,t),r}function f(e){var t=this,n=new Promise(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)},function(e,t){n(t)})})})["catch"](n)});return d(n,e),n}function d(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}var l=e.openDatabase;if(l){var v={_driver:"webSQLStorage",_initStorage:t,iterate:o,getItem:r,setItem:i,removeItem:a,clear:s,length:u,key:c,keys:f};return v}}("undefined"!=typeof window?window:self);t["default"]=r,e.exports=t["default"]}])})}).call(t,function(){return this}(),n(3))},function(e,t){function n(){c=!1,a.length?u=a.concat(u):f=-1,u.length&&r()}function r(){if(!c){var e=setTimeout(n);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var a,s=e.exports={},u=[],c=!1,f=-1;s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new o(e,t)),1!==u.length||c||setTimeout(r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=i,s.addListener=i,s.once=i,s.off=i,s.removeListener=i,s.removeAllListeners=i,s.emit=i,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(t,n){t.exports=e}])});
{'fraction_non_alphanumeric': 0.28439553301521475, 'fraction_numerical': 0.014215404601893722, 'mean_word_length': 13.77029520295203, 'pattern_counts': {'":': 22, '<': 69, '<?xml version=': 0, '>': 65, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2521225', 'n_tokens_mistral': 35116, 'n_tokens_neox': 34599, 'n_words': 2351}