forked from shubhamjain/svg-loader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svg-loader.min.js
3 lines (3 loc) · 33.2 KB
/
svg-loader.min.js
1
2
3
/*! For license information please see svg-loader.min.js.LICENSE.txt */
(()=>{var e={701:e=>{"use strict";let t=0;e.exports={incr:()=>++t,decr:()=>--t,curr:()=>t}},941:e=>{"use strict";e.exports=(e,t,r="")=>{const n=/url\(['"]?#([\w:.-]+)['"]?\)/g,o=/#([\w:.-]+)/g;return t.match(n)&&(t=t.replace(n,(function(t,r){return e[r]?`url(#${e[r]})`:t}))),["href","xlink:href"].includes(r)&&t.match(o)&&(t=t.replace(o,(function(t,r){return e[r]?`#${e[r]}`:t}))),t}},905:e=>{"use strict";e.exports=(e,t,r)=>{const n=new RegExp("([^\r\n,{}]+)(,(?=[^}]*{)|s*{)","g");return e.replace(n,(function(e,n,o){if(n.match(/^\s*(@media|@.*keyframes|to|from|@font-face|1?[0-9]?[0-9])/))return n+o;const i=n.match(/#(\w+)/);return i&&r[i[1]]&&(n=n.replace(i[0],`#${r[i[1]]}`)),(n=n.replace(/^(\s*)/,"$1"+t+" "))+o}))}},255:(e,t,r)=>{"use strict";const n=r(483);let o=null;e.exports={getStorage:async e=>o||await(async e=>(n.config({name:e}),o=n,o))(e)}},483:(e,t,r)=>{e.exports=function e(t,r,n){function o(a,u){if(!r[a]){if(!t[a]){if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=r[a]={exports:{}};t[a][0].call(s.exports,(function(e){return o(t[a][1][e]||e)}),s,s.exports,e,t,r,n)}return r[a].exports}for(var i=void 0,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,n){(function(e){"use strict";var r,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(f),u=e.document.createTextNode("");a.observe(u,{characterData:!0}),r=function(){u.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){f(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(f,0)};else{var c=new e.MessageChannel;c.port1.onmessage=f,r=function(){c.port2.postMessage(0)}}var s=[];function f(){var e,t;n=!0;for(var r=s.length;r;){for(t=s,s=[],e=-1;++e<r;)t[e]();r=s.length}n=!1}t.exports=function(e){1!==s.push(e)||n||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function o(){}var i={},a=["REJECTED"],u=["FULFILLED"],c=["PENDING"];function s(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==o&&v(this,e)}function f(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function l(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return i.reject(e,t)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,n)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function v(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var a=h((function(){t(o,n)}));"error"===a.status&&n(a.value)}function h(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=s,s.prototype.catch=function(e){return this.then(null,e)},s.prototype.then=function(e,t){if("function"!=typeof e&&this.state===u||"function"!=typeof t&&this.state===a)return this;var r=new this.constructor(o);return this.state!==c?l(r,this.state===u?e:t,this.outcome):this.queue.push(new f(r,e,t)),r},f.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},f.prototype.otherCallFulfilled=function(e){l(this.promise,this.onFulfilled,e)},f.prototype.callRejected=function(e){i.reject(this.promise,e)},f.prototype.otherCallRejected=function(e){l(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=h(d,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)v(e,n);else{e.state=u,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=a,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},s.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},s.reject=function(e){var t=new this(o);return i.reject(t,e)},s.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),u=0,c=-1,s=new this(o);++c<r;)f(e[c],c);return s;function f(e,o){t.resolve(e).then((function(e){a[o]=e,++u!==r||n||(n=!0,i.resolve(s,a))}),(function(e){n||(n=!0,i.reject(s,e))}))}},s.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r,n=e.length,a=!1;if(!n)return this.resolve([]);for(var u=-1,c=new this(o);++u<n;)r=e[u],t.resolve(r).then((function(e){a||(a=!0,i.resolve(c,e))}),(function(e){a||(a=!0,i.reject(c,e))}));return c}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function i(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function u(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function s(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function f(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var l="local-forage-detect-blob-support",d=void 0,v={},h=Object.prototype.toString,b="readonly",y="readwrite";function p(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),o=0;o<t;o++)n[o]=e.charCodeAt(o);return r}function m(e){return"boolean"==typeof d?a.resolve(d):function(e){return new a((function(t){var r=e.transaction(l,y),n=i([""]);r.objectStore(l).put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return d=e}))}function g(e){var t=v[e.name],r={};r.promise=new a((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function _(e){var t=v[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var r=v[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function I(e,t){return new a((function(r,n){if(v[e.name]=v[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);g(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var r=a.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore(l)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),n(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},r(t),_(e)}}))}function S(e){return I(e,!1)}function E(e){return I(e,!0)}function N(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,o=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function A(e){return i([p(atob(e.data))],{type:e.type})}function j(e){return e&&e.__local_forage_encoded_blob}function x(e){var t=this,r=t._initReady().then((function(){var e=v[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(r,e,e),r}function O(e,t,r,n){void 0===n&&(n=1);try{var o=e.db.transaction(e.storeName,t);r(null,o)}catch(o){if(n>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),E(e)})).then((function(){return function(e){g(e);for(var t=v[e.name],r=t.forages,n=0;n<r.length;n++){var o=r[n];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,S(e).then((function(t){return e.db=t,N(e)?E(e):t})).then((function(n){e.db=t.db=n;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=n})).catch((function(t){throw w(e,t),t}))}(e).then((function(){O(e,t,r,n-1)}))})).catch(r);r(o)}}var R={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var o=v[r.name];o||(o={forages:[],db:null,dbReady:null,deferredOperations:[]},v[r.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=x);var i=[];function u(){return a.resolve()}for(var c=0;c<o.forages.length;c++){var s=o.forages[c];s!==t&&i.push(s._initReady().catch(u))}var f=o.forages.slice(0);return a.all(i).then((function(){return r.db=o.db,S(r)})).then((function(e){return r.db=e,N(r,t._defaultConfig.version)?E(r):e})).then((function(e){r.db=o.db=e,t._dbInfo=r;for(var n=0;n<f.length;n++){var i=f[n];i!==t&&(i._dbInfo.db=r.db,i._dbInfo.version=r.version)}}))},_support:function(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){O(r._dbInfo,b,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).openCursor(),u=1;a.onsuccess=function(){var r=a.result;if(r){var n=r.value;j(n)&&(n=A(n));var o=e(n,r.key,u++);void 0!==o?t(o):r.continue()}else t()},a.onerror=function(){n(a.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},getItem:function(e,t){var r=this;e=s(e);var n=new a((function(t,n){r.ready().then((function(){O(r._dbInfo,b,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),j(e)&&(e=A(e)),t(e)},a.onerror=function(){n(a.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},setItem:function(e,t,r){var n=this;e=s(e);var o=new a((function(r,o){var i;n.ready().then((function(){return i=n._dbInfo,"[object Blob]"===h.call(t)?m(i.db).then((function(e){return e?t:(r=t,new a((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){O(n._dbInfo,y,(function(i,a){if(i)return o(i);try{var u=a.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var c=u.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),r(t)},a.onabort=a.onerror=function(){var e=c.error?c.error:c.transaction.error;o(e)}}catch(e){o(e)}}))})).catch(o)}));return u(o,r),o},removeItem:function(e,t){var r=this;e=s(e);var n=new a((function(t,n){r.ready().then((function(){O(r._dbInfo,y,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){n(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},clear:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){O(t._dbInfo,y,(function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return u(r,e),r},length:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){O(t._dbInfo,b,(function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){r(i.error)}}catch(e){r(e)}}))})).catch(r)}));return u(r,e),r},key:function(e,t){var r=this,n=new a((function(t,n){e<0?t(null):r.ready().then((function(){O(r._dbInfo,b,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName),u=!1,c=a.openKeyCursor();c.onsuccess=function(){var r=c.result;r?0===e||u?t(r.key):(u=!0,r.advance(e)):t(null)},c.onerror=function(){n(c.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},keys:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){O(t._dbInfo,b,(function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var t=i.result;t?(a.push(t.key),t.continue()):e(a)},i.onerror=function(){r(i.error)}}catch(e){r(e)}}))})).catch(r)}));return u(r,e),r},dropInstance:function(e,t){t=f.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;if(e.name){var c=e.name===r.name&&i._dbInfo.db?a.resolve(i._dbInfo.db):S(e).then((function(t){var r=v[e.name],n=r.forages;r.db=t;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=t;return t}));n=e.storeName?c.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;g(e);var n=v[e.name],i=n.forages;t.close();for(var u=0;u<i.length;u++){var c=i[u];c._dbInfo.db=null,c._dbInfo.version=r}var s=new a((function(t,n){var i=o.open(e.name,r);i.onerror=function(e){i.result.close(),n(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}));return s.then((function(e){n.db=e;for(var t=0;t<i.length;t++){var r=i[t];r._dbInfo.db=e,_(r._dbInfo)}})).catch((function(t){throw(w(e,t)||a.resolve()).catch((function(){})),t}))}})):c.then((function(t){g(e);var r=v[e.name],n=r.forages;t.close();for(var i=0;i<n.length;i++)n[i]._dbInfo.db=null;var u=new a((function(t,r){var n=o.deleteDatabase(e.name);n.onerror=function(){var e=n.result;e&&e.close(),r(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}}));return u.then((function(e){r.db=e;for(var t=0;t<n.length;t++)_(n[t]._dbInfo)})).catch((function(t){throw(w(e,t)||a.resolve()).catch((function(){})),t}))}))}else n=a.reject("Invalid arguments");return u(n,t),n}};var D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=/^~~local_forage_type~([^~]+)~/,C="__lfsc__:",k=C.length,B="arbf",L="blob",M="si08",F="ui08",z="uic8",q="si16",P="si32",U="ur16",W="ui32",$="fl32",H="fl64",J=k+B.length,K=Object.prototype.toString;function Q(e){var t,r,n,o,i,a=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var s=new ArrayBuffer(a),f=new Uint8Array(s);for(t=0;t<u;t+=4)r=D.indexOf(e[t]),n=D.indexOf(e[t+1]),o=D.indexOf(e[t+2]),i=D.indexOf(e[t+3]),f[c++]=r<<2|n>>4,f[c++]=(15&n)<<4|o>>2,f[c++]=(3&o)<<6|63&i;return s}function G(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=D[r[t]>>2],n+=D[(3&r[t])<<4|r[t+1]>>4],n+=D[(15&r[t+1])<<2|r[t+2]>>6],n+=D[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var V={serialize:function(e,t){var r="";if(e&&(r=K.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===K.call(e.buffer))){var n,o=C;e instanceof ArrayBuffer?(n=e,o+=B):(n=e.buffer,"[object Int8Array]"===r?o+=M:"[object Uint8Array]"===r?o+=F:"[object Uint8ClampedArray]"===r?o+=z:"[object Int16Array]"===r?o+=q:"[object Uint16Array]"===r?o+=U:"[object Int32Array]"===r?o+=P:"[object Uint32Array]"===r?o+=W:"[object Float32Array]"===r?o+=$:"[object Float64Array]"===r?o+=H:t(new Error("Failed to get type for BinaryArray"))),t(o+G(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r="~~local_forage_type~"+e.type+"~"+G(this.result);t("__lfsc__:blob"+r)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if(e.substring(0,k)!==C)return JSON.parse(e);var t,r=e.substring(J),n=e.substring(k,J);if(n===L&&T.test(r)){var o=r.match(T);t=o[1],r=r.substring(o[0].length)}var a=Q(r);switch(n){case B:return a;case L:return i([a],{type:t});case M:return new Int8Array(a);case F:return new Uint8Array(a);case z:return new Uint8ClampedArray(a);case q:return new Int16Array(a);case U:return new Uint16Array(a);case P:return new Int32Array(a);case W:return new Uint32Array(a);case $:return new Float32Array(a);case H:return new Float64Array(a);default:throw new Error("Unkown type: "+n)}},stringToBuffer:Q,bufferToString:G};function X(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function Y(e,t,r,n,o,i){e.executeSql(r,n,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,u){u.rows.length?i(e,a):X(e,t,(function(){e.executeSql(r,n,o,i)}),i)}),i):i(e,a)}),i)}function Z(e,t,r,n){var o=this;e=s(e);var i=new a((function(i,a){o.ready().then((function(){void 0===t&&(t=null);var u=t,c=o._dbInfo;c.serializer.serialize(t,(function(t,s){s?a(s):c.db.transaction((function(r){Y(r,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(u)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void i(Z.apply(o,[e,u,r,n-1]));a(t)}}))}))})).catch(a)}));return u(i,r),i}function ee(e){return new a((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var o=[],i=0;i<n.rows.length;i++)o.push(n.rows.item(i).name);t({db:e,storeNames:o})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var te={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var o=new a((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(o){X(o,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=V,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){Y(r,o,"SELECT * FROM "+o.storeName,[],(function(r,n){for(var i=n.rows,a=i.length,u=0;u<a;u++){var c=i.item(u),s=c.value;if(s&&(s=o.serializer.deserialize(s)),void 0!==(s=e(s,c.key,u+1)))return void t(s)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},getItem:function(e,t){var r=this;e=s(e);var n=new a((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){Y(r,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=o.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},setItem:function(e,t,r){return Z.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=s(e);var n=new a((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){Y(r,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},clear:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){Y(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,e),r},length:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){Y(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,e),r},key:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){Y(r,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},keys:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){Y(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],o=0;o<r.rows.length;o++)n.push(r.rows.item(o).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,e),r},dropInstance:function(e,t){t=f.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;return u(n=e.name?new a((function(t){var n;n=e.name===r.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(ee(n))})).then((function(e){return new a((function(t,r){e.db.transaction((function(n){function o(e){return new a((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var i=[],u=0,c=e.storeNames.length;u<c;u++)i.push(o(e.storeNames[u]));a.all(i).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):a.reject("Invalid arguments"),t),n}};function re(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function ne(){return!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0}var oe={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=re(e,this._defaultConfig),ne()?(this._dbInfo=t,t.serializer=V,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,o=n.length,i=localStorage.length,a=1,u=0;u<i;u++){var c=localStorage.key(u);if(0===c.indexOf(n)){var s=localStorage.getItem(c);if(s&&(s=t.serializer.deserialize(s)),void 0!==(s=e(s,c.substring(o),a++)))return s}}}));return u(n,t),n},getItem:function(e,t){var r=this;e=s(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return u(n,t),n},setItem:function(e,t,r){var n=this;e=s(e);var o=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new a((function(o,i){var a=n._dbInfo;a.serializer.serialize(t,(function(t,n){if(n)i(n);else try{localStorage.setItem(a.keyPrefix+e,t),o(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}}))}))}));return u(o,r),o},removeItem:function(e,t){var r=this;e=s(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return u(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return u(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return u(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return u(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],o=0;o<r;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&n.push(i.substring(e.keyPrefix.length))}return n}));return u(r,e),r},dropInstance:function(e,t){if(t=f.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,o=this;return n=e.name?new a((function(t){e.storeName?t(re(e,o._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):a.reject("Invalid arguments"),u(n,t),n}},ie=function(e,t){for(var r=e.length,n=0;n<r;){if((o=e[n])===(i=t)||"number"==typeof o&&"number"==typeof i&&isNaN(o)&&isNaN(i))return!0;n++}var o,i;return!1},ae=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},ue={},ce={},se={INDEXEDDB:R,WEBSQL:te,LOCALSTORAGE:oe},fe=[se.INDEXEDDB._driver,se.WEBSQL._driver,se.LOCALSTORAGE._driver],le=["dropInstance"],de=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(le),ve={description:"",driver:fe.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function he(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function be(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(ae(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var ye=function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),se)if(se.hasOwnProperty(r)){var n=se[r],o=n._driver;this[r]=o,ue[o]||this.defineDriver(n)}this._defaultConfig=be({},ve),this._config=be({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new a((function(t,r){try{var n=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(o);for(var i=de.concat("_initStorage"),c=0,s=i.length;c<s;c++){var f=i[c];if((!ie(le,f)||e[f])&&"function"!=typeof e[f])return void r(o)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=a.reject(t);return u(r,arguments[arguments.length-1]),r}},r=0,n=le.length;r<n;r++){var o=le[r];e[o]||(e[o]=t(o))}}();var l=function(r){ue[n]&&console.info("Redefining LocalForage driver: "+n),ue[n]=e,ce[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return c(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=ue[e]?a.resolve(ue[e]):a.reject(new Error("Driver not found."));return c(n,t,r),n},e.prototype.getSerializer=function(e){var t=a.resolve(V);return c(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return c(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;ae(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){n._config.driver=n.driver()}function u(e){return n._extend(e),i(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return a.resolve()})):a.resolve();return this._driverSet=s.then((function(){var e=o[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,i(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var o=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(o).then(u).catch(r)}i();var c=new Error("No available storage method found.");return n._driverSet=a.reject(c),n._driverSet}()}}(o)}))})).catch((function(){i();var e=new Error("No available storage method found.");return n._driverSet=a.reject(e),n._driverSet})),c(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!ce[e]},e.prototype._extend=function(e){be(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var o=e[r];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=de.length;e<t;e++)he(this,de[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),pe=new ye;t.exports=pe},{3:3}]},{},[4])(4)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";const e=r(905),t=r(941),n=r(701),{getStorage:o}=r(255),i="svg-loader-cache",a=[],u={},c=(r,o,i)=>{const{enableJs:c,disableUniqueIds:s,disableCssScoping:f}=o,l=(new DOMParser).parseFromString(i,"text/html"),d=l.querySelector("svg"),v=(()=>{if(a.length)return a;for(const e in document.head)e.startsWith("on")&&a.push(e);return a})(),h=u[r.getAttribute("data-id")]||new Set,b=r.getAttribute("data-id")||`svg-loader_${n.incr()}`,y={};s||Array.from(l.querySelectorAll("[id]")).forEach((e=>{const t=e.getAttribute("id"),r=`${t}_${n.incr()}`;e.setAttribute("id",r),y[t]=r})),Array.from(l.querySelectorAll("*")).forEach((r=>{if("script"===r.tagName){if(!c)return void r.remove();{const e=document.createElement("script");e.innerHTML=r.innerHTML,document.body.appendChild(e)}}for(let e=0;e<r.attributes.length;e++){const{name:n,value:o}=r.attributes[e],i=t(y,o,n);o!==i&&r.setAttribute(n,i),!v.includes(n.toLowerCase())||c?["href","xlink:href"].includes(n)&&o.startsWith("javascript")&&!c&&r.removeAttribute(n):r.removeAttribute(n)}if("style"===r.tagName&&!f){let n=e(r.innerHTML,`[data-id="${b}"]`,y);n=t(y,n),n!==r.innerHTML&&(r.innerHTML=n)}}));for(let e=0;e<d.attributes.length;e++){const{name:t,value:n}=d.attributes[e];r.getAttribute(t)&&!h.has(t)||(h.add(t),r.setAttribute(t,n))}u[b]=h,r.setAttribute("data-id",b),r.innerHTML=d.innerHTML;const p=new CustomEvent("iconload",{bubbles:!0});if(r.dispatchEvent(p),r.getAttribute("oniconload")){r.setAttribute("onloadedmetadata",r.getAttribute("oniconload"));const e=new CustomEvent("loadedmetadata",{bubbles:!1});r.dispatchEvent(e),r.removeAttribute("onloadedmetadata")}},s={},f={},l=async e=>{const t=e.getAttribute("data-src"),r=e.getAttribute("data-cache"),n="enabled"===e.getAttribute("data-js"),a="disabled"===e.getAttribute("data-unique-ids"),u="disabled"===e.getAttribute("data-css-scoping");let d=null;const v=f[t];v||(d=await(async e=>{try{const t=await o(i);let r=await t.getItem(`loader_${e}`);if(!r)return;return r=JSON.parse(r),Date.now()<r.expiry?r.data:void t.removeItem(`loader_${e}`)}catch(e){return}})(t));const h="disabled"!==r,b=c.bind(self,e,{enableJs:n,disableUniqueIds:a,disableCssScoping:u});if(v||h&&d){const e=v||d;v||(f[t]=e),b(e)}else{if(s[t])return void setTimeout((()=>l(e)),20);s[t]=!0,fetch(t).then((e=>{if(!e.ok)throw Error(`Request for '${t}' returned ${e.status} (${e.statusText})`);return e.text()})).then((e=>{const n=e.toLowerCase().trim();if(!n.startsWith("<svg")&&!n.startsWith("<?xml"))throw Error(`Resource '${t}' returned an invalid SVG file`);h&&(async(e,t,r)=>{try{const n=await o(i),a=parseInt(r,10);await n.setItem(`loader_${e}`,JSON.stringify({data:t,expiry:Date.now()+(Number.isNaN(a)?864e5:a)}))}catch(e){console.error(e)}})(t,e,r),f[t]=e,b(e)})).catch((e=>{console.error(e)})).finally((()=>{delete s[t]}))}};let d;globalThis.IntersectionObserver&&(d=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(l(e.target),d.unobserve(e.target))}))}),{rootMargin:"1200px"}));const v=[];function h(){Array.from(document.querySelectorAll("svg[data-src]:not([data-id])")).forEach((e=>{-1===v.indexOf(e)&&(v.push(e),"lazy"===e.getAttribute("data-loading")?d.observe(e):l(e))}))}let b=!1;if(globalThis.addEventListener){const e=setInterval((()=>{h()}),100);globalThis.addEventListener("DOMContentLoaded",(()=>{clearInterval(e),h(),b||(b=!0,new MutationObserver((e=>{e.some((e=>Array.from(e.addedNodes).some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("data-src")&&!e.getAttribute("data-id")||e.querySelector("svg[data-src]:not([data-id])"))))))&&h(),e.forEach((e=>{"attributes"===e.type&&l(e.target)}))})).observe(document.documentElement,{attributeFilter:["data-src"],attributes:!0,childList:!0,subtree:!0}))}))}})()})();
//# sourceMappingURL=svg-loader.min.js.map